zdashboard 2.3.0 → 2.3.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 +7 -5
- package/dist/cli.js.map +1 -1
- package/dist/web/assets/{CodeViewer-D8YqzmwB.js → FileIcon-CA7j6xAr.js} +48 -8
- package/dist/web/assets/{FilterPills-A_fz1nby.js → FilterPills-CT9_aiMo.js} +1 -1
- package/dist/web/assets/{MdViewer-P4wmRzy_.js → MdViewer-C-qU08GL.js} +1 -1
- package/dist/web/assets/{ProgressBar-B4U41etC.js → ProgressBar-CyYoGfrt.js} +1 -1
- package/dist/web/assets/Workspace-CqK1Sdtv.js +16 -0
- package/dist/web/assets/{badge-C92Y2FRG.js → badge-CsNeQaUt.js} +1 -1
- package/dist/web/assets/book-open-DgUv7g0V.js +6 -0
- package/dist/web/assets/{file-text-BHzQwEJK.js → file-text-AM0snHQm.js} +1 -1
- package/dist/web/assets/{index-C_wTjWH0.js → index-BF1XYOKG.js} +1 -1
- package/dist/web/assets/index-C9nEYrn8.css +1 -0
- package/dist/web/assets/{index-CNPKNdvp.js → index-Dcz2Myaf.js} +25 -25
- package/dist/web/assets/web-4IVEiPQ7.js +36 -0
- package/dist/web/assets/{web-ZQ0eDR1y.js → web-4pvyVYqE.js} +1 -1
- package/dist/web/assets/web-B8iKfUHX.js +2 -0
- package/dist/web/assets/web-BOZwX-p2.js +56 -0
- package/dist/web/assets/{web-vTYFh6Bo.js → web-CPCrz28U.js} +1 -1
- package/dist/web/assets/{web-JxMZZReP.js → web-DJnenbT2.js} +7 -2
- package/dist/web/assets/web-WH-i-efe.js +16 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/Workspace-nm0YyxF7.js +0 -1
- package/dist/web/assets/index-ByI0Pghw.css +0 -1
- package/dist/web/assets/web-5tq6UJuk.js +0 -2
- package/dist/web/assets/web-DgYHvMu9.js +0 -16
- package/dist/web/assets/web-DhyfyLB-.js +0 -11
- package/dist/web/assets/web-vbs6AnjC.js +0 -26
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import{c as g,j as r,r as s,E as Q,G as U,F as Z,_ as W}from"./index-Dcz2Myaf.js";import{M as J}from"./MdViewer-C-qU08GL.js";import{C as G,I as K,P as X,F as Y}from"./FileIcon-CA7j6xAr.js";import{F as ee}from"./file-text-AM0snHQm.js";import{B as te}from"./book-open-DgUv7g0V.js";import"./index-BF1XYOKG.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 re=g("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
|
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("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
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 ne=g("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
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 se=g("FileQuestion",[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);/**
|
|
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 oe=g("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
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 ce=g("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
32
|
+
* @license lucide-react v0.460.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const ue=g("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);function ae({path:e}){return r.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:r.jsxs("div",{children:[r.jsx(se,{className:"h-10 w-10 mx-auto mb-3 opacity-50"}),r.jsx("p",{children:"该格式无法预览"}),r.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:e})]})})}let q=null;const V=new Set,k={get:()=>q,set:e=>{q=e,V.forEach(t=>t(e))},subscribe:e=>(V.add(e),()=>{V.delete(e)})};function ie({containerRef:e}){const[t,c]=s.useState([]),[f,i]=s.useState(null);s.useEffect(()=>{const o=e.current;if(!o)return;let l=!1;const u=()=>{if(l)return;const h=o.querySelectorAll("h1[id], h2[id], h3[id]"),a=[];h.forEach(x=>{var b;a.push({id:x.id,text:((b=x.textContent)==null?void 0:b.trim())??"",level:parseInt(x.tagName[1],10)})}),c(a)};u();const n=new MutationObserver(u);return n.observe(o,{childList:!0,subtree:!0,characterData:!0}),()=>{l=!0,n.disconnect()}},[e]),s.useEffect(()=>{const o=e.current;if(!o||!t.length)return;const l=new IntersectionObserver(u=>{const n=u.filter(h=>h.isIntersecting);if(n.length){const h=n.reduce((a,x)=>a.boundingClientRect.top<x.boundingClientRect.top?a:x);i(h.target.id)}},{root:o,rootMargin:"-60px 0px -70% 0px",threshold:0});return t.forEach(({id:u})=>{const n=o.querySelector(`#${CSS.escape(u)}`);n&&l.observe(n)}),()=>l.disconnect()},[t,e]);const d=o=>{var u;const l=(u=e.current)==null?void 0:u.querySelector(`#${CSS.escape(o)}`);l==null||l.scrollIntoView({behavior:"smooth",block:"start"})};return t.length?r.jsxs("nav",{className:"hidden md:flex w-44 shrink-0 flex-col border-l pl-3 py-2 overflow-y-auto","aria-label":"文档大纲",children:[r.jsxs("div",{className:"flex items-center gap-1 mb-2 text-[11px] font-medium text-muted-foreground uppercase tracking-wider",children:[r.jsx(ee,{className:"h-3 w-3"}),r.jsx("span",{children:"大纲"})]}),r.jsx("ul",{className:"space-y-0.5",children:t.map(o=>r.jsx("li",{children:r.jsx("button",{type:"button",onClick:()=>d(o.id),className:`w-full text-left text-[11px] leading-snug py-0.5 px-1.5 rounded truncate transition-colors ${f===o.id?"bg-primary/10 text-foreground font-medium":"text-muted-foreground hover:bg-muted/70"}`,style:{paddingLeft:6+(o.level-1)*10},children:o.text||o.id})},o.id))})]}):null}const le=2500;function de(e){const t=e.slice(e.lastIndexOf("/")+1).toLowerCase();if(t==="justfile"||t==="makefile")return G;const c=e.slice(e.lastIndexOf(".")).toLowerCase();return c===".md"||c===".markdown"?J:[".svg",".png",".jpg",".jpeg",".gif",".webp",".ico"].includes(c)?K:[".sql",".txt",".csv",".tsv",".json",".yaml",".yml",".xml",".py",".js",".ts",".java",".go",".rs",".rb",".php",".c",".cpp",".h",".cs",".swift",".kt",".scala",".sh",".bash",".zsh",".fish",".env",".gitignore",".dockerfile"].includes(c)?G:ae}function fe(e){const[t,c]=s.useState(()=>k.get()),[f,i]=s.useState(!1),d=s.useRef(null),o=t?de(t):null;return s.useEffect(()=>k.subscribe(c),[]),s.useEffect(()=>{const l=d.current;if(!l)return;const u=()=>{var a;const h=((a=l.textContent)==null?void 0:a.length)??0;i(h>le)};u();const n=new MutationObserver(u);return n.observe(l,{childList:!0,subtree:!0,characterData:!0}),()=>n.disconnect()},[t]),r.jsx("div",{className:"mx-auto h-full max-w-5xl bg-background border rounded-lg shadow-sm overflow-hidden flex flex-col",children:t&&o?r.jsxs("div",{className:"flex-1 min-h-0 flex overflow-hidden",children:[r.jsx("div",{ref:d,className:"flex-1 min-h-0 overflow-auto",children:r.jsx(o,{path:t})}),f&&r.jsx(ie,{containerRef:d})]}):r.jsx(Q,{icon:ne,title:"从左侧选择文件预览",hint:"支持 Markdown、图片、代码等格式",tone:"primary"})})}const he=Object.freeze(Object.defineProperty({__proto__:null,default:fe},Symbol.toStringTag,{value:"Module"}));function me(e,t,c,f){var i=this,d=s.useRef(null),o=s.useRef(0),l=s.useRef(0),u=s.useRef(null),n=s.useRef([]),h=s.useRef(),a=s.useRef(),x=s.useRef(e),b=s.useRef(!0),y=s.useRef(),O=s.useRef();x.current=e;var L=typeof window<"u",N=!t&&t!==0&&L;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var M=!!(c=c||{}).leading,R=!("trailing"in c)||!!c.trailing,S=!!c.flushOnExit&&R,j="maxWait"in c,z="debounceOnServer"in c&&!!c.debounceOnServer,I=j?Math.max(+c.maxWait||0,t):null,A=s.useMemo(function(){var v=function(m){var p=n.current,w=h.current;return n.current=h.current=null,o.current=m,l.current=l.current||m,a.current=x.current.apply(w,p)},E=function(m,p){N&&cancelAnimationFrame(u.current),u.current=N?requestAnimationFrame(m):setTimeout(m,p)},P=function(m){if(!b.current)return!1;var p=m-d.current;return!d.current||p>=t||p<0||j&&m-o.current>=I},$=function(m){return u.current=null,R&&n.current?v(m):(n.current=h.current=null,a.current)},F=function m(){var p=Date.now();if(M&&l.current===o.current&&T(),P(p))return $(p);if(b.current){var w=t-(p-d.current),_=j?Math.min(w,I-(p-o.current)):w;E(m,_)}},T=function(){f&&f({})},C=function(){if(L||z){var m,p=Date.now(),w=P(p);if(n.current=[].slice.call(arguments),h.current=i,d.current=p,S&&!y.current&&(y.current=function(){var _;((_=globalThis.document)==null?void 0:_.visibilityState)==="hidden"&&O.current.flush()},(m=globalThis.document)==null||m.addEventListener==null||m.addEventListener("visibilitychange",y.current)),w){if(!u.current&&b.current)return o.current=d.current,E(F,t),M?v(d.current):a.current;if(j)return E(F,t),v(d.current)}return u.current||E(F,t),a.current}};return C.cancel=function(){var m=u.current;m&&(N?cancelAnimationFrame(u.current):clearTimeout(u.current)),o.current=0,n.current=d.current=h.current=u.current=null,m&&f&&f({})},C.isPending=function(){return!!u.current},C.flush=function(){return u.current?$(Date.now()):a.current},C},[M,j,t,I,R,S,N,L,z,f]);return O.current=A,s.useEffect(function(){return b.current=!0,function(){var v;S&&O.current.flush(),y.current&&((v=globalThis.document)==null||v.removeEventListener==null||v.removeEventListener("visibilitychange",y.current),y.current=null),b.current=!1}},[S]),A}function pe(e,t){return e===t}function xe(e,t,c){var f=pe,i=s.useRef(e),d=s.useState({})[1],o=me(s.useCallback(function(u){i.current=u,d({})},[d]),t,c,d),l=s.useRef(e);return f(l.current,e)||(o(e),l.current=e),[i.current,o]}function D(e,t){return!t||e.name.toLowerCase().includes(t)?!0:(e.children??[]).some(c=>D(c,t))}const be={changes:ce,archive:re,specs:ue,docs:te,other:X};function B({node:e,depth:t,filter:c,current:f,onSelectFile:i}){const d=(e.children??[]).filter(n=>D(n,c)),[o,l]=s.useState(!e.defaultCollapsed),u=c?!0:o;return!d.length&&c?null:r.jsxs("div",{children:[(()=>{const n=e.name.match(/^([a-z]+)(?: \((\d+)\))?$/),h=n?be[n[1]]:void 0,a=u?Z:oe;return r.jsxs("button",{onClick:()=>l(x=>!x),className:"w-full flex items-center gap-1.5 px-2 py-1 text-xs text-foreground hover:bg-muted rounded-md mx-1",style:{paddingLeft:8+t*14,width:"calc(100% - 8px)"},children:[r.jsx(H,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${u?"rotate-90":""}`}),h?r.jsx(h,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):r.jsx(a,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground transition-colors"}),r.jsx("span",{className:"font-medium truncate",children:n?n[1]:e.name}),(n==null?void 0:n[2])&&r.jsx("span",{className:"ml-auto mr-1 shrink-0 rounded-full bg-muted px-1.5 text-[10px] font-mono text-muted-foreground",children:n[2]})]})})(),u&&d.map(n=>n.kind==="dir"?r.jsx(B,{node:n,depth:t+1,filter:c,current:f,onSelectFile:i},n.name+t):r.jsxs("button",{onClick:()=>n.path&&i(n.path),className:`w-full flex items-center gap-1.5 pr-2 py-1 text-xs hover:bg-muted rounded-md mx-1 ${f===n.path?"bg-primary/10 text-foreground font-medium":"text-muted-foreground"}`,style:{paddingLeft:20+t*14,width:"calc(100% - 8px)"},children:[r.jsx(Y,{name:n.name,active:f===n.path}),r.jsx("span",{className:"truncate",children:n.name})]},n.path))]})}function ve({worktrees:e}){const[t,c]=s.useState(!0),f=i=>{window.dispatchEvent(new CustomEvent("zd-dashboard-nav",{detail:{mode:"apply",wt:i.name}}))};return r.jsxs("div",{className:"mb-1",children:[r.jsxs("button",{onClick:()=>c(i=>!i),className:"w-full flex items-center gap-1 px-2 py-1.5 text-[11px] font-medium text-muted-foreground tracking-wide hover:text-foreground",children:[r.jsx(H,{className:`h-3 w-3 transition-transform ${t?"rotate-90":""}`}),r.jsx(U,{className:"h-3 w-3"}),r.jsxs("span",{children:["Worktrees (",e.length,")"]})]}),t&&e.map(i=>r.jsxs("button",{onClick:()=>f(i),title:`${i.branch}${i.dirty?" · 有未提交变更":""}`,className:"w-full flex items-center gap-1.5 px-2 py-1 text-xs text-foreground hover:bg-muted border-l-2 border-transparent",style:{paddingLeft:14},children:[r.jsx("span",{className:"truncate font-mono text-[11px]",children:i.branch}),r.jsxs("span",{className:"text-muted-foreground truncate",children:["/",i.name]}),i.dirty&&r.jsx("span",{className:"ml-auto flex-none h-2 w-2 rounded-full bg-destructive shrink-0",title:"有未提交变更"})]},i.name))]})}function ge({navTarget:e}){const t=s.useSyncExternalStore(k.subscribe,k.get),[c,f]=s.useState(null),[i,d]=s.useState(""),[o]=xe(i,150),[l,u]=s.useState([]);s.useEffect(()=>{e!=null&&e.filter&&d(e.filter)},[e==null?void 0:e.filter,e==null?void 0:e.navToken]),s.useEffect(()=>{fetch("/__files",{cache:"no-store"}).then(a=>a.json()).then(a=>f(a.tree??[]))},[]),s.useEffect(()=>{fetch("/__worktrees",{cache:"no-store"}).then(a=>a.json()).then(u).catch(()=>u([]))},[]);const n=s.useMemo(()=>c?c.filter(a=>D(a,o)):[],[c,o]),h=l.length>0;return r.jsxs("div",{className:"p-2",children:[r.jsx("input",{value:i,onChange:a=>d(a.target.value.toLowerCase()),placeholder:"过滤…",className:"w-full h-7 px-2 text-xs rounded border border-border bg-background focus:outline-none focus:border-primary"}),c?!n.length&&!h?r.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"无匹配"}):r.jsxs("div",{className:"py-1",children:[h&&r.jsx(ve,{worktrees:l}),n.map(a=>r.jsx(B,{node:a,depth:0,filter:o,current:t,onSelectFile:x=>k.set(x)},a.name))]}):r.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"加载中…"})]})}const ye=Object.freeze(Object.defineProperty({__proto__:null,default:ge},Symbol.toStringTag,{value:"Module"})),Ce={mode:"view",label:"项目浏览",icon:"👁️",description:"openspec / docs / 文档预览",Sidebar:s.lazy(()=>W(()=>Promise.resolve().then(()=>ye),void 0)),Workspace:s.lazy(()=>W(()=>Promise.resolve().then(()=>he),void 0))};export{ge as ViewSidebar,fe as ViewWorkspace,Ce as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as p,r as a,u as $,j as e,_ as A}from"./index-
|
|
1
|
+
import{c as p,r as a,u as $,j as e,_ as A}from"./index-Dcz2Myaf.js";import{M as I}from"./MdViewer-C-qU08GL.js";import{P as F}from"./ProgressBar-CyYoGfrt.js";import{F as L}from"./FilterPills-CT9_aiMo.js";import"./index-BF1XYOKG.js";/**
|
|
2
2
|
* @license lucide-react v0.460.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Workspace-CqK1Sdtv.js","assets/index-Dcz2Myaf.js","assets/index-C9nEYrn8.css","assets/ProgressBar-CyYoGfrt.js","assets/file-text-AM0snHQm.js","assets/book-open-DgUv7g0V.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as o,_ as t}from"./index-Dcz2Myaf.js";const a={mode:"stats",label:"项目统计",icon:"📊",description:"项目文件统计 · 扫描生成",Workspace:o.lazy(()=>t(()=>import("./Workspace-CqK1Sdtv.js"),__vite__mapDeps([0,1,2,3,4,5])))};export{a as default};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import{c as u,r as o,j as e,E as V,_ as j}from"./index-Dcz2Myaf.js";import{M}from"./MdViewer-C-qU08GL.js";import{C,I,P,F}from"./FileIcon-CA7j6xAr.js";import{F as L}from"./FilterPills-CT9_aiMo.js";import{F as E}from"./file-text-AM0snHQm.js";import{B as R}from"./book-open-DgUv7g0V.js";import"./index-BF1XYOKG.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 z=u("AudioLines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);/**
|
|
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 O=u("Blocks",[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]]);/**
|
|
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 U=u("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"}]]);/**
|
|
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 N=u("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"}]]);/**
|
|
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=u("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
|
|
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=u("Shapes",[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]);/**
|
|
32
|
+
* @license lucide-react v0.460.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const A=u("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"}]]);/**
|
|
37
|
+
* @license lucide-react v0.460.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const $=u("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
|
|
42
|
+
* @license lucide-react v0.460.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const W=u("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"}]]);/**
|
|
47
|
+
* @license lucide-react v0.460.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const D=u("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
|
|
52
|
+
* @license lucide-react v0.460.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const H=u("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);let v=null;const g=new Set,p={get:()=>v,set:t=>{v=t,g.forEach(i=>i(t))},subscribe:t=>(g.add(t),()=>{g.delete(t)})};function q({path:t}){return e.jsx("iframe",{src:"/"+encodeURI(t),title:"预览",className:"w-full h-full border-0 bg-white"})}function B({path:t}){const[i,r]=o.useState([]),[d,a]=o.useState(!0);return o.useEffect(()=>{let n=!1;return a(!0),r([]),fetch("/"+encodeURI(t),{cache:"no-store"}).then(l=>l.text()).then(l=>{if(n)return;const c=l.match(/--[A-Za-z0-9_-]+\s*:\s*[^;}\n]+/g)??[];if(!c.length){r([]),a(!1);return}const s=m=>/^(#([0-9a-fA-F]{3,8})\b|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(m.trim()),x=c.filter(m=>s(m)),h=c.filter(m=>/font|family|type/.test(m.toLowerCase())&&!s(m)),y=c.filter(m=>!x.includes(m)&&!h.includes(m)),b=m=>{const k=m.indexOf(":"),S=m.slice(0,k).trim(),_=m.slice(k+1).trim();return{name:S,value:_}},f=[];x.length&&f.push({label:`配色 · ${x.length}`,items:x.map(b)}),h.length&&f.push({label:`字体 · ${h.length}`,items:h.map(b)}),y.length&&f.push({label:`其他 · ${y.length}`,items:y.map(b)}),r(f),a(!1)}).catch(()=>{n||(r([]),a(!1))}),()=>{n=!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(n=>{const l=n.items.some(s=>/^(#|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(s.value)),c=n.items.some(s=>/font|family|type/i.test(s.name));return e.jsxs("section",{children:[e.jsx("div",{className:"mb-3 text-[11px] font-semibold uppercase text-muted-foreground",children:n.label}),l?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(150px, 1fr))"},children:n.items.filter(s=>/^(#|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(s.value)).map(({name:s,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:s}),e.jsx("div",{className:"px-2.5 pb-2 text-xs text-muted-foreground",children:x})]},s))}):c?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(150px, 1fr))"},children:n.items.map(({name:s,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:s})]},s))}):e.jsx("div",{className:"flex flex-col gap-1",children:n.items.map(({name:s,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:s}),e.jsx("span",{className:"text-muted-foreground",children:x})]},s))})]},n.label)})}):e.jsx("p",{className:"p-3 text-xs",children:"未发现 CSS 变量"})}function G({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 Z({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 J({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 K({path:t}){const[i,r]=o.useState("");return o.useEffect(()=>{let d=!1,a="",n=null;return fetch("/"+encodeURI(t)).then(l=>l.blob()).then(async l=>{var c;if(!d){if(a=URL.createObjectURL(l),n=new FontFace("zd-font-preview",`url(${a})`),await n.load(),d){(c=n.dispose)==null||c.call(n);return}document.fonts.add(n),r(t.split("/").pop()??t)}}).catch(()=>{d||r(t.split("/").pop()??t)}),()=>{var l;if(d=!0,n)try{document.fonts.delete(n),(l=n.dispose)==null||l.call(n)}catch{}a&&URL.revokeObjectURL(a)}},[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 Q({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(U,{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 X={page:q,icon:I,token:B,md:M,video:G,audio:Z,pdf:J,component:C,font:K};function Y(t){return X[t]??Q}function ee({mode:t,onMode:i,w:r,h:d,onW:a,onH:n}){const l=[{v:0,icon:e.jsx(N,{className:"h-3.5 w-3.5"}),label:"桌面"},{v:768,icon:e.jsx(W,{className:"h-3.5 w-3.5"}),label:"768"},{v:375,icon:e.jsx($,{className:"h-3.5 w-3.5"}),label:"375"},{v:"custom",icon:e.jsx(A,{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(L,{items:l.map(s=>({key:String(s.v),label:s.label,renderLabel:()=>e.jsxs(e.Fragment,{children:[s.icon,e.jsx("span",{className:"hidden sm:inline",children:s.label})]})})),value:String(t),onChange:s=>i(s==="0"?0:s==="custom"?"custom":Number(s)),ariaLabel:"视口模式"})}),e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx("input",{type:"number",value:r,min:280,max:3e3,step:8,onChange:s=>a(Number(s.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:s=>n(Number(s.target.value)),"aria-label":"自定义高度",className:c}),e.jsx("span",{className:"text-[11px] text-muted-foreground/70",children:"px"})]})]})}function te(){const[t,i]=o.useState(()=>p.get()),[r,d]=o.useState(0),[a,n]=o.useState(1024),[l,c]=o.useState(768);o.useEffect(()=>p.subscribe(i),[]);const s=t?Y(t.type):null,x=r===0?"桌面":r==="custom"?`${a} × ${l}`:`${r}px`;return e.jsx("div",{className:"mx-auto h-full flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:t&&s?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(ee,{mode:r,onMode:d,w:a,h:l,onW:n,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:r===0?void 0:r==="custom"?a:r,height:r==="custom"?l:"100%"},children:e.jsx(s,{path:t.path})}):e.jsx("div",{className:"mx-auto max-w-5xl h-full overflow-auto",children:e.jsx(s,{path:t.path})})})]}):e.jsx(V,{icon:w,title:"从左侧选择一个资产预览",hint:"点左侧折叠钮展开资产树 · 改文件即时刷新",tone:"primary"})})}const se=Object.freeze(Object.defineProperty({__proto__:null,default:te},Symbol.toStringTag,{value:"Module"})),ne={page:N,component:O,icon:T,token:w,md:R,video:H,audio:z,pdf:E,font:D,other:P},ae=[{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 le(){const t=o.useSyncExternalStore(p.subscribe,p.get),[i,r]=o.useState(null);o.useEffect(()=>{fetch("/__design/assets",{cache:"no-store"}).then(a=>a.json()).then(r)},[]);const d=o.useMemo(()=>i?ae.map(a=>({...a,items:i[a.key]??[]})).filter(a=>a.items.length>0):[],[i]);return i?e.jsxs("div",{children:[e.jsxs("div",{className:"p-3 text-xs text-muted-foreground",children:[d.reduce((a,n)=>a+n.items.length,0)," 个资产"]}),d.map(a=>{const n=ne[a.key];return e.jsxs("div",{className:"mb-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-3 pt-2 pb-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:[n&&e.jsx(n,{className:"h-3.5 w-3.5"}),a.label,e.jsx("span",{className:"ml-auto rounded-full bg-muted px-1.5 font-mono text-[10px] font-normal",children:a.items.length})]}),a.items.map(l=>e.jsxs("button",{onClick:()=>p.set({path:l.path,type:l.type}),className:`w-full text-left flex items-center gap-2 mx-1 px-2.5 py-1.5 text-xs hover:bg-muted rounded-md ${(t==null?void 0:t.path)===l.path?"bg-primary/10 text-foreground font-medium":"text-muted-foreground"}`,style:{width:"calc(100% - 8px)"},children:[e.jsx(F,{name:l.name,active:(t==null?void 0:t.path)===l.path}),e.jsx("span",{className:"truncate",children:l.name}),l.ext&&e.jsx("span",{className:"ml-auto font-mono text-[10px] text-muted-foreground/60",children:l.ext})]},l.path))]},a.key)})]}):e.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"加载中…"})}const re=Object.freeze(Object.defineProperty({__proto__:null,default:le},Symbol.toStringTag,{value:"Module"})),pe={mode:"design",label:"设计资产",icon:"🎨",description:"设计资产分类浏览 · zdesign",Sidebar:o.lazy(()=>j(()=>Promise.resolve().then(()=>re),void 0)),Workspace:o.lazy(()=>j(()=>Promise.resolve().then(()=>se),void 0))};export{le as DesignSidebar,te as DesignWorkspace,pe as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as L,r as C,d as w,j as _,B as O,e as pe,_ as me}from"./index-
|
|
1
|
+
import{c as L,r as C,d as w,j as _,B as O,e as pe,_ as me}from"./index-Dcz2Myaf.js";import{F as xe}from"./FilterPills-CT9_aiMo.js";function g(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function $(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function De(t,e){const r=g(t);return isNaN(e)?$(t,NaN):(e&&r.setDate(r.getDate()+e),r)}function Fe(t,e){const r=g(t);if(isNaN(e))return $(t,NaN);if(!e)return r;const n=r.getDate(),s=$(t,r.getTime());s.setMonth(r.getMonth()+e+1,0);const c=s.getDate();return n>=c?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}function M(t,e){const{years:r=0,months:n=0,weeks:s=0,days:c=0,hours:i=0,minutes:u=0,seconds:l=0}=e,o=g(t),d=n||r?Fe(o,n+r*12):o,a=c||s?De(d,c+s*7):d,p=u+i*60,x=(l+p*60)*1e3;return $(t,a.getTime()+x)}const ye=864e5,be=6e4,ve=36e5;function V(t){const e=g(t);return e.setHours(0,0,0,0),e}function K(t){const e=g(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function Ee(t,e){const r=V(t),n=V(e),s=+r-K(r),c=+n-K(n);return Math.round((s-c)/ye)}function S(t,e){const r=g(t),n=g(e),s=r.getTime()-n.getTime();return s<0?-1:s>0?1:s}function Ce(t,e){const r=g(t),n=g(e),s=r.getFullYear()-n.getFullYear(),c=r.getMonth()-n.getMonth();return s*12+c}function Ae(t,e){const r=g(t),n=g(e);return r.getFullYear()-n.getFullYear()}function ze(t,e){const r=g(t),n=g(e),s=Q(r,n),c=Math.abs(Ee(r,n));r.setDate(r.getDate()-s*c);const i=+(Q(r,n)===-s),u=s*(c-i);return u===0?0:u}function Q(t,e){const r=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return r<0?-1:r>0?1:r}function J(t){return e=>{const n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}function G(t,e){return+g(t)-+g(e)}function je(t,e,r){const n=G(t,e)/ve;return J(r==null?void 0:r.roundingMethod)(n)}function we(t,e,r){const n=G(t,e)/be;return J(r==null?void 0:r.roundingMethod)(n)}function ke(t){const e=g(t);return e.setHours(23,59,59,999),e}function Ne(t){const e=g(t),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(23,59,59,999),e}function Re(t){const e=g(t);return+ke(e)==+Ne(e)}function Oe(t,e){const r=g(t),n=g(e),s=S(r,n),c=Math.abs(Ce(r,n));let i;if(c<1)i=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-s*c);let u=S(r,n)===-s;Re(g(t))&&c===1&&S(t,n)===1&&(u=!1),i=s*(c-Number(u))}return i===0?0:i}function Me(t,e,r){const n=G(t,e)/1e3;return J(r==null?void 0:r.roundingMethod)(n)}function Se(t,e){const r=g(t),n=g(e),s=S(r,n),c=Math.abs(Ae(r,n));r.setFullYear(1584),n.setFullYear(1584);const i=S(r,n)===-s,u=s*(c-+i);return u===0?0:u}function $e(t){const e=g(t.start),r=g(t.end),n={},s=Se(r,e);s&&(n.years=s);const c=M(e,{years:n.years}),i=Oe(r,c);i&&(n.months=i);const u=M(c,{months:n.months}),l=ze(r,u);l&&(n.days=l);const o=M(u,{days:n.days}),d=je(r,o);d&&(n.hours=d);const a=M(o,{hours:n.hours}),p=we(r,a);p&&(n.minutes=p);const b=M(a,{minutes:n.minutes}),x=Me(r,b);return x&&(n.seconds=x),n}/**
|
|
2
2
|
* @license lucide-react v0.460.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import{r as c,u as
|
|
2
|
-
|
|
1
|
+
import{c as P,r as c,u as W,j as e,E as O,G as C,F as $,_ as B}from"./index-Dcz2Myaf.js";import{B as m}from"./badge-CsNeQaUt.js";import{P as F}from"./ProgressBar-CyYoGfrt.js";import{F as p}from"./file-text-AM0snHQm.js";import{M as b,r as k}from"./index-BF1XYOKG.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 M=P("FolderGit2",[["path",{d:"M9 20H4a2 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.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]),N=/^\s*-\s*\[([ xX])\]\s*(.*)$/;function R(s){return s.split(`
|
|
7
|
+
`).filter(t=>N.test(t)).map(t=>{const r=t.match(N);return{text:((r==null?void 0:r[2])??t).trim(),checked:(r==null?void 0:r[1])!==" "}})}function y(s,t){return t===0?0:Math.round(s/t*100)}function w({done:s,total:t}){const r=y(s,t),a=r===100?"success":r>0?"warning":"neutral";return e.jsxs(m,{variant:a,children:[s,"/",t," · ",r,"%"]})}function v(){return e.jsx(m,{variant:"info",children:"worktree 执行中"})}function G(){return e.jsx(m,{variant:"info",children:"含测试策略"})}function I({name:s,pending:t}){const r=t?"neutral":"success";return e.jsx(m,{variant:r,children:t?`${s} · 等待前置`:s})}function L({tasks:s}){const t=R(s);if(!t.length)return e.jsx("p",{className:"text-xs text-muted-foreground",children:"无 tasks.md"});const r=t.findIndex(a=>!a.checked);return e.jsx("ul",{className:"space-y-1 text-xs",children:t.map((a,i)=>{const d=i===r;return e.jsxs("li",{className:`flex items-start gap-2 rounded px-1.5 -mx-1.5 py-0.5 ${d?"bg-amber-500/10 border-l-2 border-amber-500":""} ${a.checked?"text-foreground":"text-muted-foreground"}`,children:[a.checked?e.jsx("span",{className:"mt-0.5 h-3.5 w-3.5 shrink-0 rounded-full bg-emerald-500 text-white flex items-center justify-center text-[8px]",children:"✓"}):e.jsx("span",{className:`mt-0.5 h-3.5 w-3.5 shrink-0 rounded-full border ${d?"border-amber-500":"border-muted-foreground/50"}`}),e.jsx("span",{children:a.text}),d&&e.jsx("span",{className:"ml-auto flex-none text-[10px] font-medium text-amber-600 dark:text-amber-400",children:"← 下一步"})]},i)})})}function A({item:s,onSelect:t}){return e.jsxs("button",{type:"button",onClick:t,className:"w-full text-left rounded-lg border bg-card p-4 hover:bg-muted/50 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[e.jsx($,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium font-mono truncate",children:s.name}),e.jsx(w,{done:s.done,total:s.total}),s.inWorktree&&e.jsx(v,{})]}),e.jsx(F,{value:y(s.done,s.total),className:"h-1 mb-2"}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-muted-foreground",children:[e.jsx("span",{className:s.hasProposal?"text-foreground":"",children:"proposal"}),e.jsx("span",{className:s.hasDesign?"text-foreground":"",children:"design"})]})]})}function z({refreshKey:s}){const[t,r]=c.useState([]);return c.useEffect(()=>{fetch("/__worktrees",{cache:"no-store"}).then(a=>a.json()).then(r).catch(()=>r([]))},[s]),t.length?e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx(C,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("span",{className:"text-[11px] text-muted-foreground mr-1",children:"Worktree:"}),t.map(a=>e.jsxs("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded border text-[10px] font-mono bg-sky-500/10 text-sky-600 border-sky-500/30",title:a.head,children:[a.name,"@",a.branch||"detached"]},a.name))]}):null}function D({navTarget:s}){const[t,r]=c.useState([]),[a,i]=c.useState(0);c.useRef(!1),W(()=>{},()=>i(n=>n+1));const[d,S]=c.useState(null),[l,_]=c.useState(null),[h,x]=c.useState(!0),[f,j]=c.useState(null),[H,E]=c.useState(!1),g=c.useCallback(()=>{x(!0),fetch("/__apply",{cache:"no-store"}).then(n=>n.json()).then(r).catch(n=>j(n.message)).finally(()=>x(!1))},[]);c.useEffect(()=>{g()},[g,a]);const u=c.useCallback(n=>{x(!0),S(n),E(!0),fetch(`/__apply/change?name=${encodeURIComponent(n)}`,{cache:"no-store"}).then(o=>o.json()).then(_).catch(o=>j(o.message)).finally(()=>x(!1))},[]);return c.useEffect(()=>{if(!(s!=null&&s.wt)||!t.length)return;const n=t.find(o=>o.name===s.wt);n&&u(n.name)},[s==null?void 0:s.wt,s==null?void 0:s.navToken,t,u]),h&&!t.length?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:"⚙️"}),e.jsx("p",{children:"加载执行进度…"})]})}):f?e.jsx("div",{className:"flex h-full items-center justify-center text-destructive",children:e.jsx("p",{children:f})}):e.jsxs("div",{className:"mx-auto h-full max-w-6xl 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("span",{className:"text-sm font-medium",children:"OpenSpec 执行进度"}),e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"openspec/changes/"})]}),e.jsxs("div",{className:"flex-1 min-h-0 overflow-auto p-4 space-y-4",children:[e.jsx(z,{refreshKey:a}),t.length?e.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:t.map(n=>e.jsx(A,{item:n,onSelect:()=>u(n.name)},n.name))}):e.jsx(O,{icon:M,title:"没有进行中的 change",hint:"在 openspec/changes/ 下创建 change 后会显示在这里"}),d&&l&&!h&&e.jsxs("section",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"text-sm font-medium",children:l.name}),e.jsx(w,{done:l.done,total:l.total}),l.inWorktree&&e.jsx(v,{}),l.hasTestStrategy&&e.jsx(G,{})]}),l.dependsOn.length>0&&e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"依赖:"}),l.dependsOn.map(n=>e.jsx(I,{name:n,pending:t.some(o=>o.name===n)},n))]}),l.proposal&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1",children:[e.jsx(p,{className:"h-3 w-3"})," proposal.md"]}),e.jsx("div",{className:"prose dark:prose-invert max-w-none text-xs border rounded-lg p-3 bg-card",children:e.jsx(b,{remarkPlugins:[k],children:l.proposal})})]}),l.design&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1",children:[e.jsx(p,{className:"h-3 w-3"})," design.md"]}),e.jsx("div",{className:"prose dark:prose-invert max-w-none text-xs border rounded-lg p-3 bg-card",children:e.jsx(b,{remarkPlugins:[k],children:l.design})})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1",children:[e.jsx(p,{className:"h-3 w-3"})," tasks.md"]}),e.jsx("div",{className:"border rounded-lg p-3 bg-card",children:e.jsx(L,{tasks:l.tasks})})]})]})]})]})}function K({navTarget:s}){return e.jsx(D,{navTarget:s})}const V=Object.freeze(Object.defineProperty({__proto__:null,default:K},Symbol.toStringTag,{value:"Module"})),Y={mode:"apply",label:"执行进度",icon:"⚙️",description:"OpenSpec change 执行进度 · zapply",Workspace:c.lazy(()=>B(()=>Promise.resolve().then(()=>V),void 0))};export{K as ApplyWorkspace,Y as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{c,r as l,j as e,B as p,E as g,_ as f}from"./index-Dcz2Myaf.js";import{B as h}from"./badge-CsNeQaUt.js";import{F as y}from"./FilterPills-CT9_aiMo.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 v=c("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
|
|
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 k=c("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
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=c("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),b=[{key:"mine",label:"我的"},{key:"all",label:"全部"},{key:"active",label:"active"},{key:"resolved",label:"resolved"},{key:"closed",label:"closed"}];function w({status:s}){const a=s==="active"?"destructive":s==="resolved"?"success":"neutral";return e.jsx(h,{variant:a,children:s})}function N({severity:s}){const a=Number(s),r=a<=1?"destructive":a===2||a===3?"warning":"neutral";return e.jsxs(h,{variant:r,children:["S",a]})}function M(){const[s,a]=l.useState(null),[r,i]=l.useState(!1),[n,x]=l.useState("mine"),o=l.useCallback(()=>{i(!0),fetch("/__bugs",{cache:"no-store"}).then(t=>t.json()).then(a).finally(()=>i(!1))},[]);l.useEffect(o,[o]);const m=t=>n==="all"?!0:n==="mine"?t.mine:t.status===n,d=s!=null&&s.ok?s.bugs.filter(m):[],u=s!=null&&s.ok?{mine:s.bugs.filter(t=>t.mine).length,all:s.bugs.length,active:s.bugs.filter(t=>t.status==="active").length,resolved:s.bugs.filter(t=>t.status==="resolved").length,closed:s.bugs.filter(t=>t.status==="closed").length}:null;return e.jsxs("div",{className:"mx-auto h-full max-w-6xl flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"flex-none flex items-center gap-2 px-3 py-2 border-b",children:[e.jsx(y,{items:b.map(t=>({key:t.key,label:t.label,badge:u?String(u[t.key]):void 0})),value:n,onChange:x,ariaLabel:"状态筛选"}),e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"禅道 · 只读"}),e.jsx(p,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:o,title:"刷新",children:e.jsx(j,{className:`h-3.5 w-3.5 ${r?"animate-spin":""}`})})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:s?s.ok?d.length?e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{className:"sticky top-0 bg-background border-b",children:e.jsxs("tr",{className:"text-left text-muted-foreground",children:[e.jsx("th",{className:"px-3 py-2 font-medium w-16",children:"#"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"标题"}),e.jsx("th",{className:"px-3 py-2 font-medium w-14",children:"严重度"}),e.jsx("th",{className:"px-3 py-2 font-medium w-20",children:"状态"}),e.jsx("th",{className:"px-3 py-2 font-medium w-20",children:"指派"})]})}),e.jsx("tbody",{children:d.map(t=>e.jsxs("tr",{className:"border-b last:border-0 hover:bg-muted/40 transition-colors",children:[e.jsx("td",{className:"px-3 py-2 font-mono text-muted-foreground",children:t.id}),e.jsx("td",{className:"px-3 py-2",children:e.jsxs("button",{className:"text-left hover:text-primary hover:underline flex items-center gap-1",onClick:()=>window.open(`${s.url}/bug-view-${t.id}.html`,"_blank","noopener"),title:"在禅道打开",children:[e.jsx("span",{className:"truncate max-w-[420px]",children:t.title}),e.jsx(k,{className:"h-3 w-3 shrink-0 text-muted-foreground"})]})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(N,{severity:t.severity})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(w,{status:t.status})}),e.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:t.assignedTo||"—"})]},t.id))})]}):e.jsx(g,{icon:v,title:n==="mine"?"没有指派给你的 bug":"该状态下无 bug",hint:"🎉"}):e.jsx("p",{className:"p-4 text-xs text-destructive",children:s.error}):e.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"加载中…"})})]})}function _(){return e.jsx(M,{})}const S=Object.freeze(Object.defineProperty({__proto__:null,default:_},Symbol.toStringTag,{value:"Module"})),C={mode:"bugs",label:"禅道 Bugs",icon:"🎯",description:"只读 bug 列表 · zgoal",Workspace:l.lazy(()=>f(()=>Promise.resolve().then(()=>S),void 0))};export{_ as BugWorkspace,C 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-Dcz2Myaf.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C9nEYrn8.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,j as t,f as m}from"./index-CNPKNdvp.js";import{P as u}from"./ProgressBar-B4U41etC.js";function p(x){const[s,o]=l.useState(null),[r,n]=l.useState(null);if(l.useEffect(()=>{fetch("/__stats/data",{cache:"no-store"}).then(e=>e.json()).then(o).catch(e=>n(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,mode:null,filter:null},{label:"目录",value:s.dirs,mode:null,filter:null},{label:"总大小",value:m(s.totalSize),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}],c=(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:i.map(e=>t.jsxs("button",{type:"button",onClick:()=>c(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(u,{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-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{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 240 10% 3.9%;--radius: .5rem}.dark{--background: 240 10% 3.9%;--foreground: 0 0% 98%;--card: 240 10% 3.9%;--card-foreground: 0 0% 98%;--popover: 240 10% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 240 5.9% 10%;--secondary: 240 3.7% 15.9%;--secondary-foreground: 0 0% 98%;--muted: 240 3.7% 15.9%;--muted-foreground: 240 5% 64.9%;--accent: 240 3.7% 15.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 240 3.7% 15.9%;--input: 240 3.7% 15.9%;--ring: 240 4.9% 83.9%}*{border-color:hsl(var(--border))}body{background:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px var(--tw-prose-kbd-shadows),0 3px 0 var(--tw-prose-kbd-shadows);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: rgb(17 24 39 / 10%);--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: rgb(255 255 255 / 10%);--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.left-0{left:0}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:.5rem}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-span-full{grid-column:1 / -1}.m-0{margin:0}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[19px\]{height:19px}.h-\[1px\]{height:1px}.h-\[38px\]{height:38px}.h-\[42\%\]{height:42%}.h-\[52px\]{height:52px}.h-\[72px\]{height:72px}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[80vh\]{max-height:80vh}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-\[1\.25rem\]{min-height:1.25rem}.min-h-\[3\.4em\]{min-height:3.4em}.w-0{width:0px}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-44{width:11rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[1px\]{width:1px}.w-\[240px\]{width:240px}.w-\[280px\]{width:280px}.w-\[50px\]{width:50px}.w-\[78\%\]{width:78%}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-\[280px\]{max-width:280px}.max-w-\[420px\]{max-width:420px}.max-w-full{max-width:100%}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.flex-none{flex:none}.shrink-0{flex-shrink:0}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-y{resize:vertical}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[14px\]{border-radius:14px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0px}.border-t{border-top-width:1px}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-500\/30{border-color:#f59e0b4d}.border-border{border-color:hsl(var(--border))}.border-emerald-500\/30{border-color:#10b9814d}.border-emerald-500\/40{border-color:#10b98166}.border-input{border-color:hsl(var(--input))}.border-muted-foreground\/50{border-color:hsl(var(--muted-foreground) / .5)}.border-primary{border-color:hsl(var(--primary))}.border-red-500\/20{border-color:#ef444433}.border-red-500\/30{border-color:#ef44444d}.border-sky-500\/30{border-color:#0ea5e94d}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\[\#0d1117\]{--tw-bg-opacity: 1;background-color:rgb(13 17 23 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/40{background-color:#0006}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/15{background-color:#10b98126}.bg-emerald-500\/60{background-color:#10b98199}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.bg-muted-foreground\/30{background-color:hsl(var(--muted-foreground) / .3)}.bg-muted\/60{background-color:hsl(var(--muted) / .6)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/15{background-color:#ef444426}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sky-500{--tw-bg-opacity: 1;background-color:rgb(14 165 233 / var(--tw-bg-opacity, 1))}.bg-sky-500\/10{background-color:#0ea5e91a}.bg-sky-500\/15{background-color:#0ea5e926}.bg-sky-600{--tw-bg-opacity: 1;background-color:rgb(2 132 199 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-zinc-500{--tw-bg-opacity: 1;background-color:rgb(113 113 122 / var(--tw-bg-opacity, 1))}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-3{padding-left:.75rem}.pr-2{padding-right:.5rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-2\.5{padding-top:.625rem}.pt-3{padding-top:.75rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#c9d1d9\]{--tw-text-opacity: 1;color:rgb(201 209 217 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/60{color:hsl(var(--muted-foreground) / .6)}.text-muted-foreground\/70{color:hsl(var(--muted-foreground) / .7)}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-sky-400{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}.text-sky-600{--tw-text-opacity: 1;color:rgb(2 132 199 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-zinc-200{--tw-text-opacity: 1;color:rgb(228 228 231 / var(--tw-text-opacity, 1))}.text-zinc-400{--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity, 1))}.text-zinc-500{--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity, 1))}.text-zinc-600{--tw-text-opacity: 1;color:rgb(82 82 91 / var(--tw-text-opacity, 1))}.no-underline{text-decoration-line:none}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-\[width\,transform\]{transition-property:width,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in,.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.slide-in-from-left-1{--tw-enter-translate-x: -.25rem}.duration-200{animation-duration:.2s}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}.\[appearance\:textfield\]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}@media (prefers-color-scheme: dark){.dark\:prose-invert{--tw-prose-body: var(--tw-prose-invert-body);--tw-prose-headings: var(--tw-prose-invert-headings);--tw-prose-lead: var(--tw-prose-invert-lead);--tw-prose-links: var(--tw-prose-invert-links);--tw-prose-bold: var(--tw-prose-invert-bold);--tw-prose-counters: var(--tw-prose-invert-counters);--tw-prose-bullets: var(--tw-prose-invert-bullets);--tw-prose-hr: var(--tw-prose-invert-hr);--tw-prose-quotes: var(--tw-prose-invert-quotes);--tw-prose-quote-borders: var(--tw-prose-invert-quote-borders);--tw-prose-captions: var(--tw-prose-invert-captions);--tw-prose-kbd: var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows: var(--tw-prose-invert-kbd-shadows);--tw-prose-code: var(--tw-prose-invert-code);--tw-prose-pre-code: var(--tw-prose-invert-pre-code);--tw-prose-pre-bg: var(--tw-prose-invert-pre-bg);--tw-prose-th-borders: var(--tw-prose-invert-th-borders);--tw-prose-td-borders: var(--tw-prose-invert-td-borders)}}.last\:border-0:last-child{border-width:0px}.hover\:border-muted-foreground\/40:hover{border-color:hsl(var(--muted-foreground) / .4)}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-emerald-500:hover{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-500\/20:hover{background-color:#10b98133}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-muted\/70:hover{background-color:hsl(var(--muted) / .7)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-sky-500:hover{--tw-bg-opacity: 1;background-color:rgb(14 165 233 / var(--tw-bg-opacity, 1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-primary:focus{border-color:hsl(var(--primary))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.prose-headings\:scroll-mt-4 :is(:where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=not-prose],[class~=not-prose] *))){scroll-margin-top:1rem}.prose-pre\:m-0 :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){margin:0}.prose-pre\:bg-transparent :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){background-color:transparent}.prose-pre\:p-0 :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){padding:0}@media (min-width: 640px){.sm\:absolute{position:absolute}.sm\:relative{position:relative}.sm\:left-auto{left:auto}.sm\:top-auto{top:auto}.sm\:z-30{z-index:30}.sm\:z-auto{z-index:auto}.sm\:block{display:block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:h-full{height:100%}.sm\:w-0{width:0px}.sm\:w-\[280px\]{width:280px}.sm\:max-w-none{max-width:none}.sm\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:border-r{border-right-width:1px}.sm\:shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.sm\:shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}}@media (min-width: 768px){.md\:flex{display:flex}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width: 1280px){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (prefers-color-scheme: dark){.dark\:text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.dark\:text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.dark\:text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.dark\:text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-sky-400{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Workspace-nm0YyxF7.js","assets/index-CNPKNdvp.js","assets/index-ByI0Pghw.css","assets/ProgressBar-B4U41etC.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as o,_ as t}from"./index-CNPKNdvp.js";const a={mode:"stats",label:"项目统计",icon:"📊",description:"项目文件统计 · 扫描生成",Workspace:o.lazy(()=>t(()=>import("./Workspace-nm0YyxF7.js"),__vite__mapDeps([0,1,2,3])))};export{a as default};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{c as F,j as r,r as n,G as U,_ as z}from"./index-CNPKNdvp.js";import{M as J}from"./MdViewer-P4wmRzy_.js";import{C as q,I as K}from"./CodeViewer-D8YqzmwB.js";import{F as H}from"./file-text-BHzQwEJK.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 Q=F("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
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 X=F("FileQuestion",[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);/**
|
|
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 Y=F("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);function Z({path:e}){return r.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:r.jsxs("div",{children:[r.jsx(X,{className:"h-10 w-10 mx-auto mb-3 opacity-50"}),r.jsx("p",{children:"该格式无法预览"}),r.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:e})]})})}let G=null;const D=new Set,y={get:()=>G,set:e=>{G=e,D.forEach(t=>t(e))},subscribe:e=>(D.add(e),()=>{D.delete(e)})};function ee({containerRef:e}){const[t,o]=n.useState([]),[m,l]=n.useState(null);n.useEffect(()=>{const s=e.current;if(!s)return;let a=!1;const u=()=>{if(a)return;const x=s.querySelectorAll("h1[id], h2[id], h3[id]"),i=[];x.forEach(p=>{var b;i.push({id:p.id,text:((b=p.textContent)==null?void 0:b.trim())??"",level:parseInt(p.tagName[1],10)})}),o(i)};u();const c=new MutationObserver(u);return c.observe(s,{childList:!0,subtree:!0,characterData:!0}),()=>{a=!0,c.disconnect()}},[e]),n.useEffect(()=>{const s=e.current;if(!s||!t.length)return;const a=new IntersectionObserver(u=>{const c=u.filter(x=>x.isIntersecting);if(c.length){const x=c.reduce((i,p)=>i.boundingClientRect.top<p.boundingClientRect.top?i:p);l(x.target.id)}},{root:s,rootMargin:"-60px 0px -70% 0px",threshold:0});return t.forEach(({id:u})=>{const c=s.querySelector(`#${CSS.escape(u)}`);c&&a.observe(c)}),()=>a.disconnect()},[t,e]);const d=s=>{var u;const a=(u=e.current)==null?void 0:u.querySelector(`#${CSS.escape(s)}`);a==null||a.scrollIntoView({behavior:"smooth",block:"start"})};return t.length?r.jsxs("nav",{className:"hidden md:flex w-44 shrink-0 flex-col border-l pl-3 py-2 overflow-y-auto","aria-label":"文档大纲",children:[r.jsxs("div",{className:"flex items-center gap-1 mb-2 text-[11px] font-medium text-muted-foreground uppercase tracking-wider",children:[r.jsx(H,{className:"h-3 w-3"}),r.jsx("span",{children:"大纲"})]}),r.jsx("ul",{className:"space-y-0.5",children:t.map(s=>r.jsx("li",{children:r.jsx("button",{type:"button",onClick:()=>d(s.id),className:`w-full text-left text-[11px] leading-snug py-0.5 px-1.5 rounded truncate transition-colors ${m===s.id?"bg-primary/10 text-foreground font-medium":"text-muted-foreground hover:bg-muted/70"}`,style:{paddingLeft:6+(s.level-1)*10},children:s.text||s.id})},s.id))})]}):null}const te=2500;function re(e){const t=e.slice(e.lastIndexOf("/")+1).toLowerCase();if(t==="justfile"||t==="makefile")return q;const o=e.slice(e.lastIndexOf(".")).toLowerCase();return o===".md"||o===".markdown"?J:[".svg",".png",".jpg",".jpeg",".gif",".webp",".ico"].includes(o)?K:[".sql",".txt",".csv",".tsv",".json",".yaml",".yml",".xml",".py",".js",".ts",".java",".go",".rs",".rb",".php",".c",".cpp",".h",".cs",".swift",".kt",".scala",".sh",".bash",".zsh",".fish",".env",".gitignore",".dockerfile"].includes(o)?q:Z}function ne(e){const[t,o]=n.useState(()=>y.get()),[m,l]=n.useState(!1),d=n.useRef(null),s=t?re(t):null;return n.useEffect(()=>y.subscribe(o),[]),n.useEffect(()=>{const a=d.current;if(!a)return;const u=()=>{var i;const x=((i=a.textContent)==null?void 0:i.length)??0;l(x>te)};u();const c=new MutationObserver(u);return c.observe(a,{childList:!0,subtree:!0,characterData:!0}),()=>c.disconnect()},[t]),r.jsx("div",{className:"mx-auto h-full max-w-5xl bg-background border rounded-lg shadow-sm overflow-hidden flex flex-col",children:t&&s?r.jsxs("div",{className:"flex-1 min-h-0 flex overflow-hidden",children:[r.jsx("div",{ref:d,className:"flex-1 min-h-0 overflow-auto",children:r.jsx(s,{path:t})}),m&&r.jsx(ee,{containerRef:d})]}):r.jsx("div",{className:"flex-1 grid place-items-center text-muted-foreground",children:r.jsxs("div",{className:"text-center",children:[r.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:"👁️"}),r.jsx("p",{children:"从左侧选择文件预览"}),r.jsx("p",{className:"mt-1 text-xs",children:"支持 Markdown、图片、代码等格式"})]})})})}const se=Object.freeze(Object.defineProperty({__proto__:null,default:ne},Symbol.toStringTag,{value:"Module"}));function ce(e,t,o,m){var l=this,d=n.useRef(null),s=n.useRef(0),a=n.useRef(0),u=n.useRef(null),c=n.useRef([]),x=n.useRef(),i=n.useRef(),p=n.useRef(e),b=n.useRef(!0),v=n.useRef(),C=n.useRef();p.current=e;var L=typeof window<"u",k=!t&&t!==0&&L;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var O=!!(o=o||{}).leading,R=!("trailing"in o)||!!o.trailing,N=!!o.flushOnExit&&R,w="maxWait"in o,W="debounceOnServer"in o&&!!o.debounceOnServer,I=w?Math.max(+o.maxWait||0,t):null,$=n.useMemo(function(){var g=function(f){var h=c.current,j=x.current;return c.current=x.current=null,s.current=f,a.current=a.current||f,i.current=p.current.apply(j,h)},S=function(f,h){k&&cancelAnimationFrame(u.current),u.current=k?requestAnimationFrame(f):setTimeout(f,h)},A=function(f){if(!b.current)return!1;var h=f-d.current;return!d.current||h>=t||h<0||w&&f-s.current>=I},P=function(f){return u.current=null,R&&c.current?g(f):(c.current=x.current=null,i.current)},M=function f(){var h=Date.now();if(O&&a.current===s.current&&T(),A(h))return P(h);if(b.current){var j=t-(h-d.current),_=w?Math.min(j,I-(h-s.current)):j;S(f,_)}},T=function(){m&&m({})},E=function(){if(L||W){var f,h=Date.now(),j=A(h);if(c.current=[].slice.call(arguments),x.current=l,d.current=h,N&&!v.current&&(v.current=function(){var _;((_=globalThis.document)==null?void 0:_.visibilityState)==="hidden"&&C.current.flush()},(f=globalThis.document)==null||f.addEventListener==null||f.addEventListener("visibilitychange",v.current)),j){if(!u.current&&b.current)return s.current=d.current,S(M,t),O?g(d.current):i.current;if(w)return S(M,t),g(d.current)}return u.current||S(M,t),i.current}};return E.cancel=function(){var f=u.current;f&&(k?cancelAnimationFrame(u.current):clearTimeout(u.current)),s.current=0,c.current=d.current=x.current=u.current=null,f&&m&&m({})},E.isPending=function(){return!!u.current},E.flush=function(){return u.current?P(Date.now()):i.current},E},[O,w,t,I,R,N,k,L,W,m]);return C.current=$,n.useEffect(function(){return b.current=!0,function(){var g;N&&C.current.flush(),v.current&&((g=globalThis.document)==null||g.removeEventListener==null||g.removeEventListener("visibilitychange",v.current),v.current=null),b.current=!1}},[N]),$}function oe(e,t){return e===t}function ue(e,t,o){var m=oe,l=n.useRef(e),d=n.useState({})[1],s=ce(n.useCallback(function(u){l.current=u,d({})},[d]),t,o,d),a=n.useRef(e);return m(a.current,e)||(s(e),a.current=e),[l.current,s]}function V(e,t){return!t||e.name.toLowerCase().includes(t)?!0:(e.children??[]).some(o=>V(o,t))}function ie({name:e}){const t=e.slice(e.lastIndexOf(".")).toLowerCase();return[".svg",".png",".jpg",".jpeg",".gif",".webp",".ico"].includes(t)?r.jsx(Y,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):r.jsx(H,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"})}function B({node:e,depth:t,filter:o,current:m,onSelectFile:l}){const d=(e.children??[]).filter(c=>V(c,o)),[s,a]=n.useState(!e.defaultCollapsed),u=o?!0:s;return!d.length&&o?null:r.jsxs("div",{children:[r.jsxs("button",{onClick:()=>a(c=>!c),className:"w-full flex items-center gap-1 px-2 py-1 text-xs text-foreground hover:bg-muted",style:{paddingLeft:8+t*14},children:[r.jsx(Q,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${u?"rotate-90":""}`}),r.jsx("span",{className:"font-medium truncate",children:e.name})]}),u&&d.map(c=>c.kind==="dir"?r.jsx(B,{node:c,depth:t+1,filter:o,current:m,onSelectFile:l},c.name+t):r.jsxs("button",{onClick:()=>c.path&&l(c.path),className:`w-full flex items-center gap-1.5 pr-2 py-1 text-xs border-l-2 border-transparent hover:bg-muted ${m===c.path?"bg-muted font-medium border-primary":"text-muted-foreground"}`,style:{paddingLeft:20+t*14},children:[r.jsx(ie,{name:c.name}),r.jsx("span",{className:"truncate",children:c.name})]},c.path))]})}function le({worktrees:e}){const[t,o]=n.useState(!0),m=l=>{window.dispatchEvent(new CustomEvent("zd-dashboard-nav",{detail:{mode:"apply",wt:l.name}}))};return r.jsxs("div",{className:"mb-1",children:[r.jsxs("button",{onClick:()=>o(l=>!l),className:"w-full flex items-center gap-1 px-2 py-1.5 text-[11px] font-medium text-muted-foreground tracking-wide hover:text-foreground",children:[r.jsx(Q,{className:`h-3 w-3 transition-transform ${t?"rotate-90":""}`}),r.jsx(U,{className:"h-3 w-3"}),r.jsxs("span",{children:["Worktrees (",e.length,")"]})]}),t&&e.map(l=>r.jsxs("button",{onClick:()=>m(l),title:`${l.branch}${l.dirty?" · 有未提交变更":""}`,className:"w-full flex items-center gap-1.5 px-2 py-1 text-xs text-foreground hover:bg-muted border-l-2 border-transparent",style:{paddingLeft:14},children:[r.jsx("span",{className:"truncate font-mono text-[11px]",children:l.branch}),r.jsxs("span",{className:"text-muted-foreground truncate",children:["/",l.name]}),l.dirty&&r.jsx("span",{className:"ml-auto flex-none h-2 w-2 rounded-full bg-destructive shrink-0",title:"有未提交变更"})]},l.name))]})}function ae({navTarget:e}){const t=n.useSyncExternalStore(y.subscribe,y.get),[o,m]=n.useState(null),[l,d]=n.useState(""),[s]=ue(l,150),[a,u]=n.useState([]);n.useEffect(()=>{e!=null&&e.filter&&d(e.filter)},[e==null?void 0:e.filter,e==null?void 0:e.navToken]),n.useEffect(()=>{fetch("/__files",{cache:"no-store"}).then(i=>i.json()).then(i=>m(i.tree??[]))},[]),n.useEffect(()=>{fetch("/__worktrees",{cache:"no-store"}).then(i=>i.json()).then(u).catch(()=>u([]))},[]);const c=n.useMemo(()=>o?o.filter(i=>V(i,s)):[],[o,s]),x=a.length>0;return r.jsxs("div",{className:"p-2",children:[r.jsx("input",{value:l,onChange:i=>d(i.target.value.toLowerCase()),placeholder:"过滤…",className:"w-full h-7 px-2 text-xs rounded border border-border bg-background focus:outline-none focus:border-primary"}),o?!c.length&&!x?r.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"无匹配"}):r.jsxs("div",{className:"py-1",children:[x&&r.jsx(le,{worktrees:a}),c.map(i=>r.jsx(B,{node:i,depth:0,filter:s,current:t,onSelectFile:p=>y.set(p)},i.name))]}):r.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"加载中…"})]})}const de=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"})),be={mode:"view",label:"项目浏览",icon:"👁️",description:"openspec / docs / 文档预览",Sidebar:n.lazy(()=>z(()=>Promise.resolve().then(()=>de),void 0)),Workspace:n.lazy(()=>z(()=>Promise.resolve().then(()=>se),void 0))};export{ae as ViewSidebar,ne as ViewWorkspace,be as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{c as u,r as l,j as e,B as p,_ as g}from"./index-CNPKNdvp.js";import{B as x}from"./badge-C92Y2FRG.js";import{F as f}from"./FilterPills-A_fz1nby.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 v=u("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
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=u("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),j=[{key:"mine",label:"我的"},{key:"all",label:"全部"},{key:"active",label:"active"},{key:"resolved",label:"resolved"},{key:"closed",label:"closed"}];function y({status:s}){const a=s==="active"?"destructive":s==="resolved"?"success":"neutral";return e.jsx(x,{variant:a,children:s})}function k({severity:s}){const a=Number(s),n=a<=1?"destructive":a===2||a===3?"warning":"neutral";return e.jsxs(x,{variant:n,children:["S",a]})}function N(){const[s,a]=l.useState(null),[n,c]=l.useState(!1),[r,m]=l.useState("mine"),o=l.useCallback(()=>{c(!0),fetch("/__bugs",{cache:"no-store"}).then(t=>t.json()).then(a).finally(()=>c(!1))},[]);l.useEffect(o,[o]);const h=t=>r==="all"?!0:r==="mine"?t.mine:t.status===r,i=s!=null&&s.ok?s.bugs.filter(h):[],d=s!=null&&s.ok?{mine:s.bugs.filter(t=>t.mine).length,all:s.bugs.length,active:s.bugs.filter(t=>t.status==="active").length,resolved:s.bugs.filter(t=>t.status==="resolved").length,closed:s.bugs.filter(t=>t.status==="closed").length}:null;return e.jsxs("div",{className:"mx-auto h-full max-w-6xl flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"flex-none flex items-center gap-2 px-3 py-2 border-b",children:[e.jsx(f,{items:j.map(t=>({key:t.key,label:t.label,badge:d?String(d[t.key]):void 0})),value:r,onChange:m,ariaLabel:"状态筛选"}),e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"禅道 · 只读"}),e.jsx(p,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:o,title:"刷新",children:e.jsx(b,{className:`h-3.5 w-3.5 ${n?"animate-spin":""}`})})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:s?s.ok?i.length?e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{className:"sticky top-0 bg-background border-b",children:e.jsxs("tr",{className:"text-left text-muted-foreground",children:[e.jsx("th",{className:"px-3 py-2 font-medium w-16",children:"#"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"标题"}),e.jsx("th",{className:"px-3 py-2 font-medium w-14",children:"严重度"}),e.jsx("th",{className:"px-3 py-2 font-medium w-20",children:"状态"}),e.jsx("th",{className:"px-3 py-2 font-medium w-20",children:"指派"})]})}),e.jsx("tbody",{children:i.map(t=>e.jsxs("tr",{className:"border-b last:border-0 hover:bg-muted/50",children:[e.jsx("td",{className:"px-3 py-2 font-mono text-muted-foreground",children:t.id}),e.jsx("td",{className:"px-3 py-2",children:e.jsxs("button",{className:"text-left hover:text-primary hover:underline flex items-center gap-1",onClick:()=>window.open(`${s.url}/bug-view-${t.id}.html`,"_blank","noopener"),title:"在禅道打开",children:[e.jsx("span",{className:"truncate max-w-[420px]",children:t.title}),e.jsx(v,{className:"h-3 w-3 shrink-0 text-muted-foreground"})]})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(k,{severity:t.severity})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(y,{status:t.status})}),e.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:t.assignedTo||"—"})]},t.id))})]}):e.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:r==="mine"?"没有指派给你的 bug 🎉":"无 bug 🎉(该状态下)"}):e.jsx("p",{className:"p-4 text-xs text-destructive",children:s.error}):e.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"加载中…"})})]})}function w(){return e.jsx(N,{})}const _=Object.freeze(Object.defineProperty({__proto__:null,default:w},Symbol.toStringTag,{value:"Module"})),E={mode:"bugs",label:"禅道 Bugs",icon:"🎯",description:"只读 bug 列表 · zgoal",Workspace:l.lazy(()=>g(()=>Promise.resolve().then(()=>_),void 0))};export{w as BugWorkspace,E as default};
|
|
@@ -1,26 +0,0 @@
|
|
|
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};
|