boltdocs 2.2.0 → 2.3.0
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 +10 -0
- package/bin/boltdocs.js +2 -2
- package/dist/base-ui/index.d.mts +3 -3
- package/dist/base-ui/index.d.ts +3 -3
- package/dist/base-ui/index.js +1 -1
- package/dist/base-ui/index.mjs +1 -1
- package/dist/{cache-CRAZ55X7.mjs → cache-P6WK424C.mjs} +1 -1
- package/dist/chunk-22NXDNP4.mjs +74 -0
- package/dist/chunk-2HUVMMJU.mjs +1 -0
- package/dist/chunk-2Z5T6EAU.mjs +1 -0
- package/dist/chunk-CRZGOE32.mjs +1 -0
- package/dist/chunk-HA6543SL.mjs +1 -0
- package/dist/{chunk-ZK2266IZ.mjs → chunk-RPUERTVC.mjs} +1 -1
- package/dist/{chunk-MZBG4N4W.mjs → chunk-URTD6E6S.mjs} +1 -1
- package/dist/chunk-W2NB4T6V.mjs +1 -0
- package/dist/chunk-Y4RRHPXC.mjs +1 -0
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.d.ts +1 -1
- 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/hooks/index.d.mts +7 -15
- package/dist/hooks/index.d.ts +7 -15
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/{loading-chS3pm9W.d.ts → loading-B7X5Wchs.d.ts} +3 -5
- package/dist/{loading-BqGrFWO5.d.mts → loading-WuaQbsKb.d.mts} +3 -5
- package/dist/mdx/index.js +1 -1
- package/dist/mdx/index.mjs +1 -1
- package/dist/node/cli-entry.js +27 -23
- package/dist/node/cli-entry.mjs +5 -1
- package/dist/node/index.js +10 -10
- package/dist/node/index.mjs +1 -1
- package/dist/primitives/index.d.mts +2 -2
- package/dist/primitives/index.d.ts +2 -2
- package/dist/primitives/index.js +1 -1
- package/dist/primitives/index.mjs +1 -1
- package/dist/search-dialog-ZRXBAQJ5.mjs +1 -0
- package/package.json +2 -1
- package/src/client/app/theme-context.tsx +14 -7
- package/src/client/components/default-layout.tsx +6 -2
- package/src/client/components/primitives/navbar.tsx +3 -3
- package/src/client/components/primitives/search-dialog.tsx +4 -4
- package/src/client/components/primitives/sidebar.tsx +3 -2
- package/src/client/components/primitives/skeleton.tsx +26 -0
- package/src/client/components/ui-base/loading.tsx +43 -73
- package/src/client/components/ui-base/navbar.tsx +8 -6
- package/src/client/components/ui-base/page-nav.tsx +2 -1
- package/src/client/components/ui-base/powered-by.tsx +4 -1
- package/src/client/components/ui-base/search-dialog.tsx +16 -5
- package/src/client/components/ui-base/sidebar.tsx +4 -2
- package/src/client/hooks/use-i18n.ts +3 -2
- package/src/client/hooks/use-localized-to.ts +6 -5
- package/src/client/hooks/use-page-nav.ts +27 -6
- package/src/client/hooks/use-routes.ts +2 -1
- package/src/client/hooks/use-search.ts +81 -59
- package/src/client/hooks/use-sidebar.ts +2 -1
- package/src/client/store/use-boltdocs-store.ts +6 -5
- package/src/client/theme/neutral.css +29 -0
- package/src/node/{cli.ts → cli/build.ts} +17 -23
- package/src/node/cli/dev.ts +22 -0
- package/src/node/cli/doctor.ts +243 -0
- package/src/node/cli/index.ts +9 -0
- package/src/node/cli/ui.ts +54 -0
- package/src/node/cli-entry.ts +16 -16
- package/src/node/config.ts +1 -1
- package/src/node/plugin/entry.ts +1 -1
- package/src/node/plugin/index.ts +24 -10
- package/src/node/routes/parser.ts +9 -9
- package/src/node/search/index.ts +55 -0
- package/src/node/ssg/index.ts +14 -6
- package/src/node/ssg/robots.ts +7 -4
- package/dist/chunk-5D6XPYQ3.mjs +0 -74
- package/dist/chunk-6QXCKZAT.mjs +0 -1
- package/dist/chunk-H4M6P3DM.mjs +0 -1
- package/dist/chunk-JXHNX2WN.mjs +0 -1
- package/dist/chunk-Q3MLYTIQ.mjs +0 -1
- package/dist/chunk-RSII2UPE.mjs +0 -1
- package/dist/chunk-ZRJ55GGF.mjs +0 -1
- package/dist/search-dialog-MA5AISC7.mjs +0 -1
package/src/node/ssg/robots.ts
CHANGED
|
@@ -19,20 +19,23 @@ export function generateRobotsTxt(config: BoltdocsConfig): string {
|
|
|
19
19
|
allow: '/',
|
|
20
20
|
},
|
|
21
21
|
]
|
|
22
|
-
const sitemaps =
|
|
22
|
+
const sitemaps =
|
|
23
|
+
(robots as any).sitemaps || (siteUrl ? [`${siteUrl}/sitemap.xml`] : [])
|
|
23
24
|
|
|
24
25
|
let content = ''
|
|
25
26
|
|
|
26
27
|
for (const rule of rules) {
|
|
27
28
|
content += `User-agent: ${rule.userAgent}\n`
|
|
28
|
-
|
|
29
|
+
|
|
29
30
|
if (rule.disallow) {
|
|
30
|
-
const disallows = Array.isArray(rule.disallow)
|
|
31
|
+
const disallows = Array.isArray(rule.disallow)
|
|
32
|
+
? rule.disallow
|
|
33
|
+
: [rule.disallow]
|
|
31
34
|
for (const d of disallows) {
|
|
32
35
|
content += `Disallow: ${d}\n`
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
|
-
|
|
38
|
+
|
|
36
39
|
if (rule.allow) {
|
|
37
40
|
const allows = Array.isArray(rule.allow) ? rule.allow : [rule.allow]
|
|
38
41
|
for (const a of allows) {
|
package/dist/chunk-5D6XPYQ3.mjs
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import{a as v,c as u,d as S,e as W,f as q,g as xt,h as bt,i as F,j as it,k as vt,l as E,m as nt,n as G,o as rt,p as _,q as Pt,r as wt,u as Ct}from"./chunk-Q3MLYTIQ.mjs";function st(){M.invalidateAll()}function at(o){M.invalidate(o)}var M,$t=v(()=>{"use strict";u();Ct();M=new Pt({name:"routes"})});import A from"path";import se from"github-slugger";function kt(o,r,i,d){let e=decodeURIComponent(o),l=A.resolve(e),c=A.resolve(r),m=S(A.relative(c,l));if(m.startsWith("../")||m===".."||l.includes("\0"))throw new Error(`Security breach: File is outside of docs directory or contains null bytes: ${o}`);let{data:t,content:s}=bt(o),a=m.split("/"),p,h;if(d?.versions&&a.length>0){let R=a[0],et=d.versions.prefix||"",V=d.versions.versions.find(O=>{let ot=et+O.path;return R===ot||R===O.path});V&&(h=V.path,a=a.slice(1))}if(d?.i18n&&a.length>0){let R=a[0];d.i18n.locales[R]&&(p=R,a=a.slice(1))}let y;if(a.length>0){let R=a[0].match(/^\((.+)\)$/);R&&(y=R[1].toLowerCase(),a=a.slice(1))}let k=a.join("/"),n;t.permalink?n=t.permalink.startsWith("/")?t.permalink:`/${t.permalink}`:n=vt(k||"index.md");let g=i;h&&(g+="/"+h),p&&(g+="/"+p),g+=n==="/"?"":n,(!g||g==="")&&(g="/");let b=a[a.length-1],f=W(b),B=W(A.basename(o,A.extname(o))),x=t.sidebarPosition??q(b),$=a.length>=2?a[0]:void 0,P=$?W($):void 0,L=a.length>=2&&/^index\.mdx?$/.test(f),ee=new se,ht=[],oe=/^(#{2,4})\s+(.+)$/gm;for(let R of s.matchAll(oe)){let et=R[1].length,V=R[2].replace(/\[([^\]]+)\]\([^\)]+\)/g,"$1").replace(/[_*`]/g,"").trim(),O=E(V).trim(),ot=ee.slug(O);ht.push({level:et,text:O,id:ot})}let ie=t.title?E(String(t.title)):B,tt=t.description?E(String(t.description)):"";!tt&&s&&(tt=nt(s.replace(/^#+.*$/gm,"").replace(/\[([^\]]+)\]\([^\)]+\)/g,"$1").replace(/[_*`]/g,"").replace(/\s+/g," ")).trim().slice(0,160));let ne=t.badge?E(String(t.badge)):void 0,yt=t.icon?String(t.icon):void 0,re=ae(s);return{route:{path:g,componentPath:o,filePath:m,title:ie,description:tt,sidebarPosition:x,headings:ht,locale:p,version:h,badge:ne,icon:yt,tab:y,_content:re,_rawContent:s},relativeDir:P,isGroupIndex:L,inferredTab:y,groupMeta:L?{title:t.groupTitle||t.title||(P?G(P):""),position:t.groupPosition??t.sidebarPosition??($?q($):void 0),icon:yt}:void 0,inferredGroupPosition:$?q($):void 0}}function ae(o){let r=o.replace(/^#+.*$/gm,"").replace(/\[([^\]]+)\]\([^\)]+\)/g,"$1").replace(/\{[^\}]+\}/g,"").replace(/[_*`]/g,"").replace(/\s+/g," ");return nt(r).trim()}var Bt=v(()=>{"use strict";u();_()});function St(o){return o.sort((r,i)=>!r.group&&!i.group?Rt(r,i):r.group?i.group?r.group!==i.group?le(r,i):Rt(r,i):1:-1)}function Rt(o,r){return o.sidebarPosition!==void 0&&r.sidebarPosition!==void 0?o.sidebarPosition-r.sidebarPosition:o.sidebarPosition!==void 0?-1:r.sidebarPosition!==void 0?1:o.title.localeCompare(r.title)}function le(o,r){return o.groupPosition!==void 0&&r.groupPosition!==void 0?o.groupPosition-r.groupPosition:o.groupPosition!==void 0?-1:r.groupPosition!==void 0?1:(o.groupTitle||o.group).localeCompare(r.groupTitle||r.group)}var Mt=v(()=>{"use strict";u()});import ce from"fast-glob";async function U(o,r,i="/docs",d=!0){let e=performance.now();M.load(),N.clear(),(process.env.BOLTDOCS_FORCE_REPARSE==="true"||r?.i18n)&&M.invalidateAll();let l;!d&<?l=lt:(l=await ce(["**/*.md","**/*.mdx"],{cwd:o,absolute:!0,suppressErrors:!0,followSymbolicLinks:!1}),lt=l),M.pruneStale(new Set(l));let c=50,m=[],t=0;for(let n=0;n<l.length;n+=c){let g=l.slice(n,n+c),b=await Promise.all(g.map(async f=>{let B=M.get(f);if(B)return t++,B;let x=kt(f,o,i,r);return M.set(f,x),x}));m.push(...b),n+c<l.length&&await new Promise(f=>setImmediate(f))}M.save();let s=new Map,a=[];for(let n of m)if(n.isGroupIndex&&n.relativeDir&&a.push(n),n.relativeDir){let g=s.get(n.relativeDir);g?(g.position===void 0&&n.inferredGroupPosition!==void 0&&(g.position=n.inferredGroupPosition),!g.icon&&n.route.icon&&(g.icon=n.route.icon)):(g={title:G(n.relativeDir),position:n.inferredGroupPosition,icon:n.route.icon},s.set(n.relativeDir,g))}for(let n of a){let g=s.get(n.relativeDir);n.groupMeta&&(g.title=n.groupMeta.title,n.groupMeta.position!==void 0&&(g.position=n.groupMeta.position),n.groupMeta.icon&&(g.icon=n.groupMeta.icon))}let p=new Array(m.length);for(let n=0;n<m.length;n++){let g=m[n],b=g.relativeDir,f=b?s.get(b):void 0;p[n]={...g.route,group:b,groupTitle:f?.title||(b?G(b):void 0),groupPosition:f?.position,groupIcon:f?.icon}}let h=p;if(r?.i18n){let n=de(p,r,i);h=[...p,...n]}let y=St(h),k=performance.now()-e;return console.log(`[boltdocs] Route generation: ${k.toFixed(2)}ms (${l.length} files, ${t} cache hits)`),y}function de(o,r,i){let d=r.i18n.defaultLocale,e=Object.keys(r.i18n.locales),l=[],c=new Map,m=[];for(let t of o){let s=t.locale||d;c.has(s)||c.set(s,new Set),c.get(s).add(t.path),s===d&&m.push(t)}for(let t of e){let s=c.get(t)||new Set;for(let a of m){let p=me(a.path,d,t,i,r);p!==a.path&&(s.has(p)||l.push({...a,path:p,locale:t}))}}return l}function me(o,r,i,d,e){let l=`${o}:${i}`,c=N.get(l);if(c)return c;let m=d;if(e?.versions){let p=e.versions.prefix||"";for(let h of e.versions.versions){let y=p+h.path;if(o.startsWith(`${d}/${y}`)){m+="/"+y;break}if(o.startsWith(`${d}/${h.path}`)){m+="/"+h.path;break}}}let t=o.substring(m.length),s=`/${r}`;if(t.startsWith(s+"/"))t="/"+i+"/"+t.substring(s.length+1);else if(t===s)t="/"+i;else if(t==="/"||t==="")t="/"+i;else{let p=t.startsWith("/")?"":"/";t="/"+i+p+t}let a=m+t;return N.size>2e3&&N.clear(),N.set(l,a),a}var lt,N,ct=v(()=>{"use strict";u();_();$t();Bt();Mt();lt=null,N=new Map});import dt from"path";import pe from"fs";import{loadConfigFromFile as ge}from"vite";function ue(o){return o}async function j(o,r=process.cwd()){let i=r,d={docsDir:dt.resolve(o),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}},e={};for(let t of J){let s=dt.resolve(i,t);if(pe.existsSync(s))try{let a=await ge({command:"serve",mode:"development"},s,i);if(a){e=a.config;break}}catch(a){console.warn(`[boltdocs] Failed to load config from ${t}:`,a)}}let c={...{title:e.title,description:e.description,logo:e.logo,favicon:e.favicon,ogImage:e.ogImage,navbar:e.navbar,sidebar:e.sidebar,socialLinks:e.socialLinks,footer:e.footer,githubRepo:e.githubRepo,tabs:e.tabs,codeTheme:e.codeTheme,copyMarkdown:e.copyMarkdown,breadcrumbs:e.breadcrumbs,poweredBy:e.poweredBy,communityHelp:e.communityHelp,version:e.version,editLink:e.editLink},...e.theme||{}},m=Object.fromEntries(Object.entries(c).filter(([t,s])=>s!==void 0));return m.navbar&&(m.navbar=m.navbar.map(t=>({label:t.label||t.text||"",href:t.href||t.link||t.to||"",items:t.items?.map(s=>({label:s.label||s.text||"",href:s.href||s.link||s.to||""}))}))),{docsDir:dt.resolve(o),homePage:e.homePage,theme:{...d.theme,...m},i18n:e.i18n,versions:e.versions,siteUrl:e.siteUrl,plugins:e.plugins||[],external:e.external,integrations:e.integrations,robots:e.robots,vite:e.vite}}var J,X=v(()=>{"use strict";u();J=["boltdocs.config.js","boltdocs.config.mjs","boltdocs.config.ts"]});function Dt(o,r){let i=F(r.title),d=F(r.description);return o.replace(/<title>.*?<\/title>/,`<title>${i}</title>`).replace(/(<meta name="description" content=")[^"]*(")/,`$1${d}$2`).replace(/(<meta property="og:title" content=")[^"]*(")/,`$1${i}$2`).replace(/(<meta property="og:description" content=")[^"]*(")/,`$1${d}$2`).replace(/(<meta name="twitter:title" content=")[^"]*(")/,`$1${i}$2`).replace(/(<meta name="twitter:description" content=")[^"]*(")/,`$1${d}$2`)}var Tt=v(()=>{"use strict";u();_()});function _t(o,r){let i=r?.siteUrl?.replace(/\/$/,"")||"https://example.com",d=new Date().toISOString().split("T")[0],e=[{url:"/",priority:"1.0",changefreq:"daily"}];if(r?.i18n){let c=r.i18n.defaultLocale;for(let m of Object.keys(r.i18n.locales))m!==c&&e.push({url:`/${m}/`,priority:"1.0",changefreq:"daily"})}return`<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
3
|
-
${[...e,...o.map(c=>({url:c,priority:"0.8",changefreq:"weekly"}))].map(c=>` <url>
|
|
4
|
-
<loc>${it(i)}${it(c.url)}</loc>
|
|
5
|
-
<lastmod>${d}</lastmod>
|
|
6
|
-
<changefreq>${c.changefreq}</changefreq>
|
|
7
|
-
<priority>${c.priority}</priority>
|
|
8
|
-
</url>`).join(`
|
|
9
|
-
`)}
|
|
10
|
-
</urlset>`}var jt=v(()=>{"use strict";u();_()});function K(o){if(typeof o.robots=="string")return o.robots;let r=o.siteUrl?.replace(/\/$/,"")||"",i=o.robots||{},d=i.rules||[{userAgent:"*",allow:"/"}],e=i.sitemaps||(r?[`${r}/sitemap.xml`]:[]),l="";for(let c of d){if(l+=`User-agent: ${c.userAgent}
|
|
11
|
-
`,c.disallow){let m=Array.isArray(c.disallow)?c.disallow:[c.disallow];for(let t of m)l+=`Disallow: ${t}
|
|
12
|
-
`}if(c.allow){let m=Array.isArray(c.allow)?c.allow:[c.allow];for(let t of m)l+=`Allow: ${t}
|
|
13
|
-
`}l+=`
|
|
14
|
-
`}for(let c of e)l+=`Sitemap: ${c}
|
|
15
|
-
`;return l.trim()}var mt=v(()=>{"use strict";u()});import I from"fs";import T from"path";import{fileURLToPath as fe}from"url";import{createRequire as he}from"module";async function pt(o){let{docsDir:r,docsDirName:i,outDir:d,config:e}=o,l=await U(r,e),c=T.resolve(It,"../client/ssr.js");if(!I.existsSync(c)){console.error("[boltdocs] SSR module not found at",c,"- Did you build the core package?");return}let m=Ft("module"),t=m.prototype.require;m.prototype.require=function(n,...g){return n==="virtual:boltdocs-layout"?{__esModule:!0,default:function(f){try{let x=t.apply(this,[T.resolve(It,"../client/index.js")]).DefaultLayout||(({children:P})=>P);return t.apply(this,["react"]).createElement(x,f)}catch{return f.children}}}:t.apply(this,[n,...g])};let{render:s}=Ft(c);m.prototype.require=t;let a=T.join(d,"index.html");if(!I.existsSync(a)){console.warn("[boltdocs] No index.html found in outDir, skipping SSG.");return}let p=I.readFileSync(a,"utf-8");await Promise.all(l.map(async n=>{let g=rt(e?.theme?.title,n.locale)||"Boltdocs",b=rt(e?.theme?.description,n.locale)||"",f=`${n.title} | ${g}`,B=n.description||b,x={};x[`/${i}/${n.filePath}`]={default:()=>null};try{let $=await s({path:n.path,routes:l,config:e||{},docsDirName:i,modules:x,homePage:void 0}),P=Dt(p,{title:F(f),description:F(B)}).replace("<!--app-html-->",$).replace('<div id="root"></div>',`<div id="root">${$}</div>`),L=T.join(d,n.path);await I.promises.mkdir(L,{recursive:!0}),await I.promises.writeFile(T.join(L,"index.html"),P,"utf-8")}catch($){console.error(`[boltdocs] Error SSR rendering route ${n.path}:`,$&&($.stack||$))}}));let h=_t(l.map(n=>n.path),e);I.writeFileSync(T.join(d,"sitemap.xml"),h,"utf-8");let y=K(e);I.writeFileSync(T.join(d,"robots.txt"),y,"utf-8"),console.log(`[boltdocs] Generated ${l.length} static pages + sitemap.xml + robots.txt`);let{flushCache:k}=await import("./cache-CRAZ55X7.mjs");await k()}var ye,It,Ft,gt=v(()=>{"use strict";u();ct();_();Tt();jt();mt();ye=fe(import.meta.url),It=T.dirname(ye),Ft=he(import.meta.url)});import Ht from"path";import xe from"fs";function Lt(o,r){let i=o.homePage?`import HomePage from '${S(o.homePage)}';`:"",d=Ht.resolve(process.cwd(),"index.css"),e=xe.existsSync(d)?"import './index.css';":"",l=o.homePage?"homePage: HomePage,":"",c=r?.plugins?.flatMap(y=>Object.entries(y.components||{}))||[],m=c.map(([y,k])=>`import * as _comp_${y} from '${S(k)}';
|
|
16
|
-
const ${y} = _comp_${y}.default || _comp_${y}['${y}'] || _comp_${y};`).join(`
|
|
17
|
-
`),t=c.map(([y])=>y).join(", "),s=Ht.basename(o.docsDir||"docs"),a=Object.entries(r?.external||{}),p=a.map(([y,k],n)=>`import _ext_${n} from '${S(k)}';`).join(`
|
|
18
|
-
`),h=a.length>0?`externalPages: { ${a.map(([y],k)=>`"${y}": _ext_${k}`).join(", ")} },`:"";return`
|
|
19
|
-
import { createBoltdocsApp as _createApp } from 'boltdocs/client';
|
|
20
|
-
import _routes from 'virtual:boltdocs-routes';
|
|
21
|
-
import _config from 'virtual:boltdocs-config';
|
|
22
|
-
import _user_mdx_components from 'virtual:boltdocs-mdx-components';
|
|
23
|
-
${e}
|
|
24
|
-
${i}
|
|
25
|
-
${m}
|
|
26
|
-
${p}
|
|
27
|
-
|
|
28
|
-
_createApp({
|
|
29
|
-
target: '#root',
|
|
30
|
-
routes: _routes,
|
|
31
|
-
docsDirName: '${s}',
|
|
32
|
-
config: _config,
|
|
33
|
-
modules: import.meta.glob('/${s}/**/*.{md,mdx}'),
|
|
34
|
-
hot: import.meta.hot,
|
|
35
|
-
${l}
|
|
36
|
-
${h}
|
|
37
|
-
components: { ${t}${t?", ":""} ...(_user_mdx_components || {}) },
|
|
38
|
-
});
|
|
39
|
-
`}var Ot=v(()=>{"use strict";u();_()});function Et(o){return`<!doctype html>
|
|
40
|
-
<html lang="en">
|
|
41
|
-
<head>
|
|
42
|
-
<meta charset="UTF-8" />
|
|
43
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
44
|
-
<title>${o.theme?.title||"Boltdocs"}</title>
|
|
45
|
-
</head>
|
|
46
|
-
<body>
|
|
47
|
-
<div id="root"></div>
|
|
48
|
-
</body>
|
|
49
|
-
</html>`}function ut(o,r){let i=r.theme,d=i?.title||"Boltdocs",e=i?.description||"",l=i?.favicon;!l&&i?.logo&&(typeof i.logo=="string"?l=i.logo:l=i.logo.light||i.logo.dark);let c=[l?`<link rel="icon" href="${l}">`:"",`<meta name="description" content="${e}">`,`<meta property="og:title" content="${d}">`,`<meta property="og:description" content="${e}">`,i?.ogImage?`<meta property="og:image" content="${i.ogImage}">`:"",'<meta property="og:type" content="website">','<meta name="twitter:card" content="summary_large_image">',`<meta name="twitter:title" content="${d}">`,`<meta name="twitter:description" content="${e}">`,i?.ogImage?`<meta name="twitter:image" content="${i.ogImage}">`:"",'<meta name="generator" content="Boltdocs">'].filter(Boolean).join(`
|
|
50
|
-
`),m=`
|
|
51
|
-
<script>
|
|
52
|
-
(function() {
|
|
53
|
-
try {
|
|
54
|
-
var stored = localStorage.getItem("boltdocs-theme");
|
|
55
|
-
var theme = stored || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
|
|
56
|
-
if (theme === "light") {
|
|
57
|
-
document.documentElement.classList.add("theme-light");
|
|
58
|
-
document.documentElement.dataset.theme = "light";
|
|
59
|
-
} else {
|
|
60
|
-
document.documentElement.classList.remove("theme-light");
|
|
61
|
-
document.documentElement.dataset.theme = "dark";
|
|
62
|
-
}
|
|
63
|
-
} catch (e) {}
|
|
64
|
-
})();
|
|
65
|
-
</script>
|
|
66
|
-
`;return o.includes("<title>")?o=o.replace(/<title>.*?<\/title>/,`<title>${d}</title>`):o=o.replace("</head>",` <title>${d}</title>
|
|
67
|
-
</head>`),o=o.replace("</head>",` ${c}
|
|
68
|
-
${m} </head>`),!o.includes("src/main")&&!o.includes("virtual:boltdocs-entry")&&(o=o.replace("</body>",` <script type="module">import "virtual:boltdocs-entry";</script>
|
|
69
|
-
</body>`)),o}var Gt=v(()=>{"use strict";u()});var At=v(()=>{"use strict";u()});import{loadEnv as be}from"vite";import{ViteImageOptimizer as ve}from"vite-plugin-image-optimizer";import D from"path";import Nt from"fs";function Ut(o={},r){let i=D.resolve(process.cwd(),o.docsDir||"docs"),d=S(i),e=r,l,c=!1,m=e?.plugins?.flatMap(t=>t.vitePlugins||[])||[];return[{name:"vite-plugin-boltdocs",enforce:"pre",async config(t,s){c=s.command==="build";let a=t.envDir||process.cwd(),p=be(s.mode,a,"");return Object.assign(process.env,p),e||(e=await j(i)),{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(t){l=t},configureServer(t){t.middlewares.use((n,g,b)=>{if(n.url==="/robots.txt"){let f=K(e);g.statusCode=200,g.setHeader("Content-Type","text/plain"),g.end(f);return}b()}),t.middlewares.use(async(n,g,b)=>{let f=n.url?.split("?")[0]||"/",B=n.headers.accept||"",x=f==="/"||f.startsWith("/docs")||e.i18n&&Object.keys(e.i18n.locales).some(P=>f.startsWith(`/${P}/docs`)||f===`/${P}`)||e.external&&Object.keys(e.external).some(P=>f.startsWith(P)),$=/\.(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(f);if(B.includes("text/html")&&!$&&x){let P=Et(e);P=ut(P,e),P=await t.transformIndexHtml(n.url||"/",P),g.statusCode=200,g.setHeader("Content-Type","text/html"),g.end(P);return}b()});let s=J.map(n=>D.resolve(process.cwd(),n)),a=["tsx","jsx"],p=a.map(n=>D.resolve(i,`layout.${n}`)),h=["tsx","ts","jsx","js"],y=h.map(n=>D.resolve(i,`mdx-components.${n}`));t.watcher.add([...s,...y,...p]);let k=async(n,g)=>{try{let b=S(n);if(J.some(x=>b.endsWith(x))){t.restart();return}if(h.some(x=>b.endsWith(`mdx-components.${x}`))){let x=t.moduleGraph.getModuleById("\0virtual:boltdocs-mdx-components");x&&t.moduleGraph.invalidateModule(x),t.ws.send({type:"full-reload"});return}if(a.some(x=>b.endsWith(`layout.${x}`))){let x=t.moduleGraph.getModuleById("\0virtual:boltdocs-layout");x&&t.moduleGraph.invalidateModule(x),t.ws.send({type:"full-reload"});return}if(!b.startsWith(d)||!xt(b))return;if(g==="add"||g==="unlink"){st(),e=await j(i);let x=t.moduleGraph.getModuleById("\0virtual:boltdocs-config");x&&t.moduleGraph.invalidateModule(x),t.ws.send({type:"custom",event:"boltdocs:config-update",data:{theme:e?.theme,integrations:e?.integrations,i18n:e?.i18n,versions:e?.versions,siteUrl:e?.siteUrl}})}else at(n);let f=await U(i,e,"/docs",g!=="change"),B=t.moduleGraph.getModuleById("\0virtual:boltdocs-routes");B&&t.moduleGraph.invalidateModule(B),t.ws.send({type:"custom",event:"boltdocs:routes-update",data:f})}catch(b){console.error(`[boltdocs] HMR error during ${g} event:`,b)}};t.watcher.on("add",n=>k(n,"add")),t.watcher.on("unlink",n=>k(n,"unlink")),t.watcher.on("change",n=>k(n,"change"))},resolveId(t){if(t==="virtual:boltdocs-routes"||t==="virtual:boltdocs-config"||t==="virtual:boltdocs-entry"||t==="virtual:boltdocs-mdx-components"||t==="virtual:boltdocs-layout")return"\0"+t},async load(t){if(t==="\0virtual:boltdocs-routes"){let s=await U(i,e);return`export default ${JSON.stringify(s,null,2)};`}if(t==="\0virtual:boltdocs-config"){let s={theme:e?.theme,integrations:e?.integrations,i18n:e?.i18n,versions:e?.versions,siteUrl:e?.siteUrl};return`export default ${JSON.stringify(s,null,2)};`}if(t==="\0virtual:boltdocs-entry")return Lt(o,e);if(t==="\0virtual:boltdocs-mdx-components"){let s=["tsx","ts","jsx","js"],a=null;for(let p of s){let h=D.resolve(i,`mdx-components.${p}`);if(Nt.existsSync(h)){a=h;break}}if(a){let p=S(a);return`import * as components from '${p}';
|
|
70
|
-
const mdxComponents = components.default || components;
|
|
71
|
-
export default mdxComponents;
|
|
72
|
-
export * from '${p}';`}return"export default {};"}if(t==="\0virtual:boltdocs-layout"){let s=["tsx","jsx"],a=null;for(let p of s){let h=D.resolve(i,`layout.${p}`);if(Nt.existsSync(h)){a=h;break}}return a?`import UserLayout from '${S(a)}';
|
|
73
|
-
export default UserLayout;`:`import { DefaultLayout } from 'boltdocs/client';
|
|
74
|
-
export default DefaultLayout;`}},transformIndexHtml:{order:"pre",handler(t){return ut(t,e)}},async closeBundle(){if(!c)return;let t=l?.build?.outDir?D.resolve(l.root,l.build.outDir):D.resolve(process.cwd(),"dist"),s=D.basename(i||"docs");await pt({docsDir:i,docsDirName:s,outDir:t,config:e});let{flushCache:a}=await import("./cache-CRAZ55X7.mjs");await a()}},ve({includePublic:!0,png:{quality:80},jpeg:{quality:80},jpg:{quality:80},webp:{quality:80},avif:{quality:80},svg:{multipass:!0,plugins:[{name:"preset-default"}]}}),...m.filter(t=>!!t)]}var zt=v(()=>{"use strict";u();ct();X();gt();_();Ot();Gt();mt();At()});var Vt,H,Wt=v(()=>{"use strict";u();Ct();Vt="v3",H=new wt("mdx")});import{createHighlighter as Pe}from"shiki";async function Q(o){if(Z)return Z;let r=typeof o=="object"?[o.light,o.dark]:[o??"github-dark"];return["github-light","github-dark"].forEach(i=>{r.includes(i)||r.push(i)}),Z=await Pe({themes:r,langs:["tsx","jsx","ts","js","json","md","mdx","css","html","bash","sh","yaml","yml"]}),Z}var Z,ft=v(()=>{"use strict";u();Z=null});import{visit as we}from"unist-util-visit";function qt(o){return async r=>{let i=o?.theme?.codeTheme??{light:"github-light",dark:"github-dark"},d=await Q(i);we(r,["mdxJsxFlowElement","mdxJsxTextElement"],e=>{if(e.name!=="ComponentPreview")return;let l=e.attributes?.find(s=>s.name==="code"),c="";if(l){if(typeof l.value=="string")c=l.value;else if(l.value?.type==="mdxJsxAttributeValueExpression"){let s=l.value.value??"";c=s.match(/^[`'"](.+)[`'"]$/)?.[1]??s}}if(!c)return;let m=typeof i=="object"?{themes:{light:i.light,dark:i.dark},lang:"tsx"}:{theme:i,lang:"tsx"},t=d.codeToHtml(c,m);e.attributes=(e.attributes??[]).filter(s=>s.name!=="highlightedHtml"),e.attributes.push({type:"mdxJsxAttribute",name:"highlightedHtml",value:t})})}}var Jt=v(()=>{"use strict";u();ft()});import{visit as Ce}from"unist-util-visit";function Xt(o){return async r=>{let i=o?.theme?.codeTheme||{light:"github-light",dark:"github-dark"},d=await Q(i);Ce(r,"element",e=>{if(e.tagName==="pre"&&e.children?.[0]?.tagName==="code"){let l=e.children[0],m=(l.properties?.className||[]).find(h=>h.startsWith("language-")),t=m?m.slice(9):"text",s=l.children[0]?.value||"",a={lang:t};typeof i=="object"?a.themes={light:i.light,dark:i.dark}:a.theme=i;let p=d.codeToHtml(s,a);e.properties.dataHighlighted="true",e.properties.highlightedHtml=p,e.children=[]}})}}var Kt=v(()=>{"use strict";u();ft()});import $e from"@mdx-js/rollup";import ke from"remark-gfm";import Be from"remark-frontmatter";import Re from"rehype-slug";import Se from"crypto";function Qt(o,r=$e){let i=o?.plugins?.flatMap(l=>l.remarkPlugins||[])||[],d=o?.plugins?.flatMap(l=>l.rehypePlugins||[])||[],e=r({remarkPlugins:[ke,Be,[qt,o],...i],rehypePlugins:[Re,[Xt,o],...d],jsxRuntime:"automatic",providerImportSource:"@mdx-js/react"});return{...e,name:"vite-plugin-boltdocs-mdx",async buildStart(){Y=0,z=0,Zt||(H.load(),Zt=!0),e.buildStart&&await e.buildStart.call(this)},async transform(l,c,m){if(!c.endsWith(".md")&&!c.endsWith(".mdx"))return e.transform?.call(this,l,c,m);console.log(`[boltdocs] Transforming MDX: ${c}`),z++;let t=Se.createHash("md5").update(l).digest("hex"),s=`${c}:${t}:${Vt}`,a=H.get(s);if(a)return Y++,{code:a,map:null};let p=await e.transform.call(this,l,c,m);return p&&typeof p=="object"&&p.code&&H.set(s,p.code),p},async buildEnd(){z>0&&console.log(`[boltdocs] MDX Cache Performance: ${Y}/${z} hits (${Math.round(Y/z*100)||0}%)`),H.save(),await H.flush(),e.buildEnd&&await e.buildEnd.call(this)}}}var Zt,Y,z,Yt=v(()=>{"use strict";u();Wt();Jt();Kt();Zt=!1,Y=0,z=0});import Me from"@vitejs/plugin-react";import De from"@tailwindcss/vite";async function te(o){let r=o?.docsDir||"docs",i=await j(r),d={...o,homePage:o?.homePage||i.homePage};return[...Ut(d,i),Qt(i)]}async function yi(o,r="development"){let i=await j("docs",o);return{root:o,mode:r,plugins:[Me(),De(),await te({docsDir:i.docsDir,homePage:i.homePage})],...i.vite}}var Te=v(()=>{u();zt();Yt();X();gt();X()});export{ue as a,j as b,pt as c,Et as d,Gt as e,te as f,yi as g,Te as h};
|
package/dist/chunk-6QXCKZAT.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as oe,b as ne,c as ae,d as ie,e as se,f as le,g as me,h as ce,i as pe}from"./chunk-RSII2UPE.mjs";import{b as J}from"./chunk-JD3RSDE4.mjs";import{J as Y,L as Q,M as X,U as y,_ as v,a as W,b as O,e as k,ea as $,f as K,ja as w,ka as j,la as z,ma as A,na as ee,qa as te,sa as re,ta as H,wa as f,y as u}from"./chunk-ZRJ55GGF.mjs";import{b as F,f as B,g as Z}from"./chunk-NBCYHLAA.mjs";import{ArrowLeft as Ie}from"lucide-react";import{jsx as S,jsxs as ue}from"react/jsx-runtime";function yt(){return S("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:ue("div",{className:"space-y-4",children:[S("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),S("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),S("p",{className:"text-sm text-text-muted max-w-sm mx-auto",children:"The page you're looking for doesn't exist or has been moved."}),ue(O,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[S(Ie,{size:16})," Go to Home"]})]})})}import{useEffect as Me,useState as Ee}from"react";import{jsx as x,jsxs as D}from"react/jsx-runtime";function wt(){let[e,r]=Ee(0);Me(()=>{let t=0,a=!0,l=setInterval(()=>{a?(t+=1,t>=100&&(t=100,a=!1)):(t-=1,t<=0&&(t=0,a=!0)),r(t)},20);return()=>clearInterval(l)},[]);let o=`inset(${100-e}% 0 0 0)`;return x("div",{className:"flex flex-col items-center justify-center min-h-[60vh] p-4 text-center",children:x("div",{className:"relative group",children:D("div",{className:"relative inline-block",children:[D("svg",{className:"w-24 h-auto opacity-10 filter grayscale brightness-50",viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[x("title",{children:"Loading indicator background"}),x("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),x("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]}),D("svg",{className:"absolute top-0 left-0 w-24 h-auto text-primary-500 drop-shadow-[0_0_20px_rgba(var(--primary-rgb),0.5)] transition-[clip-path] duration-100 ease-linear",style:{clipPath:o},viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[x("title",{children:"Loading indicator animated fill"}),x("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),x("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]})]})})})}import{useEffect as Be,useState as Oe}from"react";import{Sun as de,Moon as ge,Monitor as fe}from"lucide-react";import{Button as He}from"react-aria-components";import{jsx as h,jsxs as R}from"react/jsx-runtime";function he(){let{theme:e,setTheme:r}=J(),[o,t]=Oe(!1);return Be(()=>{t(!0)},[]),o?R(te,{placement:"bottom right",children:[h(He,{className:"flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main outline-none focus-visible:ring-2 focus-visible:ring-primary-500","aria-label":"Selection theme",children:h(e==="system"?fe:e==="dark"?ge:de,{size:20,className:"animate-in fade-in zoom-in duration-300"})}),R(re,{selectionMode:"single",selectedKeys:[e],onSelectionChange:l=>{let n=Array.from(l)[0];r(n)},children:[R(H,{id:"light",children:[h(de,{size:16}),h("span",{children:"Light"})]}),R(H,{id:"dark",children:[h(ge,{size:16}),h("span",{children:"Dark"})]}),R(H,{id:"system",children:[h(fe,{size:16}),h("span",{children:"System"})]})]})]}):h("div",{className:"h-9 w-9"})}import{useEffect as Ae,useState as De}from"react";var $e="https://api.github.com";async function be(e,r,o=$e){let t=new Headers;r&&t.append("authorization",r);let l=await(await fetch(`${o}/repos/${e}`,{headers:t})).json();return l.stargazers_count!==void 0?ze(l.stargazers_count):"0"}var ze=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);import{jsx as ve,jsxs as Ve}from"react/jsx-runtime";function xe({repo:e}){let[r,o]=De(null);return Ae(()=>{e&&be(e).then(t=>o(t)).catch(()=>o("0"))},[e]),Ve("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-muted transition-all hover:bg-bg-main hover:border-border-strong hover:text-text-main",children:[ve(K,{className:"h-4 w-4"}),r&&ve("span",{className:"tabular-nums",children:r})]})}import*as _e from"lucide-react";import{jsx as T,jsxs as Ne}from"react/jsx-runtime";function ye({tabs:e,routes:r}){let{currentLocale:o}=B(),{indicatorStyle:t,tabRefs:a,activeIndex:l}=se(e,r),n=s=>{if(!s)return null;if(s.trim().startsWith("<svg"))return T("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:s}});let m=_e[s];return m?T(m,{size:16}):T("img",{src:s,alt:"",className:"h-4 w-4 object-contain"})};return T("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:Ne($.TabsList,{className:"border-none py-0",children:[e.map((s,m)=>{let g=m===l,c=r.find(p=>p.tab&&p.tab.toLowerCase()===s.id.toLowerCase()),b=c?c.path:"#";return Ne(O,{href:b,ref:p=>{a.current[m]=p},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${g?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[n(s.icon),T("span",{children:oe(s.text,o)})]},s.id)}),T($.TabsIndicator,{style:t})]})})}import{Suspense as Ge,lazy as qe}from"react";import{useLocation as Ue}from"react-router-dom";import{ChevronDown as Pe,Languages as Fe}from"lucide-react";import{jsx as i,jsxs as N}from"react/jsx-runtime";var Ze=qe(()=>import("./search-dialog-MA5AISC7.mjs").then(e=>({default:e.SearchDialog})));function lr(){let{links:e,title:r,logo:o,logoProps:t,github:a,social:l,config:n}=ne(),{routes:s,allRoutes:m,currentVersion:g,currentLocale:c}=B(),{pathname:b}=Ue(),p=n.theme||{},q=p?.tabs&&p.tabs.length>0;return N(u.NavbarRoot,{className:q?"border-b-0":"",children:[N(u.Content,{children:[N(u.NavbarLeft,{children:[i(u.NavbarLogo,{src:o??"",alt:t?.alt||r,width:t?.width??24,height:t?.height??24}),i(u.Title,{children:r}),n.versions&&g&&i(Je,{}),i(u.Links,{children:e.map(E=>i(We,{link:E},E.href))})]}),i(u.NavbarCenter,{children:i(Ge,{fallback:i("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:i(Ze,{routes:s||[]})})}),N(u.NavbarRight,{children:[n.i18n&&c&&i(Ke,{}),i(u.Split,{}),i(he,{}),a&&i(xe,{repo:p?.githubRepo??""}),l.length>0&&i(u.Split,{}),i("div",{className:"flex items-center gap-1",children:l.map(({icon:E,link:U})=>i(u.Socials,{icon:E,link:U,className:"p-1.5"},U))})]})]}),b!=="/"&&q&&p?.tabs&&i("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:i(ye,{tabs:p.tabs,routes:m||s||[]})})]})}function We({link:e}){let r=Z(e.href);return i(u.Link,{...e,href:r})}function Je(){let{currentVersionLabel:e,availableVersions:r,handleVersionChange:o}=ae();return r.length===0?null:N(f.Trigger,{children:[i(k,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:i(Pe,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5",children:i("span",{className:"font-semibold text-[0.8125rem]",children:e})}),i(f.Root,{children:i(f.Section,{items:r,children:t=>i(f.Item,{onPress:()=>o(t.value),children:t.label},`${t.value??""}`)})})]})}function Ke(){let{currentLocale:e,availableLocales:r,handleLocaleChange:o}=ie();return r.length===0?null:N(f.Trigger,{children:[i(k,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:i(Pe,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5 px-2.5",children:N("div",{className:"flex items-center gap-1.5",children:[i(Fe,{className:"w-3.5 h-3.5 text-primary-500"}),i("span",{className:"font-bold text-[0.75rem] tracking-wider uppercase opacity-90",children:e||"en"})]})}),i(f.Root,{children:i(f.Section,{items:r,children:t=>i(f.Item,{onPress:()=>o(t.value),children:N("div",{className:"flex items-center justify-between w-full gap-4",children:[i("span",{children:t.label}),i("span",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",children:t.value})]})},`${t.value??""}`)})})]})}import{Zap as Ye}from"lucide-react";import{jsx as V,jsxs as Ce}from"react/jsx-runtime";function Le(){return V("div",{className:"flex items-center justify-center mt-10 mb-4 px-4 w-full",children:Ce("a",{href:"https://github.com/jesusalcaladev/boltdocs",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center gap-2 px-4 py-2 rounded-full border border-border-subtle bg-bg-surface/50 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:bg-bg-surface hover:shadow-xl hover:shadow-primary-500/5 select-none",children:[V(Ye,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300",fill:"currentColor"}),Ce("span",{className:"text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide",children:["Powered by ",V("strong",{className:"font-bold text-text-main/80 group-hover:text-text-main",children:"Boltdocs"})]})]})})}import{useState as Qe,useEffect as Xe,useMemo as je}from"react";import*as et from"lucide-react";import{jsx as P,jsxs as rt}from"react/jsx-runtime";function we(e){return e&&et[e]||void 0}function tt({group:e,activePath:r,getIcon:o}){let t=je(()=>e.routes.some(n=>n.path===r),[e.routes,r]),[a,l]=Qe(!0);return Xe(()=>{t&&l(!0)},[t]),P(w.SidebarGroup,{title:e.title,isOpen:a,onToggle:()=>l(!a),children:e.routes.map(n=>{let s=r===(n.path.endsWith("/")?n.path.slice(0,-1):n.path);return P(w.SidebarLink,{label:n.title,href:n.path,active:s,icon:o(n.icon),badge:n.badge},n.path)})})}function vr({routes:e,config:r}){let{groups:o,ungrouped:t,activePath:a}=le(e),l=r.theme||{};return rt(w.SidebarRoot,{children:[t.length>0&&P(w.SidebarGroup,{className:"mb-6",children:t.map(n=>{let s=a===(n.path.endsWith("/")?n.path.slice(0,-1):n.path);return P(w.SidebarLink,{label:n.title,href:n.path,active:s,icon:we(n.icon),badge:n.badge},n.path)})}),o.map(n=>P(tt,{group:n,activePath:a,getIcon:we},n.slug)),l?.poweredBy&&P("div",{className:"mt-auto pt-8",children:P(Le,{})})]})}import ot,{useRef as Te,useEffect as nt,useState as at,useCallback as it}from"react";import{Pencil as st,CircleHelp as lt,TextAlignStart as mt}from"lucide-react";import{jsx as d,jsxs as C}from"react/jsx-runtime";function wr({headings:e=[],editLink:r,communityHelp:o,filePath:t}){let{headings:a}=me(e),l=ot.useMemo(()=>a.map(n=>({title:n.text,url:`#${n.id}`,depth:n.level})),[a]);return a.length===0?null:d(X,{toc:l,children:d(ct,{headings:a,editLink:r,communityHelp:o,filePath:t})})}function ct({headings:e,editLink:r,communityHelp:o,filePath:t}){let a=Y(),[l,n]=at({opacity:0}),s=Te(null),m=Te(null);nt(()=>{if(!a||!s.current)return;let c=s.current.querySelector(`a[href="#${a}"]`);c&&n({transform:`translateY(${c.offsetTop}px)`,height:`${c.offsetHeight}px`,opacity:1})},[a]);let g=it((c,b)=>{c.preventDefault();let p=document.getElementById(b);p&&(p.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${b}`))},[]);return C(y.OnThisPageRoot,{children:[C(y.OnThisPageHeader,{className:"flex flex-row gap-x-2",children:[d(mt,{size:16}),"On this page"]}),d(Q,{containerRef:m,children:C(y.OnThisPageContent,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:m,children:[d(y.OnThisPageIndicator,{style:l}),d("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:s,children:e.map(c=>d(y.OnThisPageItem,{level:c.level,children:d(y.OnThisPageLink,{href:`#${c.id}`,active:a===c.id,onClick:b=>g(b,c.id),className:"pl-4",children:c.text})},c.id))})]})}),(r||o)&&C("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[d("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),C("ul",{className:"space-y-3",children:[r&&t&&d("li",{children:C("a",{href:r.replace(":path",t),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[d(st,{size:16}),"Edit this page"]})}),o&&d("li",{children:C("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[d(lt,{size:16}),"Community help"]})})]})]})]})}import{useEffect as pt}from"react";import{useLocation as ut}from"react-router-dom";function Ir({siteTitle:e,siteDescription:r,routes:o}){let t=ut();return pt(()=>{let a=o.find(g=>g.path===t.pathname),l=a?.title,n=a?.description||r||"";document.title=l?`${l} | ${e}`:e;let s=document.querySelector('meta[name="description"]');s||(s=document.createElement("meta"),s.name="description",document.head.appendChild(s)),s.content=n,L("property","og:title",document.title),L("property","og:description",n),L("property","og:type","article"),L("property","og:url",window.location.href),L("name","twitter:card","summary"),L("name","twitter:title",document.title),L("name","twitter:description",n);let m=document.querySelector('link[rel="canonical"]');m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m)),m.href=window.location.origin+t.pathname},[t.pathname,e,r,o]),null}function L(e,r,o){let t=document.querySelector(`meta[${e}="${r}"]`);t||(t=document.createElement("meta"),t.setAttribute(e,r),document.head.appendChild(t)),t.content=o}import{Home as dt}from"lucide-react";import{jsx as I,jsxs as ke}from"react/jsx-runtime";function zr(){let{crumbs:e,activeRoute:r}=ce(),t=F().theme||{};return e.length===0||!t?.breadcrumbs?null:ke(j,{children:[I(z,{children:I(A,{href:"/",children:I(dt,{size:14})})}),e.map((a,l)=>ke(z,{children:[I(ee,{}),I(A,{href:a.href,className:W({"font-medium text-text-main":a.href===r?.path}),children:a.label})]},`crumb-${a.href}-${a.label}-${l}`))]})}import{jsx as M,jsxs as _}from"react/jsx-runtime";function Gr(){let{prevPage:e,nextPage:r}=pe();return!e&&!r?null:_(v.PageNavRoot,{children:[e?_(v.PageNavLink,{to:e.path,direction:"prev",children:[M(v.PageNavLink.Title,{children:"Previous"}),M(v.PageNavLink.Description,{children:e.title})]}):M("div",{}),r&&_(v.PageNavLink,{to:r.path,direction:"next",children:[M(v.PageNavLink.Title,{children:"Next"}),M(v.PageNavLink.Description,{children:r.title})]})]})}import{useEffect as gt,useState as ft}from"react";import{ProgressBar as ht}from"react-aria-components";import{jsx as Se}from"react/jsx-runtime";function Wr(){let[e,r]=ft(0);return gt(()=>{let o=null,t,a=()=>{if(!o)return;let{scrollTop:n,scrollHeight:s,clientHeight:m}=o;if(s<=m){r(0);return}let g=n/(s-m)*100;r(Math.min(100,Math.max(0,g)))},l=()=>(o=document.querySelector(".boltdocs-content"),o?(o.addEventListener("scroll",a),a(),t&&clearInterval(t),!0):!1);return l()||(t=setInterval(l,100)),()=>{o&&o.removeEventListener("scroll",a),t&&clearInterval(t)}},[]),Se(ht,{value:e,"aria-label":"Reading progress",className:"fixed top-0 left-0 right-0 z-999 h-0.5 bg-transparent w-full pointer-events-none",children:({percentage:o})=>Se("div",{className:"h-full bg-primary-500 transition-[width] duration-300 ease-out shadow-[0_0_8px_rgba(var(--primary-rgb),0.4)]",style:{width:`${o}%`}})})}import{Component as bt}from"react";import{jsx as G,jsxs as vt}from"react/jsx-runtime";var Re=class extends bt{state={hasError:!1};static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,o){console.error("Uncaught error in Boltdocs Layout:",r,o)}render(){return this.state.hasError?this.props.fallback||vt("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[G("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),G("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),G(k,{className:"rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer",onPress:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}};export{yt as a,wt as b,he as c,xe as d,ye as e,lr as f,Le as g,vr as h,wr as i,Ir as j,zr as k,Gr as l,Wr as m,Re as n};
|
package/dist/chunk-H4M6P3DM.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as f}from"./chunk-JXHNX2WN.mjs";import{A as u,B as m,C as S,D as d,E as p,F as y,G as D,y as g,z as h}from"./chunk-ZRJ55GGF.mjs";import{useEffect as K,useCallback as M}from"react";import{useNavigate as R}from"react-router-dom";import{Fragment as T,jsx as o,jsxs as n}from"react/jsx-runtime";function A({routes:v}){let{isOpen:I,setIsOpen:a,query:w,setQuery:k,list:E}=f(v),r=R();K(()=>{let e=t=>{(/Mac/.test(navigator.userAgent)?t.metaKey:t.ctrlKey)&&(t.key==="k"||t.key==="j")&&(t.preventDefault(),a(i=>!i))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a]);let l=M(e=>{let t=String(e);if(a(!1),t.includes("#")){let[s,c]=t.split("#");r(s),setTimeout(()=>{let i=document.getElementById(c);i&&i.scrollIntoView({behavior:"smooth"})},100)}else r(t)},[r,a]);return n(T,{children:[o(g.SearchTrigger,{onPress:()=>a(!0)}),o(h,{isOpen:I,onOpenChange:a,children:n(u,{onSelectionChange:l,children:[o(m,{value:w,onChange:e=>k(e.target.value)}),o(S,{items:E,children:e=>n(d,{onPress:()=>l(e.id),textValue:e.title,children:[o(p,{isHeading:e.isHeading}),n("div",{className:"flex flex-col justify-center gap-0.5",children:[o(y,{children:e.title}),o(D,{children:e.groupTitle})]})]},e.id)})]})})]})}export{A as a};
|
package/dist/chunk-JXHNX2WN.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as c}from"./chunk-NBCYHLAA.mjs";import{useState as h,useMemo as C}from"react";function b(a){let{currentLocale:o,currentVersion:s}=c(),[d,g]=h(!1),[i,u]=h(""),f=C(()=>{let n=a.filter(t=>{let e=!o||t.locale===o,m=!s||t.version===s;return e&&m});if(!i)return n.slice(0,10).map(t=>({id:t.path,title:t.title,path:t.path,bio:t.description||"",groupTitle:t.groupTitle}));let r=[],l=i.toLowerCase();for(let t of n)if(t.title?.toLowerCase().includes(l)&&r.push({id:t.path,title:t.title,path:t.path,bio:t.description||"",groupTitle:t.groupTitle}),t.headings)for(let e of t.headings)e.text.toLowerCase().includes(l)&&r.push({id:`${t.path}#${e.id}`,title:e.text,path:`${t.path}#${e.id}`,bio:`Heading in ${t.title}`,groupTitle:t.title,isHeading:!0});let p=new Set;return r.filter(t=>p.has(t.path)?!1:(p.add(t.path),!0)).slice(0,10)},[a,i,o,s]);return{isOpen:d,setIsOpen:g,query:i,setQuery:u,list:f,input:{value:i,onChange:n=>u(n.target.value)}}}export{b as a};
|
package/dist/chunk-Q3MLYTIQ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var y=(s,t)=>()=>(s&&(t=s(s=0)),t);var K=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports);import U from"path";import{fileURLToPath as J}from"url";var u=y(()=>{"use strict"});import P from"fs";import F from"gray-matter";import O from"isomorphic-dompurify";function Y(s){return s.replace(/\\/g,"/")}function L(s){return s.replace(/^\d+\./,"")}function Z(s){let t=s.match(/^(\d+)\./);return t?parseInt(t[1],10):void 0}function tt(s){return/\.mdx?$/.test(s)}function m(s){try{return P.statSync(s).mtimeMs}catch{return 0}}function et(s){let t=P.readFileSync(s,"utf-8");try{let{data:e,content:r}=F(t);return{data:e,content:r}}catch{return{data:{},content:t}}}function M(s){return s.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function st(s){return M(s)}function rt(s){let e=s.split("/").map(L).join("/").replace(/\/$/,"");return e=e.replace(/\.mdx?$/,""),(e==="index"||e.endsWith("/index"))&&(e=e.replace(/index$/,"")),e.startsWith("/")||(e="/"+e),e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e}function it(s){return O.sanitize(s)}function nt(s){return O.sanitize(s,{ALLOWED_TAGS:[],KEEP_CONTENT:!0})}function at(s){return s.charAt(0).toUpperCase()+s.slice(1)}function ct(s,t){return s?typeof s=="string"?s:t&&s[t]?s[t]:Object.values(s)[0]||"":""}var _=y(()=>{"use strict";u()});import a from"fs";import o from"path";import g from"crypto";import d from"zlib";import{promisify as l}from"util";async function yt(){await h.flush()}var p,A,f,S,ft,C,B,N,R,j,x,v,h,b,z,$,I=y(()=>{u();_();p=l(a.writeFile),A=l(a.readFile),f=l(a.mkdir),S=l(a.rename),ft=l(a.unlink),C=process.env.BOLTDOCS_CACHE_DIR||".boltdocs",B="assets",N="shards",R=parseInt(process.env.BOLTDOCS_CACHE_LRU_LIMIT||"2000",10),j=process.env.BOLTDOCS_CACHE_COMPRESS!=="0",x=class{constructor(t){this.limit=t}cache=new Map;get(t){let e=this.cache.get(t);return e!==void 0&&(this.cache.delete(t),this.cache.set(t,e)),e}set(t,e){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.limit){let r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(t,e)}get size(){return this.cache.size}clear(){this.cache.clear()}},v=class{queue=Promise.resolve();pendingCount=0;add(t){this.pendingCount++,this.queue=this.queue.then(t).finally(()=>{this.pendingCount--})}async flush(){await this.queue}get pending(){return this.pendingCount}},h=new v,b=class{entries=new Map;cachePath=null;compress;constructor(t={}){if(this.compress=t.compress!==void 0?t.compress:j,t.name){let e=t.root||process.cwd(),r=this.compress?"json.gz":"json";this.cachePath=o.resolve(e,C,`${t.name}.${r}`)}}load(){if(process.env.BOLTDOCS_NO_CACHE!=="1"&&!(!this.cachePath||!a.existsSync(this.cachePath)))try{let t=a.readFileSync(this.cachePath);this.cachePath.endsWith(".gz")&&(t=d.gunzipSync(t));let e=JSON.parse(t.toString("utf-8"));this.entries=new Map(Object.entries(e))}catch{}}save(){if(process.env.BOLTDOCS_NO_CACHE==="1"||!this.cachePath)return;let t=Object.fromEntries(this.entries),e=JSON.stringify(t),r=this.cachePath,n=this.compress;h.add(async()=>{try{await f(o.dirname(r),{recursive:!0});let i=Buffer.from(e);n&&(i=d.gzipSync(i));let c=`${r}.${g.randomBytes(4).toString("hex")}.tmp`;await p(c,i),await S(c,r)}catch{}})}get(t){let e=this.entries.get(t);return!e||m(t)!==e.mtime?null:e.data}set(t,e){this.entries.set(t,{data:e,mtime:m(t)})}isValid(t){let e=this.entries.get(t);return e?m(t)===e.mtime:!1}invalidate(t){this.entries.delete(t)}invalidateAll(){this.entries.clear()}pruneStale(t){for(let e of this.entries.keys())t.has(e)||this.entries.delete(e)}get size(){return this.entries.size}async flush(){await h.flush()}},z=class{index=new Map;memoryCache=new x(R);baseDir;shardsDir;indexPath;constructor(t,e=process.cwd()){this.baseDir=o.resolve(e,C,`transform-${t}`),this.shardsDir=o.resolve(this.baseDir,N),this.indexPath=o.resolve(this.baseDir,"index.json")}load(){if(process.env.BOLTDOCS_NO_CACHE!=="1"&&a.existsSync(this.indexPath))try{let t=a.readFileSync(this.indexPath,"utf-8");this.index=new Map(Object.entries(JSON.parse(t)))}catch{}}save(){if(process.env.BOLTDOCS_NO_CACHE==="1")return;let t=JSON.stringify(Object.fromEntries(this.index)),e=this.indexPath;h.add(async()=>{await f(o.dirname(e),{recursive:!0}),await p(e,t)})}async getMany(t){let e=new Map,r=[];for(let n of t){let i=this.memoryCache.get(n);i?e.set(n,i):this.index.has(n)&&r.push(n)}if(r.length>0){let n=await Promise.all(r.map(async i=>{let c=this.index.get(i),T=o.resolve(this.shardsDir,`${c}.gz`);try{let w=await A(T),D=d.gunzipSync(w).toString("utf-8");return this.memoryCache.set(i,D),{key:i,val:D}}catch{return null}}));for(let i of n)i&&e.set(i.key,i.val)}return e}get(t){let e=this.memoryCache.get(t);if(e)return e;let r=this.index.get(t);if(!r)return null;let n=o.resolve(this.shardsDir,`${r}.gz`);if(!a.existsSync(n))return null;try{let i=a.readFileSync(n),c=d.gunzipSync(i).toString("utf-8");return this.memoryCache.set(t,c),c}catch{return null}}set(t,e){let r=g.createHash("md5").update(e).digest("hex");this.index.set(t,r),this.memoryCache.set(t,e);let n=o.resolve(this.shardsDir,`${r}.gz`);h.add(async()=>{if(a.existsSync(n))return;await f(this.shardsDir,{recursive:!0});let i=d.gzipSync(Buffer.from(e)),c=`${n}.${g.randomBytes(4).toString("hex")}.tmp`;await p(c,i),await S(c,n)})}get size(){return this.index.size}async flush(){await h.flush()}},$=class{assetsDir;constructor(t=process.cwd()){this.assetsDir=o.resolve(t,C,B)}getFileHash(t){return g.createHash("md5").update(a.readFileSync(t)).digest("hex")}get(t,e){if(!a.existsSync(t))return null;let r=this.getFileHash(t),n=this.getCachedPath(t,`${e}-${r}`);return a.existsSync(n)?n:null}set(t,e,r){let n=this.getFileHash(t),i=this.getCachedPath(t,`${e}-${n}`);h.add(async()=>{await f(this.assetsDir,{recursive:!0});let c=`${i}.${g.randomBytes(4).toString("hex")}.tmp`;await p(c,r),await S(c,i)})}getCachedPath(t,e){let r=o.extname(t),n=o.basename(t,r),i=e.replace(/[^a-z0-9]/gi,"-").toLowerCase();return o.join(this.assetsDir,`${n}.${i}${r}`)}clear(){a.existsSync(this.assetsDir)&&a.rmSync(this.assetsDir,{recursive:!0,force:!0})}async flush(){await h.flush()}}});export{y as a,K as b,u as c,Y as d,L as e,Z as f,tt as g,et as h,M as i,st as j,rt as k,it as l,nt as m,at as n,ct as o,_ as p,b as q,z as r,$ as s,yt as t,I as u};
|
package/dist/chunk-RSII2UPE.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as y}from"./chunk-JD3RSDE4.mjs";import{b as x,e as R,f as b}from"./chunk-NBCYHLAA.mjs";import{useLocation as P}from"react-router-dom";function C(e,o){return e?typeof e=="string"?e:o&&e[o]?e[o]:Object.values(e)[0]||"":""}function U(){let e=x(),{theme:o}=y(),i=P(),{currentLocale:t}=b(),c=e.theme||{},s=C(c.title,t)||"Boltdocs",f=c.navbar||[],d=c.socialLinks||[],h=c.githubRepo,p=f.map(g=>{let l=g.href||g.to||g.link||"";return{label:C(g.label||g.text,t),href:l,active:i.pathname===l,to:l.startsWith("http")||l.startsWith("//")?"external":void 0,items:g.items?.map(u=>({label:C(u.label||u.text,t),href:u.href||u.link||u.to||""}))}}),r=c.logo,n=r?typeof r=="string"?r:o==="dark"?r.dark:r.light:null,a={alt:(r&&typeof r=="object"?r.alt:void 0)||s,width:r&&typeof r=="object"?r.width:void 0,height:r&&typeof r=="object"?r.height:void 0},m=h?`https://github.com/${h}`:null;return{links:p,title:s,logo:n,logoProps:a,github:m,social:d,config:e,theme:o}}import{useNavigate as V}from"react-router-dom";function v(e,o,i){let t=e;return o&&(t===o||t.startsWith(o+"/"))&&(t=t===o?"index.md":t.slice(o.length+1)),i&&(t===i||t.startsWith(i+"/"))&&(t=t===i?"index.md":t.slice(i.length+1)),t}function D(){let e=V(),o=b(),{allRoutes:i,currentRoute:t,currentVersion:c,currentLocale:s,config:f}=o,d=f.versions,h=R(n=>n.setVersion),p=n=>{if(!d||n===c)return;h(n);let a=`/docs/${n}`;if(t){let m=v(t.filePath,t.version,t.locale),g=i.find(l=>v(l.filePath,l.version,l.locale)===m&&(l.version||d.defaultVersion)===n&&(s?l.locale===s:!l.locale));if(g)a=g.path;else{let l=i.find(u=>v(u.filePath,u.version,u.locale)==="index.md"&&(u.version||d.defaultVersion)===n&&(s?u.locale===s:!u.locale));a=l?l.path:`/docs/${n}${s?`/${s}`:""}`}}e(a)},r=o.availableVersions.map(n=>({...n,label:n.label,value:n.key}));return{currentVersion:c,currentVersionLabel:o.currentVersionLabel,availableVersions:r,handleVersionChange:p}}import{useNavigate as I}from"react-router-dom";function Z(){let e=I(),o=b(),{allRoutes:i,currentRoute:t,currentLocale:c,config:s}=o,f=s.i18n,d=R(a=>a.setLocale),h=a=>{if(!f||a===c)return;d(a);let m="/";if(t){let g=v(t.filePath,t.version,t.locale),l=i.find(u=>v(u.filePath,u.version,u.locale)===g&&(u.locale||f.defaultLocale)===a&&u.version===t.version);if(l)m=l.path;else{let u=i.find(L=>v(L.filePath,L.version,L.locale)==="index.md"&&(L.locale||f.defaultLocale)===a&&L.version===t.version);m=u?u.path:a===f.defaultLocale?t.version?`/${t.version}`:"/":t.version?`/${t.version}/${a}`:`/${a}`}}else{let g=i.find(l=>(l.filePath==="index.mdx"||l.filePath==="index.md")&&(l.locale||f.defaultLocale)===a&&!l.version);g?m=g.path:m=a===f.defaultLocale?"/":`/${a}`}e(m)},r=s.i18n?.localeConfigs?.[c]?.label||s.i18n?.locales[c]||c,n=s.i18n?Object.entries(s.i18n.locales).map(([a,m])=>{let g=s.i18n?.localeConfigs?.[a];return{key:a,label:g?.label||m,value:a,isCurrent:a===c}}):[];return{currentLocale:c,currentLocaleLabel:r,availableLocales:n,handleLocaleChange:h}}import{useLocation as T}from"react-router-dom";import{useEffect as w,useState as $,useRef as k}from"react";function nt(e=[],o=[]){let i=T(),t=k([]),[c,s]=$({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),d=o.find(r=>r.path===i.pathname)?.tab?.toLowerCase(),h=e.findIndex(r=>r.id.toLowerCase()===d),p=h===-1?0:h;return w(()=>{let r=t.current[p];r&&s({opacity:1,width:r.offsetWidth,transform:`translateX(${r.offsetLeft}px)`})},[p,e.length,i.pathname]),{tabs:e,activeIndex:p,indicatorStyle:c,tabRefs:t,activeTabId:d}}import{useLocation as S}from"react-router-dom";function st(e){let o=x(),i=S(),t=n=>n.endsWith("/")&&n.length>1?n.slice(0,-1):n,c=t(i.pathname),s=e.find(n=>t(n.path)===c),f=s?.tab?.toLowerCase(),d=f?e.filter(n=>!n.tab||n.tab.toLowerCase()===f):e,h=[],p=new Map;for(let n of d)n.group?(p.has(n.group)||p.set(n.group,{slug:n.group,title:n.groupTitle||n.group,routes:[],icon:n.groupIcon}),p.get(n.group).routes.push(n)):h.push(n);return{groups:Array.from(p.values()),ungrouped:h,activeRoute:s,activePath:c,config:o}}import{useState as B}from"react";function lt(e=[]){let[o,i]=B(null);return{headings:e,activeId:o,setActiveId:i}}function gt(){let{currentRoute:e}=b(),o=[];return e&&(e.groupTitle&&o.push({label:e.groupTitle}),o.push({label:e.title,href:e.path})),{crumbs:o,activeRoute:e}}function ht(){let{routes:e}=b(),o=window.location.pathname,i=e.findIndex(f=>f.path===o),t=e[i],c=i>0?e[i-1]:null,s=i<e.length-1?e[i+1]:null;return{prevPage:c,nextPage:s,currentRoute:t}}export{C as a,U as b,D as c,Z as d,nt as e,st as f,lt as g,gt as h,ht as i};
|
package/dist/chunk-ZRJ55GGF.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as $,g as H}from"./chunk-NBCYHLAA.mjs";import{useState as Ce,useEffect as ye}from"react";import{Button as Ne}from"react-aria-components";import{Search as Re,Sun as we,Moon as Pe,ExternalLink as Te,ChevronDown as Ae}from"lucide-react";import{jsx as b,jsxs as k}from"react/jsx-runtime";function A(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var ee=e=>k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...A(e),children:[b("title",{children:"GitHub"}),b("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"})]}),te=e=>k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...A(e),children:[b("title",{children:"Discord"}),b("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"})]}),oe=e=>k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...A(e),children:[b("title",{children:"X"}),b("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"})]}),oo=e=>k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...A(e),children:[b("title",{children:"CodeSandbox"}),b("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]}),re=e=>k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...A(e),children:[b("title",{children:"Bluesky"}),b("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"})]});import{jsx as a,jsxs as R}from"react/jsx-runtime";var ke=({children:e,className:t,...o})=>a("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}),Ie=({children:e,className:t})=>a("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}),Be=({children:e,className:t})=>a("div",{className:n("flex items-center gap-4",t),children:e}),Le=({children:e,className:t})=>a("div",{className:n("flex items-center gap-2 md:gap-4",t),children:e}),Se=({children:e,className:t})=>a("div",{className:n("hidden lg:flex flex-1 justify-center items-center gap-4 px-4",t),children:e}),Me=({src:e,alt:t,width:o=24,height:r=24,className:s})=>a(y,{href:"/",className:n("flex items-center gap-2 shrink-0 outline-none",s),children:e?a("img",{src:e,alt:t,width:o,height:r,className:"h-6 w-6 object-contain"}):null}),Oe=({children:e,className:t})=>a("span",{className:n("text-lg font-bold tracking-tight hidden sm:inline-block",t),children:e}),Ee=({children:e,className:t})=>a("nav",{className:n("hidden md:flex items-center gap-6 text-sm font-medium",t),children:e}),ze=({label:e,href:t,active:o,to:r,className:s})=>R(y,{href:t,target:r==="external"?"_blank":void 0,className:n("transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm",{"text-primary-500 font-bold":o,"text-text-muted hover:text-text-main font-medium":!o},s),children:[e,r==="external"&&a("span",{className:"ml-1 inline-block",children:a(Te,{size:12})})]}),De=({className:e,onPress:t})=>{let[o,r]=Ce(!1),s=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return ye(()=>{r(!0)},[]),R(Ne,{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-colors hover:border-border-strong hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30","w-full max-w-[320px] justify-between",e),children:[R("div",{className:"flex items-center gap-2",children:[a(Re,{size:16}),a("span",{className:"hidden sm:inline-block",children:"Search docs..."})]}),R("div",{className:"hidden sm:flex items-center gap-1 pointer-events-none select-none",children:[a("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"}),a("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"})]})]})},He=({className:e,theme:t,onThemeChange:o})=>a(ie,{isSelected:t==="dark",onChange:o,className:n("rounded-md p-2 text-text-muted outline-none cursor-pointer transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",e),"aria-label":"Toggle theme",children:t==="dark"?a(we,{size:20}):a(Pe,{size:20})}),lo=({label:e,children:t,className:o,icon:r})=>R(V,{placement:"bottom end",children:[R(ne,{variant:"ghost",className:n("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-text-muted outline-none cursor-pointer transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:[r&&a("span",{className:"flex items-center shrink-0",children:r}),a("span",{className:"text-[13px] font-bold uppercase tracking-wide",children:e}),a(Ae,{size:14,className:"ml-0.5 opacity-50"})]}),a(G,{className:"min-w-[180px]",children:t})]}),Ve=({label:e,className:t,onPress:o,isCurrent:r})=>a(F,{onAction:o,className:n(r&&"bg-primary-500 text-white font-medium hover:bg-primary-600 focus:bg-primary-600 focus:text-white",t),children:e}),Ge=({name:e})=>{if(e==="github")return a(ee,{});if(e==="discord")return a(te,{});if(e==="x")return a(oe,{});if(e==="bluesky")return a(re,{})},Fe=({icon:e,link:t,className:o})=>a(y,{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:a(Ge,{name:e})}),We=({className:e})=>a(se,{orientation:"vertical",className:n("h-6 w-px bg-border-subtle mx-1",e)}),co={NavbarRoot:ke,NavbarLeft:Be,NavbarRight:Le,NavbarCenter:Se,NavbarLogo:Me,Title:Oe,Links:Ee,Link:ze,SearchTrigger:De,Theme:He,Item:Ve,Socials:Fe,Split:We,Content:Ie};import*as I from"react-aria-components";import{ChevronDown as bo}from"lucide-react";import{clsx as je}from"clsx";import{twMerge as _e}from"tailwind-merge";function n(...e){return _e(je(e))}import{Fragment as No,jsx as Co,jsxs as yo}from"react/jsx-runtime";import*as d from"react-aria-components";import{Search as Xe,Hash as Ke,FileText as Ue,CornerDownLeft as Ze}from"lucide-react";import{Fragment as rt,jsx as p,jsxs as W}from"react/jsx-runtime";var qe=({children:e,isOpen:t,onOpenChange:o,className:r})=>p(d.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:p(d.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:p(d.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Je=({children:e,className:t,onSelectionChange:o,...r})=>p("div",{className:t,children:p(d.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),Qe=({className:e,...t})=>W(d.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[p(Xe,{className:"h-5 w-5 text-text-muted"}),p(d.Input,{...t,className:n("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),p("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:p("kbd",{className:"font-sans",children:"ESC"})})]}),Ye=({children:e,className:t,...o})=>p(d.ListBox,{...o,className:n("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),$e=({children:e,className:t,...o})=>p(d.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=>W(rt,{children:[e,(r.isFocused||r.isSelected)&&W("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[p("span",{className:"text-[10px]",children:"Select"}),p(Ze,{size:10})]})]})}),et=({isHeading:e,className:t})=>p("div",{className:n("shrink-0",t),children:e?p(Ke,{size:18}):p(Ue,{size:18})}),tt=({children:e,className:t})=>p("span",{className:n("block font-medium truncate flex-1 text-sm",t),children:e}),ot=({children:e,className:t})=>p("span",{className:n("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),To={Root:qe,Autocomplete:Je,Input:Qe,List:Ye,Item:Object.assign($e,{Icon:et,Title:tt,Bio:ot})};import{createContext as le,use as _,useEffect as M,useImperativeHandle as it,useMemo as K,useRef as ce,useState as U}from"react";import at from"scroll-into-view-if-needed";import{useEffect as nt,useRef as st}from"react";function ae(e,t){let o=st(e);nt(()=>{o.current!==e&&(t(e),o.current=e)},[e,t])}function j(e){return e.startsWith("#")?e.slice(1):null}import{jsx as v}from"react/jsx-runtime";var Z=le(null),me=le(null),X=class{items=[];single=!1;observer=null;onChange;callback(t){if(t.length===0)return;let o=!1;if(this.items=this.items.map(r=>{let s=t.find(l=>l.target.id===r.id),i=s?s.isIntersecting:r.active&&!r.fallback;return this.single&&o&&(i=!1),r.active!==i&&(r={...r,t:Date.now(),active:i,fallback:!1}),i&&(o=!0),r}),!o&&t[0].rootBounds){let r=t[0].rootBounds.top,s=Number.MAX_VALUE,i=-1;for(let l=0;l<this.items.length;l++){let c=document.getElementById(this.items[l].id);if(!c)continue;let u=Math.abs(r-c.getBoundingClientRect().top);u<s&&(i=l,s=u)}i!==-1&&(this.items[i]={...this.items[i],active:!0,fallback:!0,t:Date.now()})}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=j(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}};function pe(){let e=_(Z);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function lt(e){let[t,o]=U({isOverflowing:!1,isAtBottom:!1});return M(()=>{let r=e.current;if(!r)return;let s=()=>{let l=r.scrollHeight>r.clientHeight,c=r.scrollHeight-r.scrollTop<=r.clientHeight+2;o({isOverflowing:l,isAtBottom:c})};s(),r.addEventListener("scroll",s,{passive:!0}),window.addEventListener("resize",s);let i=new MutationObserver(s);return i.observe(r,{childList:!0,subtree:!0}),()=>{r.removeEventListener("scroll",s),window.removeEventListener("resize",s),i.disconnect()}},[e]),t}function Ho(){let e=pe();return K(()=>{let t;for(let o of e)o.active&&(!t||o.t>t.t)&&(t=o);return t?.id},[e])}function Vo(){let e=pe();return K(()=>{let t=[];for(let o of e)o.active&&t.push(o.id);return t},[e])}function Go({containerRef:e,children:t}){return v(me.Provider,{value:e,children:t})}function Fo({toc:e,single:t=!1,children:o}){let r=K(()=>new X,[]),[s,i]=U(r.items);return r.single=t,M(()=>{r.setItems(e)},[r,e]),M(()=>(r.watch({rootMargin:"0px",threshold:.98}),r.onChange=()=>i([...r.items]),()=>{r.unwatch()}),[r]),v(Z.Provider,{value:s,children:o})}var ct=({children:e,className:t})=>v("nav",{className:n("sticky top-navbar hidden xl:flex flex-col shrink-0","w-toc","py-8 pl-6 pr-4",t),children:e}),mt=({children:e,className:t,...o})=>v("div",{className:n("mb-4 text-xs font-bold uppercase tracking-wider text-text-main",t),...o,children:e}),de=({children:e,className:t,ref:o,...r})=>{let s=ce(null);it(o,()=>s.current);let{isOverflowing:i,isAtBottom:l}=lt(s);return v("div",{ref:s,className:n("relative overflow-y-auto boltdocs-otp-content",i&&!l&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...r,children:e})};de.displayName="OnThisPageContent";var pt=({children:e,className:t})=>v("ul",{className:n("relative space-y-1 text-sm border-l border-border-subtle",t),children:e}),dt=({level:e,children:t,className:o})=>v("li",{className:n(e===3&&"pl-3",o),children:t}),ut=({children:e,href:t,active:o,onClick:r,className:s})=>{let i=_(Z),l=_(me),c=t?j(t):null,u=ce(null),[g,C]=U(o);return ae(c&&i?i.find(f=>f.id===c)?.active:null,f=>{f!==null&&f!==g&&(C(!!f),f&&u.current&&l?.current&&at(u.current,{behavior:"smooth",block:"center",inline:"center",scrollMode:"if-needed",boundary:l.current}))}),M(()=>{o!==void 0&&C(o)},[o]),v("a",{ref:u,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})},ft=({style:e,className:t})=>v("div",{className:n("absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300",t),style:e}),Wo={OnThisPageRoot:ct,OnThisPageHeader:mt,OnThisPageContent:de,OnThisPageList:pt,OnThisPageItem:dt,OnThisPageLink:ut,OnThisPageIndicator:ft};import*as ue from"react-aria-components";import{ChevronLeft as gt,ChevronRight as xt}from"lucide-react";import{Fragment as Rt,jsx as N,jsxs as Nt}from"react/jsx-runtime";var bt=({children:e,className:t})=>N("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}),ht=({children:e,to:t,direction:o,className:r})=>{let s=o==="next";return Nt(ue.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&&N(gt,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),N("div",{className:"flex flex-col gap-1 flex-1",children:e}),s&&N(xt,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},vt=({children:e,className:t})=>N("span",{className:n("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Ct=({children:e,className:t})=>N("span",{className:n("text-base font-bold text-text-main truncate",t),children:e}),yt=({children:e})=>N(Rt,{children:e}),Uo={PageNavRoot:bt,PageNavLink:Object.assign(ht,{Title:vt,Description:Ct,Icon:yt})};import{jsx as B}from"react/jsx-runtime";var wt=({children:e,className:t="",...o})=>B("div",{className:n("w-full",t),...o,children:e}),Pt=({children:e,className:t=""})=>B("div",{role:"tablist",className:n("relative flex flex-row items-center border-b border-border-subtle",t),children:e}),Tt=({children:e,id:t,selected:o,className:r="",...s})=>B("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}),At=({children:e,className:t=""})=>B("div",{className:n("p-4 outline-none",t),children:e}),kt=({className:e="",style:t})=>B("div",{className:n("absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300",e),style:t}),Qo={TabsRoot:wt,TabsList:Pt,TabsItem:Tt,TabsContent:At,TabsIndicator:kt};import fe from"react";import{Link as It}from"react-aria-components";import{useLocation as Bt}from"react-router-dom";import{jsx as ge}from"react/jsx-runtime";var y=fe.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:s,onFocus:i,...l}=e,c=H(o??""),{preload:u}=$();return ge(It,{...l,ref:t,href:c,onMouseEnter:f=>{s?.(f),r==="hover"&&typeof c=="string"&&c.startsWith("/")&&u(c)},onFocus:f=>{i?.(f),r==="hover"&&typeof c=="string"&&c.startsWith("/")&&u(c)}})});y.displayName="Link";var Lt=fe.forwardRef((e,t)=>{let{href:o,end:r=!1,className:s,children:i,...l}=e,c=Bt(),u=H(o??""),g=r?c.pathname===u:c.pathname.startsWith(u),C=typeof s=="function"?s({isActive:g}):n(s,g&&"active"),f=typeof i=="function"?i({isActive:g}):i;return ge(y,{...l,ref:t,href:o,className:C,children:f})});Lt.displayName="NavLink";import*as xe from"react-aria-components";import{ChevronRight as St}from"lucide-react";import{jsx as h,jsxs as O}from"react/jsx-runtime";var Mt=({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,i=r.getTime()-s.getTime();if(Math.ceil(i/(1e3*60*60*24))===0)return null}let o=typeof e=="string"?e:e?.text;return h("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})},Ot=({children:e,className:t})=>h("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:h("nav",{className:"flex-1 space-y-6",children:e})}),Et=({children:e,title:t,icon:o,isOpen:r=!0,onToggle:s,className:i})=>O("div",{className:n("space-y-1",i),children:[t&&O(xe.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:[O("div",{className:"flex items-center gap-2",children:[o&&h(o,{size:14}),t]}),h(St,{size:14,className:n("transition-transform duration-200",r&&"rotate-90")})]}),r&&h("div",{className:"space-y-0.5",children:e})]}),zt=({children:e,className:t})=>h("div",{className:n(t),children:e}),Dt=({label:e,href:t,active:o,icon:r,badge:s,className:i})=>O(y,{href:t,className:n("group flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none transition-colors","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",i),children:[r&&h(r,{size:16,className:n(o?"text-primary-500":"text-text-muted group-hover:text-text-main")}),h("span",{className:"truncate",children:e}),s&&h(Mt,{badge:s})]}),pr={SidebarRoot:Ot,SidebarGroup:Et,SidebarGroupItem:zt,SidebarLink:Dt};import{Breadcrumb as Ht,Breadcrumbs as Vt,Link as Gt}from"react-aria-components";import{ChevronRight as Ft}from"lucide-react";import{jsx as E}from"react/jsx-runtime";var br=({children:e,className:t,...o})=>E(Vt,{className:n("flex items-center gap-1.5 pl-0! mb-0 text-sm text-text-muted",t),...o,children:e}),hr=({children:e,className:t,...o})=>E(Ht,{className:n("flex items-center mb-0 gap-1.5",t),...o,children:e}),vr=({children:e,href:t,className:o,...r})=>E(Gt,{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}),Cr=({className:e})=>E(Ft,{size:14,className:n("shrink-0 text-text-dim",e)});import*as z from"react-aria-components";import{cva as Wt}from"class-variance-authority";import{Fragment as jt,jsx as w,jsxs as _t}from"react/jsx-runtime";var be=Wt("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"}}),ne=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:s,className:i,variant:l,size:c,rounded:u,iconSize:g,disabled:C,...f})=>{let D=r||!s&&!!t,Y=D?w("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):_t(jt,{children:[t&&o==="left"&&w("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),w("span",{className:"flex items-center",children:s}),t&&o==="right"&&w("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?w(z.Link,{href:e,className:n(be({variant:l,size:c,rounded:u,iconSize:D?g:void 0,disabled:C}),i),...f,children:Y}):w(z.Button,{className:n(be({variant:l,size:c,rounded:u,iconSize:D?g:void 0,disabled:C}),i),...f,children:Y})};import{jsx as Xt}from"react/jsx-runtime";var kr=({children:e,className:t,vertical:o=!1})=>Xt("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 Ut,ChevronRight as Zt,Dot as qt}from"lucide-react";import he from"react";import*as m from"react-aria-components";import*as P from"react-aria-components";import{jsx as q,jsxs as Kt}from"react/jsx-runtime";var J=({children:e,className:t,showArrow:o,...r})=>Kt(P.Popover,{offset:8,...r,className:P.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","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards",s)),children:[o&&q(P.OverlayArrow,{className:"group",children:q("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:q("path",{d:"M0 0 L6 6 L12 0"})})}),e]});import{Fragment as $t,jsx as x,jsxs as L}from"react/jsx-runtime";function V(e){let[t,o]=he.Children.toArray(e.children).slice(0,2);return L(m.MenuTrigger,{...e,children:[t,x(J,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function Jt(e){let[t,o]=he.Children.toArray(e.children).slice(0,2);return L(m.SubmenuTrigger,{...e,children:[t,x(J,{offset:-4,crossOffset:-4,children:o})]})}function G(e){return x(m.Menu,{...e,className:m.composeRenderProps(e.className,t=>n("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function F(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return x(m.MenuItem,{...e,textValue:t,className:m.composeRenderProps(e.className,(o,{isFocused:r,isPressed:s,isDisabled:i})=>n("group relative flex flex-row items-center gap-2.5 px-3 py-1.5 rounded-lg outline-none cursor-default transition-all duration-200","text-text-main text-[0.8125rem]",r&&"bg-primary-500/10 text-primary-600 shadow-sm",s&&"scale-[0.98] bg-primary-500/15",i&&"opacity-40 grayscale pointer-events-none",o)),children:m.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:s,hasSubmenu:i})=>L($t,{children:[r!=="none"&&L("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[s&&r==="multiple"&&x(Ut,{className:"w-3.5 h-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),s&&r==="single"&&x(qt,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),x("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),i&&x(Zt,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function Qt({title:e,...t}){return L(m.MenuSection,{...t,className:n("flex flex-col gap-0.5",t.className),children:[e&&x(m.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),x(m.Collection,{items:t.items,children:t.children})]})}function Yt(e){return x(m.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}var Hr={Root:G,Item:F,Trigger:V,SubTrigger:Jt,Section:Qt,Separator:Yt};import*as T from"react-aria-components";import{Fragment as to,jsx as S,jsxs as Q}from"react/jsx-runtime";var eo=({className:e,children:t,...o})=>S(T.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=>Q(to,{children:[S(T.OverlayArrow,{children:Q("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:[S("title",{children:"Arrow"}),S("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),Wr=({content:e,children:t,delay:o=500,closeDelay:r=0,...s})=>Q(T.TooltipTrigger,{delay:o,closeDelay:r,children:[t,S(eo,{...s,children:e})]});import{Separator as se,ToggleButton as ie}from"react-aria-components";export{n as a,y as b,Lt as c,be as d,ne as e,ee as f,oo as g,Wr as h,ke as i,Ie as j,Be as k,Le as l,Se as m,Me as n,Oe as o,Ee as p,ze as q,De as r,He as s,lo as t,Ve as u,Ge as v,Fe as w,We as x,co as y,qe as z,Je as A,Qe as B,Ye as C,$e as D,et as E,tt as F,ot as G,pe as H,lt as I,Ho as J,Vo as K,Go as L,Fo as M,ct as N,mt as O,de as P,pt as Q,dt as R,ut as S,ft as T,Wo as U,bt as V,ht as W,vt as X,Ct as Y,yt as Z,Uo as _,wt as $,Pt as aa,Tt as ba,At as ca,kt as da,Qo as ea,Ot as fa,Et as ga,zt as ha,Dt as ia,pr as ja,br as ka,hr as la,vr as ma,Cr as na,kr as oa,J as pa,V as qa,Jt as ra,G as sa,F as ta,Qt as ua,Yt as va,Hr as wa,se as xa,ie as ya};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-H4M6P3DM.mjs";import"./chunk-JXHNX2WN.mjs";import"./chunk-ZRJ55GGF.mjs";import"./chunk-NBCYHLAA.mjs";import"./chunk-JZXLCA2E.mjs";export{a as SearchDialog};
|