boltdocs 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +32 -16
- package/dist/client/index.d.ts +32 -16
- package/dist/client/index.js +1 -1
- package/dist/node/cli-entry.cjs +1 -1
- package/dist/node/cli-entry.mjs +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +11 -2
- package/dist/node/index.d.mts +11 -2
- package/dist/node/index.mjs +1 -1
- package/dist/node-Bogvkxao.mjs +101 -0
- package/dist/node-CXaog6St.cjs +101 -0
- package/dist/{package-DukYeKmD.mjs → package-Bqbn1AYK.mjs} +1 -1
- package/dist/{package-c99Cs7mD.cjs → package-CFP44vfn.cjs} +1 -1
- package/dist/{search-dialog-DMK5OpgH.cjs → search-dialog-CV3eJzMm.cjs} +1 -1
- package/dist/{search-dialog-3lvKsbVG.js → search-dialog-DNTomKgu.js} +1 -1
- package/dist/use-search-CS3gH19M.js +6 -0
- package/dist/use-search-DBpJZQuw.cjs +6 -0
- package/package.json +1 -1
- package/src/client/components/ui-base/head.tsx +10 -3
- package/src/client/hooks/use-i18n.ts +4 -3
- package/src/client/hooks/use-localized-to.ts +1 -4
- package/src/client/hooks/use-routes.ts +4 -4
- package/src/client/hooks/use-sidebar.ts +3 -0
- package/src/client/hooks/use-version.ts +19 -6
- package/src/client/index.ts +1 -0
- package/src/client/ssg/boltdocs-shell.tsx +46 -14
- package/src/client/ssg/create-routes.tsx +56 -12
- package/src/client/store/boltdocs-context.tsx +24 -5
- package/src/shared/types.ts +18 -2
- package/dist/node-CWN8U_p8.mjs +0 -88
- package/dist/node-D5iosYXv.cjs +0 -88
- package/dist/use-search-C9bxCqfF.js +0 -6
- package/dist/use-search-DcfZSunO.cjs +0 -6
package/dist/client/index.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ interface BoltdocsThemeConfig {
|
|
|
48
48
|
link: string;
|
|
49
49
|
}>>;
|
|
50
50
|
sidebarGroups?: Record<string, {
|
|
51
|
-
title?: string
|
|
51
|
+
title?: string | Record<string, string>;
|
|
52
52
|
icon?: string;
|
|
53
53
|
}>;
|
|
54
54
|
socialLinks?: BoltdocsSocialLink[];
|
|
@@ -103,7 +103,7 @@ interface BoltdocsLocaleConfig {
|
|
|
103
103
|
*/
|
|
104
104
|
interface BoltdocsI18nConfig {
|
|
105
105
|
defaultLocale: string;
|
|
106
|
-
locales: Record<string, string>;
|
|
106
|
+
locales: string[] | Record<string, string>;
|
|
107
107
|
localeConfigs?: Record<string, BoltdocsLocaleConfig>;
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
@@ -171,6 +171,22 @@ interface BoltdocsConfig$1 {
|
|
|
171
171
|
seo?: BoltdocsSeoConfig;
|
|
172
172
|
vite?: any;
|
|
173
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Global namespace for Boltdocs types that can be augmented by generated code.
|
|
176
|
+
* This allows for strictly typed locales and versions based on the project configuration.
|
|
177
|
+
*/
|
|
178
|
+
declare global {
|
|
179
|
+
namespace Boltdocs {
|
|
180
|
+
interface Types {}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
type BoltdocsTypes = Boltdocs.Types;
|
|
184
|
+
type BoltdocsLocale = Boltdocs.Types extends {
|
|
185
|
+
Locale: infer L;
|
|
186
|
+
} ? L : string;
|
|
187
|
+
type BoltdocsVersion = Boltdocs.Types extends {
|
|
188
|
+
Version: infer V;
|
|
189
|
+
} ? V : string;
|
|
174
190
|
//#endregion
|
|
175
191
|
//#region src/client/types.d.ts
|
|
176
192
|
/**
|
|
@@ -332,17 +348,17 @@ declare function useRoutes(): {
|
|
|
332
348
|
routes: ComponentRoute[];
|
|
333
349
|
allRoutes: ComponentRoute[];
|
|
334
350
|
currentRoute: ComponentRoute | undefined;
|
|
335
|
-
currentLocale:
|
|
336
|
-
currentLocaleLabel:
|
|
351
|
+
currentLocale: BoltdocsLocale;
|
|
352
|
+
currentLocaleLabel: any;
|
|
337
353
|
availableLocales: {
|
|
338
|
-
key:
|
|
354
|
+
key: BoltdocsLocale;
|
|
339
355
|
label: string;
|
|
340
356
|
isCurrent: boolean;
|
|
341
357
|
}[];
|
|
342
|
-
currentVersion:
|
|
358
|
+
currentVersion: BoltdocsVersion;
|
|
343
359
|
currentVersionLabel: string | undefined;
|
|
344
360
|
availableVersions: {
|
|
345
|
-
key:
|
|
361
|
+
key: BoltdocsVersion;
|
|
346
362
|
label: string;
|
|
347
363
|
isCurrent: boolean;
|
|
348
364
|
}[];
|
|
@@ -421,16 +437,16 @@ declare function useTabs(tabs?: BoltdocsTab[], routes?: ComponentRoute[]): {
|
|
|
421
437
|
//#endregion
|
|
422
438
|
//#region src/client/hooks/use-version.d.ts
|
|
423
439
|
interface VersionOption {
|
|
424
|
-
key:
|
|
440
|
+
key: BoltdocsVersion;
|
|
425
441
|
label: string;
|
|
426
442
|
value: string;
|
|
427
443
|
isCurrent: boolean;
|
|
428
444
|
}
|
|
429
445
|
interface UseVersionReturn {
|
|
430
|
-
currentVersion:
|
|
446
|
+
currentVersion: BoltdocsVersion | undefined;
|
|
431
447
|
currentVersionLabel: string | undefined;
|
|
432
448
|
availableVersions: VersionOption[];
|
|
433
|
-
handleVersionChange: (version:
|
|
449
|
+
handleVersionChange: (version: BoltdocsVersion) => void;
|
|
434
450
|
}
|
|
435
451
|
/**
|
|
436
452
|
* Hook to manage and switch between different versions of the documentation.
|
|
@@ -439,16 +455,16 @@ declare function useVersion(): UseVersionReturn;
|
|
|
439
455
|
//#endregion
|
|
440
456
|
//#region src/client/hooks/use-i18n.d.ts
|
|
441
457
|
interface LocaleOption {
|
|
442
|
-
key:
|
|
458
|
+
key: BoltdocsLocale;
|
|
443
459
|
label: string;
|
|
444
460
|
value: string;
|
|
445
461
|
isCurrent: boolean;
|
|
446
462
|
}
|
|
447
463
|
interface UseI18nReturn {
|
|
448
|
-
currentLocale:
|
|
464
|
+
currentLocale: BoltdocsLocale | undefined;
|
|
449
465
|
currentLocaleLabel: string | undefined;
|
|
450
466
|
availableLocales: LocaleOption[];
|
|
451
|
-
handleLocaleChange: (locale:
|
|
467
|
+
handleLocaleChange: (locale: BoltdocsLocale) => void;
|
|
452
468
|
}
|
|
453
469
|
/**
|
|
454
470
|
* Hook to manage and switch between different locales (languages) of the documentation.
|
|
@@ -578,7 +594,7 @@ interface HeadProps {
|
|
|
578
594
|
path: string;
|
|
579
595
|
title: string;
|
|
580
596
|
description?: string;
|
|
581
|
-
seo?: Record<string,
|
|
597
|
+
seo?: Record<string, unknown>;
|
|
582
598
|
}>;
|
|
583
599
|
}
|
|
584
600
|
declare function Head({
|
|
@@ -610,7 +626,7 @@ declare class ErrorBoundary extends Component<Props, State> {
|
|
|
610
626
|
state: State;
|
|
611
627
|
static getDerivedStateFromError(error: Error): State;
|
|
612
628
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
613
|
-
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> |
|
|
629
|
+
render(): string | number | bigint | boolean | _$react_jsx_runtime0.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
614
630
|
}
|
|
615
631
|
//#endregion
|
|
616
632
|
//#region src/client/components/ui-base/copy-markdown.d.ts
|
|
@@ -1545,4 +1561,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
1545
1561
|
*/
|
|
1546
1562
|
declare function getTranslated(value: string | Record<string, string> | undefined, locale?: string): string;
|
|
1547
1563
|
//#endregion
|
|
1548
|
-
export { Admonition, type AdmonitionProps, AnchorProvider, Badge, type BadgeProps, BoltdocsShell, Breadcrumbs, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Cards, type CardsProps, Caution, CodeBlock, ComponentPreview, type ComponentPreviewProps, ComponentProps, type ComponentPropsProps, type ComponentRoute, CopyMarkdown, Danger, DocsLayout, ErrorBoundary, Field, type FieldProps, FileTree, type FileTreeProps, Head, Image, type ImageProps, Important, InfoBox, type LayoutProps, Link, type LinkProps, List, type ListProps, Loading, MdxPage, Navbar, NotFound, Note, OnThisPage, PageNav, Breadcrumbs$1 as PrimitiveBreadcrumbs, Button$1 as PrimitiveButton, Link$1 as PrimitiveLink, Menu as PrimitiveMenu, NavLink as PrimitiveNavLink, Navbar$1 as PrimitiveNavbar, NavigationMenu as PrimitiveNavigationMenu, OnThisPage$1 as PrimitiveOnThisPage, PageNav$1 as PrimitivePageNav, Popover as PrimitivePopover, Sidebar as PrimitiveSidebar, Skeleton as PrimitiveSkeleton, Tabs as PrimitiveTabs, Tooltip as PrimitiveTooltip, ScrollProvider, SearchDialog as SearchDialogPrimitive, Sidebar$1 as Sidebar, Tab, type TabProps, Table, type TableProps, Tabs$1 as Tabs, type TabsProps, Tip, Video, Warning, cn, createRoutes, getTranslated, useActiveAnchor, useActiveAnchors, useBreadcrumbs, useConfig, useI18n, useItems, useLocalizedTo, useLocation, useMdxComponents, useNavbar, useOnThisPage, usePageNav, useRoutes, useSearch, useSidebar, useTabs, useTheme, useVersion };
|
|
1564
|
+
export { Admonition, type AdmonitionProps, AnchorProvider, Badge, type BadgeProps, type BoltdocsLocale, BoltdocsShell, type BoltdocsTypes, type BoltdocsVersion, Breadcrumbs, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Cards, type CardsProps, Caution, CodeBlock, ComponentPreview, type ComponentPreviewProps, ComponentProps, type ComponentPropsProps, type ComponentRoute, CopyMarkdown, Danger, DocsLayout, ErrorBoundary, Field, type FieldProps, FileTree, type FileTreeProps, Head, Image, type ImageProps, Important, InfoBox, type LayoutProps, Link, type LinkProps, List, type ListProps, Loading, MdxPage, Navbar, NotFound, Note, OnThisPage, PageNav, Breadcrumbs$1 as PrimitiveBreadcrumbs, Button$1 as PrimitiveButton, Link$1 as PrimitiveLink, Menu as PrimitiveMenu, NavLink as PrimitiveNavLink, Navbar$1 as PrimitiveNavbar, NavigationMenu as PrimitiveNavigationMenu, OnThisPage$1 as PrimitiveOnThisPage, PageNav$1 as PrimitivePageNav, Popover as PrimitivePopover, Sidebar as PrimitiveSidebar, Skeleton as PrimitiveSkeleton, Tabs as PrimitiveTabs, Tooltip as PrimitiveTooltip, ScrollProvider, SearchDialog as SearchDialogPrimitive, Sidebar$1 as Sidebar, Tab, type TabProps, Table, type TableProps, Tabs$1 as Tabs, type TabsProps, Tip, Video, Warning, cn, createRoutes, getTranslated, useActiveAnchor, useActiveAnchors, useBreadcrumbs, useConfig, useI18n, useItems, useLocalizedTo, useLocation, useMdxComponents, useNavbar, useOnThisPage, usePageNav, useRoutes, useSearch, useSidebar, useTabs, useTheme, useVersion };
|
package/dist/client/index.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import{A as e,B as t,C as n,D as r,E as i,F as a,H as o,I as s,L as c,M as l,N as u,O as d,P as f,R as p,S as m,T as h,U as g,V as _,_ as ee,a as v,b as y,c as b,d as x,f as te,g as ne,h as re,i as ie,j as S,k as ae,l as C,m as oe,n as w,o as T,p as se,r as E,s as D,t as ce,u as le,v as O,w as ue,x as de,y as k,z as A}from"../use-search-C9bxCqfF.js";import{Outlet as fe,useLoaderData as pe,useLocation as j,useNavigate as me}from"react-router-dom";import he from"virtual:boltdocs-layout";import{Children as M,Component as ge,Suspense as _e,createContext as ve,isValidElement as N,lazy as ye,use as be,useCallback as P,useEffect as F,useLayoutEffect as xe,useMemo as I,useRef as L,useState as R}from"react";import{Fragment as z,jsx as B,jsxs as V}from"react/jsx-runtime";import*as H from"react-aria-components";import{Button as U,RouterProvider as Se}from"react-aria-components";import{Helmet as Ce,HelmetProvider as we}from"react-helmet-async";import*as Te from"lucide-react";import{AlertTriangle as Ee,ArrowLeft as De,Bookmark as Oe,Check as W,ChevronDown as G,ChevronLeft as ke,ChevronRight as Ae,ChevronUp as je,ChevronsLeft as Me,ChevronsRight as Ne,Circle as Pe,CircleHelp as Fe,Copy as Ie,ExternalLink as Le,File as Re,FileCode as ze,FileImage as Be,FileText as Ve,Flame as He,Folder as Ue,Home as We,Info as Ge,Languages as Ke,Lightbulb as qe,Link as Je,Monitor as Ye,Moon as Xe,Pencil as Ze,ShieldAlert as Qe,Sun as $e,TextAlignStart as et,Zap as tt}from"lucide-react";import{cva as K}from"class-variance-authority";import nt from"virtual:boltdocs-mdx-components";import rt from"virtual:boltdocs-icons";var it=Object.defineProperty,at=(e,t)=>{let n={};for(var r in e)it(n,r,{get:e[r],enumerable:!0});return t||it(n,Symbol.toStringTag,{value:`Module`}),n};const ot=Symbol.for(`__BDOCS_MDX_COMPONENTS_CONTEXT__`),st=Symbol.for(`__BDOCS_MDX_COMPONENTS_INSTANCE__`),ct=globalThis[ot]||(globalThis[ot]=ve({}));function lt(){let e=be(ct);return(!e||Object.keys(e).length===0)&&globalThis[st]?globalThis[st]:e}function ut({components:e,children:t}){return typeof globalThis<`u`&&(globalThis[st]=e),B(ct.Provider,{value:e,children:t})}function dt({route:e,content:t,mdxComponents:n}){let r=lt(),i=I(()=>({...r,...n}),[r,n]);return t?B(he,{route:e,children:B(t,{components:i})}):null}function ft({MDXComponent:e,mdxComponents:t}){let n=pe(),r=e||n?.MDXComponent,i=t||n?.mdxComponents;return r?B(dt,{route:{path:n.path,filePath:n.filePath,title:n.frontmatter.title,description:n.frontmatter.description,headings:n.headings,locale:n.locale,version:n.version,group:n.group,groupTitle:n.groupTitle},content:r,mdxComponents:i}):null}const pt=Symbol.for(`__BDOCS_THEME_CONTEXT__`),mt=Symbol.for(`__BDOCS_THEME_INSTANCE__`),ht=`boltdocs-theme-change`,gt=globalThis[pt]||(globalThis[pt]=ve(void 0));function _t({children:e}){let[t,n]=R(`system`),[r,i]=R(`dark`),a=e=>{let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=e===`dark`||e===`system`&&t.matches,r=window.document.documentElement;r.classList.toggle(`dark`,n),r.dataset.theme=n?`dark`:`light`,i(n?`dark`:`light`)};F(()=>{let e=localStorage.getItem(`boltdocs-theme`);e?(n(e),a(e)):a(`system`);let t=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>{(localStorage.getItem(`boltdocs-theme`)||`system`)===`system`&&a(`system`)};return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[]);let o={theme:t,resolvedTheme:r,setTheme:e=>{n(e),localStorage.setItem(`boltdocs-theme`,e),a(e),typeof window<`u`&&window.dispatchEvent(new CustomEvent(ht,{detail:e}))}};return typeof globalThis<`u`&&(globalThis[mt]=o),B(gt.Provider,{value:o,children:e})}function q(){let e=be(gt),[,t]=R({});if(F(()=>{if(e)return;let n=()=>t({});return window.addEventListener(ht,n),()=>window.removeEventListener(ht,n)},[e]),!e&&typeof globalThis<`u`&&globalThis[mt])return globalThis[mt];if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function vt(){let{pathname:e,hash:t}=j();return xe(()=>{let e=document.querySelector(`.boltdocs-content`)||window,n=()=>e===window?window.scrollY:e.scrollTop,r=(t,n=`auto`)=>{e===window?window.scrollTo({top:t,behavior:n}):e.scrollTo({top:t,behavior:n})};if(t){let i=t.replace(`#`,``),a=document.getElementById(i);if(a){let t=e===window?0:e.getBoundingClientRect().top;r(a.getBoundingClientRect().top-t-80+n(),`smooth`);return}}r(0)},[e,t]),null}const yt=({className:e,variant:t,size:n,rounded:r,iconSize:i,disabled:a,...o})=>B(c,{className:A(`group`,p({variant:t,size:n,rounded:r,iconSize:i,disabled:a,className:e})),...o}),bt=(e,t)=>{if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`||typeof e==`number`)return String(e);if(Array.isArray(e))return e.map(e=>bt(e,t)).join(``);if(N(e)){let n=t?.get(e.type);return n?n(e.props):bt(e.props.children,t)}return``},xt=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);return t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t),!0}};function St(e){let{title:t}=e,[n,r]=R(!1),[i,a]=R(!1),[o,s]=R(!1),c=L(null);_();let l=P(async()=>{xt(c.current?.textContent??``),r(!0),setTimeout(()=>r(!1),2e3)},[]);return F(()=>{s((c.current?.textContent?.length??0)>120)},[e.children,e.highlightedHtml]),{copied:n,isExpanded:i,setIsExpanded:a,isExpandable:o,preRef:c,handleCopy:l,shouldTruncate:o&&!i}}const Ct=({children:e,className:t,plain:n=!1,...r})=>B(`div`,{className:A(`not-prose boltdocs-code-block`,`group relative overflow-hidden bg-(--color-code-bg)`,`contain-layout contain-paint`,{"my-6 rounded-lg border border-border-subtle":!n},t),...r,children:e}),wt=({children:e,className:t,...n})=>B(`div`,{className:A(`flex h-9 items-center justify-between px-4 py-1.5`,`border-b border-border-subtle bg-bg-surface/50`,`text-[13px] font-medium text-text-muted`,t),...n,children:e}),Tt=({children:e,className:t,...n})=>B(`div`,{className:A(`flex items-center space-x-2`,t),...n,children:e}),Et=({className:e,children:t,shouldTruncate:n=!1,...r})=>B(`div`,{className:A(`relative`,{"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":n},e),...r,children:t}),Dt={ts:a,tsx:l,js:ae,jsx:l,json:e,css:r,html:h,md:S,mdx:S,bash:f,sh:f,yaml:s,yml:s,rs:u,rust:u,toml:i},Ot=({copied:e,handleCopy:t})=>B(ue,{content:e?`Copied!`:`Copy code`,children:B(U,{onPress:t,className:A(`grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2`,e?`text-emerald-400`:`text-text-muted hover:text-text-main`),"aria-label":`Copy code`,children:B(e?W:Ie,{size:20})})});function J(e){let{children:t,hideCopy:n=!1,highlightedHtml:r,"data-highlighted-html":i,title:a,"data-title":o,"data-lang":s,plain:c=!1,...l}=e,u=r||i,d=a||o,f=e.lang||s||``,{copied:p,isExpanded:m,setIsExpanded:h,isExpandable:g,preRef:_,handleCopy:ee,shouldTruncate:v}=St(e),y=Dt[f];return V(Ct,{plain:c,className:e.className,children:[(d||!n)&&V(wt,{children:[B(Tt,{children:d&&V(z,{children:[y?B(y,{size:14}):B(Re,{size:14,className:`opacity-60`}),B(`span`,{children:d})]})}),!n&&B(Ot,{copied:p,handleCopy:ee})]}),V(Et,{shouldTruncate:v,children:[u?B(`div`,{ref:_,className:`shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!`,dangerouslySetInnerHTML:{__html:u}}):B(`pre`,{ref:_,className:`m-0! p-5! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7] overflow-x-auto`,...l,children:bt(t)}),g&&B(`div`,{className:A(v?`absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10`:`relative flex justify-center py-4`),children:B(U,{onPress:()=>h(!m),className:`rounded-full bg-bg-surface border border-border-subtle px-5 py-2 text-[0.8125rem] font-medium text-text-main outline-none cursor-pointer transition-all hover:bg-border-subtle hover:-translate-y-px backdrop-blur-md`,children:m?`Show less`:`Expand code`})})]})]})}function kt({initialIndex:e=0,tabs:t}){let n=t[e]?.props.disabled?t.findIndex(e=>!e.props.disabled):e,[r,i]=R(n===-1?0:n),a=L([]),[o,s]=R({opacity:0,transform:`translateX(0)`,width:0});return F(()=>{let e=a.current[r];e&&s({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[r,t]),{active:r,setActive:i,tabRefs:a,indicatorStyle:o,handleKeyDown:P(e=>{let n=0;if(e.key===`ArrowRight`?n=1:e.key===`ArrowLeft`&&(n=-1),n!==0){let e=(r+n+t.length)%t.length;for(;t[e].props.disabled&&e!==r;)e=(e+n+t.length)%t.length;e!==r&&!t[e].props.disabled&&(i(e),a.current[e]?.focus())}},[r,t])}}const At=K(`relative flex items-center border-b border-border-subtle gap-1 overflow-x-auto no-scrollbar`,{variants:{size:{default:`px-0`,compact:`px-2`}},defaultVariants:{size:`default`}}),jt=K(`flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap`,{variants:{isActive:{true:`text-primary-500`,false:`text-text-muted hover:text-text-main`},isDisabled:{true:`opacity-40 pointer-events-none`,false:``}},defaultVariants:{isActive:!1,isDisabled:!1}});function Mt({children:e}){return B(`div`,{className:`py-4`,children:typeof e==`string`?B(J,{className:`language-bash`,children:B(`code`,{children:e.trim()})}):e})}function Nt({defaultIndex:e=0,children:t}){let n=I(()=>M.toArray(t).filter(e=>N(e)&&e.props?.label),[t]),{active:r,setActive:i,tabRefs:a,indicatorStyle:o}=kt({initialIndex:e,tabs:n});return B(`div`,{className:`my-8 w-full group/tabs`,children:V(H.Tabs,{selectedKey:r.toString(),onSelectionChange:e=>i(Number(e)),className:`w-full`,children:[V(H.TabList,{"aria-label":`Content Tabs`,className:A(At()),children:[n.map((e,t)=>{let{label:n,icon:r,disabled:i}=e.props,o=t.toString();return V(H.Tab,{id:o,isDisabled:i,ref:e=>{a.current[t]=e},className:({isSelected:e,isDisabled:t})=>A(jt({isActive:e,isDisabled:t})),children:[!!r&&B(`span`,{className:`shrink-0 [&>svg]:w-4 [&>svg]:h-4`,children:r}),B(`span`,{children:n})]},o)}),B(`div`,{className:`absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none`,style:o,"aria-hidden":`true`})]}),n.map((e,t)=>B(H.TabPanel,{id:t.toString(),children:n[t]},t))]})})}function Pt({src:e,poster:t,alt:n,children:r,controls:i,preload:a=`metadata`,...o}){let s=L(null),[c,l]=R(!1);return F(()=>{let e=s.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e.isIntersecting&&(l(!0),t.disconnect())},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[]),B(`div`,{ref:s,className:`my-6 overflow-hidden rounded-lg border border-border-subtle`,children:c?V(`video`,{className:`block w-full h-auto`,src:e,poster:t,controls:!0,preload:a,playsInline:!0,...o,children:[r,`Your browser does not support the video tag.`]}):B(`div`,{className:`aspect-video bg-bg-surface animate-pulse`,role:`img`,"aria-label":n||`Video`})})}const Ft=K(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight`,{variants:{variant:{default:`bg-bg-surface text-text-muted border-border-subtle`,primary:`bg-primary-500/15 text-primary-400 border-primary-500/20`,success:`bg-emerald-500/15 text-emerald-400 border-emerald-500/20`,warning:`bg-amber-500/15 text-amber-400 border-amber-500/20`,danger:`bg-red-500/15 text-red-400 border-red-500/20`,info:`bg-sky-500/15 text-sky-400 border-sky-500/20`}},defaultVariants:{variant:`default`}});function It({variant:e=`default`,children:t,className:n=``,...r}){return B(`span`,{className:A(Ft({variant:e}),n),...r,children:t})}const Lt=K(`grid gap-4 my-6`,{variants:{cols:{1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`,4:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-4`}},defaultVariants:{cols:3}});function Rt({cols:e=3,children:t,className:n=``,...r}){return B(`div`,{className:A(Lt({cols:e}),n),...r,children:t})}function zt({title:e,icon:t,href:n,children:r,className:i=``,...a}){let o=L(null),s=L(null),c=P(e=>{let t=o.current||s.current;if(!t)return;let{left:n,top:r}=t.getBoundingClientRect();t.style.setProperty(`--x`,`${e.clientX-n}px`),t.style.setProperty(`--y`,`${e.clientY-r}px`)},[]),l=V(z,{children:[B(`div`,{className:`pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100`,style:{background:`radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)`}}),t&&B(`div`,{className:`mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3`,children:t}),V(`div`,{className:`space-y-1.5`,children:[e&&B(`h3`,{className:`text-sm font-bold text-text-main`,children:e}),r&&B(`div`,{className:`text-sm text-text-muted leading-relaxed`,children:r})]})]}),u=A(`group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden`,`transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,i);return n?B(H.Link,{ref:s,href:n,className:A(u,`no-underline cursor-pointer`),onMouseMove:c,...a,children:l}):B(`div`,{ref:o,role:`presentation`,className:u,onMouseMove:c,...a,children:l})}const Bt={note:B(Oe,{size:18}),tip:B(qe,{size:18}),info:B(Ge,{size:18}),warning:B(Ee,{size:18}),danger:B(Qe,{size:18}),important:B(He,{size:18}),caution:B(tt,{size:18})},Vt=K(`py-4 px-4 rounded-lg flex items-center gap-3 border-[1px] flex-row`,{variants:{type:{note:`border-primary-200 dark:border-primary-800 bg-primary-500/5 text-primary-400`,tip:`border-emerald-200 dark:border-emerald-800 bg-emerald-500/5 text-emerald-500`,info:`border-sky-200 dark:border-sky-800 bg-sky-500/5 text-sky-500`,warning:`border-amber-200 dark:border-amber-800 bg-amber-500/5 text-amber-500`,danger:`border-red-200 dark:border-red-800/70 bg-red-500/5 text-red-500`,important:`border-orange-200 dark:border-orange-800/70 bg-orange-500/5 text-orange-500`,caution:`border-yellow-200 dark:border-yellow-800/70 bg-yellow-500/5 text-yellow-500`}},defaultVariants:{type:`note`}});function Y({type:e=`note`,title:t,children:n,className:r=``,...i}){return V(`div`,{className:A(Vt({type:e}),r),role:e===`warning`||e===`danger`?`alert`:`note`,...i,children:[Bt[e],B(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0`,children:n})]})}const Ht=e=>B(Y,{type:`note`,...e}),Ut=e=>B(Y,{type:`tip`,...e}),Wt=e=>B(Y,{type:`warning`,...e}),Gt=e=>B(Y,{type:`danger`,...e}),Kt=e=>B(Y,{type:`info`,...e}),qt=e=>B(Y,{type:`important`,...e}),Jt=e=>B(Y,{type:`caution`,...e}),Yt=K(`my-6 transition-all duration-200`,{variants:{variant:{default:`list-disc pl-5 text-text-muted marker:text-primary-500/50`,number:`list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold`,checked:`list-none p-0`,arrow:`list-none p-0`,bubble:`list-none p-0`},cols:{1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`,4:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-4`},isGrid:{true:`grid gap-x-8 gap-y-3`,false:`space-y-2`},dense:{true:`space-y-1`,false:`space-y-2`}},compoundVariants:[{variant:`default`,dense:!0,className:`space-y-0.5`}],defaultVariants:{variant:`default`,cols:1,isGrid:!1,dense:!1}}),Xt=K(`group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200`,{variants:{variant:{default:``,number:``,checked:`hover:translate-x-0.5`,arrow:`hover:translate-x-0.5`,bubble:`hover:translate-x-0.5`},dense:{true:`py-0`,false:`py-0.5`}},defaultVariants:{variant:`default`,dense:!1}}),Zt=K(`mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110`,{variants:{variant:{bubble:`h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold`,default:``}},defaultVariants:{variant:`default`}});function Qt({icon:e,children:t,variant:n,dense:r}){return V(`li`,{className:A(Xt({variant:n,dense:r})),children:[e&&B(`span`,{className:A(Zt({variant:n===`bubble`?`bubble`:`default`})),children:e}),B(`div`,{className:`flex-1 text-text-muted group-hover:text-text-main transition-colors`,children:t})]})}const $t={checked:e=>B(W,{size:14,className:A(`text-emerald-500 shrink-0`,e)}),arrow:e=>B(Ae,{size:14,className:A(`text-primary-400 shrink-0`,e)}),bubble:e=>B(Pe,{size:6,fill:`currentColor`,className:A(`text-primary-500 shrink-0`,e)}),default:()=>null,number:()=>null};function en({variant:e=`default`,cols:t=1,dense:n=!1,children:r,className:i,...a}){let o=t!==void 0&&Number(t)>1,s=$t[e],c=Yt({variant:e,cols:t,dense:n,isGrid:o,className:i});return e===`default`||e===`number`?B(e===`number`?`ol`:`ul`,{className:c,...a,children:r}):B(`ul`,{className:c,...a,children:M.map(r,t=>{if(!N(t))return t;let r=t,i=r.type===`li`?r.props.children:r.props.children||t;return B(Qt,{icon:s(),variant:e,dense:n,children:i})})})}const tn={ts:a,tsx:l,js:ae,jsx:l,json:e,css:r,html:h,md:S,mdx:S,bash:f,sh:f,yaml:s,yml:s},nn={CODE:/\.(ts|tsx|js|jsx|json|mjs|cjs|astro|vue|svelte)$/i,TEXT:/\.(md|mdx|txt)$/i,IMAGE:/\.(png|jpg|jpeg|svg|gif)$/i};function rn(e){return typeof e==`string`?e:typeof e==`number`?e.toString():Array.isArray(e)?e.map(rn).join(``):N(e)&&e.props&&typeof e.props==`object`&&`children`in e.props?rn(e.props.children):``}function an(e,t){let n=e.toLowerCase(),r=`shrink-0 transition-colors duration-200`;if(t)return B(Ue,{size:16,strokeWidth:2,className:A(r,`text-primary-400`),fill:`currentColor`,fillOpacity:.15});let i=tn[n.split(`.`).pop()||``];if(i)return B(i,{size:16});let a=A(r,`text-text-dim group-hover:text-text-main`);return nn.CODE.test(n)?B(ze,{size:16,strokeWidth:2,className:a}):nn.TEXT.test(n)?B(Ve,{size:16,strokeWidth:2,className:a}):nn.IMAGE.test(n)?B(Be,{size:16,strokeWidth:2,className:a}):B(Re,{size:16,strokeWidth:2,className:a})}function on(e,t){if(!N(e))return!1;let n=e.type;if(typeof n==`string`)return n===t;if(typeof n==`function`)return n.name===t||n.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function sn(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function X(e,t=`root`){if(!N(e))return[];let n=[];if(on(e,`ul`))return M.forEach(e.props.children,(e,r)=>{n.push(...X(e,`${t}-${r}`))}),n;if(on(e,`li`)){let r=M.toArray(e.props.children),i=r.findIndex(e=>on(e,`ul`)),a=i!==-1,o=a?r.slice(0,i):r,s=a?r.slice(i):[],{name:c,comment:l}=sn(rn(o)),u=c.endsWith(`/`),d=u?c.slice(0,-1):c,f=a||u;return n.push({id:`${t}-${d}`,name:d,comment:l,isFolder:f,children:a?X(s[0],`${t}-${d}`):void 0}),n}return e.props&&typeof e.props==`object`&&`children`in e.props&&M.forEach(e.props.children,(e,r)=>{n.push(...X(e,`${t}-${r}`))}),n}function cn({item:e}){return V(H.TreeItem,{id:e.id,textValue:e.name,className:`outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md`,children:[B(H.TreeItemContent,{children:({isExpanded:t,hasChildItems:n})=>V(`div`,{className:`flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer`,children:[B(`div`,{style:{width:`calc((var(--tree-item-level) - 1) * 1rem)`},className:`shrink-0`}),n?B(H.Button,{slot:`chevron`,className:`outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors`,children:B(Ae,{size:14,strokeWidth:3,className:A(`transition-transform duration-200`,t&&`rotate-90`)})}):B(`div`,{className:`w-[18px]`}),an(e.name,e.isFolder),B(`span`,{className:A(`text-sm transition-colors truncate select-none`,e.isFolder?`font-semibold text-text-main`:`text-text-muted group-hover:text-text-main`),children:e.name}),e.comment&&V(`span`,{className:`ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans`,children:[`//`,` `,e.comment]})]})}),e.children&&B(H.Collection,{items:e.children,children:e=>B(cn,{item:e})})]})}function ln({children:e}){let t=I(()=>X(e),[e]);return B(`div`,{className:`my-8`,children:B(H.Tree,{items:t,"aria-label":`File Tree`,className:A(`rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none`,`max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle`,`focus-visible:ring-2 focus-visible:ring-primary-500/20`),children:e=>B(cn,{item:e})})})}function un({data:e,sortable:t=!1,paginated:n=!1,pageSize:r=10}){let[i,a]=R(null),[o,s]=R(1),c=I(()=>{if(!e)return[];let n=[...e];return t&&i!==null&&n.sort((e,t)=>{let n=e[i.key],r=t[i.key],a=typeof n==`string`?n:``,o=typeof r==`string`?r:``;return a<o?i.direction===`asc`?-1:1:a>o?i.direction===`asc`?1:-1:0}),n},[e,i,t]);return{sortConfig:i,currentPage:o,setCurrentPage:s,totalPages:Math.ceil(c.length/r),paginatedData:I(()=>{if(!n)return c;let e=(o-1)*r;return c.slice(e,e+r)},[c,n,o,r]),requestSort:e=>{if(!t)return;let n=`asc`;i&&i.key===e&&i.direction===`asc`&&(n=`desc`),a({key:e,direction:n})}}}function dn({headers:e,data:t,children:n,className:r=``,sortable:i=!1,paginated:a=!1,pageSize:o=10}){let{sortConfig:s,currentPage:c,setCurrentPage:l,totalPages:u,paginatedData:d,requestSort:f}=un({data:t,sortable:i,paginated:a,pageSize:o}),p=e=>i?s?.key===e?s.direction===`asc`?B(je,{size:14,className:`ml-1 text-primary-400`}):B(G,{size:14,className:`ml-1 text-primary-400`}):B(G,{size:14,className:`ml-1 opacity-30`}):null,m=n||V(z,{children:[e&&B(`thead`,{children:B(`tr`,{children:e.map((e,t)=>B(`th`,{onClick:()=>f(t),className:A(`text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm`,i&&`cursor-pointer select-none hover:text-primary-400 transition-colors`),children:V(`div`,{className:`flex items-center`,children:[e,p(t)]})},t))})}),d&&B(`tbody`,{children:d.map((e,t)=>B(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:e.map((e,t)=>B(`td`,{className:`px-3 py-2 border-b border-border-subtle text-sm text-text-muted`,children:e},t))},t))})]});return V(`div`,{className:A(`my-6 rounded-lg border border-border-subtle overflow-hidden`,r),children:[B(`div`,{className:`overflow-x-auto`,children:B(`table`,{className:`w-full border-collapse text-sm`,children:m})}),a&&u>1&&V(`div`,{className:`flex items-center justify-between border-t border-border-subtle px-4 py-3`,children:[V(`span`,{className:`text-xs text-text-muted`,children:[`Page `,c,` of `,u]}),V(`div`,{className:`flex items-center gap-1`,children:[B(H.Button,{onPress:()=>l(1),isDisabled:c===1,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:B(Me,{size:16})}),B(H.Button,{onPress:()=>l(e=>Math.max(e-1,1)),isDisabled:c===1,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:B(ke,{size:16})}),B(H.Button,{onPress:()=>l(e=>Math.min(e+1,u)),isDisabled:c===u,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:B(Ae,{size:16})}),B(H.Button,{onPress:()=>l(u),isDisabled:c===u,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:B(Ne,{size:16})})]})]})]})}function fn({name:e,type:t,defaultValue:n,required:r=!1,children:i,id:a,className:o=``}){return V(`article`,{className:A(`group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300`,o),id:a,children:[V(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4`,children:[V(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[B(`code`,{className:`inline-flex items-center rounded-md bg-primary-500/10 px-2.5 py-1 font-mono text-sm font-bold text-primary-400 border border-primary-500/20 shadow-sm transition-colors`,children:e}),t&&B(`span`,{className:`rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase shadow-sm`,children:t}),r&&V(`div`,{className:`flex items-center gap-1.5 rounded-full bg-red-500/10 px-2.5 py-0.5 text-[10px] font-bold uppercase text-red-400 border border-red-500/20 shadow-sm`,children:[B(`span`,{className:`h-1 w-1 rounded-full bg-red-400 animate-pulse`}),`Required`]})]}),n&&V(`div`,{className:`flex items-center gap-2 text-[11px] text-text-muted bg-bg-muted/30 px-2.5 py-1 rounded-md border border-border-subtle/50`,children:[B(`span`,{className:`font-semibold opacity-60 uppercase tracking-tighter`,children:`Default`}),B(`code`,{className:`font-mono text-text-main font-medium`,children:n})]})]}),B(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30`,children:i})]})}function pn({to:e,children:t,className:n=``,...r}){let i=e&&(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`));return B(k,{href:e,className:A(`text-blue-600 hover:text-blue-800 hover:underline cursor-pointer`,n),target:i?`_blank`:void 0,rel:i?`noopener noreferrer`:void 0,...r,children:t})}function mn({src:e,alt:t,theme:n,...r}){let{theme:i}=q();return n&&n!==i?null:B(`img`,{src:e,alt:t||``,...r})}function hn({title:e,props:t,className:n=``}){return V(`div`,{className:A(`my-6`,n),children:[e&&B(`h3`,{className:`text-base font-bold text-text-main mb-3`,children:e}),B(`div`,{className:`overflow-x-auto rounded-lg border border-border-subtle`,children:V(`table`,{className:`w-full border-collapse text-sm`,children:[B(`thead`,{children:V(`tr`,{children:[B(`th`,{className:`text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted`,children:`Property`}),B(`th`,{className:`text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted`,children:`Type`}),B(`th`,{className:`text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted`,children:`Default`}),B(`th`,{className:`text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted`,children:`Description`})]})}),B(`tbody`,{children:t.map((e,t)=>V(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:[V(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:[B(`code`,{className:`rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400`,children:e.name}),e.required&&B(`span`,{className:`ml-1 text-red-400 font-bold`,children:`*`})]}),B(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:B(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted`,children:e.type})}),B(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:e.defaultValue?B(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400`,children:e.defaultValue}):B(`span`,{className:`text-text-dim`,children:`—`})}),B(`td`,{className:`px-4 py-2.5 border-b border-border-subtle text-text-muted`,children:e.description})]},`${e.name}-${t}`))})]})})]})}function gn(e){let{code:t,children:n,preview:r}=e;return{initialCode:I(()=>(t??(typeof n==`string`?n:``)).trim(),[t,n]),previewElement:I(()=>r??(typeof n==`string`?null:n),[r,n])}}function _n(e){let{highlightedHtml:t,hideCode:n=!1,hideCopy:r=!1}=e,{initialCode:i,previewElement:a}=gn(e);return V(`div`,{className:`my-6 overflow-hidden rounded-xl border border-border-subtle`,children:[B(`div`,{className:`flex items-center justify-center p-8 bg-bg-surface`,children:a}),!n&&B(`div`,{className:`border-t border-border-subtle`,children:B(J,{hideCopy:r,lang:`tsx`,highlightedHtml:t,plain:!0,children:i})})]})}const vn=e=>{let[t,n]=R(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)},handleOpenRaw:()=>{let t=new Blob([e],{type:`text/plain;charset=utf-8`}),n=URL.createObjectURL(t);window.open(n,`_blank`)}}};function yn({content:e,mdxRaw:t,config:n}){let r=t||e||``,{copied:i,handleCopy:a,handleOpenRaw:o}=vn(r),s=n!==!1,l=typeof n==`object`&&n.text||`Copy Markdown`;return!s||!r?null:B(`div`,{className:`relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200`,children:V(v,{className:`rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden`,children:[B(c,{variant:`ghost`,onPress:a,icon:B(i?W:Ie,{size:16}),iconPosition:`left`,className:A(`px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0`,`text-text-main transition-all duration-300 hover:bg-primary-500/5`,i&&`text-emerald-500 hover:bg-emerald-500/5`),children:i?`Copied!`:l}),V(E.Trigger,{placement:`bottom end`,children:[B(c,{variant:`ghost`,isIconOnly:!0,icon:B(G,{size:14}),className:A(`px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0`,`transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500`)}),V(E.Root,{className:`w-52`,children:[V(E.Item,{onAction:a,children:[B(Ie,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),B(`span`,{className:`font-medium text-[0.8125rem]`,children:`Copy Markdown`})]}),V(E.Item,{onAction:o,children:[B(Le,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),B(`span`,{className:`font-medium text-[0.8125rem]`,children:`View as Markdown`})]})]})]})]})})}var bn=at({Admonition:()=>Y,Badge:()=>It,Button:()=>yt,Card:()=>zt,Cards:()=>Rt,Caution:()=>Jt,CodeBlock:()=>J,ComponentPreview:()=>_n,ComponentProps:()=>hn,CopyMarkdown:()=>yn,Danger:()=>Gt,Field:()=>fn,FileTree:()=>ln,Image:()=>mn,Important:()=>qt,InfoBox:()=>Kt,Link:()=>pn,List:()=>en,Note:()=>Ht,Tab:()=>Mt,Table:()=>dn,Tabs:()=>Nt,Tip:()=>Ut,Video:()=>Pt,Warning:()=>Wt});function xn(){return B(`div`,{className:A(`w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in`),children:V(`div`,{className:`mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10`,children:[V(`div`,{className:`flex gap-2`,children:[B(w,{className:`h-3 w-16`}),B(w,{className:`h-3 w-24`})]}),B(w,{className:`h-10 w-[60%] sm:h-12`}),V(`div`,{className:`space-y-3`,children:[B(w,{className:`h-4 w-full`}),B(w,{className:`h-4 w-[95%]`}),B(w,{className:`h-4 w-[40%]`})]}),V(`div`,{className:`space-y-6 pt-4`,children:[B(w,{className:`h-7 w-32`}),V(`div`,{className:`space-y-3`,children:[B(w,{className:`h-4 w-full`}),B(w,{className:`h-4 w-[98%]`}),B(w,{className:`h-4 w-[92%]`}),B(w,{className:`h-4 w-[60%]`})]})]}),B(w,{className:`h-32 w-full rounded-lg bg-bg-muted/50`}),V(`div`,{className:`space-y-6 pt-4`,children:[B(w,{className:`h-7 w-48`}),V(`div`,{className:`space-y-3`,children:[B(w,{className:`h-4 w-full`}),B(w,{className:`h-4 w-[85%]`})]})]})]})})}const Z=({level:e,id:t,children:n,...r})=>V(`h${e}`,{id:t,...r,className:`boltdocs-heading`,children:[n,t&&B(`a`,{href:`#${t}`,className:`header-anchor`,"aria-label":`Anchor`,children:B(Je,{size:16})})]}),Sn={...bn,Loading:xn,h1:e=>B(Z,{level:1,...e}),h2:e=>B(Z,{level:2,...e}),h3:e=>B(Z,{level:3,...e}),h4:e=>B(Z,{level:4,...e}),h5:e=>B(Z,{level:5,...e}),h6:e=>B(Z,{level:6,...e}),pre:e=>B(J,{...e,children:e.children})};function Cn({config:e}){let{currentLocale:t}=g();return F(()=>{if(!e.i18n||typeof document>`u`)return;let n=t||e.i18n.defaultLocale,r=e.i18n.localeConfigs?.[n];document.documentElement.lang=r?.htmlLang||n||`en`,document.documentElement.dir=r?.direction||`ltr`},[t,e.i18n]),null}function wn({config:e}){let t=j(),{setLocale:n,setVersion:r,currentLocale:i,currentVersion:a}=g();return F(()=>{let o=t.pathname.split(`/`).filter(Boolean),s=0,c=e.versions?.defaultVersion,l=e.i18n?.defaultLocale;if(o[s]===`docs`&&s++,e.versions&&o.length>s){let t=e.versions.versions.find(e=>e.path===o[s]);t&&(c=t.path,s++)}e.i18n&&o.length>s&&e.i18n.locales[o[s]]?l=o[s]:e.i18n&&o.length===0&&(l=i||e.i18n.defaultLocale),l!==i&&n(l||``),c!==a&&r(c??``)},[t.pathname,e,n,r,i,a]),null}function Tn({config:e,routes:r,components:i={}}){let a=I(()=>({...Sn,...nt,...i}),[i]),s=me();return B(we,{children:B(o,{children:B(_t,{children:B(ut,{components:a,children:B(t.Provider,{value:e,children:B(n,{routes:r,children:V(Se,{navigate:s,children:[B(vt,{}),B(wn,{config:e}),B(Cn,{config:e}),B(fe,{})]})})})})})})})}function En(){return B(`div`,{className:`flex items-center justify-center min-h-[60vh] text-center`,children:V(`div`,{className:`space-y-4`,children:[B(`span`,{className:`text-8xl font-black tracking-tighter text-primary-500/20`,children:`404`}),B(`h1`,{className:`text-2xl font-bold text-text-main`,children:`Page Not Found`}),B(`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.`}),V(k,{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:[B(De,{size:16}),` Go to Home`]})]})})}function Dn(e,t){let n=t.replace(/\\/g,`/`);return Object.keys(e).find(e=>e.endsWith(`/${n}`)||e.endsWith(n))}function On(e){let{routesData:t,config:n,mdxModules:r,Layout:i,homePage:a,externalPages:o,externalLayout:s,components:c}=e,l=s||i,u=e=>{let t=n.base||`/`;return e.startsWith(t)?e:`${t===`/`?``:t.replace(/\/$/,``)}${e.startsWith(`/`)?e:`/${e}`}`||`/`},d=[...t.map(e=>{let t=Dn(r,e.filePath),n=t?r[t]?.default:null,i=u(e.path===``?`/`:e.path);return{path:i,element:B(ft,{MDXComponent:n,mdxComponents:c}),loader:async()=>({path:i,frontmatter:{title:e.title,description:e.description||``},headings:e.headings||[],filePath:e.filePath,locale:e.locale,version:e.version,group:e.group,groupTitle:e.groupTitle}),getStaticPaths:()=>[i]}})];if(a){let e=[u(`/`)];n.i18n&&Object.keys(n.i18n.locales).forEach(t=>{e.push(u(`/${t}`))}),e.forEach(e=>{d.find(t=>t.path===e)||d.push({path:e,element:B(l,{children:B(a,{})}),getStaticPaths:()=>[e]})})}return o&&Object.entries(o).forEach(([e,t])=>{let r=u(e);d.find(e=>e.path===r)||(d.push({path:r,element:B(l,{children:B(t,{})}),getStaticPaths:()=>[r]}),n.i18n&&Object.keys(n.i18n.locales).forEach(n=>{let r=u(`/${n}${e===`/`?``:e}`);d.find(e=>e.path===r)||d.push({path:r,element:B(l,{children:B(t,{})}),getStaticPaths:()=>[r]})}))}),d.push({path:`*`,element:B(l,{children:B(En,{})})}),[{element:B(Tn,{config:n,routes:[...t],components:c}),children:d}]}function Q(e,t){return e?typeof e==`string`?e:t&&e[t]?e[t]:Object.values(e)[0]||``:``}function kn(){let e=_(),{theme:t,resolvedTheme:n}=q(),r=j(),{currentLocale:i}=m(),a=e.theme||{},o=Q(a.title,i)||`Boltdocs`,s=a.navbar||[],c=a.socialLinks||[],l=a.githubRepo,u=s.map(t=>{let n=t.href||t.to||t.link||``;return{label:Q(t.label||t.text,i),href:n,active:(t=>{let n=r.pathname;if(n===t)return!0;if(!t||t===`/`)return n===`/`;let i=t=>{let n=t.split(`/`).filter(Boolean),r=0;return e.i18n?.locales&&n[r]&&e.i18n.locales[n[r]]&&r++,e.versions?.versions&&n[r]&&e.versions.versions.some(e=>e.path===n[r])&&r++,n.slice(r)},a=i(t),o=i(n);return a.length===0?o.length===0:o.length<a.length?!1:a.every((e,t)=>o[t]===e)})(n),to:n.startsWith(`http`)||n.startsWith(`//`)?`external`:void 0}}),d=a.logo;return{links:u,title:o,logo:d?typeof d==`string`?d:n===`dark`?d.dark:d.light:null,logoProps:{alt:(d&&typeof d==`object`?d.alt:void 0)||o,width:d&&typeof d==`object`?d.width:void 0,height:d&&typeof d==`object`?d.height:void 0},github:l?`https://github.com/${l}`:null,social:c,config:e,theme:t}}function An(e){let t=_(),n=j(),r=e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e,i=r(n.pathname),a=e.find(e=>r(e.path)===i),o=a?.tab?.toLowerCase(),s=o?e.filter(e=>!e.tab||e.tab.toLowerCase()===o):e,c=[],l=new Map;for(let e of s)e.group?(l.has(e.group)||l.set(e.group,{slug:e.group,title:e.groupTitle||e.group,routes:[],icon:e.groupIcon}),l.get(e.group).routes.push(e)):c.push(e);return{groups:Array.from(l.values()).map(e=>{let t=new Map,n=new Map;for(let r of e.routes)r.subRouteGroup&&((r.path.endsWith(`/${r.subRouteGroup}`)||r.path.endsWith(`/${r.subRouteGroup}/`))&&!t.has(r.subRouteGroup)?t.set(r.subRouteGroup,r):(n.has(r.subRouteGroup)||n.set(r.subRouteGroup,[]),n.get(r.subRouteGroup).push(r)));let r=[],i=new Set;for(let a of e.routes)if(a.subRouteGroup){if(!i.has(a.subRouteGroup)){i.add(a.subRouteGroup);let e=t.get(a.subRouteGroup),o=n.get(a.subRouteGroup)||[];e?r.push({...e,subRoutes:o}):r.push(...o)}}else r.push(a);return{...e,routes:r}}),ungrouped:c,activeRoute:a,activePath:i,config:t}}function jn(e=[]){let[t,n]=R(null);return{headings:e,activeId:t,setActiveId:n}}function Mn(e=[],t=[]){let n=j(),r=L([]),[i,a]=R({opacity:0,transform:`translateX(0) scaleX(0)`,width:0}),o=e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e,s=o(n.pathname),c=t.find(e=>o(e.path)===s)?.tab?.toLowerCase(),l=e.findIndex(e=>e.id.toLowerCase()===c),u=l===-1?0:l;return F(()=>{let e=r.current[u];e&&a({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[u,e.length,n.pathname]),{tabs:e,activeIndex:u,indicatorStyle:i,tabRefs:r,activeTabId:c}}function $(e,t,n){let r=e;return t&&(r===t||r.startsWith(t+`/`))&&(r=r===t?`index.md`:r.slice(t.length+1)),n&&(r===n||r.startsWith(n+`/`))&&(r=r===n?`index.md`:r.slice(n.length+1)),r}function Nn(){let e=me(),t=m(),{allRoutes:n,currentRoute:r,currentVersion:i,currentLocale:a,config:o}=t,s=o.versions,{setVersion:c}=g(),l=t=>{if(!s||t===i)return;c(t);let o=`/docs/${t}`;if(r){let e=$(r.filePath,r.version,r.locale),i=n.find(n=>$(n.filePath,n.version,n.locale)===e&&(n.version||s.defaultVersion)===t&&(a?n.locale===a:!n.locale));if(i)o=i.path;else{let e=n.find(e=>$(e.filePath,e.version,e.locale)===`index.md`&&(e.version||s.defaultVersion)===t&&(a?e.locale===a:!e.locale));o=e?e.path:`/docs/${t}${a?`/${a}`:``}`}}e(o)},u=t.availableVersions.map(e=>({...e,label:e.label,value:e.key}));return{currentVersion:i,currentVersionLabel:t.currentVersionLabel,availableVersions:u,handleVersionChange:l}}function Pn(){let e=me(),{allRoutes:t,currentRoute:n,currentLocale:r,config:i}=m(),a=i.i18n,{setLocale:o}=g();return{currentLocale:r,currentLocaleLabel:i.i18n?.localeConfigs?.[r]?.label||i.i18n?.locales[r]||r,availableLocales:i.i18n?Object.entries(i.i18n.locales).map(([e,t])=>({key:e,label:i.i18n?.localeConfigs?.[e]?.label||t,value:e,isCurrent:e===r})):[],handleLocaleChange:i=>{if(!a||i===r)return;o(i);let s=`/`;if(n){let e=$(n.filePath,n.version,n.locale),r=t.find(t=>$(t.filePath,t.version,t.locale)===e&&(t.locale||a.defaultLocale)===i&&t.version===n.version);if(r)s=r.path;else{let e=t.find(e=>$(e.filePath,e.version,e.locale)===`index.md`&&(e.locale||a.defaultLocale)===i&&e.version===n.version);s=e?e.path:i===a.defaultLocale?n.version?`/${n.version}`:`/`:n.version?`/${n.version}/${i}`:`/${i}`}}else{let e=t.find(e=>(e.filePath===`index.mdx`||e.filePath===`index.md`)&&(e.locale||a.defaultLocale)===i&&!e.version);s=e?e.path:i===a.defaultLocale?`/`:`/${i}`}e(s)}}}function Fn(){let{routes:e,currentRoute:t}=m(),n=j();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let r=t.tab?.toLowerCase(),i=r?e.filter(e=>e.tab?.toLowerCase()===r):e.filter(e=>!e.tab),a=i.findIndex(e=>e.path===n.pathname);return{prevPage:a>0?i[a-1]:null,nextPage:a!==-1&&a<i.length-1?i[a+1]:null,currentRoute:t}}function In(){let{currentRoute:e}=m(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}const Ln=()=>j();function Rn({children:e,className:t,style:n}){return B(`div`,{className:A(`h-screen flex flex-col overflow-hidden bg-bg-main text-text-main`,t),style:n,children:e})}function zn({children:e,className:t,style:n}){return B(`div`,{className:A(`mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden`,t),style:n,children:e})}function Bn({children:e,className:t,style:n}){return B(`main`,{className:A(`boltdocs-content flex-1 min-w-0 overflow-y-auto`,`contain-layout`,t),style:n,children:e})}function Vn({children:e,className:t,style:n}){let{pathname:r}=Ln();return B(`div`,{className:A(`boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8`,{"max-w-content-max":r.includes(`/docs/`)},t),style:n,children:e})}function Hn({children:e,className:t,style:n}){return B(`div`,{className:A(`flex items-center justify-between mb-10`,t),style:n,children:e})}function Un({children:e,className:t,style:n}){return B(`div`,{className:A(`mt-20`,t),style:n,children:e})}const Wn=Object.assign(Rn,{Body:zn,Content:Bn,ContentMdx:Vn,ContentHeader:Hn,ContentFooter:Un});function Gn(){let{theme:e,setTheme:t}=q(),[n,r]=R(!1);if(F(()=>{r(!0)},[]),!n)return B(`div`,{className:`h-9 w-9`});let i=e===`system`?Ye:e===`dark`?Xe:$e;return V(E.Trigger,{placement:`bottom right`,children:[B(U,{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:B(i,{size:20,className:`animate-in fade-in zoom-in duration-300`})}),V(E.Root,{selectionMode:`single`,selectedKeys:[e],onSelectionChange:e=>{let n=Array.from(e)[0];t(n)},children:[V(E.Item,{id:`light`,children:[B($e,{size:16}),B(`span`,{children:`Light`})]}),V(E.Item,{id:`dark`,children:[B(Xe,{size:16}),B(`span`,{children:`Dark`})]}),V(E.Item,{id:`system`,children:[B(Ye,{size:16}),B(`span`,{children:`System`})]})]})]})}async function Kn(e,t,n=`https://api.github.com`){let r=new Headers;t&&r.append(`authorization`,t);let i=await(await fetch(`${n}/repos/${e}`,{headers:r})).json();return i.stargazers_count===void 0?`0`:qn(i.stargazers_count)}const qn=e=>Intl.NumberFormat(`en`,{notation:`compact`,compactDisplay:`short`}).format(e);function Jn({repo:e}){let[t,n]=R(null);return F(()=>{e&&Kn(e).then(e=>n(e)).catch(()=>n(`0`))},[e]),V(`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:[B(d,{className:`h-4 w-4`}),t&&B(`span`,{className:`tabular-nums`,children:t})]})}function Yn({tabs:e,routes:t}){let{currentLocale:n}=m(),{indicatorStyle:r,tabRefs:i,activeIndex:a}=Mn(e,t),o=e=>{if(!e)return null;if(e.trim().startsWith(`<svg`))return B(`span`,{className:`h-4 w-4`,dangerouslySetInnerHTML:{__html:e}});let t=Te[e];return t?B(t,{size:16}):B(`img`,{src:e,alt:``,className:`h-4 w-4 object-contain`})};return B(`div`,{className:`mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6`,children:V(b.List,{className:`border-none py-0`,children:[e.map((e,r)=>{let s=r===a,c=t.find(t=>t.tab&&t.tab.toLowerCase()===e.id.toLowerCase());return V(k,{href:c?c.path:`#`,ref:e=>{i.current[r]=e},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${s?`text-primary-500`:`text-text-muted hover:text-text-main`}`,children:[o(e.icon),B(`span`,{children:Q(e.text,n)})]},e.id)}),B(b.Indicator,{style:r})]})})}const Xn=ye(()=>import(`../search-dialog-3lvKsbVG.js`).then(e=>({default:e.SearchDialog})));function Zn(){let{links:e,title:t,logo:n,logoProps:r,github:i,social:a,config:o}=kn(),{routes:s,allRoutes:c,currentVersion:l,currentLocale:u}=m(),{pathname:d}=j(),f=o.theme||{},p=d.startsWith(`/docs`),h=f?.tabs&&f.tabs.length>0;return V(O.Root,{className:h?`border-b-0`:``,children:[V(O.Content,{children:[V(O.Left,{children:[n&&B(O.Logo,{src:n,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),B(O.Title,{children:t}),o.versions&&l&&B($n,{})]}),B(O.Center,{children:B(_e,{fallback:B(`div`,{className:`h-9 w-32 animate-pulse rounded-md bg-bg-surface`}),children:B(Xn,{routes:s||[]})})}),V(O.Right,{children:[B(O.Links,{children:e.map(e=>B(Qn,{link:e},e.href))}),o.i18n&&u&&B(er,{}),B(O.Split,{}),B(Gn,{}),i&&B(Jn,{repo:f?.githubRepo??``}),a.length>0&&B(O.Split,{}),B(`div`,{className:`flex items-center gap-1`,children:a.map(({icon:e,link:t})=>B(O.Socials,{icon:e,link:t,className:`p-1.5`},t))})]})]}),p&&h&&f?.tabs&&B(`div`,{className:`w-full border-b border-border-subtle bg-bg-main`,children:B(Yn,{tabs:f.tabs,routes:c||s||[]})})]})}function Qn({link:e}){let t=de(e.href||``);return B(O.Link,{...e,href:t})}function $n(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:n}=Nn();return t.length===0?null:V(E.Trigger,{children:[B(c,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:B(G,{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:B(`span`,{className:`font-semibold text-[0.8125rem]`,children:e})}),B(E.Root,{children:B(E.Section,{items:t,children:e=>B(E.Item,{onPress:()=>n(e.value),children:e.label},`${e.value??``}`)})})]})}function er(){let{currentLocale:e,availableLocales:t,handleLocaleChange:n}=Pn();return t.length===0?null:V(E.Trigger,{children:[B(c,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:B(G,{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:V(`div`,{className:`flex items-center gap-1.5`,children:[B(Ke,{className:`w-3.5 h-3.5 text-primary-500`}),B(`span`,{className:`font-bold text-[0.75rem] uppercase opacity-90`,children:e||`en`})]})}),B(E.Root,{children:B(E.Section,{items:t,children:e=>B(E.Item,{onPress:()=>n(e.value),children:V(`div`,{className:`flex items-center justify-between w-full gap-4`,children:[B(`span`,{children:e.label}),B(`span`,{className:`text-[10px] font-bold opacity-40 uppercase tracking-tighter`,children:e.value})]})},`${e.value??``}`)})})]})}function tr(){return B(`div`,{className:`flex items-center justify-center mt-10 mb-4 px-4 w-full`,children:V(`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:[B(tt,{className:`w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300`,fill:`currentColor`}),V(`span`,{className:`text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide`,children:[`Powered by`,` `,B(`strong`,{className:`font-bold text-text-main/80 group-hover:text-text-main`,children:`Boltdocs`})]})]})})}function nr(e){if(!e)return;let t={...Te,...rt};return t[e]||t[e+`Icon`]||void 0}function rr({route:e,activePath:t,getIcon:n}){let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path),i=I(()=>e.subRoutes?.some(e=>e.path===t),[e.subRoutes,t]),[a,o]=R(i||r);return F(()=>{(i||r)&&o(!0)},[i,r]),B(D.SubGroup,{label:e.title,href:e.path,active:r,icon:n(e.icon),badge:e.badge,isOpen:a,onToggle:()=>o(!a),children:e.subRoutes?.map(e=>{let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return B(D.Link,{label:e.title,href:e.path,active:r,icon:n(e.icon),badge:e.badge},e.path)})})}function ir({group:e,activePath:t,getIcon:n}){return B(D.Group,{title:e.title,icon:n(e.icon),children:e.routes.map(e=>{if(e.subRoutes&&e.subRoutes.length>0)return B(rr,{route:e,activePath:t,getIcon:n},e.path);let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return B(D.Link,{label:e.title,href:e.path,active:r,icon:n(e.icon),badge:e.badge},e.path)})})}function ar({routes:e,config:t}){let{groups:n,ungrouped:r,activePath:i}=An(e),a=t.theme||{};return V(D.Root,{children:[r.length>0&&B(D.Group,{className:`mb-6`,children:r.map(e=>{let t=i===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return B(D.Link,{label:e.title,href:e.path,active:t,icon:nr(e.icon),badge:e.badge},e.path)})}),n.map(e=>B(ir,{group:e,activePath:i,getIcon:nr},e.slug)),a?.poweredBy&&B(`div`,{className:`mt-auto pt-8`,children:B(tr,{})})]})}function or({headings:e=[],editLink:t,communityHelp:n,filePath:r}){let{headings:i}=jn(e),a=I(()=>i.map(e=>({title:e.text,url:`#${e.id}`,depth:e.level})),[i]);return i.length===0?null:B(le,{toc:a,children:B(sr,{headings:i,editLink:t,communityHelp:n,filePath:r})})}function sr({headings:e,editLink:t,communityHelp:n,filePath:r}){let i=se(),[a,o]=R({opacity:0}),s=L(null),c=L(null);F(()=>{if(!i||!s.current)return;let e=s.current.querySelector(`a[href="#${i}"]`);e&&o({transform:`translateY(${e.offsetTop}px)`,height:`${e.offsetHeight}px`,opacity:1})},[i]);let l=P((e,t)=>{e.preventDefault();let n=document.getElementById(t);n&&(n.scrollIntoView({behavior:`smooth`}),window.history.pushState(null,``,`#${t}`))},[]);return V(x.Root,{children:[V(x.Header,{className:`flex flex-row gap-x-2`,children:[B(et,{size:16}),`On this page`]}),B(te,{containerRef:c,children:V(x.Content,{className:`max-h-[450px] boltdocs-otp-scroll-area`,ref:c,children:[B(x.Indicator,{style:a}),B(`ul`,{className:`relative space-y-2 border-l border-border-subtle`,ref:s,children:e.map(e=>B(x.Item,{level:e.level,children:B(x.Link,{href:`#${e.id}`,active:i===e.id,onClick:t=>l(t,e.id),className:`pl-4`,children:e.text})},e.id))})]})}),(t||n)&&V(`div`,{className:`mt-8 pt-8 border-t border-border-subtle space-y-4`,children:[B(`p`,{className:`text-xs font-bold uppercase text-text-main`,children:`Need help?`}),V(`ul`,{className:`space-y-3`,children:[t&&r&&B(`li`,{children:V(`a`,{href:t.replace(`:path`,r),target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors`,children:[B(Ze,{size:16}),`Edit this page`]})}),n&&B(`li`,{children:V(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors`,children:[B(Fe,{size:16}),`Community help`]})})]})]})]})}function cr({siteTitle:e,siteDescription:t,routes:n}){let r=j(),i=_(),a=n?.find?.(e=>e.path===r.pathname),o=a?.title,s=a?.description||t||``,c=o?`${o} | ${e}`:e,l=a?.seo||{},u=i?.seo?.metatags||{},d=i?.seo?.thumbnails?.background,f=l[`og:image`]||d;return V(Ce,{children:[B(`title`,{children:c}),B(`meta`,{name:`description`,content:s}),B(`meta`,{property:`og:title`,content:c}),B(`meta`,{property:`og:description`,content:s}),B(`meta`,{property:`og:type`,content:`article`}),typeof window<`u`&&B(`meta`,{property:`og:url`,content:window.location.href}),typeof window<`u`&&B(`link`,{rel:`canonical`,href:window.location.origin+r.pathname}),B(`meta`,{name:`twitter:card`,content:`summary`}),B(`meta`,{name:`twitter:title`,content:c}),B(`meta`,{name:`twitter:description`,content:s}),f&&B(`meta`,{name:`twitter:image`,content:f}),f&&B(`meta`,{property:`og:image`,content:f}),B(`meta`,{name:`generator`,content:`Boltdocs`}),Object.entries(u).map(([e,t])=>e.startsWith(`og:`)||e.startsWith(`music:`)||e.startsWith(`video:`)||e.startsWith(`article:`)||e.startsWith(`book:`)||e.startsWith(`profile:`)?B(`meta`,{property:e,content:t},e):B(`meta`,{name:e,content:t},e)),Object.entries(l).map(([e,t])=>e===`noindex`&&t===!0?B(`meta`,{name:`robots`,content:`noindex`},`noindex`):e===`robots`?B(`meta`,{name:`robots`,content:t},`robots`):e===`canonical`?B(`link`,{rel:`canonical`,href:t},`canonical`):e.startsWith(`og:`)||e.startsWith(`music:`)||e.startsWith(`video:`)||e.startsWith(`article:`)||e.startsWith(`book:`)||e.startsWith(`profile:`)?B(`meta`,{property:e,content:t},e):B(`meta`,{name:e,content:t},e))]})}function lr(){let{crumbs:e,activeRoute:t}=In(),n=_().theme||{};return e.length===0||!n?.breadcrumbs?null:V(T.Root,{children:[B(T.Item,{children:B(T.Link,{href:`/`,children:B(We,{size:14})})}),e.map((e,n)=>V(T.Item,{children:[B(T.Separator,{}),B(T.Link,{href:e.href,className:A({"font-medium text-text-main":e.href===t?.path}),children:e.label})]},`crumb-${e.href}-${e.label}-${n}`))]})}function ur(){let{prevPage:e,nextPage:t}=Fn();return!e&&!t?null:V(C.Root,{className:`animate-in fade-in slide-in-from-bottom-4 duration-700`,children:[e?V(C.Link,{to:e.path,direction:`prev`,children:[B(C.Title,{children:`Previous`}),B(C.Description,{children:e.title})]}):B(`div`,{}),t&&V(C.Link,{to:t.path,direction:`next`,children:[B(C.Title,{children:`Next`}),B(C.Description,{children:t.title})]})]})}var dr=class extends ge{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`Uncaught error in Boltdocs Layout:`,e,t)}render(){return this.state.hasError?this.props.fallback||V(`div`,{className:`flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4`,children:[B(`div`,{className:`text-lg font-bold text-red-400`,children:`Something went wrong`}),B(`p`,{className:`text-sm text-text-muted max-w-md`,children:this.state.error?.message||`An unexpected error occurred while rendering this page.`}),B(c,{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{Y as Admonition,le as AnchorProvider,It as Badge,Tn as BoltdocsShell,lr as Breadcrumbs,yt as Button,v as ButtonGroup,zt as Card,Rt as Cards,Jt as Caution,J as CodeBlock,_n as ComponentPreview,hn as ComponentProps,yn as CopyMarkdown,Gt as Danger,Wn as DocsLayout,dr as ErrorBoundary,fn as Field,ln as FileTree,cr as Head,mn as Image,qt as Important,Kt as InfoBox,pn as Link,en as List,xn as Loading,ft as MdxPage,Zn as Navbar,En as NotFound,Ht as Note,or as OnThisPage,ur as PageNav,T as PrimitiveBreadcrumbs,c as PrimitiveButton,k as PrimitiveLink,E as PrimitiveMenu,y as PrimitiveNavLink,O as PrimitiveNavbar,ee as PrimitiveNavigationMenu,x as PrimitiveOnThisPage,C as PrimitivePageNav,ie as PrimitivePopover,D as PrimitiveSidebar,w as PrimitiveSkeleton,b as PrimitiveTabs,ue as PrimitiveTooltip,te as ScrollProvider,ne as SearchDialogPrimitive,ar as Sidebar,Mt as Tab,dn as Table,Nt as Tabs,Ut as Tip,Pt as Video,Wt as Warning,A as cn,On as createRoutes,Q as getTranslated,se as useActiveAnchor,oe as useActiveAnchors,In as useBreadcrumbs,_ as useConfig,Pn as useI18n,re as useItems,de as useLocalizedTo,Ln as useLocation,lt as useMdxComponents,kn as useNavbar,jn as useOnThisPage,Fn as usePageNav,m as useRoutes,ce as useSearch,An as useSidebar,Mn as useTabs,q as useTheme,Nn as useVersion};
|
|
6
|
+
import{A as e,B as t,C as n,D as r,E as i,F as a,H as o,I as s,L as c,M as l,N as u,O as d,P as f,R as p,S as m,T as h,U as g,V as _,_ as ee,a as v,b as te,c as ne,d as y,f as re,g as ie,h as ae,i as oe,j as b,k as se,l as x,m as ce,n as S,o as C,p as le,r as w,s as T,t as ue,u as de,v as E,w as fe,x as pe,y as D,z as O}from"../use-search-CS3gH19M.js";import{Outlet as me,useLoaderData as he,useLocation as k,useNavigate as ge}from"react-router-dom";import _e from"virtual:boltdocs-layout";import{Children as A,Component as ve,Suspense as ye,createContext as be,isValidElement as j,lazy as xe,use as Se,useCallback as M,useEffect as N,useLayoutEffect as Ce,useMemo as P,useRef as F,useState as I}from"react";import{Fragment as L,jsx as R,jsxs as z}from"react/jsx-runtime";import*as B from"react-aria-components";import{Button as V,RouterProvider as we}from"react-aria-components";import*as Te from"react-helmet-async";import*as Ee from"lucide-react";import{AlertTriangle as De,ArrowLeft as Oe,Bookmark as ke,Check as H,ChevronDown as U,ChevronLeft as Ae,ChevronRight as W,ChevronUp as je,ChevronsLeft as Me,ChevronsRight as Ne,Circle as Pe,CircleHelp as Fe,Copy as Ie,ExternalLink as Le,File as Re,FileCode as ze,FileImage as Be,FileText as Ve,Flame as He,Folder as Ue,Home as We,Info as Ge,Languages as Ke,Lightbulb as qe,Link as Je,Monitor as Ye,Moon as Xe,Pencil as Ze,ShieldAlert as Qe,Sun as $e,TextAlignStart as et,Zap as tt}from"lucide-react";import{cva as G}from"class-variance-authority";import nt from"virtual:boltdocs-mdx-components";import rt from"virtual:boltdocs-icons";var it=Object.defineProperty,at=(e,t)=>{let n={};for(var r in e)it(n,r,{get:e[r],enumerable:!0});return t||it(n,Symbol.toStringTag,{value:`Module`}),n};const ot=Symbol.for(`__BDOCS_MDX_COMPONENTS_CONTEXT__`),K=Symbol.for(`__BDOCS_MDX_COMPONENTS_INSTANCE__`),st=globalThis[ot]||(globalThis[ot]=be({}));function ct(){let e=Se(st);return(!e||Object.keys(e).length===0)&&globalThis[K]?globalThis[K]:e}function lt({components:e,children:t}){return typeof globalThis<`u`&&(globalThis[K]=e),R(st.Provider,{value:e,children:t})}function ut({route:e,content:t,mdxComponents:n}){let r=ct(),i=P(()=>({...r,...n}),[r,n]);return t?R(_e,{route:e,children:R(t,{components:i})}):null}function dt({MDXComponent:e,mdxComponents:t}){let n=he(),r=e||n?.MDXComponent,i=t||n?.mdxComponents;return r?R(ut,{route:{path:n.path,filePath:n.filePath,title:n.frontmatter.title,description:n.frontmatter.description,headings:n.headings,locale:n.locale,version:n.version,group:n.group,groupTitle:n.groupTitle},content:r,mdxComponents:i}):null}const ft=Symbol.for(`__BDOCS_THEME_CONTEXT__`),pt=Symbol.for(`__BDOCS_THEME_INSTANCE__`),mt=`boltdocs-theme-change`,ht=globalThis[ft]||(globalThis[ft]=be(void 0));function gt({children:e}){let[t,n]=I(`system`),[r,i]=I(`dark`),a=e=>{let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=e===`dark`||e===`system`&&t.matches,r=window.document.documentElement;r.classList.toggle(`dark`,n),r.dataset.theme=n?`dark`:`light`,i(n?`dark`:`light`)};N(()=>{let e=localStorage.getItem(`boltdocs-theme`);e?(n(e),a(e)):a(`system`);let t=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>{(localStorage.getItem(`boltdocs-theme`)||`system`)===`system`&&a(`system`)};return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[]);let o={theme:t,resolvedTheme:r,setTheme:e=>{n(e),localStorage.setItem(`boltdocs-theme`,e),a(e),typeof window<`u`&&window.dispatchEvent(new CustomEvent(mt,{detail:e}))}};return typeof globalThis<`u`&&(globalThis[pt]=o),R(ht.Provider,{value:o,children:e})}function q(){let e=Se(ht),[,t]=I({});if(N(()=>{if(e)return;let n=()=>t({});return window.addEventListener(mt,n),()=>window.removeEventListener(mt,n)},[e]),!e&&typeof globalThis<`u`&&globalThis[pt])return globalThis[pt];if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function _t(){let{pathname:e,hash:t}=k();return Ce(()=>{let e=document.querySelector(`.boltdocs-content`)||window,n=()=>e===window?window.scrollY:e.scrollTop,r=(t,n=`auto`)=>{e===window?window.scrollTo({top:t,behavior:n}):e.scrollTo({top:t,behavior:n})};if(t){let i=t.replace(`#`,``),a=document.getElementById(i);if(a){let t=e===window?0:e.getBoundingClientRect().top;r(a.getBoundingClientRect().top-t-80+n(),`smooth`);return}}r(0)},[e,t]),null}const vt=({className:e,variant:t,size:n,rounded:r,iconSize:i,disabled:a,...o})=>R(c,{className:O(`group`,p({variant:t,size:n,rounded:r,iconSize:i,disabled:a,className:e})),...o}),yt=(e,t)=>{if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`||typeof e==`number`)return String(e);if(Array.isArray(e))return e.map(e=>yt(e,t)).join(``);if(j(e)){let n=t?.get(e.type);return n?n(e.props):yt(e.props.children,t)}return``},bt=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);return t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t),!0}};function xt(e){let{title:t}=e,[n,r]=I(!1),[i,a]=I(!1),[o,s]=I(!1),c=F(null);_();let l=M(async()=>{bt(c.current?.textContent??``),r(!0),setTimeout(()=>r(!1),2e3)},[]);return N(()=>{s((c.current?.textContent?.length??0)>120)},[e.children,e.highlightedHtml]),{copied:n,isExpanded:i,setIsExpanded:a,isExpandable:o,preRef:c,handleCopy:l,shouldTruncate:o&&!i}}const St=({children:e,className:t,plain:n=!1,...r})=>R(`div`,{className:O(`not-prose boltdocs-code-block`,`group relative overflow-hidden bg-(--color-code-bg)`,`contain-layout contain-paint`,{"my-6 rounded-lg border border-border-subtle":!n},t),...r,children:e}),Ct=({children:e,className:t,...n})=>R(`div`,{className:O(`flex h-9 items-center justify-between px-4 py-1.5`,`border-b border-border-subtle bg-bg-surface/50`,`text-[13px] font-medium text-text-muted`,t),...n,children:e}),wt=({children:e,className:t,...n})=>R(`div`,{className:O(`flex items-center space-x-2`,t),...n,children:e}),Tt=({className:e,children:t,shouldTruncate:n=!1,...r})=>R(`div`,{className:O(`relative`,{"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":n},e),...r,children:t}),Et={ts:a,tsx:l,js:se,jsx:l,json:e,css:r,html:h,md:b,mdx:b,bash:f,sh:f,yaml:s,yml:s,rs:u,rust:u,toml:i},Dt=({copied:e,handleCopy:t})=>R(fe,{content:e?`Copied!`:`Copy code`,children:R(V,{onPress:t,className:O(`grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2`,e?`text-emerald-400`:`text-text-muted hover:text-text-main`),"aria-label":`Copy code`,children:R(e?H:Ie,{size:20})})});function J(e){let{children:t,hideCopy:n=!1,highlightedHtml:r,"data-highlighted-html":i,title:a,"data-title":o,"data-lang":s,plain:c=!1,...l}=e,u=r||i,d=a||o,f=e.lang||s||``,{copied:p,isExpanded:m,setIsExpanded:h,isExpandable:g,preRef:_,handleCopy:ee,shouldTruncate:v}=xt(e),te=Et[f];return z(St,{plain:c,className:e.className,children:[(d||!n)&&z(Ct,{children:[R(wt,{children:d&&z(L,{children:[te?R(te,{size:14}):R(Re,{size:14,className:`opacity-60`}),R(`span`,{children:d})]})}),!n&&R(Dt,{copied:p,handleCopy:ee})]}),z(Tt,{shouldTruncate:v,children:[u?R(`div`,{ref:_,className:`shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!`,dangerouslySetInnerHTML:{__html:u}}):R(`pre`,{ref:_,className:`m-0! p-5! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7] overflow-x-auto`,...l,children:yt(t)}),g&&R(`div`,{className:O(v?`absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10`:`relative flex justify-center py-4`),children:R(V,{onPress:()=>h(!m),className:`rounded-full bg-bg-surface border border-border-subtle px-5 py-2 text-[0.8125rem] font-medium text-text-main outline-none cursor-pointer transition-all hover:bg-border-subtle hover:-translate-y-px backdrop-blur-md`,children:m?`Show less`:`Expand code`})})]})]})}function Ot({initialIndex:e=0,tabs:t}){let n=t[e]?.props.disabled?t.findIndex(e=>!e.props.disabled):e,[r,i]=I(n===-1?0:n),a=F([]),[o,s]=I({opacity:0,transform:`translateX(0)`,width:0});return N(()=>{let e=a.current[r];e&&s({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[r,t]),{active:r,setActive:i,tabRefs:a,indicatorStyle:o,handleKeyDown:M(e=>{let n=0;if(e.key===`ArrowRight`?n=1:e.key===`ArrowLeft`&&(n=-1),n!==0){let e=(r+n+t.length)%t.length;for(;t[e].props.disabled&&e!==r;)e=(e+n+t.length)%t.length;e!==r&&!t[e].props.disabled&&(i(e),a.current[e]?.focus())}},[r,t])}}const kt=G(`relative flex items-center border-b border-border-subtle gap-1 overflow-x-auto no-scrollbar`,{variants:{size:{default:`px-0`,compact:`px-2`}},defaultVariants:{size:`default`}}),At=G(`flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap`,{variants:{isActive:{true:`text-primary-500`,false:`text-text-muted hover:text-text-main`},isDisabled:{true:`opacity-40 pointer-events-none`,false:``}},defaultVariants:{isActive:!1,isDisabled:!1}});function jt({children:e}){return R(`div`,{className:`py-4`,children:typeof e==`string`?R(J,{className:`language-bash`,children:R(`code`,{children:e.trim()})}):e})}function Mt({defaultIndex:e=0,children:t}){let n=P(()=>A.toArray(t).filter(e=>j(e)&&e.props?.label),[t]),{active:r,setActive:i,tabRefs:a,indicatorStyle:o}=Ot({initialIndex:e,tabs:n});return R(`div`,{className:`my-8 w-full group/tabs`,children:z(B.Tabs,{selectedKey:r.toString(),onSelectionChange:e=>i(Number(e)),className:`w-full`,children:[z(B.TabList,{"aria-label":`Content Tabs`,className:O(kt()),children:[n.map((e,t)=>{let{label:n,icon:r,disabled:i}=e.props,o=t.toString();return z(B.Tab,{id:o,isDisabled:i,ref:e=>{a.current[t]=e},className:({isSelected:e,isDisabled:t})=>O(At({isActive:e,isDisabled:t})),children:[!!r&&R(`span`,{className:`shrink-0 [&>svg]:w-4 [&>svg]:h-4`,children:r}),R(`span`,{children:n})]},o)}),R(`div`,{className:`absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none`,style:o,"aria-hidden":`true`})]}),n.map((e,t)=>R(B.TabPanel,{id:t.toString(),children:n[t]},t))]})})}function Nt({src:e,poster:t,alt:n,children:r,controls:i,preload:a=`metadata`,...o}){let s=F(null),[c,l]=I(!1);return N(()=>{let e=s.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e.isIntersecting&&(l(!0),t.disconnect())},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[]),R(`div`,{ref:s,className:`my-6 overflow-hidden rounded-lg border border-border-subtle`,children:c?z(`video`,{className:`block w-full h-auto`,src:e,poster:t,controls:!0,preload:a,playsInline:!0,...o,children:[r,`Your browser does not support the video tag.`]}):R(`div`,{className:`aspect-video bg-bg-surface animate-pulse`,role:`img`,"aria-label":n||`Video`})})}const Pt=G(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight`,{variants:{variant:{default:`bg-bg-surface text-text-muted border-border-subtle`,primary:`bg-primary-500/15 text-primary-400 border-primary-500/20`,success:`bg-emerald-500/15 text-emerald-400 border-emerald-500/20`,warning:`bg-amber-500/15 text-amber-400 border-amber-500/20`,danger:`bg-red-500/15 text-red-400 border-red-500/20`,info:`bg-sky-500/15 text-sky-400 border-sky-500/20`}},defaultVariants:{variant:`default`}});function Ft({variant:e=`default`,children:t,className:n=``,...r}){return R(`span`,{className:O(Pt({variant:e}),n),...r,children:t})}const It=G(`grid gap-4 my-6`,{variants:{cols:{1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`,4:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-4`}},defaultVariants:{cols:3}});function Lt({cols:e=3,children:t,className:n=``,...r}){return R(`div`,{className:O(It({cols:e}),n),...r,children:t})}function Rt({title:e,icon:t,href:n,children:r,className:i=``,...a}){let o=F(null),s=F(null),c=M(e=>{let t=o.current||s.current;if(!t)return;let{left:n,top:r}=t.getBoundingClientRect();t.style.setProperty(`--x`,`${e.clientX-n}px`),t.style.setProperty(`--y`,`${e.clientY-r}px`)},[]),l=z(L,{children:[R(`div`,{className:`pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100`,style:{background:`radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)`}}),t&&R(`div`,{className:`mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3`,children:t}),z(`div`,{className:`space-y-1.5`,children:[e&&R(`h3`,{className:`text-sm font-bold text-text-main`,children:e}),r&&R(`div`,{className:`text-sm text-text-muted leading-relaxed`,children:r})]})]}),u=O(`group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden`,`transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,i);return n?R(B.Link,{ref:s,href:n,className:O(u,`no-underline cursor-pointer`),onMouseMove:c,...a,children:l}):R(`div`,{ref:o,role:`presentation`,className:u,onMouseMove:c,...a,children:l})}const zt={note:R(ke,{size:18}),tip:R(qe,{size:18}),info:R(Ge,{size:18}),warning:R(De,{size:18}),danger:R(Qe,{size:18}),important:R(He,{size:18}),caution:R(tt,{size:18})},Bt=G(`py-4 px-4 rounded-lg flex items-center gap-3 border-[1px] flex-row`,{variants:{type:{note:`border-primary-200 dark:border-primary-800 bg-primary-500/5 text-primary-400`,tip:`border-emerald-200 dark:border-emerald-800 bg-emerald-500/5 text-emerald-500`,info:`border-sky-200 dark:border-sky-800 bg-sky-500/5 text-sky-500`,warning:`border-amber-200 dark:border-amber-800 bg-amber-500/5 text-amber-500`,danger:`border-red-200 dark:border-red-800/70 bg-red-500/5 text-red-500`,important:`border-orange-200 dark:border-orange-800/70 bg-orange-500/5 text-orange-500`,caution:`border-yellow-200 dark:border-yellow-800/70 bg-yellow-500/5 text-yellow-500`}},defaultVariants:{type:`note`}});function Y({type:e=`note`,title:t,children:n,className:r=``,...i}){return z(`div`,{className:O(Bt({type:e}),r),role:e===`warning`||e===`danger`?`alert`:`note`,...i,children:[zt[e],R(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0`,children:n})]})}const Vt=e=>R(Y,{type:`note`,...e}),Ht=e=>R(Y,{type:`tip`,...e}),Ut=e=>R(Y,{type:`warning`,...e}),Wt=e=>R(Y,{type:`danger`,...e}),Gt=e=>R(Y,{type:`info`,...e}),Kt=e=>R(Y,{type:`important`,...e}),qt=e=>R(Y,{type:`caution`,...e}),Jt=G(`my-6 transition-all duration-200`,{variants:{variant:{default:`list-disc pl-5 text-text-muted marker:text-primary-500/50`,number:`list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold`,checked:`list-none p-0`,arrow:`list-none p-0`,bubble:`list-none p-0`},cols:{1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`,4:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-4`},isGrid:{true:`grid gap-x-8 gap-y-3`,false:`space-y-2`},dense:{true:`space-y-1`,false:`space-y-2`}},compoundVariants:[{variant:`default`,dense:!0,className:`space-y-0.5`}],defaultVariants:{variant:`default`,cols:1,isGrid:!1,dense:!1}}),Yt=G(`group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200`,{variants:{variant:{default:``,number:``,checked:`hover:translate-x-0.5`,arrow:`hover:translate-x-0.5`,bubble:`hover:translate-x-0.5`},dense:{true:`py-0`,false:`py-0.5`}},defaultVariants:{variant:`default`,dense:!1}}),Xt=G(`mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110`,{variants:{variant:{bubble:`h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold`,default:``}},defaultVariants:{variant:`default`}});function Zt({icon:e,children:t,variant:n,dense:r}){return z(`li`,{className:O(Yt({variant:n,dense:r})),children:[e&&R(`span`,{className:O(Xt({variant:n===`bubble`?`bubble`:`default`})),children:e}),R(`div`,{className:`flex-1 text-text-muted group-hover:text-text-main transition-colors`,children:t})]})}const Qt={checked:e=>R(H,{size:14,className:O(`text-emerald-500 shrink-0`,e)}),arrow:e=>R(W,{size:14,className:O(`text-primary-400 shrink-0`,e)}),bubble:e=>R(Pe,{size:6,fill:`currentColor`,className:O(`text-primary-500 shrink-0`,e)}),default:()=>null,number:()=>null};function $t({variant:e=`default`,cols:t=1,dense:n=!1,children:r,className:i,...a}){let o=t!==void 0&&Number(t)>1,s=Qt[e],c=Jt({variant:e,cols:t,dense:n,isGrid:o,className:i});return e===`default`||e===`number`?R(e===`number`?`ol`:`ul`,{className:c,...a,children:r}):R(`ul`,{className:c,...a,children:A.map(r,t=>{if(!j(t))return t;let r=t,i=r.type===`li`?r.props.children:r.props.children||t;return R(Zt,{icon:s(),variant:e,dense:n,children:i})})})}const en={ts:a,tsx:l,js:se,jsx:l,json:e,css:r,html:h,md:b,mdx:b,bash:f,sh:f,yaml:s,yml:s},tn={CODE:/\.(ts|tsx|js|jsx|json|mjs|cjs|astro|vue|svelte)$/i,TEXT:/\.(md|mdx|txt)$/i,IMAGE:/\.(png|jpg|jpeg|svg|gif)$/i};function nn(e){return typeof e==`string`?e:typeof e==`number`?e.toString():Array.isArray(e)?e.map(nn).join(``):j(e)&&e.props&&typeof e.props==`object`&&`children`in e.props?nn(e.props.children):``}function rn(e,t){let n=e.toLowerCase(),r=`shrink-0 transition-colors duration-200`;if(t)return R(Ue,{size:16,strokeWidth:2,className:O(r,`text-primary-400`),fill:`currentColor`,fillOpacity:.15});let i=en[n.split(`.`).pop()||``];if(i)return R(i,{size:16});let a=O(r,`text-text-dim group-hover:text-text-main`);return tn.CODE.test(n)?R(ze,{size:16,strokeWidth:2,className:a}):tn.TEXT.test(n)?R(Ve,{size:16,strokeWidth:2,className:a}):tn.IMAGE.test(n)?R(Be,{size:16,strokeWidth:2,className:a}):R(Re,{size:16,strokeWidth:2,className:a})}function an(e,t){if(!j(e))return!1;let n=e.type;if(typeof n==`string`)return n===t;if(typeof n==`function`)return n.name===t||n.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function on(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function X(e,t=`root`){if(!j(e))return[];let n=[];if(an(e,`ul`))return A.forEach(e.props.children,(e,r)=>{n.push(...X(e,`${t}-${r}`))}),n;if(an(e,`li`)){let r=A.toArray(e.props.children),i=r.findIndex(e=>an(e,`ul`)),a=i!==-1,o=a?r.slice(0,i):r,s=a?r.slice(i):[],{name:c,comment:l}=on(nn(o)),u=c.endsWith(`/`),d=u?c.slice(0,-1):c,f=a||u;return n.push({id:`${t}-${d}`,name:d,comment:l,isFolder:f,children:a?X(s[0],`${t}-${d}`):void 0}),n}return e.props&&typeof e.props==`object`&&`children`in e.props&&A.forEach(e.props.children,(e,r)=>{n.push(...X(e,`${t}-${r}`))}),n}function sn({item:e}){return z(B.TreeItem,{id:e.id,textValue:e.name,className:`outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md`,children:[R(B.TreeItemContent,{children:({isExpanded:t,hasChildItems:n})=>z(`div`,{className:`flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer`,children:[R(`div`,{style:{width:`calc((var(--tree-item-level) - 1) * 1rem)`},className:`shrink-0`}),n?R(B.Button,{slot:`chevron`,className:`outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors`,children:R(W,{size:14,strokeWidth:3,className:O(`transition-transform duration-200`,t&&`rotate-90`)})}):R(`div`,{className:`w-[18px]`}),rn(e.name,e.isFolder),R(`span`,{className:O(`text-sm transition-colors truncate select-none`,e.isFolder?`font-semibold text-text-main`:`text-text-muted group-hover:text-text-main`),children:e.name}),e.comment&&z(`span`,{className:`ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans`,children:[`//`,` `,e.comment]})]})}),e.children&&R(B.Collection,{items:e.children,children:e=>R(sn,{item:e})})]})}function cn({children:e}){let t=P(()=>X(e),[e]);return R(`div`,{className:`my-8`,children:R(B.Tree,{items:t,"aria-label":`File Tree`,className:O(`rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none`,`max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle`,`focus-visible:ring-2 focus-visible:ring-primary-500/20`),children:e=>R(sn,{item:e})})})}function ln({data:e,sortable:t=!1,paginated:n=!1,pageSize:r=10}){let[i,a]=I(null),[o,s]=I(1),c=P(()=>{if(!e)return[];let n=[...e];return t&&i!==null&&n.sort((e,t)=>{let n=e[i.key],r=t[i.key],a=typeof n==`string`?n:``,o=typeof r==`string`?r:``;return a<o?i.direction===`asc`?-1:1:a>o?i.direction===`asc`?1:-1:0}),n},[e,i,t]);return{sortConfig:i,currentPage:o,setCurrentPage:s,totalPages:Math.ceil(c.length/r),paginatedData:P(()=>{if(!n)return c;let e=(o-1)*r;return c.slice(e,e+r)},[c,n,o,r]),requestSort:e=>{if(!t)return;let n=`asc`;i&&i.key===e&&i.direction===`asc`&&(n=`desc`),a({key:e,direction:n})}}}function un({headers:e,data:t,children:n,className:r=``,sortable:i=!1,paginated:a=!1,pageSize:o=10}){let{sortConfig:s,currentPage:c,setCurrentPage:l,totalPages:u,paginatedData:d,requestSort:f}=ln({data:t,sortable:i,paginated:a,pageSize:o}),p=e=>i?s?.key===e?s.direction===`asc`?R(je,{size:14,className:`ml-1 text-primary-400`}):R(U,{size:14,className:`ml-1 text-primary-400`}):R(U,{size:14,className:`ml-1 opacity-30`}):null,m=n||z(L,{children:[e&&R(`thead`,{children:R(`tr`,{children:e.map((e,t)=>R(`th`,{onClick:()=>f(t),className:O(`text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm`,i&&`cursor-pointer select-none hover:text-primary-400 transition-colors`),children:z(`div`,{className:`flex items-center`,children:[e,p(t)]})},t))})}),d&&R(`tbody`,{children:d.map((e,t)=>R(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:e.map((e,t)=>R(`td`,{className:`px-3 py-2 border-b border-border-subtle text-sm text-text-muted`,children:e},t))},t))})]});return z(`div`,{className:O(`my-6 rounded-lg border border-border-subtle overflow-hidden`,r),children:[R(`div`,{className:`overflow-x-auto`,children:R(`table`,{className:`w-full border-collapse text-sm`,children:m})}),a&&u>1&&z(`div`,{className:`flex items-center justify-between border-t border-border-subtle px-4 py-3`,children:[z(`span`,{className:`text-xs text-text-muted`,children:[`Page `,c,` of `,u]}),z(`div`,{className:`flex items-center gap-1`,children:[R(B.Button,{onPress:()=>l(1),isDisabled:c===1,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:R(Me,{size:16})}),R(B.Button,{onPress:()=>l(e=>Math.max(e-1,1)),isDisabled:c===1,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:R(Ae,{size:16})}),R(B.Button,{onPress:()=>l(e=>Math.min(e+1,u)),isDisabled:c===u,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:R(W,{size:16})}),R(B.Button,{onPress:()=>l(u),isDisabled:c===u,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:R(Ne,{size:16})})]})]})]})}function dn({name:e,type:t,defaultValue:n,required:r=!1,children:i,id:a,className:o=``}){return z(`article`,{className:O(`group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300`,o),id:a,children:[z(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4`,children:[z(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[R(`code`,{className:`inline-flex items-center rounded-md bg-primary-500/10 px-2.5 py-1 font-mono text-sm font-bold text-primary-400 border border-primary-500/20 shadow-sm transition-colors`,children:e}),t&&R(`span`,{className:`rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase shadow-sm`,children:t}),r&&z(`div`,{className:`flex items-center gap-1.5 rounded-full bg-red-500/10 px-2.5 py-0.5 text-[10px] font-bold uppercase text-red-400 border border-red-500/20 shadow-sm`,children:[R(`span`,{className:`h-1 w-1 rounded-full bg-red-400 animate-pulse`}),`Required`]})]}),n&&z(`div`,{className:`flex items-center gap-2 text-[11px] text-text-muted bg-bg-muted/30 px-2.5 py-1 rounded-md border border-border-subtle/50`,children:[R(`span`,{className:`font-semibold opacity-60 uppercase tracking-tighter`,children:`Default`}),R(`code`,{className:`font-mono text-text-main font-medium`,children:n})]})]}),R(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30`,children:i})]})}function fn({to:e,children:t,className:n=``,...r}){let i=e&&(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`));return R(D,{href:e,className:O(`text-blue-600 hover:text-blue-800 hover:underline cursor-pointer`,n),target:i?`_blank`:void 0,rel:i?`noopener noreferrer`:void 0,...r,children:t})}function pn({src:e,alt:t,theme:n,...r}){let{theme:i}=q();return n&&n!==i?null:R(`img`,{src:e,alt:t||``,...r})}function mn({title:e,props:t,className:n=``}){return z(`div`,{className:O(`my-6`,n),children:[e&&R(`h3`,{className:`text-base font-bold text-text-main mb-3`,children:e}),R(`div`,{className:`overflow-x-auto rounded-lg border border-border-subtle`,children:z(`table`,{className:`w-full border-collapse text-sm`,children:[R(`thead`,{children:z(`tr`,{children:[R(`th`,{className:`text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted`,children:`Property`}),R(`th`,{className:`text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted`,children:`Type`}),R(`th`,{className:`text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted`,children:`Default`}),R(`th`,{className:`text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted`,children:`Description`})]})}),R(`tbody`,{children:t.map((e,t)=>z(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:[z(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:[R(`code`,{className:`rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400`,children:e.name}),e.required&&R(`span`,{className:`ml-1 text-red-400 font-bold`,children:`*`})]}),R(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:R(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted`,children:e.type})}),R(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:e.defaultValue?R(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400`,children:e.defaultValue}):R(`span`,{className:`text-text-dim`,children:`—`})}),R(`td`,{className:`px-4 py-2.5 border-b border-border-subtle text-text-muted`,children:e.description})]},`${e.name}-${t}`))})]})})]})}function hn(e){let{code:t,children:n,preview:r}=e;return{initialCode:P(()=>(t??(typeof n==`string`?n:``)).trim(),[t,n]),previewElement:P(()=>r??(typeof n==`string`?null:n),[r,n])}}function gn(e){let{highlightedHtml:t,hideCode:n=!1,hideCopy:r=!1}=e,{initialCode:i,previewElement:a}=hn(e);return z(`div`,{className:`my-6 overflow-hidden rounded-xl border border-border-subtle`,children:[R(`div`,{className:`flex items-center justify-center p-8 bg-bg-surface`,children:a}),!n&&R(`div`,{className:`border-t border-border-subtle`,children:R(J,{hideCopy:r,lang:`tsx`,highlightedHtml:t,plain:!0,children:i})})]})}const _n=e=>{let[t,n]=I(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)},handleOpenRaw:()=>{let t=new Blob([e],{type:`text/plain;charset=utf-8`}),n=URL.createObjectURL(t);window.open(n,`_blank`)}}};function vn({content:e,mdxRaw:t,config:n}){let r=t||e||``,{copied:i,handleCopy:a,handleOpenRaw:o}=_n(r),s=n!==!1,l=typeof n==`object`&&n.text||`Copy Markdown`;return!s||!r?null:R(`div`,{className:`relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200`,children:z(v,{className:`rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden`,children:[R(c,{variant:`ghost`,onPress:a,icon:R(i?H:Ie,{size:16}),iconPosition:`left`,className:O(`px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0`,`text-text-main transition-all duration-300 hover:bg-primary-500/5`,i&&`text-emerald-500 hover:bg-emerald-500/5`),children:i?`Copied!`:l}),z(w.Trigger,{placement:`bottom end`,children:[R(c,{variant:`ghost`,isIconOnly:!0,icon:R(U,{size:14}),className:O(`px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0`,`transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500`)}),z(w.Root,{className:`w-52`,children:[z(w.Item,{onAction:a,children:[R(Ie,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),R(`span`,{className:`font-medium text-[0.8125rem]`,children:`Copy Markdown`})]}),z(w.Item,{onAction:o,children:[R(Le,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),R(`span`,{className:`font-medium text-[0.8125rem]`,children:`View as Markdown`})]})]})]})]})})}var yn=at({Admonition:()=>Y,Badge:()=>Ft,Button:()=>vt,Card:()=>Rt,Cards:()=>Lt,Caution:()=>qt,CodeBlock:()=>J,ComponentPreview:()=>gn,ComponentProps:()=>mn,CopyMarkdown:()=>vn,Danger:()=>Wt,Field:()=>dn,FileTree:()=>cn,Image:()=>pn,Important:()=>Kt,InfoBox:()=>Gt,Link:()=>fn,List:()=>$t,Note:()=>Vt,Tab:()=>jt,Table:()=>un,Tabs:()=>Mt,Tip:()=>Ht,Video:()=>Nt,Warning:()=>Ut});function bn(){return R(`div`,{className:O(`w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in`),children:z(`div`,{className:`mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10`,children:[z(`div`,{className:`flex gap-2`,children:[R(S,{className:`h-3 w-16`}),R(S,{className:`h-3 w-24`})]}),R(S,{className:`h-10 w-[60%] sm:h-12`}),z(`div`,{className:`space-y-3`,children:[R(S,{className:`h-4 w-full`}),R(S,{className:`h-4 w-[95%]`}),R(S,{className:`h-4 w-[40%]`})]}),z(`div`,{className:`space-y-6 pt-4`,children:[R(S,{className:`h-7 w-32`}),z(`div`,{className:`space-y-3`,children:[R(S,{className:`h-4 w-full`}),R(S,{className:`h-4 w-[98%]`}),R(S,{className:`h-4 w-[92%]`}),R(S,{className:`h-4 w-[60%]`})]})]}),R(S,{className:`h-32 w-full rounded-lg bg-bg-muted/50`}),z(`div`,{className:`space-y-6 pt-4`,children:[R(S,{className:`h-7 w-48`}),z(`div`,{className:`space-y-3`,children:[R(S,{className:`h-4 w-full`}),R(S,{className:`h-4 w-[85%]`})]})]})]})})}const Z=({level:e,id:t,children:n,...r})=>z(`h${e}`,{id:t,...r,className:`boltdocs-heading`,children:[n,t&&R(`a`,{href:`#${t}`,className:`header-anchor`,"aria-label":`Anchor`,children:R(Je,{size:16})})]}),xn={...yn,Loading:bn,h1:e=>R(Z,{level:1,...e}),h2:e=>R(Z,{level:2,...e}),h3:e=>R(Z,{level:3,...e}),h4:e=>R(Z,{level:4,...e}),h5:e=>R(Z,{level:5,...e}),h6:e=>R(Z,{level:6,...e}),pre:e=>R(J,{...e,children:e.children})},Sn=Te,Cn=Sn.HelmetProvider||Sn.default?.HelmetProvider||(({children:e})=>R(L,{children:e}));function wn({config:e}){let{currentLocale:t}=g();return N(()=>{if(!e.i18n||typeof document>`u`)return;let n=t||e.i18n.defaultLocale,r=e.i18n.localeConfigs?.[n];document.documentElement.lang=r?.htmlLang||n||`en`,document.documentElement.dir=r?.direction||`ltr`},[t,e.i18n]),null}function Tn({config:e}){let t=k(),{setLocale:n,setVersion:r,currentLocale:i,currentVersion:a}=g();return N(()=>{let o=t.pathname.split(`/`).filter(Boolean),s=0,c=e.versions?.defaultVersion,l=e.i18n?.defaultLocale;if(o[s]===`docs`&&s++,e.versions&&o.length>s){let t=e.versions.versions.find(e=>e.path===o[s]);t&&(c=t.path,s++)}if(e.i18n&&o.length>s){let t=o[s];(Array.isArray(e.i18n.locales)?e.i18n.locales.includes(t):e.i18n.locales[t])&&(l=t)}else e.i18n&&o.length===0&&(l=i||e.i18n.defaultLocale);l!==i&&n(l||``),c!==a&&r(c??``)},[t.pathname,e,n,r,i,a]),null}function En({config:e,routes:r,components:i={}}){let a=P(()=>({...xn,...nt,...i}),[i]),s=ge(),{pathname:c}=k(),l=P(()=>{let e=c||`/`;return e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e},[c]),u=P(()=>r.find(e=>(e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e)(e.path===``?`/`:e.path)===l),[r,l]);return R(Cn,{children:R(n,{routes:r,children:R(gt,{children:R(lt,{components:a,children:R(t.Provider,{value:e,children:z(we,{navigate:s,children:[R(_t,{}),z(o,{initialLocale:u?.locale,initialVersion:u?.version,children:[R(Tn,{config:e}),R(wn,{config:e}),R(me,{})]})]})})})})})})}function Dn(){return R(`div`,{className:`flex items-center justify-center min-h-[60vh] text-center`,children:z(`div`,{className:`space-y-4`,children:[R(`span`,{className:`text-8xl font-black tracking-tighter text-primary-500/20`,children:`404`}),R(`h1`,{className:`text-2xl font-bold text-text-main`,children:`Page Not Found`}),R(`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.`}),z(D,{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:[R(Oe,{size:16}),` Go to Home`]})]})})}function On(e,t){let n=t.replace(/\\/g,`/`),r=Object.keys(e);if(r.length===0)return;let i=r[0].replace(/\\/g,`/`).split(`/`).filter(Boolean)[0]||`docs`,a=`/${i}/${n}`,o=`./${i}/${n}`;return r.find(e=>{let t=e.replace(/\\/g,`/`);return t===a||t===o||t.endsWith(a)})}function kn(e){let{routesData:t,config:n,mdxModules:r,Layout:i,homePage:a,externalPages:o,externalLayout:s,components:c}=e,l=s||i,u=e=>{let t=n.base||`/`;return e.startsWith(t)?e:`${t===`/`?``:t.replace(/\/$/,``)}${e.startsWith(`/`)?e:`/${e}`}`||`/`},d=[...t],f=[...t.map(e=>{let t=On(r,e.filePath),n=t?r[t]?.default:null,i=u(e.path===``?`/`:e.path);return{path:i,element:R(dt,{MDXComponent:n,mdxComponents:c}),loader:async()=>({path:i,frontmatter:{title:e.title,description:e.description||``},headings:e.headings||[],filePath:e.filePath,locale:e.locale,version:e.version,group:e.group,groupTitle:e.groupTitle}),getStaticPaths:()=>[i]}})];if(a){let e=[{path:u(`/`),locale:n.i18n?.defaultLocale}];n.i18n&&Object.keys(n.i18n.locales).forEach(t=>{e.push({path:u(`/${t}`),locale:t})}),e.forEach(({path:e,locale:t})=>{f.find(t=>t.path===e)||(d.push({path:e,locale:t,title:`Home`,filePath:``,headings:[]}),f.push({path:e,element:R(l,{children:R(a,{})}),loader:async()=>({path:e,locale:t}),getStaticPaths:()=>[e]}))})}return o&&Object.entries(o).forEach(([e,t])=>{let r=u(e);f.find(e=>e.path===r)||(d.push({path:r,locale:n.i18n?.defaultLocale,title:e,filePath:``,headings:[]}),f.push({path:r,element:R(l,{children:R(t,{})}),loader:async()=>({path:r,locale:n.i18n?.defaultLocale}),getStaticPaths:()=>[r]}),n.i18n&&Object.keys(n.i18n.locales).forEach(n=>{let r=u(`/${n}${e===`/`?``:e}`);f.find(e=>e.path===r)||(d.push({path:r,locale:n,title:e,filePath:``,headings:[]}),f.push({path:r,element:R(l,{children:R(t,{})}),loader:async()=>({path:r,locale:n}),getStaticPaths:()=>[r]}))}))}),f.push({path:`*`,element:R(l,{children:R(Dn,{})})}),[{element:R(En,{config:n,routes:d,components:c}),children:f}]}function Q(e,t){return e?typeof e==`string`?e:t&&e[t]?e[t]:Object.values(e)[0]||``:``}function An(){let e=_(),{theme:t,resolvedTheme:n}=q(),r=k(),{currentLocale:i}=m(),a=e.theme||{},o=Q(a.title,i)||`Boltdocs`,s=a.navbar||[],c=a.socialLinks||[],l=a.githubRepo,u=s.map(t=>{let n=t.href||t.to||t.link||``;return{label:Q(t.label||t.text,i),href:n,active:(t=>{let n=r.pathname;if(n===t)return!0;if(!t||t===`/`)return n===`/`;let i=t=>{let n=t.split(`/`).filter(Boolean),r=0;return e.i18n?.locales&&n[r]&&e.i18n.locales[n[r]]&&r++,e.versions?.versions&&n[r]&&e.versions.versions.some(e=>e.path===n[r])&&r++,n.slice(r)},a=i(t),o=i(n);return a.length===0?o.length===0:o.length<a.length?!1:a.every((e,t)=>o[t]===e)})(n),to:n.startsWith(`http`)||n.startsWith(`//`)?`external`:void 0}}),d=a.logo;return{links:u,title:o,logo:d?typeof d==`string`?d:n===`dark`?d.dark:d.light:null,logoProps:{alt:(d&&typeof d==`object`?d.alt:void 0)||o,width:d&&typeof d==`object`?d.width:void 0,height:d&&typeof d==`object`?d.height:void 0},github:l?`https://github.com/${l}`:null,social:c,config:e,theme:t}}function jn(e){let t=_(),n=k(),r=e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e,i=r(n.pathname),a=e.find(e=>r(e.path)===i),o=a?.tab?.toLowerCase(),s=o?e.filter(e=>!e.tab||e.tab.toLowerCase()===o):e,c=[],l=new Map;for(let e of s)!e.filePath&&!e.group||(e.group?(l.has(e.group)||l.set(e.group,{slug:e.group,title:e.groupTitle||e.group,routes:[],icon:e.groupIcon}),l.get(e.group).routes.push(e)):c.push(e));return{groups:Array.from(l.values()).map(e=>{let t=new Map,n=new Map;for(let r of e.routes)r.subRouteGroup&&((r.path.endsWith(`/${r.subRouteGroup}`)||r.path.endsWith(`/${r.subRouteGroup}/`))&&!t.has(r.subRouteGroup)?t.set(r.subRouteGroup,r):(n.has(r.subRouteGroup)||n.set(r.subRouteGroup,[]),n.get(r.subRouteGroup).push(r)));let r=[],i=new Set;for(let a of e.routes)if(a.subRouteGroup){if(!i.has(a.subRouteGroup)){i.add(a.subRouteGroup);let e=t.get(a.subRouteGroup),o=n.get(a.subRouteGroup)||[];e?r.push({...e,subRoutes:o}):r.push(...o)}}else r.push(a);return{...e,routes:r}}),ungrouped:c,activeRoute:a,activePath:i,config:t}}function Mn(e=[]){let[t,n]=I(null);return{headings:e,activeId:t,setActiveId:n}}function Nn(e=[],t=[]){let n=k(),r=F([]),[i,a]=I({opacity:0,transform:`translateX(0) scaleX(0)`,width:0}),o=e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e,s=o(n.pathname),c=t.find(e=>o(e.path)===s)?.tab?.toLowerCase(),l=e.findIndex(e=>e.id.toLowerCase()===c),u=l===-1?0:l;return N(()=>{let e=r.current[u];e&&a({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[u,e.length,n.pathname]),{tabs:e,activeIndex:u,indicatorStyle:i,tabRefs:r,activeTabId:c}}function $(e,t,n){let r=e;return t&&(r===t||r.startsWith(t+`/`))&&(r=r===t?`index.md`:r.slice(t.length+1)),n&&(r===n||r.startsWith(n+`/`))&&(r=r===n?`index.md`:r.slice(n.length+1)),r}function Pn(){let e=ge(),t=m(),{allRoutes:n,currentRoute:r,currentVersion:i,currentLocale:a,config:o}=t,s=o.versions,{setVersion:c}=g(),l=t=>{if(!s||t===i)return;c(t);let l=o.i18n?Object.keys(o.i18n.locales).map(e=>`/${e}`):[];if(!(!r||r.path===`/`||r.path===o.base||r.path===``||l.includes(r.path))&&r){let i=`/docs/${t}`,o=$(r.filePath,r.version,r.locale),c=n.find(e=>$(e.filePath,e.version,e.locale)===o&&(e.version||s.defaultVersion)===t&&(a?e.locale===a:!e.locale));if(c)i=c.path;else{let e=n.find(e=>$(e.filePath,e.version,e.locale)===`index.md`&&(e.version||s.defaultVersion)===t&&(a?e.locale===a:!e.locale));i=e?e.path:`/docs/${t}${a?`/${a}`:``}`}e(i)}},u=t.availableVersions.map(e=>({...e,label:e.label,value:e.key}));return{currentVersion:i,currentVersionLabel:t.currentVersionLabel,availableVersions:u,handleVersionChange:l}}function Fn(){let e=ge(),{allRoutes:t,currentRoute:n,currentLocale:r,config:i}=m(),a=i.i18n,{setLocale:o}=g();return{currentLocale:r,currentLocaleLabel:i.i18n?.localeConfigs?.[r]?.label||i.i18n?.locales[r]||r,availableLocales:i.i18n?Object.entries(i.i18n.locales).map(([e,t])=>({key:e,label:i.i18n?.localeConfigs?.[e]?.label||t,value:e,isCurrent:e===r})):[],handleLocaleChange:i=>{if(!a||i===r)return;o(i);let s=`/`;if(n){let e=$(n.filePath,n.version,n.locale),r=t.find(t=>$(t.filePath,t.version,t.locale)===e&&(t.locale||a.defaultLocale)===i&&t.version===n.version);if(r)s=r.path;else{let e=t.find(e=>$(e.filePath,e.version,e.locale)===`index.md`&&(e.locale||a.defaultLocale)===i&&e.version===n.version);s=e?e.path:i===a.defaultLocale?n.version?`/${n.version}`:`/`:n.version?`/${n.version}/${i}`:`/${i}`}}else{let e=t.find(e=>(e.filePath===`index.mdx`||e.filePath===`index.md`)&&(e.locale||a.defaultLocale)===i&&!e.version);s=e?e.path:i===a.defaultLocale?`/`:`/${i}`}e(s)}}}function In(){let{routes:e,currentRoute:t}=m(),n=k();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let r=t.tab?.toLowerCase(),i=r?e.filter(e=>e.tab?.toLowerCase()===r):e.filter(e=>!e.tab),a=i.findIndex(e=>e.path===n.pathname);return{prevPage:a>0?i[a-1]:null,nextPage:a!==-1&&a<i.length-1?i[a+1]:null,currentRoute:t}}function Ln(){let{currentRoute:e}=m(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}const Rn=()=>k();function zn({children:e,className:t,style:n}){return R(`div`,{className:O(`h-screen flex flex-col overflow-hidden bg-bg-main text-text-main`,t),style:n,children:e})}function Bn({children:e,className:t,style:n}){return R(`div`,{className:O(`mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden`,t),style:n,children:e})}function Vn({children:e,className:t,style:n}){return R(`main`,{className:O(`boltdocs-content flex-1 min-w-0 overflow-y-auto`,`contain-layout`,t),style:n,children:e})}function Hn({children:e,className:t,style:n}){let{pathname:r}=Rn();return R(`div`,{className:O(`boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8`,{"max-w-content-max":r.includes(`/docs/`)},t),style:n,children:e})}function Un({children:e,className:t,style:n}){return R(`div`,{className:O(`flex items-center justify-between mb-10`,t),style:n,children:e})}function Wn({children:e,className:t,style:n}){return R(`div`,{className:O(`mt-20`,t),style:n,children:e})}const Gn=Object.assign(zn,{Body:Bn,Content:Vn,ContentMdx:Hn,ContentHeader:Un,ContentFooter:Wn});function Kn(){let{theme:e,setTheme:t}=q(),[n,r]=I(!1);if(N(()=>{r(!0)},[]),!n)return R(`div`,{className:`h-9 w-9`});let i=e===`system`?Ye:e===`dark`?Xe:$e;return z(w.Trigger,{placement:`bottom right`,children:[R(V,{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:R(i,{size:20,className:`animate-in fade-in zoom-in duration-300`})}),z(w.Root,{selectionMode:`single`,selectedKeys:[e],onSelectionChange:e=>{let n=Array.from(e)[0];t(n)},children:[z(w.Item,{id:`light`,children:[R($e,{size:16}),R(`span`,{children:`Light`})]}),z(w.Item,{id:`dark`,children:[R(Xe,{size:16}),R(`span`,{children:`Dark`})]}),z(w.Item,{id:`system`,children:[R(Ye,{size:16}),R(`span`,{children:`System`})]})]})]})}async function qn(e,t,n=`https://api.github.com`){let r=new Headers;t&&r.append(`authorization`,t);let i=await(await fetch(`${n}/repos/${e}`,{headers:r})).json();return i.stargazers_count===void 0?`0`:Jn(i.stargazers_count)}const Jn=e=>Intl.NumberFormat(`en`,{notation:`compact`,compactDisplay:`short`}).format(e);function Yn({repo:e}){let[t,n]=I(null);return N(()=>{e&&qn(e).then(e=>n(e)).catch(()=>n(`0`))},[e]),z(`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:[R(d,{className:`h-4 w-4`}),t&&R(`span`,{className:`tabular-nums`,children:t})]})}function Xn({tabs:e,routes:t}){let{currentLocale:n}=m(),{indicatorStyle:r,tabRefs:i,activeIndex:a}=Nn(e,t),o=e=>{if(!e)return null;if(e.trim().startsWith(`<svg`))return R(`span`,{className:`h-4 w-4`,dangerouslySetInnerHTML:{__html:e}});let t=Ee[e];return t?R(t,{size:16}):R(`img`,{src:e,alt:``,className:`h-4 w-4 object-contain`})};return R(`div`,{className:`mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6`,children:z(ne.List,{className:`border-none py-0`,children:[e.map((e,r)=>{let s=r===a,c=t.find(t=>t.tab&&t.tab.toLowerCase()===e.id.toLowerCase());return z(D,{href:c?c.path:`#`,ref:e=>{i.current[r]=e},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${s?`text-primary-500`:`text-text-muted hover:text-text-main`}`,children:[o(e.icon),R(`span`,{children:Q(e.text,n)})]},e.id)}),R(ne.Indicator,{style:r})]})})}const Zn=xe(()=>import(`../search-dialog-DNTomKgu.js`).then(e=>({default:e.SearchDialog})));function Qn(){let{links:e,title:t,logo:n,logoProps:r,github:i,social:a,config:o}=An(),{routes:s,allRoutes:c,currentVersion:l,currentLocale:u}=m(),{pathname:d}=k(),f=o.theme||{},p=d.startsWith(`/docs`),h=f?.tabs&&f.tabs.length>0;return z(E.Root,{className:h?`border-b-0`:``,children:[z(E.Content,{children:[z(E.Left,{children:[n&&R(E.Logo,{src:n,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),R(E.Title,{children:t}),o.versions&&l&&R(er,{})]}),R(E.Center,{children:R(ye,{fallback:R(`div`,{className:`h-9 w-32 animate-pulse rounded-md bg-bg-surface`}),children:R(Zn,{routes:s||[]})})}),z(E.Right,{children:[R(E.Links,{children:e.map(e=>R($n,{link:e},e.href))}),o.i18n&&u&&R(tr,{}),R(E.Split,{}),R(Kn,{}),i&&R(Yn,{repo:f?.githubRepo??``}),a.length>0&&R(E.Split,{}),R(`div`,{className:`flex items-center gap-1`,children:a.map(({icon:e,link:t})=>R(E.Socials,{icon:e,link:t,className:`p-1.5`},t))})]})]}),p&&h&&f?.tabs&&R(`div`,{className:`w-full border-b border-border-subtle bg-bg-main`,children:R(Xn,{tabs:f.tabs,routes:c||s||[]})})]})}function $n({link:e}){let t=pe(e.href||``);return R(E.Link,{...e,href:t})}function er(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:n}=Pn();return t.length===0?null:z(w.Trigger,{children:[R(c,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:R(U,{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:R(`span`,{className:`font-semibold text-[0.8125rem]`,children:e})}),R(w.Root,{children:R(w.Section,{items:t,children:e=>R(w.Item,{onPress:()=>n(e.value),children:e.label},`${e.value??``}`)})})]})}function tr(){let{currentLocale:e,availableLocales:t,handleLocaleChange:n}=Fn();return t.length===0?null:z(w.Trigger,{children:[R(c,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:R(U,{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:z(`div`,{className:`flex items-center gap-1.5`,children:[R(Ke,{className:`w-3.5 h-3.5 text-primary-500`}),R(`span`,{className:`font-bold text-[0.75rem] uppercase opacity-90`,children:e||`en`})]})}),R(w.Root,{children:R(w.Section,{items:t,children:e=>R(w.Item,{onPress:()=>n(e.value),children:z(`div`,{className:`flex items-center justify-between w-full gap-4`,children:[R(`span`,{children:e.label}),R(`span`,{className:`text-[10px] font-bold opacity-40 uppercase tracking-tighter`,children:e.value})]})},`${e.value??``}`)})})]})}function nr(){return R(`div`,{className:`flex items-center justify-center mt-10 mb-4 px-4 w-full`,children:z(`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:[R(tt,{className:`w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300`,fill:`currentColor`}),z(`span`,{className:`text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide`,children:[`Powered by`,` `,R(`strong`,{className:`font-bold text-text-main/80 group-hover:text-text-main`,children:`Boltdocs`})]})]})})}function rr(e){if(!e)return;let t={...Ee,...rt};return t[e]||t[e+`Icon`]||void 0}function ir({route:e,activePath:t,getIcon:n}){let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path),i=P(()=>e.subRoutes?.some(e=>e.path===t),[e.subRoutes,t]),[a,o]=I(i||r);return N(()=>{(i||r)&&o(!0)},[i,r]),R(T.SubGroup,{label:e.title,href:e.path,active:r,icon:n(e.icon),badge:e.badge,isOpen:a,onToggle:()=>o(!a),children:e.subRoutes?.map(e=>{let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return R(T.Link,{label:e.title,href:e.path,active:r,icon:n(e.icon),badge:e.badge},e.path)})})}function ar({group:e,activePath:t,getIcon:n}){return R(T.Group,{title:e.title,icon:n(e.icon),children:e.routes.map(e=>{if(e.subRoutes&&e.subRoutes.length>0)return R(ir,{route:e,activePath:t,getIcon:n},e.path);let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return R(T.Link,{label:e.title,href:e.path,active:r,icon:n(e.icon),badge:e.badge},e.path)})})}function or({routes:e,config:t}){let{groups:n,ungrouped:r,activePath:i}=jn(e),a=t.theme||{};return z(T.Root,{children:[r.length>0&&R(T.Group,{className:`mb-6`,children:r.map(e=>{let t=i===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return R(T.Link,{label:e.title,href:e.path,active:t,icon:rr(e.icon),badge:e.badge},e.path)})}),n.map(e=>R(ar,{group:e,activePath:i,getIcon:rr},e.slug)),a?.poweredBy&&R(`div`,{className:`mt-auto pt-8`,children:R(nr,{})})]})}function sr({headings:e=[],editLink:t,communityHelp:n,filePath:r}){let{headings:i}=Mn(e),a=P(()=>i.map(e=>({title:e.text,url:`#${e.id}`,depth:e.level})),[i]);return i.length===0?null:R(de,{toc:a,children:R(cr,{headings:i,editLink:t,communityHelp:n,filePath:r})})}function cr({headings:e,editLink:t,communityHelp:n,filePath:r}){let i=le(),[a,o]=I({opacity:0}),s=F(null),c=F(null);N(()=>{if(!i||!s.current)return;let e=s.current.querySelector(`a[href="#${i}"]`);e&&o({transform:`translateY(${e.offsetTop}px)`,height:`${e.offsetHeight}px`,opacity:1})},[i]);let l=M((e,t)=>{e.preventDefault();let n=document.getElementById(t);n&&(n.scrollIntoView({behavior:`smooth`}),window.history.pushState(null,``,`#${t}`))},[]);return z(y.Root,{children:[z(y.Header,{className:`flex flex-row gap-x-2`,children:[R(et,{size:16}),`On this page`]}),R(re,{containerRef:c,children:z(y.Content,{className:`max-h-[450px] boltdocs-otp-scroll-area`,ref:c,children:[R(y.Indicator,{style:a}),R(`ul`,{className:`relative space-y-2 border-l border-border-subtle`,ref:s,children:e.map(e=>R(y.Item,{level:e.level,children:R(y.Link,{href:`#${e.id}`,active:i===e.id,onClick:t=>l(t,e.id),className:`pl-4`,children:e.text})},e.id))})]})}),(t||n)&&z(`div`,{className:`mt-8 pt-8 border-t border-border-subtle space-y-4`,children:[R(`p`,{className:`text-xs font-bold uppercase text-text-main`,children:`Need help?`}),z(`ul`,{className:`space-y-3`,children:[t&&r&&R(`li`,{children:z(`a`,{href:t.replace(`:path`,r),target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors`,children:[R(Ze,{size:16}),`Edit this page`]})}),n&&R(`li`,{children:z(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors`,children:[R(Fe,{size:16}),`Community help`]})})]})]})]})}const lr=Te,ur=lr.Helmet||lr.default?.Helmet||(({children:e})=>R(L,{children:e}));function dr({siteTitle:e,siteDescription:t,routes:n}){let r=k(),i=_(),a=n?.find?.(e=>e.path===r.pathname),o=a?.title,s=a?.description||t||``,c=o?`${o} | ${e}`:e,l=a?.seo||{},u=i?.seo?.metatags||{},d=i?.seo?.thumbnails?.background,f=l[`og:image`]||d;return z(ur,{children:[R(`title`,{children:c}),R(`meta`,{name:`description`,content:s}),R(`meta`,{property:`og:title`,content:c}),R(`meta`,{property:`og:description`,content:s}),R(`meta`,{property:`og:type`,content:`article`}),typeof window<`u`&&R(`meta`,{property:`og:url`,content:window.location.href}),typeof window<`u`&&R(`link`,{rel:`canonical`,href:window.location.origin+r.pathname}),R(`meta`,{name:`twitter:card`,content:`summary`}),R(`meta`,{name:`twitter:title`,content:c}),R(`meta`,{name:`twitter:description`,content:s}),f&&R(`meta`,{name:`twitter:image`,content:f}),f&&R(`meta`,{property:`og:image`,content:f}),R(`meta`,{name:`generator`,content:`Boltdocs`}),Object.entries(u).map(([e,t])=>e.startsWith(`og:`)||e.startsWith(`music:`)||e.startsWith(`video:`)||e.startsWith(`article:`)||e.startsWith(`book:`)||e.startsWith(`profile:`)?R(`meta`,{property:e,content:t},e):R(`meta`,{name:e,content:t},e)),Object.entries(l).map(([e,t])=>e===`noindex`&&t===!0?R(`meta`,{name:`robots`,content:`noindex`},`noindex`):e===`robots`?R(`meta`,{name:`robots`,content:t},`robots`):e===`canonical`?R(`link`,{rel:`canonical`,href:t},`canonical`):e.startsWith(`og:`)||e.startsWith(`music:`)||e.startsWith(`video:`)||e.startsWith(`article:`)||e.startsWith(`book:`)||e.startsWith(`profile:`)?R(`meta`,{property:e,content:t},e):R(`meta`,{name:e,content:t},e))]})}function fr(){let{crumbs:e,activeRoute:t}=Ln(),n=_().theme||{};return e.length===0||!n?.breadcrumbs?null:z(C.Root,{children:[R(C.Item,{children:R(C.Link,{href:`/`,children:R(We,{size:14})})}),e.map((e,n)=>z(C.Item,{children:[R(C.Separator,{}),R(C.Link,{href:e.href,className:O({"font-medium text-text-main":e.href===t?.path}),children:e.label})]},`crumb-${e.href}-${e.label}-${n}`))]})}function pr(){let{prevPage:e,nextPage:t}=In();return!e&&!t?null:z(x.Root,{className:`animate-in fade-in slide-in-from-bottom-4 duration-700`,children:[e?z(x.Link,{to:e.path,direction:`prev`,children:[R(x.Title,{children:`Previous`}),R(x.Description,{children:e.title})]}):R(`div`,{}),t&&z(x.Link,{to:t.path,direction:`next`,children:[R(x.Title,{children:`Next`}),R(x.Description,{children:t.title})]})]})}var mr=class extends ve{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`Uncaught error in Boltdocs Layout:`,e,t)}render(){return this.state.hasError?this.props.fallback||z(`div`,{className:`flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4`,children:[R(`div`,{className:`text-lg font-bold text-red-400`,children:`Something went wrong`}),R(`p`,{className:`text-sm text-text-muted max-w-md`,children:this.state.error?.message||`An unexpected error occurred while rendering this page.`}),R(c,{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{Y as Admonition,de as AnchorProvider,Ft as Badge,En as BoltdocsShell,fr as Breadcrumbs,vt as Button,v as ButtonGroup,Rt as Card,Lt as Cards,qt as Caution,J as CodeBlock,gn as ComponentPreview,mn as ComponentProps,vn as CopyMarkdown,Wt as Danger,Gn as DocsLayout,mr as ErrorBoundary,dn as Field,cn as FileTree,dr as Head,pn as Image,Kt as Important,Gt as InfoBox,fn as Link,$t as List,bn as Loading,dt as MdxPage,Qn as Navbar,Dn as NotFound,Vt as Note,sr as OnThisPage,pr as PageNav,C as PrimitiveBreadcrumbs,c as PrimitiveButton,D as PrimitiveLink,w as PrimitiveMenu,te as PrimitiveNavLink,E as PrimitiveNavbar,ee as PrimitiveNavigationMenu,y as PrimitiveOnThisPage,x as PrimitivePageNav,oe as PrimitivePopover,T as PrimitiveSidebar,S as PrimitiveSkeleton,ne as PrimitiveTabs,fe as PrimitiveTooltip,re as ScrollProvider,ie as SearchDialogPrimitive,or as Sidebar,jt as Tab,un as Table,Mt as Tabs,Ht as Tip,Nt as Video,Ut as Warning,O as cn,kn as createRoutes,Q as getTranslated,le as useActiveAnchor,ce as useActiveAnchors,Ln as useBreadcrumbs,_ as useConfig,Fn as useI18n,ae as useItems,pe as useLocalizedTo,Rn as useLocation,ct as useMdxComponents,An as useNavbar,Mn as useOnThisPage,In as usePageNav,m as useRoutes,ue as useSearch,jn as useSidebar,Nn as useTabs,q as useTheme,Pn as useVersion};
|
package/dist/node/cli-entry.cjs
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Copyright (c) 2026 Jesus Alcala
|
|
5
5
|
* Licensed under the MIT License.
|
|
6
6
|
*/
|
|
7
|
-
const e=require(`../node-
|
|
7
|
+
const e=require(`../node-CXaog6St.cjs`);let t=require(`vite`),n=require(`fast-glob`);n=e.S(n);let r=require(`fs`);r=e.S(r);let i=require(`path`);i=e.S(i);let a=require(`cac`);a=e.S(a);let o=require(`@bdocs/ssg/node`);var s=e.x({colors:()=>c,error:()=>d,formatLog:()=>l,info:()=>u,success:()=>f});const c={reset:`\x1B[0m`,bold:`\x1B[1m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,cyan:`\x1B[36m`,gray:`\x1B[90m`};function l(e,t=``){return`${t}${c.bold}[boltdocs]${c.reset} ${e}${c.reset}`}function u(e){console.log(l(e))}function d(e,t){console.error(l(e,c.red)),t&&console.error(t)}function f(e){console.log(l(e,c.green))}async function p(t=process.cwd()){try{let n=await(0,o.createServer)(await e.n(t,`development`));await n.listen(),n.printUrls(),n.bindCLIShortcuts({print:!0})}catch(e){d(`Failed to start dev server:`,e),process.exit(1)}}async function m(t=process.cwd()){try{await(0,o.build)({entry:`boltdocs/entry`},await e.n(t,`production`)),f(`SSG build completed successfully!`)}catch(e){d(`Build failed:`,e),process.exit(1)}}async function h(n=process.cwd()){try{(await(0,t.preview)(await e.n(n,`production`))).printUrls()}catch(e){d(`Failed to start preview server:`,e),process.exit(1)}}async function g(t=process.cwd()){let{colors:a}=s;u(`${a.bold}Running documentation health check...${a.reset}\n`);let o=performance.now();try{let s=await e.g(`docs`,t),c=i.default.resolve(t,`docs`);r.default.existsSync(c)||(d(`Documentation directory not found at ${c}`),process.exit(1));let l=await(0,n.default)([`**/*.md`,`**/*.mdx`],{cwd:c,absolute:!0,suppressErrors:!0}),p=0,m=0,h=0,g=new Map,_=(e,t)=>{let n=i.default.relative(c,e),r=g.get(n);r||(r=[],g.set(n,r)),r.push(t),t.level===`high`?p++:t.level===`warning`?m++:t.level===`low`&&h++},v=`/docs`;for(let t of l){let{data:n,content:a}=e.y(t);n.title||_(t,{level:`warning`,message:`Missing "title" in frontmatter.`,suggestion:"Add `title: Your Title` to the YAML frontmatter at the top of the file."}),n.description||_(t,{level:`low`,message:`Missing "description" in frontmatter.`,suggestion:`Adding a description helps with SEO and search previews.`});let o=/\[.*?\]\((.*?)\)/g,s=/<a\s+[^>]*href=["']([^"']+)["'][^>]*>/g,l=[...a.matchAll(o),...a.matchAll(s)];for(let e of l){let n=e[1];if(!n||n.startsWith(`http`)||n.startsWith(`https`)||n.startsWith(`#`)||n.startsWith(`mailto:`)||n.startsWith(`tel:`)||(n=n.split(`#`)[0],!n))continue;let a;if(n.startsWith(`/`)){let e=n;(n.startsWith(v+`/`)||n===v)&&(e=n.substring(5)),a=i.default.join(c,e)}else a=i.default.resolve(i.default.dirname(t),n);let o=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`],s=!1;for(let e of o){let t=a+e;if(r.default.existsSync(t)&&r.default.statSync(t).isFile()){s=!0;break}}s||_(t,{level:`high`,message:`Broken internal link: "${n}"`,suggestion:`Ensure the file exists at "${a}". If it's a directory, ensure it has an "index.md" or "index.mdx".`})}}if(s.i18n){let{defaultLocale:t,locales:n}=s.i18n,a=Object.keys(n).filter(e=>e!==t);for(let n of l){let o=e.v(i.default.relative(c,n)).split(`/`);if(o[0]===t){let e=o.slice(1).join(`/`);for(let t of a){let a=[t,...o.slice(1)],s=i.default.join(c,...a);r.default.existsSync(s)||_(n,{level:`warning`,message:`Missing translation for locale "${t}"`,suggestion:`Create a translated version of this file at "${t}/${e}".`})}}}}if(g.size===0)f(`All documentation files are healthy!
|
|
8
8
|
`);else{for(let[e,t]of g.entries()){console.log(`📄 ${a.bold}${e}${a.reset}`);let n=t.sort((e,t)=>{let n={high:1,warning:2,low:3};return n[e.level]-n[t.level]});for(let e of n){let t=``,n=``;e.level===`high`?(t=`❌`,n=a.red):e.level===`warning`?(t=`⚠️`,n=a.yellow):(t=`ℹ️`,n=a.cyan),console.log(` ${n}${t} ${e.level.toUpperCase()}:${a.reset} ${e.message}`),e.suggestion&&console.log(` ${a.gray}💡 Suggestion: ${e.suggestion}${a.reset}`)}console.log(``)}console.log(`${a.bold}Summary:${a.reset}`),console.log(` ${a.red}${p} high-level errors${a.reset}`),console.log(` ${a.yellow}${m} warnings${a.reset}`),console.log(` ${a.cyan}${h} minor improvements${a.reset}\n`),p>0&&d(`HIGH ERROR: Fix these to ensure your documentation builds correctly.`),(m>0||h>0)&&u(`TIP: Address warnings and suggestions for premium quality docs.`),console.log(``)}u(`Finished in ${(performance.now()-o).toFixed(2)}ms\n`),p>0&&process.exit(1)}catch(e){d(`Failed to run doctor check:`,e),process.exit(1)}}const _=(0,a.default)(`boltdocs`);_.command(`[root]`,`Start development server`).alias(`dev`).action(p),_.command(`build [root]`,`Build for production`).action(m),_.command(`preview [root]`,`Preview production build`).action(h),_.command(`doctor [root]`,`Check documentation health`).action(g),_.help(),_.version(`2.0.0`),_.parse();
|
package/dist/node/cli-entry.mjs
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Copyright (c) 2026 Jesus Alcala
|
|
5
5
|
* Licensed under the MIT License.
|
|
6
6
|
*/
|
|
7
|
-
import{g as e,n as t,v as n,y as r}from"../node-
|
|
7
|
+
import{g as e,n as t,v as n,y as r}from"../node-Bogvkxao.mjs";import{preview as i}from"vite";import a from"fast-glob";import o from"fs";import s from"path";import c from"cac";import{build as l,createServer as u}from"@bdocs/ssg/node";var d=Object.defineProperty,f=((e,t)=>{let n={};for(var r in e)d(n,r,{get:e[r],enumerable:!0});return t||d(n,Symbol.toStringTag,{value:`Module`}),n})({colors:()=>p,error:()=>g,formatLog:()=>m,info:()=>h,success:()=>_});const p={reset:`\x1B[0m`,bold:`\x1B[1m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,cyan:`\x1B[36m`,gray:`\x1B[90m`};function m(e,t=``){return`${t}${p.bold}[boltdocs]${p.reset} ${e}${p.reset}`}function h(e){console.log(m(e))}function g(e,t){console.error(m(e,p.red)),t&&console.error(t)}function _(e){console.log(m(e,p.green))}async function v(e=process.cwd()){try{let n=await u(await t(e,`development`));await n.listen(),n.printUrls(),n.bindCLIShortcuts({print:!0})}catch(e){g(`Failed to start dev server:`,e),process.exit(1)}}async function y(e=process.cwd()){try{await l({entry:`boltdocs/entry`},await t(e,`production`)),_(`SSG build completed successfully!`)}catch(e){g(`Build failed:`,e),process.exit(1)}}async function b(e=process.cwd()){try{(await i(await t(e,`production`))).printUrls()}catch(e){g(`Failed to start preview server:`,e),process.exit(1)}}async function x(t=process.cwd()){let{colors:i}=f;h(`${i.bold}Running documentation health check...${i.reset}\n`);let c=performance.now();try{let l=await e(`docs`,t),u=s.resolve(t,`docs`);o.existsSync(u)||(g(`Documentation directory not found at ${u}`),process.exit(1));let d=await a([`**/*.md`,`**/*.mdx`],{cwd:u,absolute:!0,suppressErrors:!0}),f=0,p=0,m=0,v=new Map,y=(e,t)=>{let n=s.relative(u,e),r=v.get(n);r||(r=[],v.set(n,r)),r.push(t),t.level===`high`?f++:t.level===`warning`?p++:t.level===`low`&&m++},b=`/docs`;for(let e of d){let{data:t,content:n}=r(e);t.title||y(e,{level:`warning`,message:`Missing "title" in frontmatter.`,suggestion:"Add `title: Your Title` to the YAML frontmatter at the top of the file."}),t.description||y(e,{level:`low`,message:`Missing "description" in frontmatter.`,suggestion:`Adding a description helps with SEO and search previews.`});let i=/\[.*?\]\((.*?)\)/g,a=/<a\s+[^>]*href=["']([^"']+)["'][^>]*>/g,c=[...n.matchAll(i),...n.matchAll(a)];for(let t of c){let n=t[1];if(!n||n.startsWith(`http`)||n.startsWith(`https`)||n.startsWith(`#`)||n.startsWith(`mailto:`)||n.startsWith(`tel:`)||(n=n.split(`#`)[0],!n))continue;let r;if(n.startsWith(`/`)){let e=n;(n.startsWith(b+`/`)||n===b)&&(e=n.substring(5)),r=s.join(u,e)}else r=s.resolve(s.dirname(e),n);let i=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`],a=!1;for(let e of i){let t=r+e;if(o.existsSync(t)&&o.statSync(t).isFile()){a=!0;break}}a||y(e,{level:`high`,message:`Broken internal link: "${n}"`,suggestion:`Ensure the file exists at "${r}". If it's a directory, ensure it has an "index.md" or "index.mdx".`})}}if(l.i18n){let{defaultLocale:e,locales:t}=l.i18n,r=Object.keys(t).filter(t=>t!==e);for(let t of d){let i=n(s.relative(u,t)).split(`/`);if(i[0]===e){let e=i.slice(1).join(`/`);for(let n of r){let r=[n,...i.slice(1)],a=s.join(u,...r);o.existsSync(a)||y(t,{level:`warning`,message:`Missing translation for locale "${n}"`,suggestion:`Create a translated version of this file at "${n}/${e}".`})}}}}if(v.size===0)_(`All documentation files are healthy!
|
|
8
8
|
`);else{for(let[e,t]of v.entries()){console.log(`📄 ${i.bold}${e}${i.reset}`);let n=t.sort((e,t)=>{let n={high:1,warning:2,low:3};return n[e.level]-n[t.level]});for(let e of n){let t=``,n=``;e.level===`high`?(t=`❌`,n=i.red):e.level===`warning`?(t=`⚠️`,n=i.yellow):(t=`ℹ️`,n=i.cyan),console.log(` ${n}${t} ${e.level.toUpperCase()}:${i.reset} ${e.message}`),e.suggestion&&console.log(` ${i.gray}💡 Suggestion: ${e.suggestion}${i.reset}`)}console.log(``)}console.log(`${i.bold}Summary:${i.reset}`),console.log(` ${i.red}${f} high-level errors${i.reset}`),console.log(` ${i.yellow}${p} warnings${i.reset}`),console.log(` ${i.cyan}${m} minor improvements${i.reset}\n`),f>0&&g(`HIGH ERROR: Fix these to ensure your documentation builds correctly.`),(p>0||m>0)&&h(`TIP: Address warnings and suggestions for premium quality docs.`),console.log(``)}h(`Finished in ${(performance.now()-c).toFixed(2)}ms\n`),f>0&&process.exit(1)}catch(e){g(`Failed to run doctor check:`,e),process.exit(1)}}const S=c(`boltdocs`);S.command(`[root]`,`Start development server`).alias(`dev`).action(v),S.command(`build [root]`,`Build for production`).action(y),S.command(`preview [root]`,`Preview production build`).action(b),S.command(`doctor [root]`,`Check documentation health`).action(x),S.help(),S.version(`2.0.0`),S.parse();export{};
|
package/dist/node/index.cjs
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../node-
|
|
6
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../node-CXaog6St.cjs`);exports.BoltdocsPluginStore=e.l,exports.PluginCompatibilityError=e.u,exports.PluginError=e.d,exports.PluginHookError=e.f,exports.PluginLifecycleManager=e.i,exports.PluginPermissionError=e.p,exports.PluginSandbox=e.a,exports.PluginValidationError=e.m,exports.SecurePluginSchema=e.o,exports.createPlugin=e.r,exports.createViteConfig=e.n,exports.default=e.t,exports.defineConfig=e._,exports.generateEntryCode=e.h,exports.hasPermission=e.s,exports.normalizePath=e.v,exports.resolveConfig=e.g,exports.sanitizeFilename=e.b,exports.validatePlugins=e.c;
|
package/dist/node/index.d.cts
CHANGED
|
@@ -39,7 +39,7 @@ interface BoltdocsThemeConfig {
|
|
|
39
39
|
link: string;
|
|
40
40
|
}>>;
|
|
41
41
|
sidebarGroups?: Record<string, {
|
|
42
|
-
title?: string
|
|
42
|
+
title?: string | Record<string, string>;
|
|
43
43
|
icon?: string;
|
|
44
44
|
}>;
|
|
45
45
|
socialLinks?: BoltdocsSocialLink[];
|
|
@@ -94,7 +94,7 @@ interface BoltdocsLocaleConfig {
|
|
|
94
94
|
*/
|
|
95
95
|
interface BoltdocsI18nConfig {
|
|
96
96
|
defaultLocale: string;
|
|
97
|
-
locales: Record<string, string>;
|
|
97
|
+
locales: string[] | Record<string, string>;
|
|
98
98
|
localeConfigs?: Record<string, BoltdocsLocaleConfig>;
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
@@ -162,6 +162,15 @@ interface BoltdocsConfig {
|
|
|
162
162
|
seo?: BoltdocsSeoConfig;
|
|
163
163
|
vite?: any;
|
|
164
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Global namespace for Boltdocs types that can be augmented by generated code.
|
|
167
|
+
* This allows for strictly typed locales and versions based on the project configuration.
|
|
168
|
+
*/
|
|
169
|
+
declare global {
|
|
170
|
+
namespace Boltdocs {
|
|
171
|
+
interface Types {}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
165
174
|
//#endregion
|
|
166
175
|
//#region src/shared/config-utils.d.ts
|
|
167
176
|
/**
|
package/dist/node/index.d.mts
CHANGED
|
@@ -39,7 +39,7 @@ interface BoltdocsThemeConfig {
|
|
|
39
39
|
link: string;
|
|
40
40
|
}>>;
|
|
41
41
|
sidebarGroups?: Record<string, {
|
|
42
|
-
title?: string
|
|
42
|
+
title?: string | Record<string, string>;
|
|
43
43
|
icon?: string;
|
|
44
44
|
}>;
|
|
45
45
|
socialLinks?: BoltdocsSocialLink[];
|
|
@@ -94,7 +94,7 @@ interface BoltdocsLocaleConfig {
|
|
|
94
94
|
*/
|
|
95
95
|
interface BoltdocsI18nConfig {
|
|
96
96
|
defaultLocale: string;
|
|
97
|
-
locales: Record<string, string>;
|
|
97
|
+
locales: string[] | Record<string, string>;
|
|
98
98
|
localeConfigs?: Record<string, BoltdocsLocaleConfig>;
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
@@ -162,6 +162,15 @@ interface BoltdocsConfig {
|
|
|
162
162
|
seo?: BoltdocsSeoConfig;
|
|
163
163
|
vite?: any;
|
|
164
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Global namespace for Boltdocs types that can be augmented by generated code.
|
|
167
|
+
* This allows for strictly typed locales and versions based on the project configuration.
|
|
168
|
+
*/
|
|
169
|
+
declare global {
|
|
170
|
+
namespace Boltdocs {
|
|
171
|
+
interface Types {}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
165
174
|
//#endregion
|
|
166
175
|
//#region src/shared/config-utils.d.ts
|
|
167
176
|
/**
|
package/dist/node/index.mjs
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import{_ as e,a as t,b as n,c as r,d as i,f as a,g as o,h as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _,v}from"../node-
|
|
6
|
+
import{_ as e,a as t,b as n,c as r,d as i,f as a,g as o,h as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _,v}from"../node-Bogvkxao.mjs";export{l as BoltdocsPluginStore,_ as PluginCompatibilityError,i as PluginError,a as PluginHookError,c as PluginLifecycleManager,p as PluginPermissionError,t as PluginSandbox,u as PluginValidationError,f as SecurePluginSchema,m as createPlugin,d as createViteConfig,g as default,e as defineConfig,s as generateEntryCode,h as hasPermission,v as normalizePath,o as resolveConfig,n as sanitizeFilename,r as validatePlugins};
|