@stacksjs/bunpress 0.2.20 → 0.2.22

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.d.ts CHANGED
@@ -1,9 +1,6 @@
1
1
  import { config } from '../src/config';
2
+ import { findMarkdownFiles } from '../src/markdown-pages';
2
3
  import type { BunPressConfig } from '../src/types';
3
- /**
4
- * Find all markdown files in the given directory
5
- */
6
- export declare function findMarkdownFiles(dir: string): Promise<string[]>;
7
4
  /**
8
5
  * Resolve the effective config for a command.
9
6
  *
@@ -40,3 +37,4 @@ declare interface CliOption {
40
37
  force?: boolean
41
38
  searchIndex?: boolean
42
39
  }
40
+ export { findMarkdownFiles } from '../src/markdown-pages';
package/dist/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- import{u as a,v as b,w as c}from"../chunk-btaakbga.js";import"../chunk-rcr6k1et.js";import"../chunk-3ymfys00.js";import"../chunk-rnzqf7rp.js";export{b as resolveConfig,a as findMarkdownFiles,c as buildDocs};
3
+ import{t as b,u as c}from"../chunk-zpf2c5ag.js";import"../chunk-xjz041s0.js";import{da as a}from"../chunk-8rsrw3sw.js";import"../chunk-ynp2pgxy.js";export{b as resolveConfig,a as findMarkdownFiles,c as buildDocs};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{fa as a,ga as b,ha as c,ia as d,ja as e,ka as f,la as g,ma as h,na as i}from"./chunk-rnzqf7rp.js";export{c as splitLocaleFromPath,a as resolveI18nConfig,d as localizeUrl,g as localeLabel,e as localeContentCandidates,b as loadI18nTranslations,i as generateLocaleDetectionScript,h as generateHreflangTags,f as configForLocale};
2
+ import{ia as a,ja as b,ka as c,la as d,ma as e,na as f,oa as g,pa as h,qa as i}from"./chunk-ynp2pgxy.js";export{c as splitLocaleFromPath,a as resolveI18nConfig,d as localizeUrl,g as localeLabel,e as localeContentCandidates,b as loadI18nTranslations,i as generateLocaleDetectionScript,h as generateHreflangTags,f as configForLocale};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{fa as o,ia as C}from"./chunk-rnzqf7rp.js";import{loadConfig as n}from"bunfig";var t={docsDir:"./docs",outDir:"./dist",theme:"vitepress",nav:[{text:"Guide",link:"/install"},{text:"API",link:"/advanced#api-reference"},{text:"Examples",link:"/examples"}],plugins:[],markdown:{title:"BunPress Documentation",meta:{description:"Documentation built with BunPress",generator:"BunPress",viewport:"width=device-width, initial-scale=1.0"},sidebar:{"/":[{text:"Getting Started",items:[{text:"Introduction",link:"/"},{text:"Installation",link:"/install"},{text:"Quick Start",link:"/quick-start"},{text:"Usage",link:"/usage"},{text:"Configuration",link:"/config"}]},{text:"Core Features",items:[{text:"Features Overview",link:"/features"},{text:"Markdown Extensions",link:"/markdown-extensions"},{text:"Syntax Highlighting",link:"/syntax-highlighting"},{text:"Table of Contents",link:"/table-of-contents"},{text:"CLI Commands",link:"/cli"}]},{text:"SEO & Analytics",items:[{text:"SEO Features",link:"/seo"},{text:"Analytics (Fathom)",link:"/config#fathom-analytics-configuration"}]},{text:"Advanced",items:[{text:"Advanced Usage",link:"/advanced"},{text:"Examples",link:"/examples"},{text:"Best Practices",link:"/best-practices"}]},{text:"More",items:[{text:"Showcase",link:"/showcase"},{text:"Partners",link:"/partners"},{text:"License",link:"/license"},{text:"Postcardware",link:"/postcardware"}]}]},css:`
2
+ import{ia as Q0,la as L,ma as Y0}from"./chunk-ynp2pgxy.js";import{loadConfig as z0}from"bunfig";var K0={docsDir:"./docs",outDir:"./dist",theme:"vitepress",nav:[{text:"Guide",link:"/install"},{text:"API",link:"/advanced#api-reference"},{text:"Examples",link:"/examples"}],plugins:[],markdown:{title:"BunPress Documentation",meta:{description:"Documentation built with BunPress",generator:"BunPress",viewport:"width=device-width, initial-scale=1.0"},sidebar:{"/":[{text:"Getting Started",items:[{text:"Introduction",link:"/"},{text:"Installation",link:"/install"},{text:"Quick Start",link:"/quick-start"},{text:"Usage",link:"/usage"},{text:"Configuration",link:"/config"}]},{text:"Core Features",items:[{text:"Features Overview",link:"/features"},{text:"Markdown Extensions",link:"/markdown-extensions"},{text:"Syntax Highlighting",link:"/syntax-highlighting"},{text:"Table of Contents",link:"/table-of-contents"},{text:"CLI Commands",link:"/cli"}]},{text:"SEO & Analytics",items:[{text:"SEO Features",link:"/seo"},{text:"Analytics (Fathom)",link:"/config#fathom-analytics-configuration"}]},{text:"Advanced",items:[{text:"Advanced Usage",link:"/advanced"},{text:"Examples",link:"/examples"},{text:"Best Practices",link:"/best-practices"}]},{text:"More",items:[{text:"Showcase",link:"/showcase"},{text:"Partners",link:"/partners"},{text:"License",link:"/license"},{text:"Postcardware",link:"/postcardware"}]}]},css:`
3
3
  /* Additional BunPress customizations */
4
4
  /* Note: Base styles are provided by the VitePress theme */
5
5
 
@@ -1236,19 +1236,19 @@ if (typeof document !== 'undefined') {
1236
1236
  }
1237
1237
  });
1238
1238
  }
