boltdocs 2.6.0 → 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.
Files changed (36) hide show
  1. package/dist/client/index.cjs +1 -1
  2. package/dist/client/index.d.cts +41 -37
  3. package/dist/client/index.d.ts +41 -37
  4. package/dist/client/index.js +1 -1
  5. package/dist/node/cli-entry.cjs +1 -1
  6. package/dist/node/cli-entry.mjs +1 -1
  7. package/dist/node/index.cjs +1 -1
  8. package/dist/node/index.d.cts +30 -3
  9. package/dist/node/index.d.mts +30 -3
  10. package/dist/node/index.mjs +1 -1
  11. package/dist/node-Bogvkxao.mjs +101 -0
  12. package/dist/node-CXaog6St.cjs +101 -0
  13. package/dist/{package-CR0HF9x3.mjs → package-Bqbn1AYK.mjs} +1 -1
  14. package/dist/{package-Dgmsc_l5.cjs → package-CFP44vfn.cjs} +1 -1
  15. package/dist/{search-dialog-DMK5OpgH.cjs → search-dialog-CV3eJzMm.cjs} +1 -1
  16. package/dist/{search-dialog-3lvKsbVG.js → search-dialog-DNTomKgu.js} +1 -1
  17. package/dist/use-search-CS3gH19M.js +6 -0
  18. package/dist/use-search-DBpJZQuw.cjs +6 -0
  19. package/package.json +3 -2
  20. package/src/client/components/ui-base/head.tsx +10 -3
  21. package/src/client/hooks/use-i18n.ts +4 -3
  22. package/src/client/hooks/use-localized-to.ts +1 -4
  23. package/src/client/hooks/use-routes.ts +4 -4
  24. package/src/client/hooks/use-sidebar.ts +3 -0
  25. package/src/client/hooks/use-version.ts +19 -6
  26. package/src/client/index.ts +2 -3
  27. package/src/client/ssg/boltdocs-shell.tsx +46 -14
  28. package/src/client/ssg/create-routes.tsx +56 -12
  29. package/src/client/store/boltdocs-context.tsx +24 -5
  30. package/src/shared/config-utils.ts +12 -0
  31. package/src/shared/types.ts +187 -0
  32. package/dist/node-BgvNl2Ay.mjs +0 -89
  33. package/dist/node-vkbb0MK7.cjs +0 -89
  34. package/dist/use-search-C9bxCqfF.js +0 -6
  35. package/dist/use-search-DcfZSunO.cjs +0 -6
  36. package/src/client/components/default-layout.tsx +0 -89
@@ -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,16 +171,22 @@ interface BoltdocsConfig$1 {
171
171
  seo?: BoltdocsSeoConfig;
172
172
  vite?: any;
173
173
  }
174
- //#endregion
175
- //#region src/shared/config-utils.d.ts
176
174
  /**
177
- * Type-safe helper for defining Boltdocs configuration.
178
- * This is an identity function that provides IntelliSense in both
179
- * Node.js (config files) and client-side code (MDX examples).
180
- *
181
- * @param config - The Boltdocs configuration object
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.
182
177
  */
183
- declare function defineConfig(config: BoltdocsConfig$1): BoltdocsConfig$1;
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;
184
190
  //#endregion
185
191
  //#region src/client/types.d.ts
186
192
  /**
@@ -342,17 +348,17 @@ declare function useRoutes(): {
342
348
  routes: ComponentRoute[];
343
349
  allRoutes: ComponentRoute[];
344
350
  currentRoute: ComponentRoute | undefined;
345
- currentLocale: string | undefined;
346
- currentLocaleLabel: string | undefined;
351
+ currentLocale: BoltdocsLocale;
352
+ currentLocaleLabel: any;
347
353
  availableLocales: {
348
- key: string;
354
+ key: BoltdocsLocale;
349
355
  label: string;
350
356
  isCurrent: boolean;
351
357
  }[];
352
- currentVersion: string | undefined;
358
+ currentVersion: BoltdocsVersion;
353
359
  currentVersionLabel: string | undefined;
354
360
  availableVersions: {
355
- key: string;
361
+ key: BoltdocsVersion;
356
362
  label: string;
357
363
  isCurrent: boolean;
358
364
  }[];
@@ -431,16 +437,16 @@ declare function useTabs(tabs?: BoltdocsTab[], routes?: ComponentRoute[]): {
431
437
  //#endregion
432
438
  //#region src/client/hooks/use-version.d.ts
433
439
  interface VersionOption {
434
- key: string;
440
+ key: BoltdocsVersion;
435
441
  label: string;
436
442
  value: string;
437
443
  isCurrent: boolean;
438
444
  }
439
445
  interface UseVersionReturn {
440
- currentVersion: string | undefined;
446
+ currentVersion: BoltdocsVersion | undefined;
441
447
  currentVersionLabel: string | undefined;
442
448
  availableVersions: VersionOption[];
443
- handleVersionChange: (version: string) => void;
449
+ handleVersionChange: (version: BoltdocsVersion) => void;
444
450
  }
445
451
  /**
446
452
  * Hook to manage and switch between different versions of the documentation.
@@ -449,16 +455,16 @@ declare function useVersion(): UseVersionReturn;
449
455
  //#endregion
450
456
  //#region src/client/hooks/use-i18n.d.ts
451
457
  interface LocaleOption {
452
- key: string;
458
+ key: BoltdocsLocale;
453
459
  label: string;
454
460
  value: string;
455
461
  isCurrent: boolean;
456
462
  }
457
463
  interface UseI18nReturn {
458
- currentLocale: string | undefined;
464
+ currentLocale: BoltdocsLocale | undefined;
459
465
  currentLocaleLabel: string | undefined;
460
466
  availableLocales: LocaleOption[];
461
- handleLocaleChange: (locale: string) => void;
467
+ handleLocaleChange: (locale: BoltdocsLocale) => void;
462
468
  }
463
469
  /**
464
470
  * Hook to manage and switch between different locales (languages) of the documentation.
@@ -560,19 +566,6 @@ interface DocsLayoutComponent extends React.FC<SlotProps> {
560
566
  }
561
567
  declare const DocsLayout: DocsLayoutComponent;
562
568
  //#endregion
563
- //#region src/client/components/default-layout.d.ts
564
- interface LayoutProps$1 {
565
- children: React.ReactNode;
566
- }
567
- /**
568
- * The built-in default layout for Boltdocs.
569
- * Users who create their own `layout.tsx` can import the same building blocks
570
- * and rearrange, wrap, or replace any section.
571
- */
572
- declare function DefaultLayout({
573
- children
574
- }: LayoutProps$1): _$react_jsx_runtime0.JSX.Element;
575
- //#endregion
576
569
  //#region src/client/components/ui-base/navbar.d.ts
