UNPKG

@dovenv/docs

Version:
57 lines (52 loc) 20.4 kB
import{deepmergeCustom as k,joinUrl as y,getBaseName as T,joinPath as f,resolvePath as N,existsPath as b,getMediaPalette as I,chroma as p,isAbsolutePath as S,color as E,copyDir as F,removePathIfExist as G,process as U,fileURLToPath as j,getExtName as M,getDirName as O,getObjectFromJSONFile as H,isDev as W,getCurrentDir as B}from"@dovenv/core/utils";import{withPwa as J}from"@vite-pwa/vitepress";import{mergeConfig as K}from"vitepress";import{transformerTwoslash as z}from"@shikijs/vitepress-twoslash";import $ from"markdown-it-container";import Y from"markdown-it-task-lists";import{groupIconMdPlugin as q,groupIconVitePlugin as Q}from"vitepress-plugin-group-icons";import X from"vite-plugin-restart";import Z from"vitepress-plugin-llmstxt";import{RssPlugin as tt}from"vitepress-plugin-rss";const x=k({}),et={image:"public/logo.png",overrideManifestIcons:!0,includeHtmlHeadLinks:!0},ot=t=>t?{repoURL:t,contributingURL:y(t,"blob/main/CONTRIBUTING.md"),changelogURL:y(t,"blob/main/CHANGELOG.md"),license:{url:y(t,"blob/main/LICENSE")}}:{},rt=(t,e,o,r,n)=>({url:t,og:{image:t?y(t,"banner.png"):"",title:e,url:t,siteName:e,description:r},rss:t?{title:e||"",language:o,description:r,baseUrl:t.endsWith("/")?t.slice(0,-1):t,copyright:`Copyright (c) ${new Date().getFullYear()}-present, ${e}`,ignoreHome:!0}:void 0,pwa:{mode:"development",injectRegister:"script-defer",registerType:"autoUpdate",workbox:{globPatterns:["**/*.{css,js,html,svg,png,ico,txt,woff2}"]},experimental:{includeAllowlist:!0},devOptions:{enabled:!0,suppressWarnings:!0,navigateFallback:"/"},manifest:{description:r,name:e,short_name:e,start_url:"/?source=pwa",theme_color:n?.color?.primary}}}),nt={input:"./docs",output:"./build",logo:"/logo.png",favicon:"/favicon.png",name:"DOVENV",desc:"Workspace documentation",license:{type:"MIT"},docsPath:"docs",lang:"en"},at=({desc:t,lang:e,name:o,url:r,repoURL:n,styles:s}={})=>x(ot(n||void 0),rt(r,o,e,t,s),{name:o,desc:t,styles:s,lang:e}),P=async t=>{const e={};e.footer={copy:void 0,links:void 0},e.license={type:void 0,url:void 0},typeof t?.funding=="object"&&(Array.isArray(t.funding)?typeof t?.funding?.[0]=="object"&&typeof t.funding[0].url=="string"&&(e.fundingURL=t.funding[0].url):typeof t?.funding?.url=="string"&&(e.fundingURL=t.funding.url)),typeof t?.repository=="object"&&typeof t?.repository.url=="string"?e.repoURL=t.repository.url:typeof t?.repository=="string"&&(e.repoURL=t.repository),typeof t?.bugs=="object"&&typeof t?.bugs?.url=="string"&&(e.bugsURL=t.bugs.url),t?.license&&(e.license.type=t.license),typeof t?.homepage=="string"&&(e.url=t.homepage),typeof t?.description=="string"&&(e.desc=t.description),typeof t?.extra?.productName=="string"?e.name=t.extra.productName:typeof t?.extra?.id=="string"?e.name=t.extra.id:typeof t?.name=="string"&&(e.name=t.name),typeof t?.version=="string"&&(e.version=t.version);const o=(l,c)=>{if(!l||!(typeof l=="object"&&"name"in l&&"url"in l&&typeof l.name=="string"&&typeof l.url=="string"))return[];const h=l.url.startsWith("https://github.com/");return[{name:l.name,title:c,avatar:h?l.url+".png":"",links:h?[{icon:"github",link:l.url}]:[]}]};if(e.contributors=[...o(t?.author,"Author")],t.contributors&&Array.isArray(t.contributors))for(let l=0;l<t.contributors.length;l++){const c=t.contributors[l];e.contributors.push(...o(c,"Contributor"))}if(!t.extra)return e;const r=t.extra.changelogURL||t.extra.changelogUrl,n=t.extra.licenseURL||t.extra.licenseUrl,s=t.extra.libraryURL||t.extra.libraryUrl,i=t.extra.collective?.url,a={web:t.extra.collective.web,email:t.extra.collective.email,...t.extra.collective.social},u=t.extra.shortDesc,g=t.extra.contributingURL||t.extra.contributingUrl;return e.footer.copy={name:t.extra.collective?.name||t.extra.collective?.id,url:t.extra.collective?.url},r&&(e.changelogURL=r),n&&(e.license.url=n),s&&(e.npmURL=s),i&&(e.moreURL=i),u&&(e.shortDesc=u),a&&(e.footer.links=a),g&&(e.contributingURL=g),e},st=t=>{t.use($,"steps",{validate:e=>e.trim().match(/^steps\s*$/),render:(e,o)=>e[o].nesting===1?`<div class="steps"> `:`</div> `}),t.use($,"step",{validate:e=>e.trim().match(/^step\s+([\w\s\S]+)/),render:(e,o)=>{const r=e[o];if(r.nesting===1){const n=r.info.trim().match(/^step\s+([\w\s\S]+)/);return`<div class="step"> <span class="step-number">${n?n[1].substring(0,1):""}</span> `}else return`</div> `}})},V="------------------------",it=({data:t,config:e})=>({config:o=>{o.use(Y),o.use(st),e.groupIcon!==!1&&o.use(q)},codeTransformers:e.twoslash!==!1?[z({throws:!t.devMode,onShikiError:o=>console[t.devMode?"warn":"error"](o),onTwoslashError:(o,r,n)=>console[t.devMode?"warn":"error"](`Twoslash (${n}) Error: ${V} ${o instanceof Error?o.message:""} ${V} ${r} ${V}`),...e.twoslash})]:void 0}),ct=t=>{const e={},o=[];for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const n=t[r],s=n.type;if(e[s]||(e[s]=[]),n.url){const i={text:n.name,link:n.url};e[s].push(i),o.push(i)}}return{groups:e,all:o}},lt=t=>{if(!t||!("items"in t))return;const{groups:e,all:o}=ct(t.items);if(!("groups"in t))return o;const r=[];for(const n in t.groups)e[n]&&r.push({text:t.groups[n],items:e[n]});return r},L=({conf:t,guide:e,posts:o,links:r})=>{const n=[...t.nav?t.nav:[],...e?[{text:"Guide",activeMatch:"^/guide",link:"/guide"}]:[],...o?[{text:"Articles",activeMatch:"^/posts",link:"/posts"}]:[],...t.download&&t.download.items?[{text:"Downloads",items:lt(t.download)||[]}]:[],...r?[{text:"Links",activeMatch:"^/links",link:"/links"}]:[]];if(t.version){const s=[...t?.changelogURL?[{text:"Changelog",link:t.changelogURL}]:[],...t.contributingURL?[{text:"Contributing",link:t.contributingURL}]:[],...t.oldVersions&&t.oldVersions.length>0?[{text:"Versions",items:t.oldVersions.map(i=>({text:i.name,link:i.url}))}]:[]];s.length>0&&n.push({text:t.version,items:s})}return n},R="@dovenv/docs",pt="1.4.7",gt="https://dovenv.pigeonposse.com/guide/plugin/docs",dt={"dovenv-docs":"dist/bin.mjs"},ut={vitepress:"1.6.3"},ht=ut.vitepress,d={DOVENV_CONFIG_PATH:"DOVENV_CONFIG_PATH",DOVENV_UTILS:"DOVENV_UTILS",DOVENV_DOCS_CONFIG_PATH:"DOVENV_DOCS_CONFIG_PATH",DOVENV_DOCS_PKG_PATH:"DOVENV_DOCS_PKG_PATH",DOVENV_DOCS_CONFIG:"DOVENV_DOCS_CONFIG",DOVENV_DOCS_DATA:"DOVENV_DOCS_DATA",VITEPRESS_CONFIG:"VITEPRESS_CONFIG"},w=(t,e)=>{globalThis[d[t]]=e},v=t=>d[t]in globalThis?globalThis[d[t]]:void 0,ft=Object.keys(dt)[0],D=t=>t.charAt(0).toUpperCase()+t.slice(1),m=(t,e,o=void 0,r=void 0)=>{try{return o?[{text:t,items:o,collapsed:r!==void 0&&typeof r=="boolean"?r:void 0}]:e?(e=e?.startsWith("guide")&&e.endsWith("index.md")?f("/",e.replaceAll("index.md","")):e?.startsWith("guide")?f("/",e):e,[{text:t,link:e}]):[]}catch(n){return console.warn(`Error setting "${t}" path in sidebar`,{e:n,data:{title:t,path:e,items:o,collapsed:r}}),[]}},A=t=>{try{return t.map(e=>{let o=D((e.split("/").pop()||"").replace(".md",""));return o.toLowerCase()==="index"&&(o="\u{1F3C1} Get started"),{name:o,path:e}}).sort((e,o)=>e.name==="\u{1F3C1} Get started"?-1:o.name==="\u{1F3C1} Get started"?1:e.name.localeCompare(o.name)).flatMap(e=>m(e.name,e.path))}catch(e){return console.warn("Error getting filtered sidebar paths",{e,data:{paths:t}}),[]}},mt=(t,e=0)=>{try{const o=t.filter(s=>s.split("/").length===3),r=e+1,n={};for(let s=0;s<o.length;s++){const i=o[s],a=i.split("/")[r];a&&(n[a]||(n[a]=[]),n[a].push(i))}return Object.keys(n).flatMap(s=>{const i=n[s];return i.length===1?m(D(s),i[0]):m(D(s),s,A(i),s!=="core")})}catch(o){return console.warn("Error getting filtered group sidebar paths",{e:o,data:{paths:t,group:e}}),[]}},bt=(t,e)=>{if(!t||t.length===0)return[];const o="/guide/",r=t.filter(i=>i.split("/").length===2&&i!=="guide/index.md"),n=t.includes("guide/index.md")?"guide/index.md":void 0,s=()=>{const i=mt(t);return i.length?[{text:"Reference",items:i}]:[]};return[...e?.autoSidebar?.intro!==void 0&&e.autoSidebar.intro===!1?[]:m("Introduction",n,[...m(`What is ${e.name}?`,o),...A(r)]),...e?.autoSidebar?.reference!==void 0&&e.autoSidebar.reference===!1?[]:s()]},_=({conf:t,guide:e,contributors:o,todo:r})=>{const n=r&&r.length===1?r[0]:void 0,s=r&&r.length>1?r.map(g=>m(D(T(g.replace(".md",""))),g)).flat():void 0,i=m("Todo",n,s,!0),a=()=>{const g=[...m("Report issues",t.bugsURL||void 0),...i];return g.length?[{text:"Contribute",items:g}]:[]},u=()=>{const g=[...m("Contributors",o),...m("Changelog",t.changelogURL||void 0),...m("License",t.license?.url),...m("More projects",t.moreURL||void 0)];return g.length?[{text:"About",items:g}]:[]};return[...bt(e,t),...t?.autoSidebar?.contribute!==void 0&&t.autoSidebar.contribute===!1?[]:a(),...t?.autoSidebar?.about!==void 0&&t.autoSidebar.about===!1?[]:u()]},vt=({conf:t,guide:e,contributors:o,todo:r})=>k({})(t.sidebar?t.sidebar:{},{"/guide/":_({conf:t,guide:e,contributors:o,todo:r}),"/todo/":_({conf:t,guide:e,contributors:o,todo:r}),"/contributors":_({conf:t,guide:e,contributors:o,todo:r})}),yt=({config:t,data:e})=>({optimizeDeps:{exclude:["virtual:group-icons.css"]},server:{fs:{strict:!1}},plugins:[{name:R+"--listen-to-server",configureServer(o){o.watcher.add("*.md").on("all",async(r,n)=>{})},config(o){const r=o.vitepress.configDeps;e.packageConfig?.path&&!r.includes(e.packageConfig?.path)&&r.push(e.packageConfig?.path),e.pathConfig?.path&&!r.includes(e.pathConfig?.path)&&r.push(e.pathConfig?.path),e.fnConfig?.path&&!r.includes(e.fnConfig?.path)&&r.push(e.fnConfig?.path),console.debug({configDeps:r});const n=v(d.VITEPRESS_CONFIG)?.pages,s=v(d.DOVENV_DOCS_CONFIG);if(!s){console.warn("Unexpected error: No config provided. Please restart the server and report this issue if persists.");return}console.debug({docsPages:n});const i=n?.filter(h=>h.startsWith("guide/")),a=n?.filter(h=>h.startsWith("posts/")),u=n?.filter(h=>h.startsWith("todo/")),g=n?.some(h=>h.startsWith("posts.md")),l=n?.some(h=>h.startsWith("contributors.md"))?"contributors.md":void 0,c=n?.some(h=>h.startsWith("links.md"))?"links.md":void 0;o.vitepress.site.themeConfig.sidebar=vt({conf:s,guide:i,contributors:l,todo:u}),o.vitepress.site.themeConfig.nav=L({conf:s,guide:!!(i&&i.length>0),posts:!!(a&&a.length>0&&g),links:!!c}),o.vitepress.logger.info("Sidebar data updated successfully",{timestamp:!0}),console.log()}},...t.groupIcon===!1?[]:[Q(t.groupIcon)],...t.rss?[tt(t.rss)]:[],X({reload:[...t?.server?.hotReloadFiles?t.server.hotReloadFiles:[]],restart:[...t?.server?.restartFiles?t.server.restartFiles:[]]}),...t.llms===!1?[]:[Z(t.llms)]]}),C={color:{primary:"#e8243d",secondary:"#ee683a",terciary:"#f49133",fourth:"#461411"},radius:"20px"},xt=async(t,e,o,r)=>{const n=f(e,"public"),s=N(r,f(n,o));console.debug({logoPath:s});const i=await b(s);t.styles||(t.styles={}),t.styles.color||(t.styles.color={});let a;const u={primary:C.color.primary,secondary:C.color.secondary,terciary:C.color.terciary,fourth:C.color.fourth};if(i&&!t.styles.color.primary)try{const c=await I(s);a={primary:c[0],secondary:c[1],terciary:c[3],fourth:c[4]}}catch(c){console.warn(c instanceof Error?c.message:c),a=u}else if(t.styles.color.primary){const c=t.styles.color.primary;a={primary:p(c).hex(),secondary:p(c).darken(2).hex(),terciary:p(c).brighten(2).hex(),fourth:p(c).saturate(-2).hex()}}else a=u;const g={...a,dark:{text:p(a.primary).brighten(4).hex(),text2:p(a.primary).brighten(4).alpha(.8).hex(),text3:p(a.secondary).brighten(2).alpha(.8).hex(),bg:p(a.primary).darken(8).hex(),bgAlt:p(a.primary).darken(6).alpha(.8).hex(),bgSoft:p(a.secondary).darken(6).hex(),bgOpacity:p(a.terciary).darken(6).alpha(.5).hex(),shadow:p(a.secondary).brighten(4).alpha(.05).hex(),divider:p(a.secondary).brighten(4).alpha(.1).hex()},light:{text:p(a.primary).darken(4).hex(),text2:p(a.primary).darken(4).alpha(.8).hex(),text3:p(a.secondary).darken(2).alpha(.8).hex(),bg:p(a.primary).brighten(8).hex(),bgAlt:p(a.primary).brighten(6).alpha(.8).hex(),bgSoft:p(a.secondary).brighten(6).hex(),bgOpacity:p(a.terciary).brighten(6).alpha(.5).hex(),shadow:p(a.secondary).darken(4).alpha(.05).hex(),divider:p(a.secondary).darken(4).alpha(.1).hex()}},l=k({})({color:g,radius:C.radius},t?.styles||{});return t.styles=l,t},wt=async({root:t,fnConfig:e,pathConfig:o,packageConfig:r})=>{console.debug({root:t});const n=x(nt,r||{},o||{},e||{}),s=await xt(n,n.input,n.logo,t),i=await at(s),a=await x(i,s),u=S(a.input)?a.input:f(t,a.input),g=S(a.output)?a.output:f(t,a.output);if(await b(u)||(console.error(E.red(`Docs path not found in ${u} `)),process.exit(1)),a.contributors){const l=new Set;a.contributors=a.contributors.filter(c=>c.name&&!l.has(c.name)?(l.add(c.name),!0):!1)}return{config:a,default:i,srcDir:u,outDir:g}},Ct=async({config:t,data:e})=>{if(!t)return console.error("Unexpected: DOVENV configuration not found"),process.exit(1);if(!e)return console.error("Unexpected: DOVENV data not found"),process.exit(1);!e.devMode&&!t?.experimental?.noTempDirOnBuild&&(console.debug("Copy dir to temp dir"),await F({input:e.srcDir,output:e.tempDir}),e.srcDir=e.tempDir,process.on("exit",async()=>{console.debug("Remove temp dir"),await G(e.tempDir)}));const{srcDir:o}=e;if(t.pwa&&t.pwa.pwaAssets?.image){const r=f(o,t.pwa.pwaAssets.image);console.debug({imageDir:r}),await b(r)||(console.warn(`Disable PWA, because image [${r}] does not exists`),t.pwa=!1)}if(t.logo){const r=f(o,"public",t.logo);console.debug({logoSrc:r}),await b(r)||(console.warn(`Disable "logo" because it does not exist at path [${r}].`),conf.logo=conf.logo=void 0)}if(t.favicon){const r=f(o,"public",t.favicon);console.debug({faviconSrc:r}),await b(r)||(console.warn(`Disable "favicon" because it does not exist at path [${r}].`),t.logo&&console.info('Changed the "favicon" path to the "logo" path because the "logo" path exists'),t.favicon=t.logo)}return t.favicon&&!t.logo&&(console.info('Changed the "logo" path to the "favicon" path because the "favicon" path exists'),t.logo=t.favicon),{data:e,config:t}},Dt=({configPath:t,packageJsonPath:e})=>{w(d.DOVENV_DOCS_CONFIG_PATH,t),w(d.DOVENV_DOCS_PKG_PATH,e)},kt=()=>({configPath:v(d.DOVENV_DOCS_CONFIG_PATH),packageJsonPath:v(d.DOVENV_DOCS_PKG_PATH),dovenvConfigPath:v(d.DOVENV_CONFIG_PATH)});class Ot{cwd;configPath;packagePath;dovenvConfigPath;constructor(){const e=kt();this.cwd=U.cwd(),this.configPath=e.configPath,this.packagePath=e.packageJsonPath||f(this.cwd,"package.json"),this.dovenvConfigPath=e.dovenvConfigPath||j(import.meta.url),console.debug({configPath:this.configPath,packagePath:this.packagePath,dovenvConfigPath:this.dovenvConfigPath})}async#t(){let e=this.configPath;if(!e||typeof e!="string")return;if(e=N(e),!await b(e))throw new Error(`A configuration route [${e}] does not exist`);const o=M(e),r=O(e);o===".mjs"||o===".js"||o===".json"||(console.error("File type not supported. Use a .json, .mjs, or .js file."),U.exit(1));const{default:n}=await import(e+`?update=${Date.now()}`);return{config:n,path:e,dir:r}}async#e(){const e=await b(this.packagePath)?await H(this.packagePath):void 0;if(!e)return;const o=await P(e);return{dir:O(this.packagePath),path:this.packagePath,config:o}}async#o(){let e={};if(this.dovenvConfigPath){if(this.dovenvConfigPath)try{if(await b(this.dovenvConfigPath)){const{default:o}=await import(this.dovenvConfigPath+`?update=${Date.now()}`),r=o?.const?.pkg,n=o?.const?.[d.DOVENV_DOCS_CONFIG];if(n){let s;if(typeof n=="function"){const i=v(d.DOVENV_UTILS);if(!i)throw new Error(`Must exists global: ${d.DOVENV_UTILS}`);s=await n(i)}else s=n;e=x(s,e)}r&&(e=x(await P(r),e))}}catch(o){o instanceof Error?console.warn('Error getting fn config "pkg" data:',o?.message):console.warn('Error getting fn config "pkg" data:',o)}if(e)return{config:e,path:this.dovenvConfigPath,dir:O(this.dovenvConfigPath)}}}async#r(){const e=await this.#t(),o=await this.#e(),r=await this.#o(),n=this.cwd,s=W(),i=await wt({root:n,fnConfig:r?.config,pathConfig:e?.config,packageConfig:o?.config}),a=i.config,u=f(i.outDir,".temp"),g=f(i.outDir,"docs"),l=f(i.outDir,".cache"),c=i.srcDir;return await Ct({config:a,data:{devMode:s,root:n,srcDir:c,outDir:g,tempDir:u,cacheDir:l,defaultConfig:i.default,pathConfig:e,fnConfig:r,packageConfig:o}})}async updateGlobals(){console.log(E.green(` \u2728 Update DOVENV globals `));const e=await this.#r();return w(d.DOVENV_DOCS_CONFIG_PATH,e.data.pathConfig?.path),w(d.DOVENV_DOCS_CONFIG,e.config),w(d.DOVENV_DOCS_DATA,e.data),console.debug("DOVENV_DOCS_DATA",e.data),console.debug("DOVENV_DOCS_CONFIG",e.config),{config:e.config,data:e.data}}}const Pt='<svg class="svg-donate" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z"/></svg>',Vt=f(B(import.meta.url),".."),_t=async()=>{const t=new Ot,{data:e,config:o}=await t.updateGlobals(),r=await J({title:o.shortDesc?`${o.name} - ${o.shortDesc}`:o.name,titleTemplate:":title - Documentation",description:o.desc,lang:o.lang,markdown:it({data:e,config:o}),vite:yt({data:e,config:o}),cacheDir:e.cacheDir,outDir:e.outDir,srcDir:e.srcDir,cleanUrls:!0,pwa:o.pwa?o.pwa:void 0,head:[["style",{type:"text/css",id:o.name+"-user-css"},o.css||""],["style",{type:"text/css",id:o.name+"theme-css"},` :root { --pp-brand-1: ${o.styles.color.primary}; --pp-brand-2: ${o.styles.color.secondary}; --pp-brand-3: ${o.styles.color.terciary}; --pp-brand-4: ${o.styles.color.fourth}; --vp-c-text-1: ${o.styles.color.light.text}; --vp-c-text-2: ${o.styles.color.light.text2}; --vp-c-text-3:${o.styles.color.light.text3}; --vp-c-bg: ${o.styles.color.light.bg}; --vp-c-bg-alt: ${o.styles.color.light.bgAlt}; --vp-c-bg-elv: ${o.styles.color.light.bgSoft}; --vp-c-bg-soft: ${o.styles.color.light.bgSoft}; --vp-c-bg-opacity: ${o.styles.color.light.bgOpacity}; --vp-c-divider: ${o.styles.color.light.divider}; --pp-brand-shadow: ${o.styles.color.light.shadow}; --pp-radius: ${o.styles.radius}; --vp-c-brand-1: var(--pp-brand-2); --vp-c-brand-2: var(--pp-brand-1); --vp-c-brand-3: var(--pp-brand-3); --vp-sidebar-bg-color: var(--vp-c-bg); --vp-home-hero-name-color: transparent; --vp-home-hero-name-background: -webkit-linear-gradient(150deg, var(--pp-brand-2), var(--pp-brand-4), var(--pp-brand-3), var(--pp-brand-1) ); --vp-home-hero-image-background-image: linear-gradient(150deg, var(--pp-brand-2), var(--pp-brand-4), var(--pp-brand-3), var(--pp-brand-1)); --vp-home-hero-image-filter: blur(56px); } .dark { --vp-c-text-1: ${o.styles.color.dark.text}; --vp-c-text-2: ${o.styles.color.dark.text2}; --vp-c-text-3:${o.styles.color.dark.text3}; --vp-c-bg: ${o.styles.color.dark.bg}; --vp-c-bg-alt: ${o.styles.color.dark.bgAlt}; --vp-c-bg-elv: ${o.styles.color.dark.bgSoft}; --vp-c-bg-soft: ${o.styles.color.dark.bgSoft}; --vp-c-bg-opacity: ${o.styles.color.dark.bgOpacity}; --vp-c-divider: ${o.styles.color.dark.divider}; --pp-brand-shadow: ${o.styles.color.dark.shadow}; } `],["style",{type:"text/css",id:o.name+"llmstxt-css"},o.llms===!1?".llmstxt-section {display: none;}":""],["link",{rel:"icon",href:o.favicon}],["meta",{property:"og:type",content:"website"}],["meta",{property:"og:title",content:o.og?.title||o.name}],["meta",{property:"og:image",content:o.og?.image||""}],["meta",{property:"og:url",content:o.og?.url||""}],["meta",{property:"og:description",content:o.og?.description||o.desc}],["meta",{property:"og:site_name",content:o.og?.siteName||o.name}],["meta",{name:"twitter:card",content:"summary_large_image"}],["meta",{name:"twitter:site",content:o.og?.twitterAccount||""}]],themeConfig:{logo:o.logo,siteTitle:o.name.toUpperCase(),search:{provider:"local"},editLink:o.repoURL?{pattern:y(o.repoURL,"edit","main",o.docsPath,"/:path")}:void 0,outline:"deep",nav:L({conf:o}),sidebar:o.sidebar,socialLinks:[...o.navLinks?o.navLinks:[],...o.npmURL?[{icon:"npm",link:o.npmURL}]:[],...o.repoURL?[{icon:"github",link:o.repoURL}]:[],...o.fundingURL?[{icon:{svg:Pt},link:o.fundingURL}]:[]],collectiveLinks:o.footer?.links,customFooter:{license:o.license,copy:o.footer?.copy},contributors:o.contributors,links:o.links}});return o.vitepress?K(r,o.vitepress):r};export{Vt as V,et as a,ft as b,ht as c,d,_t as e,P as g,gt as h,R as n,Dt as s,pt as v};