1239
- `],preserveDirectoryStructure:!0,features:{inlineFormatting:!0,containers:!0,githubAlerts:!0,codeBlocks:{lineHighlighting:!0,lineNumbers:!0,focus:!0,diffs:!0,errorWarningMarkers:!0},codeGroups:!0,codeImports:!0,inlineToc:!0,customAnchors:!0,emoji:!0,badges:!0,includes:!0,externalLinks:{autoTarget:!0,autoRel:!0,showIcon:!0},imageLazyLoading:!0,tables:{alignment:!0,enhancedStyling:!0,responsive:!0}},syntaxHighlightTheme:"github-light"},search:{enabled:!0,maxResults:12,keyboardShortcuts:!0},themeConfig:{socialLinks:[{icon:"github",link:"https://github.com/stacksjs/bunpress"}]},verbose:!1,sitemap:{enabled:!0,filename:"sitemap.xml",defaultPriority:0.5,defaultChangefreq:"monthly",maxUrlsPerFile:50000,useSitemapIndex:!1},robots:{enabled:!0,filename:"robots.txt"}};function e($){let Q=$.plugins;if(!Array.isArray(Q)||Q.length===0)return $;let Z=$;for(let J of Q){if(!J||typeof J!=="object")continue;let V=J.name||"unnamed plugin";try{if(typeof J.extendConfig==="function")Z=J.extendConfig(Z)??Z}catch(W){console.error(`[bunpress] ${V}: extendConfig failed \u2014`,W)}try{if(typeof J.validateConfig==="function"){let W=J.validateConfig(Z);for(let X of W?.warnings??[])console.warn(`[bunpress] ${V}: ${X}`);for(let X of W?.errors??[])console.error(`[bunpress] ${V}: ${X}`)}}catch(W){console.error(`[bunpress] ${V}: validateConfig failed \u2014`,W)}}for(let J of Q)try{J?.onConfigLoad?.(Z)}catch(V){console.error(`[bunpress] ${J?.name||"unnamed plugin"}: onConfigLoad failed \u2014`,V)}return Z}async function QQ(){let $=["bunpress.config.ts","bunpress.config.js",".config/bunpress.ts","docs.config.ts",".config/docs.ts"],Q=[];for(let Z of $)if(await Bun.file(Z).exists())Q.push(Z);if(Q.length>1){let[Z,...J]=Q;console.warn(`[bunpress] Multiple config files found. Using ${Z}; ignoring ${J.join(", ")}.`)}await ZQ(Q.length>0)}async function ZQ($){let Q=["docs","documentation","site"],Z=["bunpress.config.ts","bunpress.config.js","docs.config.ts"];for(let J of Q)for(let V of Z){let W=`${J}/${V}`;if(!await Bun.file(W).exists())continue;let X=$?`merge it into the config at the project root, or pass --config ${W}`:`move it to ./${V}, or pass --config ${W}`;console.warn(`[bunpress] ${W} is never loaded: config is discovered from the working directory, not the docs directory. To use it, ${X}.`);return}}await QQ();var $Q=e(await n({name:"bunpress",alias:"docs",defaultConfig:t}));async function TQ(){return $Q}function D(){let $=null;return(Q)=>{let Z=Q.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if(!Z)return $!==null;let J=Z[1];if($===null)return $=J,!0;let V=J[0]===$[0],W=J.length>=$.length;if(V&&W&&Z[2].trim()==="")$=null;return!0}}function T($){let Q=D();return $.split(`
1239
+ `],preserveDirectoryStructure:!0,features:{inlineFormatting:!0,containers:!0,githubAlerts:!0,codeBlocks:{lineHighlighting:!0,lineNumbers:!0,focus:!0,diffs:!0,errorWarningMarkers:!0},codeGroups:!0,codeImports:!0,inlineToc:!0,customAnchors:!0,emoji:!0,badges:!0,includes:!0,externalLinks:{autoTarget:!0,autoRel:!0,showIcon:!0},imageLazyLoading:!0,tables:{alignment:!0,enhancedStyling:!0,responsive:!0}},syntaxHighlightTheme:"github-light"},search:{enabled:!0,maxResults:12,keyboardShortcuts:!0},themeConfig:{socialLinks:[{icon:"github",link:"https://github.com/stacksjs/bunpress"}]},verbose:!1,sitemap:{enabled:!0,filename:"sitemap.xml",defaultPriority:0.5,defaultChangefreq:"monthly",maxUrlsPerFile:50000,useSitemapIndex:!1},robots:{enabled:!0,filename:"robots.txt"}};function G0(X){let Q=X.plugins;if(!Array.isArray(Q)||Q.length===0)return X;let Z=X;for(let $ of Q){if(!$||typeof $!=="object")continue;let J=$.name||"unnamed plugin";try{if(typeof $.extendConfig==="function")Z=$.extendConfig(Z)??Z}catch(V){console.error(`[bunpress] ${J}: extendConfig failed \u2014`,V)}try{if(typeof $.validateConfig==="function"){let V=$.validateConfig(Z);for(let W of V?.warnings??[])console.warn(`[bunpress] ${J}: ${W}`);for(let W of V?.errors??[])console.error(`[bunpress] ${J}: ${W}`)}}catch(V){console.error(`[bunpress] ${J}: validateConfig failed \u2014`,V)}}for(let $ of Q)try{$?.onConfigLoad?.(Z)}catch(J){console.error(`[bunpress] ${$?.name||"unnamed plugin"}: onConfigLoad failed \u2014`,J)}return Z}async function B0(){let X=["bunpress.config.ts","bunpress.config.js",".config/bunpress.ts","docs.config.ts",".config/docs.ts"],Q=[];for(let Z of X)if(await Bun.file(Z).exists())Q.push(Z);if(Q.length>1){let[Z,...$]=Q;console.warn(`[bunpress] Multiple config files found. Using ${Z}; ignoring ${$.join(", ")}.`)}await N0(Q.length>0)}async function N0(X){let Q=["docs","documentation","site"],Z=["bunpress.config.ts","bunpress.config.js","docs.config.ts"];for(let $ of Q)for(let J of Z){let V=`${$}/${J}`;if(!await Bun.file(V).exists())continue;let W=X?`merge it into the config at the project root, or pass --config ${V}`:`move it to ./${J}, or pass --config ${V}`;console.warn(`[bunpress] ${V} is never loaded: config is discovered from the working directory, not the docs directory. To use it, ${W}.`);return}}await B0();var M0=G0(await z0({name:"bunpress",alias:"docs",defaultConfig:K0}));async function n0(){return M0}function E(){let X=null;return(Q)=>{let Z=Q.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if(!Z)return X!==null;let $=Z[1];if(X===null)return X=$,!0;let J=$[0]===X[0],V=$.length>=X.length;if(J&&V&&Z[2].trim()==="")X=null;return!0}}function p(X){let Q=E();return X.split(`
1240
1240
  `).filter((Z)=>!Q(Z)).join(`