577
570
  declare function Navbar(): _$react_jsx_runtime0.JSX.Element;
578
571
  //#endregion
@@ -601,7 +594,7 @@ interface HeadProps {
601
594
  path: string;
602
595
  title: string;
603
596
  description?: string;
604
- seo?: Record<string, any>;
597
+ seo?: Record<string, unknown>;
605
598
  }>;
606
599
  }
607
600
  declare function Head({
@@ -633,7 +626,7 @@ declare class ErrorBoundary extends Component<Props, State> {
633
626
  state: State;
634
627
  static getDerivedStateFromError(error: Error): State;
635
628
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
636
- 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> | _$react_jsx_runtime0.JSX.Element | 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;
637
630
  }
638
631
  //#endregion
639
632
  //#region src/client/components/ui-base/copy-markdown.d.ts
@@ -1557,4 +1550,15 @@ declare function Skeleton({
1557
1550
  //#region src/client/utils/cn.d.ts
1558
1551
  declare function cn(...inputs: ClassValue[]): string;
1559
1552
  //#endregion
1560
- export { Admonition, type AdmonitionProps, AnchorProvider, Badge, type BadgeProps, type BoltdocsConfig$1 as BoltdocsConfig, BoltdocsShell, type BoltdocsThemeConfig, Breadcrumbs, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Cards, type CardsProps, Caution, CodeBlock, ComponentPreview, type ComponentPreviewProps, ComponentProps, type ComponentPropsProps, type ComponentRoute, CopyMarkdown, Danger, DefaultLayout, 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, defineConfig, useActiveAnchor, useActiveAnchors, useBreadcrumbs, useConfig, useI18n, useItems, useLocalizedTo, useLocation, useMdxComponents, useNavbar, useOnThisPage, usePageNav, useRoutes, useSearch, useSidebar, useTabs, useTheme, useVersion };
1553
+ //#region src/client/utils/i18n.d.ts
1554
+ /**
1555
+ * Retrieves the correct translation from a value that can be either
1556
+ * a simple string or a map of locale-specific strings.
1557
+ *
1558
+ * @param value - The text to translate
1559
+ * @param locale - The current active locale (e.g., 'en', 'es')
1560
+ * @returns The translated string
1561
+ */
1562
+ declare function getTranslated(value: string | Record<string, string> | undefined, locale?: string): string;
1563
+ //#endregion
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 };
@@ -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 te,d as b,f as ne,g as re,h as ie,i as ae,j as x,k as oe,l as S,m as se,n as C,o as w,p as ce,r as T,s as E,t as le,u as ue,v as D,w as de,x as fe,y as O,z as k}from"../use-search-C9bxCqfF.js";import{Outlet as pe,useLoaderData as me,useLocation as A,useNavigate as he}from"react-router-dom";import ge from"virtual:boltdocs-layout";import{Children as j,Component as _e,Suspense as ve,createContext as ye,isValidElement as M,lazy as be,use as xe,useCallback as N,useEffect as P,useLayoutEffect as Se,useMemo as F,useRef as I,useState as L}from"react";import{Fragment as R,jsx as z,jsxs as B}from"react/jsx-runtime";import*as V from"react-aria-components";import{Button as Ce,RouterProvider as we}from"react-aria-components";import{Helmet as Te,HelmetProvider as Ee}from"react-helmet-async";import*as De from"lucide-react";import{AlertTriangle as Oe,ArrowLeft as ke,Bookmark as Ae,Check as je,ChevronDown as H,ChevronLeft as Me,ChevronRight as U,ChevronUp as Ne,ChevronsLeft as Pe,ChevronsRight as Fe,Circle as Ie,CircleHelp as Le,Copy as W,ExternalLink as Re,File as ze,FileCode as Be,FileImage as Ve,FileText as He,Flame as Ue,Folder as We,Home as Ge,Info as Ke,Languages as qe,Lightbulb as Je,Link as Ye,Monitor as Xe,Moon as Ze,Pencil as Qe,ShieldAlert as $e,Sun as et,TextAlignStart as tt,Zap as nt}from"lucide-react";import{cva as G}from"class-variance-authority";import rt from"virtual:boltdocs-mdx-components";import it from"virtual:boltdocs-icons";var at=Object.defineProperty,ot=(e,t)=>{let n={};for(var r in e)at(n,r,{get:e[r],enumerable:!0});return t||at(n,Symbol.toStringTag,{value:`Module`}),n};function st(e){return e}const ct=Symbol.for(`__BDOCS_MDX_COMPONENTS_CONTEXT__`),lt=Symbol.for(`__BDOCS_MDX_COMPONENTS_INSTANCE__`),ut=globalThis[ct]||(globalThis[ct]=ye({}));function dt(){let e=xe(ut);return(!e||Object.keys(e).length===0)&&globalThis[lt]?globalThis[lt]:e}function ft({components:e,children:t}){return typeof globalThis<`u`&&(globalThis[lt]=e),z(ut.Provider,{value:e,children:t})}function pt({route:e,content:t,mdxComponents:n}){let r=dt(),i=F(()=>({...r,...n}),[r,n]);return t?z(ge,{route:e,children:z(t,{components:i})}):null}function mt({MDXComponent:e,mdxComponents:t}){let n=me(),r=e||n?.MDXComponent,i=t||n?.mdxComponents;return r?z(pt,{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 ht=Symbol.for(`__BDOCS_THEME_CONTEXT__`),gt=Symbol.for(`__BDOCS_THEME_INSTANCE__`),_t=`boltdocs-theme-change`,vt=globalThis[ht]||(globalThis[ht]=ye(void 0));function yt({children:e}){let[t,n]=L(`system`),[r,i]=L(`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`)};P(()=>{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(_t,{detail:e}))}};return typeof globalThis<`u`&&(globalThis[gt]=o),z(vt.Provider,{value:o,children:e})}function K(){let e=xe(vt),[,t]=L({});if(P(()=>{if(e)return;let n=()=>t({});return window.addEventListener(_t,n),()=>window.removeEventListener(_t,n)},[e]),!e&&typeof globalThis<`u`&&globalThis[gt])return globalThis[gt];if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function bt(){let{pathname:e,hash:t}=A();return Se(()=>{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 xt=({className:e,variant:t,size:n,rounded:r,iconSize:i,disabled:a,...o})=>z(c,{className:k(`group`,p({variant:t,size:n,rounded:r,iconSize:i,disabled:a,className:e})),...o}),St=(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=>St(e,t)).join(``);if(M(e)){let n=t?.get(e.type);return n?n(e.props):St(e.props.children,t)}return``},Ct=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 wt(e){let{title:t}=e,[n,r]=L(!1),[i,a]=L(!1),[o,s]=L(!1),c=I(null);_();let l=N(async()=>{Ct(c.current?.textContent??``),r(!0),setTimeout(()=>r(!1),2e3)},[]);return P(()=>{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 Tt=({children:e,className:t,plain:n=!1,...r})=>z(`div`,{className:k(`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}),Et=({children:e,className:t,...n})=>z(`div`,{className:k(`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}),Dt=({children:e,className:t,...n})=>z(`div`,{className:k(`flex items-center space-x-2`,t),...n,children:e}),Ot=({className:e,children:t,shouldTruncate:n=!1,...r})=>z(`div`,{className:k(`relative`,{"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":n},e),...r,children:t}),kt={ts:a,tsx:l,js:oe,jsx:l,json:e,css:r,html:h,md:x,mdx:x,bash:f,sh:f,yaml:s,yml:s,rs:u,rust:u,toml:i},At=({copied:e,handleCopy:t})=>z(de,{content:e?`Copied!`:`Copy code`,children:z(Ce,{onPress:t,className:k(`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:z(e?je:W,{size:20})})});function q(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}=wt(e),y=kt[f];return B(Tt,{plain:c,className:e.className,children:[(d||!n)&&B(Et,{children:[z(Dt,{children:d&&B(R,{children:[y?z(y,{size:14}):z(ze,{size:14,className:`opacity-60`}),z(`span`,{children:d})]})}),!n&&z(At,{copied:p,handleCopy:ee})]}),B(Ot,{shouldTruncate:v,children:[u?z(`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}}):z(`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:St(t)}),g&&z(`div`,{className:k(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:z(Ce,{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 jt({initialIndex:e=0,tabs:t}){let n=t[e]?.props.disabled?t.findIndex(e=>!e.props.disabled):e,[r,i]=L(n===-1?0:n),a=I([]),[o,s]=L({opacity:0,transform:`translateX(0)`,width:0});return P(()=>{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:N(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 Mt=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`}}),Nt=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 Pt({children:e}){return z(`div`,{className:`py-4`,children:typeof e==`string`?z(q,{className:`language-bash`,children:z(`code`,{children:e.trim()})}):e})}function Ft({defaultIndex:e=0,children:t}){let n=F(()=>j.toArray(t).filter(e=>M(e)&&e.props?.label),[t]),{active:r,setActive:i,tabRefs:a,indicatorStyle:o}=jt({initialIndex:e,tabs:n});return z(`div`,{className:`my-8 w-full group/tabs`,children:B(V.Tabs,{selectedKey:r.toString(),onSelectionChange:e=>i(Number(e)),className:`w-full`,children:[B(V.TabList,{"aria-label":`Content Tabs`,className:k(Mt()),children:[n.map((e,t)=>{let{label:n,icon:r,disabled:i}=e.props,o=t.toString();return B(V.Tab,{id:o,isDisabled:i,ref:e=>{a.current[t]=e},className:({isSelected:e,isDisabled:t})=>k(Nt({isActive:e,isDisabled:t})),children:[!!r&&z(`span`,{className:`shrink-0 [&>svg]:w-4 [&>svg]:h-4`,children:r}),z(`span`,{children:n})]},o)}),z(`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)=>z(V.TabPanel,{id:t.toString(),children:n[t]},t))]})})}function It({src:e,poster:t,alt:n,children:r,controls:i,preload:a=`metadata`,...o}){let s=I(null),[c,l]=L(!1);return P(()=>{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()},[]),z(`div`,{ref:s,className:`my-6 overflow-hidden rounded-lg border border-border-subtle`,children:c?B(`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.`]}):z(`div`,{className:`aspect-video bg-bg-surface animate-pulse`,role:`img`,"aria-label":n||`Video`})})}const Lt=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 Rt({variant:e=`default`,children:t,className:n=``,...r}){return z(`span`,{className:k(Lt({variant:e}),n),...r,children:t})}const zt=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 Bt({cols:e=3,children:t,className:n=``,...r}){return z(`div`,{className:k(zt({cols:e}),n),...r,children:t})}function Vt({title:e,icon:t,href:n,children:r,className:i=``,...a}){let o=I(null),s=I(null),c=N(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=B(R,{children:[z(`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&&z(`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}),B(`div`,{className:`space-y-1.5`,children:[e&&z(`h3`,{className:`text-sm font-bold text-text-main`,children:e}),r&&z(`div`,{className:`text-sm text-text-muted leading-relaxed`,children:r})]})]}),u=k(`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?z(V.Link,{ref:s,href:n,className:k(u,`no-underline cursor-pointer`),onMouseMove:c,...a,children:l}):z(`div`,{ref:o,role:`presentation`,className:u,onMouseMove:c,...a,children:l})}const Ht={note:z(Ae,{size:18}),tip:z(Je,{size:18}),info:z(Ke,{size:18}),warning:z(Oe,{size:18}),danger:z($e,{size:18}),important:z(Ue,{size:18}),caution:z(nt,{size:18})},Ut=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 J({type:e=`note`,title:t,children:n,className:r=``,...i}){return B(`div`,{className:k(Ut({type:e}),r),role:e===`warning`||e===`danger`?`alert`:`note`,...i,children:[Ht[e],z(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0`,children:n})]})}const Wt=e=>z(J,{type:`note`,...e}),Gt=e=>z(J,{type:`tip`,...e}),Kt=e=>z(J,{type:`warning`,...e}),qt=e=>z(J,{type:`danger`,...e}),Jt=e=>z(J,{type:`info`,...e}),Yt=e=>z(J,{type:`important`,...e}),Xt=e=>z(J,{type:`caution`,...e}),Zt=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}}),Qt=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}}),$t=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 en({icon:e,children:t,variant:n,dense:r}){return B(`li`,{className:k(Qt({variant:n,dense:r})),children:[e&&z(`span`,{className:k($t({variant:n===`bubble`?`bubble`:`default`})),children:e}),z(`div`,{className:`flex-1 text-text-muted group-hover:text-text-main transition-colors`,children:t})]})}const tn={checked:e=>z(je,{size:14,className:k(`text-emerald-500 shrink-0`,e)}),arrow:e=>z(U,{size:14,className:k(`text-primary-400 shrink-0`,e)}),bubble:e=>z(Ie,{size:6,fill:`currentColor`,className:k(`text-primary-500 shrink-0`,e)}),default:()=>null,number:()=>null};function nn({variant:e=`default`,cols:t=1,dense:n=!1,children:r,className:i,...a}){let o=t!==void 0&&Number(t)>1,s=tn[e],c=Zt({variant:e,cols:t,dense:n,isGrid:o,className:i});return e===`default`||e===`number`?z(e===`number`?`ol`:`ul`,{className:c,...a,children:r}):z(`ul`,{className:c,...a,children:j.map(r,t=>{if(!M(t))return t;let r=t,i=r.type===`li`?r.props.children:r.props.children||t;return z(en,{icon:s(),variant:e,dense:n,children:i})})})}const rn={ts:a,tsx:l,js:oe,jsx:l,json:e,css:r,html:h,md:x,mdx:x,bash:f,sh:f,yaml:s,yml:s},an={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 on(e){return typeof e==`string`?e:typeof e==`number`?e.toString():Array.isArray(e)?e.map(on).join(``):M(e)&&e.props&&typeof e.props==`object`&&`children`in e.props?on(e.props.children):``}function sn(e,t){let n=e.toLowerCase(),r=`shrink-0 transition-colors duration-200`;if(t)return z(We,{size:16,strokeWidth:2,className:k(r,`text-primary-400`),fill:`currentColor`,fillOpacity:.15});let i=rn[n.split(`.`).pop()||``];if(i)return z(i,{size:16});let a=k(r,`text-text-dim group-hover:text-text-main`);return an.CODE.test(n)?z(Be,{size:16,strokeWidth:2,className:a}):an.TEXT.test(n)?z(He,{size:16,strokeWidth:2,className:a}):an.IMAGE.test(n)?z(Ve,{size:16,strokeWidth:2,className:a}):z(ze,{size:16,strokeWidth:2,className:a})}function cn(e,t){if(!M(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 ln(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Y(e,t=`root`){if(!M(e))return[];let n=[];if(cn(e,`ul`))return j.forEach(e.props.children,(e,r)=>{n.push(...Y(e,`${t}-${r}`))}),n;if(cn(e,`li`)){let r=j.toArray(e.props.children),i=r.findIndex(e=>cn(e,`ul`)),a=i!==-1,o=a?r.slice(0,i):r,s=a?r.slice(i):[],{name:c,comment:l}=ln(on(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?Y(s[0],`${t}-${d}`):void 0}),n}return e.props&&typeof e.props==`object`&&`children`in e.props&&j.forEach(e.props.children,(e,r)=>{n.push(...Y(e,`${t}-${r}`))}),n}function un({item:e}){return B(V.TreeItem,{id:e.id,textValue:e.name,className:`outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md`,children:[z(V.TreeItemContent,{children:({isExpanded:t,hasChildItems:n})=>B(`div`,{className:`flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer`,children:[z(`div`,{style:{width:`calc((var(--tree-item-level) - 1) * 1rem)`},className:`shrink-0`}),n?z(V.Button,{slot:`chevron`,className:`outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors`,children:z(U,{size:14,strokeWidth:3,className:k(`transition-transform duration-200`,t&&`rotate-90`)})}):z(`div`,{className:`w-[18px]`}),sn(e.name,e.isFolder),z(`span`,{className:k(`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&&B(`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&&z(V.Collection,{items:e.children,children:e=>z(un,{item:e})})]})}function dn({children:e}){let t=F(()=>Y(e),[e]);return z(`div`,{className:`my-8`,children:z(V.Tree,{items:t,"aria-label":`File Tree`,className:k(`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=>z(un,{item:e})})})}function fn({data:e,sortable:t=!1,paginated:n=!1,pageSize:r=10}){let[i,a]=L(null),[o,s]=L(1),c=F(()=>{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:F(()=>{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 pn({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}=fn({data:t,sortable:i,paginated:a,pageSize:o}),p=e=>i?s?.key===e?s.direction===`asc`?z(Ne,{size:14,className:`ml-1 text-primary-400`}):z(H,{size:14,className:`ml-1 text-primary-400`}):z(H,{size:14,className:`ml-1 opacity-30`}):null,m=n||B(R,{children:[e&&z(`thead`,{children:z(`tr`,{children:e.map((e,t)=>z(`th`,{onClick:()=>f(t),className:k(`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:B(`div`,{className:`flex items-center`,children:[e,p(t)]})},t))})}),d&&z(`tbody`,{children:d.map((e,t)=>z(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:e.map((e,t)=>z(`td`,{className:`px-3 py-2 border-b border-border-subtle text-sm text-text-muted`,children:e},t))},t))})]});return B(`div`,{className:k(`my-6 rounded-lg border border-border-subtle overflow-hidden`,r),children:[z(`div`,{className:`overflow-x-auto`,children:z(`table`,{className:`w-full border-collapse text-sm`,children:m})}),a&&u>1&&B(`div`,{className:`flex items-center justify-between border-t border-border-subtle px-4 py-3`,children:[B(`span`,{className:`text-xs text-text-muted`,children:[`Page `,c,` of `,u]}),B(`div`,{className:`flex items-center gap-1`,children:[z(V.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:z(Pe,{size:16})}),z(V.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:z(Me,{size:16})}),z(V.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:z(U,{size:16})}),z(V.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:z(Fe,{size:16})})]})]})]})}function mn({name:e,type:t,defaultValue:n,required:r=!1,children:i,id:a,className:o=``}){return B(`article`,{className:k(`group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300`,o),id:a,children:[B(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4`,children:[B(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[z(`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&&z(`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&&B(`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:[z(`span`,{className:`h-1 w-1 rounded-full bg-red-400 animate-pulse`}),`Required`]})]}),n&&B(`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:[z(`span`,{className:`font-semibold opacity-60 uppercase tracking-tighter`,children:`Default`}),z(`code`,{className:`font-mono text-text-main font-medium`,children:n})]})]}),z(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30`,children:i})]})}function hn({to:e,children:t,className:n=``,...r}){let i=e&&(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`));return z(O,{href:e,className:k(`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 gn({src:e,alt:t,theme:n,...r}){let{theme:i}=K();return n&&n!==i?null:z(`img`,{src:e,alt:t||``,...r})}function _n({title:e,props:t,className:n=``}){return B(`div`,{className:k(`my-6`,n),children:[e&&z(`h3`,{className:`text-base font-bold text-text-main mb-3`,children:e}),z(`div`,{className:`overflow-x-auto rounded-lg border border-border-subtle`,children:B(`table`,{className:`w-full border-collapse text-sm`,children:[z(`thead`,{children:B(`tr`,{children:[z(`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`}),z(`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`}),z(`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`}),z(`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`})]})}),z(`tbody`,{children:t.map((e,t)=>B(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:[B(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:[z(`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&&z(`span`,{className:`ml-1 text-red-400 font-bold`,children:`*`})]}),z(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:z(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted`,children:e.type})}),z(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:e.defaultValue?z(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400`,children:e.defaultValue}):z(`span`,{className:`text-text-dim`,children:`—`})}),z(`td`,{className:`px-4 py-2.5 border-b border-border-subtle text-text-muted`,children:e.description})]},`${e.name}-${t}`))})]})})]})}function vn(e){let{code:t,children:n,preview:r}=e;return{initialCode:F(()=>(t??(typeof n==`string`?n:``)).trim(),[t,n]),previewElement:F(()=>r??(typeof n==`string`?null:n),[r,n])}}function yn(e){let{highlightedHtml:t,hideCode:n=!1,hideCopy:r=!1}=e,{initialCode:i,previewElement:a}=vn(e);return B(`div`,{className:`my-6 overflow-hidden rounded-xl border border-border-subtle`,children:[z(`div`,{className:`flex items-center justify-center p-8 bg-bg-surface`,children:a}),!n&&z(`div`,{className:`border-t border-border-subtle`,children:z(q,{hideCopy:r,lang:`tsx`,highlightedHtml:t,plain:!0,children:i})})]})}const bn=e=>{let[t,n]=L(!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 xn({content:e,mdxRaw:t,config:n}){let r=t||e||``,{copied:i,handleCopy:a,handleOpenRaw:o}=bn(r),s=n!==!1,l=typeof n==`object`&&n.text||`Copy Markdown`;return!s||!r?null:z(`div`,{className:`relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200`,children:B(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:[z(c,{variant:`ghost`,onPress:a,icon:z(i?je:W,{size:16}),iconPosition:`left`,className:k(`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}),B(T.Trigger,{placement:`bottom end`,children:[z(c,{variant:`ghost`,isIconOnly:!0,icon:z(H,{size:14}),className:k(`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`)}),B(T.Root,{className:`w-52`,children:[B(T.Item,{onAction:a,children:[z(W,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),z(`span`,{className:`font-medium text-[0.8125rem]`,children:`Copy Markdown`})]}),B(T.Item,{onAction:o,children:[z(Re,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),z(`span`,{className:`font-medium text-[0.8125rem]`,children:`View as Markdown`})]})]})]})]})})}var Sn=ot({Admonition:()=>J,Badge:()=>Rt,Button:()=>xt,Card:()=>Vt,Cards:()=>Bt,Caution:()=>Xt,CodeBlock:()=>q,ComponentPreview:()=>yn,ComponentProps:()=>_n,CopyMarkdown:()=>xn,Danger:()=>qt,Field:()=>mn,FileTree:()=>dn,Image:()=>gn,Important:()=>Yt,InfoBox:()=>Jt,Link:()=>hn,List:()=>nn,Note:()=>Wt,Tab:()=>Pt,Table:()=>pn,Tabs:()=>Ft,Tip:()=>Gt,Video:()=>It,Warning:()=>Kt});function Cn(){return z(`div`,{className:k(`w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in`),children:B(`div`,{className:`mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10`,children:[B(`div`,{className:`flex gap-2`,children:[z(C,{className:`h-3 w-16`}),z(C,{className:`h-3 w-24`})]}),z(C,{className:`h-10 w-[60%] sm:h-12`}),B(`div`,{className:`space-y-3`,children:[z(C,{className:`h-4 w-full`}),z(C,{className:`h-4 w-[95%]`}),z(C,{className:`h-4 w-[40%]`})]}),B(`div`,{className:`space-y-6 pt-4`,children:[z(C,{className:`h-7 w-32`}),B(`div`,{className:`space-y-3`,children:[z(C,{className:`h-4 w-full`}),z(C,{className:`h-4 w-[98%]`}),z(C,{className:`h-4 w-[92%]`}),z(C,{className:`h-4 w-[60%]`})]})]}),z(C,{className:`h-32 w-full rounded-lg bg-bg-muted/50`}),B(`div`,{className:`space-y-6 pt-4`,children:[z(C,{className:`h-7 w-48`}),B(`div`,{className:`space-y-3`,children:[z(C,{className:`h-4 w-full`}),z(C,{className:`h-4 w-[85%]`})]})]})]})})}const X=({level:e,id:t,children:n,...r})=>B(`h${e}`,{id:t,...r,className:`boltdocs-heading`,children:[n,t&&z(`a`,{href:`#${t}`,className:`header-anchor`,"aria-label":`Anchor`,children:z(Ye,{size:16})})]}),wn={...Sn,Loading:Cn,h1:e=>z(X,{level:1,...e}),h2:e=>z(X,{level:2,...e}),h3:e=>z(X,{level:3,...e}),h4:e=>z(X,{level:4,...e}),h5:e=>z(X,{level:5,...e}),h6:e=>z(X,{level:6,...e}),pre:e=>z(q,{...e,children:e.children})};function Tn({config:e}){let{currentLocale:t}=g();return P(()=>{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 En({config:e}){let t=A(),{setLocale:n,setVersion:r,currentLocale:i,currentVersion:a}=g();return P(()=>{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 Dn({config:e,routes:r,components:i={}}){let a=F(()=>({...wn,...rt,...i}),[i]),s=he();return z(Ee,{children:z(o,{children:z(yt,{children:z(ft,{components:a,children:z(t.Provider,{value:e,children:z(n,{routes:r,children:B(we,{navigate:s,children:[z(bt,{}),z(En,{config:e}),z(Tn,{config:e}),z(pe,{})]})})})})})})})}function On(){return z(`div`,{className:`flex items-center justify-center min-h-[60vh] text-center`,children:B(`div`,{className:`space-y-4`,children:[z(`span`,{className:`text-8xl font-black tracking-tighter text-primary-500/20`,children:`404`}),z(`h1`,{className:`text-2xl font-bold text-text-main`,children:`Page Not Found`}),z(`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.`}),B(O,{href:`/`,className:`inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30`,children:[z(ke,{size:16}),` Go to Home`]})]})})}function kn(e,t){let n=t.replace(/\\/g,`/`);return Object.keys(e).find(e=>e.endsWith(`/${n}`)||e.endsWith(n))}function An(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=kn(r,e.filePath),n=t?r[t]?.default:null,i=u(e.path===``?`/`:e.path);return{path:i,element:z(mt,{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:z(l,{children:z(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:z(l,{children:z(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:z(l,{children:z(t,{})}),getStaticPaths:()=>[r]})}))}),d.push({path:`*`,element:z(l,{children:z(On,{})})}),[{element:z(Dn,{config:n,routes:[...t],components:c}),children:d}]}function Z(e,t){return e?typeof e==`string`?e:t&&e[t]?e[t]:Object.values(e)[0]||``:``}function jn(){let e=_(),{theme:t,resolvedTheme:n}=K(),r=A(),{currentLocale:i}=m(),a=e.theme||{},o=Z(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:Z(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 Mn(e){let t=_(),n=A(),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 Nn(e=[]){let[t,n]=L(null);return{headings:e,activeId:t,setActiveId:n}}function Pn(e=[],t=[]){let n=A(),r=I([]),[i,a]=L({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 P(()=>{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 Q(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 Fn(){let e=he(),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=Q(r.filePath,r.version,r.locale),i=n.find(n=>Q(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=>Q(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 In(){let e=he(),{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=Q(n.filePath,n.version,n.locale),r=t.find(t=>Q(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=>Q(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 Ln(){let{routes:e,currentRoute:t}=m(),n=A();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 Rn(){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 zn=()=>A();function Bn({children:e,className:t,style:n}){return z(`div`,{className:k(`h-screen flex flex-col overflow-hidden bg-bg-main text-text-main`,t),style:n,children:e})}function Vn({children:e,className:t,style:n}){return z(`div`,{className:k(`mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden`,t),style:n,children:e})}function Hn({children:e,className:t,style:n}){return z(`main`,{className:k(`boltdocs-content flex-1 min-w-0 overflow-y-auto`,`contain-layout`,t),style:n,children:e})}function Un({children:e,className:t,style:n}){let{pathname:r}=zn();return z(`div`,{className:k(`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 Wn({children:e,className:t,style:n}){return z(`div`,{className:k(`flex items-center justify-between mb-10`,t),style:n,children:e})}function Gn({children:e,className:t,style:n}){return z(`div`,{className:k(`mt-20`,t),style:n,children:e})}const $=Object.assign(Bn,{Body:Vn,Content:Hn,ContentMdx:Un,ContentHeader:Wn,ContentFooter:Gn});function Kn(){let{theme:e,setTheme:t}=K(),[n,r]=L(!1);if(P(()=>{r(!0)},[]),!n)return z(`div`,{className:`h-9 w-9`});let i=e===`system`?Xe:e===`dark`?Ze:et;return B(T.Trigger,{placement:`bottom right`,children:[z(Ce,{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:z(i,{size:20,className:`animate-in fade-in zoom-in duration-300`})}),B(T.Root,{selectionMode:`single`,selectedKeys:[e],onSelectionChange:e=>{let n=Array.from(e)[0];t(n)},children:[B(T.Item,{id:`light`,children:[z(et,{size:16}),z(`span`,{children:`Light`})]}),B(T.Item,{id:`dark`,children:[z(Ze,{size:16}),z(`span`,{children:`Dark`})]}),B(T.Item,{id:`system`,children:[z(Xe,{size:16}),z(`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]=L(null);return P(()=>{e&&qn(e).then(e=>n(e)).catch(()=>n(`0`))},[e]),B(`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:[z(d,{className:`h-4 w-4`}),t&&z(`span`,{className:`tabular-nums`,children:t})]})}function Xn({tabs:e,routes:t}){let{currentLocale:n}=m(),{indicatorStyle:r,tabRefs:i,activeIndex:a}=Pn(e,t),o=e=>{if(!e)return null;if(e.trim().startsWith(`<svg`))return z(`span`,{className:`h-4 w-4`,dangerouslySetInnerHTML:{__html:e}});let t=De[e];return t?z(t,{size:16}):z(`img`,{src:e,alt:``,className:`h-4 w-4 object-contain`})};return z(`div`,{className:`mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6`,children:B(te.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 B(O,{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),z(`span`,{children:Z(e.text,n)})]},e.id)}),z(te.Indicator,{style:r})]})})}const Zn=be(()=>import(`../search-dialog-3lvKsbVG.js`).then(e=>({default:e.SearchDialog})));function Qn(){let{links:e,title:t,logo:n,logoProps:r,github:i,social:a,config:o}=jn(),{routes:s,allRoutes:c,currentVersion:l,currentLocale:u}=m(),{pathname:d}=A(),f=o.theme||{},p=d.startsWith(`/docs`),h=f?.tabs&&f.tabs.length>0;return B(D.Root,{className:h?`border-b-0`:``,children:[B(D.Content,{children:[B(D.Left,{children:[n&&z(D.Logo,{src:n,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),z(D.Title,{children:t}),o.versions&&l&&z(er,{})]}),z(D.Center,{children:z(ve,{fallback:z(`div`,{className:`h-9 w-32 animate-pulse rounded-md bg-bg-surface`}),children:z(Zn,{routes:s||[]})})}),B(D.Right,{children:[z(D.Links,{children:e.map(e=>z($n,{link:e},e.href))}),o.i18n&&u&&z(tr,{}),z(D.Split,{}),z(Kn,{}),i&&z(Yn,{repo:f?.githubRepo??``}),a.length>0&&z(D.Split,{}),z(`div`,{className:`flex items-center gap-1`,children:a.map(({icon:e,link:t})=>z(D.Socials,{icon:e,link:t,className:`p-1.5`},t))})]})]}),p&&h&&f?.tabs&&z(`div`,{className:`w-full border-b border-border-subtle bg-bg-main`,children:z(Xn,{tabs:f.tabs,routes:c||s||[]})})]})}function $n({link:e}){let t=fe(e.href||``);return z(D.Link,{...e,href:t})}function er(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:n}=Fn();return t.length===0?null:B(T.Trigger,{children:[z(c,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:z(H,{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:z(`span`,{className:`font-semibold text-[0.8125rem]`,children:e})}),z(T.Root,{children:z(T.Section,{items:t,children:e=>z(T.Item,{onPress:()=>n(e.value),children:e.label},`${e.value??``}`)})})]})}function tr(){let{currentLocale:e,availableLocales:t,handleLocaleChange:n}=In();return t.length===0?null:B(T.Trigger,{children:[z(c,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:z(H,{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:B(`div`,{className:`flex items-center gap-1.5`,children:[z(qe,{className:`w-3.5 h-3.5 text-primary-500`}),z(`span`,{className:`font-bold text-[0.75rem] uppercase opacity-90`,children:e||`en`})]})}),z(T.Root,{children:z(T.Section,{items:t,children:e=>z(T.Item,{onPress:()=>n(e.value),children:B(`div`,{className:`flex items-center justify-between w-full gap-4`,children:[z(`span`,{children:e.label}),z(`span`,{className:`text-[10px] font-bold opacity-40 uppercase tracking-tighter`,children:e.value})]})},`${e.value??``}`)})})]})}function nr(){return z(`div`,{className:`flex items-center justify-center mt-10 mb-4 px-4 w-full`,children:B(`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:[z(nt,{className:`w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300`,fill:`currentColor`}),B(`span`,{className:`text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide`,children:[`Powered by`,` `,z(`strong`,{className:`font-bold text-text-main/80 group-hover:text-text-main`,children:`Boltdocs`})]})]})})}function rr(e){if(!e)return;let t={...De,...it};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=F(()=>e.subRoutes?.some(e=>e.path===t),[e.subRoutes,t]),[a,o]=L(i||r);return P(()=>{(i||r)&&o(!0)},[i,r]),z(E.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 z(E.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 z(E.Group,{title:e.title,icon:n(e.icon),children:e.routes.map(e=>{if(e.subRoutes&&e.subRoutes.length>0)return z(ir,{route:e,activePath:t,getIcon:n},e.path);let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return z(E.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}=Mn(e),a=t.theme||{};return B(E.Root,{children:[r.length>0&&z(E.Group,{className:`mb-6`,children:r.map(e=>{let t=i===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return z(E.Link,{label:e.title,href:e.path,active:t,icon:rr(e.icon),badge:e.badge},e.path)})}),n.map(e=>z(ar,{group:e,activePath:i,getIcon:rr},e.slug)),a?.poweredBy&&z(`div`,{className:`mt-auto pt-8`,children:z(nr,{})})]})}function sr({headings:e=[],editLink:t,communityHelp:n,filePath:r}){let{headings:i}=Nn(e),a=F(()=>i.map(e=>({title:e.text,url:`#${e.id}`,depth:e.level})),[i]);return i.length===0?null:z(ue,{toc:a,children:z(cr,{headings:i,editLink:t,communityHelp:n,filePath:r})})}function cr({headings:e,editLink:t,communityHelp:n,filePath:r}){let i=ce(),[a,o]=L({opacity:0}),s=I(null),c=I(null);P(()=>{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=N((e,t)=>{e.preventDefault();let n=document.getElementById(t);n&&(n.scrollIntoView({behavior:`smooth`}),window.history.pushState(null,``,`#${t}`))},[]);return B(b.Root,{children:[B(b.Header,{className:`flex flex-row gap-x-2`,children:[z(tt,{size:16}),`On this page`]}),z(ne,{containerRef:c,children:B(b.Content,{className:`max-h-[450px] boltdocs-otp-scroll-area`,ref:c,children:[z(b.Indicator,{style:a}),z(`ul`,{className:`relative space-y-2 border-l border-border-subtle`,ref:s,children:e.map(e=>z(b.Item,{level:e.level,children:z(b.Link,{href:`#${e.id}`,active:i===e.id,onClick:t=>l(t,e.id),className:`pl-4`,children:e.text})},e.id))})]})}),(t||n)&&B(`div`,{className:`mt-8 pt-8 border-t border-border-subtle space-y-4`,children:[z(`p`,{className:`text-xs font-bold uppercase text-text-main`,children:`Need help?`}),B(`ul`,{className:`space-y-3`,children:[t&&r&&z(`li`,{children:B(`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:[z(Qe,{size:16}),`Edit this page`]})}),n&&z(`li`,{children:B(`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:[z(Le,{size:16}),`Community help`]})})]})]})]})}function lr({siteTitle:e,siteDescription:t,routes:n}){let r=A(),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 B(Te,{children:[z(`title`,{children:c}),z(`meta`,{name:`description`,content:s}),z(`meta`,{property:`og:title`,content:c}),z(`meta`,{property:`og:description`,content:s}),z(`meta`,{property:`og:type`,content:`article`}),typeof window<`u`&&z(`meta`,{property:`og:url`,content:window.location.href}),typeof window<`u`&&z(`link`,{rel:`canonical`,href:window.location.origin+r.pathname}),z(`meta`,{name:`twitter:card`,content:`summary`}),z(`meta`,{name:`twitter:title`,content:c}),z(`meta`,{name:`twitter:description`,content:s}),f&&z(`meta`,{name:`twitter:image`,content:f}),f&&z(`meta`,{property:`og:image`,content:f}),z(`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:`)?z(`meta`,{property:e,content:t},e):z(`meta`,{name:e,content:t},e)),Object.entries(l).map(([e,t])=>e===`noindex`&&t===!0?z(`meta`,{name:`robots`,content:`noindex`},`noindex`):e===`robots`?z(`meta`,{name:`robots`,content:t},`robots`):e===`canonical`?z(`link`,{rel:`canonical`,href:t},`canonical`):e.startsWith(`og:`)||e.startsWith(`music:`)||e.startsWith(`video:`)||e.startsWith(`article:`)||e.startsWith(`book:`)||e.startsWith(`profile:`)?z(`meta`,{property:e,content:t},e):z(`meta`,{name:e,content:t},e))]})}function ur(){let{crumbs:e,activeRoute:t}=Rn(),n=_().theme||{};return e.length===0||!n?.breadcrumbs?null:B(w.Root,{children:[z(w.Item,{children:z(w.Link,{href:`/`,children:z(Ge,{size:14})})}),e.map((e,n)=>B(w.Item,{children:[z(w.Separator,{}),z(w.Link,{href:e.href,className:k({"font-medium text-text-main":e.href===t?.path}),children:e.label})]},`crumb-${e.href}-${e.label}-${n}`))]})}function dr(){let{prevPage:e,nextPage:t}=Ln();return!e&&!t?null:B(S.Root,{className:`animate-in fade-in slide-in-from-bottom-4 duration-700`,children:[e?B(S.Link,{to:e.path,direction:`prev`,children:[z(S.Title,{children:`Previous`}),z(S.Description,{children:e.title})]}):z(`div`,{}),t&&B(S.Link,{to:t.path,direction:`next`,children:[z(S.Title,{children:`Next`}),z(S.Description,{children:t.title})]})]})}var fr=class extends _e{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||B(`div`,{className:`flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4`,children:[z(`div`,{className:`text-lg font-bold text-red-400`,children:`Something went wrong`}),z(`p`,{className:`text-sm text-text-muted max-w-md`,children:this.state.error?.message||`An unexpected error occurred while rendering this page.`}),z(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}};function pr({children:e}){let{routes:t,allRoutes:n,currentRoute:r,currentLocale:i}=m(),{pathname:a}=A(),o=_(),s=dt().CopyMarkdown||xn,c=a.startsWith(`/docs`);return B($,{children:[z(lr,{siteTitle:Z(o.theme?.title,i)||`Boltdocs`,siteDescription:Z(o.theme?.description,i)||``,routes:n}),z(Qn,{}),B($.Body,{children:[c&&z(or,{routes:t,config:o}),z($.Content,{children:B($.ContentMdx,{children:[c&&B($.ContentHeader,{children:[z(ur,{}),z(s,{mdxRaw:r?._rawContent,route:r,config:o.theme?.copyMarkdown})]}),z(fr,{children:e}),c&&z($.ContentFooter,{children:z(dr,{})})]})}),c&&z(sr,{headings:r?.headings,editLink:o.theme?.editLink,communityHelp:o.theme?.communityHelp,filePath:r?.filePath})]})]})}export{J as Admonition,ue as AnchorProvider,Rt as Badge,Dn as BoltdocsShell,ur as Breadcrumbs,xt as Button,v as ButtonGroup,Vt as Card,Bt as Cards,Xt as Caution,q as CodeBlock,yn as ComponentPreview,_n as ComponentProps,xn as CopyMarkdown,qt as Danger,pr as DefaultLayout,$ as DocsLayout,fr as ErrorBoundary,mn as Field,dn as FileTree,lr as Head,gn as Image,Yt as Important,Jt as InfoBox,hn as Link,nn as List,Cn as Loading,mt as MdxPage,Qn as Navbar,On as NotFound,Wt as Note,sr as OnThisPage,dr as PageNav,w as PrimitiveBreadcrumbs,c as PrimitiveButton,O as PrimitiveLink,T as PrimitiveMenu,y as PrimitiveNavLink,D as PrimitiveNavbar,ee as PrimitiveNavigationMenu,b as PrimitiveOnThisPage,S as PrimitivePageNav,ae as PrimitivePopover,E as PrimitiveSidebar,C as PrimitiveSkeleton,te as PrimitiveTabs,de as PrimitiveTooltip,ne as ScrollProvider,re as SearchDialogPrimitive,or as Sidebar,Pt as Tab,pn as Table,Ft as Tabs,Gt as Tip,It as Video,Kt as Warning,k as cn,An as createRoutes,st as defineConfig,ce as useActiveAnchor,se as useActiveAnchors,Rn as useBreadcrumbs,_ as useConfig,In as useI18n,ie as useItems,fe as useLocalizedTo,zn as useLocation,dt as useMdxComponents,jn as useNavbar,Nn as useOnThisPage,Ln as usePageNav,m as useRoutes,le as useSearch,Mn as useSidebar,Pn as useTabs,K as useTheme,Fn 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};
@@ -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-vkbb0MK7.cjs`);let t=require(`vite`),n=require(`fast-glob`);n=e.x(n);let r=require(`fs`);r=e.x(r);let i=require(`path`);i=e.x(i);let a=require(`cac`);a=e.x(a);let o=require(`@bdocs/ssg/node`);var s=e.b({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!
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();
@@ -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-BgvNl2Ay.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!
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{};
@@ -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-vkbb0MK7.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.resolveConfig=e.g,exports.validatePlugins=e.c;
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;
@@ -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
  /**
@@ -261,6 +270,24 @@ interface RouteMeta {
261
270
  seo?: Record<string, any>;
262
271
  }
263
272
  //#endregion
273
+ //#region src/node/utils.d.ts
274
+ /**
275
+ * Normalizes a file path by replacing Windows backslashes with forward slashes.
276
+ * Ensures consistent path handling across different operating systems.
277
+ *
278
+ * @param p - The file path to normalize
279
+ * @returns The normalized path using forward slashes
280
+ */
281
+ declare function normalizePath(p: string): string;
282
+ /**
283
+ * Sanitizes a filename or path component by removing dangerous characters.
284
+ * Prevents multiple dots to avoid path traversal tricks.
285
+ *
286
+ * @param name - The name to sanitize
287
+ * @returns The sanitized name
288
+ */
289
+ declare function sanitizeFilename(name: string): string;
290
+ //#endregion
264
291
  //#region src/node/plugins/plugin-types.d.ts
265
292
  /**
266
293
  * Permissions that a plugin can request to access specific Boltdocs capabilities.
@@ -516,4 +543,4 @@ declare function boltdocs(options?: BoltdocsPluginOptions): Promise<Plugin[]>;
516
543
  */
517
544
  declare function createViteConfig(root: string, mode?: 'development' | 'production'): Promise<InlineConfig>;
518
545
  //#endregion
519
- export { type BoltdocsConfig, type BoltdocsPlugin, type BoltdocsPluginOptions, BoltdocsPluginStore, type BoltdocsThemeConfig, PluginCompatibilityError, PluginContext, PluginError, PluginHookError, PluginLifecycleHooks, PluginLifecycleManager, PluginLogger, PluginMeta, PluginPermission, PluginPermissionError, PluginSandbox, PluginStore, PluginValidationError, type RouteMeta, SecureBoltdocsPlugin, SecurePluginSchema, createPlugin, createViteConfig, boltdocs as default, defineConfig, generateEntryCode, hasPermission, resolveConfig, validatePlugins };
546
+ export { type BoltdocsConfig, type BoltdocsPlugin, type BoltdocsPluginOptions, BoltdocsPluginStore, type BoltdocsThemeConfig, PluginCompatibilityError, PluginContext, PluginError, PluginHookError, PluginLifecycleHooks, PluginLifecycleManager, PluginLogger, PluginMeta, PluginPermission, PluginPermissionError, PluginSandbox, PluginStore, PluginValidationError, type RouteMeta, SecureBoltdocsPlugin, SecurePluginSchema, createPlugin, createViteConfig, boltdocs as default, defineConfig, generateEntryCode, hasPermission, normalizePath, resolveConfig, sanitizeFilename, validatePlugins };