boltdocs 2.5.5 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/boltdocs.js +2 -2
- package/dist/client/index.cjs +6 -0
- package/dist/client/index.d.cts +1560 -0
- package/dist/client/index.d.ts +1219 -922
- package/dist/client/index.js +6 -1
- package/dist/client/theme/neutral.css +428 -0
- package/dist/node/cli-entry.cjs +8 -0
- package/dist/node/cli-entry.d.cts +2 -0
- package/dist/node/cli-entry.d.mts +2 -1
- package/dist/node/cli-entry.mjs +7 -5
- package/dist/node/index.cjs +6 -0
- package/dist/node/index.d.cts +519 -0
- package/dist/node/index.d.mts +374 -422
- package/dist/node/index.mjs +6 -1
- package/dist/node-BgvNl2Ay.mjs +89 -0
- package/dist/node-vkbb0MK7.cjs +89 -0
- package/dist/package-CR0HF9x3.mjs +6 -0
- package/dist/package-Dgmsc_l5.cjs +6 -0
- package/dist/search-dialog-3lvKsbVG.js +6 -0
- package/dist/search-dialog-DMK5OpgH.cjs +6 -0
- package/dist/use-search-C9bxCqfF.js +6 -0
- package/dist/use-search-DcfZSunO.cjs +6 -0
- package/package.json +26 -25
- package/src/client/app/config-context.tsx +38 -5
- package/src/client/app/doc-page.tsx +34 -0
- package/src/client/app/mdx-component.tsx +2 -3
- package/src/client/app/mdx-components-context.tsx +27 -2
- package/src/client/app/routes-context.tsx +34 -0
- package/src/client/app/scroll-handler.tsx +7 -4
- package/src/client/app/theme-context.tsx +71 -67
- package/src/client/components/default-layout.tsx +34 -33
- package/src/client/components/docs-layout.tsx +1 -2
- package/src/client/components/icons-dev.tsx +36 -5
- package/src/client/components/mdx/admonition.tsx +11 -27
- package/src/client/components/mdx/badge.tsx +1 -1
- package/src/client/components/mdx/button.tsx +3 -3
- package/src/client/components/mdx/card.tsx +1 -1
- package/src/client/components/mdx/code-block.tsx +90 -80
- package/src/client/components/mdx/component-preview.tsx +1 -5
- package/src/client/components/mdx/component-props.tsx +1 -1
- package/src/client/components/mdx/field.tsx +4 -5
- package/src/client/components/mdx/file-tree.tsx +6 -3
- package/src/client/components/mdx/hooks/use-code-block.ts +2 -2
- package/src/client/components/mdx/image.tsx +1 -1
- package/src/client/components/mdx/link.tsx +2 -2
- package/src/client/components/mdx/list.tsx +1 -1
- package/src/client/components/mdx/table.tsx +1 -1
- package/src/client/components/mdx/tabs.tsx +1 -1
- package/src/client/components/primitives/breadcrumbs.tsx +1 -7
- package/src/client/components/primitives/button-group.tsx +1 -1
- package/src/client/components/primitives/button.tsx +1 -1
- package/src/client/components/primitives/code-block.tsx +113 -0
- package/src/client/components/primitives/link.tsx +23 -41
- package/src/client/components/primitives/menu.tsx +5 -6
- package/src/client/components/primitives/navbar.tsx +6 -18
- package/src/client/components/primitives/navigation-menu.tsx +4 -4
- package/src/client/components/primitives/on-this-page.tsx +6 -10
- package/src/client/components/primitives/page-nav.tsx +4 -9
- package/src/client/components/primitives/popover.tsx +1 -1
- package/src/client/components/primitives/search-dialog.tsx +3 -6
- package/src/client/components/primitives/sidebar.tsx +80 -22
- package/src/client/components/primitives/skeleton.tsx +1 -1
- package/src/client/components/primitives/tabs.tsx +4 -11
- package/src/client/components/primitives/tooltip.tsx +3 -3
- package/src/client/components/ui-base/breadcrumbs.tsx +4 -6
- package/src/client/components/ui-base/copy-markdown.tsx +2 -7
- package/src/client/components/ui-base/github-stars.tsx +2 -2
- package/src/client/components/ui-base/head.tsx +58 -51
- package/src/client/components/ui-base/loading.tsx +2 -2
- package/src/client/components/ui-base/navbar.tsx +12 -14
- package/src/client/components/ui-base/not-found.tsx +1 -1
- package/src/client/components/ui-base/on-this-page.tsx +6 -6
- package/src/client/components/ui-base/page-nav.tsx +4 -8
- package/src/client/components/ui-base/search-dialog.tsx +10 -8
- package/src/client/components/ui-base/sidebar.tsx +76 -23
- package/src/client/components/ui-base/tabs.tsx +9 -8
- package/src/client/components/ui-base/theme-toggle.tsx +2 -2
- package/src/client/hooks/use-i18n.ts +3 -3
- package/src/client/hooks/use-localized-to.ts +1 -1
- package/src/client/hooks/use-navbar.ts +8 -6
- package/src/client/hooks/use-routes.ts +19 -11
- package/src/client/hooks/use-search.ts +1 -1
- package/src/client/hooks/use-sidebar.ts +48 -2
- package/src/client/hooks/use-tabs.ts +6 -2
- package/src/client/hooks/use-version.ts +3 -3
- package/src/client/index.ts +22 -22
- package/src/client/ssg/boltdocs-shell.tsx +127 -0
- package/src/client/ssg/create-routes.tsx +179 -0
- package/src/client/ssg/index.ts +3 -0
- package/src/client/ssg/mdx-page.tsx +37 -0
- package/src/client/store/boltdocs-context.tsx +66 -0
- package/src/client/theme/neutral.css +90 -50
- package/src/client/types.ts +5 -33
- package/src/client/utils/react-to-text.ts +34 -0
- package/CHANGELOG.md +0 -98
- package/dist/cache-3FOEPC2P.mjs +0 -1
- package/dist/chunk-5B5NKOW6.mjs +0 -77
- package/dist/chunk-J2PTDWZM.mjs +0 -1
- package/dist/chunk-TP5KMRD3.mjs +0 -1
- package/dist/chunk-Y4RE5KI7.mjs +0 -1
- package/dist/client/index.d.mts +0 -1263
- package/dist/client/index.mjs +0 -1
- package/dist/client/ssr.d.mts +0 -78
- package/dist/client/ssr.d.ts +0 -78
- package/dist/client/ssr.js +0 -1
- package/dist/client/ssr.mjs +0 -1
- package/dist/node/cli-entry.d.ts +0 -1
- package/dist/node/cli-entry.js +0 -82
- package/dist/node/index.d.ts +0 -567
- package/dist/node/index.js +0 -77
- package/dist/package-QFIAETHR.mjs +0 -1
- package/dist/search-dialog-O6VLVSOA.mjs +0 -1
- package/src/client/app/index.tsx +0 -345
- package/src/client/app/mdx-page.tsx +0 -15
- package/src/client/app/preload.tsx +0 -66
- package/src/client/app/router.tsx +0 -30
- package/src/client/integrations/codesandbox.ts +0 -179
- package/src/client/integrations/index.ts +0 -1
- package/src/client/ssr.tsx +0 -65
- package/src/client/store/use-boltdocs-store.ts +0 -44
- package/src/node/cache.ts +0 -408
- package/src/node/cli/build.ts +0 -53
- package/src/node/cli/dev.ts +0 -22
- package/src/node/cli/doctor.ts +0 -243
- package/src/node/cli/index.ts +0 -9
- package/src/node/cli/ui.ts +0 -54
- package/src/node/cli-entry.ts +0 -24
- package/src/node/config.ts +0 -382
- package/src/node/errors.ts +0 -44
- package/src/node/index.ts +0 -84
- package/src/node/mdx/cache.ts +0 -12
- package/src/node/mdx/highlighter.ts +0 -47
- package/src/node/mdx/index.ts +0 -122
- package/src/node/mdx/rehype-shiki.ts +0 -62
- package/src/node/mdx/remark-code-meta.ts +0 -35
- package/src/node/mdx/remark-shiki.ts +0 -61
- package/src/node/plugin/entry.ts +0 -87
- package/src/node/plugin/html.ts +0 -99
- package/src/node/plugin/index.ts +0 -478
- package/src/node/plugin/types.ts +0 -9
- package/src/node/plugins/index.ts +0 -17
- package/src/node/plugins/plugin-errors.ts +0 -62
- package/src/node/plugins/plugin-lifecycle.ts +0 -117
- package/src/node/plugins/plugin-sandbox.ts +0 -59
- package/src/node/plugins/plugin-store.ts +0 -54
- package/src/node/plugins/plugin-types.ts +0 -107
- package/src/node/plugins/plugin-validator.ts +0 -105
- package/src/node/routes/cache.ts +0 -28
- package/src/node/routes/index.ts +0 -293
- package/src/node/routes/parser.ts +0 -262
- package/src/node/routes/sorter.ts +0 -42
- package/src/node/routes/types.ts +0 -61
- package/src/node/schema/config.ts +0 -195
- package/src/node/schema/frontmatter.ts +0 -17
- package/src/node/search/index.ts +0 -55
- package/src/node/security/constants/index.ts +0 -10
- package/src/node/security/csp.ts +0 -31
- package/src/node/security/headers.ts +0 -27
- package/src/node/ssg/index.ts +0 -205
- package/src/node/ssg/meta.ts +0 -33
- package/src/node/ssg/options.ts +0 -15
- package/src/node/ssg/robots.ts +0 -53
- package/src/node/ssg/sitemap.ts +0 -55
- package/src/node/utils.ts +0 -349
- package/tsconfig.json +0 -26
- package/tsup.config.ts +0 -56
package/dist/client/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as ar,B as ir,C as Ke,D as lr,E as Ye,F as Je,G as X,H as F,I as $e,J as ne,K as j,L as Ze,M as cr,N as C,O as T,P as mr,a as or,b as eo,c as S,d as to,e as $,f as R,g as Xe,h as u,i as re,j as rr,k as oo,l as V,m as ro,n as He,o as Ve,p as De,q as Oe,r as ze,s as ue,t as fe,u as ge,v as be,w as je,x as nr,y as I,z as sr}from"../chunk-J2PTDWZM.mjs";import Ge,{useEffect as Ht,useState as Do,useMemo as Oo}from"react";import Kn from"react-dom/client";import{BrowserRouter as Yn,Routes as Jn,Route as le}from"react-router-dom";import{ArrowLeft as pr}from"lucide-react";import{jsx as Pe,jsxs as no}from"react/jsx-runtime";function Fe(){return Pe("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:no("div",{className:"space-y-4",children:[Pe("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),Pe("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),Pe("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."}),no(re,{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:[Pe(pr,{size:16})," Go to Home"]})]})})}import{createContext as dr,use as ur,useEffect as so,useState as Qe}from"react";import{jsx as fr}from"react/jsx-runtime";var ao=dr(void 0);function io({children:e}){let[t,r]=Qe("system"),[o,n]=Qe("dark"),[a,s]=Qe(!1);so(()=>{s(!0);let i=localStorage.getItem("boltdocs-theme"),p=i==="light"||i==="dark"||i==="system"?i:"system";r(p);let l=window.matchMedia("(prefers-color-scheme: dark)");((g,b)=>{n(g==="system"?b?"dark":"light":g)})(p,l.matches);let d=g=>{n(b=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?g.matches?"dark":"light":b)};return l.addEventListener("change",d),()=>l.removeEventListener("change",d)},[]),so(()=>{if(!a)return;let i=window.matchMedia("(prefers-color-scheme: dark)").matches,p=t==="system"?i?"dark":"light":t;n(p);let l=document.documentElement;p==="light"?(l.classList.add("theme-light"),l.dataset.theme="light"):(l.classList.remove("theme-light"),l.dataset.theme="dark")},[t,a]);let m=i=>{r(i),localStorage.setItem("boltdocs-theme",i)};return fr(ao.Provider,{value:{theme:t,resolvedTheme:o,setTheme:m},children:e})}function se(){let e=ur(ao);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}import zo from"virtual:boltdocs-layout";import{startTransition as gr}from"react";import{RouterProvider as br}from"react-aria-components";import{useNavigate as hr,useHref as xr}from"react-router-dom";import{jsx as vr}from"react/jsx-runtime";function lo({children:e}){let t=hr();return vr(br,{navigate:(r,o)=>{gr(()=>{t(r,o)})},useHref:xr,children:e})}import{useLayoutEffect as yr}from"react";import{useLocation as Cr}from"react-router-dom";function co(){let{pathname:e,hash:t}=Cr();return yr(()=>{let r=document.querySelector(".boltdocs-content")||window,o=()=>r===window?window.scrollY:r.scrollTop,n=(a,s="auto")=>{r===window?window.scrollTo({top:a,behavior:s}):r.scrollTo({top:a,behavior:s})};if(t){let a=t.replace("#",""),s=document.getElementById(a);if(s){let i=r===window?0:r.getBoundingClientRect().top,c=s.getBoundingClientRect().top-i-80+o();n(c,"smooth");return}}n(0)},[e,t]),null}import{Outlet as Rr}from"react-router-dom";import Pr from"virtual:boltdocs-layout";import{jsx as mo}from"react/jsx-runtime";function po(){return mo(Pr,{children:mo(Rr,{})})}import{createContext as Nr,use as Tr}from"react";import{jsx as Lr}from"react/jsx-runtime";var uo=Nr({});function Ne(){return Tr(uo)}function fo({components:e,children:t}){return Lr(uo.Provider,{value:e,children:t})}import{jsx as wr}from"react/jsx-runtime";function go({Component:e}){let t=Ne();return wr(e,{components:t})}import{Link as Xn}from"lucide-react";var Bt={};or(Bt,{Admonition:()=>D,Badge:()=>it,Button:()=>et,Card:()=>ct,Cards:()=>lt,Caution:()=>bt,CodeBlock:()=>W,ComponentPreview:()=>Et,ComponentProps:()=>St,CopyMarkdown:()=>Se,Danger:()=>ut,Field:()=>wt,FileTree:()=>Tt,Image:()=>Mt,Important:()=>gt,InfoBox:()=>ft,Link:()=>kt,List:()=>xt,Note:()=>mt,Tab:()=>nt,Table:()=>Lt,Tabs:()=>st,Tip:()=>pt,Video:()=>at,Warning:()=>dt});import{jsx as kr}from"react/jsx-runtime";var et=({className:e,variant:t,size:r,rounded:o,iconSize:n,disabled:a,...s})=>kr(V,{className:u("group",oo({variant:t,size:r,rounded:o,iconSize:n,disabled:a,className:e})),...s});import*as ot from"react-aria-components";import{Copy as Er,Check as Br,File as Ar}from"lucide-react";var bo=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}};import{useCallback as Mr,useEffect as Sr,useRef as Ir,useState as tt}from"react";function ho(e){let{title:t}=e,[r,o]=tt(!1),[n,a]=tt(!1),[s,m]=tt(!1),i=Ir(null),p=S(),l=Mr(async()=>{let c=i.current?.textContent??"";bo(c),o(!0),setTimeout(()=>o(!1),2e3)},[]);return Sr(()=>{let c=i.current?.textContent?.length??0;m(c>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:n,setIsExpanded:a,isExpandable:s,preRef:i,handleCopy:l,shouldTruncate:s&&!n}}import{jsx as B,jsxs as xo}from"react/jsx-runtime";var Hr={ts:He,tsx:ue,js:Ve,jsx:ue,json:De,css:Oe,html:ze,md:fe,mdx:fe,bash:ge,sh:ge,yaml:be,yml:be};function W(e){let{children:t,hideCopy:r=!1,highlightedHtml:o,"data-highlighted-html":n,title:a,"data-lang":s,plain:m=!1,...i}=e,p=o||n,l=S(),c=e.lang||s||"",{copied:d,isExpanded:g,setIsExpanded:b,isExpandable:f,preRef:x,handleCopy:P,shouldTruncate:h}=ho(e),A=Hr[c];return xo("div",{className:u("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!m,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":h},e.className),children:[a&&xo("div",{className:"flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted",children:[A?B(A,{size:14}):B(Ar,{size:14,className:"opacity-60"}),B("span",{children:a})]}),B("div",{className:"absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100",children:!r&&B(je,{content:d?"Copied!":"Copy code",children:B(ot.Button,{onPress:P,className:u("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",d?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:d?B(Br,{size:20}):B(Er,{size:20})})})}),p?B("div",{ref:x,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:p}}):B("pre",{ref:x,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...i,children:t}),f&&B("div",{className:u(h?"absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10":"relative flex justify-center py-4"),children:B(ot.Button,{onPress:()=>b(!g),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:g?"Show less":"Expand code"})})]})}import{Children as zr,isValidElement as $r,useMemo as Fr}from"react";import*as Y from"react-aria-components";import{useState as vo,useRef as Vr,useEffect as Dr,useCallback as Or}from"react";function yo({initialIndex:e=0,tabs:t}){let r=t[e]?.props.disabled?t.findIndex(p=>!p.props.disabled):e,[o,n]=vo(r===-1?0:r),a=Vr([]),[s,m]=vo({opacity:0,transform:"translateX(0)",width:0});Dr(()=>{let p=a.current[o];p&&m({opacity:1,width:p.offsetWidth,transform:`translateX(${p.offsetLeft}px)`})},[o,t]);let i=Or(p=>{let l=0;if(p.key==="ArrowRight"?l=1:p.key==="ArrowLeft"&&(l=-1),l!==0){let c=(o+l+t.length)%t.length;for(;t[c].props.disabled&&c!==o;)c=(c+l+t.length)%t.length;c!==o&&!t[c].props.disabled&&(n(c),a.current[c]?.focus())}},[o,t]);return{active:o,setActive:n,tabRefs:a,indicatorStyle:s,handleKeyDown:i}}import{cva as Co}from"class-variance-authority";import{jsx as K,jsxs as rt}from"react/jsx-runtime";var Wr=Co("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"}}),_r=Co("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 nt({children:e}){let t=typeof e=="string"?K(W,{className:"language-bash",children:K("code",{children:e.trim()})}):e;return K("div",{className:"py-4",children:t})}function st({defaultIndex:e=0,children:t}){let r=Fr(()=>zr.toArray(t).filter(m=>$r(m)&&m.props?.label),[t]),{active:o,setActive:n,tabRefs:a,indicatorStyle:s}=yo({initialIndex:e,tabs:r});return K("div",{className:"my-8 w-full group/tabs",children:rt(Y.Tabs,{selectedKey:o.toString(),onSelectionChange:m=>n(Number(m)),className:"w-full",children:[rt(Y.TabList,{"aria-label":"Content Tabs",className:u(Wr()),children:[r.map((m,i)=>{let{label:p,icon:l,disabled:c}=m.props,d=i.toString();return rt(Y.Tab,{id:d,isDisabled:c,ref:g=>{a.current[i]=g},className:({isSelected:g,isDisabled:b})=>u(_r({isActive:g,isDisabled:b})),children:[!!l&&K("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:l}),K("span",{children:p})]},d)}),K("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:s,"aria-hidden":"true"})]}),r.map((m,i)=>K(Y.TabPanel,{id:i.toString(),children:r[i]},i))]})})}import{useRef as Gr,useState as Ur,useEffect as qr}from"react";import{jsx as Ro,jsxs as Xr}from"react/jsx-runtime";function at({src:e,poster:t,alt:r,children:o,controls:n,preload:a="metadata",...s}){let m=Gr(null),[i,p]=Ur(!1);return qr(()=>{let l=m.current;if(!l)return;let c=new IntersectionObserver(([d])=>{d.isIntersecting&&(p(!0),c.disconnect())},{rootMargin:"200px"});return c.observe(l),()=>c.disconnect()},[]),Ro("div",{ref:m,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:i?Xr("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...s,children:[o,"Your browser does not support the video tag."]}):Ro("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":r||"Video"})})}import{cva as jr}from"class-variance-authority";import{jsx as Yr}from"react/jsx-runtime";var Kr=jr("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight",{variants:{variant:{default:"bg-bg-surface text-text-muted border-border-subtle",primary:"bg-primary-500/15 text-primary-400 border-primary-500/20",success:"bg-emerald-500/15 text-emerald-400 border-emerald-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",danger:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-sky-500/15 text-sky-400 border-sky-500/20"}},defaultVariants:{variant:"default"}});function it({variant:e="default",children:t,className:r="",...o}){return Yr("span",{className:u(Kr({variant:e}),r),...o,children:t})}import{useCallback as Jr,useRef as Po}from"react";import*as To from"react-aria-components";import{cva as Zr}from"class-variance-authority";import{Fragment as en,jsx as ae,jsxs as No}from"react/jsx-runtime";var Qr=Zr("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:r="",...o}){return ae("div",{className:u(Qr({cols:e}),r),...o,children:t})}function ct({title:e,icon:t,href:r,children:o,className:n="",...a}){let s=Po(null),m=Po(null),i=Jr(c=>{let d=s.current||m.current;if(!d)return;let{left:g,top:b}=d.getBoundingClientRect();d.style.setProperty("--x",`${c.clientX-g}px`),d.style.setProperty("--y",`${c.clientY-b}px`)},[]),p=No(en,{children:[ae("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&&ae("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}),No("div",{className:"space-y-1.5",children:[e&&ae("h3",{className:"text-sm font-bold text-text-main",children:e}),o&&ae("div",{className:"text-sm text-text-muted leading-relaxed",children:o})]})]}),l=u("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",n);return r?ae(To.Link,{ref:m,href:r,className:u(l,"no-underline cursor-pointer"),onMouseMove:i,...a,children:p}):ae("div",{ref:s,role:"presentation",className:l,onMouseMove:i,...a,children:p})}import{Info as tn,Lightbulb as on,AlertTriangle as rn,ShieldAlert as nn,Bookmark as sn,Zap as an,Flame as ln}from"lucide-react";import{cva as cn}from"class-variance-authority";import{jsx as L,jsxs as wo}from"react/jsx-runtime";var mn={note:L(sn,{size:18}),tip:L(on,{size:18}),info:L(tn,{size:18}),warning:L(rn,{size:18}),danger:L(nn,{size:18}),important:L(ln,{size:18}),caution:L(an,{size:18})},pn={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},Lo=cn("py-4 px-4 rounded-lg",{variants:{type:{note:"border-primary-400 bg-primary-500/5 text-primary-400",tip:"border-emerald-500 bg-emerald-500/5 text-emerald-500",info:"border-sky-500 bg-sky-500/5 text-sky-500",warning:"border-amber-500 bg-amber-500/5 text-amber-500",danger:"border-red-500 bg-red-500/5 text-red-500",important:"border-orange-500 bg-orange-500/5 text-orange-500",caution:"border-yellow-500 bg-yellow-500/5 text-yellow-500"}},defaultVariants:{type:"note"}});function D({type:e="note",title:t,children:r,className:o="",...n}){return wo("div",{className:u(Lo({type:e}),o),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[wo("div",{className:"flex items-center flex-row gap-2 mb-2",children:[L("span",{className:u("shrink-0",Lo({type:e})),children:mn[e]}),L("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||pn[e]})]}),L("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:r})]})}var mt=e=>L(D,{type:"note",...e}),pt=e=>L(D,{type:"tip",...e}),dt=e=>L(D,{type:"warning",...e}),ut=e=>L(D,{type:"danger",...e}),ft=e=>L(D,{type:"info",...e}),gt=e=>L(D,{type:"important",...e}),bt=e=>L(D,{type:"caution",...e});import{Children as dn,isValidElement as un}from"react";import{Check as fn,ChevronRight as gn,Circle as bn}from"lucide-react";import{cva as ht}from"class-variance-authority";import{jsx as J,jsxs as Rn}from"react/jsx-runtime";var hn=ht("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}}),xn=ht("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}}),vn=ht("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 yn({icon:e,children:t,variant:r,dense:o}){return Rn("li",{className:u(xn({variant:r,dense:o})),children:[e&&J("span",{className:u(vn({variant:r==="bubble"?"bubble":"default"})),children:e}),J("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Cn={checked:e=>J(fn,{size:14,className:u("text-emerald-500 shrink-0",e)}),arrow:e=>J(gn,{size:14,className:u("text-primary-400 shrink-0",e)}),bubble:e=>J(bn,{size:6,fill:"currentColor",className:u("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function xt({variant:e="default",cols:t=1,dense:r=!1,children:o,className:n,...a}){let s=t!==void 0&&Number(t)>1,m=Cn[e],i=hn({variant:e,cols:t,dense:r,isGrid:s,className:n}),p=e==="number"?"ol":"ul";return e==="default"||e==="number"?J(p,{className:i,...a,children:o}):J("ul",{className:i,...a,children:dn.map(o,l=>{if(!un(l))return l;let c=l,d=c.type==="li"?c.props.children:c.props.children||l;return J(yn,{icon:m(),variant:e,dense:r,children:d})})})}import{Children as vt,isValidElement as Nt,useMemo as Pn}from"react";import*as O from"react-aria-components";import{Folder as Nn,FileText as Tn,File as Ln,FileCode as wn,FileImage as kn,ChevronRight as Mn}from"lucide-react";import{jsx as w,jsxs as Rt}from"react/jsx-runtime";var he=16,Te=2,Sn={ts:He,tsx:ue,js:Ve,jsx:ue,json:De,css:Oe,html:ze,md:fe,mdx:fe,bash:ge,sh:ge,yaml:be,yml:be},yt={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 Pt(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(Pt).join(""):Nt(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?Pt(e.props.children):""}function In(e,t){let r=e.toLowerCase(),o="shrink-0 transition-colors duration-200";if(t)return w(Nn,{size:he,strokeWidth:Te,className:u(o,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=r.split(".").pop()||"",a=Sn[n];if(a)return w(a,{size:he});let s=u(o,"text-text-dim group-hover:text-text-main");return yt.CODE.test(r)?w(wn,{size:he,strokeWidth:Te,className:s}):yt.TEXT.test(r)?w(Tn,{size:he,strokeWidth:Te,className:s}):yt.IMAGE.test(r)?w(kn,{size:he,strokeWidth:Te,className:s}):w(Ln,{size:he,strokeWidth:Te,className:s})}function Ct(e,t){if(!Nt(e))return!1;let r=e.type;if(typeof r=="string")return r===t;if(typeof r=="function")return r.name===t||r.name?.toLowerCase()===t;let o=e.props;return o?.originalType===t||o?.mdxType===t}function En(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function We(e,t="root"){if(!Nt(e))return[];let r=[];if(Ct(e,"ul"))return vt.forEach(e.props.children,(o,n)=>{r.push(...We(o,`${t}-${n}`))}),r;if(Ct(e,"li")){let o=vt.toArray(e.props.children),n=o.findIndex(b=>Ct(b,"ul")),a=n!==-1,s=a?o.slice(0,n):o,m=a?o.slice(n):[],i=Pt(s),{name:p,comment:l}=En(i),c=p.endsWith("/"),d=c?p.slice(0,-1):p,g=a||c;return r.push({id:`${t}-${d}`,name:d,comment:l,isFolder:g,children:a?We(m[0],`${t}-${d}`):void 0}),r}return e.props&&typeof e.props=="object"&&"children"in e.props&&vt.forEach(e.props.children,(o,n)=>{r.push(...We(o,`${t}-${n}`))}),r}function ko({item:e}){return Rt(O.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[w(O.TreeItemContent,{children:({isExpanded:t,hasChildItems:r})=>Rt("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[w("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),r?w(O.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:w(Mn,{size:14,strokeWidth:3,className:u("transition-transform duration-200",t&&"rotate-90")})}):w("div",{className:"w-[18px]"}),In(e.name,e.isFolder),w("span",{className:u("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&&Rt("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&&w(O.Collection,{items:e.children,children:t=>w(ko,{item:t})})]})}function Tt({children:e}){let t=Pn(()=>We(e),[e]);return w("div",{className:"my-8",children:w(O.Tree,{items:t,"aria-label":"File Tree",className:u("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:r=>w(ko,{item:r})})})}import*as Le from"react-aria-components";import{useState as Mo,useMemo as So}from"react";function Io({data:e,sortable:t=!1,paginated:r=!1,pageSize:o=10}){let[n,a]=Mo(null),[s,m]=Mo(1),i=So(()=>{if(!e)return[];let d=[...e];return t&&n!==null&&d.sort((g,b)=>{let f=g[n.key],x=b[n.key],P=typeof f=="string"?f:"",h=typeof x=="string"?x:"";return P<h?n.direction==="asc"?-1:1:P>h?n.direction==="asc"?1:-1:0}),d},[e,n,t]),p=Math.ceil(i.length/o),l=So(()=>{if(!r)return i;let d=(s-1)*o;return i.slice(d,d+o)},[i,r,s,o]);return{sortConfig:n,currentPage:s,setCurrentPage:m,totalPages:p,paginatedData:l,requestSort:d=>{if(!t)return;let g="asc";n&&n.key===d&&n.direction==="asc"&&(g="desc"),a({key:d,direction:g})}}}import{ChevronUp as Bn,ChevronDown as Eo,ChevronLeft as An,ChevronRight as Hn,ChevronsLeft as Vn,ChevronsRight as Dn}from"lucide-react";import{Fragment as On,jsx as N,jsxs as xe}from"react/jsx-runtime";function Lt({headers:e,data:t,children:r,className:o="",sortable:n=!1,paginated:a=!1,pageSize:s=10}){let{sortConfig:m,currentPage:i,setCurrentPage:p,totalPages:l,paginatedData:c,requestSort:d}=Io({data:t,sortable:n,paginated:a,pageSize:s}),g=f=>n?m?.key!==f?N(Eo,{size:14,className:"ml-1 opacity-30"}):m.direction==="asc"?N(Bn,{size:14,className:"ml-1 text-primary-400"}):N(Eo,{size:14,className:"ml-1 text-primary-400"}):null,b=r||xe(On,{children:[e&&N("thead",{children:N("tr",{children:e.map((f,x)=>N("th",{onClick:()=>d(x),className:u("text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm",n&&"cursor-pointer select-none hover:text-primary-400 transition-colors"),children:xe("div",{className:"flex items-center",children:[f,g(x)]})},x))})}),c&&N("tbody",{children:c.map((f,x)=>N("tr",{className:"transition-colors hover:bg-bg-surface",children:f.map((P,h)=>N("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:P},h))},x))})]});return xe("div",{className:u("my-6 rounded-lg border border-border-subtle overflow-hidden",o),children:[N("div",{className:"overflow-x-auto",children:N("table",{className:"w-full border-collapse text-sm",children:b})}),a&&l>1&&xe("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[xe("span",{className:"text-xs text-text-muted",children:["Page ",i," of ",l]}),xe("div",{className:"flex items-center gap-1",children:[N(Le.Button,{onPress:()=>p(1),isDisabled:i===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:N(Vn,{size:16})}),N(Le.Button,{onPress:()=>p(f=>Math.max(f-1,1)),isDisabled:i===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:N(An,{size:16})}),N(Le.Button,{onPress:()=>p(f=>Math.min(f+1,l)),isDisabled:i===l,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:N(Hn,{size:16})}),N(Le.Button,{onPress:()=>p(l),isDisabled:i===l,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:N(Dn,{size:16})})]})]})]})}import{jsx as ve,jsxs as we}from"react/jsx-runtime";function wt({name:e,type:t,defaultValue:r,required:o=!1,children:n,id:a,className:s=""}){return we("article",{className:u("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",s),id:a,children:[we("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[we("div",{className:"flex flex-wrap items-center gap-2.5",children:[ve("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 group-hover:bg-primary-500/15",children:e}),t&&ve("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 tracking-wider shadow-sm",children:t}),o&&we("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 tracking-wider text-red-400 border border-red-500/20 shadow-sm",children:[ve("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),r&&we("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:[ve("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),ve("code",{className:"font-mono text-text-main font-medium",children:r})]})]}),ve("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}import{jsx as zn}from"react/jsx-runtime";function kt({to:e,children:t,className:r="",...o}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=u("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",r);return zn(re,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...o,children:t})}import{jsx as $n}from"react/jsx-runtime";function Mt({src:e,alt:t,theme:r,...o}){let{theme:n}=se();return r&&r!==n?null:$n("img",{src:e,alt:t||"",...o})}import{jsx as k,jsxs as ke}from"react/jsx-runtime";function St({title:e,props:t,className:r=""}){return ke("div",{className:u("my-6",r),children:[e&&k("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),k("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:ke("table",{className:"w-full border-collapse text-sm",children:[k("thead",{children:ke("tr",{children:[k("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"}),k("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"}),k("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"}),k("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"})]})}),k("tbody",{children:t.map((o,n)=>ke("tr",{className:"transition-colors hover:bg-bg-surface",children:[ke("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[k("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:o.name}),o.required&&k("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:k("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:o.type})}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:o.defaultValue?k("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:o.defaultValue}):k("span",{className:"text-text-dim",children:"\u2014"})}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:o.description})]},`${o.name}-${n}`))})]})})]})}import{useMemo as Bo}from"react";function Ao(e){let{code:t,children:r,preview:o}=e,n=Bo(()=>(t??(typeof r=="string"?r:"")).trim(),[t,r]),a=Bo(()=>o??(typeof r!="string"?r:null),[o,r]);return{initialCode:n,previewElement:a}}import{jsx as It,jsxs as Fn}from"react/jsx-runtime";function Et(e){let{highlightedHtml:t,hideCode:r=!1,hideCopy:o=!1}=e,{initialCode:n,previewElement:a}=Ao(e);return Fn("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[It("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:a}),!r&&It("div",{className:"border-t border-border-subtle",children:It(W,{hideCopy:o,lang:"tsx",highlightedHtml:t,plain:!0,children:n})})]})}import{useState as Wn}from"react";import{Copy as Ho,Check as _n,ExternalLink as Gn,ChevronDown as Un}from"lucide-react";import{jsx as z,jsxs as Me}from"react/jsx-runtime";var qn=e=>{let[t,r]=Wn(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([e],{type:"text/plain;charset=utf-8"}),s=URL.createObjectURL(a);window.open(s,"_blank")}}};function Se({content:e,mdxRaw:t,config:r}){let o=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:s}=qn(o),m=r!==!1,i=typeof r=="object"&&r.text||"Copy Markdown";return!m||!o?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:Me(Ze,{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(V,{variant:"ghost",onPress:a,icon:n?z(_n,{size:16}):z(Ho,{size:16}),iconPosition:"left",className:u("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",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":i}),Me(C.Trigger,{placement:"bottom end",children:[z(V,{variant:"ghost",isIconOnly:!0,icon:z(Un,{size:14}),className:u("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")}),Me(C.Root,{className:"w-52",children:[Me(C.Item,{onAction:a,children:[z(Ho,{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"})]}),Me(C.Item,{onAction:s,children:[z(Gn,{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"})]})]})]})]})})}import{jsx as M,jsxs as ie}from"react/jsx-runtime";function At(){return M("div",{className:u("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:ie("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[ie("div",{className:"flex gap-2",children:[M(T,{className:"h-3 w-16"}),M(T,{className:"h-3 w-24"})]}),M(T,{className:"h-10 w-[60%] sm:h-12"}),ie("div",{className:"space-y-3",children:[M(T,{className:"h-4 w-full"}),M(T,{className:"h-4 w-[95%]"}),M(T,{className:"h-4 w-[40%]"})]}),ie("div",{className:"space-y-6 pt-4",children:[M(T,{className:"h-7 w-32"}),ie("div",{className:"space-y-3",children:[M(T,{className:"h-4 w-full"}),M(T,{className:"h-4 w-[98%]"}),M(T,{className:"h-4 w-[92%]"}),M(T,{className:"h-4 w-[60%]"})]})]}),M(T,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),ie("div",{className:"space-y-6 pt-4",children:[M(T,{className:"h-7 w-48"}),ie("div",{className:"space-y-3",children:[M(T,{className:"h-4 w-full"}),M(T,{className:"h-4 w-[85%]"})]})]})]})})}import{jsx as _,jsxs as jn}from"react/jsx-runtime";var ye=({level:e,id:t,children:r,...o})=>{let n=`h${e}`;return jn(n,{id:t,...o,className:"boltdocs-heading",children:[r,t&&_("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:_(Xn,{size:16})})]})},Vo={...Bt,Loading:At,h1:e=>_(ye,{level:1,...e}),h2:e=>_(ye,{level:2,...e}),h3:e=>_(ye,{level:3,...e}),h4:e=>_(ye,{level:4,...e}),h5:e=>_(ye,{level:5,...e}),h6:e=>_(ye,{level:6,...e}),pre:e=>_(W,{...e,children:e.children})};import Zn from"virtual:boltdocs-mdx-components";import{useLocation as Qn}from"react-router-dom";import{Fragment as ns,jsx as y,jsxs as _e}from"react/jsx-runtime";function es(){let{currentLocale:e,config:t}=R();return Ht(()=>{if(!t.i18n)return;let r=t.i18n.localeConfigs?.[e];document.documentElement.lang=r?.htmlLang||e||"en",document.documentElement.dir=r?.direction||"ltr"},[e,t.i18n]),null}function ts(){let e=Qn(),{config:t}=R(),r=$(s=>s.setLocale),o=$(s=>s.setVersion),n=$(s=>s.currentLocale),a=$(s=>s.currentVersion);return Ht(()=>{let s=e.pathname.split("/").filter(Boolean),m=0,i=t.versions?.defaultVersion,p=t.i18n?.defaultLocale;if(s[m]==="docs"&&m++,t.versions&&s.length>m){let l=t.versions.versions.find(c=>c.path===s[m]);l&&(i=l.path,m++)}t.i18n&&s.length>m&&t.i18n.locales[s[m]]?p=s[m]:t.i18n&&s.length===0&&(p=n||t.i18n.defaultLocale),p!==n&&r(p),i!==a&&o(i)},[e.pathname,t,r,o,n,a]),null}function os({initialRoutes:e,initialConfig:t,docsDirName:r,modules:o,hot:n,homePage:a,externalPages:s,externalLayout:m,components:i={}}){let[p,l]=Do(e),[c,d]=Do(t),g=s||{},b=m||zo,f=Oo(()=>p.filter(h=>!(a&&(h.path==="/"||h.path===""))&&!g[h.path===""?"/":h.path]).map(h=>{let A=Object.keys(o).find(H=>H===`/${r}/${h.filePath}`||H.endsWith(`/${r}/${h.filePath}`)||H.endsWith(`/${r}\\${h.filePath.replace(/\\/g,"/")}`)),q=A?o[A]:null;return{...h,Component:Ge.lazy(async()=>q?await q():{default:Fe})}}),[p,o,r,a,g]);Ht(()=>{n&&(n.on("boltdocs:routes-update",h=>{l(h)}),n.on("boltdocs:config-update",h=>{d(h)}))},[n]);let x=Oo(()=>({...Vo,...Zn,...i}),[i]),P=x.Loading;return y(io,{children:y(fo,{components:x,children:y(eo.Provider,{value:c,children:y(lo,{children:_e(to,{routes:p,modules:o,children:[y(co,{}),y(ts,{}),y(es,{}),_e(Jn,{children:[y(le,{element:y(po,{}),children:f.map(h=>y(le,{path:h.path===""?"/":h.path,element:y(Ge.Suspense,{fallback:y(P,{}),children:y(go,{Component:h.Component})})},h.path))},"docs-layout"),a&&_e(ns,{children:[y(le,{path:"/",element:y(b,{children:y(a,{})})}),c.i18n&&Object.keys(c.i18n.locales).map(h=>y(le,{path:`/${h}`,element:y(b,{children:y(a,{})})},`home-${h}`))]}),Object.entries(g).map(([h,A])=>{let q=h==="/"?"":h;return _e(Ge.Fragment,{children:[y(le,{path:h,element:y(b,{children:y(A,{})})}),c.i18n&&Object.keys(c.i18n.locales).map(H=>y(le,{path:`/${H}${q}`,element:y(b,{children:y(A,{})})},`${h}-${H}`))]},h)}),y(le,{path:"*",element:y(zo,{children:y(Fe,{})})})]})]})})})})})}function rs(e){let{target:t,routes:r,docsDirName:o,config:n,modules:a,hot:s,homePage:m,externalPages:i,externalLayout:p,components:l}=e,c=document.querySelector(t);if(!c)throw new Error(`[boltdocs] Mount target "${t}" not found in document.`);let d=y(Ge.StrictMode,{children:y(Yn,{children:y(os,{initialRoutes:r,initialConfig:n,docsDirName:o,modules:a,hot:s,homePage:m,externalPages:i,externalLayout:p,components:l})})});c.innerHTML="",Kn.createRoot(c).render(d)}import{useLocation as ss}from"react-router-dom";function Z(e,t){return e?typeof e=="string"?e:t&&e[t]?e[t]:Object.values(e)[0]||"":""}function Vt(){let e=S(),{theme:t}=se(),r=ss(),{currentLocale:o}=R(),n=e.theme||{},a=Z(n.title,o)||"Boltdocs",s=n.navbar||[],m=n.socialLinks||[],i=n.githubRepo,p=s.map(b=>{let f=b.href||b.to||b.link||"",x=P=>{let h=r.pathname;if(h===P)return!0;if(!P||P==="/")return h==="/";let A=qe=>{let te=qe.split("/").filter(Boolean),oe=0;return e.i18n?.locales&&te[oe]&&e.i18n.locales[te[oe]]&&oe++,e.versions?.versions&&te[oe]&&e.versions.versions.some(tr=>tr.path===te[oe])&&oe++,te.slice(oe)},q=A(P),H=A(h);return q.length===0?H.length===0:H.length<q.length?!1:q.every((qe,te)=>H[te]===qe)};return{label:Z(b.label||b.text,o),href:f,active:x(f),to:f.startsWith("http")||f.startsWith("//")?"external":void 0}}),l=n.logo,c=l?typeof l=="string"?l:t==="dark"?l.dark:l.light:null,d={alt:(l&&typeof l=="object"?l.alt:void 0)||a,width:l&&typeof l=="object"?l.width:void 0,height:l&&typeof l=="object"?l.height:void 0},g=i?`https://github.com/${i}`:null;return{links:p,title:a,logo:c,logoProps:d,github:g,social:m,config:e,theme:t}}import{useLocation as as}from"react-router-dom";function Dt(e){let t=S(),r=as(),o=c=>c.endsWith("/")&&c.length>1?c.slice(0,-1):c,n=o(r.pathname),a=e.find(c=>o(c.path)===n),s=a?.tab?.toLowerCase(),m=s?e.filter(c=>!c.tab||c.tab.toLowerCase()===s):e,i=[],p=new Map;for(let c of m)c.group?(p.has(c.group)||p.set(c.group,{slug:c.group,title:c.groupTitle||c.group,routes:[],icon:c.groupIcon}),p.get(c.group).routes.push(c)):i.push(c);return{groups:Array.from(p.values()),ungrouped:i,activeRoute:a,activePath:n,config:t}}import{useState as is}from"react";function Ot(e=[]){let[t,r]=is(null);return{headings:e,activeId:t,setActiveId:r}}import{useLocation as ls}from"react-router-dom";import{useEffect as cs,useState as ms,useRef as ps}from"react";function zt(e=[],t=[]){let r=ls(),o=ps([]),[n,a]=ms({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),m=t.find(l=>l.path===r.pathname)?.tab?.toLowerCase(),i=e.findIndex(l=>l.id.toLowerCase()===m),p=i===-1?0:i;return cs(()=>{let l=o.current[p];l&&a({opacity:1,width:l.offsetWidth,transform:`translateX(${l.offsetLeft}px)`})},[p,e.length,r.pathname]),{tabs:e,activeIndex:p,indicatorStyle:n,tabRefs:o,activeTabId:m}}import{useNavigate as ds}from"react-router-dom";function Q(e,t,r){let o=e;return t&&(o===t||o.startsWith(t+"/"))&&(o=o===t?"index.md":o.slice(t.length+1)),r&&(o===r||o.startsWith(r+"/"))&&(o=o===r?"index.md":o.slice(r.length+1)),o}function $t(){let e=ds(),t=R(),{allRoutes:r,currentRoute:o,currentVersion:n,currentLocale:a,config:s}=t,m=s.versions,i=$(c=>c.setVersion),p=c=>{if(!m||c===n)return;i(c);let d=`/docs/${c}`;if(o){let g=Q(o.filePath,o.version,o.locale),b=r.find(f=>Q(f.filePath,f.version,f.locale)===g&&(f.version||m.defaultVersion)===c&&(a?f.locale===a:!f.locale));if(b)d=b.path;else{let f=r.find(x=>Q(x.filePath,x.version,x.locale)==="index.md"&&(x.version||m.defaultVersion)===c&&(a?x.locale===a:!x.locale));d=f?f.path:`/docs/${c}${a?`/${a}`:""}`}}e(d)},l=t.availableVersions.map(c=>({...c,label:c.label,value:c.key}));return{currentVersion:n,currentVersionLabel:t.currentVersionLabel,availableVersions:l,handleVersionChange:p}}import{useNavigate as us}from"react-router-dom";function Ft(){let e=us(),t=R(),{allRoutes:r,currentRoute:o,currentLocale:n,config:a}=t,s=a.i18n,m=$(d=>d.setLocale),i=d=>{if(!s||d===n)return;m(d);let g="/";if(o){let b=Q(o.filePath,o.version,o.locale),f=r.find(x=>Q(x.filePath,x.version,x.locale)===b&&(x.locale||s.defaultLocale)===d&&x.version===o.version);if(f)g=f.path;else{let x=r.find(P=>Q(P.filePath,P.version,P.locale)==="index.md"&&(P.locale||s.defaultLocale)===d&&P.version===o.version);g=x?x.path:d===s.defaultLocale?o.version?`/${o.version}`:"/":o.version?`/${o.version}/${d}`:`/${d}`}}else{let b=r.find(f=>(f.filePath==="index.mdx"||f.filePath==="index.md")&&(f.locale||s.defaultLocale)===d&&!f.version);b?g=b.path:g=d===s.defaultLocale?"/":`/${d}`}e(g)},l=a.i18n?.localeConfigs?.[n]?.label||a.i18n?.locales[n]||n,c=a.i18n?Object.entries(a.i18n.locales).map(([d,g])=>{let b=a.i18n?.localeConfigs?.[d];return{key:d,label:b?.label||g,value:d,isCurrent:d===n}}):[];return{currentLocale:n,currentLocaleLabel:l,availableLocales:c,handleLocaleChange:i}}import{useLocation as fs}from"react-router-dom";function Wt(){let{routes:e,currentRoute:t}=R(),r=fs();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let o=t.tab?.toLowerCase(),n=o?e.filter(i=>i.tab?.toLowerCase()===o):e.filter(i=>!i.tab),a=n.findIndex(i=>i.path===r.pathname),s=a>0?n[a-1]:null,m=a!==-1&&a<n.length-1?n[a+1]:null;return{prevPage:s,nextPage:m,currentRoute:t}}function _t(){let{currentRoute:e}=R(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}import{useLocation as gs}from"react-router-dom";var Gt=()=>gs();import{jsx as Ce}from"react/jsx-runtime";function bs({children:e,className:t,style:r}){return Ce("div",{className:u("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",t),style:r,children:e})}function hs({children:e,className:t,style:r}){return Ce("div",{className:u("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",t),style:r,children:e})}function xs({children:e,className:t,style:r}){return Ce("main",{className:u("boltdocs-content flex-1 min-w-0 overflow-y-auto","contain-layout",t),style:r,children:e})}function vs({children:e,className:t,style:r}){let{pathname:o}=Gt();return Ce("div",{className:u("boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8",{"max-w-content-max":o.includes("/docs/")},t),style:r,children:e})}function ys({children:e,className:t,style:r}){return Ce("div",{className:u("flex items-center justify-between mb-10",t),style:r,children:e})}function Cs({children:e,className:t,style:r}){return Ce("div",{className:u("mt-20",t),style:r,children:e})}var ce=Object.assign(bs,{Body:hs,Content:xs,ContentMdx:vs,ContentHeader:ys,ContentFooter:Cs});import{Suspense as Is,lazy as Es}from"react";import{useEffect as Rs,useState as Ps}from"react";import{Sun as $o,Moon as Fo,Monitor as Wo}from"lucide-react";import{Button as Ns}from"react-aria-components";import{jsx as G,jsxs as Ie}from"react/jsx-runtime";function _o(){let{theme:e,setTheme:t}=se(),[r,o]=Ps(!1);if(Rs(()=>{o(!0)},[]),!r)return G("div",{className:"h-9 w-9"});let n=e==="system"?Wo:e==="dark"?Fo:$o;return Ie(C.Trigger,{placement:"bottom right",children:[G(Ns,{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:G(n,{size:20,className:"animate-in fade-in zoom-in duration-300"})}),Ie(C.Root,{selectionMode:"single",selectedKeys:[e],onSelectionChange:a=>{let s=Array.from(a)[0];t(s)},children:[Ie(C.Item,{id:"light",children:[G($o,{size:16}),G("span",{children:"Light"})]}),Ie(C.Item,{id:"dark",children:[G(Fo,{size:16}),G("span",{children:"Dark"})]}),Ie(C.Item,{id:"system",children:[G(Wo,{size:16}),G("span",{children:"System"})]})]})]})}import{useEffect as ws,useState as ks}from"react";var Ts="https://api.github.com";async function Go(e,t,r=Ts){let o=new Headers;t&&o.append("authorization",t);let a=await(await fetch(`${r}/repos/${e}`,{headers:o})).json();return a.stargazers_count!==void 0?Ls(a.stargazers_count):"0"}var Ls=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);import{jsx as Uo,jsxs as Ms}from"react/jsx-runtime";function qo({repo:e}){let[t,r]=ks(null);return ws(()=>{e&&Go(e).then(o=>r(o)).catch(()=>r("0"))},[e]),Ms("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:[Uo(ro,{className:"h-4 w-4"}),t&&Uo("span",{className:"tabular-nums",children:t})]})}import*as Ss from"lucide-react";import{jsx as Re,jsxs as Xo}from"react/jsx-runtime";function jo({tabs:e,routes:t}){let{currentLocale:r}=R(),{indicatorStyle:o,tabRefs:n,activeIndex:a}=zt(e,t),s=m=>{if(!m)return null;if(m.trim().startsWith("<svg"))return Re("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:m}});let i=Ss[m];return i?Re(i,{size:16}):Re("img",{src:m,alt:"",className:"h-4 w-4 object-contain"})};return Re("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:Xo($e.List,{className:"border-none py-0",children:[e.map((m,i)=>{let p=i===a,l=t.find(d=>d.tab&&d.tab.toLowerCase()===m.id.toLowerCase()),c=l?l.path:"#";return Xo(re,{href:c,ref:d=>{n.current[i]=d},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${p?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[s(m.icon),Re("span",{children:Z(m.text,r)})]},m.id)}),Re($e.Indicator,{style:o})]})})}import{useLocation as Bs}from"react-router-dom";import{ChevronDown as Ko,Languages as As}from"lucide-react";import{Fragment as zs,jsx as v,jsxs as ee}from"react/jsx-runtime";var Hs=Es(()=>import("../search-dialog-O6VLVSOA.mjs").then(e=>({default:e.SearchDialog})));function Ut(){let{links:e,title:t,logo:r,logoProps:o,github:n,social:a,config:s}=Vt(),{routes:m,allRoutes:i,currentVersion:p,currentLocale:l}=R(),{pathname:c}=Bs(),d=s.theme||{},g=c.startsWith("/docs"),b=d?.tabs&&d.tabs.length>0;return ee(I.Root,{className:b?"border-b-0":"",children:[ee(I.Content,{children:[ee(I.Left,{children:[r&&v(I.Logo,{src:r,alt:o?.alt||t,width:o?.width??24,height:o?.height??24}),v(I.Title,{children:t}),s.versions&&p&&v(Ds,{})]}),v(I.Center,{children:v(Is,{fallback:v("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:v(Hs,{routes:m||[]})})}),ee(I.Right,{children:[v(I.Links,{children:e.map(f=>v(zs,{children:v(Vs,{link:f},f.href)}))}),s.i18n&&l&&v(Os,{}),v(I.Split,{}),v(_o,{}),n&&v(qo,{repo:d?.githubRepo??""}),a.length>0&&v(I.Split,{}),v("div",{className:"flex items-center gap-1",children:a.map(({icon:f,link:x})=>v(I.Socials,{icon:f,link:x,className:"p-1.5"},x))})]})]}),g&&b&&d?.tabs&&v("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:v(jo,{tabs:d.tabs,routes:i||m||[]})})]})}function Vs({link:e}){let t=Xe(e.href||"");return v(I.Link,{...e,href:t})}function Ds(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:r}=$t();return t.length===0?null:ee(C.Trigger,{children:[v(V,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:v(Ko,{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:v("span",{className:"font-semibold text-[0.8125rem]",children:e})}),v(C.Root,{children:v(C.Section,{items:t,children:o=>v(C.Item,{onPress:()=>r(o.value),children:o.label},`${o.value??""}`)})})]})}function Os(){let{currentLocale:e,availableLocales:t,handleLocaleChange:r}=Ft();return t.length===0?null:ee(C.Trigger,{children:[v(V,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:v(Ko,{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:ee("div",{className:"flex items-center gap-1.5",children:[v(As,{className:"w-3.5 h-3.5 text-primary-500"}),v("span",{className:"font-bold text-[0.75rem] tracking-wider uppercase opacity-90",children:e||"en"})]})}),v(C.Root,{children:v(C.Section,{items:t,children:o=>v(C.Item,{onPress:()=>r(o.value),children:ee("div",{className:"flex items-center justify-between w-full gap-4",children:[v("span",{children:o.label}),v("span",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",children:o.value})]})},`${o.value??""}`)})})]})}import{useState as Fs,useEffect as Ws,useMemo as _s}from"react";import{Zap as $s}from"lucide-react";import{jsx as qt,jsxs as Yo}from"react/jsx-runtime";function Jo(){return qt("div",{className:"flex items-center justify-center mt-10 mb-4 px-4 w-full",children:Yo("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:[qt($s,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300",fill:"currentColor"}),Yo("span",{className:"text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide",children:["Powered by"," ",qt("strong",{className:"font-bold text-text-main/80 group-hover:text-text-main",children:"Boltdocs"})]})]})})}import*as Gs from"lucide-react";import{jsx as me,jsxs as qs}from"react/jsx-runtime";function Zo(e){return e&&Gs[e]||void 0}function Us({group:e,activePath:t,getIcon:r}){let o=_s(()=>e.routes.some(s=>s.path===t),[e.routes,t]),[n,a]=Fs(!0);return Ws(()=>{o&&a(!0)},[o]),me(ne.Group,{title:e.title,isOpen:n,onToggle:()=>a(!n),children:e.routes.map(s=>{let m=t===(s.path.endsWith("/")?s.path.slice(0,-1):s.path);return me(ne.Link,{label:s.title,href:s.path,active:m,icon:r(s.icon),badge:s.badge},s.path)})})}function Xt({routes:e,config:t}){let{groups:r,ungrouped:o,activePath:n}=Dt(e),a=t.theme||{};return qs(ne.Root,{children:[o.length>0&&me(ne.Group,{className:"mb-6",children:o.map(s=>{let m=n===(s.path.endsWith("/")?s.path.slice(0,-1):s.path);return me(ne.Link,{label:s.title,href:s.path,active:m,icon:Zo(s.icon),badge:s.badge},s.path)})}),r.map(s=>me(Us,{group:s,activePath:n,getIcon:Zo},s.slug)),a?.poweredBy&&me("div",{className:"mt-auto pt-8",children:me(Jo,{})})]})}import Xs,{useRef as Qo,useEffect as js,useState as Ks,useCallback as Ys}from"react";import{Pencil as Js,CircleHelp as Zs,TextAlignStart as Qs}from"lucide-react";import{jsx as E,jsxs as pe}from"react/jsx-runtime";function jt({headings:e=[],editLink:t,communityHelp:r,filePath:o}){let{headings:n}=Ot(e),a=Xs.useMemo(()=>n.map(s=>({title:s.text,url:`#${s.id}`,depth:s.level})),[n]);return n.length===0?null:E(Je,{toc:a,children:E(ea,{headings:n,editLink:t,communityHelp:r,filePath:o})})}function ea({headings:e,editLink:t,communityHelp:r,filePath:o}){let n=Ke(),[a,s]=Ks({opacity:0}),m=Qo(null),i=Qo(null);js(()=>{if(!n||!m.current)return;let l=m.current.querySelector(`a[href="#${n}"]`);l&&s({transform:`translateY(${l.offsetTop}px)`,height:`${l.offsetHeight}px`,opacity:1})},[n]);let p=Ys((l,c)=>{l.preventDefault();let d=document.getElementById(c);d&&(d.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${c}`))},[]);return pe(X.Root,{children:[pe(X.Header,{className:"flex flex-row gap-x-2",children:[E(Qs,{size:16}),"On this page"]}),E(Ye,{containerRef:i,children:pe(X.Content,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:i,children:[E(X.Indicator,{style:a}),E("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:m,children:e.map(l=>E(X.Item,{level:l.level,children:E(X.Link,{href:`#${l.id}`,active:n===l.id,onClick:c=>p(c,l.id),className:"pl-4",children:l.text})},l.id))})]})}),(t||r)&&pe("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[E("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),pe("ul",{className:"space-y-3",children:[t&&o&&E("li",{children:pe("a",{href:t.replace(":path",o),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[E(Js,{size:16}),"Edit this page"]})}),r&&E("li",{children:pe("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[E(Zs,{size:16}),"Community help"]})})]})]})]})}import{useEffect as ta}from"react";import{useLocation as oa}from"react-router-dom";function Kt({siteTitle:e,siteDescription:t,routes:r}){let o=oa();return ta(()=>{let n=r.find(p=>p.path===o.pathname),a=n?.title,s=n?.description||t||"";document.title=a?`${a} | ${e}`:e;let m=document.querySelector('meta[name="description"]');m||(m=document.createElement("meta"),m.name="description",document.head.appendChild(m)),m.content=s,de("property","og:title",document.title),de("property","og:description",s),de("property","og:type","article"),de("property","og:url",window.location.href),de("name","twitter:card","summary"),de("name","twitter:title",document.title),de("name","twitter:description",s);let i=document.querySelector('link[rel="canonical"]');i||(i=document.createElement("link"),i.rel="canonical",document.head.appendChild(i)),i.href=window.location.origin+o.pathname},[o.pathname,e,t,r]),null}function de(e,t,r){let o=document.querySelector(`meta[${e}="${t}"]`);o||(o=document.createElement("meta"),o.setAttribute(e,t),document.head.appendChild(o)),o.content=r}import{Home as ra}from"lucide-react";import{jsx as Ee,jsxs as er}from"react/jsx-runtime";function Yt(){let{crumbs:e,activeRoute:t}=_t(),o=S().theme||{};return e.length===0||!o?.breadcrumbs?null:er(j.Root,{children:[Ee(j.Item,{children:Ee(j.Link,{href:"/",children:Ee(ra,{size:14})})}),e.map((n,a)=>er(j.Item,{children:[Ee(j.Separator,{}),Ee(j.Link,{href:n.href,className:u({"font-medium text-text-main":n.href===t?.path}),children:n.label})]},`crumb-${n.href}-${n.label}-${a}`))]})}import{jsx as Be,jsxs as Jt}from"react/jsx-runtime";function Zt(){let{prevPage:e,nextPage:t}=Wt();return!e&&!t?null:Jt(F.Root,{className:"animate-in fade-in slide-in-from-bottom-4 duration-700",children:[e?Jt(F.Link,{to:e.path,direction:"prev",children:[Be(F.Title,{children:"Previous"}),Be(F.Description,{children:e.title})]}):Be("div",{}),t&&Jt(F.Link,{to:t.path,direction:"next",children:[Be(F.Title,{children:"Next"}),Be(F.Description,{children:t.title})]})]})}import{Component as na}from"react";import{jsx as Qt,jsxs as sa}from"react/jsx-runtime";var Ae=class extends na{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("Uncaught error in Boltdocs Layout:",t,r)}render(){return this.state.hasError?this.props.fallback||sa("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[Qt("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),Qt("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),Qt(V,{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}};import{useLocation as aa}from"react-router-dom";import{jsx as U,jsxs as Ue}from"react/jsx-runtime";function ia({children:e}){let{routes:t,allRoutes:r,currentRoute:o,currentLocale:n}=R(),{pathname:a}=aa(),s=S(),i=Ne().CopyMarkdown||Se,p=a==="/"||a==="";return Ue(ce,{children:[U(Kt,{siteTitle:Z(s.theme?.title,n)||"Boltdocs",siteDescription:Z(s.theme?.description,n)||"",routes:r}),U(Ut,{}),Ue(ce.Body,{children:[!p&&U(Xt,{routes:t,config:s}),Ue(ce.Content,{children:[!p&&Ue(ce.ContentHeader,{children:[U(Yt,{}),U(i,{mdxRaw:o?._rawContent,route:o,config:s.theme?.copyMarkdown})]}),U(Ae,{children:e}),!p&&U(ce.ContentFooter,{children:U(Zt,{})})]}),!p&&U(jt,{headings:o?.headings,editLink:s.theme?.editLink,communityHelp:s.theme?.communityHelp,filePath:o?.filePath})]})]})}export{D as Admonition,Je as AnchorProvider,it as Badge,Yt as Breadcrumbs,et as Button,Ze as ButtonGroup,ct as Card,lt as Cards,bt as Caution,W as CodeBlock,Et as ComponentPreview,St as ComponentProps,Se as CopyMarkdown,ut as Danger,ia as DefaultLayout,ce as DocsLayout,Ae as ErrorBoundary,wt as Field,Tt as FileTree,Kt as Head,Mt as Image,gt as Important,ft as InfoBox,kt as Link,xt as List,At as Loading,Ut as Navbar,Fe as NotFound,mt as Note,jt as OnThisPage,Zt as PageNav,j as PrimitiveBreadcrumbs,V as PrimitiveButton,re as PrimitiveLink,C as PrimitiveMenu,rr as PrimitiveNavLink,nr as PrimitiveNavbar,sr as PrimitiveNavigationMenu,X as PrimitiveOnThisPage,F as PrimitivePageNav,cr as PrimitivePopover,ne as PrimitiveSidebar,T as PrimitiveSkeleton,$e as PrimitiveTabs,je as PrimitiveTooltip,Ye as ScrollProvider,ar as SearchDialogPrimitive,Xt as Sidebar,nt as Tab,Lt as Table,st as Tabs,pt as Tip,at as Video,dt as Warning,u as cn,rs as createBoltdocsApp,Ke as useActiveAnchor,lr as useActiveAnchors,_t as useBreadcrumbs,S as useConfig,Ft as useI18n,ir as useItems,Xe as useLocalizedTo,Gt as useLocation,Ne as useMdxComponents,Vt as useNavbar,Ot as useOnThisPage,Wt as usePageNav,R as useRoutes,mr as useSearch,Dt as useSidebar,zt as useTabs,se as useTheme,$t as useVersion};
|
package/dist/client/ssr.d.mts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Metadata provided by the server for a specific route.
|
|
5
|
-
* Maps closely to the `RouteMeta` type in the Node environment.
|
|
6
|
-
*/
|
|
7
|
-
interface ComponentRoute {
|
|
8
|
-
/** The final URL path */
|
|
9
|
-
path: string;
|
|
10
|
-
/** The absolute filesystem path of the source file */
|
|
11
|
-
componentPath: string;
|
|
12
|
-
/** The page title */
|
|
13
|
-
title: string;
|
|
14
|
-
/** Explicit order in the sidebar */
|
|
15
|
-
sidebarPosition?: number;
|
|
16
|
-
/** The relative path from the docs directory */
|
|
17
|
-
filePath: string;
|
|
18
|
-
/** The group directory name */
|
|
19
|
-
group?: string;
|
|
20
|
-
/** The display title of the group */
|
|
21
|
-
groupTitle?: string;
|
|
22
|
-
/** Explicit order of the group in the sidebar */
|
|
23
|
-
groupPosition?: number;
|
|
24
|
-
/** Extracted markdown headings for search indexing */
|
|
25
|
-
headings?: {
|
|
26
|
-
level: number;
|
|
27
|
-
text: string;
|
|
28
|
-
id: string;
|
|
29
|
-
}[];
|
|
30
|
-
/** The page summary or description */
|
|
31
|
-
description?: string;
|
|
32
|
-
/** The locale this route belongs to, if i18n is configured */
|
|
33
|
-
locale?: string;
|
|
34
|
-
/** The version this route belongs to, if versioning is configured */
|
|
35
|
-
version?: string;
|
|
36
|
-
/** Optional icon to display (Lucide icon name or raw SVG) */
|
|
37
|
-
icon?: string;
|
|
38
|
-
/** The tab this route belongs to, if tabs are configured */
|
|
39
|
-
tab?: string;
|
|
40
|
-
/** Optional badge to display next to the sidebar item */
|
|
41
|
-
badge?: string | {
|
|
42
|
-
text: 'updated' | 'new' | 'deprecated';
|
|
43
|
-
expires?: string;
|
|
44
|
-
};
|
|
45
|
-
/** Optional icon for the route's group */
|
|
46
|
-
groupIcon?: string;
|
|
47
|
-
/** The extracted plain-text content of the page for search indexing */
|
|
48
|
-
_content?: string;
|
|
49
|
-
/** The raw markdown content of the page */
|
|
50
|
-
_rawContent?: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Options for rendering the Boltdocs application on the server (SSG).
|
|
55
|
-
*/
|
|
56
|
-
interface RenderOptions {
|
|
57
|
-
/** The URL path currently being rendered */
|
|
58
|
-
path: string;
|
|
59
|
-
/** Initial routes generated by the Vite plugin (`virtual:boltdocs-routes`) */
|
|
60
|
-
routes: ComponentRoute[];
|
|
61
|
-
/** Site configuration (`virtual:boltdocs-config`) */
|
|
62
|
-
config: any;
|
|
63
|
-
/** The name of the documentation directory (e.g. 'docs') */
|
|
64
|
-
docsDirName: string;
|
|
65
|
-
/** Optional custom React component to render when visiting the root path ('/') */
|
|
66
|
-
homePage?: React.ComponentType;
|
|
67
|
-
/** Custom external pages mapped by their route path */
|
|
68
|
-
externalPages?: Record<string, React.ComponentType<any>>;
|
|
69
|
-
/** Preloaded modules (since SSR cannot use dynamic imports easily) */
|
|
70
|
-
modules: Record<string, any>;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Renders the full React application into an HTML string for a specific route.
|
|
74
|
-
* This is called by the Node SSG script during the Vite build process.
|
|
75
|
-
*/
|
|
76
|
-
declare function render(options: RenderOptions): Promise<string>;
|
|
77
|
-
|
|
78
|
-
export { type RenderOptions, render };
|
package/dist/client/ssr.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Metadata provided by the server for a specific route.
|
|
5
|
-
* Maps closely to the `RouteMeta` type in the Node environment.
|
|
6
|
-
*/
|
|
7
|
-
interface ComponentRoute {
|
|
8
|
-
/** The final URL path */
|
|
9
|
-
path: string;
|
|
10
|
-
/** The absolute filesystem path of the source file */
|
|
11
|
-
componentPath: string;
|
|
12
|
-
/** The page title */
|
|
13
|
-
title: string;
|
|
14
|
-
/** Explicit order in the sidebar */
|
|
15
|
-
sidebarPosition?: number;
|
|
16
|
-
/** The relative path from the docs directory */
|
|
17
|
-
filePath: string;
|
|
18
|
-
/** The group directory name */
|
|
19
|
-
group?: string;
|
|
20
|
-
/** The display title of the group */
|
|
21
|
-
groupTitle?: string;
|
|
22
|
-
/** Explicit order of the group in the sidebar */
|
|
23
|
-
groupPosition?: number;
|
|
24
|
-
/** Extracted markdown headings for search indexing */
|
|
25
|
-
headings?: {
|
|
26
|
-
level: number;
|
|
27
|
-
text: string;
|
|
28
|
-
id: string;
|
|
29
|
-
}[];
|
|
30
|
-
/** The page summary or description */
|
|
31
|
-
description?: string;
|
|
32
|
-
/** The locale this route belongs to, if i18n is configured */
|
|
33
|
-
locale?: string;
|
|
34
|
-
/** The version this route belongs to, if versioning is configured */
|
|
35
|
-
version?: string;
|
|
36
|
-
/** Optional icon to display (Lucide icon name or raw SVG) */
|
|
37
|
-
icon?: string;
|
|
38
|
-
/** The tab this route belongs to, if tabs are configured */
|
|
39
|
-
tab?: string;
|
|
40
|
-
/** Optional badge to display next to the sidebar item */
|
|
41
|
-
badge?: string | {
|
|
42
|
-
text: 'updated' | 'new' | 'deprecated';
|
|
43
|
-
expires?: string;
|
|
44
|
-
};
|
|
45
|
-
/** Optional icon for the route's group */
|
|
46
|
-
groupIcon?: string;
|
|
47
|
-
/** The extracted plain-text content of the page for search indexing */
|
|
48
|
-
_content?: string;
|
|
49
|
-
/** The raw markdown content of the page */
|
|
50
|
-
_rawContent?: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Options for rendering the Boltdocs application on the server (SSG).
|
|
55
|
-
*/
|
|
56
|
-
interface RenderOptions {
|
|
57
|
-
/** The URL path currently being rendered */
|
|
58
|
-
path: string;
|
|
59
|
-
/** Initial routes generated by the Vite plugin (`virtual:boltdocs-routes`) */
|
|
60
|
-
routes: ComponentRoute[];
|
|
61
|
-
/** Site configuration (`virtual:boltdocs-config`) */
|
|
62
|
-
config: any;
|
|
63
|
-
/** The name of the documentation directory (e.g. 'docs') */
|
|
64
|
-
docsDirName: string;
|
|
65
|
-
/** Optional custom React component to render when visiting the root path ('/') */
|
|
66
|
-
homePage?: React.ComponentType;
|
|
67
|
-
/** Custom external pages mapped by their route path */
|
|
68
|
-
externalPages?: Record<string, React.ComponentType<any>>;
|
|
69
|
-
/** Preloaded modules (since SSR cannot use dynamic imports easily) */
|
|
70
|
-
modules: Record<string, any>;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Renders the full React application into an HTML string for a specific route.
|
|
74
|
-
* This is called by the Node SSG script during the Vite build process.
|
|
75
|
-
*/
|
|
76
|
-
declare function render(options: RenderOptions): Promise<string>;
|
|
77
|
-
|
|
78
|
-
export { type RenderOptions, render };
|
package/dist/client/ssr.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var qo=Object.create;var He=Object.defineProperty;var Jo=Object.getOwnPropertyDescriptor;var Xo=Object.getOwnPropertyNames;var Ko=Object.getPrototypeOf,Yo=Object.prototype.hasOwnProperty;var gt=(e,t)=>{for(var o in t)He(e,o,{get:t[o],enumerable:!0})},ht=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Xo(t))!Yo.call(e,n)&&n!==o&&He(e,n,{get:()=>t[n],enumerable:!(r=Jo(t,n))||r.enumerable});return e};var A=(e,t,o)=>(o=e!=null?qo(Ko(e)):{},ht(t||!e||!e.__esModule?He(o,"default",{value:e,enumerable:!0}):o,e)),jo=e=>ht(He({},"__esModule",{value:!0}),e);var Tr={};gt(Tr,{render:()=>Nr});module.exports=jo(Tr);var Go=A(require("react")),_o=A(require("react-dom/server")),Uo=require("react-router-dom/server");var V=A(require("react")),Rr=A(require("react-dom/client")),X=require("react-router-dom");var Tt=require("lucide-react");var et=A(require("react")),Pt=require("react-aria-components"),Nt=require("react-router-dom");var Ie=require("react"),Ze=(0,Ie.createContext)(null);function se(){let e=(0,Ie.use)(Ze);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Ct=require("react-router-dom");var ae=require("react"),vt=require("react/jsx-runtime"),xt=(0,ae.createContext)({preload:()=>{},routes:[]});function ze(){return(0,ae.use)(xt)}function bt({routes:e,modules:t,children:o}){let r=(0,ae.useRef)(null),n=(0,ae.useCallback)(a=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let i=a.split("#")[0].split("?")[0],l=e.find(s=>s.path===i||i==="/"&&s.path==="");if(l?.filePath){let s=Object.keys(t).find(c=>c.endsWith("/"+l.filePath));s&&t[s]().catch(c=>{console.error(`[boltdocs] Failed to preload route ${a}:`,c)})}},100)},[e,t]);return(0,vt.jsx)(xt.Provider,{value:{preload:n,routes:e},children:o})}var yt=require("zustand"),De=require("zustand/middleware"),Q=(0,yt.create)()((0,De.persist)(e=>({currentLocale:void 0,currentVersion:void 0,hasHydrated:!1,setLocale:t=>e({currentLocale:t}),setVersion:t=>e({currentVersion:t}),setHasHydrated:t=>e({hasHydrated:t})}),{name:"boltdocs-storage",storage:(0,De.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function Le(){let{routes:e}=ze(),t=se(),o=(0,Ct.useLocation)(),r=Q(g=>g.currentLocale),n=Q(g=>g.currentVersion),a=Q(g=>g.hasHydrated),i=e.find(g=>g.path===o.pathname),l=t.i18n?i?.locale||(a?r:void 0)||t.i18n.defaultLocale:void 0,s=t.versions?i?.version||(a?n:void 0)||t.versions.defaultVersion:void 0,c=e.filter(g=>{let W=t.i18n?(g.locale||t.i18n.defaultLocale)===l:!0,h=t.versions?(g.version||t.versions.defaultVersion)===s:!0;if(!(W&&h))return!1;let F=t.i18n;if(F){let ce=!!i?.locale,Z=!!g.locale;if(e.some(Ve=>Ve!==g&&Ve.filePath===g.filePath&&Ve.version===g.version&&(Ve.locale||F.defaultLocale)===(g.locale||F.defaultLocale))&&ce!==Z)return!1}return!0}),p=t.i18n?.localeConfigs?.[l]?.label||t.i18n?.locales[l]||l,b=t.versions?.versions.find(g=>g.path===s)?.label||s,w=t.i18n?Object.entries(t.i18n.locales).map(([g,W])=>{let h=t.i18n?.localeConfigs?.[g];return{key:g,label:h?.label||W,isCurrent:g===l}}):[],L=t.versions?t.versions.versions.map(g=>({key:g.path,label:g.label,isCurrent:g.path===s})):[];return{routes:c,allRoutes:e,currentRoute:i,currentLocale:l,currentLocaleLabel:p,availableLocales:w,currentVersion:s,currentVersionLabel:b,availableVersions:L,config:t}}function Qe(e){let t=se(),{currentLocale:o,currentVersion:r}=Le();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,a=t.versions;if(!n&&!a)return e;let i=e.startsWith("/docs"),l=e.split("/").filter(Boolean),s=0;l[s]==="docs"&&s++,a&&l.length>s&&a.versions.find(b=>b.path===l[s])&&s++,n&&l.length>s&&n.locales[l[s]]&&s++;let c=l.slice(s),d=[];i&&(d.push("docs"),a&&r&&d.push(r)),n&&o&&o!==n.defaultLocale&&d.push(o),d.push(...c);let p=`/${d.join("/")}`;return p.length>1&&p.endsWith("/")?p.slice(0,-1):p||"/"}var Rt=require("clsx"),wt=require("tailwind-merge");function m(...e){return(0,wt.twMerge)((0,Rt.clsx)(e))}var tt=require("react/jsx-runtime"),de=et.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:a,...i}=e,l=Qe(o??""),{preload:s}=ze();return(0,tt.jsx)(Pt.Link,{...i,ref:t,href:l,onMouseEnter:p=>{n?.(p),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&s(l)},onFocus:p=>{a?.(p),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&s(l)}})});de.displayName="Link";var Zo=et.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:a,...i}=e,l=(0,Nt.useLocation)(),s=Qe(o??""),c=r?l.pathname===s:l.pathname.startsWith(s),d=typeof n=="function"?n({isActive:c}):m(n,c&&"active"),p=typeof a=="function"?a({isActive:c}):a;return(0,tt.jsx)(de,{...i,ref:t,href:o,className:d,children:p})});Zo.displayName="NavLink";var ee=require("react/jsx-runtime");function ot(){return(0,ee.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,ee.jsxs)("div",{className:"space-y-4",children:[(0,ee.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,ee.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,ee.jsx)("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."}),(0,ee.jsxs)(de,{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:[(0,ee.jsx)(Tt.ArrowLeft,{size:16})," Go to Home"]})]})})}var U=require("react"),Mt=require("react/jsx-runtime"),kt=(0,U.createContext)(void 0);function Lt({children:e}){let[t,o]=(0,U.useState)("system"),[r,n]=(0,U.useState)("dark"),[a,i]=(0,U.useState)(!1);(0,U.useEffect)(()=>{i(!0);let s=localStorage.getItem("boltdocs-theme"),c=s==="light"||s==="dark"||s==="system"?s:"system";o(c);let d=window.matchMedia("(prefers-color-scheme: dark)");((b,w)=>{n(b==="system"?w?"dark":"light":b)})(c,d.matches);let f=b=>{n(w=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?b.matches?"dark":"light":w)};return d.addEventListener("change",f),()=>d.removeEventListener("change",f)},[]),(0,U.useEffect)(()=>{if(!a)return;let s=window.matchMedia("(prefers-color-scheme: dark)").matches,c=t==="system"?s?"dark":"light":t;n(c);let d=document.documentElement;c==="light"?(d.classList.add("theme-light"),d.dataset.theme="light"):(d.classList.remove("theme-light"),d.dataset.theme="dark")},[t,a]);let l=s=>{o(s),localStorage.setItem("boltdocs-theme",s)};return(0,Mt.jsx)(kt.Provider,{value:{theme:t,resolvedTheme:r,setTheme:l},children:e})}function At(){let e=(0,U.use)(kt);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var ft=A(require("virtual:boltdocs-layout"));var Bt=require("react"),Et=require("react-aria-components"),Oe=require("react-router-dom"),Vt=require("react/jsx-runtime");function St({children:e}){let t=(0,Oe.useNavigate)();return(0,Vt.jsx)(Et.RouterProvider,{navigate:(o,r)=>{(0,Bt.startTransition)(()=>{t(o,r)})},useHref:Oe.useHref,children:e})}var Ht=require("react"),It=require("react-router-dom");function zt(){let{pathname:e,hash:t}=(0,It.useLocation)();return(0,Ht.useLayoutEffect)(()=>{let o=document.querySelector(".boltdocs-content")||window,r=()=>o===window?window.scrollY:o.scrollTop,n=(a,i="auto")=>{o===window?window.scrollTo({top:a,behavior:i}):o.scrollTo({top:a,behavior:i})};if(t){let a=t.replace("#",""),i=document.getElementById(a);if(i){let s=o===window?0:o.getBoundingClientRect().top,p=i.getBoundingClientRect().top-s-80+r();n(p,"smooth");return}}n(0)},[e,t]),null}var Dt=require("react-router-dom"),Ot=A(require("virtual:boltdocs-layout")),rt=require("react/jsx-runtime");function Wt(){return(0,rt.jsx)(Ot.default,{children:(0,rt.jsx)(Dt.Outlet,{})})}var We=require("react"),_t=require("react/jsx-runtime"),Ft=(0,We.createContext)({});function $t(){return(0,We.use)(Ft)}function Gt({components:e,children:t}){return(0,_t.jsx)(Ft.Provider,{value:e,children:t})}var qt=require("react/jsx-runtime");function Ut({Component:e}){let t=$t();return(0,qt.jsx)(e,{components:t})}var Do=require("lucide-react");var ut={};gt(ut,{Admonition:()=>re,Badge:()=>no,Button:()=>Xt,Card:()=>co,Cards:()=>lo,Caution:()=>vo,CodeBlock:()=>ie,ComponentPreview:()=>Eo,ComponentProps:()=>Mo,CopyMarkdown:()=>Io,Danger:()=>ho,Field:()=>No,FileTree:()=>Ro,Image:()=>Lo,Important:()=>bo,InfoBox:()=>xo,Link:()=>To,List:()=>yo,Note:()=>uo,Tab:()=>eo,Table:()=>Po,Tabs:()=>to,Tip:()=>fo,Video:()=>oo,Warning:()=>go});var $e=A(require("react-aria-components"));var Jt=require("class-variance-authority"),q=require("react/jsx-runtime"),Fe=(0,Jt.cva)("flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none",{variants:{variant:{primary:"bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg",secondary:"bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong",outline:"bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500",ghost:"bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main",danger:"bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15",success:"bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15",warning:"bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15",info:"bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15",subtle:"bg-primary-500/10 text-primary-500 hover:bg-primary-500/20",link:"bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline"},size:{sm:"min-h-8 px-3.5 text-[0.8125rem] gap-1.5",md:"min-h-10 px-5 text-[0.9375rem] gap-2",lg:"min-h-12 px-7 text-[1.05rem] gap-2.5"},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},iconSize:{sm:"w-8 h-8 p-0",md:"w-10 h-10 p-0",lg:"w-12 h-12 p-0"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:null}},defaultVariants:{variant:"primary",size:"md",rounded:"md"}}),pe=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:a,variant:i,size:l,rounded:s,iconSize:c,disabled:d,...p})=>{let f=r||!n&&!!t,b=f?(0,q.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,q.jsxs)(q.Fragment,{children:[t&&o==="left"&&(0,q.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,q.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,q.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,q.jsx)($e.Link,{href:e,className:m(Fe({variant:i,size:l,rounded:s,iconSize:f?c:void 0,disabled:d}),a),...p,children:b}):(0,q.jsx)($e.Button,{className:m(Fe({variant:i,size:l,rounded:s,iconSize:f?c:void 0,disabled:d}),a),...p,children:b})};var Kt=require("react/jsx-runtime"),Xt=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:a,...i})=>(0,Kt.jsx)(pe,{className:m("group",Fe({variant:t,size:o,rounded:r,iconSize:n,disabled:a,className:e})),...i});var nt=A(require("react-aria-components")),xe=require("lucide-react");var Yt=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}};var K=require("react");function jt(e){let{title:t}=e,[o,r]=(0,K.useState)(!1),[n,a]=(0,K.useState)(!1),[i,l]=(0,K.useState)(!1),s=(0,K.useRef)(null),c=se(),d=(0,K.useCallback)(async()=>{let p=s.current?.textContent??"";Yt(p),r(!0),setTimeout(()=>r(!1),2e3)},[]);return(0,K.useEffect)(()=>{let p=s.current?.textContent?.length??0;l(p>120)},[e.children,e.highlightedHtml]),{copied:o,isExpanded:n,setIsExpanded:a,isExpandable:i,preRef:s,handleCopy:d,shouldTruncate:i&&!n}}var v=require("react/jsx-runtime");function te(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var Ge=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,v.jsx)("title",{children:"TypeScript"}),(0,v.jsx)("path",{fill:"#2563EB",d:"M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z"})]}),_e=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,v.jsx)("title",{children:"JavaScript"}),(0,v.jsx)("path",{fill:"#F59E0B",d:"M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z"})]}),Ue=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,v.jsx)("title",{children:"JSON"}),(0,v.jsx)("path",{fill:"#F59E0B",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),qe=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,v.jsx)("title",{children:"CSS"}),(0,v.jsx)("path",{fill:"#0EA5E9",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),Je=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,v.jsx)("title",{children:"HTML"}),(0,v.jsx)("path",{fill:"#EA580C",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]});var me=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,v.jsx)("title",{children:"React"}),(0,v.jsx)("path",{fill:"#0E8ADC",d:"M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z"})]}),ue=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,v.jsx)("title",{children:"Markdown"}),(0,v.jsx)("path",{fill:"#60A5FA",d:"M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z"})]}),fe=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",...te(e),children:[(0,v.jsx)("title",{children:"Shell"}),(0,v.jsx)("path",{stroke:"#14B8A6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.336 17l6-6-6-6M12.336 19h8"})]}),ge=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,v.jsx)("title",{children:"YAML"}),(0,v.jsx)("path",{fill:"#A78BFA",d:"M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z"})]});var he=A(require("react-aria-components"));var $=require("react/jsx-runtime"),Zt=({className:e,children:t,...o})=>(0,$.jsx)(he.Tooltip,{...o,offset:8,className:r=>m("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(he.OverlayArrow,{children:(0,$.jsxs)("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90",children:[(0,$.jsx)("title",{children:"Arrow"}),(0,$.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),Ae=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,$.jsxs)(he.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,$.jsx)(Zt,{...n,children:e})]});Ae.Root=Ae;Ae.Content=Zt;var B=require("react/jsx-runtime"),Qo={ts:Ge,tsx:me,js:_e,jsx:me,json:Ue,css:qe,html:Je,md:ue,mdx:ue,bash:fe,sh:fe,yaml:ge,yml:ge};function ie(e){let{children:t,hideCopy:o=!1,highlightedHtml:r,"data-highlighted-html":n,title:a,"data-lang":i,plain:l=!1,...s}=e,c=r||n,d=se(),p=e.lang||i||"",{copied:f,isExpanded:b,setIsExpanded:w,isExpandable:L,preRef:g,handleCopy:W,shouldTruncate:h}=jt(e),F=Qo[p];return(0,B.jsxs)("div",{className:m("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!l,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":h},e.className),children:[a&&(0,B.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted",children:[F?(0,B.jsx)(F,{size:14}):(0,B.jsx)(xe.File,{size:14,className:"opacity-60"}),(0,B.jsx)("span",{children:a})]}),(0,B.jsx)("div",{className:"absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100",children:!o&&(0,B.jsx)(Ae,{content:f?"Copied!":"Copy code",children:(0,B.jsx)(nt.Button,{onPress:W,className:m("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",f?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:f?(0,B.jsx)(xe.Check,{size:20}):(0,B.jsx)(xe.Copy,{size:20})})})}),c?(0,B.jsx)("div",{ref:g,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:c}}):(0,B.jsx)("pre",{ref:g,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...s,children:t}),L&&(0,B.jsx)("div",{className:m(h?"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:(0,B.jsx)(nt.Button,{onPress:()=>w(!b),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:b?"Show less":"Expand code"})})]})}var be=require("react"),le=A(require("react-aria-components"));var oe=require("react");function Qt({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(c=>!c.props.disabled):e,[r,n]=(0,oe.useState)(o===-1?0:o),a=(0,oe.useRef)([]),[i,l]=(0,oe.useState)({opacity:0,transform:"translateX(0)",width:0});(0,oe.useEffect)(()=>{let c=a.current[r];c&&l({opacity:1,width:c.offsetWidth,transform:`translateX(${c.offsetLeft}px)`})},[r,t]);let s=(0,oe.useCallback)(c=>{let d=0;if(c.key==="ArrowRight"?d=1:c.key==="ArrowLeft"&&(d=-1),d!==0){let p=(r+d+t.length)%t.length;for(;t[p].props.disabled&&p!==r;)p=(p+d+t.length)%t.length;p!==r&&!t[p].props.disabled&&(n(p),a.current[p]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:a,indicatorStyle:i,handleKeyDown:s}}var st=require("class-variance-authority"),H=require("react/jsx-runtime"),er=(0,st.cva)("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"}}),tr=(0,st.cva)("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 eo({children:e}){let t=typeof e=="string"?(0,H.jsx)(ie,{className:"language-bash",children:(0,H.jsx)("code",{children:e.trim()})}):e;return(0,H.jsx)("div",{className:"py-4",children:t})}function to({defaultIndex:e=0,children:t}){let o=(0,be.useMemo)(()=>be.Children.toArray(t).filter(l=>(0,be.isValidElement)(l)&&l.props?.label),[t]),{active:r,setActive:n,tabRefs:a,indicatorStyle:i}=Qt({initialIndex:e,tabs:o});return(0,H.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,H.jsxs)(le.Tabs,{selectedKey:r.toString(),onSelectionChange:l=>n(Number(l)),className:"w-full",children:[(0,H.jsxs)(le.TabList,{"aria-label":"Content Tabs",className:m(er()),children:[o.map((l,s)=>{let{label:c,icon:d,disabled:p}=l.props,f=s.toString();return(0,H.jsxs)(le.Tab,{id:f,isDisabled:p,ref:b=>{a.current[s]=b},className:({isSelected:b,isDisabled:w})=>m(tr({isActive:b,isDisabled:w})),children:[!!d&&(0,H.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:d}),(0,H.jsx)("span",{children:c})]},f)}),(0,H.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:i,"aria-hidden":"true"})]}),o.map((l,s)=>(0,H.jsx)(le.TabPanel,{id:s.toString(),children:o[s]},s))]})})}var ve=require("react"),Me=require("react/jsx-runtime");function oo({src:e,poster:t,alt:o,children:r,controls:n,preload:a="metadata",...i}){let l=(0,ve.useRef)(null),[s,c]=(0,ve.useState)(!1);return(0,ve.useEffect)(()=>{let d=l.current;if(!d)return;let p=new IntersectionObserver(([f])=>{f.isIntersecting&&(c(!0),p.disconnect())},{rootMargin:"200px"});return p.observe(d),()=>p.disconnect()},[]),(0,Me.jsx)("div",{ref:l,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:s?(0,Me.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...i,children:[r,"Your browser does not support the video tag."]}):(0,Me.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}var ro=require("class-variance-authority"),so=require("react/jsx-runtime"),or=(0,ro.cva)("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 no({variant:e="default",children:t,className:o="",...r}){return(0,so.jsx)("span",{className:m(or({variant:e}),o),...r,children:t})}var Be=require("react"),ao=A(require("react-aria-components"));var io=require("class-variance-authority"),I=require("react/jsx-runtime"),rr=(0,io.cva)("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 lo({cols:e=3,children:t,className:o="",...r}){return(0,I.jsx)("div",{className:m(rr({cols:e}),o),...r,children:t})}function co({title:e,icon:t,href:o,children:r,className:n="",...a}){let i=(0,Be.useRef)(null),l=(0,Be.useRef)(null),s=(0,Be.useCallback)(p=>{let f=i.current||l.current;if(!f)return;let{left:b,top:w}=f.getBoundingClientRect();f.style.setProperty("--x",`${p.clientX-b}px`),f.style.setProperty("--y",`${p.clientY-w}px`)},[]),c=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("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&&(0,I.jsx)("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}),(0,I.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,I.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,I.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),d=m("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",n);return o?(0,I.jsx)(ao.Link,{ref:l,href:o,className:m(d,"no-underline cursor-pointer"),onMouseMove:s,...a,children:c}):(0,I.jsx)("div",{ref:i,role:"presentation",className:d,onMouseMove:s,...a,children:c})}var S=require("lucide-react");var mo=require("class-variance-authority"),N=require("react/jsx-runtime"),nr={note:(0,N.jsx)(S.Bookmark,{size:18}),tip:(0,N.jsx)(S.Lightbulb,{size:18}),info:(0,N.jsx)(S.Info,{size:18}),warning:(0,N.jsx)(S.AlertTriangle,{size:18}),danger:(0,N.jsx)(S.ShieldAlert,{size:18}),important:(0,N.jsx)(S.Flame,{size:18}),caution:(0,N.jsx)(S.Zap,{size:18})},sr={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},po=(0,mo.cva)("py-4 px-4 rounded-lg",{variants:{type:{note:"border-primary-400 bg-primary-500/5 text-primary-400",tip:"border-emerald-500 bg-emerald-500/5 text-emerald-500",info:"border-sky-500 bg-sky-500/5 text-sky-500",warning:"border-amber-500 bg-amber-500/5 text-amber-500",danger:"border-red-500 bg-red-500/5 text-red-500",important:"border-orange-500 bg-orange-500/5 text-orange-500",caution:"border-yellow-500 bg-yellow-500/5 text-yellow-500"}},defaultVariants:{type:"note"}});function re({type:e="note",title:t,children:o,className:r="",...n}){return(0,N.jsxs)("div",{className:m(po({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,N.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,N.jsx)("span",{className:m("shrink-0",po({type:e})),children:nr[e]}),(0,N.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||sr[e]})]}),(0,N.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var uo=e=>(0,N.jsx)(re,{type:"note",...e}),fo=e=>(0,N.jsx)(re,{type:"tip",...e}),go=e=>(0,N.jsx)(re,{type:"warning",...e}),ho=e=>(0,N.jsx)(re,{type:"danger",...e}),xo=e=>(0,N.jsx)(re,{type:"info",...e}),bo=e=>(0,N.jsx)(re,{type:"important",...e}),vo=e=>(0,N.jsx)(re,{type:"caution",...e});var Xe=require("react"),ye=require("lucide-react");var Ke=require("class-variance-authority"),J=require("react/jsx-runtime"),ar=(0,Ke.cva)("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}}),ir=(0,Ke.cva)("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}}),lr=(0,Ke.cva)("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 cr({icon:e,children:t,variant:o,dense:r}){return(0,J.jsxs)("li",{className:m(ir({variant:o,dense:r})),children:[e&&(0,J.jsx)("span",{className:m(lr({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,J.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var dr={checked:e=>(0,J.jsx)(ye.Check,{size:14,className:m("text-emerald-500 shrink-0",e)}),arrow:e=>(0,J.jsx)(ye.ChevronRight,{size:14,className:m("text-primary-400 shrink-0",e)}),bubble:e=>(0,J.jsx)(ye.Circle,{size:6,fill:"currentColor",className:m("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function yo({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...a}){let i=t!==void 0&&Number(t)>1,l=dr[e],s=ar({variant:e,cols:t,dense:o,isGrid:i,className:n}),c=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,J.jsx)(c,{className:s,...a,children:r}):(0,J.jsx)("ul",{className:s,...a,children:Xe.Children.map(r,d=>{if(!(0,Xe.isValidElement)(d))return d;let p=d,f=p.type==="li"?p.props.children:p.props.children||d;return(0,J.jsx)(cr,{icon:l(),variant:e,dense:o,children:f})})})}var Y=require("react"),j=A(require("react-aria-components")),G=require("lucide-react");var P=require("react/jsx-runtime"),Ce=16,Ee=2,pr={ts:Ge,tsx:me,js:_e,jsx:me,json:Ue,css:qe,html:Je,md:ue,mdx:ue,bash:fe,sh:fe,yaml:ge,yml:ge},at={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 lt(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(lt).join(""):(0,Y.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?lt(e.props.children):""}function mr(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,P.jsx)(G.Folder,{size:Ce,strokeWidth:Ee,className:m(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=o.split(".").pop()||"",a=pr[n];if(a)return(0,P.jsx)(a,{size:Ce});let i=m(r,"text-text-dim group-hover:text-text-main");return at.CODE.test(o)?(0,P.jsx)(G.FileCode,{size:Ce,strokeWidth:Ee,className:i}):at.TEXT.test(o)?(0,P.jsx)(G.FileText,{size:Ce,strokeWidth:Ee,className:i}):at.IMAGE.test(o)?(0,P.jsx)(G.FileImage,{size:Ce,strokeWidth:Ee,className:i}):(0,P.jsx)(G.File,{size:Ce,strokeWidth:Ee,className:i})}function it(e,t){if(!(0,Y.isValidElement)(e))return!1;let o=e.type;if(typeof o=="string")return o===t;if(typeof o=="function")return o.name===t||o.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function ur(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Ye(e,t="root"){if(!(0,Y.isValidElement)(e))return[];let o=[];if(it(e,"ul"))return Y.Children.forEach(e.props.children,(r,n)=>{o.push(...Ye(r,`${t}-${n}`))}),o;if(it(e,"li")){let r=Y.Children.toArray(e.props.children),n=r.findIndex(w=>it(w,"ul")),a=n!==-1,i=a?r.slice(0,n):r,l=a?r.slice(n):[],s=lt(i),{name:c,comment:d}=ur(s),p=c.endsWith("/"),f=p?c.slice(0,-1):c,b=a||p;return o.push({id:`${t}-${f}`,name:f,comment:d,isFolder:b,children:a?Ye(l[0],`${t}-${f}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&Y.Children.forEach(e.props.children,(r,n)=>{o.push(...Ye(r,`${t}-${n}`))}),o}function Co({item:e}){return(0,P.jsxs)(j.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[(0,P.jsx)(j.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,P.jsxs)("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[(0,P.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,P.jsx)(j.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,P.jsx)(G.ChevronRight,{size:14,strokeWidth:3,className:m("transition-transform duration-200",t&&"rotate-90")})}):(0,P.jsx)("div",{className:"w-[18px]"}),mr(e.name,e.isFolder),(0,P.jsx)("span",{className:m("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&&(0,P.jsxs)("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&&(0,P.jsx)(j.Collection,{items:e.children,children:t=>(0,P.jsx)(Co,{item:t})})]})}function Ro({children:e}){let t=(0,Y.useMemo)(()=>Ye(e),[e]);return(0,P.jsx)("div",{className:"my-8",children:(0,P.jsx)(j.Tree,{items:t,"aria-label":"File Tree",className:m("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:o=>(0,P.jsx)(Co,{item:o})})})}var Se=A(require("react-aria-components"));var Re=require("react");function wo({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,a]=(0,Re.useState)(null),[i,l]=(0,Re.useState)(1),s=(0,Re.useMemo)(()=>{if(!e)return[];let f=[...e];return t&&n!==null&&f.sort((b,w)=>{let L=b[n.key],g=w[n.key],W=typeof L=="string"?L:"",h=typeof g=="string"?g:"";return W<h?n.direction==="asc"?-1:1:W>h?n.direction==="asc"?1:-1:0}),f},[e,n,t]),c=Math.ceil(s.length/r),d=(0,Re.useMemo)(()=>{if(!o)return s;let f=(i-1)*r;return s.slice(f,f+r)},[s,o,i,r]);return{sortConfig:n,currentPage:i,setCurrentPage:l,totalPages:c,paginatedData:d,requestSort:f=>{if(!t)return;let b="asc";n&&n.key===f&&n.direction==="asc"&&(b="desc"),a({key:f,direction:b})}}}var z=require("lucide-react");var y=require("react/jsx-runtime");function Po({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:a=!1,pageSize:i=10}){let{sortConfig:l,currentPage:s,setCurrentPage:c,totalPages:d,paginatedData:p,requestSort:f}=wo({data:t,sortable:n,paginated:a,pageSize:i}),b=L=>n?l?.key!==L?(0,y.jsx)(z.ChevronDown,{size:14,className:"ml-1 opacity-30"}):l.direction==="asc"?(0,y.jsx)(z.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,y.jsx)(z.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,w=o||(0,y.jsxs)(y.Fragment,{children:[e&&(0,y.jsx)("thead",{children:(0,y.jsx)("tr",{children:e.map((L,g)=>(0,y.jsx)("th",{onClick:()=>f(g),className:m("text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm",n&&"cursor-pointer select-none hover:text-primary-400 transition-colors"),children:(0,y.jsxs)("div",{className:"flex items-center",children:[L,b(g)]})},g))})}),p&&(0,y.jsx)("tbody",{children:p.map((L,g)=>(0,y.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:L.map((W,h)=>(0,y.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:W},h))},g))})]});return(0,y.jsxs)("div",{className:m("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[(0,y.jsx)("div",{className:"overflow-x-auto",children:(0,y.jsx)("table",{className:"w-full border-collapse text-sm",children:w})}),a&&d>1&&(0,y.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,y.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",s," of ",d]}),(0,y.jsxs)("div",{className:"flex items-center gap-1",children:[(0,y.jsx)(Se.Button,{onPress:()=>c(1),isDisabled:s===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:(0,y.jsx)(z.ChevronsLeft,{size:16})}),(0,y.jsx)(Se.Button,{onPress:()=>c(L=>Math.max(L-1,1)),isDisabled:s===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:(0,y.jsx)(z.ChevronLeft,{size:16})}),(0,y.jsx)(Se.Button,{onPress:()=>c(L=>Math.min(L+1,d)),isDisabled:s===d,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:(0,y.jsx)(z.ChevronRight,{size:16})}),(0,y.jsx)(Se.Button,{onPress:()=>c(d),isDisabled:s===d,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:(0,y.jsx)(z.ChevronsRight,{size:16})})]})]})]})}var D=require("react/jsx-runtime");function No({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:a,className:i=""}){return(0,D.jsxs)("article",{className:m("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",i),id:a,children:[(0,D.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,D.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,D.jsx)("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 group-hover:bg-primary-500/15",children:e}),t&&(0,D.jsx)("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 tracking-wider shadow-sm",children:t}),r&&(0,D.jsxs)("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 tracking-wider text-red-400 border border-red-500/20 shadow-sm",children:[(0,D.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&(0,D.jsxs)("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:[(0,D.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,D.jsx)("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),(0,D.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}var ko=require("react/jsx-runtime");function To({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=m("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,ko.jsx)(de,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}var Ao=require("react/jsx-runtime");function Lo({src:e,alt:t,theme:o,...r}){let{theme:n}=At();return o&&o!==n?null:(0,Ao.jsx)("img",{src:e,alt:t||"",...r})}var R=require("react/jsx-runtime");function Mo({title:e,props:t,className:o=""}){return(0,R.jsxs)("div",{className:m("my-6",o),children:[e&&(0,R.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,R.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,R.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,R.jsx)("thead",{children:(0,R.jsxs)("tr",{children:[(0,R.jsx)("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"}),(0,R.jsx)("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"}),(0,R.jsx)("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"}),(0,R.jsx)("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"})]})}),(0,R.jsx)("tbody",{children:t.map((r,n)=>(0,R.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,R.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,R.jsx)("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:r.name}),r.required&&(0,R.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,R.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,R.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,R.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,R.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,R.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,R.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}var ct=require("react");function Bo(e){let{code:t,children:o,preview:r}=e,n=(0,ct.useMemo)(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),a=(0,ct.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:a}}var we=require("react/jsx-runtime");function Eo(e){let{highlightedHtml:t,hideCode:o=!1,hideCopy:r=!1}=e,{initialCode:n,previewElement:a}=Bo(e);return(0,we.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,we.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:a}),!o&&(0,we.jsx)("div",{className:"border-t border-border-subtle",children:(0,we.jsx)(ie,{hideCopy:r,lang:"tsx",highlightedHtml:t,plain:!0,children:n})})]})}var Ho=require("react"),ne=require("lucide-react");var So=require("react/jsx-runtime"),dt=({children:e,className:t,vertical:o=!1})=>(0,So.jsx)("div",{className:m("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});var Te=require("lucide-react"),mt=A(require("react")),k=A(require("react-aria-components"));var Ne=A(require("react-aria-components"));var Pe=require("react/jsx-runtime"),pt=({children:e,className:t,showArrow:o,...r})=>(0,Pe.jsxs)(Ne.Popover,{offset:8,...r,className:Ne.composeRenderProps(t,n=>m("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none",n)),children:[o&&(0,Pe.jsx)(Ne.OverlayArrow,{className:"group",children:(0,Pe.jsx)("svg",{viewBox:"0 0 12 12",className:"block h-3 w-3 fill-bg-surface/80 stroke-border-subtle group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90","aria-hidden":"true",children:(0,Pe.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var T=require("react/jsx-runtime");function fr(e){let[t,o]=mt.default.Children.toArray(e.children).slice(0,2);return(0,T.jsxs)(k.MenuTrigger,{...e,children:[t,(0,T.jsx)(pt,{placement:e.placement,className:"min-w-35",children:o})]})}function gr(e){let[t,o]=mt.default.Children.toArray(e.children).slice(0,2);return(0,T.jsxs)(k.SubmenuTrigger,{...e,children:[t,(0,T.jsx)(pt,{offset:-4,crossOffset:-4,children:o})]})}function O(e){return(0,T.jsx)(k.Menu,{...e,className:k.composeRenderProps(e.className,t=>m("p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75",t))})}function hr(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,T.jsx)(k.MenuItem,{...e,textValue:t,className:k.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:a})=>m("group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none","text-text-main text-[12px]",{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":r,"bg-bg-surface-elevanted":n,"opacity-40 grayscale pointer-events-none":a},o)),children:k.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:a})=>(0,T.jsxs)(T.Fragment,{children:[r!=="none"&&(0,T.jsxs)("span",{className:"flex items-center size-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,T.jsx)(Te.Check,{className:"size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,T.jsx)(Te.Dot,{className:"size-5 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,T.jsx)("div",{className:"flex flex-row w-full transition-colors items-center gap-2 py-1 px-1",children:o}),a&&(0,T.jsx)(Te.ChevronRight,{className:"size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function xr({title:e,...t}){return(0,T.jsxs)(k.MenuSection,{...t,className:m("flex flex-col gap-0.5",t.className),children:[e&&(0,T.jsx)(k.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),(0,T.jsx)(k.Collection,{items:t.items,children:t.children})]})}function br(e){return(0,T.jsx)(k.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}O.Root=O;O.Item=hr;O.Trigger=fr;O.SubTrigger=gr;O.Section=xr;O.Separator=br;var Vo=require("react/jsx-runtime");function E({className:e,variant:t="rect",...o}){return(0,Vo.jsx)("div",{className:m("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}var vr=require("react-aria-components"),yr=require("react-aria-components");var M=require("react/jsx-runtime"),Cr=e=>{let[t,o]=(0,Ho.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([e],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(a);window.open(i,"_blank")}}};function Io({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:i}=Cr(r),l=o!==!1,s=typeof o=="object"&&o.text||"Copy Markdown";return!l||!r?null:(0,M.jsx)("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:(0,M.jsxs)(dt,{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:[(0,M.jsx)(pe,{variant:"ghost",onPress:a,icon:n?(0,M.jsx)(ne.Check,{size:16}):(0,M.jsx)(ne.Copy,{size:16}),iconPosition:"left",className:m("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",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":s}),(0,M.jsxs)(O.Trigger,{placement:"bottom end",children:[(0,M.jsx)(pe,{variant:"ghost",isIconOnly:!0,icon:(0,M.jsx)(ne.ChevronDown,{size:14}),className:m("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")}),(0,M.jsxs)(O.Root,{className:"w-52",children:[(0,M.jsxs)(O.Item,{onAction:a,children:[(0,M.jsx)(ne.Copy,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,M.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,M.jsxs)(O.Item,{onAction:i,children:[(0,M.jsx)(ne.ExternalLink,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,M.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}var C=require("react/jsx-runtime");function zo(){return(0,C.jsx)("div",{className:m("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:(0,C.jsxs)("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[(0,C.jsxs)("div",{className:"flex gap-2",children:[(0,C.jsx)(E,{className:"h-3 w-16"}),(0,C.jsx)(E,{className:"h-3 w-24"})]}),(0,C.jsx)(E,{className:"h-10 w-[60%] sm:h-12"}),(0,C.jsxs)("div",{className:"space-y-3",children:[(0,C.jsx)(E,{className:"h-4 w-full"}),(0,C.jsx)(E,{className:"h-4 w-[95%]"}),(0,C.jsx)(E,{className:"h-4 w-[40%]"})]}),(0,C.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,C.jsx)(E,{className:"h-7 w-32"}),(0,C.jsxs)("div",{className:"space-y-3",children:[(0,C.jsx)(E,{className:"h-4 w-full"}),(0,C.jsx)(E,{className:"h-4 w-[98%]"}),(0,C.jsx)(E,{className:"h-4 w-[92%]"}),(0,C.jsx)(E,{className:"h-4 w-[60%]"})]})]}),(0,C.jsx)(E,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),(0,C.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,C.jsx)(E,{className:"h-7 w-48"}),(0,C.jsxs)("div",{className:"space-y-3",children:[(0,C.jsx)(E,{className:"h-4 w-full"}),(0,C.jsx)(E,{className:"h-4 w-[85%]"})]})]})]})})}var _=require("react/jsx-runtime"),ke=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return(0,_.jsxs)(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&(0,_.jsx)("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:(0,_.jsx)(Do.Link,{size:16})})]})},Oo={...ut,Loading:zo,h1:e=>(0,_.jsx)(ke,{level:1,...e}),h2:e=>(0,_.jsx)(ke,{level:2,...e}),h3:e=>(0,_.jsx)(ke,{level:3,...e}),h4:e=>(0,_.jsx)(ke,{level:4,...e}),h5:e=>(0,_.jsx)(ke,{level:5,...e}),h6:e=>(0,_.jsx)(ke,{level:6,...e}),pre:e=>(0,_.jsx)(ie,{...e,children:e.children})};var Wo=A(require("virtual:boltdocs-mdx-components"));var Fo=require("react-router-dom");var x=require("react/jsx-runtime");function wr(){let{currentLocale:e,config:t}=Le();return(0,V.useEffect)(()=>{if(!t.i18n)return;let o=t.i18n.localeConfigs?.[e];document.documentElement.lang=o?.htmlLang||e||"en",document.documentElement.dir=o?.direction||"ltr"},[e,t.i18n]),null}function Pr(){let e=(0,Fo.useLocation)(),{config:t}=Le(),o=Q(i=>i.setLocale),r=Q(i=>i.setVersion),n=Q(i=>i.currentLocale),a=Q(i=>i.currentVersion);return(0,V.useEffect)(()=>{let i=e.pathname.split("/").filter(Boolean),l=0,s=t.versions?.defaultVersion,c=t.i18n?.defaultLocale;if(i[l]==="docs"&&l++,t.versions&&i.length>l){let d=t.versions.versions.find(p=>p.path===i[l]);d&&(s=d.path,l++)}t.i18n&&i.length>l&&t.i18n.locales[i[l]]?c=i[l]:t.i18n&&i.length===0&&(c=n||t.i18n.defaultLocale),c!==n&&o(c),s!==a&&r(s)},[e.pathname,t,o,r,n,a]),null}function $o({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:a,externalPages:i,externalLayout:l,components:s={}}){let[c,d]=(0,V.useState)(e),[p,f]=(0,V.useState)(t),b=i||{},w=l||ft.default,L=(0,V.useMemo)(()=>c.filter(h=>!(a&&(h.path==="/"||h.path===""))&&!b[h.path===""?"/":h.path]).map(h=>{let F=Object.keys(r).find(Z=>Z===`/${o}/${h.filePath}`||Z.endsWith(`/${o}/${h.filePath}`)||Z.endsWith(`/${o}\\${h.filePath.replace(/\\/g,"/")}`)),ce=F?r[F]:null;return{...h,Component:V.default.lazy(async()=>ce?await ce():{default:ot})}}),[c,r,o,a,b]);(0,V.useEffect)(()=>{n&&(n.on("boltdocs:routes-update",h=>{d(h)}),n.on("boltdocs:config-update",h=>{f(h)}))},[n]);let g=(0,V.useMemo)(()=>({...Oo,...Wo.default,...s}),[s]),W=g.Loading;return(0,x.jsx)(Lt,{children:(0,x.jsx)(Gt,{components:g,children:(0,x.jsx)(Ze.Provider,{value:p,children:(0,x.jsx)(St,{children:(0,x.jsxs)(bt,{routes:c,modules:r,children:[(0,x.jsx)(zt,{}),(0,x.jsx)(Pr,{}),(0,x.jsx)(wr,{}),(0,x.jsxs)(X.Routes,{children:[(0,x.jsx)(X.Route,{element:(0,x.jsx)(Wt,{}),children:L.map(h=>(0,x.jsx)(X.Route,{path:h.path===""?"/":h.path,element:(0,x.jsx)(V.default.Suspense,{fallback:(0,x.jsx)(W,{}),children:(0,x.jsx)(Ut,{Component:h.Component})})},h.path))},"docs-layout"),a&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(X.Route,{path:"/",element:(0,x.jsx)(w,{children:(0,x.jsx)(a,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(h=>(0,x.jsx)(X.Route,{path:`/${h}`,element:(0,x.jsx)(w,{children:(0,x.jsx)(a,{})})},`home-${h}`))]}),Object.entries(b).map(([h,F])=>{let ce=h==="/"?"":h;return(0,x.jsxs)(V.default.Fragment,{children:[(0,x.jsx)(X.Route,{path:h,element:(0,x.jsx)(w,{children:(0,x.jsx)(F,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(Z=>(0,x.jsx)(X.Route,{path:`/${Z}${ce}`,element:(0,x.jsx)(w,{children:(0,x.jsx)(F,{})})},`${h}-${Z}`))]},h)}),(0,x.jsx)(X.Route,{path:"*",element:(0,x.jsx)(ft.default,{children:(0,x.jsx)(ot,{})})})]})]})})})})})}var je=require("react/jsx-runtime");async function Nr(e){let{path:t,routes:o,config:r,modules:n,homePage:a,externalPages:i,docsDirName:l}=e,s={};for(let[d,p]of Object.entries(n))s[d]=()=>Promise.resolve(p);return _o.default.renderToString((0,je.jsx)(Go.default.StrictMode,{children:(0,je.jsx)(Uo.StaticRouter,{location:t,children:(0,je.jsx)($o,{initialRoutes:o,initialConfig:r,docsDirName:l,modules:s,homePage:a,externalPages:i})})}))}0&&(module.exports={render});
|