boltdocs 2.5.1 → 2.5.3
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/CHANGELOG.md +12 -0
- package/dist/chunk-CNGM3N5C.mjs +75 -0
- package/dist/{chunk-ITFGVXPE.mjs → chunk-J2PTDWZM.mjs} +1 -1
- package/dist/client/index.d.mts +0 -50
- package/dist/client/index.d.ts +0 -50
- package/dist/client/index.js +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/client/ssr.js +1 -1
- package/dist/client/ssr.mjs +1 -1
- package/dist/node/cli-entry.js +13 -13
- package/dist/node/cli-entry.mjs +1 -1
- package/dist/node/index.d.mts +0 -14
- package/dist/node/index.d.ts +0 -14
- package/dist/node/index.js +16 -16
- package/dist/node/index.mjs +1 -1
- package/dist/package-NW2UUNQH.mjs +1 -0
- package/dist/{search-dialog-YBM4GYDR.mjs → search-dialog-O6VLVSOA.mjs} +1 -1
- package/package.json +1 -2
- package/src/client/components/mdx/code-block.tsx +0 -19
- package/src/client/components/mdx/component-preview.tsx +0 -7
- package/src/client/components/mdx/hooks/use-code-block.ts +1 -21
- package/src/client/types.ts +0 -36
- package/src/node/config.ts +0 -16
- package/src/node/plugin/index.ts +0 -2
- package/src/node/schema/config.ts +0 -13
- package/dist/chunk-JGR2ELBA.mjs +0 -75
- package/dist/package-SGBODKXD.mjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# boltdocs
|
|
2
2
|
|
|
3
|
+
## 2.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`613b4b7`](https://github.com/bolt-docs/boltdocs/commit/613b4b7c256b2dec3af6d2aa7eb00f1b9a9beea1) Thanks [@jesusalcaladev](https://github.com/jesusalcaladev)! - removed integrations of config
|
|
8
|
+
|
|
9
|
+
## 2.5.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`862634f`](https://github.com/bolt-docs/boltdocs/commit/862634fb0df4e10112877e05e31b12ce7a4f480e) Thanks [@jesusalcaladev](https://github.com/jesusalcaladev)! - removed sandbox integrations
|
|
14
|
+
|
|
3
15
|
## 2.5.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import{a,b as Gt,c as ks,d as et,e as Ht,f as Vt,g as Ut,h as _,i as ve,j as Re,k as Xt,l as zt,m as ee,n as tt,o as Wt,p as le,q as rt,r as ce,s as ot,t as be,u as J,v as Yt,w as Kt,z as Jt}from"./chunk-TP5KMRD3.mjs";import{a as I,b as v,d as As}from"./chunk-Y4RE5KI7.mjs";function st(){U.invalidateAll()}function it(r){U.invalidate(r)}var U,Zt=I(()=>{"use strict";a();Jt();U=new Yt({name:"routes"})});import K from"path";import Ds from"github-slugger";function er(r,e,t,s){let o;try{o=decodeURIComponent(r)}catch{let N=K.basename(r);throw be("ENCODING_ERROR","Invalid character encoding",{file:N}),new Ht(`Security breach: Invalid characters or encoding in path: ${N}`)}if(o.length>260){let N=K.basename(o);throw be("PATH_TOO_LONG","Path length exceeds limit",{length:o.length,file:N}),new et(`Security breach: Path length exceeds limit of ${260} characters: ${N}`)}let i=K.resolve(o),n=K.resolve(e),p=_(K.relative(n,i));if(p.startsWith("../")||p===".."||i.includes("\0")||!Gt.test(p)){let N=K.basename(r);throw be("PATH_TRAVERSAL_ATTEMPT","Path traversal or invalid characters detected",{path:p}),new et(`Security breach: File is outside of docs directory, contains null bytes, or invalid characters: ${N}`)}let{data:u,content:l}=zt(r),m=p.split("/"),f,P;if(s?.versions&&m.length>0){let N=m[0],Ze=s.versions.prefix||"",xe=s.versions.versions.find(ae=>{let Qe=Ze+ae.path;return N===Qe||N===ae.path});xe&&(P=xe.path,m=m.slice(1))}if(s?.i18n&&m.length>0){let N=m[0];s.i18n.locales[N]&&(f=N,m=m.slice(1))}let d;if(m.length>0){let N=m[0].match(/^\((.+)\)$/);N&&(d=N[1].toLowerCase(),m=m.slice(1))}let L=m.join("/"),x;u.permalink?x=u.permalink.startsWith("/")?u.permalink:`/${u.permalink}`:x=Wt(L||"index.md");let $=t;P&&($+="/"+P),f&&($+="/"+f),d&&($+="/"+d),$+=x==="/"?"":x,(!$||$==="")&&($="/");let b=m[m.length-1],w=ve(b),S=ve(K.basename(r,K.extname(r))),O=u.sidebarPosition??Re(b),A=m.length>=2?m[0]:void 0,C=A?ve(A):void 0,Y=m.length>=2&&/^index\.mdx?$/.test(w),j=new Ds,Ft=[],Ls=/^(#{2,4})\s+(.+)$/gm;for(let N of l.matchAll(Ls)){let Ze=N[1].length,xe=N[2].replace(/\[([^\]]+)\]\([^\)]+\)/g,"$1").replace(/[_*`]/g,"").trim(),ae=le(xe).trim(),Qe=j.slug(ae);Ft.push({level:Ze,text:ae,id:Qe})}let Ts=u.title?le(String(u.title)):S,Je=u.description?le(String(u.description)):"";!Je&&l&&(Je=rt(l.replace(/^#+.*$/gm,"").replace(/\[([^\]]+)\]\([^\)]+\)/g,"$1").replace(/[_*`]/g,"").replace(/\s+/g," ")).trim().slice(0,160));let Os=u.badge?le(String(u.badge)):void 0,_t=u.icon?String(u.icon):void 0,Ns=Bs(l);return{route:{path:$,componentPath:r,filePath:p,title:Ts,description:Je,sidebarPosition:O,headings:Ft,locale:f,version:P,badge:Os,icon:_t,tab:d,_content:Ns,_rawContent:l},relativeDir:C,isGroupIndex:Y,inferredTab:d,groupMeta:Y?{title:u.groupTitle||u.title||(C?ce(C):""),position:u.groupPosition??u.sidebarPosition??(A?Re(A):void 0),icon:_t}:void 0,inferredGroupPosition:A?Re(A):void 0}}function Bs(r){let e=r.replace(/^#+.*$/gm,"").replace(/\[([^\]]+)\]\([^\)]+\)/g,"$1").replace(/\{[^\}]+\}/g,"").replace(/[_*`]/g,"").replace(/\s+/g," ");return rt(e).trim()}var tr=I(()=>{"use strict";a();J();ks();Ut()});function or(r){return r.sort((e,t)=>!e.group&&!t.group?rr(e,t):e.group?t.group?e.group!==t.group?qs(e,t):rr(e,t):1:-1)}function rr(r,e){return r.sidebarPosition!==void 0&&e.sidebarPosition!==void 0?r.sidebarPosition-e.sidebarPosition:r.sidebarPosition!==void 0?-1:e.sidebarPosition!==void 0?1:r.title.localeCompare(e.title)}function qs(r,e){return r.groupPosition!==void 0&&e.groupPosition!==void 0?r.groupPosition-e.groupPosition:r.groupPosition!==void 0?-1:e.groupPosition!==void 0?1:(r.groupTitle||r.group).localeCompare(e.groupTitle||e.group)}var sr=I(()=>{"use strict";a()});import js from"fast-glob";async function te(r,e,t="/docs",s=!0){let o=performance.now();U.load(),ue.clear(),(process.env.BOLTDOCS_FORCE_REPARSE==="true"||e?.i18n)&&U.invalidateAll();let i;!s&&nt?i=nt:(i=await js(["**/*.md","**/*.mdx"],{cwd:r,absolute:!0,suppressErrors:!0,followSymbolicLinks:!1}),nt=i),U.pruneStale(new Set(i));let n=50,p=[],u=0;for(let x=0;x<i.length;x+=n){let $=i.slice(x,x+n),b=await Promise.all($.map(async w=>{let S=U.get(w);if(S)return u++,S;let O=er(w,r,t,e);return U.set(w,O),O}));p.push(...b),x+n<i.length&&await new Promise(w=>setImmediate(w))}U.save();let l=new Map,m=[];for(let x of p)if(x.isGroupIndex&&x.relativeDir&&m.push(x),x.relativeDir){let $=l.get(x.relativeDir);$?($.position===void 0&&x.inferredGroupPosition!==void 0&&($.position=x.inferredGroupPosition),!$.icon&&x.route.icon&&($.icon=x.route.icon)):($={title:ce(x.relativeDir),position:x.inferredGroupPosition,icon:x.route.icon},l.set(x.relativeDir,$))}for(let x of m){let $=l.get(x.relativeDir);x.groupMeta&&($.title=x.groupMeta.title,x.groupMeta.position!==void 0&&($.position=x.groupMeta.position),x.groupMeta.icon&&($.icon=x.groupMeta.icon))}let f=new Array(p.length);for(let x=0;x<p.length;x++){let $=p[x],b=$.relativeDir,w=b?l.get(b):void 0;f[x]={...$.route,group:b,groupTitle:w?.title||(b?ce(b):void 0),groupPosition:w?.position,groupIcon:w?.icon}}let P=f;if(e?.i18n){let x=Ms(f,e,t);P=[...f,...x]}let d=or(P),L=performance.now()-o;return console.log(`[boltdocs] Route generation: ${L.toFixed(2)}ms (${i.length} files, ${u} cache hits)`),d}function Ms(r,e,t){let s=e.i18n.defaultLocale,o=Object.keys(e.i18n.locales),i=[],n=new Map,p=[];for(let u of r){let l=u.locale||s;n.has(l)||n.set(l,new Set),n.get(l).add(u.path),l===s&&p.push(u)}for(let u of o){let l=n.get(u)||new Set;for(let m of p){let f=Fs(m.path,s,u,t,e);f!==m.path&&(l.has(f)||i.push({...m,path:f,locale:u}))}}return i}function Fs(r,e,t,s,o){let i=`${r}:${t}`,n=ue.get(i);if(n)return n;let p=s;if(o?.versions){let f=o.versions.prefix||"";for(let P of o.versions.versions){let d=f+P.path;if(r.startsWith(`${s}/${d}`)){p+="/"+d;break}if(r.startsWith(`${s}/${P.path}`)){p+="/"+P.path;break}}}let u=r.substring(p.length),l=`/${e}`;if(u.startsWith(l+"/"))u="/"+t+"/"+u.substring(l.length+1);else if(u===l)u="/"+t;else if(u==="/"||u==="")u="/"+t;else{let f=u.startsWith("/")?"":"/";u="/"+t+f+u}let m=p+u;return ue.size>2e3&&ue.clear(),ue.set(i,m),m}var nt,ue,at=I(()=>{"use strict";a();J();Zt();tr();sr();nt=null,ue=new Map});import{z as c}from"zod";var _s,Gs,Hs,lt,Vs,Us,Xs,zs,Ws,ir,ct=I(()=>{"use strict";a();_s=c.object({icon:c.string().max(50),link:c.string().url()}),Gs=c.object({text:c.string().max(2e3).optional()}),Hs=c.enum(["fs:read","fs:write","vite:config","mdx:remark","mdx:rehype","components","hooks:build","hooks:dev"]),lt=c.object({name:c.string(),enforce:c.enum(["pre","post"]).optional(),version:c.string().optional(),boltdocsVersion:c.string().optional(),permissions:c.array(Hs).optional(),remarkPlugins:c.array(c.any()).optional(),rehypePlugins:c.array(c.any()).optional(),vitePlugins:c.array(c.any()).optional(),components:c.record(c.string(),c.string()).optional(),hooks:c.record(c.string(),c.any()).optional()}),Vs=c.object({title:c.union([c.string(),c.record(c.string(),c.string())]).optional(),description:c.union([c.string(),c.record(c.string(),c.string())]).optional(),logo:c.union([c.string(),c.object({dark:c.string(),light:c.string(),alt:c.string().optional(),width:c.number().optional(),height:c.number().optional()})]).optional(),navbar:c.array(c.object({label:c.union([c.string(),c.record(c.string(),c.string())]),href:c.string()})).optional(),sidebar:c.record(c.string(),c.array(c.object({text:c.string(),link:c.string()}))).optional(),socialLinks:c.array(_s).optional(),footer:Gs.optional(),breadcrumbs:c.boolean().optional(),editLink:c.string().refine(r=>!r||r.includes(":path"),{message:"editLink must contain ':path' placeholder if specified"}).optional(),communityHelp:c.string().url().optional(),version:c.string().max(50).optional(),githubRepo:c.string().max(100).optional(),favicon:c.string().optional(),ogImage:c.string().optional(),poweredBy:c.boolean().optional(),tabs:c.array(c.object({id:c.string(),text:c.union([c.string(),c.record(c.string(),c.string())]),icon:c.string().optional()})).optional(),codeTheme:c.union([c.string(),c.object({light:c.string(),dark:c.string()})]).optional(),copyMarkdown:c.union([c.boolean(),c.object({text:c.string().optional(),icon:c.string().optional()})]).optional()}),Us=c.union([c.string(),c.object({rules:c.array(c.object({userAgent:c.string(),allow:c.union([c.string(),c.array(c.string())]).optional(),disallow:c.union([c.string(),c.array(c.string())]).optional()})).optional(),sitemaps:c.array(c.string().url()).optional()})]),Xs=c.object({defaultLocale:c.string(),locales:c.record(c.string(),c.string()),localeConfigs:c.record(c.string(),c.object({label:c.string().optional(),direction:c.enum(["ltr","rtl"]).optional(),htmlLang:c.string().optional(),calendar:c.string().optional()})).optional()}),zs=c.object({defaultVersion:c.string(),prefix:c.string().optional(),versions:c.array(c.object({label:c.string(),path:c.string()}))}),Ws=c.object({headers:c.record(c.string(),c.string()).optional(),enableCSP:c.boolean().optional(),customHeaders:c.record(c.string(),c.string()).optional()}),ir=c.object({siteUrl:c.string().url().optional(),docsDir:c.string().optional(),homePage:c.string().optional(),theme:Vs.optional(),i18n:Xs.optional(),versions:zs.optional(),plugins:c.array(lt).optional(),robots:Us.optional(),security:Ws.optional(),vite:c.record(c.string(),c.unknown()).optional()})});import ut from"path";import Ys from"fs";import{loadConfigFromFile as Ks}from"vite";function Js(r){return r}async function Z(r,e=process.cwd()){let t=e,s={docsDir:ut.resolve(r),theme:{title:"Boltdocs",description:"A Vite documentation framework",navbar:[{label:"Home",href:"/"},{label:"Documentation",href:"/docs"}],codeTheme:{light:"github-light",dark:"github-dark"},poweredBy:!0,breadcrumbs:!0}},o={};for(let m of Se){let f=ut.resolve(t,m);if(Ys.existsSync(f))try{let P=await Ks({command:"serve",mode:"development"},f,t);if(P){o=P.config;break}}catch(P){console.warn(`[boltdocs] Failed to load config from ${m}:`,P)}}let n={...{title:o.title,description:o.description,logo:o.logo,favicon:o.favicon,ogImage:o.ogImage,navbar:o.navbar,sidebar:o.sidebar,socialLinks:o.socialLinks,footer:o.footer,githubRepo:o.githubRepo,tabs:o.tabs,codeTheme:o.codeTheme,copyMarkdown:o.copyMarkdown,breadcrumbs:o.breadcrumbs,poweredBy:o.poweredBy,communityHelp:o.communityHelp,version:o.version,editLink:o.editLink},...o.theme||{}},p=Object.fromEntries(Object.entries(n).filter(([m,f])=>f!==void 0));p.navbar&&(p.navbar=p.navbar.map(m=>({label:m.label||m.text||"",href:m.href||m.link||m.to||""})));let u={docsDir:ut.resolve(r),homePage:o.homePage,theme:{...s.theme,...p},i18n:o.i18n,versions:o.versions,siteUrl:o.siteUrl,plugins:o.plugins||[],robots:o.robots,security:o.security,vite:o.vite},l=ir.safeParse(u);if(!l.success){let m=l.error.issues.map(f=>` - ${f.path.join(".")}: ${f.message}`).join(`
|
|
2
|
+
`);throw new Vt(`Invalid Boltdocs configuration:
|
|
3
|
+
${m}`)}return l.data}var Se,we=I(()=>{"use strict";a();ct();Ut();Se=["boltdocs.config.js","boltdocs.config.mjs","boltdocs.config.ts"]});function nr(r,e){let t=ee(e.title),s=ee(e.description);return r.replace(/<title>.*?<\/title>/,`<title>${t}</title>`).replace(/(<meta name="description" content=")[^"]*(")/,`$1${s}$2`).replace(/(<meta property="og:title" content=")[^"]*(")/,`$1${t}$2`).replace(/(<meta property="og:description" content=")[^"]*(")/,`$1${s}$2`).replace(/(<meta name="twitter:title" content=")[^"]*(")/,`$1${t}$2`).replace(/(<meta name="twitter:description" content=")[^"]*(")/,`$1${s}$2`)}var ar=I(()=>{"use strict";a();J()});function lr(r,e){let t=e?.siteUrl?.replace(/\/$/,"")||"https://example.com",s=new Date().toISOString().split("T")[0],o=[{url:"/",priority:"1.0",changefreq:"daily"}];if(e?.i18n){let n=e.i18n.defaultLocale;for(let p of Object.keys(e.i18n.locales))p!==n&&o.push({url:`/${p}/`,priority:"1.0",changefreq:"daily"})}return`<?xml version="1.0" encoding="UTF-8"?>
|
|
4
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
5
|
+
${[...o,...r.map(n=>({url:n,priority:"0.8",changefreq:"weekly"}))].map(n=>` <url>
|
|
6
|
+
<loc>${tt(t)}${tt(n.url)}</loc>
|
|
7
|
+
<lastmod>${s}</lastmod>
|
|
8
|
+
<changefreq>${n.changefreq}</changefreq>
|
|
9
|
+
<priority>${n.priority}</priority>
|
|
10
|
+
</url>`).join(`
|
|
11
|
+
`)}
|
|
12
|
+
</urlset>`}var cr=I(()=>{"use strict";a();J()});function Ce(r){if(typeof r.robots=="string")return r.robots;let e=r.siteUrl?.replace(/\/$/,"")||"",t=r.robots||{},s=t.rules||[{userAgent:"*",allow:"/"}],o=t.sitemaps||(e?[`${e}/sitemap.xml`]:[]),i="";for(let n of s){if(i+=`User-agent: ${n.userAgent}
|
|
13
|
+
`,n.disallow){let p=Array.isArray(n.disallow)?n.disallow:[n.disallow];for(let u of p)i+=`Disallow: ${u}
|
|
14
|
+
`}if(n.allow){let p=Array.isArray(n.allow)?n.allow:[n.allow];for(let u of p)i+=`Allow: ${u}
|
|
15
|
+
`}i+=`
|
|
16
|
+
`}for(let n of o)i+=`Sitemap: ${n}
|
|
17
|
+
`;return i.trim()}var pt=I(()=>{"use strict";a()});import X from"fs";import z from"path";import{fileURLToPath as Zs}from"url";import{createRequire as Qs}from"module";async function ft(r){let{docsDir:e,docsDirName:t,outDir:s,config:o}=r,i=await te(e,o),n=["tsx","ts","jsx","js"].map($=>z.resolve(e,`pages-external/index.${$}`)).find($=>X.existsSync($));if(n)try{let $=X.readFileSync(n,"utf-8"),b=$.match(/pages\s*:\s*{([^}]+)}/s);if(b){let w=b[1].split(",").map(S=>S.split(":")[0].trim().replace(/['"]/g,"")).filter(S=>S&&S.startsWith("/"));for(let S of w)i.some(O=>O.path===S)||i.push({path:S,title:S.slice(1).charAt(0).toUpperCase()+S.slice(2),filePath:"",componentPath:"",_content:""})}$.includes("homePage")&&!i.some(w=>w.path==="/")&&i.push({path:"/",title:"Home",filePath:"",componentPath:"",_content:""})}catch($){console.warn("[boltdocs] Failed to parse external routes for SSG:",$)}let p=z.resolve(ur,"../client/ssr.js");if(!X.existsSync(p)){console.error("[boltdocs] SSR module not found at",p,"- Did you build the core package?");return}let u=pr("module"),l=u.prototype.require;u.prototype.require=function($,...b){return $.startsWith("virtual:boltdocs-")?$==="virtual:boltdocs-layout"?{__esModule:!0,default:function(S){try{let A=l.apply(this,[z.resolve(ur,"../client/index.js")]).DefaultLayout||(({children:Y})=>Y);return l.apply(this,["react"]).createElement(A,S)}catch{return S.children}}}:$==="virtual:boltdocs-mdx-components"?{__esModule:!0,default:{}}:$==="virtual:boltdocs-config"?{__esModule:!0,default:o}:{__esModule:!0,default:$.includes("routes")?[]:{}}:l.apply(this,[$,...b])};let{render:m}=pr(p);u.prototype.require=l;let f=z.join(s,"index.html");if(!X.existsSync(f)){console.warn("[boltdocs] No index.html found in outDir, skipping SSG.");return}let P=X.readFileSync(f,"utf-8");await Promise.all(i.map(async $=>{let b=ot(o?.theme?.title,$.locale)||"Boltdocs",w=ot(o?.theme?.description,$.locale)||"",S=`${$.title} | ${b}`,O=$.description||w,A={};A[`/${t}/${$.filePath}`]={default:()=>null};try{let C=await m({path:$.path,routes:i,config:o||{},docsDirName:t,modules:A,homePage:void 0}),Y=nr(P,{title:ee(S),description:ee(O)}).replace("<!--app-html-->",C).replace('<div id="root"></div>',`<div id="root">${C}</div>`),j=z.join(s,$.path);await X.promises.mkdir(j,{recursive:!0}),await X.promises.writeFile(z.join(j,"index.html"),Y,"utf-8")}catch(C){console.error(`[boltdocs] Error SSR rendering route ${$.path}:`,C&&(C.stack||C))}}));let d=lr(i.map($=>$.path),o);X.writeFileSync(z.join(s,"sitemap.xml"),d,"utf-8");let L=Ce(o);X.writeFileSync(z.join(s,"robots.txt"),L,"utf-8"),console.log(`[boltdocs] Generated ${i.length} static pages + sitemap.xml + robots.txt`);let{flushCache:x}=await import("./cache-3FOEPC2P.mjs");await x()}var ei,ur,pr,mt=I(()=>{"use strict";a();at();J();ar();cr();pt();ei=Zs(import.meta.url),ur=z.dirname(ei),pr=Qs(import.meta.url)});import Ie from"path";import fr from"fs";function mr(r,e){let t=r.homePage?`import HomePage from '${_(r.homePage)}';`:"",s=Ie.resolve(process.cwd(),"index.css"),o=fr.existsSync(s)?"import './index.css';":"",i=r.homePage?"homePage: HomePage,":"",n=e?.plugins?.flatMap(L=>Object.entries(L.components||{}))||[],p=n.map(([L,x])=>`import * as _comp_${L} from '${_(x)}';
|
|
18
|
+
const ${L} = _comp_${L}.default || _comp_${L}['${L}'] || _comp_${L};`).join(`
|
|
19
|
+
`),u=n.map(([L])=>L).join(", "),l=Ie.basename(r.docsDir||"docs"),m=Ie.resolve(process.cwd(),r.docsDir||"docs"),f=["tsx","ts","jsx","js"].map(L=>Ie.resolve(m,`pages-external/index.${L}`)).find(L=>fr.existsSync(L)),P=f?`import * as _external_module from '${_(f)}';`:"";return i=f?"homePage: _external_module.homePage || HomePage,":r.homePage?"homePage: HomePage,":"",`
|
|
20
|
+
import { createBoltdocsApp as _createApp } from 'boltdocs/client';
|
|
21
|
+
import _routes from 'virtual:boltdocs-routes';
|
|
22
|
+
import _config from 'virtual:boltdocs-config';
|
|
23
|
+
import _user_mdx_components from 'virtual:boltdocs-mdx-components';
|
|
24
|
+
${o}
|
|
25
|
+
${t}
|
|
26
|
+
${p}
|
|
27
|
+
${P}
|
|
28
|
+
|
|
29
|
+
_createApp({
|
|
30
|
+
target: '#root',
|
|
31
|
+
routes: _routes,
|
|
32
|
+
docsDirName: '${l}',
|
|
33
|
+
config: _config,
|
|
34
|
+
modules: import.meta.glob('/${l}/**/*.{md,mdx}'),
|
|
35
|
+
hot: import.meta.hot,
|
|
36
|
+
${i}
|
|
37
|
+
${f?"externalPages: _external_module.pages, externalLayout: _external_module.layout,":""}
|
|
38
|
+
components: { ${u}${u?", ":""} ...(_user_mdx_components || {}) },
|
|
39
|
+
});
|
|
40
|
+
`}var dr=I(()=>{"use strict";a();J()});function gr(r){return`<!doctype html>
|
|
41
|
+
<html lang="en">
|
|
42
|
+
<head>
|
|
43
|
+
<meta charset="UTF-8" />
|
|
44
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
45
|
+
<title>${r.theme?.title||"Boltdocs"}</title>
|
|
46
|
+
</head>
|
|
47
|
+
<body>
|
|
48
|
+
<div id="root"></div>
|
|
49
|
+
</body>
|
|
50
|
+
</html>`}function dt(r,e){let t=e.theme,s=t?.title||"Boltdocs",o=t?.description||"",i=t?.favicon;!i&&t?.logo&&(typeof t.logo=="string"?i=t.logo:i=t.logo.light||t.logo.dark);let n=[i?`<link rel="icon" href="${i}">`:"",`<meta name="description" content="${o}">`,`<meta property="og:title" content="${s}">`,`<meta property="og:description" content="${o}">`,t?.ogImage?`<meta property="og:image" content="${t.ogImage}">`:"",'<meta property="og:type" content="website">','<meta name="twitter:card" content="summary_large_image">',`<meta name="twitter:title" content="${s}">`,`<meta name="twitter:description" content="${o}">`,t?.ogImage?`<meta name="twitter:image" content="${t.ogImage}">`:"",'<meta name="generator" content="Boltdocs">'].filter(Boolean).join(`
|
|
51
|
+
`),p=`
|
|
52
|
+
<script>
|
|
53
|
+
(function() {
|
|
54
|
+
try {
|
|
55
|
+
var stored = localStorage.getItem("boltdocs-theme");
|
|
56
|
+
var theme = stored || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
|
|
57
|
+
if (theme === "light") {
|
|
58
|
+
document.documentElement.classList.add("theme-light");
|
|
59
|
+
document.documentElement.dataset.theme = "light";
|
|
60
|
+
} else {
|
|
61
|
+
document.documentElement.classList.remove("theme-light");
|
|
62
|
+
document.documentElement.dataset.theme = "dark";
|
|
63
|
+
}
|
|
64
|
+
} catch (e) {}
|
|
65
|
+
})();
|
|
66
|
+
</script>
|
|
67
|
+
`;return r.includes("<title>")?r=r.replace(/<title>.*?<\/title>/,`<title>${s}</title>`):r=r.replace("</head>",` <title>${s}</title>
|
|
68
|
+
</head>`),r=r.replace("</head>",` ${n}
|
|
69
|
+
${p} </head>`),!r.includes("src/main")&&!r.includes("virtual:boltdocs-entry")&&(r=r.replace("</body>",` <script type="module">import "virtual:boltdocs-entry";</script>
|
|
70
|
+
</body>`)),r}var hr=I(()=>{"use strict";a()});function Er(r){let e=[];for(let t of r)if(e.push({id:t.path,title:t.title,content:t._content||"",url:t.path,display:t.groupTitle?`${t.groupTitle} > ${t.title}`:t.title,locale:t.locale,version:t.version}),t.headings)for(let s of t.headings)e.push({id:`${t.path}#${s.id}`,title:s.text,content:`${s.text} in ${t.title}`,url:`${t.path}#${s.id}`,display:`${t.title} > ${s.text}`,locale:t.locale,version:t.version});return e}var yr=I(()=>{"use strict";a()});var Le,gt=I(()=>{"use strict";a();Le={"X-Content-Type-Options":"nosniff","X-Frame-Options":"DENY","X-XSS-Protection":"1; mode=block","Referrer-Policy":"strict-origin-when-cross-origin","Permissions-Policy":"camera=(), microphone=(), geolocation=()","Strict-Transport-Security":"max-age=31536000; includeSubDomains"}});function Te(r){let e=process.env.NODE_ENV==="development",t={"default-src":["'self'"],"script-src":["'self'","'unsafe-inline'"],"style-src":["'self'","'unsafe-inline'"],"img-src":["'self'","data:","https:"],"font-src":["'self'"],"connect-src":["'self'"]};return e&&(t["script-src"]=["'self'","'unsafe-eval'","'unsafe-inline'"],t["style-src"]=["'self'","'unsafe-inline'"]),Object.entries(t).map(([s,o])=>`${s} ${o.join(" ")}`).join("; ")}var ht=I(()=>{"use strict";a()});var Pr=I(()=>{"use strict";a()});var re,oe,Oe,pe,Ne,fe=I(()=>{"use strict";a();re=class r extends Error{pluginName;constructor(e,t){super(`[plugin:${e}] ${t}`),this.name="PluginError",this.pluginName=e,Object.setPrototypeOf(this,r.prototype)}},oe=class r extends re{constructor(e,t){super(e,`Validation failed: ${t}`),this.name="PluginValidationError",Object.setPrototypeOf(this,r.prototype)}},Oe=class r extends re{constructor(e,t){super(e,`Compatibility error: ${t}`),this.name="PluginCompatibilityError",Object.setPrototypeOf(this,r.prototype)}},pe=class r extends re{constructor(e,t){super(e,`Missing required permission: '${t}'`),this.name="PluginPermissionError",Object.setPrototypeOf(this,r.prototype)}},Ne=class r extends re{hookName;constructor(e,t,s){super(e,`Error in hook '${t}': ${s.message}`),this.name="PluginHookError",this.hookName=t,this.stack=s.stack,Object.setPrototypeOf(this,r.prototype)}}});var Ae,Et=I(()=>{"use strict";a();Ae=class{data=new Map;getNamespaceKey(e,t){return`${e}:${t}`}get(e,t){let s=this.getNamespaceKey(e,t),o=this.data.get(s);if(o!==void 0)return typeof o=="object"&&o!==null?JSON.parse(JSON.stringify(o)):o}set(e,t,s){let o=this.getNamespaceKey(e,t),i=typeof s=="object"&&s!==null?JSON.parse(JSON.stringify(s)):s;this.data.set(o,i)}has(e,t){let s=this.getNamespaceKey(e,t);return this.data.has(s)}}});var me=v((Sc,$r)=>{"use strict";a();var ti="2.0.0",ri=Number.MAX_SAFE_INTEGER||9007199254740991,oi=16,si=250,ii=["major","premajor","minor","preminor","patch","prepatch","prerelease"];$r.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:oi,MAX_SAFE_BUILD_LENGTH:si,MAX_SAFE_INTEGER:ri,RELEASE_TYPES:ii,SEMVER_SPEC_VERSION:ti,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var de=v((Cc,xr)=>{"use strict";a();var ni=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};xr.exports=ni});var se=v((H,vr)=>{"use strict";a();var{MAX_SAFE_COMPONENT_LENGTH:yt,MAX_SAFE_BUILD_LENGTH:ai,MAX_LENGTH:li}=me(),ci=de();H=vr.exports={};var ui=H.re=[],pi=H.safeRe=[],E=H.src=[],fi=H.safeSrc=[],y=H.t={},mi=0,Pt="[a-zA-Z0-9-]",di=[["\\s",1],["\\d",li],[Pt,ai]],gi=r=>{for(let[e,t]of di)r=r.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return r},R=(r,e,t)=>{let s=gi(e),o=mi++;ci(r,o,e),y[r]=o,E[o]=e,fi[o]=s,ui[o]=new RegExp(e,t?"g":void 0),pi[o]=new RegExp(s,t?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*");R("NUMERICIDENTIFIERLOOSE","\\d+");R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Pt}*`);R("MAINVERSION",`(${E[y.NUMERICIDENTIFIER]})\\.(${E[y.NUMERICIDENTIFIER]})\\.(${E[y.NUMERICIDENTIFIER]})`);R("MAINVERSIONLOOSE",`(${E[y.NUMERICIDENTIFIERLOOSE]})\\.(${E[y.NUMERICIDENTIFIERLOOSE]})\\.(${E[y.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASEIDENTIFIER",`(?:${E[y.NONNUMERICIDENTIFIER]}|${E[y.NUMERICIDENTIFIER]})`);R("PRERELEASEIDENTIFIERLOOSE",`(?:${E[y.NONNUMERICIDENTIFIER]}|${E[y.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASE",`(?:-(${E[y.PRERELEASEIDENTIFIER]}(?:\\.${E[y.PRERELEASEIDENTIFIER]})*))`);R("PRERELEASELOOSE",`(?:-?(${E[y.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${E[y.PRERELEASEIDENTIFIERLOOSE]})*))`);R("BUILDIDENTIFIER",`${Pt}+`);R("BUILD",`(?:\\+(${E[y.BUILDIDENTIFIER]}(?:\\.${E[y.BUILDIDENTIFIER]})*))`);R("FULLPLAIN",`v?${E[y.MAINVERSION]}${E[y.PRERELEASE]}?${E[y.BUILD]}?`);R("FULL",`^${E[y.FULLPLAIN]}$`);R("LOOSEPLAIN",`[v=\\s]*${E[y.MAINVERSIONLOOSE]}${E[y.PRERELEASELOOSE]}?${E[y.BUILD]}?`);R("LOOSE",`^${E[y.LOOSEPLAIN]}$`);R("GTLT","((?:<|>)?=?)");R("XRANGEIDENTIFIERLOOSE",`${E[y.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);R("XRANGEIDENTIFIER",`${E[y.NUMERICIDENTIFIER]}|x|X|\\*`);R("XRANGEPLAIN",`[v=\\s]*(${E[y.XRANGEIDENTIFIER]})(?:\\.(${E[y.XRANGEIDENTIFIER]})(?:\\.(${E[y.XRANGEIDENTIFIER]})(?:${E[y.PRERELEASE]})?${E[y.BUILD]}?)?)?`);R("XRANGEPLAINLOOSE",`[v=\\s]*(${E[y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[y.XRANGEIDENTIFIERLOOSE]})(?:${E[y.PRERELEASELOOSE]})?${E[y.BUILD]}?)?)?`);R("XRANGE",`^${E[y.GTLT]}\\s*${E[y.XRANGEPLAIN]}$`);R("XRANGELOOSE",`^${E[y.GTLT]}\\s*${E[y.XRANGEPLAINLOOSE]}$`);R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${yt}})(?:\\.(\\d{1,${yt}}))?(?:\\.(\\d{1,${yt}}))?`);R("COERCE",`${E[y.COERCEPLAIN]}(?:$|[^\\d])`);R("COERCEFULL",E[y.COERCEPLAIN]+`(?:${E[y.PRERELEASE]})?(?:${E[y.BUILD]})?(?:$|[^\\d])`);R("COERCERTL",E[y.COERCE],!0);R("COERCERTLFULL",E[y.COERCEFULL],!0);R("LONETILDE","(?:~>?)");R("TILDETRIM",`(\\s*)${E[y.LONETILDE]}\\s+`,!0);H.tildeTrimReplace="$1~";R("TILDE",`^${E[y.LONETILDE]}${E[y.XRANGEPLAIN]}$`);R("TILDELOOSE",`^${E[y.LONETILDE]}${E[y.XRANGEPLAINLOOSE]}$`);R("LONECARET","(?:\\^)");R("CARETTRIM",`(\\s*)${E[y.LONECARET]}\\s+`,!0);H.caretTrimReplace="$1^";R("CARET",`^${E[y.LONECARET]}${E[y.XRANGEPLAIN]}$`);R("CARETLOOSE",`^${E[y.LONECARET]}${E[y.XRANGEPLAINLOOSE]}$`);R("COMPARATORLOOSE",`^${E[y.GTLT]}\\s*(${E[y.LOOSEPLAIN]})$|^$`);R("COMPARATOR",`^${E[y.GTLT]}\\s*(${E[y.FULLPLAIN]})$|^$`);R("COMPARATORTRIM",`(\\s*)${E[y.GTLT]}\\s*(${E[y.LOOSEPLAIN]}|${E[y.XRANGEPLAIN]})`,!0);H.comparatorTrimReplace="$1$2$3";R("HYPHENRANGE",`^\\s*(${E[y.XRANGEPLAIN]})\\s+-\\s+(${E[y.XRANGEPLAIN]})\\s*$`);R("HYPHENRANGELOOSE",`^\\s*(${E[y.XRANGEPLAINLOOSE]})\\s+-\\s+(${E[y.XRANGEPLAINLOOSE]})\\s*$`);R("STAR","(<|>)?=?\\s*\\*");R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var ke=v((Tc,Rr)=>{"use strict";a();var hi=Object.freeze({loose:!0}),Ei=Object.freeze({}),yi=r=>r?typeof r!="object"?hi:r:Ei;Rr.exports=yi});var $t=v((Nc,wr)=>{"use strict";a();var br=/^[0-9]+$/,Sr=(r,e)=>{if(typeof r=="number"&&typeof e=="number")return r===e?0:r<e?-1:1;let t=br.test(r),s=br.test(e);return t&&s&&(r=+r,e=+e),r===e?0:t&&!s?-1:s&&!t?1:r<e?-1:1},Pi=(r,e)=>Sr(e,r);wr.exports={compareIdentifiers:Sr,rcompareIdentifiers:Pi}});var k=v((kc,Ir)=>{"use strict";a();var De=de(),{MAX_LENGTH:Cr,MAX_SAFE_INTEGER:Be}=me(),{safeRe:qe,t:je}=se(),$i=ke(),{compareIdentifiers:xt}=$t(),vt=class r{constructor(e,t){if(t=$i(t),e instanceof r){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Cr)throw new TypeError(`version is longer than ${Cr} characters`);De("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let s=e.trim().match(t.loose?qe[je.LOOSE]:qe[je.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>Be||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Be||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Be||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let i=+o;if(i>=0&&i<Be)return i}return o}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(De("SemVer.compare",this.version,this.options,e),!(e instanceof r)){if(typeof e=="string"&&e===this.version)return 0;e=new r(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof r||(e=new r(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof r||(e=new r(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let s=this.prerelease[t],o=e.prerelease[t];if(De("prerelease compare",t,s,o),s===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(s===void 0)return-1;if(s===o)continue;return xt(s,o)}while(++t)}compareBuild(e){e instanceof r||(e=new r(e,this.options));let t=0;do{let s=this.build[t],o=e.build[t];if(De("build compare",t,s,o),s===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(s===void 0)return-1;if(s===o)continue;return xt(s,o)}while(++t)}inc(e,t,s){if(e.startsWith("pre")){if(!t&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let o=`-${t}`.match(this.options.loose?qe[je.PRERELEASELOOSE]:qe[je.PRERELEASE]);if(!o||o[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,s),this.inc("pre",t,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,s),this.inc("pre",t,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let o=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[o];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(t===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(t){let i=[t,o];s===!1&&(i=[t]),xt(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Ir.exports=vt});var Q=v((Bc,Tr)=>{"use strict";a();var Lr=k(),xi=(r,e,t=!1)=>{if(r instanceof Lr)return r;try{return new Lr(r,e)}catch(s){if(!t)return null;throw s}};Tr.exports=xi});var Nr=v((jc,Or)=>{"use strict";a();var vi=Q(),Ri=(r,e)=>{let t=vi(r,e);return t?t.version:null};Or.exports=Ri});var kr=v((Fc,Ar)=>{"use strict";a();var bi=Q(),Si=(r,e)=>{let t=bi(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Ar.exports=Si});var qr=v((Gc,Br)=>{"use strict";a();var Dr=k(),wi=(r,e,t,s,o)=>{typeof t=="string"&&(o=s,s=t,t=void 0);try{return new Dr(r instanceof Dr?r.version:r,t).inc(e,s,o).version}catch{return null}};Br.exports=wi});var Fr=v((Vc,Mr)=>{"use strict";a();var jr=Q(),Ci=(r,e)=>{let t=jr(r,null,!0),s=jr(e,null,!0),o=t.compare(s);if(o===0)return null;let i=o>0,n=i?t:s,p=i?s:t,u=!!n.prerelease.length;if(!!p.prerelease.length&&!u){if(!p.patch&&!p.minor)return"major";if(p.compareMain(n)===0)return p.minor&&!p.patch?"minor":"patch"}let m=u?"pre":"";return t.major!==s.major?m+"major":t.minor!==s.minor?m+"minor":t.patch!==s.patch?m+"patch":"prerelease"};Mr.exports=Ci});var Gr=v((Xc,_r)=>{"use strict";a();var Ii=k(),Li=(r,e)=>new Ii(r,e).major;_r.exports=Li});var Vr=v((Wc,Hr)=>{"use strict";a();var Ti=k(),Oi=(r,e)=>new Ti(r,e).minor;Hr.exports=Oi});var Xr=v((Kc,Ur)=>{"use strict";a();var Ni=k(),Ai=(r,e)=>new Ni(r,e).patch;Ur.exports=Ai});var Wr=v((Zc,zr)=>{"use strict";a();var ki=Q(),Di=(r,e)=>{let t=ki(r,e);return t&&t.prerelease.length?t.prerelease:null};zr.exports=Di});var M=v((eu,Kr)=>{"use strict";a();var Yr=k(),Bi=(r,e,t)=>new Yr(r,t).compare(new Yr(e,t));Kr.exports=Bi});var Zr=v((ru,Jr)=>{"use strict";a();var qi=M(),ji=(r,e,t)=>qi(e,r,t);Jr.exports=ji});var eo=v((su,Qr)=>{"use strict";a();var Mi=M(),Fi=(r,e)=>Mi(r,e,!0);Qr.exports=Fi});var Me=v((nu,ro)=>{"use strict";a();var to=k(),_i=(r,e,t)=>{let s=new to(r,t),o=new to(e,t);return s.compare(o)||s.compareBuild(o)};ro.exports=_i});var so=v((lu,oo)=>{"use strict";a();var Gi=Me(),Hi=(r,e)=>r.sort((t,s)=>Gi(t,s,e));oo.exports=Hi});var no=v((uu,io)=>{"use strict";a();var Vi=Me(),Ui=(r,e)=>r.sort((t,s)=>Vi(s,t,e));io.exports=Ui});var ge=v((fu,ao)=>{"use strict";a();var Xi=M(),zi=(r,e,t)=>Xi(r,e,t)>0;ao.exports=zi});var Fe=v((du,lo)=>{"use strict";a();var Wi=M(),Yi=(r,e,t)=>Wi(r,e,t)<0;lo.exports=Yi});var Rt=v((hu,co)=>{"use strict";a();var Ki=M(),Ji=(r,e,t)=>Ki(r,e,t)===0;co.exports=Ji});var bt=v((yu,uo)=>{"use strict";a();var Zi=M(),Qi=(r,e,t)=>Zi(r,e,t)!==0;uo.exports=Qi});var _e=v(($u,po)=>{"use strict";a();var en=M(),tn=(r,e,t)=>en(r,e,t)>=0;po.exports=tn});var Ge=v((vu,fo)=>{"use strict";a();var rn=M(),on=(r,e,t)=>rn(r,e,t)<=0;fo.exports=on});var St=v((bu,mo)=>{"use strict";a();var sn=Rt(),nn=bt(),an=ge(),ln=_e(),cn=Fe(),un=Ge(),pn=(r,e,t,s)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return sn(r,t,s);case"!=":return nn(r,t,s);case">":return an(r,t,s);case">=":return ln(r,t,s);case"<":return cn(r,t,s);case"<=":return un(r,t,s);default:throw new TypeError(`Invalid operator: ${e}`)}};mo.exports=pn});var ho=v((wu,go)=>{"use strict";a();var fn=k(),mn=Q(),{safeRe:He,t:Ve}=se(),dn=(r,e)=>{if(r instanceof fn)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(e.includePrerelease?He[Ve.COERCEFULL]:He[Ve.COERCE]);else{let u=e.includePrerelease?He[Ve.COERCERTLFULL]:He[Ve.COERCERTL],l;for(;(l=u.exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||l.index+l[0].length!==t.index+t[0].length)&&(t=l),u.lastIndex=l.index+l[1].length+l[2].length;u.lastIndex=-1}if(t===null)return null;let s=t[2],o=t[3]||"0",i=t[4]||"0",n=e.includePrerelease&&t[5]?`-${t[5]}`:"",p=e.includePrerelease&&t[6]?`+${t[6]}`:"";return mn(`${s}.${o}.${i}${n}${p}`,e)};go.exports=dn});var yo=v((Iu,Eo)=>{"use strict";a();var wt=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let o=this.map.keys().next().value;this.delete(o)}this.map.set(e,t)}return this}};Eo.exports=wt});var F=v((Tu,vo)=>{"use strict";a();var gn=/\s+/g,Ct=class r{constructor(e,t){if(t=En(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof It)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(gn," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(o=>!$o(o[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&bn(o[0])){this.set=[o];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let s=0;s<t.length;s++)s>0&&(this.formatted+=" "),this.formatted+=t[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&vn)|(this.options.loose&&Rn))+":"+e,o=Po.get(s);if(o)return o;let i=this.options.loose,n=i?B[D.HYPHENRANGELOOSE]:B[D.HYPHENRANGE];e=e.replace(n,kn(this.options.includePrerelease)),T("hyphen replace",e),e=e.replace(B[D.COMPARATORTRIM],Pn),T("comparator trim",e),e=e.replace(B[D.TILDETRIM],$n),T("tilde trim",e),e=e.replace(B[D.CARETTRIM],xn),T("caret trim",e);let p=e.split(" ").map(f=>Sn(f,this.options)).join(" ").split(/\s+/).map(f=>An(f,this.options));i&&(p=p.filter(f=>(T("loose invalid filter",f,this.options),!!f.match(B[D.COMPARATORLOOSE])))),T("range list",p);let u=new Map,l=p.map(f=>new It(f,this.options));for(let f of l){if($o(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let m=[...u.values()];return Po.set(s,m),m}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(s=>xo(s,t)&&e.set.some(o=>xo(o,t)&&s.every(i=>o.every(n=>i.intersects(n,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new yn(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(Dn(this.set[t],e,this.options))return!0;return!1}};vo.exports=Ct;var hn=yo(),Po=new hn,En=ke(),It=he(),T=de(),yn=k(),{safeRe:B,t:D,comparatorTrimReplace:Pn,tildeTrimReplace:$n,caretTrimReplace:xn}=se(),{FLAG_INCLUDE_PRERELEASE:vn,FLAG_LOOSE:Rn}=me(),$o=r=>r.value==="<0.0.0-0",bn=r=>r.value==="",xo=(r,e)=>{let t=!0,s=r.slice(),o=s.pop();for(;t&&s.length;)t=s.every(i=>o.intersects(i,e)),o=s.pop();return t},Sn=(r,e)=>(r=r.replace(B[D.BUILD],""),T("comp",r,e),r=In(r,e),T("caret",r),r=wn(r,e),T("tildes",r),r=Tn(r,e),T("xrange",r),r=Nn(r,e),T("stars",r),r),q=r=>!r||r.toLowerCase()==="x"||r==="*",wn=(r,e)=>r.trim().split(/\s+/).map(t=>Cn(t,e)).join(" "),Cn=(r,e)=>{let t=e.loose?B[D.TILDELOOSE]:B[D.TILDE];return r.replace(t,(s,o,i,n,p)=>{T("tilde",r,s,o,i,n,p);let u;return q(o)?u="":q(i)?u=`>=${o}.0.0 <${+o+1}.0.0-0`:q(n)?u=`>=${o}.${i}.0 <${o}.${+i+1}.0-0`:p?(T("replaceTilde pr",p),u=`>=${o}.${i}.${n}-${p} <${o}.${+i+1}.0-0`):u=`>=${o}.${i}.${n} <${o}.${+i+1}.0-0`,T("tilde return",u),u})},In=(r,e)=>r.trim().split(/\s+/).map(t=>Ln(t,e)).join(" "),Ln=(r,e)=>{T("caret",r,e);let t=e.loose?B[D.CARETLOOSE]:B[D.CARET],s=e.includePrerelease?"-0":"";return r.replace(t,(o,i,n,p,u)=>{T("caret",r,o,i,n,p,u);let l;return q(i)?l="":q(n)?l=`>=${i}.0.0${s} <${+i+1}.0.0-0`:q(p)?i==="0"?l=`>=${i}.${n}.0${s} <${i}.${+n+1}.0-0`:l=`>=${i}.${n}.0${s} <${+i+1}.0.0-0`:u?(T("replaceCaret pr",u),i==="0"?n==="0"?l=`>=${i}.${n}.${p}-${u} <${i}.${n}.${+p+1}-0`:l=`>=${i}.${n}.${p}-${u} <${i}.${+n+1}.0-0`:l=`>=${i}.${n}.${p}-${u} <${+i+1}.0.0-0`):(T("no pr"),i==="0"?n==="0"?l=`>=${i}.${n}.${p}${s} <${i}.${n}.${+p+1}-0`:l=`>=${i}.${n}.${p}${s} <${i}.${+n+1}.0-0`:l=`>=${i}.${n}.${p} <${+i+1}.0.0-0`),T("caret return",l),l})},Tn=(r,e)=>(T("replaceXRanges",r,e),r.split(/\s+/).map(t=>On(t,e)).join(" ")),On=(r,e)=>{r=r.trim();let t=e.loose?B[D.XRANGELOOSE]:B[D.XRANGE];return r.replace(t,(s,o,i,n,p,u)=>{T("xRange",r,s,o,i,n,p,u);let l=q(i),m=l||q(n),f=m||q(p),P=f;return o==="="&&P&&(o=""),u=e.includePrerelease?"-0":"",l?o===">"||o==="<"?s="<0.0.0-0":s="*":o&&P?(m&&(n=0),p=0,o===">"?(o=">=",m?(i=+i+1,n=0,p=0):(n=+n+1,p=0)):o==="<="&&(o="<",m?i=+i+1:n=+n+1),o==="<"&&(u="-0"),s=`${o+i}.${n}.${p}${u}`):m?s=`>=${i}.0.0${u} <${+i+1}.0.0-0`:f&&(s=`>=${i}.${n}.0${u} <${i}.${+n+1}.0-0`),T("xRange return",s),s})},Nn=(r,e)=>(T("replaceStars",r,e),r.trim().replace(B[D.STAR],"")),An=(r,e)=>(T("replaceGTE0",r,e),r.trim().replace(B[e.includePrerelease?D.GTE0PRE:D.GTE0],"")),kn=r=>(e,t,s,o,i,n,p,u,l,m,f,P)=>(q(s)?t="":q(o)?t=`>=${s}.0.0${r?"-0":""}`:q(i)?t=`>=${s}.${o}.0${r?"-0":""}`:n?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,q(l)?u="":q(m)?u=`<${+l+1}.0.0-0`:q(f)?u=`<${l}.${+m+1}.0-0`:P?u=`<=${l}.${m}.${f}-${P}`:r?u=`<${l}.${m}.${+f+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),Dn=(r,e,t)=>{for(let s=0;s<r.length;s++)if(!r[s].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let s=0;s<r.length;s++)if(T(r[s].semver),r[s].semver!==It.ANY&&r[s].semver.prerelease.length>0){let o=r[s].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}});var he=v((Nu,Io)=>{"use strict";a();var Ee=Symbol("SemVer ANY"),Ot=class r{static get ANY(){return Ee}constructor(e,t){if(t=Ro(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Tt("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ee?this.value="":this.value=this.operator+this.semver.version,Tt("comp",this)}parse(e){let t=this.options.loose?bo[So.COMPARATORLOOSE]:bo[So.COMPARATOR],s=e.match(t);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new wo(s[2],this.options.loose):this.semver=Ee}toString(){return this.value}test(e){if(Tt("Comparator.test",e,this.options.loose),this.semver===Ee||e===Ee)return!0;if(typeof e=="string")try{e=new wo(e,this.options)}catch{return!1}return Lt(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Co(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new Co(this.value,t).test(e.semver):(t=Ro(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Lt(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Lt(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Io.exports=Ot;var Ro=ke(),{safeRe:bo,t:So}=se(),Lt=St(),Tt=de(),wo=k(),Co=F()});var ye=v((ku,Lo)=>{"use strict";a();var Bn=F(),qn=(r,e,t)=>{try{e=new Bn(e,t)}catch{return!1}return e.test(r)};Lo.exports=qn});var Oo=v((Bu,To)=>{"use strict";a();var jn=F(),Mn=(r,e)=>new jn(r,e).set.map(t=>t.map(s=>s.value).join(" ").trim().split(" "));To.exports=Mn});var Ao=v((ju,No)=>{"use strict";a();var Fn=k(),_n=F(),Gn=(r,e,t)=>{let s=null,o=null,i=null;try{i=new _n(e,t)}catch{return null}return r.forEach(n=>{i.test(n)&&(!s||o.compare(n)===-1)&&(s=n,o=new Fn(s,t))}),s};No.exports=Gn});var Do=v((Fu,ko)=>{"use strict";a();var Hn=k(),Vn=F(),Un=(r,e,t)=>{let s=null,o=null,i=null;try{i=new Vn(e,t)}catch{return null}return r.forEach(n=>{i.test(n)&&(!s||o.compare(n)===1)&&(s=n,o=new Hn(s,t))}),s};ko.exports=Un});var jo=v((Gu,qo)=>{"use strict";a();var Nt=k(),Xn=F(),Bo=ge(),zn=(r,e)=>{r=new Xn(r,e);let t=new Nt("0.0.0");if(r.test(t)||(t=new Nt("0.0.0-0"),r.test(t)))return t;t=null;for(let s=0;s<r.set.length;++s){let o=r.set[s],i=null;o.forEach(n=>{let p=new Nt(n.semver.version);switch(n.operator){case">":p.prerelease.length===0?p.patch++:p.prerelease.push(0),p.raw=p.format();case"":case">=":(!i||Bo(p,i))&&(i=p);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${n.operator}`)}}),i&&(!t||Bo(t,i))&&(t=i)}return t&&r.test(t)?t:null};qo.exports=zn});var Fo=v((Vu,Mo)=>{"use strict";a();var Wn=F(),Yn=(r,e)=>{try{return new Wn(r,e).range||"*"}catch{return null}};Mo.exports=Yn});var Ue=v((Xu,Vo)=>{"use strict";a();var Kn=k(),Ho=he(),{ANY:Jn}=Ho,Zn=F(),Qn=ye(),_o=ge(),Go=Fe(),ea=Ge(),ta=_e(),ra=(r,e,t,s)=>{r=new Kn(r,s),e=new Zn(e,s);let o,i,n,p,u;switch(t){case">":o=_o,i=ea,n=Go,p=">",u=">=";break;case"<":o=Go,i=ta,n=_o,p="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Qn(r,e,s))return!1;for(let l=0;l<e.set.length;++l){let m=e.set[l],f=null,P=null;if(m.forEach(d=>{d.semver===Jn&&(d=new Ho(">=0.0.0")),f=f||d,P=P||d,o(d.semver,f.semver,s)?f=d:n(d.semver,P.semver,s)&&(P=d)}),f.operator===p||f.operator===u||(!P.operator||P.operator===p)&&i(r,P.semver))return!1;if(P.operator===u&&n(r,P.semver))return!1}return!0};Vo.exports=ra});var Xo=v((Wu,Uo)=>{"use strict";a();var oa=Ue(),sa=(r,e,t)=>oa(r,e,">",t);Uo.exports=sa});var Wo=v((Ku,zo)=>{"use strict";a();var ia=Ue(),na=(r,e,t)=>ia(r,e,"<",t);zo.exports=na});var Jo=v((Zu,Ko)=>{"use strict";a();var Yo=F(),aa=(r,e,t)=>(r=new Yo(r,t),e=new Yo(e,t),r.intersects(e,t));Ko.exports=aa});var Qo=v((ep,Zo)=>{"use strict";a();var la=ye(),ca=M();Zo.exports=(r,e,t)=>{let s=[],o=null,i=null,n=r.sort((m,f)=>ca(m,f,t));for(let m of n)la(m,e,t)?(i=m,o||(o=m)):(i&&s.push([o,i]),i=null,o=null);o&&s.push([o,null]);let p=[];for(let[m,f]of s)m===f?p.push(m):!f&&m===n[0]?p.push("*"):f?m===n[0]?p.push(`<=${f}`):p.push(`${m} - ${f}`):p.push(`>=${m}`);let u=p.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var is=v((rp,ss)=>{"use strict";a();var es=F(),kt=he(),{ANY:At}=kt,Pe=ye(),Dt=M(),ua=(r,e,t={})=>{if(r===e)return!0;r=new es(r,t),e=new es(e,t);let s=!1;e:for(let o of r.set){for(let i of e.set){let n=fa(o,i,t);if(s=s||n!==null,n)continue e}if(s)return!1}return!0},pa=[new kt(">=0.0.0-0")],ts=[new kt(">=0.0.0")],fa=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===At){if(e.length===1&&e[0].semver===At)return!0;t.includePrerelease?r=pa:r=ts}if(e.length===1&&e[0].semver===At){if(t.includePrerelease)return!0;e=ts}let s=new Set,o,i;for(let d of r)d.operator===">"||d.operator===">="?o=rs(o,d,t):d.operator==="<"||d.operator==="<="?i=os(i,d,t):s.add(d.semver);if(s.size>1)return null;let n;if(o&&i){if(n=Dt(o.semver,i.semver,t),n>0)return null;if(n===0&&(o.operator!==">="||i.operator!=="<="))return null}for(let d of s){if(o&&!Pe(d,String(o),t)||i&&!Pe(d,String(i),t))return null;for(let L of e)if(!Pe(d,String(L),t))return!1;return!0}let p,u,l,m,f=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,P=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1;f&&f.prerelease.length===1&&i.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let d of e){if(m=m||d.operator===">"||d.operator===">=",l=l||d.operator==="<"||d.operator==="<=",o){if(P&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===P.major&&d.semver.minor===P.minor&&d.semver.patch===P.patch&&(P=!1),d.operator===">"||d.operator===">="){if(p=rs(o,d,t),p===d&&p!==o)return!1}else if(o.operator===">="&&!Pe(o.semver,String(d),t))return!1}if(i){if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),d.operator==="<"||d.operator==="<="){if(u=os(i,d,t),u===d&&u!==i)return!1}else if(i.operator==="<="&&!Pe(i.semver,String(d),t))return!1}if(!d.operator&&(i||o)&&n!==0)return!1}return!(o&&l&&!i&&n!==0||i&&m&&!o&&n!==0||P||f)},rs=(r,e,t)=>{if(!r)return e;let s=Dt(r.semver,e.semver,t);return s>0?r:s<0||e.operator===">"&&r.operator===">="?e:r},os=(r,e,t)=>{if(!r)return e;let s=Dt(r.semver,e.semver,t);return s<0?r:s>0||e.operator==="<"&&r.operator==="<="?e:r};ss.exports=ua});var cs=v((sp,ls)=>{"use strict";a();var Bt=se(),ns=me(),ma=k(),as=$t(),da=Q(),ga=Nr(),ha=kr(),Ea=qr(),ya=Fr(),Pa=Gr(),$a=Vr(),xa=Xr(),va=Wr(),Ra=M(),ba=Zr(),Sa=eo(),wa=Me(),Ca=so(),Ia=no(),La=ge(),Ta=Fe(),Oa=Rt(),Na=bt(),Aa=_e(),ka=Ge(),Da=St(),Ba=ho(),qa=he(),ja=F(),Ma=ye(),Fa=Oo(),_a=Ao(),Ga=Do(),Ha=jo(),Va=Fo(),Ua=Ue(),Xa=Xo(),za=Wo(),Wa=Jo(),Ya=Qo(),Ka=is();ls.exports={parse:da,valid:ga,clean:ha,inc:Ea,diff:ya,major:Pa,minor:$a,patch:xa,prerelease:va,compare:Ra,rcompare:ba,compareLoose:Sa,compareBuild:wa,sort:Ca,rsort:Ia,gt:La,lt:Ta,eq:Oa,neq:Na,gte:Aa,lte:ka,cmp:Da,coerce:Ba,Comparator:qa,Range:ja,satisfies:Ma,toComparators:Fa,maxSatisfying:_a,minSatisfying:Ga,minVersion:Ha,validRange:Va,outside:Ua,gtr:Xa,ltr:za,intersects:Wa,simplifyRange:Ya,subset:Ka,SemVer:ma,re:Bt.re,src:Bt.src,tokens:Bt.t,SEMVER_SPEC_VERSION:ns.SEMVER_SPEC_VERSION,RELEASE_TYPES:ns.RELEASE_TYPES,compareIdentifiers:as.compareIdentifiers,rcompareIdentifiers:as.rcompareIdentifiers}});import{z as G}from"zod";import Ja from"path";function ps(r,e){let t=[],s=new Set;for(let o of r){let i=Za.safeParse(o);if(!i.success)throw new oe(o.name||"unknown",i.error.issues.map(p=>`${p.path.join(".")}: ${p.message}`).join(", "));let n=i.data;if(s.has(n.name))throw new oe(n.name,"Duplicate plugin name detected");if(s.add(n.name),n.boltdocsVersion&&!us.default.satisfies(e,n.boltdocsVersion))throw new Oe(n.name,`Plugin expects Boltdocs version ${n.boltdocsVersion}, but current is ${e}`);if(n.components){for(let[p,u]of Object.entries(n.components))if((u.includes("..")||Ja.isAbsolute(u))&&u.includes(".."))throw new oe(n.name,`Component '${p}' has an invalid path: traversal sequences are not allowed.`)}t.push(n)}return t}function ie(r,e){return r.permissions?r.permissions.includes(e):!1}var us,Za,qt=I(()=>{"use strict";a();us=As(cs());ct();fe();Za=lt.extend({version:G.string().optional(),boltdocsVersion:G.string().optional(),permissions:G.array(G.string()).optional(),hooks:G.object({beforeBuild:G.function().optional(),afterBuild:G.function().optional(),beforeDev:G.function().optional(),afterDev:G.function().optional(),configResolved:G.function().optional(),buildEnd:G.function().optional()}).optional()})});var W,jt=I(()=>{"use strict";a();fe();qt();W=class{static checkPermission(e,t){if(!ie(e,t))throw new pe(e.name,t)}static getSanitizedCapabilities(e){return{remarkPlugins:ie(e,"mdx:remark")?e.remarkPlugins:[],rehypePlugins:ie(e,"mdx:rehype")?e.rehypePlugins:[],vitePlugins:ie(e,"vite:config")?e.vitePlugins:[],components:ie(e,"components")?e.components:{}}}static async executeWithIsolation(e,t,s,o){try{return this.checkPermission(e,t),await o()}catch(i){if(i instanceof pe){console.warn(`[boltdocs] Skipping hook '${s}' for plugin '${e.name}': ${i.message}`);return}throw i}}}});var Xe,fs=I(()=>{"use strict";a();fe();Et();jt();Xe=class{plugins;config;store;constructor(e,t){this.plugins=e,this.config=t,this.store=new Ae}async runHook(e,...t){let s=this.getSortedPlugins();for(let o of s){if(!o.hooks?.[e])continue;let i=this.createContext(o),n=e.toLowerCase().includes("build"),p=e.toLowerCase().includes("dev"),u=n?"hooks:build":p?"hooks:dev":void 0;try{u?await W.executeWithIsolation(o,u,e,()=>o.hooks[e](i,...t)):await o.hooks[e](i,...t)}catch(l){let m=new Ne(o.name,e,l instanceof Error?l:new Error(String(l)));i.logger.error(m)}}}getSortedPlugins(){let e=this.plugins.filter(o=>o.enforce==="pre"),t=this.plugins.filter(o=>!o.enforce),s=this.plugins.filter(o=>o.enforce==="post");return[...e,...t,...s]}createContext(e){return{config:Object.freeze({...this.config}),meta:{name:e.name,version:e.version,boltdocsVersion:e.boltdocsVersion},store:{get:(t,s)=>this.store.get(t,s),set:(t,s,o)=>this.store.set(t,s,o),has:(t,s)=>this.store.has(t,s)},logger:this.createLogger(e.name)}}createLogger(e){let t=`[plugin:${e}]`;return{info:s=>console.log(`${t} INFO: ${s}`),warn:s=>console.warn(`${t} WARN: ${s}`),error:s=>{let o=s instanceof Error?s.message:s;console.error(`${t} ERROR: ${o}`)},debug:s=>console.debug(`${t} DEBUG: ${s}`)}}}});function xp(r){return r}var ze=I(()=>{"use strict";a();Pr();fe();Et();qt();jt();fs()});var ms=I(()=>{"use strict";a()});import{loadEnv as Qa}from"vite";import{ViteImageOptimizer as el}from"vite-plugin-image-optimizer";import V from"path";import ds from"fs";function gs(r={},e){let t=V.resolve(process.cwd(),r.docsDir||"docs"),s=_(t),o=e,i,n=!1,p,u=[];return[{name:"vite-plugin-boltdocs",enforce:"pre",async config(l,m){n=m.command==="build";let f=l.envDir||process.cwd(),P=Qa(m.mode,f,"");Object.assign(process.env,P),o||(o=await Z(t));let d=(await import("./package-NW2UUNQH.mjs")).version,L=ps(o.plugins||[],d);return o.plugins=L,p=new Xe(L,o),u=L.flatMap(x=>W.getSanitizedCapabilities(x).vitePlugins||[]),n&&await p.runHook("beforeBuild"),{optimizeDeps:{include:["react","react-dom"],exclude:["boltdocs","boltdocs/client","boltdocs/hooks","boltdocs/primitives","boltdocs/base-ui","boltdocs/mdx","boltdocs/integrations","boltdocs/client/hooks","boltdocs/client/primitives"]}}},configResolved(l){i=l,p?.runHook("configResolved",o)},async configureServer(l){await p?.runHook("beforeDev"),l.middlewares.use((b,w,S)=>{process.env.NODE_ENV==="production"&&Object.entries(Le).forEach(([A,C])=>{w.setHeader(A,C)}),o.security?.enableCSP&&w.setHeader("Content-Security-Policy",Te(o)),S()}),l.middlewares.use((b,w,S)=>{if(b.url==="/robots.txt"){let O=Ce(o);w.statusCode=200,w.setHeader("Content-Type","text/plain"),w.end(O);return}S()}),l.middlewares.use(async(b,w,S)=>{let O=b.url?.split("?")[0]||"/",A=b.headers.accept||"",C=O==="/"||O.startsWith("/docs")||o.i18n&&Object.keys(o.i18n.locales).some(j=>O.startsWith(`/${j}/docs`)||O===`/${j}`)||!0,Y=/\.(js|css|png|jpe?g|gif|svg|ico|webp|woff2?|ttf|otf|mp4|webm|ogg|mp3|wav|flac|aac|pdf|zip|gz|map|json)$/i.test(O);if(A.includes("text/html")&&!Y&&C){let j=gr(o);j=dt(j,o),j=await l.transformIndexHtml(b.url||"/",j),w.statusCode=200,w.setHeader("Content-Type","text/html"),w.end(j);return}S()});let m=Se.map(b=>V.resolve(process.cwd(),b)),f=["tsx","jsx"],P=f.map(b=>V.resolve(t,`layout.${b}`)),d=["tsx","ts","jsx","js"],L=d.map(b=>V.resolve(t,`mdx-components.${b}`)),x=d.map(b=>V.resolve(t,`pages-external/index.${b}`));l.watcher.add([...m,...L,...P,...x]);let $=async(b,w)=>{try{let S=_(b);if(Se.some(C=>S.endsWith(C))){l.restart();return}if(d.some(C=>S.endsWith(`mdx-components.${C}`))){let C=l.moduleGraph.getModuleById("\0virtual:boltdocs-mdx-components");C&&l.moduleGraph.invalidateModule(C),l.ws.send({type:"full-reload"});return}if(f.some(C=>S.endsWith(`layout.${C}`))){let C=l.moduleGraph.getModuleById("\0virtual:boltdocs-layout");C&&l.moduleGraph.invalidateModule(C),l.ws.send({type:"full-reload"});return}if(S.includes("/pages-external/")||S.includes("\\pages-external\\")){let C=l.moduleGraph.getModuleById("\0virtual:boltdocs-entry");C&&l.moduleGraph.invalidateModule(C),l.ws.send({type:"full-reload"});return}if(!S.startsWith(s)||!Xt(S))return;if(w==="add"||w==="unlink"){st(),o=await Z(t);let C=l.moduleGraph.getModuleById("\0virtual:boltdocs-config");C&&l.moduleGraph.invalidateModule(C),l.ws.send({type:"custom",event:"boltdocs:config-update",data:{theme:o?.theme,i18n:o?.i18n,versions:o?.versions,siteUrl:o?.siteUrl}})}else it(b);let O=await te(t,o,"/docs",w!=="change"),A=l.moduleGraph.getModuleById("\0virtual:boltdocs-routes");A&&l.moduleGraph.invalidateModule(A),l.ws.send({type:"custom",event:"boltdocs:routes-update",data:O})}catch(S){console.error(`[boltdocs] HMR error during ${w} event:`,S)}};l.watcher.on("add",b=>$(b,"add")),l.watcher.on("unlink",b=>$(b,"unlink")),l.watcher.on("change",b=>$(b,"change")),await p?.runHook("afterDev")},resolveId(l){if(l==="virtual:boltdocs-routes"||l==="virtual:boltdocs-config"||l==="virtual:boltdocs-entry"||l==="virtual:boltdocs-mdx-components"||l==="virtual:boltdocs-layout"||l==="virtual:boltdocs-search")return"\0"+l},async load(l){if(l==="\0virtual:boltdocs-routes"){let m=await te(t,o);return`export default ${JSON.stringify(m,null,2)};`}if(l==="\0virtual:boltdocs-config"){let m={theme:o?.theme,i18n:o?.i18n,versions:o?.versions,siteUrl:o?.siteUrl,plugins:o?.plugins?.map(f=>({name:f.name}))};return`export default ${JSON.stringify(m,null,2)};`}if(l==="\0virtual:boltdocs-entry")return mr(r,o);if(l==="\0virtual:boltdocs-mdx-components"){let m=["tsx","ts","jsx","js"],f=null;for(let P of m){let d=V.resolve(t,`mdx-components.${P}`);if(ds.existsSync(d)){f=d;break}}if(f){let P=_(f);return`import * as components from '${P}';
|
|
71
|
+
const mdxComponents = components.default || components;
|
|
72
|
+
export default mdxComponents;
|
|
73
|
+
export * from '${P}';`}return"export default {};"}if(l==="\0virtual:boltdocs-layout"){let m=["tsx","jsx"],f=null;for(let P of m){let d=V.resolve(t,`layout.${P}`);if(ds.existsSync(d)){f=d;break}}return f?`import UserLayout from '${_(f)}';
|
|
74
|
+
export default UserLayout;`:`import { DefaultLayout } from 'boltdocs/client';
|
|
75
|
+
export default DefaultLayout;`}if(l==="\0virtual:boltdocs-search"){let m=await te(t,o),f=Er(m);return`export default ${JSON.stringify(f,null,2)};`}},transformIndexHtml:{order:"pre",handler(l){return dt(l,o)}},async closeBundle(){if(!n)return;let l=i?.build?.outDir?V.resolve(i.root,i.build.outDir):V.resolve(process.cwd(),"dist"),m=V.basename(t||"docs");await ft({docsDir:t,docsDirName:m,outDir:l,config:o});let{flushCache:f}=await import("./cache-3FOEPC2P.mjs");await f(),await p?.runHook("afterBuild"),await p?.runHook("buildEnd")}},el({includePublic:!0,png:{quality:80},jpeg:{quality:80},jpg:{quality:80},webp:{quality:80},avif:{quality:80},svg:{multipass:!0,plugins:[{name:"preset-default"}]}}),{name:"vite-plugin-boltdocs-extra-plugins",async configResolved(){}},...u]}var hs=I(()=>{"use strict";a();at();we();mt();J();dr();hr();pt();yr();gt();ht();ze();ms()});var Es,ne,ys=I(()=>{"use strict";a();Jt();Es="v4",ne=new Kt("mdx")});import{createHighlighter as tl}from"shiki";async function Ye(r){if(We)return We;let e=typeof r=="object"?[r.light,r.dark]:[r??"github-dark"];return["github-light","github-dark"].forEach(t=>{e.includes(t)||e.push(t)}),We=await tl({themes:e,langs:["tsx","jsx","ts","js","json","md","mdx","css","html","bash","sh","yaml","yml"]}),We}var We,Mt=I(()=>{"use strict";a();We=null});import{visit as rl}from"unist-util-visit";function Ps(r){return async e=>{let t=r?.theme?.codeTheme??{light:"github-light",dark:"github-dark"},s=await Ye(t);rl(e,["mdxJsxFlowElement","mdxJsxTextElement"],o=>{if(o.name!=="ComponentPreview")return;let i=o.attributes?.find(l=>l.name==="code"),n="";if(i){if(typeof i.value=="string")n=i.value;else if(i.value?.type==="mdxJsxAttributeValueExpression"){let l=i.value.value??"";n=l.match(/^[`'"]([\s\S]+)[`'"]$/)?.[1]??l}}if(!n)return;let p=typeof t=="object"?{themes:{light:t.light,dark:t.dark},lang:"tsx"}:{theme:t,lang:"tsx"},u=s.codeToHtml(n,p);o.attributes=(o.attributes??[]).filter(l=>l.name!=="highlightedHtml"),o.attributes.push({type:"mdxJsxAttribute",name:"highlightedHtml",value:u})})}}var $s=I(()=>{"use strict";a();Mt()});import{visit as ol}from"unist-util-visit";function xs(r){return async e=>{let t=r?.theme?.codeTheme||{light:"github-light",dark:"github-dark"},s=await Ye(t);ol(e,"element",o=>{if(o.tagName==="pre"&&o.children?.[0]?.tagName==="code"){let i=o.children[0],p=(i.properties?.className||[]).find(x=>x.startsWith("language-")),u=p?p.slice(9):"text",l=i.children[0]?.value||"",f=(i.data?.meta||i.properties?.metastring||"").match(/title\s*=\s*"([^"]*)"/),P=f?f[1]:void 0,d={lang:u};typeof t=="object"?d.themes={light:t.light,dark:t.dark}:d.theme=t;let L=s.codeToHtml(l,d);o.properties["data-highlighted"]="true",o.properties["data-highlighted-html"]=L,o.properties["data-lang"]=u,P&&(o.properties.title=P),o.children=[]}})}}var vs=I(()=>{"use strict";a();Mt()});import{visit as sl}from"unist-util-visit";function Rs(){return r=>{sl(r,"code",e=>{if(e.data=e.data||{},e.data.hProperties=e.data.hProperties||{},e.lang&&(e.data.hProperties["data-lang"]=e.lang),!e.meta)return;let t=e.meta,s=t.match(/title\s*=\s*"([^"]*)"/);s&&(e.data.hProperties.title=s[1]),e.data.hProperties.metastring=t})}}var bs=I(()=>{"use strict";a()});import il from"@mdx-js/rollup";import nl from"remark-gfm";import al from"remark-frontmatter";import ll from"rehype-slug";import cl from"crypto";function ws(r,e=il){let t=r?.plugins?.flatMap(i=>W.getSanitizedCapabilities(i).remarkPlugins||[])||[],s=r?.plugins?.flatMap(i=>W.getSanitizedCapabilities(i).rehypePlugins||[])||[],o=e({remarkPlugins:[nl,al,Rs,[Ps,r],...t],rehypePlugins:[ll,[xs,r],...s],jsxRuntime:"automatic"});return{...o,name:"vite-plugin-boltdocs-mdx",async buildStart(){Ke=0,$e=0,Ss||(ne.load(),Ss=!0),o.buildStart&&await o.buildStart.call(this)},async transform(i,n,p){if(!n.endsWith(".md")&&!n.endsWith(".mdx"))return o.transform?.call(this,i,n,p);console.log(`[boltdocs] Transforming MDX: ${n}`),$e++;let u=cl.createHash("md5").update(i).digest("hex"),l=`${n}:${u}:${Es}`,m=ne.get(l);if(m)return Ke++,{code:m,map:null};let f=await o.transform.call(this,i,n,p);return f&&typeof f=="object"&&f.code&&ne.set(l,f.code),f},async buildEnd(){$e>0&&console.log(`[boltdocs] MDX Cache Performance: ${Ke}/${$e} hits (${Math.round(Ke/$e*100)||0}%)`),ne.save(),await ne.flush(),o.buildEnd&&await o.buildEnd.call(this)}}}var Ss,Ke,$e,Cs=I(()=>{"use strict";a();ys();$s();vs();bs();ze();Ss=!1,Ke=0,$e=0});import ul from"@vitejs/plugin-react";import pl from"@tailwindcss/vite";async function Is(r){let e=r?.docsDir||"docs",t=await Z(e),s={...r,homePage:r?.homePage||t.homePage};return[...gs(s,t),ws(t)]}async function Nf(r,e="development"){let t=await Z("docs",r),o=e==="production"?{...Le}:{};return t.security?.enableCSP&&(o["Content-Security-Policy"]=Te(t)),{root:r,mode:e,plugins:[ul(),pl(),await Is({docsDir:t.docsDir,homePage:t.homePage})],server:{headers:{...o,...t.vite?.server?.headers},...t.vite?.server},preview:{headers:{...o,...t.vite?.preview?.headers},...t.vite?.preview},...t.vite}}var fl=I(()=>{a();hs();Cs();gt();ht();we();mt();we();ze()});export{Js as a,Z as b,we as c,ft as d,gr as e,hr as f,re as g,oe as h,Oe as i,pe as j,Ne as k,Ae as l,Za as m,ps as n,ie as o,W as p,Xe as q,xp as r,Is as s,Nf as t,fl as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var je=Object.defineProperty;var tr=(e,t)=>{for(var o in t)je(e,o,{get:t[o],enumerable:!0})};import{createContext as Je,use as Ke}from"react";var $e=Je(null);function Y(){let e=Ke($e);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}import{useLocation as tt}from"react-router-dom";import{createContext as Xe,use as _e,useCallback as Ye,useRef as Ze}from"react";import{jsx as qe}from"react/jsx-runtime";var be=Xe({preload:()=>{},routes:[]});function Z(){return _e(be)}function ar({routes:e,modules:t,children:o}){let r=Ze(null),s=Ye(a=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let u=a.split("#")[0].split("?")[0],i=e.find(l=>l.path===u||u==="/"&&l.path==="");if(i?.filePath){let l=Object.keys(t).find(g=>g.endsWith("/"+i.filePath));l&&t[l]().catch(g=>{console.error(`[boltdocs] Failed to preload route ${a}:`,g)})}},100)},[e,t]);return qe(be.Provider,{value:{preload:s,routes:e},children:o})}import{create as Qe}from"zustand";import{persist as Ue,createJSONStorage as et}from"zustand/middleware";var q=Qe()(Ue(e=>({currentLocale:void 0,currentVersion:void 0,hasHydrated:!1,setLocale:t=>e({currentLocale:t}),setVersion:t=>e({currentVersion:t}),setHasHydrated:t=>e({hasHydrated:t})}),{name:"boltdocs-storage",storage:et(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function Q(){let{routes:e}=Z(),t=Y(),o=tt(),r=q(m=>m.currentLocale),s=q(m=>m.currentVersion),a=q(m=>m.hasHydrated),u=e.find(m=>m.path===o.pathname),i=t.i18n?u?.locale||(a?r:void 0)||t.i18n.defaultLocale:void 0,l=t.versions?u?.version||(a?s:void 0)||t.versions.defaultVersion:void 0,g=e.filter(m=>{let F=t.i18n?(m.locale||t.i18n.defaultLocale)===i:!0,ne=t.versions?(m.version||t.versions.defaultVersion)===l:!0;if(!(F&&ne))return!1;let se=t.i18n;if(se){let Fe=!!u?.locale,Ge=!!m.locale;if(e.some(_=>_!==m&&_.filePath===m.filePath&&_.version===m.version&&(_.locale||se.defaultLocale)===(m.locale||se.defaultLocale))&&Fe!==Ge)return!1}return!0}),p=t.i18n?.localeConfigs?.[i]?.label||t.i18n?.locales[i]||i,v=t.versions?.versions.find(m=>m.path===l)?.label||l,C=t.i18n?Object.entries(t.i18n.locales).map(([m,F])=>{let ne=t.i18n?.localeConfigs?.[m];return{key:m,label:ne?.label||F,isCurrent:m===i}}):[],W=t.versions?t.versions.versions.map(m=>({key:m.path,label:m.label,isCurrent:m.path===l})):[];return{routes:g,allRoutes:e,currentRoute:u,currentLocale:i,currentLocaleLabel:p,availableLocales:C,currentVersion:l,currentVersionLabel:v,availableVersions:W,config:t}}function ae(e){let t=Y(),{currentLocale:o,currentVersion:r}=Q();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let s=t.i18n,a=t.versions;if(!s&&!a)return e;let u=e.startsWith("/docs"),i=e.split("/").filter(Boolean),l=0;i[l]==="docs"&&l++,a&&i.length>l&&a.versions.find(v=>v.path===i[l])&&l++,s&&i.length>l&&s.locales[i[l]]&&l++;let g=i.slice(l),f=[];u&&(f.push("docs"),a&&r&&f.push(r)),s&&o&&o!==s.defaultLocale&&f.push(o),f.push(...g);let p=`/${f.join("/")}`;return p.length>1&&p.endsWith("/")?p.slice(0,-1):p||"/"}import{clsx as ot}from"clsx";import{twMerge as rt}from"tailwind-merge";function n(...e){return rt(ot(e))}import Ce from"react";import{Link as nt}from"react-aria-components";import{useLocation as st}from"react-router-dom";import{jsx as ye}from"react/jsx-runtime";var N=Ce.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:s,onFocus:a,...u}=e,i=ae(o??""),{preload:l}=Z();return ye(nt,{...u,ref:t,href:i,onMouseEnter:p=>{s?.(p),r==="hover"&&typeof i=="string"&&i.startsWith("/")&&l(i)},onFocus:p=>{a?.(p),r==="hover"&&typeof i=="string"&&i.startsWith("/")&&l(i)}})});N.displayName="Link";var at=Ce.forwardRef((e,t)=>{let{href:o,end:r=!1,className:s,children:a,...u}=e,i=st(),l=ae(o??""),g=r?i.pathname===l:i.pathname.startsWith(l),f=typeof s=="function"?s({isActive:g}):n(s,g&&"active"),p=typeof a=="function"?a({isActive:g}):a;return ye(N,{...u,ref:t,href:o,className:f,children:p})});at.displayName="NavLink";import*as U from"react-aria-components";import{cva as it}from"class-variance-authority";import{Fragment as ct,jsx as O,jsxs as pt}from"react/jsx-runtime";var Re=it("flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none",{variants:{variant:{primary:"bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg",secondary:"bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong",outline:"bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500",ghost:"bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main",danger:"bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15",success:"bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15",warning:"bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15",info:"bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15",subtle:"bg-primary-500/10 text-primary-500 hover:bg-primary-500/20",link:"bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline"},size:{sm:"min-h-8 px-3.5 text-[0.8125rem] gap-1.5",md:"min-h-10 px-5 text-[0.9375rem] gap-2",lg:"min-h-12 px-7 text-[1.05rem] gap-2.5"},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},iconSize:{sm:"w-8 h-8 p-0",md:"w-10 h-10 p-0",lg:"w-12 h-12 p-0"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:null}},defaultVariants:{variant:"primary",size:"md",rounded:"md"}}),lt=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:s,className:a,variant:u,size:i,rounded:l,iconSize:g,disabled:f,...p})=>{let L=r||!s&&!!t,v=L?O("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):pt(ct,{children:[t&&o==="left"&&O("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),O("span",{className:"flex items-center",children:s}),t&&o==="right"&&O("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?O(U.Link,{href:e,className:n(Re({variant:u,size:i,rounded:l,iconSize:L?g:void 0,disabled:f}),a),...p,children:v}):O(U.Button,{className:n(Re({variant:u,size:i,rounded:l,iconSize:L?g:void 0,disabled:f}),a),...p,children:v})};import*as z from"react-aria-components";import{Fragment as mt,jsx as G,jsxs as le}from"react/jsx-runtime";var Pe=({className:e,children:t,...o})=>G(z.Tooltip,{...o,offset:8,className:r=>n("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>le(mt,{children:[G(z.OverlayArrow,{children:le("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90",children:[G("title",{children:"Arrow"}),G("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),ie=({content:e,children:t,delay:o=500,closeDelay:r=0,...s})=>le(z.TooltipTrigger,{delay:o,closeDelay:r,children:[t,G(Pe,{...s,children:e})]});ie.Root=ie;ie.Content=Pe;import{useState as So,useEffect as Io}from"react";import*as T from"react-aria-components";import{ChevronDown as dt}from"lucide-react";import{Fragment as xt,jsx as B,jsxs as ce}from"react/jsx-runtime";var j=({children:e,className:t,...o})=>B("nav",{className:n("relative flex items-center",t),...o,children:e}),ut=({children:e,className:t})=>B("div",{className:n("flex list-none items-center gap-1",t),children:e}),ft=({children:e,label:t,className:o})=>ce(T.MenuTrigger,{children:[ce(T.Button,{className:n("flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium outline-none transition-colors cursor-pointer","text-text-muted hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:[t,B(dt,{size:14,className:"transition-transform"})]}),B(T.Popover,{placement:"bottom start",className:"entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards",children:B(T.Menu,{className:"w-56 outline-none rounded-xl border border-border-subtle bg-bg-surface p-2 shadow-xl ring-1 ring-border-strong/5",children:e})})]}),gt=({label:e,href:t,description:o,className:r,children:s,...a})=>B(T.MenuItem,{href:t,className:n("block rounded-lg px-3 py-2 text-sm outline-none cursor-pointer transition-colors","hover:bg-bg-muted focus:bg-bg-muted",r),...a,children:s||ce(xt,{children:[B("div",{className:"font-semibold text-text-main",children:e}),o&&B("div",{className:"text-xs text-text-muted line-clamp-1 mt-0.5",children:o})]})});j.Root=j;j.List=ut;j.Item=ft;j.Link=gt;import*as b from"react-aria-components";import{Search as vt,Hash as bt,FileText as Ct,CornerDownLeft as yt}from"lucide-react";import{Fragment as Bt,jsx as x,jsxs as pe}from"react/jsx-runtime";var V=({children:e,isOpen:t,onOpenChange:o,className:r})=>x(b.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:n("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:x(b.Modal,{className:n("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",r),children:x(b.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Rt=({children:e,className:t,onSelectionChange:o,...r})=>x("div",{className:t,children:x(b.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),Pt=({className:e,...t})=>pe(b.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[x(vt,{className:"h-5 w-5 text-text-muted"}),x(b.Input,{...t,className:n("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),x("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:x("kbd",{className:"font-sans",children:"ESC"})})]}),wt=({children:e,className:t,...o})=>x(b.ListBox,{...o,className:n("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Nt=({children:e,className:t,...o})=>x(b.ListBoxItem,{...o,className:n("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:r=>pe(Bt,{children:[e,(r.isFocused||r.isSelected)&&pe("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[x("span",{className:"text-[10px]",children:"Select"}),x(yt,{size:10})]})]})}),Tt=({isHeading:e,className:t})=>x("div",{className:n("shrink-0",t),children:e?x(bt,{size:18}):x(Ct,{size:18})}),At=({children:e,className:t})=>x("span",{className:n("block font-medium truncate flex-1 text-sm",t),children:e}),kt=({children:e,className:t})=>x("span",{className:n("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e});V.Root=V;V.Autocomplete=Rt;V.Input=Pt;V.List=wt;V.Item=Object.assign(Nt,{Icon:Tt,Title:At,Bio:kt});import{createContext as Ne,use as de,useEffect as ue,useImperativeHandle as Mt,useMemo as fe,useRef as Te,useState as Ae}from"react";import Ot from"scroll-into-view-if-needed";import{useEffect as St,useRef as It}from"react";function we(e,t){let o=It(e);St(()=>{o.current!==e&&(t(e),o.current=e)},[e,t])}function me(e){return e.startsWith("#")?e.slice(1):null}var ee=class{items=[];single=!1;observer=null;onChange;callback(t){if(t.length===0)return;for(let r of t){let s=this.items.find(a=>a.id===r.target.id);if(s){s.active=r.isIntersecting;let a=100;s.fallback=!r.isIntersecting&&r.boundingClientRect.top<a}}let o=-1;for(let r=this.items.length-1;r>=0;r--)if(this.items[r].fallback){o=r;break}o===-1&&this.items.length>0&&(o=0),this.items=this.items.map((r,s)=>({...r,active:s===o,t:s===o?Date.now():r.t})),this.onChange?.()}setItems(t){let o=this.observer;if(o)for(let r of this.items){let s=document.getElementById(r.id);s&&o.unobserve(s)}this.items=[];for(let r of t){let s=me(r.url);s&&this.items.push({id:s,active:!1,fallback:!1,t:0,original:r})}this.watchItems(),typeof window<"u"&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(t){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),t),this.watchItems())}watchItems(){if(this.observer)for(let t of this.items){let o=document.getElementById(t.id);o&&this.observer.observe(o)}}unwatch(){this.observer?.disconnect(),this.observer=null}};import{jsx as k}from"react/jsx-runtime";var ge=Ne(null),ke=Ne(null);function Le(){let e=de(ge);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function Ur(){let e=Le();return fe(()=>{let t;for(let o of e)o.active&&(!t||o.t>t.t)&&(t=o);return t?.id},[e])}function en(){let e=Le();return fe(()=>{let t=[];for(let o of e)o.active&&t.push(o.id);return t},[e])}function tn({containerRef:e,children:t}){return k(ke.Provider,{value:e,children:t})}function on({toc:e,single:t=!1,children:o}){let r=fe(()=>new ee,[]),[s,a]=Ae(r.items);return r.single=t,ue(()=>{r.setItems(e)},[r,e]),ue(()=>(r.watch({rootMargin:"-100px 0% 0% 0%",threshold:0}),r.onChange=()=>a([...r.items]),()=>{r.unwatch()}),[r]),k(ge.Provider,{value:s,children:o})}var S=({children:e,className:t})=>k("nav",{className:n("sticky top-navbar hidden xl:flex flex-col shrink-0","w-toc","py-8 pl-6 pr-4",t),children:e}),zt=({children:e,className:t,...o})=>k("div",{className:n("mb-4 text-xs font-bold uppercase tracking-wider text-text-main",t),...o,children:e}),Be=({children:e,className:t,ref:o,...r})=>{let s=Te(null);return Mt(o,()=>s.current),k("div",{ref:s,className:n("relative overflow-y-auto boltdocs-otp-content",t),...r,children:e})};Be.displayName="OnThisPageContent";var Vt=({children:e,className:t})=>k("ul",{className:n("relative space-y-1 text-sm border-l border-border-subtle",t),children:e}),Et=({level:e,children:t,className:o})=>k("li",{className:n(e===3&&"pl-3",o),children:t}),Dt=({children:e,href:t,active:o,onClick:r,className:s})=>{let a=de(ge),u=de(ke),i=t?me(t):null,l=Te(null),[g,f]=Ae(o);return we(i&&a?a.find(p=>p.id===i)?.active:null,p=>{p!==null&&p!==g&&(f(!!p),p&&l.current&&u?.current&&Ot(l.current,{behavior:"smooth",block:"center",inline:"center",scrollMode:"if-needed",boundary:u.current}))}),ue(()=>{o!==void 0&&f(o)},[o]),k("a",{ref:l,href:t,onClick:r,"data-active":g,className:n("block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main",g?"text-primary-500 font-medium":"text-text-muted",s),children:e})},Ht=({style:e,className:t})=>k("div",{className:n("absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300",t),style:e});S.Root=S;S.Header=zt;S.Content=Be;S.List=Vt;S.Item=Et;S.Link=Dt;S.Indicator=Ht;import*as Se from"react-aria-components";import{ChevronLeft as Ft,ChevronRight as Gt}from"lucide-react";import{Fragment as Yt,jsx as M,jsxs as _t}from"react/jsx-runtime";var E=({children:e,className:t})=>M("nav",{className:n("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),jt=({children:e,to:t,direction:o,className:r})=>{let s=o==="next";return _t(Se.Link,{href:t,className:n("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",s?"text-right justify-end":"text-left justify-start",r),children:[!s&&M(Ft,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),M("div",{className:"flex flex-col gap-1 flex-1",children:e}),s&&M(Gt,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},Jt=({children:e,className:t})=>M("span",{className:n("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Kt=({children:e,className:t})=>M("span",{className:n("text-base font-bold text-text-main truncate",t),children:e}),$t=({children:e})=>M(Yt,{children:e});E.Root=E;E.Link=jt;E.Title=Jt;E.Description=Kt;E.Icon=$t;import{jsx as J}from"react/jsx-runtime";var D=({children:e,className:t="",...o})=>J("div",{className:n("w-full",t),...o,children:e}),Zt=({children:e,className:t=""})=>J("div",{role:"tablist",className:n("relative flex flex-row items-center border-b border-border-subtle",t),children:e}),qt=({children:e,id:t,selected:o,className:r="",...s})=>J("button",{role:"tab","aria-selected":o,className:n("flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors outline-none cursor-pointer bg-transparent border-none",o?"text-primary-500":"text-text-muted hover:text-text-main",r),...s,children:e}),Qt=({children:e,className:t=""})=>J("div",{className:n("p-4 outline-none",t),children:e}),Ut=({className:e="",style:t})=>J("div",{className:n("absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300",e),style:t});D.Root=D;D.List=Zt;D.Item=qt;D.Content=Qt;D.Indicator=Ut;import*as Ie from"react-aria-components";import{ChevronRight as to}from"lucide-react";import{jsx as A,jsxs as te}from"react/jsx-runtime";var oo=({badge:e})=>{let t={new:"bg-primary-500/20 text-primary-500",updated:"bg-gray-500/20 text-gray-500",deprecated:"bg-red-500/20 text-red-500"};if(typeof e=="object"&&e?.expires){let r=new Date(e.expires),s=new Date,a=r.getTime()-s.getTime();if(Math.ceil(a/(1e3*60*60*24))===0)return null}let o=typeof e=="string"?e:e?.text;return A("span",{className:n("ml-auto flex h-4.5 items-center rounded-full text-[9px] font-medium px-1.5 py-0.5 text-center whitespace-nowrap",t[o]||t.new),children:o})},K=({children:e,className:t})=>A("aside",{className:n("boltdocs-sidebar sticky top-navbar hidden lg:flex flex-col shrink-0","w-sidebar h-full","overflow-y-auto border-r border-border-subtle bg-bg-main","py-6 px-4",t),children:A("nav",{className:"flex-1 space-y-6",children:e})}),ro=({children:e,title:t,icon:o,isOpen:r=!0,onToggle:s,className:a})=>te("div",{className:n("space-y-1",a),children:[t&&te(Ie.Button,{onPress:s,className:n("flex w-full items-center justify-between px-2 py-1.5 text-xs font-bold uppercase tracking-wider outline-none cursor-pointer","text-text-muted hover:text-text-main transition-colors","focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md"),children:[te("div",{className:"flex items-center gap-2",children:[o&&A(o,{size:14}),t]}),A(to,{size:14,className:n("transition-transform duration-200",r&&"rotate-90")})]}),r&&A("div",{className:"space-y-0.5",children:e})]}),no=({children:e,className:t})=>A("div",{className:n(t),children:e}),so=({label:e,href:t,active:o,icon:r,badge:s,className:a})=>te(N,{href:t,className:n("group flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none","transition-all duration-200 ease-in-out","focus-visible:ring-2 focus-visible:ring-primary-500/30",o?"bg-primary-500/10 text-primary-500 font-medium":"text-text-muted hover:bg-bg-surface hover:text-text-main hover:translate-x-1",a),children:[r&&A(r,{size:16,className:n(o?"text-primary-500":"text-text-muted group-hover:text-text-main")}),A("span",{className:"truncate",children:e}),s&&A(oo,{badge:s})]});K.Root=K;K.Group=ro;K.GroupItem=no;K.Link=so;import{Breadcrumb as io,Breadcrumbs as lo,Link as co}from"react-aria-components";import{ChevronRight as po}from"lucide-react";import{jsx as oe}from"react/jsx-runtime";var $=({children:e,className:t,...o})=>oe(lo,{className:n("flex items-center gap-1.5 pl-0! mb-0 text-sm text-text-muted",t),...o,children:e}),mo=({children:e,className:t,...o})=>oe(io,{className:n("flex items-center mb-0 gap-1.5",t),...o,children:e}),uo=({children:e,href:t,className:o,...r})=>oe(co,{href:t,className:n("transition-colors outline-none hover:text-text-main focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm","current:font-medium current:text-text-main current:pointer-events-none cursor-pointer",o),...r,children:e}),fo=({className:e})=>oe(po,{size:14,className:n("shrink-0 text-text-dim",e)});$.Root=$;$.Item=mo;$.Link=uo;$.Separator=fo;import{jsx as xo}from"react/jsx-runtime";var ho=({children:e,className:t,vertical:o=!1})=>xo("div",{className:n("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});import{Check as bo,ChevronRight as Co,Dot as yo}from"lucide-react";import Me from"react";import*as h from"react-aria-components";import*as H from"react-aria-components";import{jsx as he,jsxs as vo}from"react/jsx-runtime";var xe=({children:e,className:t,showArrow:o,...r})=>vo(H.Popover,{offset:8,...r,className:H.composeRenderProps(t,s=>n("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none",s)),children:[o&&he(H.OverlayArrow,{className:"group",children:he("svg",{viewBox:"0 0 12 12",className:"block h-3 w-3 fill-bg-surface/80 stroke-border-subtle group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90","aria-hidden":"true",children:he("path",{d:"M0 0 L6 6 L12 0"})})}),e]});import{Fragment as Ao,jsx as w,jsxs as X}from"react/jsx-runtime";function Ro(e){let[t,o]=Me.Children.toArray(e.children).slice(0,2);return X(h.MenuTrigger,{...e,children:[t,w(xe,{placement:e.placement,className:"min-w-35",children:o})]})}function Po(e){let[t,o]=Me.Children.toArray(e.children).slice(0,2);return X(h.SubmenuTrigger,{...e,children:[t,w(xe,{offset:-4,crossOffset:-4,children:o})]})}function I(e){return w(h.Menu,{...e,className:h.composeRenderProps(e.className,t=>n("p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75",t))})}function wo(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return w(h.MenuItem,{...e,textValue:t,className:h.composeRenderProps(e.className,(o,{isFocused:r,isPressed:s,isDisabled:a})=>n("group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none","text-text-main text-[12px]",{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":r,"bg-bg-surface-elevanted":s,"opacity-40 grayscale pointer-events-none":a},o)),children:h.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:s,hasSubmenu:a})=>X(Ao,{children:[r!=="none"&&X("span",{className:"flex items-center size-4 shrink-0 justify-center",children:[s&&r==="multiple"&&w(bo,{className:"size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),s&&r==="single"&&w(yo,{className:"size-5 text-primary-500 animate-in zoom-in-50 duration-200"})]}),w("div",{className:"flex flex-row w-full transition-colors items-center gap-2 py-1 px-1",children:o}),a&&w(Co,{className:"size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function No({title:e,...t}){return X(h.MenuSection,{...t,className:n("flex flex-col gap-0.5",t.className),children:[e&&w(h.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),w(h.Collection,{items:t.items,children:t.children})]})}function To(e){return w(h.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}I.Root=I;I.Item=wo;I.Trigger=Ro;I.SubTrigger=Po;I.Section=No;I.Separator=To;import{jsx as ko}from"react/jsx-runtime";function Sn({className:e,variant:t="rect",...o}){return ko("div",{className:n("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}import{Separator as Oe}from"react-aria-components";import{ToggleButton as ze}from"react-aria-components";import{Button as Mo}from"react-aria-components";import{Search as Oo,Sun as zo,Moon as Vo,ExternalLink as Eo}from"lucide-react";import{jsx as c,jsxs as P}from"react/jsx-runtime";function R(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var Ve=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...R(e),children:[c("title",{children:"GitHub"}),c("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),Ee=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...R(e),children:[c("title",{children:"Discord"}),c("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z"})]}),De=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...R(e),children:[c("title",{children:"X"}),c("path",{d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"})]}),Gn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...R(e),children:[c("title",{children:"CodeSandbox"}),c("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]}),He=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...R(e),children:[c("title",{children:"Bluesky"}),c("path",{d:"M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"})]}),jn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[c("title",{children:"TypeScript"}),c("path",{fill:"#2563EB",d:"M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z"})]}),Jn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[c("title",{children:"JavaScript"}),c("path",{fill:"#F59E0B",d:"M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z"})]}),Kn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[c("title",{children:"JSON"}),c("path",{fill:"#F59E0B",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),$n=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[c("title",{children:"CSS"}),c("path",{fill:"#0EA5E9",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),Xn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[c("title",{children:"HTML"}),c("path",{fill:"#EA580C",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]});var _n=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[c("title",{children:"React"}),c("path",{fill:"#0E8ADC",d:"M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z"}),c("path",{stroke:"#0E8ADC",d:"M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z"}),c("path",{stroke:"#0E8ADC",d:"M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z"}),c("path",{stroke:"#0E8ADC",d:"M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z"})]}),Yn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[c("title",{children:"Markdown"}),c("path",{fill:"#60A5FA",d:"M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z"})]}),Zn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",...R(e),children:[c("title",{children:"Shell"}),c("path",{stroke:"#14B8A6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.336 17l6-6-6-6M12.336 19h8"})]}),qn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[c("title",{children:"YAML"}),c("path",{fill:"#A78BFA",d:"M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z"})]});import{jsx as d,jsxs as re}from"react/jsx-runtime";var y=({children:e,className:t,...o})=>d("header",{className:n("boltdocs-navbar sticky top-0 z-50 w-full border-b border-border-subtle bg-bg-main/80 backdrop-blur-md",t),...o,children:e}),Do=({children:e,className:t})=>d("div",{className:n("mx-auto flex lg:h-navbar max-w-(--breakpoint-3xl) items-center justify-between px-4 md:px-6",t),children:e}),Ho=({children:e,className:t})=>d("div",{className:n("flex flex-1 items-center justify-start gap-4 min-w-0",t),children:e}),Wo=({children:e,className:t})=>d("div",{className:n("flex flex-1 items-center justify-end gap-2 md:gap-4 min-w-0",t),children:e}),Fo=({children:e,className:t})=>d("div",{className:n("hidden lg:flex flex-1 justify-center items-center gap-4 px-4 min-w-0 w-full",t),children:e}),Go=({src:e,alt:t,width:o=24,height:r=24,className:s})=>d(N,{href:"/",className:n("flex items-center gap-2 shrink-0 outline-none",s),children:e?d("img",{src:e,alt:t,width:o,height:r,className:"h-6 w-6 object-contain"}):null}),jo=({children:e,className:t})=>d(N,{href:"/",children:d("span",{className:n("text-lg font-bold tracking-tight hidden sm:inline-block",t),children:e})}),Jo=({children:e,className:t})=>d("nav",{className:n("hidden md:flex items-center gap-6 text-sm font-medium",t),children:e}),Ko=({label:e,href:t,active:o,to:r,className:s})=>re(N,{href:t,target:r==="external"?"_blank":void 0,className:n("transition-colors outline-none font-medium focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm",{"text-primary-500":o,"text-text-muted hover:text-text-main":!o},s),children:[e,r==="external"&&d("span",{className:"ml-1 inline-block",children:d(Eo,{size:12})})]}),$o=({className:e,onPress:t})=>{let[o,r]=So(!1),s=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return Io(()=>{r(!0)},[]),re(Mo,{onPress:t,className:n("flex items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-muted outline-none cursor-pointer","transition-all duration-200 hover:border-border-strong hover:text-text-main hover:bg-bg-muted hover:shadow-sm active:scale-[0.98]","focus-visible:ring-2 focus-visible:ring-primary-500/30","w-full max-w-[720px] justify-between",e),children:[re("div",{className:"flex items-center gap-2",children:[d(Oo,{size:16}),d("span",{className:"hidden sm:inline-block",children:"Search docs..."})]}),re("div",{className:"hidden sm:flex items-center gap-1 pointer-events-none select-none",children:[d("kbd",{className:"flex h-5 items-center justify-center rounded border border-border-subtle bg-bg-main px-1.5 font-mono text-[10px] font-medium",children:s?"\u2318":"Ctrl"}),d("kbd",{className:"flex h-5 w-5 items-center justify-center rounded border border-border-subtle bg-bg-main font-mono text-[10px] font-medium",children:"K"})]})]})},Xo=({className:e,theme:t,onThemeChange:o})=>d(ze,{isSelected:t==="dark",onChange:o,className:n("rounded-md p-2 text-text-muted outline-none cursor-pointer","transition-all duration-300 hover:bg-bg-surface hover:text-text-main hover:rotate-12 active:scale-90","focus-visible:ring-2 focus-visible:ring-primary-500/30",e),"aria-label":"Toggle theme",children:t==="dark"?d(zo,{size:20}):d(Vo,{size:20})}),_o=({name:e})=>{if(e==="github")return d(Ve,{});if(e==="discord")return d(Ee,{});if(e==="x")return d(De,{});if(e==="bluesky")return d(He,{})},Yo=({icon:e,link:t,className:o})=>d(N,{href:t,target:"_blank",rel:"noopener noreferrer",className:n("rounded-md p-2 text-text-muted outline-none transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:d(_o,{name:e})}),Zo=({className:e})=>d(Oe,{orientation:"vertical",className:n("h-6 w-px bg-border-subtle mx-1",e)});y.Root=y;y.Left=Ho;y.Right=Wo;y.Center=Fo;y.Logo=Go;y.Title=jo;y.Links=Jo;y.Link=Ko;y.SearchTrigger=$o;y.Theme=Xo;y.Socials=Yo;y.Split=Zo;y.Content=Do;var rs=y;import{useState as ve,useMemo as qo,useEffect as Qo}from"react";import{Index as Uo}from"flexsearch";import We from"virtual:boltdocs-search";function cs(e){let{currentLocale:t,currentVersion:o}=Q(),[r,s]=ve(!1),[a,u]=ve(""),[i,l]=ve(null);Qo(()=>{if(!r||i)return;let f=new Uo({preset:"match",tokenize:"full",resolution:9,cache:!0});for(let p of We)f.add(p.id,`${p.title} ${p.content}`);l(f)},[r,i]);let g=qo(()=>{if(!a)return e.filter(v=>{let C=!t||v.locale===t,W=!o||v.version===o;return C&&W}).slice(0,10).map(v=>({id:v.path,title:v.title,path:v.path,bio:v.description||"",groupTitle:v.groupTitle}));if(!i)return[];let f=i.search(a,{limit:20,suggest:!0}),p=[],L=new Set;for(let v of f){let C=We.find(F=>F.id===v);if(!C)continue;let W=!t||C.locale===t,m=!o||C.version===o;!W||!m||L.has(C.url)||(L.add(C.url),p.push({id:C.url,title:C.title,path:C.url,bio:C.display,groupTitle:C.display.split(" > ")[0],isHeading:C.url.includes("#")}))}return p.slice(0,10)},[a,i,t,o,e]);return{isOpen:r,setIsOpen:s,query:a,setQuery:u,list:g,input:{value:a,onChange:f=>u(f.target.value)}}}export{tr as a,$e as b,Y as c,ar as d,q as e,Q as f,ae as g,n as h,N as i,at as j,Re as k,lt as l,Ve as m,Gn as n,jn as o,Jn as p,Kn as q,$n as r,Xn as s,_n as t,Yn as u,Zn as v,qn as w,ie as x,y,rs as z,j as A,V as B,Le as C,Ur as D,en as E,tn as F,on as G,S as H,E as I,D as J,K,$ as L,ho as M,xe as N,I as O,Sn as P,cs as Q};
|
|
1
|
+
var je=Object.defineProperty;var tr=(e,t)=>{for(var o in t)je(e,o,{get:t[o],enumerable:!0})};import{createContext as Je,use as Ke}from"react";var $e=Je(null);function Y(){let e=Ke($e);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}import{useLocation as tt}from"react-router-dom";import{createContext as Xe,use as _e,useCallback as Ye,useRef as Ze}from"react";import{jsx as qe}from"react/jsx-runtime";var be=Xe({preload:()=>{},routes:[]});function Z(){return _e(be)}function ar({routes:e,modules:t,children:o}){let r=Ze(null),s=Ye(a=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let u=a.split("#")[0].split("?")[0],i=e.find(l=>l.path===u||u==="/"&&l.path==="");if(i?.filePath){let l=Object.keys(t).find(g=>g.endsWith("/"+i.filePath));l&&t[l]().catch(g=>{console.error(`[boltdocs] Failed to preload route ${a}:`,g)})}},100)},[e,t]);return qe(be.Provider,{value:{preload:s,routes:e},children:o})}import{create as Qe}from"zustand";import{persist as Ue,createJSONStorage as et}from"zustand/middleware";var q=Qe()(Ue(e=>({currentLocale:void 0,currentVersion:void 0,hasHydrated:!1,setLocale:t=>e({currentLocale:t}),setVersion:t=>e({currentVersion:t}),setHasHydrated:t=>e({hasHydrated:t})}),{name:"boltdocs-storage",storage:et(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function Q(){let{routes:e}=Z(),t=Y(),o=tt(),r=q(m=>m.currentLocale),s=q(m=>m.currentVersion),a=q(m=>m.hasHydrated),u=e.find(m=>m.path===o.pathname),i=t.i18n?u?.locale||(a?r:void 0)||t.i18n.defaultLocale:void 0,l=t.versions?u?.version||(a?s:void 0)||t.versions.defaultVersion:void 0,g=e.filter(m=>{let F=t.i18n?(m.locale||t.i18n.defaultLocale)===i:!0,ne=t.versions?(m.version||t.versions.defaultVersion)===l:!0;if(!(F&&ne))return!1;let se=t.i18n;if(se){let Fe=!!u?.locale,Ge=!!m.locale;if(e.some(_=>_!==m&&_.filePath===m.filePath&&_.version===m.version&&(_.locale||se.defaultLocale)===(m.locale||se.defaultLocale))&&Fe!==Ge)return!1}return!0}),c=t.i18n?.localeConfigs?.[i]?.label||t.i18n?.locales[i]||i,v=t.versions?.versions.find(m=>m.path===l)?.label||l,C=t.i18n?Object.entries(t.i18n.locales).map(([m,F])=>{let ne=t.i18n?.localeConfigs?.[m];return{key:m,label:ne?.label||F,isCurrent:m===i}}):[],W=t.versions?t.versions.versions.map(m=>({key:m.path,label:m.label,isCurrent:m.path===l})):[];return{routes:g,allRoutes:e,currentRoute:u,currentLocale:i,currentLocaleLabel:c,availableLocales:C,currentVersion:l,currentVersionLabel:v,availableVersions:W,config:t}}function ae(e){let t=Y(),{currentLocale:o,currentVersion:r}=Q();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let s=t.i18n,a=t.versions;if(!s&&!a)return e;let u=e.startsWith("/docs"),i=e.split("/").filter(Boolean),l=0;i[l]==="docs"&&l++,a&&i.length>l&&a.versions.find(v=>v.path===i[l])&&l++,s&&i.length>l&&s.locales[i[l]]&&l++;let g=i.slice(l),f=[];u&&(f.push("docs"),a&&r&&f.push(r)),s&&o&&o!==s.defaultLocale&&f.push(o),f.push(...g);let c=`/${f.join("/")}`;return c.length>1&&c.endsWith("/")?c.slice(0,-1):c||"/"}import{clsx as ot}from"clsx";import{twMerge as rt}from"tailwind-merge";function n(...e){return rt(ot(e))}import Ce from"react";import{Link as nt}from"react-aria-components";import{useLocation as st}from"react-router-dom";import{jsx as ye}from"react/jsx-runtime";var N=Ce.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:s,onFocus:a,...u}=e,i=ae(o??""),{preload:l}=Z();return ye(nt,{...u,ref:t,href:i,onMouseEnter:c=>{s?.(c),r==="hover"&&typeof i=="string"&&i.startsWith("/")&&l(i)},onFocus:c=>{a?.(c),r==="hover"&&typeof i=="string"&&i.startsWith("/")&&l(i)}})});N.displayName="Link";var at=Ce.forwardRef((e,t)=>{let{href:o,end:r=!1,className:s,children:a,...u}=e,i=st(),l=ae(o??""),g=r?i.pathname===l:i.pathname.startsWith(l),f=typeof s=="function"?s({isActive:g}):n(s,g&&"active"),c=typeof a=="function"?a({isActive:g}):a;return ye(N,{...u,ref:t,href:o,className:f,children:c})});at.displayName="NavLink";import*as U from"react-aria-components";import{cva as it}from"class-variance-authority";import{Fragment as ct,jsx as O,jsxs as pt}from"react/jsx-runtime";var Re=it("flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none",{variants:{variant:{primary:"bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg",secondary:"bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong",outline:"bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500",ghost:"bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main",danger:"bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15",success:"bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15",warning:"bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15",info:"bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15",subtle:"bg-primary-500/10 text-primary-500 hover:bg-primary-500/20",link:"bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline"},size:{sm:"min-h-8 px-3.5 text-[0.8125rem] gap-1.5",md:"min-h-10 px-5 text-[0.9375rem] gap-2",lg:"min-h-12 px-7 text-[1.05rem] gap-2.5"},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},iconSize:{sm:"w-8 h-8 p-0",md:"w-10 h-10 p-0",lg:"w-12 h-12 p-0"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:null}},defaultVariants:{variant:"primary",size:"md",rounded:"md"}}),lt=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:s,className:a,variant:u,size:i,rounded:l,iconSize:g,disabled:f,...c})=>{let L=r||!s&&!!t,v=L?O("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):pt(ct,{children:[t&&o==="left"&&O("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),O("span",{className:"flex items-center",children:s}),t&&o==="right"&&O("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?O(U.Link,{href:e,className:n(Re({variant:u,size:i,rounded:l,iconSize:L?g:void 0,disabled:f}),a),...c,children:v}):O(U.Button,{className:n(Re({variant:u,size:i,rounded:l,iconSize:L?g:void 0,disabled:f}),a),...c,children:v})};import*as z from"react-aria-components";import{Fragment as mt,jsx as G,jsxs as le}from"react/jsx-runtime";var Pe=({className:e,children:t,...o})=>G(z.Tooltip,{...o,offset:8,className:r=>n("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>le(mt,{children:[G(z.OverlayArrow,{children:le("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90",children:[G("title",{children:"Arrow"}),G("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),ie=({content:e,children:t,delay:o=500,closeDelay:r=0,...s})=>le(z.TooltipTrigger,{delay:o,closeDelay:r,children:[t,G(Pe,{...s,children:e})]});ie.Root=ie;ie.Content=Pe;import{useState as So,useEffect as Io}from"react";import*as T from"react-aria-components";import{ChevronDown as dt}from"lucide-react";import{Fragment as xt,jsx as B,jsxs as ce}from"react/jsx-runtime";var j=({children:e,className:t,...o})=>B("nav",{className:n("relative flex items-center",t),...o,children:e}),ut=({children:e,className:t})=>B("div",{className:n("flex list-none items-center gap-1",t),children:e}),ft=({children:e,label:t,className:o})=>ce(T.MenuTrigger,{children:[ce(T.Button,{className:n("flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium outline-none transition-colors cursor-pointer","text-text-muted hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:[t,B(dt,{size:14,className:"transition-transform"})]}),B(T.Popover,{placement:"bottom start",className:"entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards",children:B(T.Menu,{className:"w-56 outline-none rounded-xl border border-border-subtle bg-bg-surface p-2 shadow-xl ring-1 ring-border-strong/5",children:e})})]}),gt=({label:e,href:t,description:o,className:r,children:s,...a})=>B(T.MenuItem,{href:t,className:n("block rounded-lg px-3 py-2 text-sm outline-none cursor-pointer transition-colors","hover:bg-bg-muted focus:bg-bg-muted",r),...a,children:s||ce(xt,{children:[B("div",{className:"font-semibold text-text-main",children:e}),o&&B("div",{className:"text-xs text-text-muted line-clamp-1 mt-0.5",children:o})]})});j.Root=j;j.List=ut;j.Item=ft;j.Link=gt;import*as b from"react-aria-components";import{Search as vt,Hash as bt,FileText as Ct,CornerDownLeft as yt}from"lucide-react";import{Fragment as Bt,jsx as x,jsxs as pe}from"react/jsx-runtime";var V=({children:e,isOpen:t,onOpenChange:o,className:r})=>x(b.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:n("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:x(b.Modal,{className:n("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",r),children:x(b.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Rt=({children:e,className:t,onSelectionChange:o,...r})=>x("div",{className:t,children:x(b.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),Pt=({className:e,...t})=>pe(b.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[x(vt,{className:"h-5 w-5 text-text-muted"}),x(b.Input,{...t,className:n("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),x("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:x("kbd",{className:"font-sans",children:"ESC"})})]}),wt=({children:e,className:t,...o})=>x(b.ListBox,{...o,className:n("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Nt=({children:e,className:t,...o})=>x(b.ListBoxItem,{...o,className:n("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:r=>pe(Bt,{children:[e,(r.isFocused||r.isSelected)&&pe("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[x("span",{className:"text-[10px]",children:"Select"}),x(yt,{size:10})]})]})}),Tt=({isHeading:e,className:t})=>x("div",{className:n("shrink-0",t),children:e?x(bt,{size:18}):x(Ct,{size:18})}),At=({children:e,className:t})=>x("span",{className:n("block font-medium truncate flex-1 text-sm",t),children:e}),kt=({children:e,className:t})=>x("span",{className:n("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e});V.Root=V;V.Autocomplete=Rt;V.Input=Pt;V.List=wt;V.Item=Object.assign(Nt,{Icon:Tt,Title:At,Bio:kt});import{createContext as Ne,use as de,useEffect as ue,useImperativeHandle as Mt,useMemo as fe,useRef as Te,useState as Ae}from"react";import Ot from"scroll-into-view-if-needed";import{useEffect as St,useRef as It}from"react";function we(e,t){let o=It(e);St(()=>{o.current!==e&&(t(e),o.current=e)},[e,t])}function me(e){return e.startsWith("#")?e.slice(1):null}var ee=class{items=[];single=!1;observer=null;onChange;callback(t){if(t.length===0)return;for(let r of t){let s=this.items.find(a=>a.id===r.target.id);if(s){s.active=r.isIntersecting;let a=100;s.fallback=!r.isIntersecting&&r.boundingClientRect.top<a}}let o=-1;for(let r=this.items.length-1;r>=0;r--)if(this.items[r].fallback){o=r;break}o===-1&&this.items.length>0&&(o=0),this.items=this.items.map((r,s)=>({...r,active:s===o,t:s===o?Date.now():r.t})),this.onChange?.()}setItems(t){let o=this.observer;if(o)for(let r of this.items){let s=document.getElementById(r.id);s&&o.unobserve(s)}this.items=[];for(let r of t){let s=me(r.url);s&&this.items.push({id:s,active:!1,fallback:!1,t:0,original:r})}this.watchItems(),typeof window<"u"&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(t){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),t),this.watchItems())}watchItems(){if(this.observer)for(let t of this.items){let o=document.getElementById(t.id);o&&this.observer.observe(o)}}unwatch(){this.observer?.disconnect(),this.observer=null}};import{jsx as k}from"react/jsx-runtime";var ge=Ne(null),ke=Ne(null);function Le(){let e=de(ge);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function Ur(){let e=Le();return fe(()=>{let t;for(let o of e)o.active&&(!t||o.t>t.t)&&(t=o);return t?.id},[e])}function en(){let e=Le();return fe(()=>{let t=[];for(let o of e)o.active&&t.push(o.id);return t},[e])}function tn({containerRef:e,children:t}){return k(ke.Provider,{value:e,children:t})}function on({toc:e,single:t=!1,children:o}){let r=fe(()=>new ee,[]),[s,a]=Ae(r.items);return r.single=t,ue(()=>{r.setItems(e)},[r,e]),ue(()=>(r.watch({rootMargin:"-100px 0% 0% 0%",threshold:0}),r.onChange=()=>a([...r.items]),()=>{r.unwatch()}),[r]),k(ge.Provider,{value:s,children:o})}var S=({children:e,className:t})=>k("nav",{className:n("sticky top-navbar hidden xl:flex flex-col shrink-0","w-toc","py-8 pl-6 pr-4",t),children:e}),zt=({children:e,className:t,...o})=>k("div",{className:n("mb-4 text-xs font-bold uppercase tracking-wider text-text-main",t),...o,children:e}),Be=({children:e,className:t,ref:o,...r})=>{let s=Te(null);return Mt(o,()=>s.current),k("div",{ref:s,className:n("relative overflow-y-auto boltdocs-otp-content",t),...r,children:e})};Be.displayName="OnThisPageContent";var Vt=({children:e,className:t})=>k("ul",{className:n("relative space-y-1 text-sm border-l border-border-subtle",t),children:e}),Et=({level:e,children:t,className:o})=>k("li",{className:n(e===3&&"pl-3",o),children:t}),Dt=({children:e,href:t,active:o,onClick:r,className:s})=>{let a=de(ge),u=de(ke),i=t?me(t):null,l=Te(null),[g,f]=Ae(o);return we(i&&a?a.find(c=>c.id===i)?.active:null,c=>{c!==null&&c!==g&&(f(!!c),c&&l.current&&u?.current&&Ot(l.current,{behavior:"smooth",block:"center",inline:"center",scrollMode:"if-needed",boundary:u.current}))}),ue(()=>{o!==void 0&&f(o)},[o]),k("a",{ref:l,href:t,onClick:r,"data-active":g,className:n("block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main",g?"text-primary-500 font-medium":"text-text-muted",s),children:e})},Ht=({style:e,className:t})=>k("div",{className:n("absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300",t),style:e});S.Root=S;S.Header=zt;S.Content=Be;S.List=Vt;S.Item=Et;S.Link=Dt;S.Indicator=Ht;import*as Se from"react-aria-components";import{ChevronLeft as Ft,ChevronRight as Gt}from"lucide-react";import{Fragment as Yt,jsx as M,jsxs as _t}from"react/jsx-runtime";var E=({children:e,className:t})=>M("nav",{className:n("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),jt=({children:e,to:t,direction:o,className:r})=>{let s=o==="next";return _t(Se.Link,{href:t,className:n("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",s?"text-right justify-end":"text-left justify-start",r),children:[!s&&M(Ft,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),M("div",{className:"flex flex-col gap-1 flex-1",children:e}),s&&M(Gt,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},Jt=({children:e,className:t})=>M("span",{className:n("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Kt=({children:e,className:t})=>M("span",{className:n("text-base font-bold text-text-main truncate",t),children:e}),$t=({children:e})=>M(Yt,{children:e});E.Root=E;E.Link=jt;E.Title=Jt;E.Description=Kt;E.Icon=$t;import{jsx as J}from"react/jsx-runtime";var D=({children:e,className:t="",...o})=>J("div",{className:n("w-full",t),...o,children:e}),Zt=({children:e,className:t=""})=>J("div",{role:"tablist",className:n("relative flex flex-row items-center border-b border-border-subtle",t),children:e}),qt=({children:e,id:t,selected:o,className:r="",...s})=>J("button",{role:"tab","aria-selected":o,className:n("flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors outline-none cursor-pointer bg-transparent border-none",o?"text-primary-500":"text-text-muted hover:text-text-main",r),...s,children:e}),Qt=({children:e,className:t=""})=>J("div",{className:n("p-4 outline-none",t),children:e}),Ut=({className:e="",style:t})=>J("div",{className:n("absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300",e),style:t});D.Root=D;D.List=Zt;D.Item=qt;D.Content=Qt;D.Indicator=Ut;import*as Ie from"react-aria-components";import{ChevronRight as to}from"lucide-react";import{jsx as A,jsxs as te}from"react/jsx-runtime";var oo=({badge:e})=>{let t={new:"bg-primary-500/20 text-primary-500",updated:"bg-gray-500/20 text-gray-500",deprecated:"bg-red-500/20 text-red-500"};if(typeof e=="object"&&e?.expires){let r=new Date(e.expires),s=new Date,a=r.getTime()-s.getTime();if(Math.ceil(a/(1e3*60*60*24))===0)return null}let o=typeof e=="string"?e:e?.text;return A("span",{className:n("ml-auto flex h-4.5 items-center rounded-full text-[9px] font-medium px-1.5 py-0.5 text-center whitespace-nowrap",t[o]||t.new),children:o})},K=({children:e,className:t})=>A("aside",{className:n("boltdocs-sidebar sticky top-navbar hidden lg:flex flex-col shrink-0","w-sidebar h-full","overflow-y-auto border-r border-border-subtle bg-bg-main","py-6 px-4",t),children:A("nav",{className:"flex-1 space-y-6",children:e})}),ro=({children:e,title:t,icon:o,isOpen:r=!0,onToggle:s,className:a})=>te("div",{className:n("space-y-1",a),children:[t&&te(Ie.Button,{onPress:s,className:n("flex w-full items-center justify-between px-2 py-1.5 text-xs font-bold uppercase tracking-wider outline-none cursor-pointer","text-text-muted hover:text-text-main transition-colors","focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md"),children:[te("div",{className:"flex items-center gap-2",children:[o&&A(o,{size:14}),t]}),A(to,{size:14,className:n("transition-transform duration-200",r&&"rotate-90")})]}),r&&A("div",{className:"space-y-0.5",children:e})]}),no=({children:e,className:t})=>A("div",{className:n(t),children:e}),so=({label:e,href:t,active:o,icon:r,badge:s,className:a})=>te(N,{href:t,className:n("group flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none","transition-all duration-200 ease-in-out","focus-visible:ring-2 focus-visible:ring-primary-500/30",o?"bg-primary-500/10 text-primary-500 font-medium":"text-text-muted hover:bg-bg-surface hover:text-text-main hover:translate-x-1",a),children:[r&&A(r,{size:16,className:n(o?"text-primary-500":"text-text-muted group-hover:text-text-main")}),A("span",{className:"truncate",children:e}),s&&A(oo,{badge:s})]});K.Root=K;K.Group=ro;K.GroupItem=no;K.Link=so;import{Breadcrumb as io,Breadcrumbs as lo,Link as co}from"react-aria-components";import{ChevronRight as po}from"lucide-react";import{jsx as oe}from"react/jsx-runtime";var $=({children:e,className:t,...o})=>oe(lo,{className:n("flex items-center gap-1.5 pl-0! mb-0 text-sm text-text-muted",t),...o,children:e}),mo=({children:e,className:t,...o})=>oe(io,{className:n("flex items-center mb-0 gap-1.5",t),...o,children:e}),uo=({children:e,href:t,className:o,...r})=>oe(co,{href:t,className:n("transition-colors outline-none hover:text-text-main focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm","current:font-medium current:text-text-main current:pointer-events-none cursor-pointer",o),...r,children:e}),fo=({className:e})=>oe(po,{size:14,className:n("shrink-0 text-text-dim",e)});$.Root=$;$.Item=mo;$.Link=uo;$.Separator=fo;import{jsx as xo}from"react/jsx-runtime";var ho=({children:e,className:t,vertical:o=!1})=>xo("div",{className:n("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});import{Check as bo,ChevronRight as Co,Dot as yo}from"lucide-react";import Me from"react";import*as h from"react-aria-components";import*as H from"react-aria-components";import{jsx as he,jsxs as vo}from"react/jsx-runtime";var xe=({children:e,className:t,showArrow:o,...r})=>vo(H.Popover,{offset:8,...r,className:H.composeRenderProps(t,s=>n("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none",s)),children:[o&&he(H.OverlayArrow,{className:"group",children:he("svg",{viewBox:"0 0 12 12",className:"block h-3 w-3 fill-bg-surface/80 stroke-border-subtle group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90","aria-hidden":"true",children:he("path",{d:"M0 0 L6 6 L12 0"})})}),e]});import{Fragment as Ao,jsx as w,jsxs as X}from"react/jsx-runtime";function Ro(e){let[t,o]=Me.Children.toArray(e.children).slice(0,2);return X(h.MenuTrigger,{...e,children:[t,w(xe,{placement:e.placement,className:"min-w-35",children:o})]})}function Po(e){let[t,o]=Me.Children.toArray(e.children).slice(0,2);return X(h.SubmenuTrigger,{...e,children:[t,w(xe,{offset:-4,crossOffset:-4,children:o})]})}function I(e){return w(h.Menu,{...e,className:h.composeRenderProps(e.className,t=>n("p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75",t))})}function wo(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return w(h.MenuItem,{...e,textValue:t,className:h.composeRenderProps(e.className,(o,{isFocused:r,isPressed:s,isDisabled:a})=>n("group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none","text-text-main text-[12px]",{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":r,"bg-bg-surface-elevanted":s,"opacity-40 grayscale pointer-events-none":a},o)),children:h.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:s,hasSubmenu:a})=>X(Ao,{children:[r!=="none"&&X("span",{className:"flex items-center size-4 shrink-0 justify-center",children:[s&&r==="multiple"&&w(bo,{className:"size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),s&&r==="single"&&w(yo,{className:"size-5 text-primary-500 animate-in zoom-in-50 duration-200"})]}),w("div",{className:"flex flex-row w-full transition-colors items-center gap-2 py-1 px-1",children:o}),a&&w(Co,{className:"size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function No({title:e,...t}){return X(h.MenuSection,{...t,className:n("flex flex-col gap-0.5",t.className),children:[e&&w(h.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),w(h.Collection,{items:t.items,children:t.children})]})}function To(e){return w(h.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}I.Root=I;I.Item=wo;I.Trigger=Ro;I.SubTrigger=Po;I.Section=No;I.Separator=To;import{jsx as ko}from"react/jsx-runtime";function Sn({className:e,variant:t="rect",...o}){return ko("div",{className:n("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}import{Separator as Oe}from"react-aria-components";import{ToggleButton as ze}from"react-aria-components";import{Button as Mo}from"react-aria-components";import{Search as Oo,Sun as zo,Moon as Vo,ExternalLink as Eo}from"lucide-react";import{jsx as p,jsxs as P}from"react/jsx-runtime";function R(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var Ve=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...R(e),children:[p("title",{children:"GitHub"}),p("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),Ee=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...R(e),children:[p("title",{children:"Discord"}),p("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z"})]}),De=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...R(e),children:[p("title",{children:"X"}),p("path",{d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"})]});var He=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...R(e),children:[p("title",{children:"Bluesky"}),p("path",{d:"M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"})]}),Gn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[p("title",{children:"TypeScript"}),p("path",{fill:"#2563EB",d:"M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z"})]}),jn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[p("title",{children:"JavaScript"}),p("path",{fill:"#F59E0B",d:"M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z"})]}),Jn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[p("title",{children:"JSON"}),p("path",{fill:"#F59E0B",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),Kn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[p("title",{children:"CSS"}),p("path",{fill:"#0EA5E9",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),$n=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[p("title",{children:"HTML"}),p("path",{fill:"#EA580C",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]});var Xn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[p("title",{children:"React"}),p("path",{fill:"#0E8ADC",d:"M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z"}),p("path",{stroke:"#0E8ADC",d:"M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z"}),p("path",{stroke:"#0E8ADC",d:"M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z"}),p("path",{stroke:"#0E8ADC",d:"M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z"})]}),_n=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[p("title",{children:"Markdown"}),p("path",{fill:"#60A5FA",d:"M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z"})]}),Yn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",...R(e),children:[p("title",{children:"Shell"}),p("path",{stroke:"#14B8A6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.336 17l6-6-6-6M12.336 19h8"})]}),Zn=e=>P("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...R(e),children:[p("title",{children:"YAML"}),p("path",{fill:"#A78BFA",d:"M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z"})]});import{jsx as d,jsxs as re}from"react/jsx-runtime";var y=({children:e,className:t,...o})=>d("header",{className:n("boltdocs-navbar sticky top-0 z-50 w-full border-b border-border-subtle bg-bg-main/80 backdrop-blur-md",t),...o,children:e}),Do=({children:e,className:t})=>d("div",{className:n("mx-auto flex lg:h-navbar max-w-(--breakpoint-3xl) items-center justify-between px-4 md:px-6",t),children:e}),Ho=({children:e,className:t})=>d("div",{className:n("flex flex-1 items-center justify-start gap-4 min-w-0",t),children:e}),Wo=({children:e,className:t})=>d("div",{className:n("flex flex-1 items-center justify-end gap-2 md:gap-4 min-w-0",t),children:e}),Fo=({children:e,className:t})=>d("div",{className:n("hidden lg:flex flex-1 justify-center items-center gap-4 px-4 min-w-0 w-full",t),children:e}),Go=({src:e,alt:t,width:o=24,height:r=24,className:s})=>d(N,{href:"/",className:n("flex items-center gap-2 shrink-0 outline-none",s),children:e?d("img",{src:e,alt:t,width:o,height:r,className:"h-6 w-6 object-contain"}):null}),jo=({children:e,className:t})=>d(N,{href:"/",children:d("span",{className:n("text-lg font-bold tracking-tight hidden sm:inline-block",t),children:e})}),Jo=({children:e,className:t})=>d("nav",{className:n("hidden md:flex items-center gap-6 text-sm font-medium",t),children:e}),Ko=({label:e,href:t,active:o,to:r,className:s})=>re(N,{href:t,target:r==="external"?"_blank":void 0,className:n("transition-colors outline-none font-medium focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm",{"text-primary-500":o,"text-text-muted hover:text-text-main":!o},s),children:[e,r==="external"&&d("span",{className:"ml-1 inline-block",children:d(Eo,{size:12})})]}),$o=({className:e,onPress:t})=>{let[o,r]=So(!1),s=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return Io(()=>{r(!0)},[]),re(Mo,{onPress:t,className:n("flex items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-muted outline-none cursor-pointer","transition-all duration-200 hover:border-border-strong hover:text-text-main hover:bg-bg-muted hover:shadow-sm active:scale-[0.98]","focus-visible:ring-2 focus-visible:ring-primary-500/30","w-full max-w-[720px] justify-between",e),children:[re("div",{className:"flex items-center gap-2",children:[d(Oo,{size:16}),d("span",{className:"hidden sm:inline-block",children:"Search docs..."})]}),re("div",{className:"hidden sm:flex items-center gap-1 pointer-events-none select-none",children:[d("kbd",{className:"flex h-5 items-center justify-center rounded border border-border-subtle bg-bg-main px-1.5 font-mono text-[10px] font-medium",children:s?"\u2318":"Ctrl"}),d("kbd",{className:"flex h-5 w-5 items-center justify-center rounded border border-border-subtle bg-bg-main font-mono text-[10px] font-medium",children:"K"})]})]})},Xo=({className:e,theme:t,onThemeChange:o})=>d(ze,{isSelected:t==="dark",onChange:o,className:n("rounded-md p-2 text-text-muted outline-none cursor-pointer","transition-all duration-300 hover:bg-bg-surface hover:text-text-main hover:rotate-12 active:scale-90","focus-visible:ring-2 focus-visible:ring-primary-500/30",e),"aria-label":"Toggle theme",children:t==="dark"?d(zo,{size:20}):d(Vo,{size:20})}),_o=({name:e})=>{if(e==="github")return d(Ve,{});if(e==="discord")return d(Ee,{});if(e==="x")return d(De,{});if(e==="bluesky")return d(He,{})},Yo=({icon:e,link:t,className:o})=>d(N,{href:t,target:"_blank",rel:"noopener noreferrer",className:n("rounded-md p-2 text-text-muted outline-none transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:d(_o,{name:e})}),Zo=({className:e})=>d(Oe,{orientation:"vertical",className:n("h-6 w-px bg-border-subtle mx-1",e)});y.Root=y;y.Left=Ho;y.Right=Wo;y.Center=Fo;y.Logo=Go;y.Title=jo;y.Links=Jo;y.Link=Ko;y.SearchTrigger=$o;y.Theme=Xo;y.Socials=Yo;y.Split=Zo;y.Content=Do;var os=y;import{useState as ve,useMemo as qo,useEffect as Qo}from"react";import{Index as Uo}from"flexsearch";import We from"virtual:boltdocs-search";function ls(e){let{currentLocale:t,currentVersion:o}=Q(),[r,s]=ve(!1),[a,u]=ve(""),[i,l]=ve(null);Qo(()=>{if(!r||i)return;let f=new Uo({preset:"match",tokenize:"full",resolution:9,cache:!0});for(let c of We)f.add(c.id,`${c.title} ${c.content}`);l(f)},[r,i]);let g=qo(()=>{if(!a)return e.filter(v=>{let C=!t||v.locale===t,W=!o||v.version===o;return C&&W}).slice(0,10).map(v=>({id:v.path,title:v.title,path:v.path,bio:v.description||"",groupTitle:v.groupTitle}));if(!i)return[];let f=i.search(a,{limit:20,suggest:!0}),c=[],L=new Set;for(let v of f){let C=We.find(F=>F.id===v);if(!C)continue;let W=!t||C.locale===t,m=!o||C.version===o;!W||!m||L.has(C.url)||(L.add(C.url),c.push({id:C.url,title:C.title,path:C.url,bio:C.display,groupTitle:C.display.split(" > ")[0],isHeading:C.url.includes("#")}))}return c.slice(0,10)},[a,i,t,o,e]);return{isOpen:r,setIsOpen:s,query:a,setQuery:u,list:g,input:{value:a,onChange:f=>u(f.target.value)}}}export{tr as a,$e as b,Y as c,ar as d,q as e,Q as f,ae as g,n as h,N as i,at as j,Re as k,lt as l,Ve as m,Gn as n,jn as o,Jn as p,Kn as q,$n as r,Xn as s,_n as t,Yn as u,Zn as v,ie as w,y as x,os as y,j as z,V as A,Le as B,Ur as C,en as D,tn as E,on as F,S as G,E as H,D as I,K as J,$ as K,ho as L,xe as M,I as N,Sn as O,ls as P};
|
package/dist/client/index.d.mts
CHANGED
|
@@ -263,18 +263,6 @@ interface BoltdocsPlugin {
|
|
|
263
263
|
/** Implementation of lifecycle hooks */
|
|
264
264
|
hooks?: PluginLifecycleHooks;
|
|
265
265
|
}
|
|
266
|
-
/**
|
|
267
|
-
* Configuration for external integrations (e.g., CodeSandbox).
|
|
268
|
-
*/
|
|
269
|
-
interface BoltdocsIntegrationsConfig {
|
|
270
|
-
/** CodeSandbox integration settings */
|
|
271
|
-
sandbox?: {
|
|
272
|
-
/** Whether to enable the "Open in Sandbox" button in CodeBlocks */
|
|
273
|
-
enable?: boolean;
|
|
274
|
-
/** Default options for the sandbox (files, dependencies, etc.) */
|
|
275
|
-
config?: Record<string, unknown>;
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
266
|
/**
|
|
279
267
|
* Configuration for security-related settings.
|
|
280
268
|
*/
|
|
@@ -304,8 +292,6 @@ interface BoltdocsConfig {
|
|
|
304
292
|
versions?: BoltdocsVersionsConfig;
|
|
305
293
|
/** Custom plugins for extending functionality */
|
|
306
294
|
plugins?: BoltdocsPlugin[];
|
|
307
|
-
/** External integrations configuration */
|
|
308
|
-
integrations?: BoltdocsIntegrationsConfig;
|
|
309
295
|
/** Configuration for the robots.txt file */
|
|
310
296
|
robots?: BoltdocsRobotsConfig;
|
|
311
297
|
/** Security-related settings and headers */
|
|
@@ -401,38 +387,6 @@ interface CreateBoltdocsAppOptions {
|
|
|
401
387
|
/** Optional custom MDX components provided by plugins */
|
|
402
388
|
components?: Record<string, React__default.ComponentType>;
|
|
403
389
|
}
|
|
404
|
-
/**
|
|
405
|
-
* Types for CodeSandbox integration.
|
|
406
|
-
*/
|
|
407
|
-
interface SandboxFile {
|
|
408
|
-
content: string | object;
|
|
409
|
-
isBinary?: boolean;
|
|
410
|
-
}
|
|
411
|
-
type SandboxFiles = Record<string, SandboxFile>;
|
|
412
|
-
interface SandboxOptions {
|
|
413
|
-
files?: SandboxFiles;
|
|
414
|
-
dependencies?: Record<string, string>;
|
|
415
|
-
devDependencies?: Record<string, string>;
|
|
416
|
-
title?: string;
|
|
417
|
-
description?: string;
|
|
418
|
-
template?: string;
|
|
419
|
-
/** The file path to open by default in the editor (e.g. `"src/App.tsx"`). */
|
|
420
|
-
entry?: string;
|
|
421
|
-
/** Options for the embedded iframe view, used by `embedSandbox()`. */
|
|
422
|
-
embed?: SandboxEmbedOptions;
|
|
423
|
-
/** Custom scripts for the package.json (e.g. `{ "start": "vite" }`). */
|
|
424
|
-
scripts?: Record<string, string>;
|
|
425
|
-
/** Optional default theme configuration for the sandbox project. */
|
|
426
|
-
themeConfig?: Record<string, unknown>;
|
|
427
|
-
}
|
|
428
|
-
interface SandboxEmbedOptions {
|
|
429
|
-
/** Which panel to display: `"editor"`, `"preview"`, or `"split"`. */
|
|
430
|
-
view?: 'editor' | 'preview' | 'split';
|
|
431
|
-
/** Color theme: `"dark"` or `"light"`. */
|
|
432
|
-
theme?: 'dark' | 'light';
|
|
433
|
-
/** Whether to hide the navigation bar in the embed. */
|
|
434
|
-
hideNavigation?: boolean;
|
|
435
|
-
}
|
|
436
390
|
/**
|
|
437
391
|
* Tab configuration for the documentation site.
|
|
438
392
|
*/
|
|
@@ -779,9 +733,7 @@ declare function Loading(): react_jsx_runtime.JSX.Element;
|
|
|
779
733
|
interface CodeBlockProps {
|
|
780
734
|
children?: React.ReactNode;
|
|
781
735
|
className?: string;
|
|
782
|
-
sandbox?: boolean | any;
|
|
783
736
|
hideCopy?: boolean;
|
|
784
|
-
hideSandbox?: boolean;
|
|
785
737
|
title?: string;
|
|
786
738
|
lang?: string;
|
|
787
739
|
highlightedHtml?: string;
|
|
@@ -997,9 +949,7 @@ interface ComponentPreviewProps {
|
|
|
997
949
|
children?: string;
|
|
998
950
|
preview?: React.ReactNode;
|
|
999
951
|
hideCode?: boolean;
|
|
1000
|
-
hideSandbox?: boolean;
|
|
1001
952
|
hideCopy?: boolean;
|
|
1002
|
-
sandboxOptions?: SandboxOptions;
|
|
1003
953
|
}
|
|
1004
954
|
declare function ComponentPreview(props: ComponentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
1005
955
|
|