@stacksjs/bunpress 0.1.14 → 0.1.16
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/bin/cli.js +1 -1
- package/dist/bin/commands/seo.d.ts +4 -0
- package/dist/{chunk-b99gqcxe.js → chunk-gxhjya5p.js} +1 -1
- package/dist/{chunk-w17epehd.js → chunk-s98n2933.js} +36 -36
- package/dist/{chunk-gb9rn28b.js → chunk-vvc6x3cy.js} +1 -1
- package/dist/{chunk-j65htw5t.js → chunk-w06ekrq3.js} +30 -30
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
import{I as a,J as b}from"../chunk-
|
|
3
|
+
import{I as a,J as b}from"../chunk-w06ekrq3.js";import"../chunk-ss6yzy9f.js";import"../chunk-e5q66hsy.js";import"../chunk-w6byd4st.js";export{a as findMarkdownFiles,b as buildDocs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{A as c,B as d,C as e,D as f,y as a,z as b}from"./chunk-
|
|
2
|
+
import{A as c,B as d,C as e,D as f,y as a,z as b}from"./chunk-s98n2933.js";import"./chunk-e5q66hsy.js";import"./chunk-w6byd4st.js";export{c as wrapInLayout,b as stripConfiguredBasePath,e as startServer,f as serveCLI,d as markdownToHtml,a as getConfiguredBasePath};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{P as lQ,Q as P}from"./chunk-e5q66hsy.js";import{S as
|
|
3
|
-
`).map((O)=>`<span class="line">${
|
|
2
|
+
import{P as lQ,Q as P}from"./chunk-e5q66hsy.js";import{S as u}from"./chunk-w6byd4st.js";var{Glob:fQ,YAML:pQ}=globalThis.Bun;import{stat as mQ}from"fs/promises";import{join as i}from"path";import f from"process";var{Glob:oQ}=globalThis.Bun;import{join as UQ}from"path";var h=new Map;function nQ(Q,Z,$){let Y=Z.split("."),J=Q;for(let O=0;O<Y.length-1;O++){let q=Y[O];if(typeof J[q]!=="object"||J[q]===null)J[q]={};J=J[q]}J[Y[Y.length-1]]=$}async function jQ(Q){if(h.has(Q))return h.get(Q);let Z={},$=UQ(Q,".data");try{let Y=new oQ("**/*.json");for await(let J of Y.scan({cwd:$,absolute:!1}))try{let O=await Bun.file(UQ($,J)).text(),q=J.replace(/\.json$/,"").replace(/[/\\]/g,".");nQ(Z,q,JSON.parse(O))}catch{}}catch{}return h.set(Q,Z),Z}function NQ(){h.clear()}import{createHighlighter as tQ,highlight as eQ}from"ts-syntax-highlighter";var C=null;function G0(){C=null}async function EQ(){if(C)return C;return C=await tQ({theme:"github-light",cache:!0}),C}var QZ={js:"javascript",ts:"typescript",jsx:"javascript",tsx:"typescript",htm:"html",sh:"bash",shell:"bash",zsh:"bash"};function n(Q){let Z=Q.toLowerCase().trim();return QZ[Z]||Z}function RQ(Q){let Z=n(Q);return["javascript","typescript","html","css","json","stx","bash"].includes(Z)}function g(Q){return Q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ZZ(Q,Z){let $=/<span[^>]*class="token[^"]*"[^>]*>([^<]*)<\/span>/g,Y=[],J;while((J=$.exec(Z))!==null){let X=J[1].replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/�*39;/g,"'");if(X)Y.push({text:X,span:J[0]})}if(Y.length===0)return Z;let O="",q=0,K=Q.match(/^(\s*)/);if(K&&K[1])O+=K[1],q=K[1].length;for(let X=0;X<Y.length;X++){let{text:z,span:V}=Y[X],_=Q.indexOf(z,q);if(_===-1){O+=V;continue}if(_>q){let G=Q.substring(q,_);if(/^\s+$/.test(G))O+=G}O+=V,q=_+z.length}return O}async function t(Q,Z,$="github-light"){let Y=n(Z);if(!RQ(Y))return Q.split(`
|
|
3
|
+
`).map((O)=>`<span class="line">${g(O)}</span>`).join(`
|
|
4
4
|
`);try{let J=Q.split(`
|
|
5
5
|
`);return(await Promise.all(J.map(async(q)=>{if(!q.trim())return`<span class="line">${q}</span>`;let X=(await eQ(q,Y,{theme:$})).html;if(X=X.replace(/<div[^>]*class="syntax-wrapper"[^>]*>/g,""),X=X.replace(/<\/div>\s*$/g,""),X=X.replace(/<pre[^>]*>/g,""),X=X.replace(/<\/pre>/g,""),X=X.replace(/<code[^>]*>/g,""),X=X.replace(/<\/code>/g,""),X=ZZ(q,X.trim()),!X.startsWith('<span class="line">'))X=`<span class="line">${X}</span>`;return X}))).join(`
|
|
6
6
|
`)}catch(J){return console.warn(`Failed to highlight code for language "${Z}":`,J),Q.split(`
|
|
7
|
-
`).map((q)=>`<span class="line">${
|
|
8
|
-
`)}}function U0(Q,Z){let $=n(Z);if(!RQ($))return
|
|
7
|
+
`).map((q)=>`<span class="line">${g(q)}</span>`).join(`
|
|
8
|
+
`)}}function U0(Q,Z){let $=n(Z);if(!RQ($))return g(Q);return g(Q)}function AQ(){return`
|
|
9
9
|
/* Basic syntax highlighting styles for ts-syntax-highlighter */
|
|
10
10
|
/* The actual theme colors are injected by ts-syntax-highlighter */
|
|
11
11
|
|
|
@@ -115,7 +115,7 @@ code {
|
|
|
115
115
|
color: #9ca3af;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
`}async function j0(){await EQ()}async function N0(){return EQ()}import{join as e}from"path";var d=new Map,BQ="\x00BPCODE",FQ="\x00";async function $Z(Q,Z){let $=e(Q,Z);if(d.has($))return d.get($);let Y=[e(Q,`${Z}.stx`),e(Q,Z,"index.stx")],J=null;for(let O of Y){let q=Bun.file(O);if(await q.exists()){J=await q.text();break}}return d.set($,J),J}function MQ(){d.clear()}function JZ(Q,Z){try{let $=Object.keys(Z),Y=$.map((J)=>Z[J]);return Function(...$,`"use strict"; return (${Q});`)(...Y)}catch{return}}function YZ(Q,Z){let $={};if(!Q)return $;let Y=/([:@]?[\w-]+)(?:=(?:"([^"]*)"|'([^']*)'|\{([^}]*)\}))?/g,J;while(J=Y.exec(Q)){let O=J[1];if(!O)continue;let q=O.startsWith(":"),K=O.replace(/^[:@]/,""),X=J[2],z=J[3],V=J[4],_=X??z??V;if(_===void 0)$[K]=!0;else if(q||V!==void 0)$[K]=JZ(_,Z);else $[K]=_}return $}async function QQ(Q,Z,$,Y=0){if(Y>10||!Q.includes("<"))return Q;let J=[],O=Q.replace(/```[\s\S]*?```/g,(_)=>{return J.push(_),`${BQ}${J.length-1}${FQ}`}).replace(/`[^`\n]*`/g,(_)=>{return J.push(_),`${BQ}${J.length-1}${FQ}`}),q=/<([A-Z][A-Za-z0-9]*)((?:\s[^>]*?)?)(\/?)>/g,K="",X=0,z=!1,V;while(V=q.exec(O)){let _=V[0],G=V[1],
|
|
118
|
+
`}async function j0(){await EQ()}async function N0(){return EQ()}import{join as e}from"path";var d=new Map,BQ="\x00BPCODE",FQ="\x00";async function $Z(Q,Z){let $=e(Q,Z);if(d.has($))return d.get($);let Y=[e(Q,`${Z}.stx`),e(Q,Z,"index.stx")],J=null;for(let O of Y){let q=Bun.file(O);if(await q.exists()){J=await q.text();break}}return d.set($,J),J}function MQ(){d.clear()}function JZ(Q,Z){try{let $=Object.keys(Z),Y=$.map((J)=>Z[J]);return Function(...$,`"use strict"; return (${Q});`)(...Y)}catch{return}}function YZ(Q,Z){let $={};if(!Q)return $;let Y=/([:@]?[\w-]+)(?:=(?:"([^"]*)"|'([^']*)'|\{([^}]*)\}))?/g,J;while(J=Y.exec(Q)){let O=J[1];if(!O)continue;let q=O.startsWith(":"),K=O.replace(/^[:@]/,""),X=J[2],z=J[3],V=J[4],_=X??z??V;if(_===void 0)$[K]=!0;else if(q||V!==void 0)$[K]=JZ(_,Z);else $[K]=_}return $}async function QQ(Q,Z,$,Y=0){if(Y>10||!Q.includes("<"))return Q;let J=[],O=Q.replace(/```[\s\S]*?```/g,(_)=>{return J.push(_),`${BQ}${J.length-1}${FQ}`}).replace(/`[^`\n]*`/g,(_)=>{return J.push(_),`${BQ}${J.length-1}${FQ}`}),q=/<([A-Z][A-Za-z0-9]*)((?:\s[^>]*?)?)(\/?)>/g,K="",X=0,z=!1,V;while(V=q.exec(O)){let _=V[0],G=V[1],j=V[2],N=V[3],W=await $Z(Z,G);if(W==null)continue;z=!0,K+=O.slice(X,V.index);let E="",U=V.index+_.length;if(!N){let B=new RegExp(`</${G}>`,"g");B.lastIndex=U;let M=B.exec(O);if(M)E=O.slice(U,M.index).trim(),U=M.index+M[0].length}let F=YZ(j.trim(),$),A="";try{let{renderString:B}=await import("@stacksjs/stx");A=await B(W,{...$,...F,slot:E})}catch{A=""}K+=A,X=U,q.lastIndex=U}if(K+=O.slice(X),K=K.replace(/\u0000BPCODE(\d+)\u0000/g,(_,G)=>J[Number(G)]??""),z)return QQ(K,Z,$,Y+1);return K}import{join as DQ}from"path";var OZ=DQ(import.meta.dir,"templates"),c=new Map;async function XZ(Q){if(c.has(Q))return c.get(Q);let Z=DQ(OZ,`${Q}.stx`),$=Bun.file(Z);if(!await $.exists())throw Error(`Template not found: ${Q}`);let Y=await $.text();return c.set(Q,Y),Y}async function v(Q,Z){let $=await XZ(Q);return qZ($,Z)}function TQ(){c.clear()}function qZ(Q,Z){return Q.replace(/\{!!\s*([\w.]+)\s*!!\}/g,($,Y)=>wQ(IQ(Z,Y))).replace(/\{\{\s*([\w.]+)\s*\}\}/g,($,Y)=>KZ(wQ(IQ(Z,Y))))}function IQ(Q,Z){return Z.split(".").reduce(($,Y)=>{if($==null||typeof $!=="object")return;return $[Y]},Q)}function wQ(Q){if(Q==null)return"";return String(Q)}function KZ(Q){return Q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var LQ=`/**
|
|
119
119
|
* VitePress Theme for BunPress - Layout & Chrome
|
|
120
120
|
* -------------------------------------------------------------------------- */
|
|
121
121
|
|
|
@@ -7215,9 +7215,9 @@ ${vQ}
|
|
|
7215
7215
|
${kQ}
|
|
7216
7216
|
${bQ}
|
|
7217
7217
|
`}function UZ(){return PQ}function jZ(){return yQ}function NZ(){return vQ}function EZ(){return kQ}function RZ(){return bQ}var AZ={name:"bun",getCSS:SQ,getVars:UZ,getBase:jZ,getCustomBlocks:NZ,getCodeGroups:EZ,getExtras:RZ},xQ=AZ;var BZ={vitepress:HQ,bun:xQ};function CQ(Q="vitepress"){let Z=BZ[Q];if(!Z)return console.warn(`[BunPress] Unknown theme: ${Q}, falling back to vitepress`),ZQ();return Z.getCSS()}var $Q={enabled:!0,position:["sidebar"],title:"Table of Contents",maxDepth:6,minDepth:2,className:"table-of-contents",smoothScroll:!0,activeHighlight:!0,collapsible:!0,exclude:[]};function JQ(Q){return Q.toLowerCase().trim().replace(/<[^>]*>/g,"").replace(/what's new\?\s*\(v2\.0\)/g,"whats-new-v2-0").replace(/features\s*&\s*benefits/g,"features-benefits").replace(/vue\.js\s*\+\s*typescript\s*=\s*\u2764\uFE0F/g,"vue-js-typescript").replace(/\//g,"-").replace(/\./g,"-").replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}function uQ(Q,Z){let $=JQ(Q),Y=$,J=1;while(Z.has($))$=`${Y}-${J}`,J++;return Z.add($),$}function YQ(Q){let Z=[],$=new Set,Y=/^(#{1,6})\s+(.+)$/gm,J;while((J=Y.exec(Q))!==null){let O=J[1].length,q=J[2].trim();if(!q)continue;if(q.includes("toc-ignore"))continue;let K=q.replace(/\s*<!-- toc-ignore -->\s*/g,"").trim();K=K.replace(/`([^`]+)`/g,"<code>$1</code>");let X=K.includes("<code>"),z=uQ(K.replace(/<[^>]*>/g,""),$);Z.push({level:O,text:K,id:z,children:[],hasCode:X})}return Z}function OQ(Q){let Z=[],$=[];for(let Y of Q){while($.length>0&&$[$.length-1].level>=Y.level)$.pop();if($.length===0)Z.push(Y);else $[$.length-1].children.push(Y);$.push(Y)}return Z}function XQ(Q,Z){let{minDepth:$=2,maxDepth:Y=6,exclude:J=[]}=Z,O=(q)=>{let K=[];for(let X of q){if(J.some((V)=>{if(V.startsWith("/")&&V.endsWith("/"))return new RegExp(V.slice(1,-1)).test(X.text);else return X.text===V}))continue;if(X.level>Y)continue;let z=O(X.children);if(X.level>=$&&X.level<=Y)K.push({...X,children:z});else K.push(...z)}return K};return O(Q)}function l(Q){let{items:Z,title:$,config:Y}=Q,{className:J,collapsible:O}=Y,q=(K,X=0)=>{if(K.length===0)return"";let z=X===0?"toc-list":"toc-sublist",V=X===0?"toc-item":"toc-subitem";return`<ul class="${z}">
|
|
7218
|
-
${K.map((_)=>{let G=_.children.length>0,
|
|
7218
|
+
${K.map((_)=>{let G=_.children.length>0,j=G&&O?"toc-expand":"",N=G?q(_.children,X+1):"",W=50,E=_.text.length>50?`${_.text.substring(0,50)}...`:_.text,U=_.text.length>50?"toc-truncate":"";return`<li class="${_.hasCode?"toc-code":""} ${j} ${V} ${U}">
|
|
7219
7219
|
<a href="#${_.id}" class="toc-link" title="${_.text.replace(/<[^>]*>/g,"")}">${E}</a>
|
|
7220
|
-
${
|
|
7220
|
+
${N}
|
|
7221
7221
|
</li>`}).join(`
|
|
7222
7222
|
`)}
|
|
7223
7223
|
</ul>`};return[`<nav class="${J}" role="navigation" aria-label="${$}">`,'<div class="toc-container">',` <h2 class="toc-title">${$}</h2>`,` ${q(Z)}`,"</div>","</nav>"].join(`
|
|
@@ -7763,7 +7763,7 @@ else {
|
|
|
7763
7763
|
`)}function kZ(Q,Z,$){let Y=$.markdown?.meta?.["twitter:card"]||$.markdown?.meta?.twitterCard||"summary",J=$.markdown?.meta?.["twitter:site"]||$.markdown?.meta?.twitterSite,O=$.markdown?.meta?.["twitter:image"]||$.markdown?.meta?.twitterImage,q=[`<meta name="twitter:card" content="${Y}">`,`<meta name="twitter:title" content="${Q}">`,`<meta name="twitter:description" content="${Z}">`];if(J)q.push(`<meta name="twitter:site" content="${J}">`);if(O)q.push(`<meta name="twitter:image" content="${O}">`);return q.join(`
|
|
7764
7764
|
`)}function bZ(Q,Z,$,Y){let J=$.sitemap?.baseUrl;if(!J)return"";let O=J.replace(/\/$/,""),q=Y==="/index"?"/":Y,K=`${O}${q}`;if(q==="/"){let _={"@context":"https://schema.org","@type":"WebSite",name:$.title||$.markdown?.title||Q,description:Z,url:O};return`<script type="application/ld+json">
|
|
7765
7765
|
${JSON.stringify(_,null,2)}
|
|
7766
|
-
</script>`}let X={"@context":"https://schema.org","@type":"TechArticle",headline:Q,description:Z,url:K},z=q.split("/").filter(Boolean),V=z.map((_,G)=>{let
|
|
7766
|
+
</script>`}let X={"@context":"https://schema.org","@type":"TechArticle",headline:Q,description:Z,url:K},z=q.split("/").filter(Boolean),V=z.map((_,G)=>{let j=G+1,N=`${O}/${z.slice(0,j).join("/")}`;return{"@type":"ListItem",position:j,name:_.replace(/-/g," ").replace(/\b\w/g,(W)=>W.toUpperCase()),item:N}});if(V.length>0){let _={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:V};return`<script type="application/ld+json">
|
|
7767
7767
|
${JSON.stringify(X,null,2)}
|
|
7768
7768
|
</script>
|
|
7769
7769
|
<script type="application/ld+json">
|
|
@@ -7772,30 +7772,30 @@ ${JSON.stringify(_,null,2)}
|
|
|
7772
7772
|
${JSON.stringify(X,null,2)}
|
|
7773
7773
|
</script>`}function SZ(Q){let Z=Q.fonts;if(!Z)return{fontLinks:"",fontFaceCss:""};let $=[],Y=Z.google?.filter(Boolean)??[];if(Y.length>0){if(Z.preconnect!==!1)$.push('<link rel="preconnect" href="https://fonts.googleapis.com">'),$.push('<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>');let O=Y.map((K)=>`family=${K.trim().replace(/\s+/g,"+")}`).join("&"),q=Z.display??"swap";$.push(`<link href="https://fonts.googleapis.com/css2?${O}&display=${q}" rel="stylesheet">`)}let J=(Z.faces??[]).map((O)=>O.trim()).filter(Boolean).join(`
|
|
7774
7774
|
`);return{fontLinks:$.join(`
|
|
7775
|
-
`),fontFaceCss:J}}async function
|
|
7776
|
-
`),{fontLinks:
|
|
7777
|
-
`),
|
|
7778
|
-
`)||"",w=[W,
|
|
7779
|
-
`),L=HZ(Z),b=Z.darkMode??Z.themeConfig?.darkMode??"auto",S=b===!0||b==="dark"?"dark":b===!1||b==="light"?"light":"auto",p=S==="dark"?"dark":"";if(Y==="home"){let
|
|
7775
|
+
`),fontFaceCss:J}}async function hQ(Q,Z,$,Y="doc"){let J=Z.title||Z.themeConfig?.siteTitle||Z.markdown?.title||"BunPress Documentation",O=Z.description||Z.markdown?.meta?.description||"Documentation built with BunPress",q=Z.theme||"vitepress",K=CQ(q),X=AQ(),z=lQ.markdown?.css||"",V=Z.markdown?.css||"",_=V&&V!==z?V:"",G=yZ(Z,$),j=vZ(J,O,Z,$),N=kZ(J,O,Z),W=bZ(J,O,Z,$),E=Object.entries(Z.markdown?.meta||{}).filter(([I])=>!I.startsWith("og:")&&!I.startsWith("twitter:")&&I!=="description"&&I!=="ogImage"&&I!=="twitterCard"&&I!=="twitterSite"&&I!=="twitterImage").map(([I,k])=>`<meta name="${I}" content="${k}">`).join(`
|
|
7776
|
+
`),{fontLinks:U,fontFaceCss:F}=SZ(Z),A=[E,G,j,N,U].filter(Boolean).join(`
|
|
7777
|
+
`),B=CZ(Z),M=uZ(Z),T=Z.markdown?.scripts?.map((I)=>`<script>${I}</script>`).join(`
|
|
7778
|
+
`)||"",w=[W,B,M,T].filter(Boolean).join(`
|
|
7779
|
+
`),L=HZ(Z),b=Z.darkMode??Z.themeConfig?.darkMode??"auto",S=b===!0||b==="dark"?"dark":b===!1||b==="light"?"light":"auto",p=S==="dark"?"dark":"";if(Y==="home"){let I=await zQ(`${Q}
|
|
7780
7780
|
${L}`),k=`${F}
|
|
7781
7781
|
${K}
|
|
7782
7782
|
${X}
|
|
7783
|
-
${
|
|
7783
|
+
${I}
|
|
7784
7784
|
${z}
|
|
7785
|
-
${_}`,
|
|
7785
|
+
${_}`,x=await v("layout-home",{htmlClass:p,themeMode:S,title:J,description:O,meta:A,customCSS:k,nav:L,content:Q});return _Q(qQ(KQ(x,w)),Z)}if(Y==="page"){let I=await zQ(`${Q}
|
|
7786
7786
|
${L}`),k=`${F}
|
|
7787
7787
|
${K}
|
|
7788
7788
|
${X}
|
|
7789
|
-
${
|
|
7789
|
+
${I}
|
|
7790
7790
|
${z}
|
|
7791
|
-
${_}`,
|
|
7791
|
+
${_}`,x=await v("layout-page",{htmlClass:p,themeMode:S,title:J,description:O,meta:A,customCSS:k,nav:L,content:Q});return _Q(qQ(KQ(x,w)),Z)}let H=TZ(Q),D=await DZ(H),R=await wZ(Z,$),a=await zQ(`${H}
|
|
7792
7792
|
${L}
|
|
7793
7793
|
${R}`),m=`${F}
|
|
7794
7794
|
${K}
|
|
7795
7795
|
${X}
|
|
7796
|
-
${
|
|
7796
|
+
${a}
|
|
7797
7797
|
${z}
|
|
7798
|
-
${_}`,
|
|
7798
|
+
${_}`,o=await v("layout-doc",{htmlClass:p,themeMode:S,title:J,description:O,meta:A,customCSS:m,nav:L,sidebar:R,content:H,pageTOC:D});return _Q(qQ(KQ(o,w)),Z)}var s=null,gQ=!1;async function xZ(){if(gQ)return s;gQ=!0;try{s=await import("./chunk-mch0qmg4.js")}catch{s=null}return s}async function zQ(Q){let Z=await xZ();if(!Z)return"";let Y=new Z.Scanner([]).scanContent(Q);if(Y.size===0)return"";let J=new Z.CSSGenerator(Z.defaultConfig);for(let O of Y)J.generate(O);return J.toCSS(!1,!1)}function CZ(Q){if(!Q.fathom?.enabled||!Q.fathom?.siteId)return"";let Z=Q.fathom.scriptUrl||"https://cdn.usefathom.com/script.js",$=Q.fathom.defer!==!1,Y=Q.fathom.honorDNT||!1,J=Q.fathom.auto!==!1,O=Q.fathom.canonical,q=Q.fathom.spa||!1,K=[`data-site="${Q.fathom.siteId}"`,Y?'data-honor-dnt="true"':"",!J?'data-auto="false"':"",O?`data-canonical="${O}"`:"",q?'data-spa="auto"':""].filter(Boolean).join(" ");return`<script src="${Z}" ${K}${$?" defer":""}></script>`}function uZ(Q){let Z=Q.analytics||Q.selfHostedAnalytics;if(!Z?.enabled||!Z?.siteId)return"";let $=dQ(Z.siteId),Y=Z.apiEndpoint?dQ(Z.apiEndpoint):"",J=Z.honorDNT?`var dnt=n.doNotTrack||w.doNotTrack||n.msDoNotTrack;if(dnt==="1"||dnt==="yes"||dnt===true){l('DNT enabled, skipping');return;}`:"",O=Z.trackHashChanges?"w.addEventListener('hashchange',function(){pv();});":"",q=Z.trackOutboundLinks?`d.addEventListener('click',function(e){try{var a=e.target.closest('a');if(a&&a.hostname&&a.hostname!==location.hostname){t('outbound',{url:a.href,text:(a.textContent||'').slice(0,100)});}}
|
|
7799
7799
|
catch (err){l('Outbound error',err);}});`:"",K=Y?` data-api="${Y}"`:"";return`<!-- ts-analytics: privacy-first analytics -->
|
|
7800
7800
|
<script data-site="${$}"${K} defer>
|
|
7801
7801
|
(function(){
|
|
@@ -7860,36 +7860,36 @@ catch(err){if(w.console)console.error('[Analytics] Init error:',err);}
|
|
|
7860
7860
|
})();
|
|
7861
7861
|
</script>`}function dQ(Q){return Q.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function fZ(Q){let Z=Q.replace(/\r\n/g,`
|
|
7862
7862
|
`),$=/^---\n([\s\S]*?)\n---\n?/,Y=Z.match($);if(!Y)return{frontmatter:{},content:Z};let J=Y[1],O=Z.slice(Y[0].length);try{return{frontmatter:pQ.parse(J),content:O}}catch{try{let q=J.replace(/^(\s*\w+:\s*)"(.+)",\s*(.+)$/gm,`$1'"$2," $3'`);return{frontmatter:pQ.parse(q),content:O}}catch(q){return console.error("Failed to parse frontmatter YAML:",q),{frontmatter:{},content:Q}}}}async function pZ(Q){if(!Q)return"";let Z=Q.name?`<p class="BPHero-name">${Q.name}</p>`:"",$=Q.text?`<h1 class="BPHero-text">${Q.text}</h1>`:"",Y=Q.tagline?`<p class="BPHero-tagline">${Q.tagline}</p>`:"",J="";if(Q.actions)J=`<div class="BPHero-actions">${Q.actions.map((K)=>{return`<a class="${K.theme==="brand"?"BPButton BPButton-brand":"BPButton BPButton-alt"}" href="${K.link}">${K.text}</a>`}).join(`
|
|
7863
|
-
`)}</div>`;let O=Q.image?`<div class="hero-image"><img src="${Q.image}" alt="${Q.name||""}" /></div>`:"";return await v("hero",{name:Z,text:$,tagline:Y,actions:J,image:O})}var mZ={Fast:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>',Shield:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>',Blade:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>',Tools:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>',Components:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>',Stream:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 12h6l3-9 3 18 3-9h5"/></svg>',Desktop:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="3" width="20" height="14" rx="2"/><path d="M8 21h8m-4-4v4"/></svg>',Parser:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M16 18l6-6-6-6M8 6l-6 6 6 6"/></svg>',Icons:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="4"/><path d="M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"/></svg>'};function
|
|
7863
|
+
`)}</div>`;let O=Q.image?`<div class="hero-image"><img src="${Q.image}" alt="${Q.name||""}" /></div>`:"";return await v("hero",{name:Z,text:$,tagline:Y,actions:J,image:O})}var mZ={Fast:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>',Shield:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>',Blade:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>',Tools:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>',Components:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>',Stream:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 12h6l3-9 3 18 3-9h5"/></svg>',Desktop:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="3" width="20" height="14" rx="2"/><path d="M8 21h8m-4-4v4"/></svg>',Parser:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M16 18l6-6-6-6M8 6l-6 6 6 6"/></svg>',Icons:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="4"/><path d="M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"/></svg>'};function hZ(Q){if(Q.startsWith("<")||/\p{Emoji}/u.test(Q))return Q;return mZ[Q]||`<span class="BPFeature-icon-text">${Q.charAt(0)}</span>`}async function gZ(Q){if(!Q||Q.length===0)return"";let Z=Q.map(($)=>{let Y=$.icon?hZ($.icon):"",J=Y?`<div class="BPFeature-icon">${Y}</div>`:"",O=$.link,q=O?"a":"div",K=O?` href="${O}"`:"";return`
|
|
7864
7864
|
<${q} class="BPFeature"${K}>
|
|
7865
7865
|
${J}
|
|
7866
7866
|
<h3 class="BPFeature-title">${$.title||""}</h3>
|
|
7867
7867
|
<p class="BPFeature-details">${$.details||""}</p>
|
|
7868
|
-
</${q}>`}).join("");return await v("features",{items:Z})}function sQ(Q){return Q.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/__(.+?)__/g,"<strong>$1</strong>").replace(/~~(.+?)~~/g,"<del>$1</del>").replace(/==(.+?)==/g,"<mark>$1</mark>").replace(/\^(.+?)\^/g,"<sup>$1</sup>").replace(/`(.+?)`/g,"<code>$1</code>").replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"<em>$1</em>").replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"<em>$1</em>").replace(/(?<!~)~(?!~)(.+?)(?<!~)~(?!~)/g,"<sub>$1</sub>").replace(/!\[([^\]]*)\]\(\s*([^\s")]+)(?:\s+"([^"]+)")?\)/g,(Z,$,Y,J)=>{if(J)return`<figure class="image-figure"><img src="${Y}" alt="${$}" loading="lazy" decoding="async"><figcaption>${J}</figcaption></figure>`;else return`<img src="${Y}" alt="${$}" loading="lazy" decoding="async">`}).replace(/\[(.+?)\]\((.+?)\)/g,'<a href="$2">$1</a>')}function dZ(Q){let Z={smile:"\uD83D\uDE04",laughing:"\uD83D\uDE06",blush:"\uD83D\uDE0A",heart_eyes:"\uD83D\uDE0D",kissing_heart:"\uD83D\uDE18",relaxed:"\u263A\uFE0F",wink:"\uD83D\uDE09",grin:"\uD83D\uDE01",joy:"\uD83D\uDE02",sweat_smile:"\uD83D\uDE05",rofl:"\uD83E\uDD23",thinking:"\uD83E\uDD14",zipper_mouth:"\uD83E\uDD10",neutral_face:"\uD83D\uDE10",expressionless:"\uD83D\uDE11",confused:"\uD83D\uDE15",worried:"\uD83D\uDE1F",slightly_frowning_face:"\uD83D\uDE41",frowning_face:"\u2639\uFE0F",persevere:"\uD83D\uDE23",disappointed:"\uD83D\uDE1E",sweat:"\uD83D\uDE13",tired_face:"\uD83D\uDE2B",cry:"\uD83D\uDE22",sob:"\uD83D\uDE2D",triumph:"\uD83D\uDE24",angry:"\uD83D\uDE20",rage:"\uD83D\uDE21",no_mouth:"\uD83D\uDE36",sleeping:"\uD83D\uDE34","+1":"\uD83D\uDC4D",thumbsup:"\uD83D\uDC4D","-1":"\uD83D\uDC4E",thumbsdown:"\uD83D\uDC4E",clap:"\uD83D\uDC4F",raised_hands:"\uD83D\uDE4C",pray:"\uD83D\uDE4F",wave:"\uD83D\uDC4B",ok_hand:"\uD83D\uDC4C",point_up:"\u261D\uFE0F",point_down:"\uD83D\uDC47",point_left:"\uD83D\uDC48",point_right:"\uD83D\uDC49",muscle:"\uD83D\uDCAA",heart:"\u2764\uFE0F",blue_heart:"\uD83D\uDC99",green_heart:"\uD83D\uDC9A",yellow_heart:"\uD83D\uDC9B",purple_heart:"\uD83D\uDC9C",broken_heart:"\uD83D\uDC94",sparkling_heart:"\uD83D\uDC96",star:"\u2B50",star2:"\uD83C\uDF1F",sparkles:"\u2728",boom:"\uD83D\uDCA5",fire:"\uD83D\uDD25",tada:"\uD83C\uDF89",confetti_ball:"\uD83C\uDF8A",rocket:"\uD83D\uDE80",zap:"\u26A1",bulb:"\uD83D\uDCA1",bell:"\uD83D\uDD14",mega:"\uD83D\uDCE3",loudspeaker:"\uD83D\uDCE2",warning:"\u26A0\uFE0F",white_check_mark:"\u2705",check:"\u2705",x:"\u274C",heavy_check_mark:"\u2714\uFE0F",heavy_multiplication_x:"\u2716\uFE0F",question:"\u2753",grey_question:"\u2754",exclamation:"\u2757",grey_exclamation:"\u2755",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",pencil2:"\u270F\uFE0F",memo:"\uD83D\uDCDD",book:"\uD83D\uDCD6",books:"\uD83D\uDCDA",bookmark:"\uD83D\uDD16",mag:"\uD83D\uDD0D",mag_right:"\uD83D\uDD0E",lock:"\uD83D\uDD12",unlock:"\uD83D\uDD13",key:"\uD83D\uDD11",link:"\uD83D\uDD17",computer:"\uD83D\uDCBB",email:"\uD83D\uDCE7",inbox_tray:"\uD83D\uDCE5",outbox_tray:"\uD83D\uDCE4",package:"\uD83D\uDCE6",file_folder:"\uD83D\uDCC1",open_file_folder:"\uD83D\uDCC2",page_facing_up:"\uD83D\uDCC4",calendar:"\uD83D\uDCC5",chart_with_upwards_trend:"\uD83D\uDCC8",chart_with_downwards_trend:"\uD83D\uDCC9",bar_chart:"\uD83D\uDCCA",clipboard:"\uD83D\uDCCB",pushpin:"\uD83D\uDCCC",round_pushpin:"\uD83D\uDCCD",paperclip:"\uD83D\uDCCE",straight_ruler:"\uD83D\uDCCF",wrench:"\uD83D\uDD27",hammer:"\uD83D\uDD28",gear:"\u2699\uFE0F",nut_and_bolt:"\uD83D\uDD29",seedling:"\uD83C\uDF31",evergreen_tree:"\uD83C\uDF32",deciduous_tree:"\uD83C\uDF33",palm_tree:"\uD83C\uDF34",cactus:"\uD83C\uDF35",herb:"\uD83C\uDF3F",shamrock:"\u2618\uFE0F",four_leaf_clover:"\uD83C\uDF40",bug:"\uD83D\uDC1B",bee:"\uD83D\uDC1D",bird:"\uD83D\uDC26",dog:"\uD83D\uDC36",cat:"\uD83D\uDC31",penguin:"\uD83D\uDC27",turtle:"\uD83D\uDC22",fish:"\uD83D\uDC1F",coffee:"\u2615",tea:"\uD83C\uDF75",beer:"\uD83C\uDF7A",beers:"\uD83C\uDF7B",wine_glass:"\uD83C\uDF77",pizza:"\uD83C\uDF55",hamburger:"\uD83C\uDF54",fries:"\uD83C\uDF5F",cake:"\uD83C\uDF70",birthday:"\uD83C\uDF82",cookie:"\uD83C\uDF6A",doughnut:"\uD83C\uDF69",apple:"\uD83C\uDF4E",green_apple:"\uD83C\uDF4F",banana:"\uD83C\uDF4C",strawberry:"\uD83C\uDF53",house:"\uD83C\uDFE0",office:"\uD83C\uDFE2",hospital:"\uD83C\uDFE5",school:"\uD83C\uDFEB",car:"\uD83D\uDE97",taxi:"\uD83D\uDE95",bus:"\uD83D\uDE8C",train:"\uD83D\uDE82",airplane:"\u2708\uFE0F",ship:"\uD83D\uDEA2",bike:"\uD83D\uDEB2",soccer:"\u26BD",basketball:"\uD83C\uDFC0",football:"\uD83C\uDFC8",baseball:"\u26BE",tennis:"\uD83C\uDFBE",trophy:"\uD83C\uDFC6",medal:"\uD83C\uDFC5",dart:"\uD83C\uDFAF",game_die:"\uD83C\uDFB2",musical_note:"\uD83C\uDFB5",notes:"\uD83C\uDFB6",art:"\uD83C\uDFA8",camera:"\uD83D\uDCF7",movie_camera:"\uD83C\uDFA5",checkered_flag:"\uD83C\uDFC1",triangular_flag_on_post:"\uD83D\uDEA9",flag_us:"\uD83C\uDDFA\uD83C\uDDF8",flag_gb:"\uD83C\uDDEC\uD83C\uDDE7",flag_fr:"\uD83C\uDDEB\uD83C\uDDF7",flag_de:"\uD83C\uDDE9\uD83C\uDDEA",flag_jp:"\uD83C\uDDEF\uD83C\uDDF5",flag_cn:"\uD83C\uDDE8\uD83C\uDDF3"};return Q.replace(/:(\w+):/g,($,Y)=>{return Z[Y]||$})}function cZ(Q){let Z=/<Badge([^/>]+)\/>/gi;return Q.replace(Z,($,Y)=>{let J=Y.match(/type="(info|tip|warning|danger)"/i),O=Y.match(/text="([^"]+)"/),q=J?J[1].toLowerCase():"info",K=O?O[1]:"";return`<span class="badge badge-${q}">${K}</span>`})}function lZ(Q){return Q.replace(/<a\s+href="([^"]+)"([^>]*)>/g,(Z,$,Y)=>{if(Y.includes("target="))return Z;if($.startsWith("http://")||$.startsWith("https://"))return`<a href="${$}" target="_blank" rel="noreferrer noopener"${Y}>`;return Z})}function rZ(Q){return Q.replace(/<a\s+href="([^"]+)"\s+target="_blank"[^>]*>[\s\S]+?<\/a>/g,(Z,$)=>{if(Z.includes("external-link-icon"))return Z;let Y='<svg class="external-link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>';return Z.replace("</a>",`${Y}</a>`)})}function sZ(Q){return Q.replace(/<img([^>]+)>/g,(Z,$)=>{if($.includes("loading="))return Z;return`<img ${$} loading="lazy" decoding="async">`})}function iZ(Q,Z){if(!Q.includes("[[toc]]"))return{content:Q,tocHtml:null};let $=YQ(Q),Y={...$Q,...Z},J=XQ($,Y),q={items:OQ(J),title:Y.title||"Table of Contents",config:Y},K=r(q),X="<!--INLINE_TOC_PLACEHOLDER-->";return{content:Q.replace(/\[\[toc\]\]/g,X),tocHtml:K}}function
|
|
7868
|
+
</${q}>`}).join("");return await v("features",{items:Z})}function sQ(Q){return Q.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/__(.+?)__/g,"<strong>$1</strong>").replace(/~~(.+?)~~/g,"<del>$1</del>").replace(/==(.+?)==/g,"<mark>$1</mark>").replace(/\^(.+?)\^/g,"<sup>$1</sup>").replace(/`(.+?)`/g,"<code>$1</code>").replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"<em>$1</em>").replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"<em>$1</em>").replace(/(?<!~)~(?!~)(.+?)(?<!~)~(?!~)/g,"<sub>$1</sub>").replace(/!\[([^\]]*)\]\(\s*([^\s")]+)(?:\s+"([^"]+)")?\)/g,(Z,$,Y,J)=>{if(J)return`<figure class="image-figure"><img src="${Y}" alt="${$}" loading="lazy" decoding="async"><figcaption>${J}</figcaption></figure>`;else return`<img src="${Y}" alt="${$}" loading="lazy" decoding="async">`}).replace(/\[(.+?)\]\((.+?)\)/g,'<a href="$2">$1</a>')}function dZ(Q){let Z={smile:"\uD83D\uDE04",laughing:"\uD83D\uDE06",blush:"\uD83D\uDE0A",heart_eyes:"\uD83D\uDE0D",kissing_heart:"\uD83D\uDE18",relaxed:"\u263A\uFE0F",wink:"\uD83D\uDE09",grin:"\uD83D\uDE01",joy:"\uD83D\uDE02",sweat_smile:"\uD83D\uDE05",rofl:"\uD83E\uDD23",thinking:"\uD83E\uDD14",zipper_mouth:"\uD83E\uDD10",neutral_face:"\uD83D\uDE10",expressionless:"\uD83D\uDE11",confused:"\uD83D\uDE15",worried:"\uD83D\uDE1F",slightly_frowning_face:"\uD83D\uDE41",frowning_face:"\u2639\uFE0F",persevere:"\uD83D\uDE23",disappointed:"\uD83D\uDE1E",sweat:"\uD83D\uDE13",tired_face:"\uD83D\uDE2B",cry:"\uD83D\uDE22",sob:"\uD83D\uDE2D",triumph:"\uD83D\uDE24",angry:"\uD83D\uDE20",rage:"\uD83D\uDE21",no_mouth:"\uD83D\uDE36",sleeping:"\uD83D\uDE34","+1":"\uD83D\uDC4D",thumbsup:"\uD83D\uDC4D","-1":"\uD83D\uDC4E",thumbsdown:"\uD83D\uDC4E",clap:"\uD83D\uDC4F",raised_hands:"\uD83D\uDE4C",pray:"\uD83D\uDE4F",wave:"\uD83D\uDC4B",ok_hand:"\uD83D\uDC4C",point_up:"\u261D\uFE0F",point_down:"\uD83D\uDC47",point_left:"\uD83D\uDC48",point_right:"\uD83D\uDC49",muscle:"\uD83D\uDCAA",heart:"\u2764\uFE0F",blue_heart:"\uD83D\uDC99",green_heart:"\uD83D\uDC9A",yellow_heart:"\uD83D\uDC9B",purple_heart:"\uD83D\uDC9C",broken_heart:"\uD83D\uDC94",sparkling_heart:"\uD83D\uDC96",star:"\u2B50",star2:"\uD83C\uDF1F",sparkles:"\u2728",boom:"\uD83D\uDCA5",fire:"\uD83D\uDD25",tada:"\uD83C\uDF89",confetti_ball:"\uD83C\uDF8A",rocket:"\uD83D\uDE80",zap:"\u26A1",bulb:"\uD83D\uDCA1",bell:"\uD83D\uDD14",mega:"\uD83D\uDCE3",loudspeaker:"\uD83D\uDCE2",warning:"\u26A0\uFE0F",white_check_mark:"\u2705",check:"\u2705",x:"\u274C",heavy_check_mark:"\u2714\uFE0F",heavy_multiplication_x:"\u2716\uFE0F",question:"\u2753",grey_question:"\u2754",exclamation:"\u2757",grey_exclamation:"\u2755",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",pencil2:"\u270F\uFE0F",memo:"\uD83D\uDCDD",book:"\uD83D\uDCD6",books:"\uD83D\uDCDA",bookmark:"\uD83D\uDD16",mag:"\uD83D\uDD0D",mag_right:"\uD83D\uDD0E",lock:"\uD83D\uDD12",unlock:"\uD83D\uDD13",key:"\uD83D\uDD11",link:"\uD83D\uDD17",computer:"\uD83D\uDCBB",email:"\uD83D\uDCE7",inbox_tray:"\uD83D\uDCE5",outbox_tray:"\uD83D\uDCE4",package:"\uD83D\uDCE6",file_folder:"\uD83D\uDCC1",open_file_folder:"\uD83D\uDCC2",page_facing_up:"\uD83D\uDCC4",calendar:"\uD83D\uDCC5",chart_with_upwards_trend:"\uD83D\uDCC8",chart_with_downwards_trend:"\uD83D\uDCC9",bar_chart:"\uD83D\uDCCA",clipboard:"\uD83D\uDCCB",pushpin:"\uD83D\uDCCC",round_pushpin:"\uD83D\uDCCD",paperclip:"\uD83D\uDCCE",straight_ruler:"\uD83D\uDCCF",wrench:"\uD83D\uDD27",hammer:"\uD83D\uDD28",gear:"\u2699\uFE0F",nut_and_bolt:"\uD83D\uDD29",seedling:"\uD83C\uDF31",evergreen_tree:"\uD83C\uDF32",deciduous_tree:"\uD83C\uDF33",palm_tree:"\uD83C\uDF34",cactus:"\uD83C\uDF35",herb:"\uD83C\uDF3F",shamrock:"\u2618\uFE0F",four_leaf_clover:"\uD83C\uDF40",bug:"\uD83D\uDC1B",bee:"\uD83D\uDC1D",bird:"\uD83D\uDC26",dog:"\uD83D\uDC36",cat:"\uD83D\uDC31",penguin:"\uD83D\uDC27",turtle:"\uD83D\uDC22",fish:"\uD83D\uDC1F",coffee:"\u2615",tea:"\uD83C\uDF75",beer:"\uD83C\uDF7A",beers:"\uD83C\uDF7B",wine_glass:"\uD83C\uDF77",pizza:"\uD83C\uDF55",hamburger:"\uD83C\uDF54",fries:"\uD83C\uDF5F",cake:"\uD83C\uDF70",birthday:"\uD83C\uDF82",cookie:"\uD83C\uDF6A",doughnut:"\uD83C\uDF69",apple:"\uD83C\uDF4E",green_apple:"\uD83C\uDF4F",banana:"\uD83C\uDF4C",strawberry:"\uD83C\uDF53",house:"\uD83C\uDFE0",office:"\uD83C\uDFE2",hospital:"\uD83C\uDFE5",school:"\uD83C\uDFEB",car:"\uD83D\uDE97",taxi:"\uD83D\uDE95",bus:"\uD83D\uDE8C",train:"\uD83D\uDE82",airplane:"\u2708\uFE0F",ship:"\uD83D\uDEA2",bike:"\uD83D\uDEB2",soccer:"\u26BD",basketball:"\uD83C\uDFC0",football:"\uD83C\uDFC8",baseball:"\u26BE",tennis:"\uD83C\uDFBE",trophy:"\uD83C\uDFC6",medal:"\uD83C\uDFC5",dart:"\uD83C\uDFAF",game_die:"\uD83C\uDFB2",musical_note:"\uD83C\uDFB5",notes:"\uD83C\uDFB6",art:"\uD83C\uDFA8",camera:"\uD83D\uDCF7",movie_camera:"\uD83C\uDFA5",checkered_flag:"\uD83C\uDFC1",triangular_flag_on_post:"\uD83D\uDEA9",flag_us:"\uD83C\uDDFA\uD83C\uDDF8",flag_gb:"\uD83C\uDDEC\uD83C\uDDE7",flag_fr:"\uD83C\uDDEB\uD83C\uDDF7",flag_de:"\uD83C\uDDE9\uD83C\uDDEA",flag_jp:"\uD83C\uDDEF\uD83C\uDDF5",flag_cn:"\uD83C\uDDE8\uD83C\uDDF3"};return Q.replace(/:(\w+):/g,($,Y)=>{return Z[Y]||$})}function cZ(Q){let Z=/<Badge([^/>]+)\/>/gi;return Q.replace(Z,($,Y)=>{let J=Y.match(/type="(info|tip|warning|danger)"/i),O=Y.match(/text="([^"]+)"/),q=J?J[1].toLowerCase():"info",K=O?O[1]:"";return`<span class="badge badge-${q}">${K}</span>`})}function lZ(Q){return Q.replace(/<a\s+href="([^"]+)"([^>]*)>/g,(Z,$,Y)=>{if(Y.includes("target="))return Z;if($.startsWith("http://")||$.startsWith("https://"))return`<a href="${$}" target="_blank" rel="noreferrer noopener"${Y}>`;return Z})}function rZ(Q){return Q.replace(/<a\s+href="([^"]+)"\s+target="_blank"[^>]*>[\s\S]+?<\/a>/g,(Z,$)=>{if(Z.includes("external-link-icon"))return Z;let Y='<svg class="external-link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>';return Z.replace("</a>",`${Y}</a>`)})}function sZ(Q){return Q.replace(/<img([^>]+)>/g,(Z,$)=>{if($.includes("loading="))return Z;return`<img ${$} loading="lazy" decoding="async">`})}function iZ(Q,Z){if(!Q.includes("[[toc]]"))return{content:Q,tocHtml:null};let $=YQ(Q),Y={...$Q,...Z},J=XQ($,Y),q={items:OQ(J),title:Y.title||"Table of Contents",config:Y},K=r(q),X="<!--INLINE_TOC_PLACEHOLDER-->";return{content:Q.replace(/\[\[toc\]\]/g,X),tocHtml:K}}function aZ(Q,Z){return Q.replace(/<!--INLINE_TOC_PLACEHOLDER-->/g,Z)}async function oZ(Q){let Z=/^>\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*\n((?:>\s*.*\n?)*)/gm,$=Array.from(Q.matchAll(Z)),Y=Q;for(let J of $.reverse()){let[O,q,K]=J,X=K.split(`
|
|
7869
7869
|
`).map((_)=>_.replace(/^>\s*/,"")).filter((_)=>_.trim()).map((_)=>`<p>${sQ(_)}</p>`).join(`
|
|
7870
|
-
`),z=q.toLowerCase(),V=await v(`blocks/alerts/${z}`,{content:X});Y=Y.slice(0,J.index)+V+Y.slice(J.index+O.length)}return Y}async function nZ(Q,Z){let $=/^<<<\s+@\/([^\s[{#]+)(?:\{(\d+)-(\d+)\}|#(\w+))?\s*(?:\[[^\]]+\]\s*)?$/gm,Y=Array.from(Q.matchAll($)),J=Q;for(let O of Y.reverse()){let[q,K,X,z,V]=O;try{let{join:_}=await import("path"),G=_(Z,K),
|
|
7871
|
-
`),E=K.split(".").pop()||"",F={js:"javascript",ts:"typescript",jsx:"jsx",tsx:"tsx",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",cs:"csharp",php:"php",sh:"bash",bash:"bash",yaml:"yaml",yml:"yaml",json:"json",md:"markdown",html:"html",css:"css",scss:"scss",vue:"vue"}[E]||E;if(X&&z){let
|
|
7872
|
-
`),
|
|
7873
|
-
${
|
|
7874
|
-
\`\`\``;J=J.slice(0,O.index)+
|
|
7875
|
-
`);if(z&&V){let
|
|
7876
|
-
`),
|
|
7877
|
-
${
|
|
7870
|
+
`),z=q.toLowerCase(),V=await v(`blocks/alerts/${z}`,{content:X});Y=Y.slice(0,J.index)+V+Y.slice(J.index+O.length)}return Y}async function nZ(Q,Z){let $=/^<<<\s+@\/([^\s[{#]+)(?:\{(\d+)-(\d+)\}|#(\w+))?\s*(?:\[[^\]]+\]\s*)?$/gm,Y=Array.from(Q.matchAll($)),J=Q;for(let O of Y.reverse()){let[q,K,X,z,V]=O;try{let{join:_}=await import("path"),G=_(Z,K),j=Bun.file(G);if(!await j.exists()){console.warn(`Code import: File not found: ${G}`);continue}let W=(await j.text()).split(`
|
|
7871
|
+
`),E=K.split(".").pop()||"",F={js:"javascript",ts:"typescript",jsx:"jsx",tsx:"tsx",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",cs:"csharp",php:"php",sh:"bash",bash:"bash",yaml:"yaml",yml:"yaml",json:"json",md:"markdown",html:"html",css:"css",scss:"scss",vue:"vue"}[E]||E;if(X&&z){let M=Number.parseInt(X)-1,T=Number.parseInt(z);W=W.slice(M,T)}else if(V){let M=W.findIndex((w)=>w.includes(`#region ${V}`)||w.includes(`// region ${V}`)||w.includes(`# region ${V}`)),T=W.findIndex((w,L)=>L>M&&(w.includes("#endregion")||w.includes("// endregion")||w.includes("# endregion")));if(M!==-1&&T!==-1)W=W.slice(M+1,T);else console.warn(`Code import: Region '${V}' not found in ${K}`)}let A=W.join(`
|
|
7872
|
+
`),B=`\`\`\`${F}
|
|
7873
|
+
${A}
|
|
7874
|
+
\`\`\``;J=J.slice(0,O.index)+B+J.slice(O.index+q.length)}catch(_){console.error(`Error importing code from ${K}:`,_)}}return J}async function iQ(Q,Z,$=new Set){let Y=/<!--@include:\s*([^\s{]+)(?:\{(\d+)-(\d+)\}|\{#([\w-]+)\})?\s*-->/g,J=Array.from(Q.matchAll(Y)),O=Q;for(let q of J.reverse()){let[K,X,z,V,_]=q;try{let{join:G,resolve:j}=await import("path"),N=j(G(Z,X));if($.has(N)){console.warn(`Markdown include: Circular reference detected for ${X}`);continue}let W=Bun.file(N);if(!await W.exists()){console.warn(`Markdown include: File not found: ${N}`);continue}let U=(await W.text()).split(`
|
|
7875
|
+
`);if(z&&V){let B=Number.parseInt(z)-1,M=Number.parseInt(V);U=U.slice(B,M)}else if(_){let B=U.findIndex((T)=>T.includes(`<!-- #region ${_} -->`)||T.includes(`<!-- region ${_} -->`)),M=U.findIndex((T,w)=>w>B&&(T.includes("<!-- #endregion -->")||T.includes("<!-- endregion -->")));if(B!==-1&&M!==-1)U=U.slice(B+1,M);else{console.warn(`Markdown include: Region '${_}' not found in ${X}`);continue}}let F=U.join(`
|
|
7876
|
+
`),A=new Set($);A.add(N),F=await iQ(F,Z,A),O=O.slice(0,q.index)+F+O.slice(q.index+K.length)}catch(G){console.error(`Error including markdown from ${X}:`,G)}}return O}async function tZ(Q){let Z=/^:::\s+code-group[ \t]*\n((?:(?!^:::)[\s\S])*)^:::$/gm,$=Array.from(Q.matchAll(Z)),Y=Q;for(let J of $.reverse()){let[O,q]=J,K=/^```(\w+)[ \t]+\[([^\]]+)\][ \t]*\n((?:(?!^```)[\s\S])*)^```$/gm,X=Array.from(q.matchAll(K));if(X.length===0)continue;let z=`code-group-${Math.random().toString(36).substr(2,9)}`,V=X.map((j,N)=>{let W=j[2];return`<button class="code-group-tab${N===0?" active":""}" onclick="switchCodeTab('${z}', ${N})">${W}</button>`}).join(""),_=await Promise.all(X.map(async(j,N)=>{let W=j[1],E=j[3],U=N===0,F=P.markdown?.syntaxHighlightTheme||"github-light",A=await t(E,W,F),B=`<pre data-lang="${W}"><code class="language-${W}">${A}</code></pre>`;return`<div class="code-group-panel${U?" active":""}" data-panel="${N}">
|
|
7877
|
+
${B}
|
|
7878
7878
|
</div>`})),G=[`<div class="code-group" id="${z}">`,' <div class="code-group-tabs">',` ${V}`," </div>",' <div class="code-group-panels">',` ${_.join(`
|
|
7879
7879
|
`)}`," </div>","</div>"].join(`
|
|
7880
7880
|
`);Y=Y.slice(0,J.index)+G+Y.slice(J.index+O.length)}return Y}async function eZ(Q){let Z=/^:::\s+(info|tip|warning|danger|details|raw)(?: +([^\n\t ][^\n]*))?\n((?:(?!^:::)[\s\S])*)^:::$/gm,$=Array.from(Q.matchAll(Z)),Y=Q;for(let J of $.reverse()){let[O,q,K,X]=J,z={info:"INFO",tip:"TIP",warning:"WARNING",danger:"DANGER",details:"Details",raw:""},V=K&&K.trim()||z[q],_=X.trim().split(`
|
|
7881
|
-
`).filter((
|
|
7882
|
-
`),G=await v(`blocks/containers/${q}`,{title:V,content:_});Y=Y.slice(0,J.index)+G+Y.slice(J.index+O.length)}return Y}function Q0(Q){let Z=Q.match(/^(\w+)/),$=Z?Z[1]:"",Y=Q.match(/\{([^}]+)\}/),J=[];if(Y){let q=Y[1].split(",");for(let K of q){let X=K.trim();if(X.includes("-")){let[z,V]=X.split("-").map(Number);for(let _=z;_<=V;_++)J.push(_)}else J.push(Number(X))}}let O=Q.includes(":line-numbers");return{lang:$,highlights:J,showLineNumbers:O}}async function Z0(Q,Z){let $=Q[Z],Y=$.match(/^(`{3,})/),J=Y?Y[1].length:3,O="`".repeat(J),q=$.substring(J).trim(),{lang:K,highlights:X,showLineNumbers:z}=Q0(q),V=[],_=Z+1;while(_<Q.length){let H=Q[_];if(H.match(new RegExp(`^\`{${J},}\\s*$`)))break;V.push(H),_++}let G=new Set,
|
|
7883
|
-
`),
|
|
7884
|
-
`).map((H,D)=>{let R=D+1,
|
|
7881
|
+
`).filter((j)=>j.trim()).map((j)=>`<p>${sQ(j)}</p>`).join(`
|
|
7882
|
+
`),G=await v(`blocks/containers/${q}`,{title:V,content:_});Y=Y.slice(0,J.index)+G+Y.slice(J.index+O.length)}return Y}function Q0(Q){let Z=Q.match(/^(\w+)/),$=Z?Z[1]:"",Y=Q.match(/\{([^}]+)\}/),J=[];if(Y){let q=Y[1].split(",");for(let K of q){let X=K.trim();if(X.includes("-")){let[z,V]=X.split("-").map(Number);for(let _=z;_<=V;_++)J.push(_)}else J.push(Number(X))}}let O=Q.includes(":line-numbers");return{lang:$,highlights:J,showLineNumbers:O}}async function Z0(Q,Z){let $=Q[Z],Y=$.match(/^(`{3,})/),J=Y?Y[1].length:3,O="`".repeat(J),q=$.substring(J).trim(),{lang:K,highlights:X,showLineNumbers:z}=Q0(q),V=[],_=Z+1;while(_<Q.length){let H=Q[_];if(H.match(new RegExp(`^\`{${J},}\\s*$`)))break;V.push(H),_++}let G=new Set,j=new Set,N=new Set,W=new Set,E=new Set,U=V.map((H,D)=>{let R=H;if(R.includes("// [!code focus]"))G.add(D),R=R.replace(/\/\/ \[!code focus\]/,"").trimEnd();if(R.includes("// [!code ++]"))j.add(D),R=R.replace(/\/\/ \[!code \+\+\]/,"").trimEnd();if(R.includes("// [!code --]"))N.add(D),R=R.replace(/\/\/ \[!code --\]/,"").trimEnd();if(R.includes("// [!code error]"))W.add(D),R=R.replace(/\/\/ \[!code error\]/,"").trimEnd();if(R.includes("// [!code warning]"))E.add(D),R=R.replace(/\/\/ \[!code warning\]/,"").trimEnd();return R}),F=G.size>0,A=U.join(`
|
|
7883
|
+
`),B=P.markdown?.syntaxHighlightTheme||"github-light",w=(await t(A,K,B)).split(`
|
|
7884
|
+
`).map((H,D)=>{let R=D+1,a=X.includes(R),m=G.has(D),o=j.has(D),I=N.has(D),k=W.has(D),x=E.has(D),y=["line"];if(a)y.push("highlighted");if(m)y.push("focused");if(F&&!m)y.push("dimmed");if(o)y.push("diff-add");if(I)y.push("diff-remove");if(k)y.push("has-error");if(x)y.push("has-warning");if(H.startsWith('<span class="line">')){let aQ=y.join(" "),GQ=H.replace('<span class="line">',`<span class="${aQ}">`);if(z)return`<span class="${y.join(" ")}"><span class="line-number">${R}</span>${GQ.replace(/^<span class="[^"]*">/,"").replace(/<\/span>$/,"")}</span>`;return GQ}let WQ=y.length>0?` class="${y.join(" ")}"`:"";if(z)return`<span${WQ}><span class="line-number">${R}</span>${H}</span>`;return`<span${WQ}>${H}</span>`}).join(`
|
|
7885
7885
|
`),L=[];if(z)L.push("line-numbers-mode");if(F)L.push("has-focused-lines");let b=L.length>0?` class="${L.join(" ")}"`:"",S=K?` data-lang="${K}"`:"";return{html:`<pre${b}${S}><code class="language-${K}">${w}</code></pre>`,endIndex:_}}function $0(Q){let Z=new Map;return{content:Q.replace(/^(#{1,6})\s+(.*?)\s*\{#([\w-]+)\}\s*$/gm,(Y,J,O,q)=>{let K=O.trim().replace(/`([^`]+)`/g,"$1").replace(/\*\*(.+?)\*\*/g,"$1").replace(/__(.+?)__/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/_(.+?)_/g,"$1").replace(/~~(.+?)~~/g,"$1").trim();return Z.set(K,q),`${J} ${O.trim()}`}),customAnchors:Z}}async function J0(Q,Z){let $=Q.split(`
|
|
7886
7886
|
`),Y=[],J=0,O=0;while(J<$.length){let q=$[J];if(q.match(/^`{3,}/)){let{html:K,endIndex:X}=await Z0($,J),z=`<!--BUNPRESS_CODE_${O++}-->`;Z.set(z,K),Y.push(""),Y.push(z),Y.push(""),J=X+1}else Y.push(q),J++}return Y.join(`
|
|
7887
7887
|
`)}function Y0(Q){return Q=Q.replace(/==(.+?)==/g,"<mark>$1</mark>"),Q=Q.replace(/\^(.+?)\^/g,"<sup>$1</sup>"),Q=Q.replace(/(?<!~)~(?!~)(.+?)(?<!~)~(?!~)/g,"<sub>$1</sub>"),Q}function O0(Q){return Q=Q.replace(/<table>/g,`<div class="table-responsive">
|
|
7888
7888
|
<table class="enhanced-table">`),Q=Q.replace(/<\/table>/g,`</table>
|
|
7889
|
-
</div>`),Q=Q.replace(/<(th|td) align="(left|center|right)">/g,(Z,$,Y)=>{return`<${$} style="text-align: ${Y}">`}),Q=Q.replace(/<(th|td)>/g,(Z,$)=>{return`<${$} style="text-align: left">`}),Q}function X0(Q,Z){let $=new Set;return Q.replace(/<h([1-6])([^>]*)>([\s\S]*?)<\/h\1>/g,(Y,J,O,q)=>{if(O.includes(" id="))return Y;let K=q.replace(/<[^>]+>/g,"").trim(),X=Z.get(K);if(!X)X=JQ(K);if($.has(X)){let z=1;while($.has(`${X}-${z}`))z++;X=`${X}-${z}`}return $.add(X),`<h${J} id="${X}"${O}>${q}</h${J}>`})}async function q0(Q,Z="./docs"){let{frontmatter:$,content:Y}=fZ(Q);if($.layout==="home"){let O=await pZ($.hero),q=await
|
|
7889
|
+
</div>`),Q=Q.replace(/<(th|td) align="(left|center|right)">/g,(Z,$,Y)=>{return`<${$} style="text-align: ${Y}">`}),Q=Q.replace(/<(th|td)>/g,(Z,$)=>{return`<${$} style="text-align: left">`}),Q}function X0(Q,Z){let $=new Set;return Q.replace(/<h([1-6])([^>]*)>([\s\S]*?)<\/h\1>/g,(Y,J,O,q)=>{if(O.includes(" id="))return Y;let K=q.replace(/<[^>]+>/g,"").trim(),X=Z.get(K);if(!X)X=JQ(K);if($.has(X)){let z=1;while($.has(`${X}-${z}`))z++;X=`${X}-${z}`}return $.add(X),`<h${J} id="${X}"${O}>${q}</h${J}>`})}async function q0(Q,Z="./docs"){let{frontmatter:$,content:Y}=fZ(Q);if($.layout==="home"){let O=await pZ($.hero),q=await gZ($.features),K=Y.trim()?await cQ(Y,$,Z):"",X=K?`<div class="BPHome-content"><div class="bp-doc vp-doc container">${K}</div></div>`:"";return{html:O+q+X,frontmatter:$}}return{html:await cQ(Y,$,Z),frontmatter:$}}async function cQ(Q,Z,$){let Y=P.markdown?.features,J=(E)=>{if(!Y)return!0;let U=Y[E];return U===void 0||U===!0||typeof U==="object"&&U!==null},O=J("includes")?await iQ(Q,$):Q,q={...Z,data:await jQ($),site:{title:P.title||P.markdown?.title||"",description:P.description||P.markdown?.meta?.description||"",themeConfig:P.themeConfig}},K=P.componentsDir?i(f.cwd(),P.componentsDir):i($,".components");O=await QQ(O,K,q);let X=O.replace(/```[\s\S]*?```/g,"");if(X.includes("@if")||X.includes("@foreach")||X.includes("@for (")||X.includes("<script server")||X.includes("@include")||/\{\{(?!\{)\s*\w/.test(X))try{let E=await import("@stacksjs/stx"),U=[],F=O.replace(/```[\s\S]*?```/g,(A)=>{return U.push(A),`\x00BPSTXCODE${U.length-1}\x00`}).replace(/`[^`\n]*`/g,(A)=>{return U.push(A),`\x00BPSTXCODE${U.length-1}\x00`});O=await E.renderString(F,q),O=O.replace(/\u0000BPSTXCODE(\d+)\u0000/g,(A,B)=>U[Number(B)]??"")}catch{}let{content:V,tocHtml:_}=J("inlineToc")?iZ(O,Z.toc):{content:O,tocHtml:""};O=J("codeImports")?await nZ(V,$):V,O=J("codeGroups")?await tZ(O):O,O=J("githubAlerts")?await oZ(O):O,O=J("containers")?await eZ(O):O,O=J("emoji")?dZ(O):O,O=J("badges")?cZ(O):O;let{content:G,customAnchors:j}=J("customAnchors")?$0(O):{content:O,customAnchors:new Map};O=G;let N=new Map;O=J("codeBlocks")?await J0(O,N):O;let W=Bun.markdown.html(O,{tables:!0,strikethrough:!0,tasklists:!0,autolinks:!0});for(let[E,U]of N)W=W.replace(`<p>${E}</p>`,U),W=W.replace(E,U);if(J("inlineFormatting"))W=Y0(W);if(J("tables"))W=O0(W);if(W=X0(W,j),_)W=aZ(W,_);if(J("externalLinks"))W=lZ(W),W=rZ(W);if(J("imageLazyLoading"))W=sZ(W);return W}async function K0(Q={}){let Z=Q.config||P,$=Q.port??3000,Y=Q.root||"./docs",J=Bun.serve({port:$,async fetch(K){let X=new URL(K.url),z=PZ(Z,X.pathname);if(z==="/")z="/index";if([".png",".jpg",".jpeg",".gif",".svg",".css",".js",".ico",".woff",".woff2",".ttf"].some((G)=>z.endsWith(G)))try{let G=`${Y}/public${z}`,j=Bun.file(G);if(await j.exists())return new Response(j);let N=`${Y}${z}`,W=Bun.file(N);if(await W.exists())return new Response(W)}catch{}let _=`${Y}${z}.md`;try{let G=Bun.file(_);if(await G.exists()){let j=await G.text(),{html:N,frontmatter:W}=await q0(j,Y),E=W.layout||"doc",U=await hQ(N,Z,z,E);return new Response(U,{headers:{"Content-Type":"text/html; charset=utf-8"}})}}catch{}return new Response(await hQ("<h1>404 - Page Not Found</h1><p>The page you are looking for does not exist.</p>",Z,z),{status:404,headers:{"Content-Type":"text/html; charset=utf-8"}})}}),O=`http://localhost:${J.port}`,q=()=>J.stop();if(!Q.quiet)console.log(`
|
|
7890
7890
|
\uD83D\uDCDA BunPress documentation server running at ${O}`),console.log(`Press Ctrl+C to stop
|
|
7891
7891
|
`);return{server:J,url:O,stop:q}}async function l0(Q={}){let{stop:Z}=await K0(Q),$=Q.watch!==void 0?Q.watch:!0,Y=Q.root||"./docs";if($){console.log(`Watching for changes in ${Y} directory...
|
|
7892
|
-
`);try{let J=new Map,O=new fQ("**/*.{md,stx,ts,js,css,html}");for await(let X of O.scan(Y))try{let z=i(Y,X),V=await mQ(z);J.set(X,V.mtimeMs)}catch{}let q=null,K=()=>{if(q)clearTimeout(q);q=setTimeout(async()=>{console.log("File changed detected, reloading..."),TQ(),MQ(),NQ(),console.log("Ready for requests")},100)};setInterval(async()=>{try{let X=!1,z=new Set,V=new fQ("**/*.{md,stx,ts,js,css,html}");for await(let _ of V.scan(Y)){z.add(_);try{let G=i(Y,_),
|
|
7892
|
+
`);try{let J=new Map,O=new fQ("**/*.{md,stx,ts,js,css,html}");for await(let X of O.scan(Y))try{let z=i(Y,X),V=await mQ(z);J.set(X,V.mtimeMs)}catch{}let q=null,K=()=>{if(q)clearTimeout(q);q=setTimeout(async()=>{console.log("File changed detected, reloading..."),TQ(),MQ(),NQ(),console.log("Ready for requests")},100)};setInterval(async()=>{try{let X=!1,z=new Set,V=new fQ("**/*.{md,stx,ts,js,css,html}");for await(let _ of V.scan(Y)){z.add(_);try{let G=i(Y,_),j=await mQ(G),N=J.get(_);if(N===void 0||j.mtimeMs>N)X=!0,J.set(_,j.mtimeMs)}catch{}}for(let _ of J.keys())if(!z.has(_))X=!0,J.delete(_);if(X)K()}catch{}},1000)}catch(J){console.error("Error setting up file watcher:",J)}}f.on("SIGINT",()=>{console.log(`
|
|
7893
7893
|
Shutting down server...`),Z(),f.exit(0)}),f.on("SIGTERM",()=>{console.log(`
|
|
7894
7894
|
Shutting down server...`),Z(),f.exit(0)}),await new Promise(()=>{})}
|
|
7895
|
-
export{G0 as a,n as b,RQ as c,t as d,U0 as e,AQ as f,j0 as g,N0 as h,$Q as i,JQ as j,uQ as k,YQ as l,OQ as m,XQ as n,l as o,r as p,FZ as q,MZ as r,IZ as s,H0 as t,P0 as u,y0 as v,v0 as w,k0 as x,rQ as y,PZ as z,
|
|
7895
|
+
export{G0 as a,n as b,RQ as c,t as d,U0 as e,AQ as f,j0 as g,N0 as h,$Q as i,JQ as j,uQ as k,YQ as l,OQ as m,XQ as n,l as o,r as p,FZ as q,MZ as r,IZ as s,H0 as t,P0 as u,y0 as v,v0 as w,k0 as x,rQ as y,PZ as z,hQ as A,q0 as B,K0 as C,l0 as D};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{E as $,F as I,G as f,H as h,J as x}from"./chunk-
|
|
2
|
+
import{E as $,F as I,G as f,H as h,J as x}from"./chunk-w06ekrq3.js";import"./chunk-ss6yzy9f.js";import{Q as _}from"./chunk-e5q66hsy.js";import"./chunk-w6byd4st.js";import{join as D}from"path";var Y="@stacksjs/ts-cloud";function E(j,A){let k=A||j?.provider;if(!k||k==="route53")return null;if(k==="porkbun"){let m=j?.apiKey||process.env.PORKBUN_API_KEY,w=j?.secretKey||process.env.PORKBUN_SECRET_KEY;if(!m||!w)throw Error("Porkbun API credentials not found. Set PORKBUN_API_KEY and PORKBUN_SECRET_KEY environment variables, or configure them in bunpress.config.ts under cloud.dnsProvider");return{provider:"porkbun",apiKey:m,secretKey:w}}if(k==="godaddy"){let m=j?.apiKey||process.env.GODADDY_API_KEY,w=j?.secretKey||process.env.GODADDY_API_SECRET,J=j?.environment||process.env.GODADDY_ENVIRONMENT;if(!m||!w)throw Error("GoDaddy API credentials not found. Set GODADDY_API_KEY and GODADDY_API_SECRET environment variables, or configure them in bunpress.config.ts under cloud.dnsProvider");return{provider:"godaddy",apiKey:m,apiSecret:w,environment:J}}throw Error(`Unknown DNS provider: ${k}. Supported: porkbun, godaddy, route53`)}async function v(j={}){let A=await _,k=A.cloud||{},m=j.verbose??A.verbose??!1,w=j.region||k.region||"us-east-1",J=j.domain||k.domain,M=j.subdomain||k.subdomain,N=j.baseDomain||k.baseDomain,O=j.bucket||k.bucket,P=j.stackName||k.stackName,U=j.hostedZoneId||k.hostedZoneId,Q=j.certificateArn||k.certificateArn,V=k.cacheControl||"max-age=31536000, public",B;if(J)B=J;else if(M&&N)B=`${M}.${N}`;let K=B?.replace(/\./g,"-")||"bunpress-site",G=null;try{G=E(k.dnsProvider,j.dnsProvider)}catch(H){return I(H.message),!1}let L=G!==null;if(j.dryRun){if(f("Dry run mode - no changes will be made"),console.log(`
|
|
3
3
|
Configuration:`),console.log(` Region: ${w}`),console.log(` Site Name: ${K}`),console.log(` Bucket: ${O||"auto-generated"}`),console.log(` Domain: ${B||"not specified"}`),console.log(` Stack Name: ${P||`${K}-static-site`}`),console.log(` DNS Provider: ${G?.provider||"route53 (AWS)"}`),!L)console.log(` Hosted Zone ID: ${U||"auto-detected"}`);return console.log(` Certificate ARN: ${Q||"auto-created"}`),!0}if(!process.env.AWS_ACCESS_KEY_ID||!process.env.AWS_SECRET_ACCESS_KEY)return I("AWS credentials not found. Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables."),!1;let z=new h("Building documentation...");try{if(!m)z.start();if(!await x({verbose:m})){if(!m)z.fail("Build failed");return!1}if(!m)z.succeed("Documentation built successfully");let C=A.outDir||"./dist",X=D(C,".bunpress");if(!m)z.text="Deploying infrastructure with CloudFormation...",z.start();else if(console.log(`
|
|
4
4
|
Deploying with CloudFormation...`),L)console.log(`Using external DNS provider: ${G.provider}`);let q;if(L&&B){let R={siteName:K,region:w,domain:B,bucket:O,stackName:P,certificateArn:Q,cacheControl:V,defaultRootObject:"index.html",errorDocument:"404.html",sourceDir:X,dnsProvider:G,tags:{Project:"BunPress",Environment:k.environment||"production"},onProgress:Z(z,m)},{deployStaticSiteWithExternalDnsFull:T}=await import(Y);q=await T(R)}else{let R={siteName:K,region:w,bucket:O,domain:B,subdomain:M,baseDomain:N,stackName:P,hostedZoneId:U,certificateArn:Q,cacheControl:V,defaultRootObject:"index.html",errorDocument:"404.html",sourceDir:X,tags:{Project:"BunPress",Environment:k.environment||"production"},onProgress:Z(z,m)},{deployStaticSiteFull:T}=await import(Y);q=await T(R)}if(!q.success){if(!m)z.fail("Deployment failed");return I(q.message),!1}if(console.log(`
|
|
5
5
|
`+"=".repeat(50)),$("Deployment complete!"),console.log("=".repeat(50)),console.log(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{L as W6,M as U6,O as V6}from"./chunk-ss6yzy9f.js";import{Q as
|
|
2
|
+
import{L as W6,M as U6,O as V6}from"./chunk-ss6yzy9f.js";import{Q as O}from"./chunk-e5q66hsy.js";import{S as y}from"./chunk-w6byd4st.js";var{Glob:j6}=globalThis.Bun;import{copyFile as n6,mkdir as A6,readdir as i6}from"fs/promises";import{join as v}from"path";import I from"process";import{CLI as s6}from"@stacksjs/clapp";var s="0.1.16";import{existsSync as z6}from"fs";import{rm as L6}from"fs/promises";import{join as I6}from"path";var z={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m"};function x(K,Z){return`${z[Z]}${K}${z.reset}`}function G(K){console.log(`${z.green}\u2713${z.reset} ${K}`)}function W(K){console.error(`${z.red}\u2717${z.reset} ${K}`)}function g(K){console.warn(`${z.yellow}\u26A0${z.reset} ${K}`)}function B(K){console.log(`${z.blue}\u2139${z.reset} ${K}`)}function S(K){if(K===0)return"0 B";let Z=1024,Q=["B","KB","MB","GB"],$=Math.floor(Math.log(K)/Math.log(Z));return`${Number.parseFloat((K/Z**$).toFixed(2))} ${Q[$]}`}function f(K){if(K<1000)return`${K}ms`;if(K<60000)return`${(K/1000).toFixed(2)}s`;return`${(K/60000).toFixed(2)}m`}var r=!!(process.env.CI||process.env.GITHUB_ACTIONS||process.env.BUILDKITE||process.env.CIRCLECI||process.env.GITLAB_CI);class D{frames=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];index=0;interval=null;text;constructor(K){this.text=K}start(){if(r){console.log(` ${this.text}`);return}process.stdout.write("\x1B[?25l"),this.interval=setInterval(()=>{let K=this.frames[this.index];process.stdout.write(`\r${z.cyan}${K}${z.reset} ${this.text}`),this.index=(this.index+1)%this.frames.length},80)}succeed(K){this.stop(),G(K||this.text)}fail(K){this.stop(),W(K||this.text)}stop(){if(this.interval)clearInterval(this.interval),this.interval=null;if(!r)process.stdout.write("\r\x1B[K"),process.stdout.write("\x1B[?25h")}update(K){this.text=K}}async function u(K,Z=!1){let Q=Z?"Y/n":"y/N";process.stdout.write(`${z.cyan}?${z.reset} ${K} ${z.dim}(${Q})${z.reset}: `);let $=Bun.file("/dev/stdin").stream().getReader(),q=new TextDecoder,{value:X}=await $.read(),Y=q.decode(X).trim().toLowerCase();if(!Y)return Z;return Y==="y"||Y==="yes"}function h(K){if(K.length===0)return;let Z=Object.keys(K[0]),Q={};for(let q of Z)Q[q]=Math.max(q.length,...K.map((X)=>String(X[q]).length));let $=Z.map((q)=>q.padEnd(Q[q])).join(" ");console.log(x($,"bold")),console.log("\u2500".repeat($.length));for(let q of K){let X=Z.map((Y)=>String(q[Y]).padEnd(Q[Y])).join(" ");console.log(X)}}async function d(K){try{return Bun.file(K).size}catch{return 0}}async function S6(K){try{let{Glob:Z}=awaitPromise.resolve(globalThis.Bun),Q=new Z("**/*"),$=0;for await(let q of Q.scan(K)){let X=`${K}/${q}`,Y=await d(X);$+=Y}return $}catch{return 0}}async function e(K={}){let Z=await O,Q=K.outdir||Z.outDir||"./dist",$=I6(Q,".bunpress"),q=K.force||!1,X=K.verbose||!1;try{if(!z6($))return B(`Directory "${$}" does not exist, nothing to clean`),!0;let N=await S6($);if(X)B(`Found "${$}" (${S(N)})`);if(!q){if(!await u(`Delete "${$}" directory? (${S(N)})`,!1))return B("Clean cancelled"),!1}let _=process.env.VITEST==="true"||!1,R=null;if(!_&&!X)R=new D("Cleaning build artifacts..."),R.start();if(await L6($,{recursive:!0,force:!0}),R)R.succeed(`Cleaned ${S(N)} from "${$}"`);else if(X||_)G(`Cleaned ${S(N)} from "${$}"`);return!0}catch(Y){return W(`Failed to clean directory: ${Y}`),!1}}import{existsSync as p}from"fs";import{join as l}from"path";async function t(K={}){try{let Z=["bunpress.config.ts","bunpress.config.js"],Q=null;for(let q of Z){let X=l(process.cwd(),q);if(p(X)){Q=X;break}}if(!Q)return W("No configuration file found"),B('Run "bunpress config init" to create one'),!1;G(`Configuration file: ${Q}`),console.log();let $=await Bun.file(Q).text();return console.log(x("Configuration:","bold")),console.log($),!0}catch(Z){return W(`Failed to show configuration: ${Z}`),!1}}async function o(K={}){let Z=K.verbose||!1;try{let Q=["bunpress.config.ts","bunpress.config.js"],$=null;for(let N of Q){let _=l(process.cwd(),N);if(p(_)){$=_;break}}if(!$)return W("No configuration file found"),!1;if(Z)B(`Validating ${$}...`);let X=(await import($)).default;if(!X)return W("Configuration file does not export a default object"),!1;let Y=[];if(X.markdown){if(X.markdown.toc&&typeof X.markdown.toc!=="object"&&typeof X.markdown.toc!=="boolean")Y.push("markdown.toc should be an object or boolean");if(X.markdown.features){if(typeof X.markdown.features!=="object")Y.push("markdown.features should be an object")}}if(X.nav){if(!Array.isArray(X.nav))Y.push("nav should be an array");else for(let[N,_]of X.nav.entries())if(!_.text||!_.link)Y.push(`nav[${N}] is missing required fields (text, link)`)}if(X.sitemap){if(!X.sitemap.hostname)Y.push("sitemap.hostname is required for SEO")}if(Y.length>0){W("Configuration validation failed:");for(let N of Y)console.log(` \u2022 ${N}`);return!1}return G("Configuration is valid \u2713"),!0}catch(Q){return W(`Failed to validate configuration: ${Q}`),!1}}async function K6(K={}){let Z=l(process.cwd(),"bunpress.config.ts");if(p(Z))return W("Configuration file already exists"),!1;let Q=`import type { BunPressConfig } from '@stacksjs/bunpress'
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
verbose: false,
|
|
@@ -52,9 +52,9 @@ export default {
|
|
|
52
52
|
hostname: 'https://example.com',
|
|
53
53
|
},
|
|
54
54
|
} satisfies BunPressConfig
|
|
55
|
-
`;try{return await Bun.write(Z,Q),G(`Created ${Z}`),!0}catch($){return
|
|
55
|
+
`;try{return await Bun.write(Z,Q),G(`Created ${Z}`),!0}catch($){return W(`Failed to create configuration: ${$}`),!1}}import{existsSync as C}from"fs";import{join as k}from"path";async function Q6(K={}){let Z=K.verbose||!1,Q=[];console.log(x(`
|
|
56
56
|
Running diagnostics...
|
|
57
|
-
`,"bold"));try{let H=Bun.version;Q.push({name:"Bun Runtime",status:"pass",message:`v${H}`})}catch(H){Q.push({name:"Bun Runtime",status:"fail",message:"Not found"})}let $=["bunpress.config.ts","bunpress.config.js"],
|
|
57
|
+
`,"bold"));try{let H=Bun.version;Q.push({name:"Bun Runtime",status:"pass",message:`v${H}`})}catch(H){Q.push({name:"Bun Runtime",status:"fail",message:"Not found"})}let $=["bunpress.config.ts","bunpress.config.js"],q=!1;for(let H of $)if(C(k(process.cwd(),H))){q=!0,Q.push({name:"Configuration",status:"pass",message:H});break}if(!q)Q.push({name:"Configuration",status:"warn",message:"No config file found (using defaults)"});let X=k(process.cwd(),"docs");if(C(X)){let{Glob:H}=awaitPromise.resolve(globalThis.Bun),T=new H("**/*.md"),L=0;for await(let F of T.scan(X))L++;Q.push({name:"Documentation",status:L>0?"pass":"warn",message:`${L} markdown files`})}else Q.push({name:"Documentation",status:"fail",message:"docs/ directory not found"});let Y=k(process.cwd(),"package.json");if(C(Y)){let H=await Bun.file(Y).json(),T=H.scripts?.dev,L=H.scripts?.build;Q.push({name:"Package Scripts",status:T&&L?"pass":"warn",message:`dev: ${T?"\u2713":"\u2717"}, build: ${L?"\u2713":"\u2717"}`});let F=H.dependencies?.["@stacksjs/bunpress"]||H.devDependencies?.["@stacksjs/bunpress"];Q.push({name:"BunPress Package",status:F?"pass":"warn",message:F||"Not installed"})}else Q.push({name:"Package.json",status:"warn",message:"Not found"});let N=k(process.cwd(),"node_modules");if(C(N))Q.push({name:"Dependencies",status:"pass",message:"node_modules found"});else Q.push({name:"Dependencies",status:"warn",message:"node_modules not found (run: bun install)"});let _=k(process.cwd(),".git");if(C(_))Q.push({name:"Git Repository",status:"pass",message:"Initialized"});else Q.push({name:"Git Repository",status:"warn",message:"Not initialized"});let R=k(process.cwd(),"tsconfig.json");if(C(R))Q.push({name:"TypeScript",status:"pass",message:"tsconfig.json found"});else Q.push({name:"TypeScript",status:"warn",message:"tsconfig.json not found"});for(let H of Q){let T=H.status==="pass"?"\u2713":H.status==="fail"?"\u2717":"\u26A0",L=H.status==="pass"?"green":H.status==="fail"?"red":"yellow";console.log(` ${x(T,L)} ${H.name}: ${x(H.message,"dim")}`)}console.log();let U=Q.filter((H)=>H.status==="pass").length,A=Q.filter((H)=>H.status==="fail").length,J=Q.filter((H)=>H.status==="warn").length;if(A>0){if(W(`${A} checks failed, ${J} warnings`),console.log(),B("Recommended actions:"),Q.find((H)=>H.name==="Documentation"&&H.status==="fail"))console.log(' \u2022 Run "bunpress init" to create docs directory');if(Q.find((H)=>H.name==="Dependencies"&&H.status==="warn"))console.log(' \u2022 Run "bun install" to install dependencies');if(Q.find((H)=>H.name==="BunPress Package"&&H.status==="warn"))console.log(' \u2022 Run "bun add @stacksjs/bunpress" to install BunPress');return!1}else if(J>0)return g(`${U} checks passed, ${J} warnings`),!0;else return G(`All ${U} checks passed!`),!0}import{mkdir as a}from"fs/promises";var y6=`import type { BunPressConfig } from '@stacksjs/bunpress'
|
|
58
58
|
|
|
59
59
|
export default {
|
|
60
60
|
verbose: false,
|
|
@@ -166,14 +166,14 @@ Check out the [markdown extensions](/guide/markdown) to learn about all the powe
|
|
|
166
166
|
- Learn about [configuration](/guide/configuration)
|
|
167
167
|
- Explore [advanced features](/guide/advanced)
|
|
168
168
|
- Read the [API reference](/api/)
|
|
169
|
-
`,
|
|
169
|
+
`,v6=`node_modules/
|
|
170
170
|
dist/
|
|
171
171
|
.DS_Store
|
|
172
172
|
*.log
|
|
173
173
|
.env
|
|
174
174
|
.env.*
|
|
175
175
|
!.env.example
|
|
176
|
-
`,
|
|
176
|
+
`,D6=`# My BunPress Documentation
|
|
177
177
|
|
|
178
178
|
Documentation powered by [BunPress](https://github.com/stacksjs/bunpress).
|
|
179
179
|
|
|
@@ -200,7 +200,7 @@ Preview the built site:
|
|
|
200
200
|
\`\`\`bash
|
|
201
201
|
bun run preview
|
|
202
202
|
\`\`\`
|
|
203
|
-
`;async function Z6(K={}){try{if(await Bun.file("./docs").exists()&&!K.force){if(!await
|
|
203
|
+
`;async function Z6(K={}){try{if(await Bun.file("./docs").exists()&&!K.force){if(!await u("Documentation directory already exists. Continue?",!1))return B("Initialization cancelled"),!1}let Q=new D("Initializing BunPress project...");Q.start(),await a("./docs",{recursive:!0}),await a("./docs/guide",{recursive:!0}),await a("./docs/public",{recursive:!0}),await Bun.write("./bunpress.config.ts",y6),await Bun.write("./docs/index.md",E6),await Bun.write("./docs/guide/index.md",F6);let $=await Bun.file("./.gitignore").exists();if(!$)await Bun.write("./.gitignore",v6);let q=await Bun.file("./README.md").exists();if(!q)await Bun.write("./README.md",D6);let X="./package.json";if(await Bun.file(X).exists()){let N=await Bun.file(X).json();N.scripts=N.scripts||{},N.scripts.dev=N.scripts.dev||"bunpress dev",N.scripts.build=N.scripts.build||"bunpress build",N.scripts.preview=N.scripts.preview||"bunpress preview",await Bun.write(X,JSON.stringify(N,null,2))}if(Q.succeed("BunPress project initialized successfully!"),console.log(),G("Created files:"),console.log(" \u2022 bunpress.config.ts"),console.log(" \u2022 docs/index.md"),console.log(" \u2022 docs/guide/index.md"),console.log(" \u2022 docs/public/"),!$)console.log(" \u2022 .gitignore");if(!q)console.log(" \u2022 README.md");return console.log(),B("Next steps:"),console.log(" 1. Install BunPress: bun add @stacksjs/bunpress"),console.log(" 2. Start dev server: bun run dev"),console.log(" 3. Edit docs/index.md to customize your home page"),!0}catch(Z){return W(`Failed to initialize project: ${Z}`),!1}}import{mkdir as w6}from"fs/promises";import{dirname as C6,join as k6}from"path";var $6={default:(K)=>`---
|
|
204
204
|
title: ${K}
|
|
205
205
|
description:
|
|
206
206
|
---
|
|
@@ -278,16 +278,16 @@ Post content goes here...
|
|
|
278
278
|
## Section 1
|
|
279
279
|
|
|
280
280
|
Content...
|
|
281
|
-
`};async function X6(K,Z={}){try{let Q=K.endsWith(".md")?K:`${K}.md`,$=k6(process.cwd(),"docs",Q);if(await Bun.file($).exists())return
|
|
282
|
-
`),await new Promise(()=>{})}catch(
|
|
281
|
+
`};async function X6(K,Z={}){try{let Q=K.endsWith(".md")?K:`${K}.md`,$=k6(process.cwd(),"docs",Q);if(await Bun.file($).exists())return W(`File already exists: ${Q}`),!1;let X=Z.title;if(!X)X=(Q.split("/").pop()?.replace(".md","")||"").split("-").map((A)=>A.charAt(0).toUpperCase()+A.slice(1)).join(" ");let Y=Z.template||"default",N=$6[Y];if(!N)return W(`Unknown template: ${Y}`),W(`Available templates: ${Object.keys($6).join(", ")}`),!1;let _=N(X),R=C6($);return await w6(R,{recursive:!0}),await Bun.write($,_),G(`Created ${Q}`),console.log(),console.log(` Title: ${X}`),console.log(` Template: ${Y}`),console.log(` Path: ${$}`),!0}catch(Q){return W(`Failed to create file: ${Q}`),!1}}import{join as Y6}from"path";async function N6(K={}){let Z=K.port||3000,Q=await O,$=K.outdir||Q.outDir||"./dist",q=Y6($,".bunpress"),X=K.verbose||!1;try{let{stat:Y}=await import("fs/promises");try{if(!(await Y(q)).isDirectory())W(`"${q}" is not a directory.`),W('Run "bunpress build" first to generate the documentation.'),process.exit(1)}catch{W(`Build directory "${q}" not found.`),W('Run "bunpress build" first to generate the documentation.'),process.exit(1)}B(`Starting preview server from ${q}`);try{let N=Bun.serve({port:Z,fetch:async(_)=>{let U=new URL(_.url).pathname;if(U.startsWith("/"))U=U.slice(1);if(U===""||U==="/")U="index.html";let A=Y6(q,U),J=Bun.file(A);if(await J.exists())return new Response(J,{headers:{"Content-Type":P6(U)}});let T=`${A}.html`,L=Bun.file(T);if(await L.exists())return new Response(L,{headers:{"Content-Type":"text/html"}});return new Response("404 - Not Found",{status:404})}});G(`Preview server running at http://localhost:${Z}`),console.log(`Press Ctrl+C to stop
|
|
282
|
+
`),await new Promise(()=>{})}catch(N){if(N.message?.includes("EADDRINUSE")||N.code==="EADDRINUSE")W(`Port ${Z} is already in use.`),W("Try running with a different port: bunpress preview --port <port>"),W(`Or stop any processes using port ${Z}`);else W(`Failed to start server: ${N.message||N}`);process.exit(1)}}catch(Y){W(`Failed to start preview server: ${Y}`),process.exit(1)}}function P6(K){let Z=K.split(".").pop()?.toLowerCase();return{html:"text/html",css:"text/css",js:"application/javascript",json:"application/json",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",ico:"image/x-icon",woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf",eot:"application/vnd.ms-fontobject"}[Z||""]||"text/plain"}import*as w from"fs";import*as E from"path";var{YAML:q6}=globalThis.Bun;async function H6(K={}){let Z=await O,Q=K.dir||Z.docsDir||"./docs",$=K.fix||!1;if(B("\uD83D\uDD0D Running SEO checks..."),console.log(""),!w.existsSync(Q))W(`Documentation directory not found: ${Q}`),process.exit(1);let q={totalPages:0,errors:[],warnings:[],passed:0},X=await m6(Q);q.totalPages=X.length;for(let Y of X)await h6(Y,Q,q,$);if(p6(q),q.errors.length>0)process.exit(1)}async function h6(K,Z,Q,$){let q=await w.promises.readFile(K,"utf-8"),{frontmatter:X,markdown:Y}=g6(q),N=E.relative(Z,K),_=!1,R=!1,U={...X};if(!X.title){let H=u6(Y);if(!H)Q.errors.push({type:"error",category:"Title",file:N,message:"Missing title in frontmatter"}),_=!0;else if($)U.title=H,R=!0,B(`\u2713 Added title to ${N}: "${H}"`);else Q.warnings.push({type:"warning",category:"Title",file:N,message:`No title in frontmatter (could extract: "${H}")`}),_=!0}else{let H=X.title.length;if(H>60)Q.warnings.push({type:"warning",category:"Title",file:N,message:`Title too long (${H} chars, recommended <60)`}),_=!0;else if(H<10)Q.warnings.push({type:"warning",category:"Title",file:N,message:`Title too short (${H} chars, recommended >10)`}),_=!0}if(!X.description){let H=d6(Y);if($)U.description=H,R=!0,B(`\u2713 Added description to ${N}`);else Q.warnings.push({type:"warning",category:"Description",file:N,message:"Missing description in frontmatter"}),_=!0}else{let H=X.description.length;if(H>160)Q.warnings.push({type:"warning",category:"Description",file:N,message:`Description too long (${H} chars, recommended <160)`}),_=!0;else if(H<50)Q.warnings.push({type:"warning",category:"Description",file:N,message:`Description too short (${H} chars, recommended >50)`}),_=!0}let A=c6(Y,Z,K);for(let H of A)Q.errors.push({type:"error",category:"Links",file:N,message:`Broken internal link: ${H}`}),_=!0;let J=f6(Y);for(let H of J)Q.warnings.push({type:"warning",category:"Images",file:N,message:`Image missing alt text: ${H}`}),_=!0;if(R){let H=`---
|
|
283
283
|
${q6.stringify(U)}---
|
|
284
|
-
${Y}`;await
|
|
284
|
+
${Y}`;await w.promises.writeFile(K,H,"utf-8")}if(!_)Q.passed++}async function m6(K){let Z=[];async function Q($){let q=await w.promises.readdir($,{withFileTypes:!0});for(let X of q){let Y=E.join($,X.name);if(X.isDirectory()){if(!X.name.startsWith(".")&&X.name!=="node_modules"&&X.name!=="public")await Q(Y)}else if(X.isFile()&&X.name.endsWith(".md"))Z.push(Y)}}return await Q(K),Z}function g6(K){let Z=/^---\n([\s\S]*?)\n---\n?/,Q=K.match(Z);if(!Q)return{frontmatter:{},markdown:K};let $=Q[1],q=K.slice(Q[0].length);try{return{frontmatter:q6.parse($),markdown:q}}catch{return{frontmatter:{},markdown:K}}}function u6(K){let Z=K.match(/^#\s+(.+)$/m);return Z?Z[1].trim():null}function d6(K,Z=155){let Q=K.replace(/^#{1,6}\s+.+$/gm,"").replace(/```[\s\S]*?```/g,"").replace(/`[^`]+`/g,"").replace(/!\[.*?\]\(.*?\)/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[*_~]/g,"").trim(),$=Q.split(`
|
|
285
285
|
|
|
286
|
-
`)[0]||Q;if($.length>Z)return`${$.slice(0,Z)}...`;return $||"Documentation page"}function c6(K,Z,Q){let $=[],
|
|
287
|
-
`),$=0,
|
|
286
|
+
`)[0]||Q;if($.length>Z)return`${$.slice(0,Z)}...`;return $||"Documentation page"}function c6(K,Z,Q){let $=[],q=/\[([^\]]+)\]\(([^)]+)\)/g,X=K.replace(/```[\s\S]*?```/g,"").replace(/~~~[\s\S]*?~~~/g,"").replace(/`+[^`\n]*`+/g,""),Y;while((Y=q.exec(X))!==null){let N=Y[2].trim();if(/^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(N))continue;if(N.startsWith("#"))continue;let _=N.split("#",1)[0].split("?",1)[0];if(!_)continue;let R;try{R=decodeURIComponent(_.replace(/^<|>$/g,""))}catch{$.push(N);continue}let U=R.startsWith("/")?E.resolve(Z,`.${R}`):E.resolve(E.dirname(Q),R);if(!(U.endsWith(".md")?[U]:[U,`${U}.md`,E.join(U,"index.md")]).some((J)=>w.existsSync(J)))$.push(N)}return $}function f6(K){let Z=[],Q=/!\[([^\]]*)\]\(([^)]+)\)/g,$;while(($=Q.exec(K))!==null){let q=$[1],X=$[2];if(!q||q.trim()==="")Z.push(X)}return Z}function p6(K){if(console.log(""),B("\uD83D\uDCCA SEO Report"),console.log(""),console.log(`Total pages checked: ${x(K.totalPages.toString(),"blue")}`),console.log(`Passed: ${x(K.passed.toString(),"green")}`),console.log(`Errors: ${x(K.errors.length.toString(),K.errors.length>0?"red":"green")}`),console.log(`Warnings: ${x(K.warnings.length.toString(),K.warnings.length>0?"yellow":"green")}`),console.log(""),K.errors.length>0){W(`\u2717 ${K.errors.length} errors found:`),console.log("");let Z=K.errors.map((Q)=>({Category:Q.category,File:Q.file,Message:Q.message}));h(Z),console.log("")}if(K.warnings.length>0){g(`\u26A0 ${K.warnings.length} warnings found:`),console.log("");let Z=K.warnings.map((Q)=>({Category:Q.category,File:Q.file,Message:Q.message}));h(Z),console.log("")}if(K.errors.length===0&&K.warnings.length===0)G("\u2713 All SEO checks passed!");else if(K.errors.length===0)G("\u2713 No errors found (only warnings)")}import{join as l6}from"path";async function a6(K){let Z=await Bun.file(K).text(),Q=Z.split(`
|
|
287
|
+
`),$=0,q=!1,X=[];for(let R of Q){if(R.trim().startsWith("```")){q=!q;continue}if(!q)X.push(R)}$=X.join(" ").split(/\s+/).filter((R)=>R.length>0).length;let N=Q.filter((R)=>R.match(/^#{1,6}\s+/)).length,_=(Z.match(/```/g)||[]).length/2;return{path:K,size:await d(K),lines:Q.length,words:$,headings:N,codeBlocks:Math.floor(_)}}async function _6(K={}){let Z=await O,Q=K.dir||Z.docsDir||"./docs",$=K.verbose||!1;try{console.log(x(`
|
|
288
288
|
Analyzing documentation...
|
|
289
|
-
`,"bold"));let{Glob:
|
|
290
|
-
Generated ${U.length} HTML files in ${$}`);return!0}catch(
|
|
289
|
+
`,"bold"));let{Glob:q}=awaitPromise.resolve(globalThis.Bun),X=new q("**/*.md"),Y=[];for await(let M of X.scan(Q)){let V=l6(Q,M),c=await a6(V);Y.push(c)}if(Y.length===0)return W("No markdown files found"),!1;let N=Y.reduce((M,V)=>M+V.size,0),_=Y.reduce((M,V)=>M+V.lines,0),R=Y.reduce((M,V)=>M+V.words,0),U=Y.reduce((M,V)=>M+V.headings,0),A=Y.reduce((M,V)=>M+V.codeBlocks,0);if(console.log(x("Summary","bold")),console.log("\u2500".repeat(50)),console.log(`Files: ${Y.length}`),console.log(`Total size: ${S(N)}`),console.log(`Total lines: ${_.toLocaleString()}`),console.log(`Total words: ${R.toLocaleString()}`),console.log(`Headings: ${U}`),console.log(`Code blocks: ${A}`),console.log(),$){console.log(x("Per-file Statistics","bold")),console.log("\u2500".repeat(50));let M=Y.map((V)=>({File:V.path.replace(`${Q}/`,""),Size:S(V.size),Lines:V.lines,Words:V.words,Headings:V.headings,"Code Blocks":V.codeBlocks}));h(M),console.log()}let J=N/Y.length,H=_/Y.length,T=R/Y.length;console.log(x("Averages per File","bold")),console.log("\u2500".repeat(50)),console.log(`Size: ${S(J)}`),console.log(`Lines: ${Math.round(H)}`),console.log(`Words: ${Math.round(T)}`),console.log();let L=[...Y].sort((M,V)=>V.size-M.size).slice(0,5);if(L.length>0){console.log(x("Top 5 Largest Files","bold")),console.log("\u2500".repeat(50));for(let M of L){let V=M.path.replace(`${Q}/`,"");console.log(` ${V.padEnd(40)} ${S(M.size)}`)}console.log()}let F=Math.ceil(R/200);return B(`Estimated reading time: ${F} minutes`),!0}catch(q){return W(`Failed to generate statistics: ${q}`),!1}}var b=new s6("bunpress"),j={outdir:O.outDir||"./dist",docsdir:O.docsDir||"./docs",port:3000,open:!0,watch:!0,verbose:O.verbose};async function M6(K){let Z=new j6("**/*.md"),Q=[];for await(let $ of Z.scan(K))Q.push(v(K,$));return Q}async function r6(K,Z,Q=!1){let $=`${Z}/public`;try{await i6($);let q=new j6("**/*");for await(let X of q.scan($)){let Y=v($,X),N=v(K,X);await A6(v(K,X.split("/").slice(0,-1).join("/")),{recursive:!0}),await n6(Y,N)}}catch{if(Q)console.log("No public directory found, skipping static assets copy")}}async function e6(K,Z,Q){try{let $=await O;if($.sitemap?.enabled!==!1&&$.sitemap?.baseUrl)await V6(K,Z,$);if($.robots?.enabled!==!1)await U6(Z,$);if($.rss?.enabled)await W6(K,Z,$,$.rss)}catch($){if(Q)console.error("Error generating SEO files:",$)}}async function R6(K={}){let Z=await O,Q=K.outdir||Z.outDir||j.outdir,$=v(Q,".bunpress"),q=K.dir||Z.docsDir||j.docsdir,X=K.verbose??j.verbose,Y=K.minify??!1,N=K.sourcemap??!1,_=performance.now(),R=new D("Building documentation...");if(!X)R.start();await A6($,{recursive:!0});let U=await M6(q);if(U.length===0){if(!X)R.fail("No markdown files found in docs directory");else console.log("No markdown files found in docs directory");return!1}if(X)console.log(`Found ${U.length} markdown files:`),U.forEach((A)=>console.log(`- ${A}`));try{let{markdownToHtml:A,wrapInLayout:J}=await import("./chunk-gxhjya5p.js"),{mkdir:H,writeFile:T}=await import("fs/promises");if(X)console.log("Transforming markdown to HTML...");for(let M of U){let V=await Bun.file(M).text(),{html:c,frontmatter:B6}=await A(V,q),G6=M.replace(/^\.\//,""),J6=q.replace(/^\.\//,""),P=G6.replace(J6,"").replace(/^\//,"").replace(/\.md$/,""),x6=`/${P}`,T6=B6.layout||"doc",O6=await J(c,Z,x6,T6),m=P==="index"||P.endsWith("/index")?v($,`${P}.html`):v($,P,"index.html"),i=m.substring(0,m.lastIndexOf("/"));if(i)await H(i,{recursive:!0});if(await T(m,O6),X)console.log(`Generated: ${m}`)}if(X)console.log(`Processed ${U.length} markdown files.`);await r6($,q,X),await o6($),await t6($,Z),await e6(q,$,X||!1);let F=performance.now()-_;if(!X)R.succeed(`Built ${U.length} pages to HTML in ${f(F)}`);else G(`Build completed in ${f(F)}`),console.log(`
|
|
290
|
+
Generated ${U.length} HTML files in ${$}`);return!0}catch(A){if(!X)R.fail("Build failed");return console.error("Error during build:",A),!1}}async function t6(K,Z){let{wrapInLayout:Q}=await import("./chunk-gxhjya5p.js"),$=`
|
|
291
291
|
<style>
|
|
292
292
|
.NotFound {
|
|
293
293
|
padding: 64px 24px 96px;
|
|
@@ -364,7 +364,7 @@ Generated ${U.length} HTML files in ${$}`);return!0}catch(B){if(!X)W.fail("Build
|
|
|
364
364
|
</a>
|
|
365
365
|
</div>
|
|
366
366
|
</div>
|
|
367
|
-
`,
|
|
367
|
+
`,q=await Q(`
|
|
368
368
|
<style>
|
|
369
369
|
.NotFound {
|
|
370
370
|
padding: 64px 24px 96px;
|
|
@@ -441,26 +441,26 @@ Generated ${U.length} HTML files in ${$}`);return!0}catch(B){if(!X)W.fail("Build
|
|
|
441
441
|
</a>
|
|
442
442
|
</div>
|
|
443
443
|
</div>
|
|
444
|
-
`,Z,"/404","doc");await Bun.write(
|
|
445
|
-
Watching for changes...`),Q(
|
|
446
|
-
Detected change in ${Y}, rebuilding...`),await R6(K)}),await new Promise(()=>{})}});
|
|
444
|
+
`,Z,"/404","doc");await Bun.write(v(K,"404.html"),q)}async function o6(K){let Z=v(K,"index.html");try{if(!await Bun.file(Z).exists())console.error("Warning: No index.html found at root")}catch(Q){console.error("Error checking root index.html:",Q)}}b.command("build","Build the documentation site").option("--outdir <outdir>","Output directory").option("--dir <dir>","Documentation directory").option("--config <config>","Path to config file").option("--minify","Minify output files",{default:!1}).option("--sourcemap","Generate source maps",{default:!1}).option("--watch","Watch for changes and rebuild",{default:!1}).option("--verbose","Enable verbose logging",{default:j.verbose}).action(async(K)=>{if(!await R6(K))I.exit(1);if(K.watch){let{watch:Q}=await import("fs"),$=await O,q=K.dir||$.docsDir||"./docs";console.log(`
|
|
445
|
+
Watching for changes...`),Q(q,{recursive:!0},async(X,Y)=>{if(Y&&Y.endsWith(".md"))console.log(`
|
|
446
|
+
Detected change in ${Y}, rebuilding...`),await R6(K)}),await new Promise(()=>{})}});b.command("dev","Build and serve documentation using BunPress server").option("--port <port>","Port to listen on",{default:j.port}).option("--dir <dir>","Documentation directory").option("--watch","Watch for changes",{default:j.watch}).option("--verbose","Enable verbose logging",{default:j.verbose}).action(async(K)=>{let Z=await O,Q=K.port||j.port,$=K.dir||Z.docsDir||j.docsdir,q=K.watch??j.watch,X=K.verbose??j.verbose;if(X)console.log("Starting BunPress dev server with options:",{port:Q,root:$,watch:q,verbose:X});let{serveCLI:Y}=await import("./chunk-gxhjya5p.js");await Y({port:Q,root:$,watch:q,config:Z})});async function K4(K={}){let Z=await O,Q=K.dir||Z.docsDir||j.docsdir,$=K.output||"./docs.md",q=K.full??!1,X=K.verbose??j.verbose;if(X)console.log(`Generating LLM markdown from ${Q}`),console.log(`Output file: ${$}`),console.log(`Full content: ${q}`);let Y=await M6(Q);if(Y.length===0)return console.log("No markdown files found in docs directory"),!1;if(X)console.log(`Found ${Y.length} markdown files`);Y.sort();let N=`# Documentation
|
|
447
447
|
|
|
448
|
-
`;
|
|
448
|
+
`;N+=`Generated: ${new Date().toISOString()}
|
|
449
449
|
|
|
450
|
-
`,
|
|
450
|
+
`,N+=`Total files: ${Y.length}
|
|
451
451
|
|
|
452
|
-
`,
|
|
452
|
+
`,N+=`---
|
|
453
453
|
|
|
454
|
-
`;for(let _ of Y){let
|
|
454
|
+
`;for(let _ of Y){let R=_.replace(`${Q}/`,""),U=await Bun.file(_).text();if(X)console.log(`Processing: ${R}`);if(N+=`## File: ${R}
|
|
455
455
|
|
|
456
|
-
`,N
|
|
456
|
+
`,q)N+=U,N+=`
|
|
457
457
|
|
|
458
|
-
`;else{let
|
|
459
|
-
`),
|
|
460
|
-
`;continue}if(T.match(/^#{1,6}\s+/))
|
|
461
|
-
`}
|
|
462
|
-
`}
|
|
458
|
+
`;else{let A=U.split(`
|
|
459
|
+
`),J=!1,H="";for(let T of A){if(T.trim()==="---")if(!J){J=!0;continue}else{if(J=!1,H)N+="**Frontmatter:**\n```yaml\n",N+=H,N+="```\n\n",H="";continue}if(J){H+=`${T}
|
|
460
|
+
`;continue}if(T.match(/^#{1,6}\s+/))N+=`${T}
|
|
461
|
+
`}N+=`
|
|
462
|
+
`}N+=`---
|
|
463
463
|
|
|
464
|
-
`}return await Bun.write($,
|
|
465
|
-
LLM markdown generated successfully: ${$}`),console.log(`Total size: ${(
|
|
466
|
-
export{G as E,
|
|
464
|
+
`}return await Bun.write($,N),console.log(`
|
|
465
|
+
LLM markdown generated successfully: ${$}`),console.log(`Total size: ${(N.length/1024).toFixed(2)} KB`),!0}b.command("llm","Generate LLM-friendly markdown file from documentation").option("--dir <dir>","Documentation directory",{default:"./docs"}).option("--output <output>","Output file path",{default:"./docs.md"}).option("--full","Include full content (not just titles and headings)",{default:!1}).option("--verbose","Enable verbose logging",{default:j.verbose}).action(async(K)=>{if(!await K4(K))I.exit(1)});b.command("init","Initialize a new BunPress project").option("--name <name>","Project name").option("--template <template>","Template to use").option("--force","Overwrite existing files",{default:!1}).action(async(K)=>{if(!await Z6(K))I.exit(1)});b.command("preview","Preview the built documentation site").option("--port <port>","Port to listen on",{default:j.port}).option("--outdir <outdir>","Output directory (looks for .bunpress folder inside)").option("--open","Open in browser",{default:!1}).option("--verbose","Enable verbose logging",{default:j.verbose}).action(async(K)=>{await N6(K)});b.command("clean","Clean build artifacts").option("--outdir <outdir>","Output directory to clean",{default:j.outdir}).option("--force","Skip confirmation prompt",{default:!1}).option("--verbose","Enable verbose logging",{default:j.verbose}).action(async(K)=>{if(!await e(K))I.exit(1)});b.command("doctor","Run diagnostic checks on the project").option("--verbose","Enable verbose logging",{default:j.verbose}).action(async(K)=>{if(!await Q6(K))I.exit(1)});b.command("config:show","Show current configuration").option("--verbose","Enable verbose logging",{default:j.verbose}).action(async(K)=>{if(!await t(K))I.exit(1)});b.command("config:validate","Validate configuration file").option("--verbose","Enable verbose logging",{default:j.verbose}).action(async(K)=>{if(!await o(K))I.exit(1)});b.command("config:init","Initialize configuration file").action(async(K)=>{if(!await K6(K))I.exit(1)});b.command("new <path>","Create a new markdown file").option("--title <title>","Page title").option("--template <template>","Template to use (default, guide, api, blog)",{default:"default"}).option("--verbose","Enable verbose logging",{default:j.verbose}).action(async(K,Z)=>{if(!await X6(K,Z))I.exit(1)});b.command("stats","Show documentation statistics").option("--dir <dir>","Documentation directory",{default:"./docs"}).option("--verbose","Enable verbose logging",{default:j.verbose}).action(async(K)=>{if(!await _6(K))I.exit(1)});b.command("seo:check","Check SEO for all documentation pages").option("--dir <dir>","Documentation directory",{default:"./docs"}).option("--fix","Automatically fix issues (add missing titles/descriptions)",{default:!1}).action(async(K)=>{await H6(K)});b.command("deploy","Deploy documentation to AWS using CloudFormation (S3 + CloudFront + Route53)").option("--region <region>","AWS region for S3 bucket",{default:"us-east-1"}).option("--bucket <bucket>","S3 bucket name (auto-generated if not provided)").option("--domain <domain>","Custom domain (e.g., docs.example.com)").option("--subdomain <subdomain>","Subdomain (used with --base-domain)").option("--base-domain <baseDomain>","Base domain (e.g., example.com) - must have Route53 hosted zone").option("--stack-name <stackName>","CloudFormation stack name").option("--hosted-zone-id <hostedZoneId>","Route53 hosted zone ID (auto-detected from domain)").option("--certificate-arn <certificateArn>","ACM certificate ARN (auto-created if not provided)").option("--dry-run","Show configuration without deploying",{default:!1}).option("--verbose","Enable verbose logging",{default:j.verbose}).action(async(K)=>{let{deployCommand:Z}=await import("./chunk-vvc6x3cy.js");if(!await Z(K))I.exit(1)});b.help();b.version(s);var n=Bun.argv[1]||"",Q4=n.endsWith("/bunpress")||n.endsWith("/cli.ts")||n.endsWith("/cli.js");if(Q4)b.parse();
|
|
466
|
+
export{G as E,W as F,B as G,D as H,M6 as I,R6 as J};
|
package/dist/src/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{A as d,B as f,C as a,D as g,a as O,b as P,c as Q,d as S,e as T,f as V,g as W,h as X,i as Y,j as Z,k as _,l as $,m as b,n as v,o as x,p as A,q as F,r as R,s as U,t as m,u as C,v as h,w as l,x as y,y as p,z as c}from"../chunk-
|
|
2
|
+
import{A as d,B as f,C as a,D as g,a as O,b as P,c as Q,d as S,e as T,f as V,g as W,h as X,i as Y,j as Z,k as _,l as $,m as b,n as v,o as x,p as A,q as F,r as R,s as U,t as m,u as C,v as h,w as l,x as y,y as p,z as c}from"../chunk-s98n2933.js";import{K as j,L as k,M as q,N as u,O as w}from"../chunk-ss6yzy9f.js";import{P as L,Q as M,R as N}from"../chunk-e5q66hsy.js";import"../chunk-w6byd4st.js";export{d as wrapInLayout,c as stripConfiguredBasePath,a as startServer,g as serveCLI,O as resetHighlighter,C as processInlineTocSyntax,W as prewarmHighlighter,P as normalizeLanguage,f as markdownToHtml,Q as isLanguageSupported,T as highlightCodeSync,S as highlightCode,V as getSyntaxHighlightingStyles,X as getHighlighterInstance,p as getConfiguredBasePath,N as getConfig,_ as generateUniqueSlug,l as generateTocStyles,y as generateTocScripts,m as generateTocPositions,x as generateTocHtml,U as generateTocData,Z as generateSlug,w as generateSitemap,F as generateSidebarTocHtml,k as generateRssFeed,q as generateRobotsTxt,A as generateInlineTocHtml,R as generateFloatingTocHtml,v as filterHeadings,$ as extractHeadings,h as enhanceHeadingsWithAnchors,Y as defaultTocConfig,L as defaultConfig,M as config,b as buildTocHierarchy,u as buildSitemap,j as buildRssFeed};
|