1241
- `)}function S($){return`\x00BPCODE${$}\x00`}var JQ=/\u0000BPCODE(\d+)\u0000/g;function VQ($){let Q=[],Z=D(),J=[],V=null,W=()=>{if(!V)return;Q.push(V.join(`
1242
- `)),J.push(S(Q.length-1)),V=null};for(let X of $.split(`
1243
- `)){if(Z(X)){V??=[],V.push(X);continue}W(),J.push(X.replace(/(`+)(?:(?!\1)[\s\S])*\1/g,(j)=>{return Q.push(j),S(Q.length-1)}))}return W(),{masked:J.join(`
1244
- `),restore:(X)=>X.replace(JQ,(j,Y)=>Q[Number(Y)]??j)}}async function kQ($,Q){let{masked:Z,restore:J}=VQ($);return J(await Q(Z))}var WQ=["email","sms"];function XQ($){return WQ.includes($.toLowerCase())}function F($){return $.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var m=/\{\{\s*([\w.-]+)\s*\}\}|\{([\w.-]+)\}/g;function R($){return F($).replace(/`([^`]+)`/g,"<code>$1</code>").replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/(^|[^*\w])\*([^*\s][^*]*)\*(?!\w)/g,"$1<em>$2</em>").replace(m,(Q)=>`<span class="bp-message-var">${Q}</span>`)}var YQ=/\[([^\]]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>()]+[^\s<>().,;:!?'"])/g;function M($){let Q="",Z=0;for(let J of $.matchAll(YQ)){Q+=R($.slice(Z,J.index));let V=J[2]??J[3],W=J[1]??J[3];Q+=`<a href="${F(V)}" target="_blank" rel="noopener noreferrer">${R(W)}</a>`,Z=J.index+J[0].length}return Q+R($.slice(Z))}var x=/^([A-Za-z][\w-]*):\s*(.*)$/,H=/^\s*-{3,}\s*$/;function A($,Q){let Z=$.replace(/\r\n?/g,`
1241
+ `)}function u(X){return`\x00BPCODE${X}\x00`}var U0=/\u0000BPCODE(\d+)\u0000/g;function I0(X){let Q=[],Z=E(),$=[],J=null,V=()=>{if(!J)return;Q.push(J.join(`
1242
+ `)),$.push(u(Q.length-1)),J=null};for(let W of X.split(`
1243
+ `)){if(Z(W)){J??=[],J.push(W);continue}V(),$.push(W.replace(/(`+)(?:(?!\1)[\s\S])*\1/g,(q)=>{return Q.push(q),u(Q.length-1)}))}return V(),{masked:$.join(`
1244
+ `),restore:(W)=>W.replace(U0,(q,j)=>Q[Number(j)]??q)}}async function e0(X,Q){let{masked:Z,restore:$}=I0(X);return $(await Q(Z))}var _0=["email","sms"];function F0(X){return _0.includes(X.toLowerCase())}function F(X){return X.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var c=/\{\{\s*([\w.-]+)\s*\}\}|\{([\w.-]+)\}/g;function P(X){return F(X).replace(/`([^`]+)`/g,"<code>$1</code>").replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/(^|[^*\w])\*([^*\s][^*]*)\*(?!\w)/g,"$1<em>$2</em>").replace(c,(Q)=>`<span class="bp-message-var">${Q}</span>`)}var R0=/\[([^\]]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>()]+[^\s<>().,;:!?'"])/g;function _(X){let Q="",Z=0;for(let $ of X.matchAll(R0)){Q+=P(X.slice(Z,$.index));let J=$[2]??$[3],V=$[1]??$[3];Q+=`<a href="${F(J)}" target="_blank" rel="noopener noreferrer">${P(V)}</a>`,Z=$.index+$[0].length}return Q+P(X.slice(Z))}var g=/^([A-Za-z][\w-]*):\s*(.*)$/,y=/^\s*-{3,}\s*$/;function S(X,Q){let Z=X.replace(/\r\n?/g,`
1245
1245
  `).replace(/^\n+|\n+$/g,"").split(`
1246
- `),J=[],V=0,W=Z.findIndex((j)=>H.test(j));if(W>0){let j=Z.slice(0,W).filter((Y)=>Y.trim()!=="");if(j.length>0&&j.every((Y)=>x.test(Y))){for(let Y of j){let[,K,z]=Y.match(x);J.push({key:K.toLowerCase(),value:z.trim()})}V=W+1}}let X=[[]];for(let j of Z.slice(V)){if(Q&&H.test(j)){X.push([]);continue}X[X.length-1].push(j)}return{headers:J,parts:X.map((j)=>jQ(j)).filter((j)=>j.length>0)}}function jQ($){let Q=0,Z=$.length;while(Q<Z&&$[Q].trim()==="")Q++;while(Z>Q&&$[Z-1].trim()==="")Z--;return $.slice(Q,Z)}function qQ($){let Q=[[]];for(let Z of $){if(Z.trim()===""){if(Q[Q.length-1].length>0)Q.push([]);continue}Q[Q.length-1].push(Z)}return Q.filter((Z)=>Z.length>0)}var k=/^\s*\[([^\]]+)\]\(([^)\s]+)\)\s*$/,f=/^\s*[-*]\s+/;function zQ($){return qQ($).map((Q)=>{if(Q.length===1&&H.test(Q[0]))return"<hr>";if(Q.every((Z)=>k.test(Z)))return`<p class="bp-email-actions">${Q.map((J)=>{let[,V,W]=J.match(k);return`<a class="bp-email-button" href="${F(W)}" target="_blank" rel="noopener noreferrer">${R(V)}</a>`}).join("")}</p>`;if(Q.every((Z)=>f.test(Z)))return`<ul>${Q.map((Z)=>`<li>${M(Z.replace(f,""))}</li>`).join("")}</ul>`;if(Q.every((Z)=>Z.startsWith(">")))return`<blockquote>${Q.map((Z)=>M(Z.replace(/^>\s?/,""))).join("<br>")}</blockquote>`;return Q.join(`
1246
+ `),$=[],J=0,V=Z.findIndex((q)=>y.test(q));if(V>0){let q=Z.slice(0,V).filter((j)=>j.trim()!=="");if(q.length>0&&q.every((j)=>g.test(j))){for(let j of q){let[,G,K]=j.match(g);$.push({key:G.toLowerCase(),value:K.trim()})}J=V+1}}let W=[[]];for(let q of Z.slice(J)){if(Q&&y.test(q)){W.push([]);continue}W[W.length-1].push(q)}return{headers:$,parts:W.map((q)=>D0(q)).filter((q)=>q.length>0)}}function D0(X){let Q=0,Z=X.length;while(Q<Z&&X[Q].trim()==="")Q++;while(Z>Q&&X[Z-1].trim()==="")Z--;return X.slice(Q,Z)}function O0(X){let Q=[[]];for(let Z of X){if(Z.trim()===""){if(Q[Q.length-1].length>0)Q.push([]);continue}Q[Q.length-1].push(Z)}return Q.filter((Z)=>Z.length>0)}var h=/^\s*\[([^\]]+)\]\(([^)\s]+)\)\s*$/,d=/^\s*[-*]\s+/;function H0(X){return O0(X).map((Q)=>{if(Q.length===1&&y.test(Q[0]))return"<hr>";if(Q.every((Z)=>h.test(Z)))return`<p class="bp-email-actions">${Q.map(($)=>{let[,J,V]=$.match(h);return`<a class="bp-email-button" href="${F(V)}" target="_blank" rel="noopener noreferrer">${P(J)}</a>`}).join("")}</p>`;if(Q.every((Z)=>d.test(Z)))return`<ul>${Q.map((Z)=>`<li>${_(Z.replace(d,""))}</li>`).join("")}</ul>`;if(Q.every((Z)=>Z.startsWith(">")))return`<blockquote>${Q.map((Z)=>_(Z.replace(/^>\s?/,""))).join("<br>")}</blockquote>`;return Q.join(`
1247
1247
  `).split(/\n\s*-{3,}\s*\n?/).map((Z)=>`<p>${Z.split(`
1248
- `).map(M).join("<br>")}</p>`).join("<hr>")}).join(`
1249
- `)}var KQ={from:"From",to:"To",cc:"Cc",bcc:"Bcc","reply-to":"Reply-To"};function u($){return KQ[$]??$.replace(/[-_]/g," ").replace(/^\w/,(Q)=>Q.toUpperCase())}function GQ($){let{headers:Q,parts:Z}=A($,!1),J=Q.find((X)=>X.key==="subject")?.value,V=Q.find((X)=>X.key==="preheader")?.value,W=Q.filter((X)=>X.key!=="subject"&&X.key!=="preheader").map((X)=>`<div><dt>${F(u(X.key))}</dt><dd>${M(X.value)}</dd></div>`).join("");return['<figure class="bp-email bp-message" aria-label="Email preview">','<div class="bp-email-bar"><span class="bp-email-dots" aria-hidden="true"><i></i><i></i><i></i></span><span class="bp-message-kind">Email</span></div>',J?`<div class="bp-email-subject">${M(J)}</div>`:"",W?`<dl class="bp-email-headers">${W}</dl>`:"",V?`<div class="bp-email-preheader"><span>Preview text</span> ${M(V)}</div>`:"",`<div class="bp-email-body">${zQ(Z[0]??[])}</div>`,"</figure>"].join("")}var BQ=`@\xA3$\xA5\xE8\xE9\xF9\xEC\xF2\xC7
1250
- \xD8\xF8\r\xC5\xE5\u0394_\u03A6\u0393\u039B\u03A9\u03A0\u03A8\u03A3\u0398\u039E\xC6\xE6\xDF\xC9 !"#\xA4%&'()*+,-./0123456789:;<=>?\xA1ABCDEFGHIJKLMNOPQRSTUVWXYZ\xC4\xD6\xD1\xDC\xA7\xBFabcdefghijklmnopqrstuvwxyz\xE4\xF6\xF1\xFC\xE0`,NQ="^{}\\[~]|\u20AC\f";function MQ($){let Q=0,Z=!0;for(let V of $)if(BQ.includes(V))Q+=1;else if(NQ.includes(V))Q+=2;else{Z=!1;break}if(Z)return{encoding:"GSM-7",length:Q,segments:Q<=160?1:Math.ceil(Q/153)};let J=$.length;return{encoding:"UCS-2",length:J,segments:J<=70?1:Math.ceil(J/67)}}function UQ($){let Q=$.replace(m,""),Z=Q!==$;if(Z&&Q.trim()==="")return'<div class="bp-sms-meta">Length depends on what is filled in</div>';let{encoding:J,length:V,segments:W}=MQ(Q),X=Z?" + placeholders":"",j=`${Z?"at least ":""}${W} ${W===1?"segment":"segments"}`,Y=`${V} ${J==="GSM-7"?"characters":"UTF-16 units"} (${J})${Z?", not counting placeholders":""}`;return`<div class="bp-sms-meta" title="${F(Y)}">${V} chars${X} \xB7 ${j}${J==="UCS-2"?" \xB7 Unicode":""}</div>`}function FQ($){let{headers:Q,parts:Z}=A($,!0),J=Q.find((Y)=>Y.key==="from")?.value??"",V=Q.find((Y)=>Y.key==="to")?.value,W=Q.filter((Y)=>Y.key!=="from"&&Y.key!=="to").map((Y)=>`<div><dt>${F(u(Y.key))}</dt><dd>${M(Y.value)}</dd></div>`).join(""),X=(J.replace(/[^A-Za-z0-9]/g,"")[0]??"#").toUpperCase(),j=Z.map((Y)=>{let K=Y.every((q)=>q.trim()===""||q.startsWith(">")),z=K?Y.map((q)=>q.replace(/^>\s?/,"")):Y,G=z.join(`
1251
- `),B=z.map(M).join("<br>");if(K)return`<div class="bp-sms-reply bp-sms-row"><div class="bp-sms-bubble">${B}</div></div>`;return`<div class="bp-sms-row"><div class="bp-sms-bubble">${B}</div>${UQ(G)}</div>`}).join("");return['<figure class="bp-message bp-sms" aria-label="SMS preview">','<div class="bp-sms-phone">','<div class="bp-sms-header">',`<span class="bp-sms-avatar" aria-hidden="true">${F(X)}</span>`,'<span class="bp-sms-who">',`<span class="bp-sms-from">${M(J||"Text message")}</span>`,V?`<span class="bp-sms-to">to ${M(V)}</span>`:"","</span>",'<span class="bp-message-kind">SMS</span>',"</div>",W?`<dl class="bp-sms-details">${W}</dl>`:"",`<div class="bp-sms-thread">${j}</div>`,"</div>","</figure>"].join("")}function mQ($,Q){switch($.toLowerCase()){case"email":return GQ(Q);case"sms":return FQ(Q);default:return null}}var uQ=`
1248
+ `).map(_).join("<br>")}</p>`).join("<hr>")}).join(`
1249
+ `)}var A0={from:"From",to:"To",cc:"Cc",bcc:"Bcc","reply-to":"Reply-To"};function l(X){return A0[X]??X.replace(/[-_]/g," ").replace(/^\w/,(Q)=>Q.toUpperCase())}function L0(X){let{headers:Q,parts:Z}=S(X,!1),$=Q.find((W)=>W.key==="subject")?.value,J=Q.find((W)=>W.key==="preheader")?.value,V=Q.filter((W)=>W.key!=="subject"&&W.key!=="preheader").map((W)=>`<div><dt>${F(l(W.key))}</dt><dd>${_(W.value)}</dd></div>`).join("");return['<figure class="bp-email bp-message" aria-label="Email preview">','<div class="bp-email-bar"><span class="bp-email-dots" aria-hidden="true"><i></i><i></i><i></i></span><span class="bp-message-kind">Email</span></div>',$?`<div class="bp-email-subject">${_($)}</div>`:"",V?`<dl class="bp-email-headers">${V}</dl>`:"",J?`<div class="bp-email-preheader"><span>Preview text</span> ${_(J)}</div>`:"",`<div class="bp-email-body">${H0(Z[0]??[])}</div>`,"</figure>"].join("")}var C0=`@\xA3$\xA5\xE8\xE9\xF9\xEC\xF2\xC7
1250
+ \xD8\xF8\r\xC5\xE5\u0394_\u03A6\u0393\u039B\u03A9\u03A0\u03A8\u03A3\u0398\u039E\xC6\xE6\xDF\xC9 !"#\xA4%&'()*+,-./0123456789:;<=>?\xA1ABCDEFGHIJKLMNOPQRSTUVWXYZ\xC4\xD6\xD1\xDC\xA7\xBFabcdefghijklmnopqrstuvwxyz\xE4\xF6\xF1\xFC\xE0`,E0="^{}\\[~]|\u20AC\f";function P0(X){let Q=0,Z=!0;for(let J of X)if(C0.includes(J))Q+=1;else if(E0.includes(J))Q+=2;else{Z=!1;break}if(Z)return{encoding:"GSM-7",length:Q,segments:Q<=160?1:Math.ceil(Q/153)};let $=X.length;return{encoding:"UCS-2",length:$,segments:$<=70?1:Math.ceil($/67)}}function w0(X){let Q=X.replace(c,""),Z=Q!==X;if(Z&&Q.trim()==="")return'<div class="bp-sms-meta">Length depends on what is filled in</div>';let{encoding:$,length:J,segments:V}=P0(Q),W=Z?" + placeholders":"",q=`${Z?"at least ":""}${V} ${V===1?"segment":"segments"}`,j=`${J} ${$==="GSM-7"?"characters":"UTF-16 units"} (${$})${Z?", not counting placeholders":""}`;return`<div class="bp-sms-meta" title="${F(j)}">${J} chars${W} \xB7 ${q}${$==="UCS-2"?" \xB7 Unicode":""}</div>`}function y0(X){let{headers:Q,parts:Z}=S(X,!0),$=Q.find((j)=>j.key==="from")?.value??"",J=Q.find((j)=>j.key==="to")?.value,V=Q.filter((j)=>j.key!=="from"&&j.key!=="to").map((j)=>`<div><dt>${F(l(j.key))}</dt><dd>${_(j.value)}</dd></div>`).join(""),W=($.replace(/[^A-Za-z0-9]/g,"")[0]??"#").toUpperCase(),q=Z.map((j)=>{let G=j.every((Y)=>Y.trim()===""||Y.startsWith(">")),K=G?j.map((Y)=>Y.replace(/^>\s?/,"")):j,B=K.join(`
1251
+ `),z=K.map(_).join("<br>");if(G)return`<div class="bp-sms-reply bp-sms-row"><div class="bp-sms-bubble">${z}</div></div>`;return`<div class="bp-sms-row"><div class="bp-sms-bubble">${z}</div>${w0(B)}</div>`}).join("");return['<figure class="bp-message bp-sms" aria-label="SMS preview">','<div class="bp-sms-phone">','<div class="bp-sms-header">',`<span class="bp-sms-avatar" aria-hidden="true">${F(W)}</span>`,'<span class="bp-sms-who">',`<span class="bp-sms-from">${_($||"Text message")}</span>`,J?`<span class="bp-sms-to">to ${_(J)}</span>`:"","</span>",'<span class="bp-message-kind">SMS</span>',"</div>",V?`<dl class="bp-sms-details">${V}</dl>`:"",`<div class="bp-sms-thread">${q}</div>`,"</div>","</figure>"].join("")}function X1(X,Q){switch(X.toLowerCase()){case"email":return L0(Q);case"sms":return y0(Q);default:return null}}var Z1=`
1252
1252
  .bp-message {
1253
1253
  margin: 20px 0;
1254
1254
  font-size: 15px;
@@ -1491,17 +1491,17 @@ if (typeof document !== 'undefined') {
1491
1491
  font-size: 11px;
1492
1492
  color: var(--bp-c-text-3, #929295);
1493
1493
  }
1494
- `;function p($){let Q=[],Z=null,J=null;for(let V of $.split(`
1495
- `)){let W=V.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if(J){if(W&&W[1][0]===J.marker[0]&&W[1].length>=J.marker.length&&W[2].trim()===""){let{headers:X,parts:j}=A(J.lines.join(`
1496
- `),!0);Q.push("",...X.map((Y)=>Y.value),...j.flat(),""),J=null}else J.lines.push(V);continue}if(Z){if(W&&W[1][0]===Z[0]&&W[1].length>=Z.length&&W[2].trim()==="")Z=null;Q.push(V);continue}if(W){if(XQ(W[2].trim().split(/[\s{]/)[0]??""))J={marker:W[1],lines:[]};else Z=W[1];if(!J)Q.push(V);continue}Q.push(V)}return Q.join(`
1497
- `)}var IQ={enabled:!0,position:["sidebar"],title:"Table of Contents",maxDepth:6,minDepth:2,className:"table-of-contents",smoothScroll:!0,activeHighlight:!0,collapsible:!0,exclude:[]};function L($){return $.replace(/\s*<!-- toc-ignore -->\s*/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\*\*(.+?)\*\*/g,"$1").replace(/__(.+?)__/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/_(.+?)_/g,"$1").replace(/~~(.+?)~~/g,"$1").replace(/<[^>]*>/g,"").trim()}function P($){return $.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 w($,Q){let Z=$,J=1;while(Q.has($))$=`${Z}-${J}`,J++;return Q.add($),$}function g($,Q){return w(P($),Q)}function _Q($){let Q=[],Z=new Set,J=/^(#{1,6})\s+(.+)$/gm,V;while((V=J.exec($))!==null){let W=V[1].length,X=V[2].trim();if(!X)continue;if(X.includes("toc-ignore"))continue;let j=X.replace(/\s*<!-- toc-ignore -->\s*/g,"").trim();j=j.replace(/`([^`]+)`/g,"<code>$1</code>");let Y=j.includes("<code>"),K=g(L(X),Z);Q.push({level:W,text:j,id:K,children:[],hasCode:Y})}return Q}function DQ($){let Q=[],Z=[];for(let J of $){while(Z.length>0&&Z[Z.length-1].level>=J.level)Z.pop();if(Z.length===0)Q.push(J);else Z[Z.length-1].children.push(J);Z.push(J)}return Q}function RQ($,Q){let{minDepth:Z=2,maxDepth:J=6,exclude:V=[]}=Q,W=(X)=>{let j=[];for(let Y of X){if(V.some((z)=>{if(z.startsWith("/")&&z.endsWith("/"))return new RegExp(z.slice(1,-1)).test(Y.text);else return Y.text===z}))continue;if(Y.level>J)continue;let K=W(Y.children);if(Y.level>=Z&&Y.level<=J)j.push({...Y,children:K});else j.push(...K)}return j};return W($)}function y($){let{items:Q,title:Z,config:J}=$,{className:V,collapsible:W}=J,X=(j,Y=0)=>{if(j.length===0)return"";let K=Y===0?"toc-list":"toc-sublist",z=Y===0?"toc-item":"toc-subitem";return`<ul class="${K}">
1498
- ${j.map((G)=>{let B=G.children.length>0,q=B&&W?"toc-expand":"",_=B?X(G.children,Y+1):"",E=50,N=G.text.length>50?`${G.text.substring(0,50)}...`:G.text,U=G.text.length>50?"toc-truncate":"";return`<li class="${G.hasCode?"toc-code":""} ${q} ${z} ${U}">
1499
- <a href="#${G.id}" class="toc-link" title="${G.text.replace(/<[^>]*>/g,"")}">${N}</a>
1500
- ${_}
1494
+ `;function r(X){let Q=[],Z=null,$=null;for(let J of X.split(`
1495
+ `)){let V=J.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if($){if(V&&V[1][0]===$.marker[0]&&V[1].length>=$.marker.length&&V[2].trim()===""){let{headers:W,parts:q}=S($.lines.join(`
1496
+ `),!0);Q.push("",...W.map((j)=>j.value),...q.flat(),""),$=null}else $.lines.push(J);continue}if(Z){if(V&&V[1][0]===Z[0]&&V[1].length>=Z.length&&V[2].trim()==="")Z=null;Q.push(J);continue}if(V){if(F0(V[2].trim().split(/[\s{]/)[0]??""))$={marker:V[1],lines:[]};else Z=V[1];if(!$)Q.push(J);continue}Q.push(J)}return Q.join(`
1497
+ `)}var S0={enabled:!0,position:["sidebar"],title:"Table of Contents",maxDepth:6,minDepth:2,className:"table-of-contents",smoothScroll:!0,activeHighlight:!0,collapsible:!0,exclude:[]};function v(X){return X.replace(/\s*<!-- toc-ignore -->\s*/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\*\*(.+?)\*\*/g,"$1").replace(/__(.+?)__/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/_(.+?)_/g,"$1").replace(/~~(.+?)~~/g,"$1").replace(/<[^>]*>/g,"").trim()}function T(X){return X.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 b(X,Q){let Z=X,$=1;while(Q.has(X))X=`${Z}-${$}`,$++;return Q.add(X),X}function s(X,Q){return b(T(X),Q)}function v0(X){let Q=[],Z=new Set,$=/^(#{1,6})\s+(.+)$/gm,J;while((J=$.exec(X))!==null){let V=J[1].length,W=J[2].trim();if(!W)continue;if(W.includes("toc-ignore"))continue;let q=W.replace(/\s*<!-- toc-ignore -->\s*/g,"").trim();q=q.replace(/`([^`]+)`/g,"<code>$1</code>");let j=q.includes("<code>"),G=s(v(W),Z);Q.push({level:V,text:q,id:G,children:[],hasCode:j})}return Q}function T0(X){let Q=[],Z=[];for(let $ of X){while(Z.length>0&&Z[Z.length-1].level>=$.level)Z.pop();if(Z.length===0)Q.push($);else Z[Z.length-1].children.push($);Z.push($)}return Q}function b0(X,Q){let{minDepth:Z=2,maxDepth:$=6,exclude:J=[]}=Q,V=(W)=>{let q=[];for(let j of W){if(J.some((K)=>{if(K.startsWith("/")&&K.endsWith("/"))return new RegExp(K.slice(1,-1)).test(j.text);else return j.text===K}))continue;if(j.level>$)continue;let G=V(j.children);if(j.level>=Z&&j.level<=$)q.push({...j,children:G});else q.push(...G)}return q};return V(X)}function w(X){let{items:Q,title:Z,config:$}=X,{className:J,collapsible:V}=$,W=(q,j=0)=>{if(q.length===0)return"";let G=j===0?"toc-list":"toc-sublist",K=j===0?"toc-item":"toc-subitem";return`<ul class="${G}">
1498
+ ${q.map((B)=>{let z=B.children.length>0,Y=z&&V?"toc-expand":"",M=z?W(B.children,j+1):"",I=50,N=B.text.length>50?`${B.text.substring(0,50)}...`:B.text,U=B.text.length>50?"toc-truncate":"";return`<li class="${B.hasCode?"toc-code":""} ${Y} ${K} ${U}">
1499
+ <a href="#${B.id}" class="toc-link" title="${B.text.replace(/<[^>]*>/g,"")}">${N}</a>
1500
+ ${M}
1501
1501
  </li>`}).join(`
1502
1502
  `)}
1503
- </ul>`};return[`<nav class="${V}" role="navigation" aria-label="${Z}">`,'<div class="toc-container">',` <h2 class="toc-title">${Z}</h2>`,` ${X(Q)}`,"</div>","</nav>"].join(`
1504
- `)}function h($){return y($).replace("table-of-contents","table-of-contents toc-inline inline-toc")}function yQ($){return y($).replace("table-of-contents","table-of-contents toc-sidebar sidebar-toc")}function OQ($){return y($).replace("table-of-contents","table-of-contents toc-floating floating-toc")}function HQ($,Q={}){let Z={...Q};if(typeof Z.position==="string")Z.position=[Z.position];let J={...IQ,...Z},V=_Q($),W=DQ(V),X=RQ(W,J);return{title:J.title,items:X,config:J}}function gQ($,Q={}){let Z=HQ($,Q);return(Array.isArray(Q.position)?Q.position:[Q.position||"sidebar"]).map((V)=>{let W;switch(V){case"inline":W=h(Z);break;case"sidebar":W=yQ(Z);break;case"floating":W=OQ(Z);break;default:W=y(Z)}return{position:V,data:Z,html:W}})}function hQ($,Q){let Z=h(Q);return $.replace(/\[\[toc\]\]/gi,Z)}function dQ($){let Q=new Set;return $.replace(/<h([1-6])>(.*?)<\/h[1-6]>/gi,(Z,J,V)=>{let W=g(V.replace(/<[^>]*>/g,""),Q);return`<h${J} id="${W}"><a href="#${W}" class="heading-anchor">#</a>${V}</h${J}>`})}function cQ(){return`
1503
+ </ul>`};return[`<nav class="${J}" role="navigation" aria-label="${Z}">`,'<div class="toc-container">',` <h2 class="toc-title">${Z}</h2>`,` ${W(Q)}`,"</div>","</nav>"].join(`
1504
+ `)}function o(X){return w(X).replace("table-of-contents","table-of-contents toc-inline inline-toc")}function x0(X){return w(X).replace("table-of-contents","table-of-contents toc-sidebar sidebar-toc")}function k0(X){return w(X).replace("table-of-contents","table-of-contents toc-floating floating-toc")}function f0(X,Q={}){let Z={...Q};if(typeof Z.position==="string")Z.position=[Z.position];let $={...S0,...Z},J=v0(X),V=T0(J),W=b0(V,$);return{title:$.title,items:W,config:$}}function J1(X,Q={}){let Z=f0(X,Q);return(Array.isArray(Q.position)?Q.position:[Q.position||"sidebar"]).map((J)=>{let V;switch(J){case"inline":V=o(Z);break;case"sidebar":V=x0(Z);break;case"floating":V=k0(Z);break;default:V=w(Z)}return{position:J,data:Z,html:V}})}function V1(X,Q){let Z=o(Q);return X.replace(/\[\[toc\]\]/gi,Z)}function W1(X){let Q=new Set;return X.replace(/<h([1-6])>(.*?)<\/h[1-6]>/gi,(Z,$,J)=>{let V=s(J.replace(/<[^>]*>/g,""),Q);return`<h${$} id="${V}"><a href="#${V}" class="heading-anchor">#</a>${J}</h${$}>`})}function Y1(){return`
1505
1505
  .table-of-contents {
1506
1506
  position: sticky;
1507
1507
  top: 60px; /* Match navbar height */
@@ -1631,7 +1631,7 @@ html {
1631
1631
  max-width: 250px;
1632
1632
  }
1633
1633
  }
1634
- `}function lQ($={}){let Q=$.smoothScroll!==!1,Z=$.activeHighlight!==!1,J=$.collapsible!==!1;return`
1634
+ `}function q1(X={}){let Q=X.smoothScroll!==!1,Z=X.activeHighlight!==!1,$=X.collapsible!==!1;return`
1635
1635
  function initToc() {
1636
1636
  const tocLinks = document.querySelectorAll('.toc-link')
1637
1637
 
@@ -1700,7 +1700,7 @@ function initToc() {
1700
1700
  updateActiveTocItem()
1701
1701
 
1702
1702
  // TOC collapse/expand functionality
1703
- const expandableItems = ${String(J)} ? document.querySelectorAll('.toc-expand') : []
1703
+ const expandableItems = ${String($)} ? document.querySelectorAll('.toc-expand') : []
1704
1704
 
1705
1705
  expandableItems.forEach(item => {
1706
1706
  item.addEventListener('click', function(e) {
@@ -1733,7 +1733,7 @@ if (document.readyState === 'loading') {
1733
1733
  else {
1734
1734
  initToc()
1735
1735
  }
1736
- `}var{Glob:d,YAML:AQ}=globalThis.Bun;import{join as LQ}from"path";var eQ="/search-index.json",I={include:["**/*.md"],exclude:["public/**","**/node_modules/**"],searchFields:["title","content","headings","keywords"],maxResults:10,minQueryLength:1,fuzzy:!1,fuzziness:1,stemmer:"none",maxContentLength:800,boost:{title:10,headings:5,content:1}};function r($){let Q=$?.options??{};return{...I,...Q,include:Q.include??I.include,exclude:Q.exclude??I.exclude,searchFields:Q.searchFields??I.searchFields,maxResults:Q.maxResults??$?.maxResults??I.maxResults,boost:{...I.boost,...Q.boost??{}}}}var c=[{key:"k",meta:!0,ctrl:!1,alt:!1,shift:!1},{key:"k",meta:!1,ctrl:!0,alt:!1,shift:!1},{key:"/",meta:!1,ctrl:!1,alt:!1,shift:!1}];function PQ($){if(!$)return c;let Q=(Array.isArray($)?$:[$]).map((V)=>String(V).toLowerCase()),Z={meta:!1,ctrl:!1,alt:!1,shift:!1},J="";for(let V of Q)if(V==="meta"||V==="cmd"||V==="command")Z.meta=!0;else if(V==="ctrl"||V==="control")Z.ctrl=!0;else if(V==="alt"||V==="option")Z.alt=!0;else if(V==="shift")Z.shift=!0;else J=V;if(!J)return c;return[{key:J,...Z}]}function l($){if(typeof $!=="function")return null;let Q=Function.prototype.toString.call($);return Q.includes("[native code]")?null:Q}function QZ($,Q){let Z=$?.search??$?.markdown?.search,J=r(Z),V=Z?.resultOptions??{};return{indexUrl:Q,placeholder:Z?.placeholder??"Search documentation",lazy:Z?.lazy!==!1,maxResults:J.maxResults,minQueryLength:J.minQueryLength,searchFields:J.searchFields,boost:{title:J.boost.title??10,headings:J.boost.headings??5,content:J.boost.content??1},fuzzy:J.fuzzy,fuzziness:J.fuzziness,stemmer:J.stemmer,shortcuts:{keyboard:Z?.keyboardShortcuts!==!1,keys:PQ(Z?.shortcut)},result:{showDescription:V.showDescription!==!1,descriptionLength:V.descriptionLength??180,highlightMatches:V.highlightMatches!==!1,showPath:V.showPath!==!1},tokenizeSource:l(Z?.options?.tokenize),onSearchSource:l(Z?.onSearch),locale:null}}function s($){return T(p($)).replace(/^:::.*$/gm," ").replace(/^\s{0,3}>\s*\[!(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*$/gim," ").replace(/<[^>]+>/g," ").replace(/!\[[^\]]*\]\([^)]*\)/g," ").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/[*_~]{1,3}([^*_~]+)[*_~]{1,3}/g,"$1").replace(/^\s{0,3}>\s?/gm,"").replace(/^\s*[-*+]\s+/gm,"").replace(/^\s*\d+\.\s+/gm,"").replace(/^\s*\|?[\s:|-]+\|[\s:|-]*$/gm," ").replace(/^\s{0,3}(?:-{3,}|\*{3,}|_{3,})\s*$/gm," ").replace(/\|/g," ").replace(/\s+/g," ").trim()}function wQ($){let Q=$.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);if(!Q)return{body:$,data:{}};let Z={};try{Z=AQ.parse(Q[1])??{}}catch{Z={}}return{body:$.slice(Q[0].length),data:Z}}function CQ($){let Q=$.replace(/\.md$/,"");if(Q==="index")return"/";if(Q.endsWith("/index"))return`/${Q.slice(0,-6)}`;return`/${Q}`}function EQ($,Q,Z){let{body:J,data:V}=wQ(Q);if(V.search===!1)return[];if(V.layout==="home")return[];let W=typeof V.search==="object"&&V.search!==null?V.search:{},X=Array.isArray(W.keywords)?W.keywords.map(String):[],j=CQ($),Y=J.split(`
1737
- `),K=J.match(/^#\s+(.+)$/m),z=W.title||V.title||(K?K[1].trim():j),G=[],B=new Set,q={title:z,anchor:"",level:1,buffer:[]},_=()=>{let N=s(q.buffer.join(`
1738
- `)).slice(0,Z.maxContentLength);if(!N&&!q.title)return;let U={url:q.anchor?`${j}#${q.anchor}`:j,page:z,title:s(q.title)||z,text:N,level:q.level};if(X.length)U.keywords=X;G.push(U)},E=D();for(let N of Y){let U=E(N)?null:N.match(/^(#{1,6})\s+(.+?)\s*$/);if(!U){q.buffer.push(N);continue}let O=U[1].length,v=U[2].replace(/\s*\{#([\w-]+)\}\s*$/,""),b=U[2].match(/\{#([\w-]+)\}\s*$/),a=w(b?b[1]:P(L(v)),B);if(O===1){q.buffer.push("");continue}_(),q={title:v,anchor:a,level:O,buffer:[]}}return _(),G.filter((N)=>N.text||N.level>1)}function vQ($,Q){let{storeFields:Z}=Q;if(!Z||!Z.length)return $;let J=new Set(["url",...Z]);if(Q.searchFields.includes("title"))J.add("title");if(Q.searchFields.includes("content"))J.add("text");if(Q.searchFields.includes("headings"))J.add("page");if(Q.searchFields.includes("keywords"))J.add("keywords");return $.map((V)=>{let W={};for(let[X,j]of Object.entries(V))if(J.has(X)&&j!==void 0)W[X]=j;return W})}function i($){return $.split("#")[0]}function bQ($,Q){if(!Q.enabled)return{locale:Q.defaultLocale,page:$};let Z=$.split("/");if(Z.length>1&&Q.locales.includes(Z[0])&&Z[0]!==Q.defaultLocale)return{locale:Z[0],page:Z.slice(1).join("/")};let J=$.match(/^(.*)\.([A-Za-z-]+)(\.md)$/);if(J&&Q.locales.includes(J[2]))return{locale:J[2],page:`${J[1]}${J[3]}`};return{locale:Q.defaultLocale,page:$}}async function ZZ($,Q){let Z=Q?.search??Q?.markdown?.search,J=r(Z),V=o(Q),W=J.exclude.map((K)=>new d(K)),X=[],j=new Set,Y=new Map;for(let K of V.locales)Y.set(K,new Set);for(let K of J.include){let z=new d(K);for await(let G of z.scan($)){let B=G.replace(/\\/g,"/");if(W.some((q)=>q.match(B)))continue;j.add(B)}}for(let K of[...j].sort())try{let z=await Bun.file(LQ($,K)).text(),{locale:G,page:B}=bQ(K,V);for(let q of EQ(B,z,J)){if(V.enabled)q.locale=G,q.url=C(V,G,q.url);X.push(q),Y.get(G)?.add(i(q.url))}}catch{}if(V.enabled){let K=X.filter((z)=>z.locale===V.defaultLocale);for(let z of V.locales){if(z===V.defaultLocale)continue;let G=Y.get(z)??new Set;for(let B of K){let q=C(V,z,B.url);if(G.has(i(q)))continue;X.push({...B,url:q,locale:z})}}}return vQ(X,J)}
1739
- export{t as C,e as D,$Q as E,TQ as F,T as G,kQ as H,mQ as I,uQ as J,IQ as K,L,P as M,w as N,g as O,_Q as P,DQ as Q,RQ as R,y as S,h as T,yQ as U,OQ as V,HQ as W,gQ as X,hQ as Y,dQ as Z,cQ as _,lQ as $,eQ as aa,QZ as ba,ZZ as ca};
1736
+ `}var{Glob:i,YAML:m0}=globalThis.Bun;import{join as u0}from"path";var U1="/search-index.json",O={include:["**/*.md"],exclude:["public/**","**/node_modules/**"],searchFields:["title","content","headings","keywords"],maxResults:10,minQueryLength:1,fuzzy:!1,fuzziness:1,stemmer:"none",maxContentLength:800,boost:{title:10,headings:5,content:1}};function X0(X){let Q=X?.options??{};return{...O,...Q,include:Q.include??O.include,exclude:Q.exclude??O.exclude,searchFields:Q.searchFields??O.searchFields,maxResults:Q.maxResults??X?.maxResults??O.maxResults,boost:{...O.boost,...Q.boost??{}}}}var a=[{key:"k",meta:!0,ctrl:!1,alt:!1,shift:!1},{key:"k",meta:!1,ctrl:!0,alt:!1,shift:!1},{key:"/",meta:!1,ctrl:!1,alt:!1,shift:!1}];function p0(X){if(!X)return a;let Q=(Array.isArray(X)?X:[X]).map((J)=>String(J).toLowerCase()),Z={meta:!1,ctrl:!1,alt:!1,shift:!1},$="";for(let J of Q)if(J==="meta"||J==="cmd"||J==="command")Z.meta=!0;else if(J==="ctrl"||J==="control")Z.ctrl=!0;else if(J==="alt"||J==="option")Z.alt=!0;else if(J==="shift")Z.shift=!0;else $=J;if(!$)return a;return[{key:$,...Z}]}function n(X){if(typeof X!=="function")return null;let Q=Function.prototype.toString.call(X);return Q.includes("[native code]")?null:Q}function I1(X,Q){let Z=X?.search??X?.markdown?.search,$=X0(Z),J=Z?.resultOptions??{};return{indexUrl:Q,placeholder:Z?.placeholder??"Search documentation",lazy:Z?.lazy!==!1,maxResults:$.maxResults,minQueryLength:$.minQueryLength,searchFields:$.searchFields,boost:{title:$.boost.title??10,headings:$.boost.headings??5,content:$.boost.content??1},fuzzy:$.fuzzy,fuzziness:$.fuzziness,stemmer:$.stemmer,shortcuts:{keyboard:Z?.keyboardShortcuts!==!1,keys:p0(Z?.shortcut)},result:{showDescription:J.showDescription!==!1,descriptionLength:J.descriptionLength??180,highlightMatches:J.highlightMatches!==!1,showPath:J.showPath!==!1},tokenizeSource:n(Z?.options?.tokenize),onSearchSource:n(Z?.onSearch),locale:null}}function t(X){return p(r(X)).replace(/^:::.*$/gm," ").replace(/^\s{0,3}>\s*\[!(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*$/gim," ").replace(/<[^>]+>/g," ").replace(/!\[[^\]]*\]\([^)]*\)/g," ").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/[*_~]{1,3}([^*_~]+)[*_~]{1,3}/g,"$1").replace(/^\s{0,3}>\s?/gm,"").replace(/^\s*[-*+]\s+/gm,"").replace(/^\s*\d+\.\s+/gm,"").replace(/^\s*\|?[\s:|-]+\|[\s:|-]*$/gm," ").replace(/^\s{0,3}(?:-{3,}|\*{3,}|_{3,})\s*$/gm," ").replace(/\|/g," ").replace(/\s+/g," ").trim()}function g0(X){let Q=X.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);if(!Q)return{body:X,data:{}};let Z={};try{Z=m0.parse(Q[1])??{}}catch{Z={}}return{body:X.slice(Q[0].length),data:Z}}function h0(X){let Q=X.replace(/\.md$/,"");if(Q==="index")return"/";if(Q.endsWith("/index"))return`/${Q.slice(0,-6)}`;return`/${Q}`}function d0(X,Q,Z){let{body:$,data:J}=g0(Q);if(J.search===!1)return[];if(J.layout==="home")return[];let V=typeof J.search==="object"&&J.search!==null?J.search:{},W=Array.isArray(V.keywords)?V.keywords.map(String):[],q=h0(X),j=$.split(`
1737
+ `),G=$.match(/^#\s+(.+)$/m),K=V.title||J.title||(G?G[1].trim():q),B=[],z=new Set,Y={title:K,anchor:"",level:1,buffer:[]},M=()=>{let N=t(Y.buffer.join(`
1738
+ `)).slice(0,Z.maxContentLength);if(!N&&!Y.title)return;let U={url:Y.anchor?`${q}#${Y.anchor}`:q,page:K,title:t(Y.title)||K,text:N,level:Y.level};if(W.length)U.keywords=W;B.push(U)},I=E();for(let N of j){let U=I(N)?null:N.match(/^(#{1,6})\s+(.+?)\s*$/);if(!U){Y.buffer.push(N);continue}let H=U[1].length,A=U[2].replace(/\s*\{#([\w-]+)\}\s*$/,""),R=U[2].match(/\{#([\w-]+)\}\s*$/),D=b(R?R[1]:T(v(A)),z);if(H===1){Y.buffer.push("");continue}M(),Y={title:A,anchor:D,level:H,buffer:[]}}return M(),B.filter((N)=>N.text||N.level>1)}function c0(X,Q){let{storeFields:Z}=Q;if(!Z||!Z.length)return X;let $=new Set(["url",...Z]);if(Q.searchFields.includes("title"))$.add("title");if(Q.searchFields.includes("content"))$.add("text");if(Q.searchFields.includes("headings"))$.add("page");if(Q.searchFields.includes("keywords"))$.add("keywords");return X.map((J)=>{let V={};for(let[W,q]of Object.entries(J))if($.has(W)&&q!==void 0)V[W]=q;return V})}function e(X){return X.split("#")[0]}function l0(X,Q){if(!Q.enabled)return{locale:Q.defaultLocale,page:X};let Z=X.split("/");if(Z.length>1&&Q.locales.includes(Z[0])&&Z[0]!==Q.defaultLocale)return{locale:Z[0],page:Z.slice(1).join("/")};let $=X.match(/^(.*)\.([A-Za-z-]+)(\.md)$/);if($&&Q.locales.includes($[2]))return{locale:$[2],page:`${$[1]}${$[3]}`};return{locale:Q.defaultLocale,page:X}}async function _1(X,Q){let Z=Q?.search??Q?.markdown?.search,$=X0(Z),J=Q0(Q),V=$.exclude.map((G)=>new i(G)),W=[],q=new Set,j=new Map;for(let G of J.locales)j.set(G,new Set);for(let G of $.include){let K=new i(G);for await(let B of K.scan(X)){let z=B.replace(/\\/g,"/");if(V.some((Y)=>Y.match(z)))continue;q.add(z)}}for(let G of[...q].sort())try{let K=await Bun.file(u0(X,G)).text(),{locale:B,page:z}=l0(G,J);for(let Y of d0(z,K,$)){if(J.enabled)Y.locale=B,Y.url=L(J,B,Y.url);W.push(Y),j.get(B)?.add(e(Y.url))}}catch{}if(J.enabled){let G=W.filter((K)=>K.locale===J.defaultLocale);for(let K of J.locales){if(K===J.defaultLocale)continue;let B=j.get(K)??new Set;for(let z of G){let Y=L(J,K,z.url);if(B.has(e(Y)))continue;W.push({...z,url:Y,locale:K})}}}return c0(W,$)}function Z0(X){let Q={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};return X.replace(/&(#x[\da-f]+|#\d+|[a-z]+);/gi,(Z,$)=>{if($[0]==="#"){let J=$[1]==="x"||$[1]==="X"?Number.parseInt($.slice(2),16):Number.parseInt($.slice(1),10);return Number.isFinite(J)&&J>0&&J<=1114111?String.fromCodePoint(J):Z}return Q[$.toLowerCase()]??Z})}function $0(X){return String(X??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var{Glob:r0}=globalThis.Bun;import{dirname as s0,isAbsolute as J0,join as o0,relative as V0,resolve as C,sep as W0}from"path";async function L1(X){let Q=[];for await(let Z of new r0("**/*.md").scan({cwd:X,onlyFiles:!0}))Q.push(o0(X,Z));return Q}function q0(X){return X.split("/").map((Q)=>encodeURIComponent(Q)).join("/")}function x(X){let Q=X==="index"?"":X.replace(/\/index$/,"/");return`/${q0(Q)}`}function k(X){return X.split("/").map((Z)=>encodeURIComponent(decodeURIComponent(Z))).join("/").replace(/\/+$/,"")||"/"}function C1(X,Q,Z){let $=C(Q),J={...Z,locales:[...Z.locales]},V=new Set(X.map((z)=>C(z))),W=new Map,q=new Set;for(let z of V){let Y=V0($,z).split(W0).join("/").replace(/\.md$/,"");if(Y===".."||Y.startsWith("../")||J0(Y))throw Error("Markdown source is outside the documentation root");let M=J.defaultLocale,I=!1;if(J.enabled){let N=Y.split("/");if(N.length>1&&J.locales.includes(N[0])&&N[0]!==J.defaultLocale)M=N.shift(),I=!0,Y=N.join("/");else{let U=Y.match(/^(.*)\.([A-Za-z-]+)$/);if(U&&J.locales.includes(U[2]))Y=U[1],M=U[2],I=!0}}W.set(z,{path:Y,locale:M,explicitLocale:I}),q.add(Y)}let j=[],G=new Map,K=new Map,B=new Map;for(let z of J.locales)for(let Y of q){let M=J.enabled?Y0(J,$,z,`/${Y}`).map((U)=>C(U)).find((U)=>V.has(U)):C($,`${Y}.md`);if(!M||!V.has(M))continue;let I=Object.freeze({sourceFile:M,relativePath:Y,locale:z}),N=`${z}\x00${k(x(Y))}`;if(K.has(N))throw Error(`Documentation pages share an output route: ${x(Y)}`);K.set(N,I),G.set(`${z}\x00${Y}`,I),B.set(`${z}\x00${k(`/${q0(Y)}`)}`,I),j.push(I)}return Object.freeze({pages:Object.freeze(j),findPage(z,Y){let M=`${z}\x00${k(Y)}`;return K.get(M)??B.get(M)},resolveLink(z,Y){if(!Y||/^(?:[a-z][a-z\d+.-]*:|\/|#|\?)/i.test(Y))return Y;let M=Y.search(/[?#]/),I=M===-1?Y:Y.slice(0,M),N=M===-1?"":Y.slice(M),U=I.replace(/%([\da-f]{2})/gi,(i0,j0)=>String.fromCharCode(Number.parseInt(j0,16)));if(!/\.md$/i.test(U))return Y;let H=decodeURIComponent(I),A=C(s0(z.sourceFile),H),R=V0($,A);if(R===".."||R.startsWith(`..${W0}`)||J0(R))return Y;let D=W.get(A);if(!D)throw Error(`Markdown link has no documentation source: ${I}`);let f=D.explicitLocale?D.locale:z.locale,m=G.get(`${f}\x00${D.path}`);if(!m)throw Error(`Markdown link has no rendered page: ${I}`);return`${L(J,f,x(m.relativePath))}${N}`}})}async function E1(X,Q,Z=new Map){let $=[Q.page],J=new Set(Z.keys()),V=await new HTMLRewriter().onDocument({comments(W){let q=Z.get(W.text);if(q===void 0)return;if(!J.delete(W.text))throw Error("Markdown include source boundary was duplicated");if(q===null){if($.length===1)throw Error("Markdown include source boundaries are unbalanced");$.pop()}else $.push(q);W.remove()}}).on("a[href]",{element(W){let q=Z0(W.getAttribute("href")),j=Q.catalog.resolveLink($[$.length-1],q);if(j!==q)W.setAttribute("href",$0(j))}}).transform(new Response(X)).text();if(J.size||$.length!==1)throw Error("Markdown include source boundaries did not survive rendering");return V}
1739
+ export{K0 as A,G0 as B,M0 as C,n0 as D,p as E,e0 as F,X1 as G,Z1 as H,S0 as I,v as J,T as K,b as L,s as M,v0 as N,T0 as O,b0 as P,w as Q,o as R,x0 as S,k0 as T,f0 as U,J1 as V,V1 as W,W1 as X,Y1 as Y,q1 as Z,U1 as _,I1 as $,_1 as aa,Z0 as ba,$0 as ca,L1 as da,C1 as ea,E1 as fa};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{q as $,r as I,s as f,t as h,w as x}from"./chunk-btaakbga.js";import"./chunk-rcr6k1et.js";import{E as _}from"./chunk-3ymfys00.js";import"./chunk-rnzqf7rp.js";import{join as D}from"path";var E="@stacksjs/ts-cloud";async function Y(){try{return await import(E)}catch(j){throw Error(`Deploying requires @stacksjs/ts-cloud, which is an optional dependency.
2
+ import{p as $,q as I,r as f,s as h,u as x}from"./chunk-zpf2c5ag.js";import"./chunk-xjz041s0.js";import{C as _}from"./chunk-8rsrw3sw.js";import"./chunk-ynp2pgxy.js";import{join as D}from"path";var E="@stacksjs/ts-cloud";async function Y(){try{return await import(E)}catch(j){throw Error(`Deploying requires @stacksjs/ts-cloud, which is an optional dependency.
3
3
  Install it with: bun add -d @stacksjs/ts-cloud
4
4
  Original error: ${j instanceof Error?j.message:String(j)}`)}}function W(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 F(j={}){let A=await _,k=A.cloud||{},m=j.verbose??A.verbose??!1;if(k.driver&&k.driver!=="aws")return I(`Unsupported cloud driver: ${k.driver}. Only 'aws' is implemented.`),!1;let 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=W(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(`
5
5
  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(`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{j as b,k as c,l as d,m as e,n as f,o as g}from"./chunk-m7y4g28p.js";import{ba as a}from"./chunk-8rsrw3sw.js";import"./chunk-ynp2pgxy.js";export{d as wrapInLayout,c as stripConfiguredBasePath,f as startServer,g as serveCLI,e as markdownToHtml,b as getConfiguredBasePath,a as decodeHtmlEntities};