@saluzi/saluzi-edu 0.2.49 → 0.2.51
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.
|
@@ -164,4 +164,4 @@ import{c as e,l as t,o as n,s as r}from"./streamdown-nMT_aKRc.js";import{t as i}
|
|
|
164
164
|
`,R=(0,f.lazy)(async()=>({default:(await a(()=>import(`./streamdown-nMT_aKRc.js`).then(e=>e.n),__vite__mapDeps([0,1,2]))).Streamdown}));function z(e){let t=e.split(`
|
|
165
165
|
`),n=[],r=!1,i=``;for(let e=0;e<t.length;e++){let a=t[e],o=a.trim(),s=/^(`{3}|~{3})/.exec(o);if(s){r?o.startsWith(i.repeat(3))&&(r=!1,i=``):(r=!0,i=s[1][0]),n.push(a);continue}if(r){n.push(a);continue}if(o===``||/^#{1,6} /.test(o)||o.startsWith(`|`)||/^[-*+]\s/.test(o)||/^\d+\.\s/.test(o)||o.startsWith(`>`)||/^(-{3,}|\*{3,}|_{3,})$/.test(o)||o.startsWith("```")){n.push(a);continue}let c=(n[n.length-1]??``).trim();c!==``&&!/^#{1,6} /.test(c)&&!c.startsWith(`|`)&&!/^[-*+]\s/.test(c)&&!/^\d+\.\s/.test(c)&&!c.startsWith(`>`)&&!/^(-{3,}|\*{3,}|_{3,})$/.test(c)&&!c.startsWith("```")&&n.push(``),n.push(a)}return n.join(`
|
|
166
166
|
`)}var B=`::parade-preview::`;function V(e){return e.replace(/[*_`~]/g,``).replace(/[^\p{L}\p{N}\s-]/gu,``).trim().toLowerCase().replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``)}function H(e){let t=e.split(`
|
|
167
|
-
`),n=[],r=!1,i=``;for(let e of t){let t=e.trim(),a=/^(`{3}|~{3})/.exec(t);if(a){r?t.startsWith(i.repeat(3))&&(r=!1,i=``):(r=!0,i=a[1][0]);continue}if(r)continue;let o=/^(#{2,3})\s+(.+?)\s*$/.exec(t);if(!o)continue;let s=o[1].length,c=o[2],l=V(c);l&&n.push({level:s,text:c,slug:l})}let a=new Map;return n.map(e=>{let t=a.get(e.slug)??0;return a.set(e.slug,t+1),t===0?e:{...e,slug:`${e.slug}-${t}`}})}function U(e){let t=[],n=e.split(B);for(let e=0;e<n.length;e++)n[e]&&t.push({kind:`md`,content:z(n[e])}),e<n.length-1&&t.push({kind:`parade-preview`});return t}function W({chapter:e,path:t,onNavigate:n}){let r=e.frontmatter.title??t,i=(0,f.useRef)(null),a=(0,f.useRef)(null),[o,s]=(0,f.useState)(null),c=(0,f.useMemo)(()=>U(e.content.replace(/^\{\/\*[\s\S]*?\*\/\}\s*\n/gm,``).replace(/^\{\/\*[\s\S]*?\*\/\}/gm,``)),[e.content]),l=(0,f.useMemo)(()=>H(e.content),[e.content]);(0,f.useEffect)(()=>{if(!i.current||l.length===0)return;let e=i.current,t=()=>{e.querySelectorAll(`h2, h3`).forEach((e,t)=>{let n=l[t];n&&(e.id!==n.slug&&(e.id=n.slug),e.style.scrollMarginTop!==`5rem`&&(e.style.scrollMarginTop=`5rem`))})};t();let n=new MutationObserver(()=>t());return n.observe(e,{childList:!0,subtree:!0}),()=>n.disconnect()},[l,c]),(0,f.useEffect)(()=>{if(!i.current)return;let e=i.current.parentElement;for(;e&&getComputedStyle(e).overflowY!==`auto`;)e=e.parentElement;a.current=e},[]),(0,f.useEffect)(()=>{let e=a.current;if(!e||l.length===0)return;let t=()=>{let t=e.scrollTop,n=null;for(let e of l){let r=document.getElementById(e.slug);if(r)if(r.offsetTop-120<=t)n=e;else break}s(n?.slug??null)};return t(),e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[l]);function u(e){if(!n)return null;if(e.startsWith(`docs/`))return e;let r=e.replace(/^(?:\.\.\/|\.\/|\/)+/,``);return r=r.replace(/\.(md|mdx)$/,``),r?`${t.split(`/`).slice(0,-1).join(`/`)}/${r}`:null}function d(e){if(!n)return;let t=e.target.closest(`a`);if(!t)return;let r=t.getAttribute(`href`);if(!r||/^(https?:|mailto:|#)/.test(r))return;let i=u(r);i&&(e.preventDefault(),n(i))}function p(e){let t=document.getElementById(e);if(t){t.scrollIntoView({behavior:`smooth`,block:`start`}),s(e);return}let n=0,r=window.setInterval(()=>{n+=1;let t=document.getElementById(e);t?(window.clearInterval(r),t.scrollIntoView({behavior:`smooth`,block:`start`}),s(e)):n>=20&&window.clearInterval(r)},50)}let m=l.length>=2;return(0,S.jsx)(`div`,{className:`mx-auto max-w-5xl px-6 py-12 sm:px-10 sm:py-16`,children:(0,S.jsxs)(`div`,{className:`flex gap-10`,children:[(0,S.jsxs)(`article`,{ref:i,className:`min-w-0 max-w-2xl flex-1 px-2 sm:px-4`,onClick:d,children:[(0,S.jsxs)(`header`,{className:`mb-12 border-b border-border pb-8`,children:[(0,S.jsx)(`h1`,{className:`font-display text-4xl font-bold leading-tight tracking-tight text-foreground`,children:r}),e.frontmatter.description?(0,S.jsx)(`p`,{className:`mt-4 font-serif text-lg leading-relaxed text-muted-foreground`,children:e.frontmatter.description}):null,e.frontmatter.keywords?.length?(0,S.jsx)(`div`,{className:`mt-6 flex flex-wrap gap-2`,children:e.frontmatter.keywords.map(e=>(0,S.jsx)(`span`,{className:`rounded-full border border-border-light bg-muted px-3 py-1 text-xs font-medium text-muted-foreground`,children:e},e))}):null]}),(0,S.jsx)(`div`,{className:`chapter-content max-w-none`,children:(0,S.jsx)(f.Suspense,{fallback:(0,S.jsx)(`div`,{className:`py-8 text-sm text-muted-foreground`,children:`Loading content…`}),children:c.map((e,t)=>e.kind===`parade-preview`?(0,S.jsx)(I,{},`pp-${t}`):(0,S.jsx)(R,{children:e.content},`md-${t}`))})})]}),m?(0,S.jsx)(`aside`,{className:`sticky top-4 hidden h-[calc(100vh-2rem)] w-56 shrink-0 self-start overflow-y-auto lg:block`,children:(0,S.jsxs)(`nav`,{"aria-label":`章节目录`,children:[(0,S.jsx)(`p`,{className:`mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`本章目录`}),(0,S.jsx)(`ul`,{className:`space-y-1 border-l border-border-light`,children:l.map(e=>{let t=o===e.slug;return(0,S.jsx)(`li`,{className:e.level===3?`ml-3`:``,children:(0,S.jsx)(`button`,{type:`button`,onClick:()=>p(e.slug),className:`block w-full border-l-2 py-1 pl-3 text-left text-xs leading-relaxed transition-colors `+(t?`border-primary text-primary`:`border-transparent text-muted-foreground hover:text-foreground`),style:{marginLeft:`-1px`},children:e.text})},e.slug)})})]})}):null]})})}var G=null;async function K(){if(G)return G;let e=await fetch(`./guide-data.json`);if(!e.ok)throw Error(`Failed to load guide-data.json: ${e.status}`);return G=await e.json(),G}function q(){let e=window.location.hash.replace(/^#\/?/,``);return e?e===`commands`?{kind:`commands`}:{kind:`chapter`,path:e}:{kind:`home`}}function J(e){return e.kind===`home`?`#/`:e.kind===`commands`?`#/commands`:`#/${e.path}`}function Y(){let[e,t]=(0,f.useState)(null),[n,r]=(0,f.useState)(null),[i,a]=(0,f.useState)(()=>q());if((0,f.useEffect)(()=>{K().then(t).catch(e=>r(e.message??String(e)))},[]),(0,f.useEffect)(()=>{let e=()=>a(q());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),n)return(0,S.jsx)(`div`,{className:`flex h-screen items-center justify-center`,children:(0,S.jsxs)(`div`,{className:`max-w-md rounded-xl border border-destructive bg-card p-8 text-center`,children:[(0,S.jsx)(`h1`,{className:`font-display text-xl font-bold text-destructive`,children:`加载失败`}),(0,S.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:n}),(0,S.jsxs)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:[`请确认 guide-data.json 已生成(运行 `,(0,S.jsx)(`code`,{children:`npm run build:guide`}),`)。`]})]})});if(!e)return(0,S.jsx)(`div`,{className:`flex h-screen items-center justify-center text-muted-foreground`,children:`Loading guide…`});let o=e=>{let t=e===`__commands__`?{kind:`commands`}:{kind:`chapter`,path:e},n=J(t);window.location.hash!==n&&window.history.pushState(null,``,n),a(t)};return(0,S.jsxs)(`div`,{className:`flex h-screen w-screen overflow-hidden bg-background text-foreground`,children:[(0,S.jsx)(C,{navigation:e.navigation,selected:i.kind===`chapter`?i.path:i.kind===`commands`?`__commands__`:null,onSelect:o,onHome:()=>{let e=J({kind:`home`});window.location.hash!==e&&window.history.pushState(null,``,e),a({kind:`home`})}}),(0,S.jsxs)(`main`,{className:`flex flex-1 flex-col overflow-hidden`,children:[(0,S.jsx)(`header`,{className:`flex h-16 items-center justify-end border-b border-border bg-background/80 px-8 backdrop-blur-sm`,children:(0,S.jsx)(M,{})}),(0,S.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:i.kind===`home`?(0,S.jsx)(X,{data:e,onSelect:o}):i.kind===`commands`?(0,S.jsx)(Z,{data:e}):(0,S.jsx)(Q,{data:e,path:i.path,onSelect:o})})]})]})}function X({data:e,onSelect:t}){return(0,S.jsxs)(`div`,{className:`mx-auto max-w-5xl px-10 py-16 sm:px-16 sm:py-20`,children:[(0,S.jsxs)(`header`,{className:`mb-16`,children:[(0,S.jsx)(`p`,{className:`mb-3 text-xs font-semibold uppercase tracking-[0.2em] text-primary`,children:`Saluzi Guide`}),(0,S.jsx)(`h1`,{className:`font-display text-5xl font-bold leading-tight tracking-tight text-foreground`,children:`使用指南`}),(0,S.jsx)(`p`,{className:`mt-5 max-w-2xl font-serif text-lg leading-relaxed text-muted-foreground`,children:`Terminal-native agentic coding system · 终端原生的 AI 编程系统。 从新手入门到 Saluzi 特色,按你的节奏探索。`})]}),(0,S.jsxs)(`section`,{className:`mb-20`,children:[(0,S.jsxs)(`div`,{className:`mb-8 flex items-baseline justify-between border-b border-border pb-3`,children:[(0,S.jsx)(`h2`,{className:`font-display text-2xl font-semibold text-foreground`,children:`新手 Top 8 工作流`}),(0,S.jsx)(`span`,{className:`text-xs uppercase tracking-wider text-muted-foreground`,children:`按推荐顺序`})]}),(0,S.jsx)(`div`,{className:`grid grid-cols-1 gap-5 md:grid-cols-2`,children:N.map(e=>(0,S.jsx)(P,{workflow:e,onSelect:t},e.id))})]}),(0,S.jsxs)(`section`,{children:[(0,S.jsxs)(`div`,{className:`mb-8 flex items-baseline justify-between border-b border-border pb-3`,children:[(0,S.jsx)(`h2`,{className:`font-display text-2xl font-semibold text-foreground`,children:`Saluzi 特色`}),(0,S.jsx)(`span`,{className:`text-xs uppercase tracking-wider text-muted-foreground`,children:`saluzi 独有`})]}),(0,S.jsx)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:e.navigation.find(e=>e.group===`Saluzi 特色`)?.pages.flatMap(e=>e.pages?e.pages:[e]).filter(e=>e.path).map(e=>(0,S.jsxs)(`button`,{type:`button`,onClick:()=>e.path&&t(e.path),className:`group flex items-center justify-between rounded-xl border border-border bg-card p-4 text-left transition-shadow hover:shadow-md`,children:[(0,S.jsx)(`span`,{className:`font-display text-base font-medium text-foreground`,children:e.title??e.path}),(0,S.jsx)(h,{className:`h-4 w-4 text-muted-foreground transition-transform group-hover:translate-x-1`})]},e.path))??null})]})]})}function Z({data:e}){return(0,S.jsxs)(`div`,{className:`mx-auto max-w-4xl px-10 py-16 sm:px-14 sm:py-20`,children:[(0,S.jsxs)(`header`,{className:`mb-14 border-b border-border pb-8`,children:[(0,S.jsx)(`p`,{className:`mb-3 text-xs font-semibold uppercase tracking-[0.2em] text-primary`,children:`Command Dictionary`}),(0,S.jsx)(`h1`,{className:`font-display text-4xl font-bold tracking-tight text-foreground`,children:`命令字典`}),(0,S.jsxs)(`p`,{className:`mt-4 font-serif text-base leading-relaxed text-muted-foreground`,children:[`按分类列出所有可用命令(共 `,Object.keys(e.commands).length,` 条)。每个卡片包含命令名称与描述,部分含别名。`]})]}),e.categories.map(e=>(0,S.jsxs)(`section`,{className:`mb-14`,children:[(0,S.jsx)(`h2`,{className:`mb-6 font-display text-xl font-semibold text-primary`,children:e.titleZh??e.title}),(0,S.jsx)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:e.commands.map(e=>(0,S.jsx)(F,{command:e},e.name))})]},e.id))]})}function Q({data:e,path:t,onSelect:n}){let r=e.chapters[t];return r?(0,S.jsx)(W,{chapter:r,path:t,onNavigate:n}):(0,S.jsxs)(`div`,{className:`mx-auto max-w-2xl px-10 py-16`,children:[(0,S.jsx)(`h1`,{className:`font-display text-3xl font-bold text-foreground`,children:`未找到章节`}),(0,S.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:`该章节可能已移除或重命名。`})]})}var $=document.getElementById(`root`);if(!$)throw Error(`root element not found`);(0,b.createRoot)($).render((0,S.jsx)(f.StrictMode,{children:(0,S.jsx)(Y,{})}));
|
|
167
|
+
`),n=[],r=!1,i=``;for(let e of t){let t=e.trim(),a=/^(`{3}|~{3})/.exec(t);if(a){r?t.startsWith(i.repeat(3))&&(r=!1,i=``):(r=!0,i=a[1][0]);continue}if(r)continue;let o=/^(#{2,3})\s+(.+?)\s*$/.exec(t);if(!o)continue;let s=o[1].length,c=o[2],l=V(c);l&&n.push({level:s,text:c,slug:l})}let a=new Map;return n.map(e=>{let t=a.get(e.slug)??0;return a.set(e.slug,t+1),t===0?e:{...e,slug:`${e.slug}-${t}`}})}function U(e){let t=[],n=e.split(B);for(let e=0;e<n.length;e++)n[e]&&t.push({kind:`md`,content:z(n[e])}),e<n.length-1&&t.push({kind:`parade-preview`});return t}function W({chapter:e,path:t,onNavigate:n}){let r=e.frontmatter.title??t,i=(0,f.useRef)(null),a=(0,f.useRef)(null),[o,s]=(0,f.useState)(null),c=(0,f.useMemo)(()=>U(e.content.replace(/^\{\/\*[\s\S]*?\*\/\}\s*\n/gm,``).replace(/^\{\/\*[\s\S]*?\*\/\}/gm,``)),[e.content]),l=(0,f.useMemo)(()=>H(e.content),[e.content]);(0,f.useEffect)(()=>{if(!i.current||l.length===0)return;let e=i.current,t=()=>{e.querySelectorAll(`h2, h3`).forEach((e,t)=>{let n=l[t];n&&(e.id!==n.slug&&(e.id=n.slug),e.style.scrollMarginTop!==`5rem`&&(e.style.scrollMarginTop=`5rem`))})};t();let n=new MutationObserver(()=>t());return n.observe(e,{childList:!0,subtree:!0}),()=>n.disconnect()},[l,c]),(0,f.useEffect)(()=>{if(!i.current)return;let e=i.current.parentElement;for(;e&&getComputedStyle(e).overflowY!==`auto`;)e=e.parentElement;a.current=e},[]),(0,f.useEffect)(()=>{let e=a.current;if(!e||l.length===0)return;let t=()=>{let t=e.scrollTop,n=null;for(let e of l){let r=document.getElementById(e.slug);if(r)if(r.offsetTop-120<=t)n=e;else break}s(n?.slug??null)};return t(),e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[l]);function u(e){if(!n)return null;if(e.startsWith(`docs/`))return e;let r=e.replace(/^(?:\.\.\/|\.\/|\/)+/,``);return r=r.replace(/\.(md|mdx)$/,``),r?`${t.split(`/`).slice(0,-1).join(`/`)}/${r}`:null}function d(e){if(!n)return;let t=e.target.closest(`a`);if(!t)return;let r=t.getAttribute(`href`);if(!r||/^(https?:|mailto:|#)/.test(r))return;let i=u(r);i&&(e.preventDefault(),n(i))}function p(e){let t=document.getElementById(e);if(t){t.scrollIntoView({behavior:`smooth`,block:`start`}),s(e);return}let n=0,r=window.setInterval(()=>{n+=1;let t=document.getElementById(e);t?(window.clearInterval(r),t.scrollIntoView({behavior:`smooth`,block:`start`}),s(e)):n>=20&&window.clearInterval(r)},50)}let m=l.length>=2;return(0,S.jsx)(`div`,{className:`mx-auto max-w-5xl px-6 py-12 sm:px-10 sm:py-16`,children:(0,S.jsxs)(`div`,{className:`flex gap-10`,children:[(0,S.jsxs)(`article`,{ref:i,className:`min-w-0 max-w-2xl flex-1 px-2 sm:px-4`,onClick:d,children:[(0,S.jsxs)(`header`,{className:`mb-12 border-b border-border pb-8`,children:[(0,S.jsx)(`h1`,{className:`font-display text-4xl font-bold leading-tight tracking-tight text-foreground`,children:r}),e.frontmatter.description?(0,S.jsx)(`p`,{className:`mt-4 font-serif text-lg leading-relaxed text-muted-foreground`,children:e.frontmatter.description}):null,e.frontmatter.keywords?.length?(0,S.jsx)(`div`,{className:`mt-6 flex flex-wrap gap-2`,children:e.frontmatter.keywords.map(e=>(0,S.jsx)(`span`,{className:`rounded-full border border-border-light bg-muted px-3 py-1 text-xs font-medium text-muted-foreground`,children:e},e))}):null]}),(0,S.jsx)(`div`,{className:`chapter-content max-w-none`,children:(0,S.jsx)(f.Suspense,{fallback:(0,S.jsx)(`div`,{className:`py-8 text-sm text-muted-foreground`,children:`Loading content…`}),children:c.map((e,t)=>e.kind===`parade-preview`?(0,S.jsx)(I,{},`pp-${t}`):(0,S.jsx)(R,{children:e.content},`md-${t}`))})})]}),m?(0,S.jsx)(`aside`,{className:`sticky top-4 hidden h-[calc(100vh-2rem)] w-56 shrink-0 self-start overflow-y-auto lg:block`,children:(0,S.jsxs)(`nav`,{"aria-label":`章节目录`,children:[(0,S.jsx)(`p`,{className:`mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`本章目录`}),(0,S.jsx)(`ul`,{className:`space-y-1 border-l border-border-light`,children:l.map(e=>{let t=o===e.slug;return(0,S.jsx)(`li`,{className:e.level===3?`ml-3`:``,children:(0,S.jsx)(`button`,{type:`button`,onClick:()=>p(e.slug),className:`block w-full border-l-2 py-1 pl-3 text-left text-xs leading-relaxed transition-colors `+(t?`border-primary text-primary`:`border-transparent text-muted-foreground hover:text-foreground`),style:{marginLeft:`-1px`},children:e.text})},e.slug)})})]})}):null]})})}var G=null;async function K(){if(G)return G;let e=await fetch(`./guide-data.json`);if(!e.ok)throw Error(`Failed to load guide-data.json: ${e.status}`);return G=await e.json(),G}function q(){let e=window.location.hash.replace(/^#\/?/,``);return e?e===`commands`?{kind:`commands`}:{kind:`chapter`,path:e}:{kind:`home`}}function J(e){return e.kind===`home`?`#/`:e.kind===`commands`?`#/commands`:`#/${e.path}`}function Y(){let[e,t]=(0,f.useState)(null),[n,r]=(0,f.useState)(null),[i,a]=(0,f.useState)(()=>q()),o=(0,f.useRef)(null);if((0,f.useEffect)(()=>{K().then(t).catch(e=>r(e.message??String(e)))},[]),(0,f.useEffect)(()=>{let e=()=>a(q());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),(0,f.useEffect)(()=>{o.current?.scrollTo(0,0)},[i]),n)return(0,S.jsx)(`div`,{className:`flex h-screen items-center justify-center`,children:(0,S.jsxs)(`div`,{className:`max-w-md rounded-xl border border-destructive bg-card p-8 text-center`,children:[(0,S.jsx)(`h1`,{className:`font-display text-xl font-bold text-destructive`,children:`加载失败`}),(0,S.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:n}),(0,S.jsxs)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:[`请确认 guide-data.json 已生成(运行 `,(0,S.jsx)(`code`,{children:`npm run build:guide`}),`)。`]})]})});if(!e)return(0,S.jsx)(`div`,{className:`flex h-screen items-center justify-center text-muted-foreground`,children:`Loading guide…`});let s=e=>{let t=e===`__commands__`?{kind:`commands`}:{kind:`chapter`,path:e},n=J(t);window.location.hash!==n&&window.history.pushState(null,``,n),a(t)};return(0,S.jsxs)(`div`,{className:`flex h-screen w-screen overflow-hidden bg-background text-foreground`,children:[(0,S.jsx)(C,{navigation:e.navigation,selected:i.kind===`chapter`?i.path:i.kind===`commands`?`__commands__`:null,onSelect:s,onHome:()=>{let e=J({kind:`home`});window.location.hash!==e&&window.history.pushState(null,``,e),a({kind:`home`})}}),(0,S.jsxs)(`main`,{className:`flex flex-1 flex-col overflow-hidden`,children:[(0,S.jsx)(`header`,{className:`flex h-16 items-center justify-end border-b border-border bg-background/80 px-8 backdrop-blur-sm`,children:(0,S.jsx)(M,{})}),(0,S.jsx)(`div`,{ref:o,className:`flex-1 overflow-y-auto`,children:i.kind===`home`?(0,S.jsx)(X,{data:e,onSelect:s}):i.kind===`commands`?(0,S.jsx)(Z,{data:e}):(0,S.jsx)(Q,{data:e,path:i.path,onSelect:s})})]})]})}function X({data:e,onSelect:t}){return(0,S.jsxs)(`div`,{className:`mx-auto max-w-5xl px-10 py-16 sm:px-16 sm:py-20`,children:[(0,S.jsxs)(`header`,{className:`mb-16`,children:[(0,S.jsx)(`p`,{className:`mb-3 text-xs font-semibold uppercase tracking-[0.2em] text-primary`,children:`Saluzi Guide`}),(0,S.jsx)(`h1`,{className:`font-display text-5xl font-bold leading-tight tracking-tight text-foreground`,children:`使用指南`}),(0,S.jsx)(`p`,{className:`mt-5 max-w-2xl font-serif text-lg leading-relaxed text-muted-foreground`,children:`Terminal-native agentic coding system · 终端原生的 AI 编程系统。 从新手入门到 Saluzi 特色,按你的节奏探索。`})]}),(0,S.jsxs)(`section`,{className:`mb-20`,children:[(0,S.jsxs)(`div`,{className:`mb-8 flex items-baseline justify-between border-b border-border pb-3`,children:[(0,S.jsx)(`h2`,{className:`font-display text-2xl font-semibold text-foreground`,children:`新手 Top 8 工作流`}),(0,S.jsx)(`span`,{className:`text-xs uppercase tracking-wider text-muted-foreground`,children:`按推荐顺序`})]}),(0,S.jsx)(`div`,{className:`grid grid-cols-1 gap-5 md:grid-cols-2`,children:N.map(e=>(0,S.jsx)(P,{workflow:e,onSelect:t},e.id))})]}),(0,S.jsxs)(`section`,{children:[(0,S.jsxs)(`div`,{className:`mb-8 flex items-baseline justify-between border-b border-border pb-3`,children:[(0,S.jsx)(`h2`,{className:`font-display text-2xl font-semibold text-foreground`,children:`Saluzi 特色`}),(0,S.jsx)(`span`,{className:`text-xs uppercase tracking-wider text-muted-foreground`,children:`saluzi 独有`})]}),(0,S.jsx)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:e.navigation.find(e=>e.group===`Saluzi 特色`)?.pages.flatMap(e=>e.pages?e.pages:[e]).filter(e=>e.path).map(e=>(0,S.jsxs)(`button`,{type:`button`,onClick:()=>e.path&&t(e.path),className:`group flex items-center justify-between rounded-xl border border-border bg-card p-4 text-left transition-shadow hover:shadow-md`,children:[(0,S.jsx)(`span`,{className:`font-display text-base font-medium text-foreground`,children:e.title??e.path}),(0,S.jsx)(h,{className:`h-4 w-4 text-muted-foreground transition-transform group-hover:translate-x-1`})]},e.path))??null})]})]})}function Z({data:e}){return(0,S.jsxs)(`div`,{className:`mx-auto max-w-4xl px-10 py-16 sm:px-14 sm:py-20`,children:[(0,S.jsxs)(`header`,{className:`mb-14 border-b border-border pb-8`,children:[(0,S.jsx)(`p`,{className:`mb-3 text-xs font-semibold uppercase tracking-[0.2em] text-primary`,children:`Command Dictionary`}),(0,S.jsx)(`h1`,{className:`font-display text-4xl font-bold tracking-tight text-foreground`,children:`命令字典`}),(0,S.jsxs)(`p`,{className:`mt-4 font-serif text-base leading-relaxed text-muted-foreground`,children:[`按分类列出所有可用命令(共 `,Object.keys(e.commands).length,` 条)。每个卡片包含命令名称与描述,部分含别名。`]})]}),e.categories.map(e=>(0,S.jsxs)(`section`,{className:`mb-14`,children:[(0,S.jsx)(`h2`,{className:`mb-6 font-display text-xl font-semibold text-primary`,children:e.titleZh??e.title}),(0,S.jsx)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:e.commands.map(e=>(0,S.jsx)(F,{command:e},e.name))})]},e.id))]})}function Q({data:e,path:t,onSelect:n}){let r=e.chapters[t];return r?(0,S.jsx)(W,{chapter:r,path:t,onNavigate:n}):(0,S.jsxs)(`div`,{className:`mx-auto max-w-2xl px-10 py-16`,children:[(0,S.jsx)(`h1`,{className:`font-display text-3xl font-bold text-foreground`,children:`未找到章节`}),(0,S.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:`该章节可能已移除或重命名。`})]})}var $=document.getElementById(`root`);if(!$)throw Error(`root element not found`);(0,b.createRoot)($).render((0,S.jsx)(f.StrictMode,{children:(0,S.jsx)(Y,{})}));
|