boltdocs 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/bin/boltdocs.js +2 -2
  3. package/dist/base-ui/index.d.mts +3 -3
  4. package/dist/base-ui/index.d.ts +3 -3
  5. package/dist/base-ui/index.js +1 -1
  6. package/dist/base-ui/index.mjs +1 -1
  7. package/dist/{cache-CRAZ55X7.mjs → cache-P6WK424C.mjs} +1 -1
  8. package/dist/chunk-22NXDNP4.mjs +74 -0
  9. package/dist/chunk-2HUVMMJU.mjs +1 -0
  10. package/dist/chunk-2Z5T6EAU.mjs +1 -0
  11. package/dist/chunk-CRZGOE32.mjs +1 -0
  12. package/dist/chunk-HA6543SL.mjs +1 -0
  13. package/dist/{chunk-ZK2266IZ.mjs → chunk-RPUERTVC.mjs} +1 -1
  14. package/dist/{chunk-MZBG4N4W.mjs → chunk-URTD6E6S.mjs} +1 -1
  15. package/dist/chunk-W2NB4T6V.mjs +1 -0
  16. package/dist/chunk-Y4RRHPXC.mjs +1 -0
  17. package/dist/client/index.d.mts +1 -1
  18. package/dist/client/index.d.ts +1 -1
  19. package/dist/client/index.js +1 -1
  20. package/dist/client/index.mjs +1 -1
  21. package/dist/client/ssr.js +1 -1
  22. package/dist/client/ssr.mjs +1 -1
  23. package/dist/hooks/index.d.mts +7 -15
  24. package/dist/hooks/index.d.ts +7 -15
  25. package/dist/hooks/index.js +1 -1
  26. package/dist/hooks/index.mjs +1 -1
  27. package/dist/{loading-chS3pm9W.d.ts → loading-B7X5Wchs.d.ts} +3 -5
  28. package/dist/{loading-BqGrFWO5.d.mts → loading-WuaQbsKb.d.mts} +3 -5
  29. package/dist/mdx/index.js +1 -1
  30. package/dist/mdx/index.mjs +1 -1
  31. package/dist/node/cli-entry.js +27 -23
  32. package/dist/node/cli-entry.mjs +5 -1
  33. package/dist/node/index.js +10 -10
  34. package/dist/node/index.mjs +1 -1
  35. package/dist/primitives/index.d.mts +2 -2
  36. package/dist/primitives/index.d.ts +2 -2
  37. package/dist/primitives/index.js +1 -1
  38. package/dist/primitives/index.mjs +1 -1
  39. package/dist/search-dialog-ZRXBAQJ5.mjs +1 -0
  40. package/package.json +2 -1
  41. package/src/client/app/theme-context.tsx +14 -7
  42. package/src/client/components/default-layout.tsx +6 -2
  43. package/src/client/components/primitives/navbar.tsx +3 -3
  44. package/src/client/components/primitives/search-dialog.tsx +4 -4
  45. package/src/client/components/primitives/sidebar.tsx +3 -2
  46. package/src/client/components/primitives/skeleton.tsx +26 -0
  47. package/src/client/components/ui-base/loading.tsx +43 -73
  48. package/src/client/components/ui-base/navbar.tsx +8 -6
  49. package/src/client/components/ui-base/page-nav.tsx +2 -1
  50. package/src/client/components/ui-base/powered-by.tsx +4 -1
  51. package/src/client/components/ui-base/search-dialog.tsx +16 -5
  52. package/src/client/components/ui-base/sidebar.tsx +4 -2
  53. package/src/client/hooks/use-i18n.ts +3 -2
  54. package/src/client/hooks/use-localized-to.ts +6 -5
  55. package/src/client/hooks/use-page-nav.ts +27 -6
  56. package/src/client/hooks/use-routes.ts +2 -1
  57. package/src/client/hooks/use-search.ts +81 -59
  58. package/src/client/hooks/use-sidebar.ts +2 -1
  59. package/src/client/store/use-boltdocs-store.ts +6 -5
  60. package/src/client/theme/neutral.css +29 -0
  61. package/src/node/{cli.ts → cli/build.ts} +17 -23
  62. package/src/node/cli/dev.ts +22 -0
  63. package/src/node/cli/doctor.ts +243 -0
  64. package/src/node/cli/index.ts +9 -0
  65. package/src/node/cli/ui.ts +54 -0
  66. package/src/node/cli-entry.ts +16 -16
  67. package/src/node/config.ts +1 -1
  68. package/src/node/plugin/entry.ts +1 -1
  69. package/src/node/plugin/index.ts +24 -10
  70. package/src/node/routes/parser.ts +9 -9
  71. package/src/node/search/index.ts +55 -0
  72. package/src/node/ssg/index.ts +14 -6
  73. package/src/node/ssg/robots.ts +7 -4
  74. package/dist/chunk-5D6XPYQ3.mjs +0 -74
  75. package/dist/chunk-6QXCKZAT.mjs +0 -1
  76. package/dist/chunk-H4M6P3DM.mjs +0 -1
  77. package/dist/chunk-JXHNX2WN.mjs +0 -1
  78. package/dist/chunk-Q3MLYTIQ.mjs +0 -1
  79. package/dist/chunk-RSII2UPE.mjs +0 -1
  80. package/dist/chunk-ZRJ55GGF.mjs +0 -1
  81. package/dist/search-dialog-MA5AISC7.mjs +0 -1
@@ -1 +1 @@
1
- var xo=Object.defineProperty;var ho=(e,t)=>{for(var o in t)xo(e,o,{get:t[o],enumerable:!0})};import bs from"react";import xs from"react-dom/server";import{StaticRouter as hs}from"react-router-dom/server";import _e,{useEffect as Ge,useState as po,useMemo as uo}from"react";import Hm from"react-dom/client";import{BrowserRouter as zm,Routes as ms,Route as q}from"react-router-dom";import{ArrowLeft as Oo}from"lucide-react";import Xe from"react";import{Link as Mo}from"react-aria-components";import{useLocation as Io}from"react-router-dom";import{createContext as vo,use as yo}from"react";var ye=vo(null);function H(){let e=yo(ye);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}import{useLocation as Ao}from"react-router-dom";import{createContext as Co,use as Ro,useCallback as No,useRef as Po}from"react";import{jsx as wo}from"react/jsx-runtime";var je=Co({preload:()=>{},routes:[]});function ue(){return Ro(je)}function qe({routes:e,modules:t,children:o}){let r=Po(null),n=No(i=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let l=i.split("#")[0].split("?")[0],a=e.find(s=>s.path===l||l==="/"&&s.path==="");if(a?.filePath){let s=Object.keys(t).find(d=>d.endsWith("/"+a.filePath));s&&t[s]().catch(d=>{console.error(`[boltdocs] Failed to preload route ${i}:`,d)})}},100)},[e,t]);return wo(je.Provider,{value:{preload:n,routes:e},children:o})}import{create as To}from"zustand";import{persist as ko,createJSONStorage as Lo}from"zustand/middleware";var E=To()(ko(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:Lo(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function te(){let{routes:e}=ue(),t=H(),o=Ao(),r=E(p=>p.currentLocale),n=E(p=>p.currentVersion),i=E(p=>p.hasHydrated),l=e.find(p=>p.path===o.pathname),a=t.i18n?l?.locale||(i?r:void 0)||t.i18n.defaultLocale:void 0,s=t.versions?l?.version||(i?n:void 0)||t.versions.defaultVersion:void 0,d=e.filter(p=>{let N=t.i18n?(p.locale||t.i18n.defaultLocale)===a:!0,A=t.versions?(p.version||t.versions.defaultVersion)===s:!0;if(!(N&&A))return!1;let B=t.i18n;if(B){let go=!!l?.locale,bo=!!p.locale;if(e.some(pe=>pe!==p&&pe.filePath===p.filePath&&pe.version===p.version&&(pe.locale||B.defaultLocale)===(p.locale||B.defaultLocale))&&go!==bo)return!1}return!0}),g=t.i18n?.localeConfigs?.[a]?.label||t.i18n?.locales[a]||a,x=t.versions?.versions.find(p=>p.path===s)?.label||s,v=t.i18n?Object.entries(t.i18n.locales).map(([p,N])=>{let A=t.i18n?.localeConfigs?.[p];return{key:p,label:A?.label||N,isCurrent:p===a}}):[],y=t.versions?t.versions.versions.map(p=>({key:p.path,label:p.label,isCurrent:p.path===s})):[];return{routes:d,allRoutes:e,currentRoute:l,currentLocale:a,currentLocaleLabel:g,availableLocales:v,currentVersion:s,currentVersionLabel:x,availableVersions:y,config:t}}function Ce(e){let t=H(),{currentLocale:o,currentVersion:r}=te();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,i=t.versions;if(!n&&!i)return e;let l=e.startsWith("/docs"),a=e.split("/").filter(Boolean),s=0;a[s]==="docs"&&s++,i&&a.length>s&&i.versions.find(x=>x.path===a[s])&&s++,n&&a.length>s&&n.locales[a[s]]&&s++;let d=a.slice(s),m=[];l&&(m.push("docs"),i&&r&&m.push(r)),n&&o&&o!==n.defaultLocale&&m.push(o),m.push(...d);let g=`/${m.join("/")}`;return g.length>1&&g.endsWith("/")?g.slice(0,-1):g||"/"}import{clsx as Bo}from"clsx";import{twMerge as So}from"tailwind-merge";function c(...e){return So(Bo(e))}import{jsx as Ke}from"react/jsx-runtime";var D=Xe.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:i,...l}=e,a=Ce(o??""),{preload:s}=ue();return Ke(Mo,{...l,ref:t,href:a,onMouseEnter:g=>{n?.(g),r==="hover"&&typeof a=="string"&&a.startsWith("/")&&s(a)},onFocus:g=>{i?.(g),r==="hover"&&typeof a=="string"&&a.startsWith("/")&&s(a)}})});D.displayName="Link";var Eo=Xe.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:i,...l}=e,a=Io(),s=Ce(o??""),d=r?a.pathname===s:a.pathname.startsWith(s),m=typeof n=="function"?n({isActive:d}):c(n,d&&"active"),g=typeof i=="function"?i({isActive:d}):i;return Ke(D,{...l,ref:t,href:o,className:m,children:g})});Eo.displayName="NavLink";import{jsx as oe,jsxs as Ze}from"react/jsx-runtime";function Re(){return oe("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:Ze("div",{className:"space-y-4",children:[oe("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),oe("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),oe("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."}),Ze(D,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[oe(Oo,{size:16})," Go to Home"]})]})})}import{createContext as Vo,use as Ho,useEffect as Je,useState as Ne}from"react";import{jsx as Do}from"react/jsx-runtime";var Qe=Vo(void 0);function Ye({children:e}){let[t,o]=Ne("system"),[r,n]=Ne("dark"),[i,l]=Ne(!1);Je(()=>{l(!0);let s=localStorage.getItem("boltdocs-theme"),d=s==="light"||s==="dark"||s==="system"?s:"system";o(d);let m=window.matchMedia("(prefers-color-scheme: dark)");((x,v)=>{n(x==="system"?v?"dark":"light":x)})(d,m.matches);let b=x=>{n(v=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?x.matches?"dark":"light":v)};return m.addEventListener("change",b),()=>m.removeEventListener("change",b)},[]),Je(()=>{if(!i)return;let s=window.matchMedia("(prefers-color-scheme: dark)").matches,d=t==="system"?s?"dark":"light":t;n(d);let m=document.documentElement;d==="light"?(m.classList.add("theme-light"),m.dataset.theme="light"):(m.classList.remove("theme-light"),m.dataset.theme="dark")},[t,i]);let a=s=>{o(s),localStorage.setItem("boltdocs-theme",s)};return Do(Qe.Provider,{value:{theme:t,resolvedTheme:r,setTheme:a},children:e})}function et(){let e=Ho(Qe);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}import me from"virtual:boltdocs-layout";import{startTransition as zo}from"react";import{RouterProvider as Fo}from"react-aria-components";import{useNavigate as $o,useHref as Wo}from"react-router-dom";import{jsx as _o}from"react/jsx-runtime";function tt({children:e}){let t=$o();return _o(Fo,{navigate:(o,r)=>{zo(()=>{t(o,r)})},useHref:Wo,children:e})}import{useLayoutEffect as Go}from"react";import{useLocation as Uo}from"react-router-dom";function ot(){let{pathname:e,hash:t}=Uo();return Go(()=>{let o=document.querySelector(".boltdocs-content");if(o){if(t){let r=t.replace("#",""),n=document.getElementById(r);if(n){let l=o.getBoundingClientRect().top,d=n.getBoundingClientRect().top-l-80+o.scrollTop;o.scrollTo({top:d,behavior:"smooth"});return}}o.scrollTo(0,0)}},[e,t]),null}import{Outlet as jo}from"react-router-dom";import qo from"virtual:boltdocs-layout";import{jsx as rt}from"react/jsx-runtime";function nt(){return rt(qo,{children:rt(jo,{})})}import{MDXProvider as Jo}from"@mdx-js/react";import{createContext as Xo,useContext as Ko}from"react";import{jsx as Zo}from"react/jsx-runtime";var st=Xo({});function it(){return Ko(st)}function at({components:e,children:t}){return Zo(st.Provider,{value:e,children:t})}import{jsx as lt}from"react/jsx-runtime";function ct({Component:e}){let t=it();return lt(Jo,{components:t,children:lt(e,{})})}import{Link as cs}from"lucide-react";var $e={};ho($e,{Admonition:()=>O,Badge:()=>kt,Button:()=>dt,Card:()=>Mt,Cards:()=>St,Caution:()=>$t,CodeBlock:()=>z,ComponentPreview:()=>oo,ComponentProps:()=>Yt,CopyMarkdown:()=>lo,Danger:()=>Dt,Field:()=>Zt,FileTree:()=>Gt,Image:()=>Qt,Important:()=>Ft,InfoBox:()=>zt,Link:()=>Jt,List:()=>Wt,Note:()=>Ot,Tab:()=>Nt,Table:()=>Kt,Tabs:()=>Pt,Tip:()=>Vt,Video:()=>Tt,Warning:()=>Ht});import*as ge from"react-aria-components";import{cva as Qo}from"class-variance-authority";import{Fragment as Yo,jsx as X,jsxs as er}from"react/jsx-runtime";var fe=Qo("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"}}),K=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:i,variant:l,size:a,rounded:s,iconSize:d,disabled:m,...g})=>{let b=r||!n&&!!t,x=b?X("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):er(Yo,{children:[t&&o==="left"&&X("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),X("span",{className:"flex items-center",children:n}),t&&o==="right"&&X("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?X(ge.Link,{href:e,className:c(fe({variant:l,size:a,rounded:s,iconSize:b?d:void 0,disabled:m}),i),...g,children:x}):X(ge.Button,{className:c(fe({variant:l,size:a,rounded:s,iconSize:b?d:void 0,disabled:m}),i),...g,children:x})};import{jsx as tr}from"react/jsx-runtime";var dt=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:i,...l})=>tr(K,{className:c("group",fe({variant:t,size:o,rounded:r,iconSize:n,disabled:i,className:e})),...l});import*as be from"react-aria-components";import{Copy as dr,Check as mr}from"lucide-react";import{getParameters as mt}from"codesandbox/lib/api/define.js";function pt(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",i=e.description||"Generic Sandbox",l={};for(let[a,s]of Object.entries(t)){let d=typeof s.content=="object"?JSON.stringify(s.content,null,2):s.content;l[a]={content:d,isBinary:s.isBinary??!1}}if(!l["package.json"]){let s=e.template==="vite"||!!r.vite||!!r["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};l["package.json"]={content:JSON.stringify({private:!0,name:n,description:i,type:"module",version:"1.0.0",scripts:e.scripts||s,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return l}function or(e){let t=pt(e),o=mt({files:t}),r=new URLSearchParams({parameters:o,installDependencies:"true"});return e.entry&&r.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${r.toString()}`,options:e}}function ut(e){if(typeof window>"u")return or(e);let t=pt(e),o=mt({files:t}),r=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let i=(a,s)=>{let d=document.createElement("input");d.type="hidden",d.name=a,d.value=s,n.appendChild(d)},l=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return i("query",l.toString()),i("parameters",o),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${o}`,options:e}}var ft=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 gt,useEffect as rr,useRef as nr,useState as Pe}from"react";function bt(e){let{title:t,sandbox:o}=e,[r,n]=Pe(!1),[i,l]=Pe(!1),[a,s]=Pe(!1),d=nr(null),m=H(),g=gt(async()=>{let x=d.current?.textContent??"";ft(x),n(!0),setTimeout(()=>n(!1),2e3)},[]),b=gt(()=>{let x=d.current?.textContent??"",v=m?.integrations?.sandbox?.config||{},y=typeof o=="object"?o:v,p=y.entry||"src/App.tsx";ut({title:t??"Code Snippet",...y,files:{...y.files,[p]:{content:x}}})},[t,m,o]);return rr(()=>{let x=d.current?.textContent?.length??0;s(x>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:i,setIsExpanded:l,isExpandable:a,preRef:d,handleCopy:g,handleSandbox:b,shouldTruncate:a&&!i}}import{jsx as xt,jsxs as ar}from"react/jsx-runtime";function sr(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var ht=e=>ar("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...sr(e),children:[xt("title",{children:"CodeSandbox"}),xt("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});import*as Z from"react-aria-components";import{Fragment as cr,jsx as re,jsxs as we}from"react/jsx-runtime";var lr=({className:e,children:t,...o})=>re(Z.Tooltip,{...o,offset:8,className:r=>c("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=>we(cr,{children:[re(Z.OverlayArrow,{children:we("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:[re("title",{children:"Arrow"}),re("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),Te=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>we(Z.TooltipTrigger,{delay:o,closeDelay:r,children:[t,re(lr,{...n,children:e})]});import{jsx as S,jsxs as vt}from"react/jsx-runtime";function z(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:i,...l}=e,d=!!H()?.integrations?.sandbox?.enable&&!r,{copied:m,isExpanded:g,setIsExpanded:b,isExpandable:x,preRef:v,handleCopy:y,handleSandbox:p,shouldTruncate:N}=bt(e);return vt("div",{className:c("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",N&&"[&>pre]:max-h-[250px] [&>pre]:overflow-hidden"),children:[vt("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:[d&&S(Te,{content:"Open in CodeSandbox",children:S(be.Button,{onPress:p,className:"grid place-items-center w-8 h-8 bg-transparent text-text-muted outline-none cursor-pointer transition-all duration-200 hover:scale-115 hover:text-sky-400 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2","aria-label":"Open in CodeSandbox",children:S(ht,{size:20})})}),!n&&S(Te,{content:m?"Copied!":"Copy code",children:S(be.Button,{onPress:y,className:c("grid place-items-center w-8 h-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-115 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2",m?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:m?S(mr,{size:20}):S(dr,{size:20})})})]}),i?S("div",{ref:v,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:i}}):S("pre",{ref:v,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...l,children:t}),x&&S("div",{className:c(N?"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:S(be.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 gr,isValidElement as br,useMemo as xr}from"react";import*as $ from"react-aria-components";import{useState as yt,useRef as pr,useEffect as ur,useCallback as fr}from"react";function Ct({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[r,n]=yt(o===-1?0:o),i=pr([]),[l,a]=yt({opacity:0,transform:"translateX(0)",width:0});ur(()=>{let d=i.current[r];d&&a({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[r,t]);let s=fr(d=>{let m=0;if(d.key==="ArrowRight"?m=1:d.key==="ArrowLeft"&&(m=-1),m!==0){let g=(r+m+t.length)%t.length;for(;t[g].props.disabled&&g!==r;)g=(g+m+t.length)%t.length;g!==r&&!t[g].props.disabled&&(n(g),i.current[g]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:i,indicatorStyle:l,handleKeyDown:s}}import{cva as Rt}from"class-variance-authority";import{jsx as F,jsxs as ke}from"react/jsx-runtime";var hr=Rt("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"}}),vr=Rt("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"?F(z,{className:"language-bash",children:F("code",{children:e.trim()})}):e;return F("div",{className:"py-4",children:t})}function Pt({defaultIndex:e=0,children:t}){let o=xr(()=>gr.toArray(t).filter(a=>br(a)&&a.props?.label),[t]),{active:r,setActive:n,tabRefs:i,indicatorStyle:l}=Ct({initialIndex:e,tabs:o});return F("div",{className:"my-8 w-full group/tabs",children:ke($.Tabs,{selectedKey:r.toString(),onSelectionChange:a=>n(Number(a)),className:"w-full",children:[ke($.TabList,{"aria-label":"Content Tabs",className:c(hr()),children:[o.map((a,s)=>{let{label:d,icon:m,disabled:g}=a.props,b=s.toString();return ke($.Tab,{id:b,isDisabled:g,ref:x=>{i.current[s]=x},className:({isSelected:x,isDisabled:v})=>c(vr({isActive:x,isDisabled:v})),children:[!!m&&F("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:m}),F("span",{children:d})]},b)}),F("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:l,"aria-hidden":"true"})]}),o.map((a,s)=>F($.TabPanel,{id:s.toString(),children:o[s]},s))]})})}import{useRef as yr,useState as Cr,useEffect as Rr}from"react";import{jsx as wt,jsxs as Nr}from"react/jsx-runtime";function Tt({src:e,poster:t,alt:o,children:r,controls:n,preload:i="metadata",...l}){let a=yr(null),[s,d]=Cr(!1);return Rr(()=>{let m=a.current;if(!m)return;let g=new IntersectionObserver(([b])=>{b.isIntersecting&&(d(!0),g.disconnect())},{rootMargin:"200px"});return g.observe(m),()=>g.disconnect()},[]),wt("div",{ref:a,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:s?Nr("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:i,playsInline:!0,...l,children:[r,"Your browser does not support the video tag."]}):wt("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}import{cva as Pr}from"class-variance-authority";import{jsx as Tr}from"react/jsx-runtime";var wr=Pr("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 kt({variant:e="default",children:t,className:o="",...r}){return Tr("span",{className:c(wr({variant:e}),o),...r,children:t})}import{useCallback as kr,useRef as Lt}from"react";import*as Bt from"react-aria-components";import{cva as Lr}from"class-variance-authority";import{Fragment as Br,jsx as G,jsxs as At}from"react/jsx-runtime";var Ar=Lr("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 St({cols:e=3,children:t,className:o="",...r}){return G("div",{className:c(Ar({cols:e}),o),...r,children:t})}function Mt({title:e,icon:t,href:o,children:r,className:n="",...i}){let l=Lt(null),a=Lt(null),s=kr(g=>{let b=l.current||a.current;if(!b)return;let{left:x,top:v}=b.getBoundingClientRect();b.style.setProperty("--x",`${g.clientX-x}px`),b.style.setProperty("--y",`${g.clientY-v}px`)},[]),d=At(Br,{children:[G("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&&G("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}),At("div",{className:"space-y-1.5",children:[e&&G("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&G("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),m=c("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?G(Bt.Link,{ref:a,href:o,className:c(m,"no-underline cursor-pointer"),onMouseMove:s,...i,children:d}):G("div",{ref:l,role:"presentation",className:m,onMouseMove:s,...i,children:d})}import{Info as Sr,Lightbulb as Mr,AlertTriangle as Ir,ShieldAlert as Er,Bookmark as Or,Zap as Vr,Flame as Hr}from"lucide-react";import{cva as Dr}from"class-variance-authority";import{jsx as P,jsxs as Et}from"react/jsx-runtime";var zr={note:P(Or,{size:18}),tip:P(Mr,{size:18}),info:P(Sr,{size:18}),warning:P(Ir,{size:18}),danger:P(Er,{size:18}),important:P(Hr,{size:18}),caution:P(Vr,{size:18})},Fr={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},It=Dr("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 O({type:e="note",title:t,children:o,className:r="",...n}){return Et("div",{className:c(It({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[Et("div",{className:"flex items-center flex-row gap-2 mb-2",children:[P("span",{className:c("shrink-0",It({type:e})),children:zr[e]}),P("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||Fr[e]})]}),P("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var Ot=e=>P(O,{type:"note",...e}),Vt=e=>P(O,{type:"tip",...e}),Ht=e=>P(O,{type:"warning",...e}),Dt=e=>P(O,{type:"danger",...e}),zt=e=>P(O,{type:"info",...e}),Ft=e=>P(O,{type:"important",...e}),$t=e=>P(O,{type:"caution",...e});import{Children as $r,isValidElement as Wr}from"react";import{Check as _r,ChevronRight as Gr,Circle as Ur}from"lucide-react";import{cva as Le}from"class-variance-authority";import{jsx as W,jsxs as Jr}from"react/jsx-runtime";var jr=Le("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}}),qr=Le("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}}),Xr=Le("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 Kr({icon:e,children:t,variant:o,dense:r}){return Jr("li",{className:c(qr({variant:o,dense:r})),children:[e&&W("span",{className:c(Xr({variant:o==="bubble"?"bubble":"default"})),children:e}),W("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Zr={checked:e=>W(_r,{size:14,className:c("text-emerald-500 shrink-0",e)}),arrow:e=>W(Gr,{size:14,className:c("text-primary-400 shrink-0",e)}),bubble:e=>W(Ur,{size:6,fill:"currentColor",className:c("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function Wt({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...i}){let l=t!==void 0&&Number(t)>1,a=Zr[e],s=jr({variant:e,cols:t,dense:o,isGrid:l,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?W(d,{className:s,...i,children:r}):W("ul",{className:s,...i,children:$r.map(r,m=>{if(!Wr(m))return m;let g=m,b=g.type==="li"?g.props.children:g.props.children||m;return W(Kr,{icon:a(),variant:e,dense:o,children:b})})})}import{Children as Ae,isValidElement as Ee,useMemo as Qr}from"react";import*as M from"react-aria-components";import{Folder as Yr,FileText as en,File as tn,FileCode as on,FileImage as rn,ChevronRight as nn}from"lucide-react";import{jsx as w,jsxs as Me}from"react/jsx-runtime";var ne=16,se=2,Be={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 Ie(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(Ie).join(""):Ee(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?Ie(e.props.children):""}function sn(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return w(Yr,{size:ne,strokeWidth:se,className:c(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=c(r,"text-text-dim group-hover:text-text-main");return Be.CODE.test(o)?w(on,{size:ne,strokeWidth:se,className:n}):Be.TEXT.test(o)?w(en,{size:ne,strokeWidth:se,className:n}):Be.IMAGE.test(o)?w(rn,{size:ne,strokeWidth:se,className:n}):w(tn,{size:ne,strokeWidth:se,className:n})}function Se(e,t){if(!Ee(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 an(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function xe(e,t="root"){if(!Ee(e))return[];let o=[];if(Se(e,"ul"))return Ae.forEach(e.props.children,(r,n)=>{o.push(...xe(r,`${t}-${n}`))}),o;if(Se(e,"li")){let r=Ae.toArray(e.props.children),n=r.findIndex(v=>Se(v,"ul")),i=n!==-1,l=i?r.slice(0,n):r,a=i?r.slice(n):[],s=Ie(l),{name:d,comment:m}=an(s),g=d.endsWith("/"),b=g?d.slice(0,-1):d,x=i||g;return o.push({id:`${t}-${b}`,name:b,comment:m,isFolder:x,children:i?xe(a[0],`${t}-${b}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&Ae.forEach(e.props.children,(r,n)=>{o.push(...xe(r,`${t}-${n}`))}),o}function _t({item:e}){return Me(M.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(M.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>Me("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"}),o?w(M.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:w(nn,{size:14,strokeWidth:3,className:c("transition-transform duration-200",t&&"rotate-90")})}):w("div",{className:"w-[18px]"}),sn(e.name,e.isFolder),w("span",{className:c("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&&Me("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(M.Collection,{items:e.children,children:t=>w(_t,{item:t})})]})}function Gt({children:e}){let t=Qr(()=>xe(e),[e]);return w("div",{className:"my-8",children:w(M.Tree,{items:t,"aria-label":"File Tree",className:c("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=>w(_t,{item:o})})})}import*as ie from"react-aria-components";import{useState as Ut,useMemo as jt}from"react";function qt({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,i]=Ut(null),[l,a]=Ut(1),s=jt(()=>{if(!e)return[];let b=[...e];return t&&n!==null&&b.sort((x,v)=>{let y=x[n.key],p=v[n.key],N=typeof y=="string"?y:"",A=typeof p=="string"?p:"";return N<A?n.direction==="asc"?-1:1:N>A?n.direction==="asc"?1:-1:0}),b},[e,n,t]),d=Math.ceil(s.length/r),m=jt(()=>{if(!o)return s;let b=(l-1)*r;return s.slice(b,b+r)},[s,o,l,r]);return{sortConfig:n,currentPage:l,setCurrentPage:a,totalPages:d,paginatedData:m,requestSort:b=>{if(!t)return;let x="asc";n&&n.key===b&&n.direction==="asc"&&(x="desc"),i({key:b,direction:x})}}}import{ChevronUp as ln,ChevronDown as Xt,ChevronLeft as cn,ChevronRight as dn,ChevronsLeft as mn,ChevronsRight as pn}from"lucide-react";import{Fragment as un,jsx as C,jsxs as J}from"react/jsx-runtime";function Kt({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:i=!1,pageSize:l=10}){let{sortConfig:a,currentPage:s,setCurrentPage:d,totalPages:m,paginatedData:g,requestSort:b}=qt({data:t,sortable:n,paginated:i,pageSize:l}),x=y=>n?a?.key!==y?C(Xt,{size:14,className:"ml-1 opacity-30"}):a.direction==="asc"?C(ln,{size:14,className:"ml-1 text-primary-400"}):C(Xt,{size:14,className:"ml-1 text-primary-400"}):null,v=o||J(un,{children:[e&&C("thead",{children:C("tr",{children:e.map((y,p)=>C("th",{onClick:()=>b(p),className:c("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:J("div",{className:"flex items-center",children:[y,x(p)]})},p))})}),g&&C("tbody",{children:g.map((y,p)=>C("tr",{className:"transition-colors hover:bg-bg-surface",children:y.map((N,A)=>C("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:N},A))},p))})]});return J("div",{className:c("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[C("div",{className:"overflow-x-auto",children:C("table",{className:"w-full border-collapse text-sm",children:v})}),i&&m>1&&J("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[J("span",{className:"text-xs text-text-muted",children:["Page ",s," of ",m]}),J("div",{className:"flex items-center gap-1",children:[C(ie.Button,{onPress:()=>d(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:C(mn,{size:16})}),C(ie.Button,{onPress:()=>d(y=>Math.max(y-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:C(cn,{size:16})}),C(ie.Button,{onPress:()=>d(y=>Math.min(y+1,m)),isDisabled:s===m,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:C(dn,{size:16})}),C(ie.Button,{onPress:()=>d(m),isDisabled:s===m,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:C(pn,{size:16})})]})]})]})}import{jsx as Q,jsxs as ae}from"react/jsx-runtime";function Zt({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:i,className:l=""}){return ae("article",{className:c("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",l),id:i,children:[ae("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[ae("div",{className:"flex flex-wrap items-center gap-2.5",children:[Q("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&&Q("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&&ae("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:[Q("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&ae("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:[Q("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),Q("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),Q("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}import{jsx as fn}from"react/jsx-runtime";function Jt({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),i=c("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return fn(D,{href:e,className:i,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}import{jsx as gn}from"react/jsx-runtime";function Qt({src:e,alt:t,theme:o,...r}){let{theme:n}=et();return o&&o!==n?null:gn("img",{src:e,alt:t||"",...r})}import{jsx as T,jsxs as le}from"react/jsx-runtime";function Yt({title:e,props:t,className:o=""}){return le("div",{className:c("my-6",o),children:[e&&T("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),T("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:le("table",{className:"w-full border-collapse text-sm",children:[T("thead",{children:le("tr",{children:[T("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"}),T("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"}),T("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"}),T("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"})]})}),T("tbody",{children:t.map((r,n)=>le("tr",{className:"transition-colors hover:bg-bg-surface",children:[le("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[T("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&&T("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),T("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:T("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),T("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?T("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):T("span",{className:"text-text-dim",children:"\u2014"})}),T("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}import{useMemo as eo}from"react";function to(e){let{code:t,children:o,preview:r}=e,n=eo(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),i=eo(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:i}}import{jsx as Oe,jsxs as bn}from"react/jsx-runtime";function oo(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:i={}}=e,{initialCode:l,previewElement:a}=to(e);return bn("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[Oe("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:a}),!o&&Oe("div",{className:"border-t border-border-subtle",children:Oe(z,{hideSandbox:r,hideCopy:n,title:i.title,lang:"tsx",highlightedHtml:t,children:l})})]})}import{useState as os}from"react";import{Copy as ao,Check as rs,ExternalLink as ns,ChevronDown as ss}from"lucide-react";import{useState as ql,useEffect as Xl}from"react";import{Button as Jl}from"react-aria-components";import{Search as Yl,Sun as ec,Moon as tc,ExternalLink as oc,ChevronDown as rc}from"lucide-react";import{jsx as ic,jsxs as ac}from"react/jsx-runtime";import*as ce from"react-aria-components";import{ChevronDown as dc}from"lucide-react";import{Fragment as bc,jsx as fc,jsxs as gc}from"react/jsx-runtime";import*as k from"react-aria-components";import{Search as vn,Hash as yn,FileText as Cn,CornerDownLeft as Rn}from"lucide-react";import{Fragment as Sn,jsx as R,jsxs as De}from"react/jsx-runtime";var Nn=({children:e,isOpen:t,onOpenChange:o,className:r})=>R(k.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:c("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:R(k.Modal,{className:c("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",r),children:R(k.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Pn=({children:e,className:t,onSelectionChange:o,...r})=>R("div",{className:t,children:R(k.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),wn=({className:e,...t})=>De(k.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[R(vn,{className:"h-5 w-5 text-text-muted"}),R(k.Input,{...t,className:c("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),R("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:R("kbd",{className:"font-sans",children:"ESC"})})]}),Tn=({children:e,className:t,...o})=>R(k.ListBox,{...o,className:c("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),kn=({children:e,className:t,...o})=>R(k.ListBoxItem,{...o,className:c("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:r=>De(Sn,{children:[e,(r.isFocused||r.isSelected)&&De("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[R("span",{className:"text-[10px]",children:"Select"}),R(Rn,{size:10})]})]})}),Ln=({isHeading:e,className:t})=>R("div",{className:c("shrink-0",t),children:e?R(yn,{size:18}):R(Cn,{size:18})}),An=({children:e,className:t})=>R("span",{className:c("block font-medium truncate flex-1 text-sm",t),children:e}),Bn=({children:e,className:t})=>R("span",{className:c("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),yc={Root:Nn,Autocomplete:Pn,Input:wn,List:Tn,Item:Object.assign(kn,{Icon:Ln,Title:An,Bio:Bn})};import{createContext as ro,use as Oc,useEffect as Mn,useImperativeHandle as In,useMemo as Vc,useRef as En,useState as On}from"react";import Dc from"scroll-into-view-if-needed";import{useEffect as wc,useRef as Tc}from"react";import{jsx as Dn}from"react/jsx-runtime";var Wc=ro(null),_c=ro(null);function Vn(e){let[t,o]=On({isOverflowing:!1,isAtBottom:!1});return Mn(()=>{let r=e.current;if(!r)return;let n=()=>{let l=r.scrollHeight>r.clientHeight,a=r.scrollHeight-r.scrollTop<=r.clientHeight+2;o({isOverflowing:l,isAtBottom:a})};n(),r.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n);let i=new MutationObserver(n);return i.observe(r,{childList:!0,subtree:!0}),()=>{r.removeEventListener("scroll",n),window.removeEventListener("resize",n),i.disconnect()}},[e]),t}var Hn=({children:e,className:t,ref:o,...r})=>{let n=En(null);In(o,()=>n.current);let{isOverflowing:i,isAtBottom:l}=Vn(n);return Dn("div",{ref:n,className:c("relative overflow-y-auto boltdocs-otp-content",i&&!l&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...r,children:e})};Hn.displayName="OnThisPageContent";import*as no from"react-aria-components";import{ChevronLeft as zn,ChevronRight as Fn}from"lucide-react";import{Fragment as qn,jsx as U,jsxs as jn}from"react/jsx-runtime";var $n=({children:e,className:t})=>U("nav",{className:c("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),Wn=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return jn(no.Link,{href:t,className:c("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",n?"text-right justify-end":"text-left justify-start",r),children:[!n&&U(zn,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),U("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&U(Fn,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},_n=({children:e,className:t})=>U("span",{className:c("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Gn=({children:e,className:t})=>U("span",{className:c("text-base font-bold text-text-main truncate",t),children:e}),Un=({children:e})=>U(qn,{children:e}),Kc={PageNavRoot:$n,PageNavLink:Object.assign(Wn,{Title:_n,Description:Gn,Icon:Un})};import{jsx as od}from"react/jsx-runtime";import*as Xn from"react-aria-components";import{ChevronRight as id}from"lucide-react";import{jsx as dd,jsxs as md}from"react/jsx-runtime";import{Breadcrumb as fd,Breadcrumbs as gd,Link as bd}from"react-aria-components";import{ChevronRight as hd}from"lucide-react";import{jsx as Rd}from"react/jsx-runtime";import{jsx as Kn}from"react/jsx-runtime";var so=({children:e,className:t,vertical:o=!1})=>Kn("div",{className:c("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});import{Check as Jn,ChevronRight as Qn,Dot as Yn}from"lucide-react";import es from"react";import*as L from"react-aria-components";import*as Y from"react-aria-components";import{jsx as ze,jsxs as Zn}from"react/jsx-runtime";var io=({children:e,className:t,showArrow:o,...r})=>Zn(Y.Popover,{offset:8,...r,className:Y.composeRenderProps(t,n=>c("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards",n)),children:[o&&ze(Y.OverlayArrow,{className:"group",children:ze("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:ze("path",{d:"M0 0 L6 6 L12 0"})})}),e]});import{Fragment as ts,jsx as j,jsxs as Fe}from"react/jsx-runtime";function Ve(e){let[t,o]=es.Children.toArray(e.children).slice(0,2);return Fe(L.MenuTrigger,{...e,children:[t,j(io,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function He(e){return j(L.Menu,{...e,className:L.composeRenderProps(e.className,t=>c("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function he(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return j(L.MenuItem,{...e,textValue:t,className:L.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:i})=>c("group relative flex flex-row items-center gap-2.5 px-3 py-1.5 rounded-lg outline-none cursor-default transition-all duration-200","text-text-main text-[0.8125rem]",r&&"bg-primary-500/10 text-primary-600 shadow-sm",n&&"scale-[0.98] bg-primary-500/15",i&&"opacity-40 grayscale pointer-events-none",o)),children:L.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:i})=>Fe(ts,{children:[r!=="none"&&Fe("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[n&&r==="multiple"&&j(Jn,{className:"w-3.5 h-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&j(Yn,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),j("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),i&&j(Qn,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}import{Separator as xn,ToggleButton as hn}from"react-aria-components";import{jsx as I,jsxs as de}from"react/jsx-runtime";var is=e=>{let[t,o]=os(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let i=new Blob([e],{type:"text/plain;charset=utf-8"}),l=URL.createObjectURL(i);window.open(l,"_blank")}}};function lo({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:i,handleOpenRaw:l}=is(r),a=o!==!1,s=typeof o=="object"&&o.text||"Copy Markdown";return!a||!r?null:I("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:de(so,{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:[I(K,{variant:"ghost",onPress:i,icon:n?I(rs,{size:16}):I(ao,{size:16}),iconPosition:"left",className:c("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}),de(Ve,{placement:"bottom end",children:[I(K,{variant:"ghost",isIconOnly:!0,icon:I(ss,{size:14}),className:c("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")}),de(He,{className:"w-52",children:[de(he,{onAction:i,className:"flex flex-row items-start gap-2.5 group",children:[I(ao,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),I("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),de(he,{onAction:l,className:"flex flex-row items-start gap-2.5 group",children:[I(ns,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),I("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}import{useEffect as as,useState as ls}from"react";import{jsx as _,jsxs as We}from"react/jsx-runtime";function co(){let[e,t]=ls(0);as(()=>{let r=0,n=!0,i=setInterval(()=>{n?(r+=1,r>=100&&(r=100,n=!1)):(r-=1,r<=0&&(r=0,n=!0)),t(r)},20);return()=>clearInterval(i)},[]);let o=`inset(${100-e}% 0 0 0)`;return _("div",{className:"flex flex-col items-center justify-center min-h-[60vh] p-4 text-center",children:_("div",{className:"relative group",children:We("div",{className:"relative inline-block",children:[We("svg",{className:"w-24 h-auto opacity-10 filter grayscale brightness-50",viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[_("title",{children:"Loading indicator background"}),_("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),_("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]}),We("svg",{className:"absolute top-0 left-0 w-24 h-auto text-primary-500 drop-shadow-[0_0_20px_rgba(var(--primary-rgb),0.5)] transition-[clip-path] duration-100 ease-linear",style:{clipPath:o},viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[_("title",{children:"Loading indicator animated fill"}),_("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),_("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]})]})})})}import{jsx as V,jsxs as ds}from"react/jsx-runtime";var ee=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return ds(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&V("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:V(cs,{size:16})})]})},mo={...$e,Loading:co,h1:e=>V(ee,{level:1,...e}),h2:e=>V(ee,{level:2,...e}),h3:e=>V(ee,{level:3,...e}),h4:e=>V(ee,{level:4,...e}),h5:e=>V(ee,{level:5,...e}),h6:e=>V(ee,{level:6,...e}),pre:e=>V(z,{...e,children:e.children})};import{useLocation as ps}from"react-router-dom";import{Fragment as gs,jsx as h,jsxs as ve}from"react/jsx-runtime";function us(){let{currentLocale:e,config:t}=te();return Ge(()=>{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 fs(){let e=ps(),{config:t}=te(),o=E(l=>l.setLocale),r=E(l=>l.setVersion),n=E(l=>l.currentLocale),i=E(l=>l.currentVersion);return Ge(()=>{let l=e.pathname.split("/").filter(Boolean),a=0,s=t.versions?.defaultVersion,d=t.i18n?.defaultLocale;if(l[a]==="docs"&&a++,t.versions&&l.length>a){let m=t.versions.versions.find(g=>g.path===l[a]);m&&(s=m.path,a++)}t.i18n&&l.length>a&&t.i18n.locales[l[a]]?d=l[a]:t.i18n&&l.length===0&&(d=n||t.i18n.defaultLocale),d!==n&&o(d),s!==i&&r(s)},[e.pathname,t,o,r,n,i]),null}function fo({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:i,externalPages:l,components:a={}}){let[s,d]=po(e),[m,g]=po(t),b=l||{},x=uo(()=>s.filter(p=>!(i&&(p.path==="/"||p.path===""))&&!b[p.path===""?"/":p.path]).map(p=>{let N=Object.keys(r).find(B=>B===`/${o}/${p.filePath}`||B.endsWith(`/${o}/${p.filePath}`)||B.endsWith(`/${o}\\${p.filePath.replace(/\\/g,"/")}`)),A=N?r[N]:null;return{...p,Component:_e.lazy(async()=>A?await A():{default:Re})}}),[s,r,o,i,b]);Ge(()=>{n&&(n.on("boltdocs:routes-update",p=>{d(p)}),n.on("boltdocs:config-update",p=>{g(p)}))},[n]);let v=uo(()=>({...mo,...a}),[a]),y=v.Loading;return h(Ye,{children:h(at,{components:v,children:h(ye.Provider,{value:m,children:h(tt,{children:ve(qe,{routes:s,modules:r,children:[h(ot,{}),h(fs,{}),h(us,{}),ve(ms,{children:[h(q,{element:h(nt,{}),children:x.map(p=>h(q,{path:p.path===""?"/":p.path,element:h(_e.Suspense,{fallback:h(y,{}),children:h(ct,{Component:p.Component})})},p.path))},"docs-layout"),i&&ve(gs,{children:[h(q,{path:"/",element:h(me,{children:h(i,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(p=>h(q,{path:`/${p}`,element:h(me,{children:h(i,{})})},`home-${p}`))]}),Object.entries(b).map(([p,N])=>{let A=p==="/"?"":p;return ve(_e.Fragment,{children:[h(q,{path:p,element:h(me,{children:h(N,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(B=>h(q,{path:`/${B}${A}`,element:h(me,{children:h(N,{})})},`${p}-${B}`))]},p)}),h(q,{path:"*",element:h(me,{children:h(Re,{})})})]})]})})})})})}import{jsx as Ue}from"react/jsx-runtime";async function ap(e){let{path:t,routes:o,config:r,modules:n,homePage:i,externalPages:l,docsDirName:a}=e,s={};for(let[m,g]of Object.entries(n))s[m]=()=>Promise.resolve(g);return xs.renderToString(Ue(bs.StrictMode,{children:Ue(hs,{location:t,children:Ue(fo,{initialRoutes:o,initialConfig:r,docsDirName:a,modules:s,homePage:i,externalPages:l})})}))}export{ap as render};
1
+ var ho=Object.defineProperty;var vo=(e,t)=>{for(var o in t)ho(e,o,{get:t[o],enumerable:!0})};import bs from"react";import xs from"react-dom/server";import{StaticRouter as hs}from"react-router-dom/server";import _e,{useEffect as Ue,useState as uo,useMemo as fo}from"react";import Wm from"react-dom/client";import{BrowserRouter as _m,Routes as ms,Route as K}from"react-router-dom";import{ArrowLeft as Vo}from"lucide-react";import Ke from"react";import{Link as Io}from"react-aria-components";import{useLocation as Eo}from"react-router-dom";import{createContext as yo,use as Co}from"react";var Re=yo(null);function z(){let e=Co(Re);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}import{useLocation as Bo}from"react-router-dom";import{createContext as Ro,use as No,useCallback as Po,useRef as wo}from"react";import{jsx as To}from"react/jsx-runtime";var qe=Ro({preload:()=>{},routes:[]});function ge(){return No(qe)}function Xe({routes:e,modules:t,children:o}){let r=wo(null),n=Po(a=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let l=a.split("#")[0].split("?")[0],i=e.find(s=>s.path===l||l==="/"&&s.path==="");if(i?.filePath){let s=Object.keys(t).find(d=>d.endsWith("/"+i.filePath));s&&t[s]().catch(d=>{console.error(`[boltdocs] Failed to preload route ${a}:`,d)})}},100)},[e,t]);return To(qe.Provider,{value:{preload:n,routes:e},children:o})}import{create as ko}from"zustand";import{persist as Lo,createJSONStorage as Ao}from"zustand/middleware";var V=ko()(Lo(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:Ao(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function re(){let{routes:e}=ge(),t=z(),o=Bo(),r=V(p=>p.currentLocale),n=V(p=>p.currentVersion),a=V(p=>p.hasHydrated),l=e.find(p=>p.path===o.pathname),i=t.i18n?l?.locale||(a?r:void 0)||t.i18n.defaultLocale:void 0,s=t.versions?l?.version||(a?n:void 0)||t.versions.defaultVersion:void 0,d=e.filter(p=>{let N=t.i18n?(p.locale||t.i18n.defaultLocale)===i:!0,S=t.versions?(p.version||t.versions.defaultVersion)===s:!0;if(!(N&&S))return!1;let M=t.i18n;if(M){let bo=!!l?.locale,xo=!!p.locale;if(e.some(fe=>fe!==p&&fe.filePath===p.filePath&&fe.version===p.version&&(fe.locale||M.defaultLocale)===(p.locale||M.defaultLocale))&&bo!==xo)return!1}return!0}),g=t.i18n?.localeConfigs?.[i]?.label||t.i18n?.locales[i]||i,x=t.versions?.versions.find(p=>p.path===s)?.label||s,v=t.i18n?Object.entries(t.i18n.locales).map(([p,N])=>{let S=t.i18n?.localeConfigs?.[p];return{key:p,label:S?.label||N,isCurrent:p===i}}):[],y=t.versions?t.versions.versions.map(p=>({key:p.path,label:p.label,isCurrent:p.path===s})):[];return{routes:d,allRoutes:e,currentRoute:l,currentLocale:i,currentLocaleLabel:g,availableLocales:v,currentVersion:s,currentVersionLabel:x,availableVersions:y,config:t}}function Ne(e){let t=z(),{currentLocale:o,currentVersion:r}=re();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 l=e.startsWith("/docs"),i=e.split("/").filter(Boolean),s=0;i[s]==="docs"&&s++,a&&i.length>s&&a.versions.find(x=>x.path===i[s])&&s++,n&&i.length>s&&n.locales[i[s]]&&s++;let d=i.slice(s),m=[];l&&(m.push("docs"),a&&r&&m.push(r)),n&&o&&o!==n.defaultLocale&&m.push(o),m.push(...d);let g=`/${m.join("/")}`;return g.length>1&&g.endsWith("/")?g.slice(0,-1):g||"/"}import{clsx as So}from"clsx";import{twMerge as Mo}from"tailwind-merge";function c(...e){return Mo(So(e))}import{jsx as Ze}from"react/jsx-runtime";var F=Ke.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:a,...l}=e,i=Ne(o??""),{preload:s}=ge();return Ze(Io,{...l,ref:t,href:i,onMouseEnter:g=>{n?.(g),r==="hover"&&typeof i=="string"&&i.startsWith("/")&&s(i)},onFocus:g=>{a?.(g),r==="hover"&&typeof i=="string"&&i.startsWith("/")&&s(i)}})});F.displayName="Link";var Oo=Ke.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:a,...l}=e,i=Eo(),s=Ne(o??""),d=r?i.pathname===s:i.pathname.startsWith(s),m=typeof n=="function"?n({isActive:d}):c(n,d&&"active"),g=typeof a=="function"?a({isActive:d}):a;return Ze(F,{...l,ref:t,href:o,className:m,children:g})});Oo.displayName="NavLink";import{jsx as ne,jsxs as Je}from"react/jsx-runtime";function Pe(){return ne("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:Je("div",{className:"space-y-4",children:[ne("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),ne("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),ne("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."}),Je(F,{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:[ne(Vo,{size:16})," Go to Home"]})]})})}import{createContext as Ho,use as Do,useEffect as Qe,useState as we}from"react";import{jsx as zo}from"react/jsx-runtime";var Ye=Ho(void 0);function et({children:e}){let[t,o]=we("system"),[r,n]=we("dark"),[a,l]=we(!1);Qe(()=>{l(!0);let s=localStorage.getItem("boltdocs-theme"),d=s==="light"||s==="dark"||s==="system"?s:"system";o(d);let m=window.matchMedia("(prefers-color-scheme: dark)");((x,v)=>{n(x==="system"?v?"dark":"light":x)})(d,m.matches);let b=x=>{n(v=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?x.matches?"dark":"light":v)};return m.addEventListener("change",b),()=>m.removeEventListener("change",b)},[]),Qe(()=>{if(!a)return;let s=window.matchMedia("(prefers-color-scheme: dark)").matches,d=t==="system"?s?"dark":"light":t;n(d);let m=document.documentElement;d==="light"?(m.classList.add("theme-light"),m.dataset.theme="light"):(m.classList.remove("theme-light"),m.dataset.theme="dark")},[t,a]);let i=s=>{o(s),localStorage.setItem("boltdocs-theme",s)};return zo(Ye.Provider,{value:{theme:t,resolvedTheme:r,setTheme:i},children:e})}function tt(){let e=Do(Ye);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}import ue from"virtual:boltdocs-layout";import{startTransition as Fo}from"react";import{RouterProvider as $o}from"react-aria-components";import{useNavigate as Wo,useHref as Go}from"react-router-dom";import{jsx as _o}from"react/jsx-runtime";function ot({children:e}){let t=Wo();return _o($o,{navigate:(o,r)=>{Fo(()=>{t(o,r)})},useHref:Go,children:e})}import{useLayoutEffect as Uo}from"react";import{useLocation as jo}from"react-router-dom";function rt(){let{pathname:e,hash:t}=jo();return Uo(()=>{let o=document.querySelector(".boltdocs-content");if(o){if(t){let r=t.replace("#",""),n=document.getElementById(r);if(n){let l=o.getBoundingClientRect().top,d=n.getBoundingClientRect().top-l-80+o.scrollTop;o.scrollTo({top:d,behavior:"smooth"});return}}o.scrollTo(0,0)}},[e,t]),null}import{Outlet as qo}from"react-router-dom";import Xo from"virtual:boltdocs-layout";import{jsx as nt}from"react/jsx-runtime";function st(){return nt(Xo,{children:nt(qo,{})})}import{MDXProvider as Qo}from"@mdx-js/react";import{createContext as Ko,useContext as Zo}from"react";import{jsx as Jo}from"react/jsx-runtime";var at=Ko({});function it(){return Zo(at)}function lt({components:e,children:t}){return Jo(at.Provider,{value:e,children:t})}import{jsx as ct}from"react/jsx-runtime";function dt({Component:e}){let t=it();return ct(Qo,{components:t,children:ct(e,{})})}import{Link as cs}from"lucide-react";var Ge={};vo(Ge,{Admonition:()=>H,Badge:()=>Lt,Button:()=>mt,Card:()=>It,Cards:()=>Mt,Caution:()=>Wt,CodeBlock:()=>$,ComponentPreview:()=>ro,ComponentProps:()=>eo,CopyMarkdown:()=>co,Danger:()=>zt,Field:()=>Jt,FileTree:()=>Ut,Image:()=>Yt,Important:()=>$t,InfoBox:()=>Ft,Link:()=>Qt,List:()=>Gt,Note:()=>Vt,Tab:()=>Pt,Table:()=>Zt,Tabs:()=>wt,Tip:()=>Ht,Video:()=>kt,Warning:()=>Dt});import*as xe from"react-aria-components";import{cva as Yo}from"class-variance-authority";import{Fragment as er,jsx as Z,jsxs as tr}from"react/jsx-runtime";var be=Yo("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"}}),J=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:a,variant:l,size:i,rounded:s,iconSize:d,disabled:m,...g})=>{let b=r||!n&&!!t,x=b?Z("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):tr(er,{children:[t&&o==="left"&&Z("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),Z("span",{className:"flex items-center",children:n}),t&&o==="right"&&Z("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?Z(xe.Link,{href:e,className:c(be({variant:l,size:i,rounded:s,iconSize:b?d:void 0,disabled:m}),a),...g,children:x}):Z(xe.Button,{className:c(be({variant:l,size:i,rounded:s,iconSize:b?d:void 0,disabled:m}),a),...g,children:x})};import{jsx as or}from"react/jsx-runtime";var mt=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:a,...l})=>or(J,{className:c("group",be({variant:t,size:o,rounded:r,iconSize:n,disabled:a,className:e})),...l});import*as he from"react-aria-components";import{Copy as mr,Check as pr}from"lucide-react";import{getParameters as pt}from"codesandbox/lib/api/define.js";function ut(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",a=e.description||"Generic Sandbox",l={};for(let[i,s]of Object.entries(t)){let d=typeof s.content=="object"?JSON.stringify(s.content,null,2):s.content;l[i]={content:d,isBinary:s.isBinary??!1}}if(!l["package.json"]){let s=e.template==="vite"||!!r.vite||!!r["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};l["package.json"]={content:JSON.stringify({private:!0,name:n,description:a,type:"module",version:"1.0.0",scripts:e.scripts||s,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return l}function rr(e){let t=ut(e),o=pt({files:t}),r=new URLSearchParams({parameters:o,installDependencies:"true"});return e.entry&&r.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${r.toString()}`,options:e}}function ft(e){if(typeof window>"u")return rr(e);let t=ut(e),o=pt({files:t}),r=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let a=(i,s)=>{let d=document.createElement("input");d.type="hidden",d.name=i,d.value=s,n.appendChild(d)},l=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return a("query",l.toString()),a("parameters",o),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${o}`,options:e}}var gt=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 bt,useEffect as nr,useRef as sr,useState as Te}from"react";function xt(e){let{title:t,sandbox:o}=e,[r,n]=Te(!1),[a,l]=Te(!1),[i,s]=Te(!1),d=sr(null),m=z(),g=bt(async()=>{let x=d.current?.textContent??"";gt(x),n(!0),setTimeout(()=>n(!1),2e3)},[]),b=bt(()=>{let x=d.current?.textContent??"",v=m?.integrations?.sandbox?.config||{},y=typeof o=="object"?o:v,p=y.entry||"src/App.tsx";ft({title:t??"Code Snippet",...y,files:{...y.files,[p]:{content:x}}})},[t,m,o]);return nr(()=>{let x=d.current?.textContent?.length??0;s(x>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:a,setIsExpanded:l,isExpandable:i,preRef:d,handleCopy:g,handleSandbox:b,shouldTruncate:i&&!a}}import{jsx as ht,jsxs as lr}from"react/jsx-runtime";function ar(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var vt=e=>lr("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...ar(e),children:[ht("title",{children:"CodeSandbox"}),ht("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});import*as Q from"react-aria-components";import{Fragment as dr,jsx as se,jsxs as ke}from"react/jsx-runtime";var cr=({className:e,children:t,...o})=>se(Q.Tooltip,{...o,offset:8,className:r=>c("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=>ke(dr,{children:[se(Q.OverlayArrow,{children:ke("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:[se("title",{children:"Arrow"}),se("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),Le=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>ke(Q.TooltipTrigger,{delay:o,closeDelay:r,children:[t,se(cr,{...n,children:e})]});import{jsx as I,jsxs as yt}from"react/jsx-runtime";function $(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:a,...l}=e,d=!!z()?.integrations?.sandbox?.enable&&!r,{copied:m,isExpanded:g,setIsExpanded:b,isExpandable:x,preRef:v,handleCopy:y,handleSandbox:p,shouldTruncate:N}=xt(e);return yt("div",{className:c("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",N&&"[&>pre]:max-h-[250px] [&>pre]:overflow-hidden"),children:[yt("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:[d&&I(Le,{content:"Open in CodeSandbox",children:I(he.Button,{onPress:p,className:"grid place-items-center w-8 h-8 bg-transparent text-text-muted outline-none cursor-pointer transition-all duration-200 hover:scale-115 hover:text-sky-400 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2","aria-label":"Open in CodeSandbox",children:I(vt,{size:20})})}),!n&&I(Le,{content:m?"Copied!":"Copy code",children:I(he.Button,{onPress:y,className:c("grid place-items-center w-8 h-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-115 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2",m?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:m?I(pr,{size:20}):I(mr,{size:20})})})]}),a?I("div",{ref:v,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:a}}):I("pre",{ref:v,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...l,children:t}),x&&I("div",{className:c(N?"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:I(he.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 br,isValidElement as xr,useMemo as hr}from"react";import*as G from"react-aria-components";import{useState as Ct,useRef as ur,useEffect as fr,useCallback as gr}from"react";function Rt({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[r,n]=Ct(o===-1?0:o),a=ur([]),[l,i]=Ct({opacity:0,transform:"translateX(0)",width:0});fr(()=>{let d=a.current[r];d&&i({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[r,t]);let s=gr(d=>{let m=0;if(d.key==="ArrowRight"?m=1:d.key==="ArrowLeft"&&(m=-1),m!==0){let g=(r+m+t.length)%t.length;for(;t[g].props.disabled&&g!==r;)g=(g+m+t.length)%t.length;g!==r&&!t[g].props.disabled&&(n(g),a.current[g]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:a,indicatorStyle:l,handleKeyDown:s}}import{cva as Nt}from"class-variance-authority";import{jsx as W,jsxs as Ae}from"react/jsx-runtime";var vr=Nt("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"}}),yr=Nt("flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap",{variants:{isActive:{true:"text-primary-500",false:"text-text-muted hover:text-text-main"},isDisabled:{true:"opacity-40 pointer-events-none",false:""}},defaultVariants:{isActive:!1,isDisabled:!1}});function Pt({children:e}){let t=typeof e=="string"?W($,{className:"language-bash",children:W("code",{children:e.trim()})}):e;return W("div",{className:"py-4",children:t})}function wt({defaultIndex:e=0,children:t}){let o=hr(()=>br.toArray(t).filter(i=>xr(i)&&i.props?.label),[t]),{active:r,setActive:n,tabRefs:a,indicatorStyle:l}=Rt({initialIndex:e,tabs:o});return W("div",{className:"my-8 w-full group/tabs",children:Ae(G.Tabs,{selectedKey:r.toString(),onSelectionChange:i=>n(Number(i)),className:"w-full",children:[Ae(G.TabList,{"aria-label":"Content Tabs",className:c(vr()),children:[o.map((i,s)=>{let{label:d,icon:m,disabled:g}=i.props,b=s.toString();return Ae(G.Tab,{id:b,isDisabled:g,ref:x=>{a.current[s]=x},className:({isSelected:x,isDisabled:v})=>c(yr({isActive:x,isDisabled:v})),children:[!!m&&W("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:m}),W("span",{children:d})]},b)}),W("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:l,"aria-hidden":"true"})]}),o.map((i,s)=>W(G.TabPanel,{id:s.toString(),children:o[s]},s))]})})}import{useRef as Cr,useState as Rr,useEffect as Nr}from"react";import{jsx as Tt,jsxs as Pr}from"react/jsx-runtime";function kt({src:e,poster:t,alt:o,children:r,controls:n,preload:a="metadata",...l}){let i=Cr(null),[s,d]=Rr(!1);return Nr(()=>{let m=i.current;if(!m)return;let g=new IntersectionObserver(([b])=>{b.isIntersecting&&(d(!0),g.disconnect())},{rootMargin:"200px"});return g.observe(m),()=>g.disconnect()},[]),Tt("div",{ref:i,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:s?Pr("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...l,children:[r,"Your browser does not support the video tag."]}):Tt("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}import{cva as wr}from"class-variance-authority";import{jsx as kr}from"react/jsx-runtime";var Tr=wr("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 Lt({variant:e="default",children:t,className:o="",...r}){return kr("span",{className:c(Tr({variant:e}),o),...r,children:t})}import{useCallback as Lr,useRef as At}from"react";import*as St from"react-aria-components";import{cva as Ar}from"class-variance-authority";import{Fragment as Sr,jsx as U,jsxs as Bt}from"react/jsx-runtime";var Br=Ar("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 Mt({cols:e=3,children:t,className:o="",...r}){return U("div",{className:c(Br({cols:e}),o),...r,children:t})}function It({title:e,icon:t,href:o,children:r,className:n="",...a}){let l=At(null),i=At(null),s=Lr(g=>{let b=l.current||i.current;if(!b)return;let{left:x,top:v}=b.getBoundingClientRect();b.style.setProperty("--x",`${g.clientX-x}px`),b.style.setProperty("--y",`${g.clientY-v}px`)},[]),d=Bt(Sr,{children:[U("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&&U("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}),Bt("div",{className:"space-y-1.5",children:[e&&U("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&U("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),m=c("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?U(St.Link,{ref:i,href:o,className:c(m,"no-underline cursor-pointer"),onMouseMove:s,...a,children:d}):U("div",{ref:l,role:"presentation",className:m,onMouseMove:s,...a,children:d})}import{Info as Mr,Lightbulb as Ir,AlertTriangle as Er,ShieldAlert as Or,Bookmark as Vr,Zap as Hr,Flame as Dr}from"lucide-react";import{cva as zr}from"class-variance-authority";import{jsx as P,jsxs as Ot}from"react/jsx-runtime";var Fr={note:P(Vr,{size:18}),tip:P(Ir,{size:18}),info:P(Mr,{size:18}),warning:P(Er,{size:18}),danger:P(Or,{size:18}),important:P(Dr,{size:18}),caution:P(Hr,{size:18})},$r={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},Et=zr("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 H({type:e="note",title:t,children:o,className:r="",...n}){return Ot("div",{className:c(Et({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[Ot("div",{className:"flex items-center flex-row gap-2 mb-2",children:[P("span",{className:c("shrink-0",Et({type:e})),children:Fr[e]}),P("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||$r[e]})]}),P("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var Vt=e=>P(H,{type:"note",...e}),Ht=e=>P(H,{type:"tip",...e}),Dt=e=>P(H,{type:"warning",...e}),zt=e=>P(H,{type:"danger",...e}),Ft=e=>P(H,{type:"info",...e}),$t=e=>P(H,{type:"important",...e}),Wt=e=>P(H,{type:"caution",...e});import{Children as Wr,isValidElement as Gr}from"react";import{Check as _r,ChevronRight as Ur,Circle as jr}from"lucide-react";import{cva as Be}from"class-variance-authority";import{jsx as _,jsxs as Qr}from"react/jsx-runtime";var qr=Be("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}}),Xr=Be("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}}),Kr=Be("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 Zr({icon:e,children:t,variant:o,dense:r}){return Qr("li",{className:c(Xr({variant:o,dense:r})),children:[e&&_("span",{className:c(Kr({variant:o==="bubble"?"bubble":"default"})),children:e}),_("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Jr={checked:e=>_(_r,{size:14,className:c("text-emerald-500 shrink-0",e)}),arrow:e=>_(Ur,{size:14,className:c("text-primary-400 shrink-0",e)}),bubble:e=>_(jr,{size:6,fill:"currentColor",className:c("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function Gt({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...a}){let l=t!==void 0&&Number(t)>1,i=Jr[e],s=qr({variant:e,cols:t,dense:o,isGrid:l,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?_(d,{className:s,...a,children:r}):_("ul",{className:s,...a,children:Wr.map(r,m=>{if(!Gr(m))return m;let g=m,b=g.type==="li"?g.props.children:g.props.children||m;return _(Zr,{icon:i(),variant:e,dense:o,children:b})})})}import{Children as Se,isValidElement as Ve,useMemo as Yr}from"react";import*as E from"react-aria-components";import{Folder as en,FileText as tn,File as on,FileCode as rn,FileImage as nn,ChevronRight as sn}from"lucide-react";import{jsx as w,jsxs as Ee}from"react/jsx-runtime";var ae=16,ie=2,Me={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 Oe(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(Oe).join(""):Ve(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?Oe(e.props.children):""}function an(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return w(en,{size:ae,strokeWidth:ie,className:c(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=c(r,"text-text-dim group-hover:text-text-main");return Me.CODE.test(o)?w(rn,{size:ae,strokeWidth:ie,className:n}):Me.TEXT.test(o)?w(tn,{size:ae,strokeWidth:ie,className:n}):Me.IMAGE.test(o)?w(nn,{size:ae,strokeWidth:ie,className:n}):w(on,{size:ae,strokeWidth:ie,className:n})}function Ie(e,t){if(!Ve(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 ln(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function ve(e,t="root"){if(!Ve(e))return[];let o=[];if(Ie(e,"ul"))return Se.forEach(e.props.children,(r,n)=>{o.push(...ve(r,`${t}-${n}`))}),o;if(Ie(e,"li")){let r=Se.toArray(e.props.children),n=r.findIndex(v=>Ie(v,"ul")),a=n!==-1,l=a?r.slice(0,n):r,i=a?r.slice(n):[],s=Oe(l),{name:d,comment:m}=ln(s),g=d.endsWith("/"),b=g?d.slice(0,-1):d,x=a||g;return o.push({id:`${t}-${b}`,name:b,comment:m,isFolder:x,children:a?ve(i[0],`${t}-${b}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&Se.forEach(e.props.children,(r,n)=>{o.push(...ve(r,`${t}-${n}`))}),o}function _t({item:e}){return Ee(E.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(E.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>Ee("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"}),o?w(E.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:w(sn,{size:14,strokeWidth:3,className:c("transition-transform duration-200",t&&"rotate-90")})}):w("div",{className:"w-[18px]"}),an(e.name,e.isFolder),w("span",{className:c("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&&Ee("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(E.Collection,{items:e.children,children:t=>w(_t,{item:t})})]})}function Ut({children:e}){let t=Yr(()=>ve(e),[e]);return w("div",{className:"my-8",children:w(E.Tree,{items:t,"aria-label":"File Tree",className:c("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=>w(_t,{item:o})})})}import*as le from"react-aria-components";import{useState as jt,useMemo as qt}from"react";function Xt({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,a]=jt(null),[l,i]=jt(1),s=qt(()=>{if(!e)return[];let b=[...e];return t&&n!==null&&b.sort((x,v)=>{let y=x[n.key],p=v[n.key],N=typeof y=="string"?y:"",S=typeof p=="string"?p:"";return N<S?n.direction==="asc"?-1:1:N>S?n.direction==="asc"?1:-1:0}),b},[e,n,t]),d=Math.ceil(s.length/r),m=qt(()=>{if(!o)return s;let b=(l-1)*r;return s.slice(b,b+r)},[s,o,l,r]);return{sortConfig:n,currentPage:l,setCurrentPage:i,totalPages:d,paginatedData:m,requestSort:b=>{if(!t)return;let x="asc";n&&n.key===b&&n.direction==="asc"&&(x="desc"),a({key:b,direction:x})}}}import{ChevronUp as cn,ChevronDown as Kt,ChevronLeft as dn,ChevronRight as mn,ChevronsLeft as pn,ChevronsRight as un}from"lucide-react";import{Fragment as fn,jsx as C,jsxs as Y}from"react/jsx-runtime";function Zt({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:a=!1,pageSize:l=10}){let{sortConfig:i,currentPage:s,setCurrentPage:d,totalPages:m,paginatedData:g,requestSort:b}=Xt({data:t,sortable:n,paginated:a,pageSize:l}),x=y=>n?i?.key!==y?C(Kt,{size:14,className:"ml-1 opacity-30"}):i.direction==="asc"?C(cn,{size:14,className:"ml-1 text-primary-400"}):C(Kt,{size:14,className:"ml-1 text-primary-400"}):null,v=o||Y(fn,{children:[e&&C("thead",{children:C("tr",{children:e.map((y,p)=>C("th",{onClick:()=>b(p),className:c("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:Y("div",{className:"flex items-center",children:[y,x(p)]})},p))})}),g&&C("tbody",{children:g.map((y,p)=>C("tr",{className:"transition-colors hover:bg-bg-surface",children:y.map((N,S)=>C("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:N},S))},p))})]});return Y("div",{className:c("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[C("div",{className:"overflow-x-auto",children:C("table",{className:"w-full border-collapse text-sm",children:v})}),a&&m>1&&Y("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[Y("span",{className:"text-xs text-text-muted",children:["Page ",s," of ",m]}),Y("div",{className:"flex items-center gap-1",children:[C(le.Button,{onPress:()=>d(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:C(pn,{size:16})}),C(le.Button,{onPress:()=>d(y=>Math.max(y-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:C(dn,{size:16})}),C(le.Button,{onPress:()=>d(y=>Math.min(y+1,m)),isDisabled:s===m,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:C(mn,{size:16})}),C(le.Button,{onPress:()=>d(m),isDisabled:s===m,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:C(un,{size:16})})]})]})]})}import{jsx as ee,jsxs as ce}from"react/jsx-runtime";function Jt({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:a,className:l=""}){return ce("article",{className:c("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",l),id:a,children:[ce("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[ce("div",{className:"flex flex-wrap items-center gap-2.5",children:[ee("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&&ee("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&&ce("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:[ee("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&ce("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:[ee("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),ee("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),ee("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}import{jsx as gn}from"react/jsx-runtime";function Qt({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=c("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return gn(F,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}import{jsx as bn}from"react/jsx-runtime";function Yt({src:e,alt:t,theme:o,...r}){let{theme:n}=tt();return o&&o!==n?null:bn("img",{src:e,alt:t||"",...r})}import{jsx as T,jsxs as de}from"react/jsx-runtime";function eo({title:e,props:t,className:o=""}){return de("div",{className:c("my-6",o),children:[e&&T("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),T("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:de("table",{className:"w-full border-collapse text-sm",children:[T("thead",{children:de("tr",{children:[T("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"}),T("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"}),T("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"}),T("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"})]})}),T("tbody",{children:t.map((r,n)=>de("tr",{className:"transition-colors hover:bg-bg-surface",children:[de("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[T("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&&T("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),T("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:T("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),T("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?T("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):T("span",{className:"text-text-dim",children:"\u2014"})}),T("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}import{useMemo as to}from"react";function oo(e){let{code:t,children:o,preview:r}=e,n=to(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),a=to(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:a}}import{jsx as He,jsxs as xn}from"react/jsx-runtime";function ro(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:a={}}=e,{initialCode:l,previewElement:i}=oo(e);return xn("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[He("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:i}),!o&&He("div",{className:"border-t border-border-subtle",children:He($,{hideSandbox:r,hideCopy:n,title:a.title,lang:"tsx",highlightedHtml:t,children:l})})]})}import{useState as rs}from"react";import{Copy as lo,Check as ns,ExternalLink as ss,ChevronDown as as}from"lucide-react";import{useState as ql,useEffect as Xl}from"react";import{Button as Jl}from"react-aria-components";import{Search as Yl,Sun as ec,Moon as tc,ExternalLink as oc,ChevronDown as rc}from"lucide-react";import{jsx as ac,jsxs as ic}from"react/jsx-runtime";import*as me from"react-aria-components";import{ChevronDown as dc}from"lucide-react";import{Fragment as bc,jsx as fc,jsxs as gc}from"react/jsx-runtime";import*as k from"react-aria-components";import{Search as yn,Hash as Cn,FileText as Rn,CornerDownLeft as Nn}from"lucide-react";import{Fragment as Mn,jsx as R,jsxs as Fe}from"react/jsx-runtime";var Pn=({children:e,isOpen:t,onOpenChange:o,className:r})=>R(k.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:c("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:R(k.Modal,{className:c("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",r),children:R(k.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),wn=({children:e,className:t,onSelectionChange:o,...r})=>R("div",{className:t,children:R(k.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),Tn=({className:e,...t})=>Fe(k.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[R(yn,{className:"h-5 w-5 text-text-muted"}),R(k.Input,{...t,className:c("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),R("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:R("kbd",{className:"font-sans",children:"ESC"})})]}),kn=({children:e,className:t,...o})=>R(k.ListBox,{...o,className:c("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Ln=({children:e,className:t,...o})=>R(k.ListBoxItem,{...o,className:c("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:r=>Fe(Mn,{children:[e,(r.isFocused||r.isSelected)&&Fe("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[R("span",{className:"text-[10px]",children:"Select"}),R(Nn,{size:10})]})]})}),An=({isHeading:e,className:t})=>R("div",{className:c("shrink-0",t),children:e?R(Cn,{size:18}):R(Rn,{size:18})}),Bn=({children:e,className:t})=>R("span",{className:c("block font-medium truncate flex-1 text-sm",t),children:e}),Sn=({children:e,className:t})=>R("span",{className:c("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),yc={Root:Pn,Autocomplete:wn,Input:Tn,List:kn,Item:Object.assign(Ln,{Icon:An,Title:Bn,Bio:Sn})};import{createContext as no,use as Oc,useEffect as In,useImperativeHandle as En,useMemo as Vc,useRef as On,useState as Vn}from"react";import Dc from"scroll-into-view-if-needed";import{useEffect as wc,useRef as Tc}from"react";import{jsx as zn}from"react/jsx-runtime";var Wc=no(null),Gc=no(null);function Hn(e){let[t,o]=Vn({isOverflowing:!1,isAtBottom:!1});return In(()=>{let r=e.current;if(!r)return;let n=()=>{let l=r.scrollHeight>r.clientHeight,i=r.scrollHeight-r.scrollTop<=r.clientHeight+2;o({isOverflowing:l,isAtBottom:i})};n(),r.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n);let a=new MutationObserver(n);return a.observe(r,{childList:!0,subtree:!0}),()=>{r.removeEventListener("scroll",n),window.removeEventListener("resize",n),a.disconnect()}},[e]),t}var Dn=({children:e,className:t,ref:o,...r})=>{let n=On(null);En(o,()=>n.current);let{isOverflowing:a,isAtBottom:l}=Hn(n);return zn("div",{ref:n,className:c("relative overflow-y-auto boltdocs-otp-content",a&&!l&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...r,children:e})};Dn.displayName="OnThisPageContent";import*as so from"react-aria-components";import{ChevronLeft as Fn,ChevronRight as $n}from"lucide-react";import{Fragment as Xn,jsx as j,jsxs as qn}from"react/jsx-runtime";var Wn=({children:e,className:t})=>j("nav",{className:c("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),Gn=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return qn(so.Link,{href:t,className:c("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",n?"text-right justify-end":"text-left justify-start",r),children:[!n&&j(Fn,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),j("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&j($n,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},_n=({children:e,className:t})=>j("span",{className:c("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Un=({children:e,className:t})=>j("span",{className:c("text-base font-bold text-text-main truncate",t),children:e}),jn=({children:e})=>j(Xn,{children:e}),Kc={PageNavRoot:Wn,PageNavLink:Object.assign(Gn,{Title:_n,Description:Un,Icon:jn})};import{jsx as od}from"react/jsx-runtime";import*as Kn from"react-aria-components";import{ChevronRight as ad}from"lucide-react";import{jsx as dd,jsxs as md}from"react/jsx-runtime";import{Breadcrumb as fd,Breadcrumbs as gd,Link as bd}from"react-aria-components";import{ChevronRight as hd}from"lucide-react";import{jsx as Rd}from"react/jsx-runtime";import{jsx as Zn}from"react/jsx-runtime";var ao=({children:e,className:t,vertical:o=!1})=>Zn("div",{className:c("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});import{Check as Qn,ChevronRight as Yn,Dot as es}from"lucide-react";import ts from"react";import*as B from"react-aria-components";import*as te from"react-aria-components";import{jsx as $e,jsxs as Jn}from"react/jsx-runtime";var io=({children:e,className:t,showArrow:o,...r})=>Jn(te.Popover,{offset:8,...r,className:te.composeRenderProps(t,n=>c("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards",n)),children:[o&&$e(te.OverlayArrow,{className:"group",children:$e("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:$e("path",{d:"M0 0 L6 6 L12 0"})})}),e]});import{Fragment as os,jsx as q,jsxs as We}from"react/jsx-runtime";function De(e){let[t,o]=ts.Children.toArray(e.children).slice(0,2);return We(B.MenuTrigger,{...e,children:[t,q(io,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function ze(e){return q(B.Menu,{...e,className:B.composeRenderProps(e.className,t=>c("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function ye(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return q(B.MenuItem,{...e,textValue:t,className:B.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:a})=>c("group relative flex flex-row items-center gap-2.5 px-3 py-1.5 rounded-lg outline-none cursor-default transition-all duration-200","text-text-main text-[0.8125rem]",r&&"bg-primary-500/10 text-primary-600 shadow-sm",n&&"scale-[0.98] bg-primary-500/15",a&&"opacity-40 grayscale pointer-events-none",o)),children:B.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:a})=>We(os,{children:[r!=="none"&&We("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[n&&r==="multiple"&&q(Qn,{className:"w-3.5 h-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&q(es,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),q("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),a&&q(Yn,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}import{Separator as hn,ToggleButton as vn}from"react-aria-components";import{jsx as O,jsxs as pe}from"react/jsx-runtime";var is=e=>{let[t,o]=rs(!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"}),l=URL.createObjectURL(a);window.open(l,"_blank")}}};function co({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:l}=is(r),i=o!==!1,s=typeof o=="object"&&o.text||"Copy Markdown";return!i||!r?null:O("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:pe(ao,{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:[O(J,{variant:"ghost",onPress:a,icon:n?O(ns,{size:16}):O(lo,{size:16}),iconPosition:"left",className:c("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}),pe(De,{placement:"bottom end",children:[O(J,{variant:"ghost",isIconOnly:!0,icon:O(as,{size:14}),className:c("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")}),pe(ze,{className:"w-52",children:[pe(ye,{onAction:a,className:"flex flex-row items-start gap-2.5 group",children:[O(lo,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),O("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),pe(ye,{onAction:l,className:"flex flex-row items-start gap-2.5 group",children:[O(ss,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),O("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}import{jsx as ls}from"react/jsx-runtime";function L({className:e,variant:t="rect",...o}){return ls("div",{className:c("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}import{jsx as A,jsxs as X}from"react/jsx-runtime";function mo(){return A("div",{className:c("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:X("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[X("div",{className:"flex gap-2",children:[A(L,{className:"h-3 w-16"}),A(L,{className:"h-3 w-24"})]}),A(L,{className:"h-10 w-[60%] sm:h-12"}),X("div",{className:"space-y-3",children:[A(L,{className:"h-4 w-full"}),A(L,{className:"h-4 w-[95%]"}),A(L,{className:"h-4 w-[40%]"})]}),X("div",{className:"space-y-6 pt-4",children:[A(L,{className:"h-7 w-32"}),X("div",{className:"space-y-3",children:[A(L,{className:"h-4 w-full"}),A(L,{className:"h-4 w-[98%]"}),A(L,{className:"h-4 w-[92%]"}),A(L,{className:"h-4 w-[60%]"})]})]}),A(L,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),X("div",{className:"space-y-6 pt-4",children:[A(L,{className:"h-7 w-48"}),X("div",{className:"space-y-3",children:[A(L,{className:"h-4 w-full"}),A(L,{className:"h-4 w-[85%]"})]})]})]})})}import{jsx as D,jsxs as ds}from"react/jsx-runtime";var oe=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return ds(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&D("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:D(cs,{size:16})})]})},po={...Ge,Loading:mo,h1:e=>D(oe,{level:1,...e}),h2:e=>D(oe,{level:2,...e}),h3:e=>D(oe,{level:3,...e}),h4:e=>D(oe,{level:4,...e}),h5:e=>D(oe,{level:5,...e}),h6:e=>D(oe,{level:6,...e}),pre:e=>D($,{...e,children:e.children})};import{useLocation as ps}from"react-router-dom";import{Fragment as gs,jsx as h,jsxs as Ce}from"react/jsx-runtime";function us(){let{currentLocale:e,config:t}=re();return Ue(()=>{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 fs(){let e=ps(),{config:t}=re(),o=V(l=>l.setLocale),r=V(l=>l.setVersion),n=V(l=>l.currentLocale),a=V(l=>l.currentVersion);return Ue(()=>{let l=e.pathname.split("/").filter(Boolean),i=0,s=t.versions?.defaultVersion,d=t.i18n?.defaultLocale;if(l[i]==="docs"&&i++,t.versions&&l.length>i){let m=t.versions.versions.find(g=>g.path===l[i]);m&&(s=m.path,i++)}t.i18n&&l.length>i&&t.i18n.locales[l[i]]?d=l[i]:t.i18n&&l.length===0&&(d=n||t.i18n.defaultLocale),d!==n&&o(d),s!==a&&r(s)},[e.pathname,t,o,r,n,a]),null}function go({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:a,externalPages:l,components:i={}}){let[s,d]=uo(e),[m,g]=uo(t),b=l||{},x=fo(()=>s.filter(p=>!(a&&(p.path==="/"||p.path===""))&&!b[p.path===""?"/":p.path]).map(p=>{let N=Object.keys(r).find(M=>M===`/${o}/${p.filePath}`||M.endsWith(`/${o}/${p.filePath}`)||M.endsWith(`/${o}\\${p.filePath.replace(/\\/g,"/")}`)),S=N?r[N]:null;return{...p,Component:_e.lazy(async()=>S?await S():{default:Pe})}}),[s,r,o,a,b]);Ue(()=>{n&&(n.on("boltdocs:routes-update",p=>{d(p)}),n.on("boltdocs:config-update",p=>{g(p)}))},[n]);let v=fo(()=>({...po,...i}),[i]),y=v.Loading;return h(et,{children:h(lt,{components:v,children:h(Re.Provider,{value:m,children:h(ot,{children:Ce(Xe,{routes:s,modules:r,children:[h(rt,{}),h(fs,{}),h(us,{}),Ce(ms,{children:[h(K,{element:h(st,{}),children:x.map(p=>h(K,{path:p.path===""?"/":p.path,element:h(_e.Suspense,{fallback:h(y,{}),children:h(dt,{Component:p.Component})})},p.path))},"docs-layout"),a&&Ce(gs,{children:[h(K,{path:"/",element:h(ue,{children:h(a,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(p=>h(K,{path:`/${p}`,element:h(ue,{children:h(a,{})})},`home-${p}`))]}),Object.entries(b).map(([p,N])=>{let S=p==="/"?"":p;return Ce(_e.Fragment,{children:[h(K,{path:p,element:h(ue,{children:h(N,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(M=>h(K,{path:`/${M}${S}`,element:h(ue,{children:h(N,{})})},`${p}-${M}`))]},p)}),h(K,{path:"*",element:h(ue,{children:h(Pe,{})})})]})]})})})})})}import{jsx as je}from"react/jsx-runtime";async function pp(e){let{path:t,routes:o,config:r,modules:n,homePage:a,externalPages:l,docsDirName:i}=e,s={};for(let[m,g]of Object.entries(n))s[m]=()=>Promise.resolve(g);return xs.renderToString(je(bs.StrictMode,{children:je(hs,{location:t,children:je(go,{initialRoutes:o,initialConfig:r,docsDirName:i,modules:s,homePage:a,externalPages:l})})}))}export{pp as render};
@@ -17,7 +17,7 @@ declare function useNavbar(): {
17
17
  github: string | null;
18
18
  social: BoltdocsSocialLink[];
19
19
  config: BoltdocsConfig;
20
- theme: "light" | "dark" | "system";
20
+ theme: "dark" | "light" | "system";
21
21
  };
22
22
 
23
23
  declare function useSidebar(routes: ComponentRoute[]): {
@@ -38,20 +38,7 @@ declare function useSearch(routes: ComponentRoute[]): {
38
38
  setIsOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
39
39
  query: string;
40
40
  setQuery: React$1.Dispatch<React$1.SetStateAction<string>>;
41
- list: {
42
- id: string;
43
- title: string;
44
- path: string;
45
- bio: string;
46
- groupTitle: string | undefined;
47
- }[] | {
48
- id: string;
49
- title: string | undefined;
50
- path: string;
51
- bio: string;
52
- groupTitle: string | undefined;
53
- isHeading?: boolean;
54
- }[];
41
+ list: any[];
55
42
  input: {
56
43
  value: string;
57
44
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
@@ -116,8 +103,13 @@ declare function useI18n(): UseI18nReturn;
116
103
 
117
104
  /**
118
105
  * Hook to manage the previous and next button functionality for documentation pages.
106
+ * Intelligent: respects current locale, version, and tab to keep navigation logical.
119
107
  */
120
108
  declare function usePageNav(): {
109
+ prevPage: null;
110
+ nextPage: null;
111
+ currentRoute: null;
112
+ } | {
121
113
  prevPage: ComponentRoute | null;
122
114
  nextPage: ComponentRoute | null;
123
115
  currentRoute: ComponentRoute;
@@ -17,7 +17,7 @@ declare function useNavbar(): {
17
17
  github: string | null;
18
18
  social: BoltdocsSocialLink[];
19
19
  config: BoltdocsConfig;
20
- theme: "light" | "dark" | "system";
20
+ theme: "dark" | "light" | "system";
21
21
  };
22
22
 
23
23
  declare function useSidebar(routes: ComponentRoute[]): {
@@ -38,20 +38,7 @@ declare function useSearch(routes: ComponentRoute[]): {
38
38
  setIsOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
39
39
  query: string;
40
40
  setQuery: React$1.Dispatch<React$1.SetStateAction<string>>;
41
- list: {
42
- id: string;
43
- title: string;
44
- path: string;
45
- bio: string;
46
- groupTitle: string | undefined;
47
- }[] | {
48
- id: string;
49
- title: string | undefined;
50
- path: string;
51
- bio: string;
52
- groupTitle: string | undefined;
53
- isHeading?: boolean;
54
- }[];
41
+ list: any[];
55
42
  input: {
56
43
  value: string;
57
44
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
@@ -116,8 +103,13 @@ declare function useI18n(): UseI18nReturn;
116
103
 
117
104
  /**
118
105
  * Hook to manage the previous and next button functionality for documentation pages.
106
+ * Intelligent: respects current locale, version, and tab to keep navigation logical.
119
107
  */
120
108
  declare function usePageNav(): {
109
+ prevPage: null;
110
+ nextPage: null;
111
+ currentRoute: null;
112
+ } | {
121
113
  prevPage: ComponentRoute | null;
122
114
  nextPage: ComponentRoute | null;
123
115
  currentRoute: ComponentRoute;
@@ -1 +1 @@
1
- "use strict";var $=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.prototype.hasOwnProperty;var G=(e,t)=>{for(var i in t)$(e,i,{get:t[i],enumerable:!0})},Y=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of J(t))!K.call(e,a)&&a!==i&&$(e,a,{get:()=>t[a],enumerable:!(n=q(t,a))||n.enumerable});return e};var Z=e=>Y($({},"__esModule",{value:!0}),e);var me={};G(me,{useBreadcrumbs:()=>de,useI18n:()=>ue,useLocalizedTo:()=>pe,useLocation:()=>he,useNavbar:()=>re,useOnThisPage:()=>ae,usePageNav:()=>fe,useRoutes:()=>L,useSearch:()=>ie,useSidebar:()=>se,useTabs:()=>ce,useVersion:()=>le});module.exports=Z(me);var N=require("react-router-dom");var S=require("react"),_=(0,S.createContext)(null);function x(){let e=(0,S.use)(_);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var y=require("react"),te=require("react/jsx-runtime"),ee=(0,y.createContext)(void 0);function M(){let e=(0,y.use)(ee);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}function w(e,t){return e?typeof e=="string"?e:t&&e[t]?e[t]:Object.values(e)[0]||"":""}var W=require("react-router-dom");var T=require("react"),ne=require("react/jsx-runtime"),oe=(0,T.createContext)({preload:()=>{},routes:[]});function O(){return(0,T.use)(oe)}var E=require("zustand"),I=require("zustand/middleware"),C=(0,E.create)()((0,I.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,I.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function L(){let{routes:e}=O(),t=x(),i=(0,W.useLocation)(),n=C(s=>s.currentLocale),a=C(s=>s.currentVersion),c=C(s=>s.hasHydrated),d=e.find(s=>s.path===i.pathname),f=t.i18n?d?.locale||(c?n:void 0)||t.i18n.defaultLocale:void 0,u=t.versions?d?.version||(c?a:void 0)||t.versions.defaultVersion:void 0,m=e.filter(s=>{let b=t.i18n?(s.locale||t.i18n.defaultLocale)===f:!0,B=t.versions?(s.version||t.versions.defaultVersion)===u:!0;if(!(b&&B))return!1;let H=t.i18n;if(H){let X=!!d?.locale,D=!!s.locale;if(e.some(k=>k!==s&&k.filePath===s.filePath&&k.version===s.version&&(k.locale||H.defaultLocale)===(s.locale||H.defaultLocale))&&X!==D)return!1}return!0}),r=t.i18n?.localeConfigs?.[f]?.label||t.i18n?.locales[f]||f,h=t.versions?.versions.find(s=>s.path===u)?.label||u,g=t.i18n?Object.entries(t.i18n.locales).map(([s,b])=>{let B=t.i18n?.localeConfigs?.[s];return{key:s,label:B?.label||b,isCurrent:s===f}}):[],p=t.versions?t.versions.versions.map(s=>({key:s.path,label:s.label,isCurrent:s.path===u})):[];return{routes:m,allRoutes:e,currentRoute:d,currentLocale:f,currentLocaleLabel:r,availableLocales:g,currentVersion:u,currentVersionLabel:h,availableVersions:p,config:t}}function re(){let e=x(),{theme:t}=M(),i=(0,N.useLocation)(),{currentLocale:n}=L(),a=e.theme||{},c=w(a.title,n)||"Boltdocs",d=a.navbar||[],f=a.socialLinks||[],u=a.githubRepo,m=d.map(g=>{let p=g.href||g.to||g.link||"";return{label:w(g.label||g.text,n),href:p,active:i.pathname===p,to:p.startsWith("http")||p.startsWith("//")?"external":void 0,items:g.items?.map(s=>({label:w(s.label||s.text,n),href:s.href||s.link||s.to||""}))}}),l=a.logo,r=l?typeof l=="string"?l:t==="dark"?l.dark:l.light:null,o={alt:(l&&typeof l=="object"?l.alt:void 0)||c,width:l&&typeof l=="object"?l.width:void 0,height:l&&typeof l=="object"?l.height:void 0},h=u?`https://github.com/${u}`:null;return{links:m,title:c,logo:r,logoProps:o,github:h,social:f,config:e,theme:t}}var A=require("react-router-dom");function se(e){let t=x(),i=(0,A.useLocation)(),n=r=>r.endsWith("/")&&r.length>1?r.slice(0,-1):r,a=n(i.pathname),c=e.find(r=>n(r.path)===a),d=c?.tab?.toLowerCase(),f=d?e.filter(r=>!r.tab||r.tab.toLowerCase()===d):e,u=[],m=new Map;for(let r of f)r.group?(m.has(r.group)||m.set(r.group,{slug:r.group,title:r.groupTitle||r.group,routes:[],icon:r.groupIcon}),m.get(r.group).routes.push(r)):u.push(r);return{groups:Array.from(m.values()),ungrouped:u,activeRoute:c,activePath:a,config:t}}var V=require("react");function ie(e){let{currentLocale:t,currentVersion:i}=L(),[n,a]=(0,V.useState)(!1),[c,d]=(0,V.useState)(""),f=(0,V.useMemo)(()=>{let u=e.filter(o=>{let h=!t||o.locale===t,g=!i||o.version===i;return h&&g});if(!c)return u.slice(0,10).map(o=>({id:o.path,title:o.title,path:o.path,bio:o.description||"",groupTitle:o.groupTitle}));let m=[],l=c.toLowerCase();for(let o of u)if(o.title?.toLowerCase().includes(l)&&m.push({id:o.path,title:o.title,path:o.path,bio:o.description||"",groupTitle:o.groupTitle}),o.headings)for(let h of o.headings)h.text.toLowerCase().includes(l)&&m.push({id:`${o.path}#${h.id}`,title:h.text,path:`${o.path}#${h.id}`,bio:`Heading in ${o.title}`,groupTitle:o.title,isHeading:!0});let r=new Set;return m.filter(o=>r.has(o.path)?!1:(r.add(o.path),!0)).slice(0,10)},[e,c,t,i]);return{isOpen:n,setIsOpen:a,query:c,setQuery:d,list:f,input:{value:c,onChange:u=>d(u.target.value)}}}var j=require("react");function ae(e=[]){let[t,i]=(0,j.useState)(null);return{headings:e,activeId:t,setActiveId:i}}var F=require("react-router-dom"),P=require("react");function ce(e=[],t=[]){let i=(0,F.useLocation)(),n=(0,P.useRef)([]),[a,c]=(0,P.useState)({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),f=t.find(l=>l.path===i.pathname)?.tab?.toLowerCase(),u=e.findIndex(l=>l.id.toLowerCase()===f),m=u===-1?0:u;return(0,P.useEffect)(()=>{let l=n.current[m];l&&c({opacity:1,width:l.offsetWidth,transform:`translateX(${l.offsetLeft}px)`})},[m,e.length,i.pathname]),{tabs:e,activeIndex:m,indicatorStyle:a,tabRefs:n,activeTabId:f}}var Q=require("react-router-dom");function R(e,t,i){let n=e;return t&&(n===t||n.startsWith(t+"/"))&&(n=n===t?"index.md":n.slice(t.length+1)),i&&(n===i||n.startsWith(i+"/"))&&(n=n===i?"index.md":n.slice(i.length+1)),n}function le(){let e=(0,Q.useNavigate)(),t=L(),{allRoutes:i,currentRoute:n,currentVersion:a,currentLocale:c,config:d}=t,f=d.versions,u=C(r=>r.setVersion),m=r=>{if(!f||r===a)return;u(r);let o=`/docs/${r}`;if(n){let h=R(n.filePath,n.version,n.locale),g=i.find(p=>R(p.filePath,p.version,p.locale)===h&&(p.version||f.defaultVersion)===r&&(c?p.locale===c:!p.locale));if(g)o=g.path;else{let p=i.find(s=>R(s.filePath,s.version,s.locale)==="index.md"&&(s.version||f.defaultVersion)===r&&(c?s.locale===c:!s.locale));o=p?p.path:`/docs/${r}${c?`/${c}`:""}`}}e(o)},l=t.availableVersions.map(r=>({...r,label:r.label,value:r.key}));return{currentVersion:a,currentVersionLabel:t.currentVersionLabel,availableVersions:l,handleVersionChange:m}}var U=require("react-router-dom");function ue(){let e=(0,U.useNavigate)(),t=L(),{allRoutes:i,currentRoute:n,currentLocale:a,config:c}=t,d=c.i18n,f=C(o=>o.setLocale),u=o=>{if(!d||o===a)return;f(o);let h="/";if(n){let g=R(n.filePath,n.version,n.locale),p=i.find(s=>R(s.filePath,s.version,s.locale)===g&&(s.locale||d.defaultLocale)===o&&s.version===n.version);if(p)h=p.path;else{let s=i.find(b=>R(b.filePath,b.version,b.locale)==="index.md"&&(b.locale||d.defaultLocale)===o&&b.version===n.version);h=s?s.path:o===d.defaultLocale?n.version?`/${n.version}`:"/":n.version?`/${n.version}/${o}`:`/${o}`}}else{let g=i.find(p=>(p.filePath==="index.mdx"||p.filePath==="index.md")&&(p.locale||d.defaultLocale)===o&&!p.version);g?h=g.path:h=o===d.defaultLocale?"/":`/${o}`}e(h)},l=c.i18n?.localeConfigs?.[a]?.label||c.i18n?.locales[a]||a,r=c.i18n?Object.entries(c.i18n.locales).map(([o,h])=>{let g=c.i18n?.localeConfigs?.[o];return{key:o,label:g?.label||h,value:o,isCurrent:o===a}}):[];return{currentLocale:a,currentLocaleLabel:l,availableLocales:r,handleLocaleChange:u}}function fe(){let{routes:e}=L(),t=window.location.pathname,i=e.findIndex(d=>d.path===t),n=e[i],a=i>0?e[i-1]:null,c=i<e.length-1?e[i+1]:null;return{prevPage:a,nextPage:c,currentRoute:n}}function de(){let{currentRoute:e}=L(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}function pe(e){let t=x(),{currentLocale:i,currentVersion:n}=L();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let a=t.i18n,c=t.versions;if(!a&&!c)return e;let d=e.startsWith("/docs"),f=e.split("/").filter(Boolean),u=0;f[u]==="docs"&&u++,c&&f.length>u&&c.versions.find(h=>h.path===f[u])&&u++,a&&f.length>u&&a.locales[f[u]]&&u++;let m=f.slice(u),l=[];d&&(l.push("docs"),c&&n&&l.push(n)),a&&i&&i!==a.defaultLocale&&l.push(i),l.push(...m);let r=`/${l.join("/")}`;return r.length>1&&r.endsWith("/")?r.slice(0,-1):r||"/"}var z=require("react-router-dom"),he=()=>(0,z.useLocation)();
1
+ "use strict";var Y=Object.create;var k=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var ee=Object.getPrototypeOf,te=Object.prototype.hasOwnProperty;var oe=(e,t)=>{for(var s in t)k(e,s,{get:t[s],enumerable:!0})},E=(e,t,s,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _(t))!te.call(e,i)&&i!==s&&k(e,i,{get:()=>t[i],enumerable:!(o=Z(t,i))||o.enumerable});return e};var ne=(e,t,s)=>(s=e!=null?Y(ee(e)):{},E(t||!e||!e.__esModule?k(s,"default",{value:e,enumerable:!0}):s,e)),re=e=>E(k({},"__esModule",{value:!0}),e);var Ce={};oe(Ce,{useBreadcrumbs:()=>xe,useI18n:()=>ge,useLocalizedTo:()=>Le,useLocation:()=>be,useNavbar:()=>ue,useOnThisPage:()=>pe,usePageNav:()=>ve,useRoutes:()=>x,useSearch:()=>de,useSidebar:()=>fe,useTabs:()=>me,useVersion:()=>he});module.exports=re(Ce);var j=require("react-router-dom");var I=require("react"),se=(0,I.createContext)(null);function b(){let e=(0,I.use)(se);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var T=require("react"),ae=require("react/jsx-runtime"),ie=(0,T.createContext)(void 0);function O(){let e=(0,T.use)(ie);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}function w(e,t){return e?typeof e=="string"?e:t&&e[t]?e[t]:Object.values(e)[0]||"":""}var A=require("react-router-dom");var P=require("react"),le=require("react/jsx-runtime"),ce=(0,P.createContext)({preload:()=>{},routes:[]});function W(){return(0,P.use)(ce)}var N=require("zustand"),B=require("zustand/middleware"),C=(0,N.create)()((0,B.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,B.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function x(){let{routes:e}=W(),t=b(),s=(0,A.useLocation)(),o=C(r=>r.currentLocale),i=C(r=>r.currentVersion),a=C(r=>r.hasHydrated),m=e.find(r=>r.path===s.pathname),u=t.i18n?m?.locale||(a?o:void 0)||t.i18n.defaultLocale:void 0,l=t.versions?m?.version||(a?i:void 0)||t.versions.defaultVersion:void 0,g=e.filter(r=>{let L=t.i18n?(r.locale||t.i18n.defaultLocale)===u:!0,M=t.versions?(r.version||t.versions.defaultVersion)===l:!0;if(!(L&&M))return!1;let H=t.i18n;if(H){let K=!!m?.locale,G=!!r.locale;if(e.some(S=>S!==r&&S.filePath===r.filePath&&S.version===r.version&&(S.locale||H.defaultLocale)===(r.locale||H.defaultLocale))&&K!==G)return!1}return!0}),n=t.i18n?.localeConfigs?.[u]?.label||t.i18n?.locales[u]||u,h=t.versions?.versions.find(r=>r.path===l)?.label||l,f=t.i18n?Object.entries(t.i18n.locales).map(([r,L])=>{let M=t.i18n?.localeConfigs?.[r];return{key:r,label:M?.label||L,isCurrent:r===u}}):[],p=t.versions?t.versions.versions.map(r=>({key:r.path,label:r.label,isCurrent:r.path===l})):[];return{routes:g,allRoutes:e,currentRoute:m,currentLocale:u,currentLocaleLabel:n,availableLocales:f,currentVersion:l,currentVersionLabel:h,availableVersions:p,config:t}}function ue(){let e=b(),{theme:t}=O(),s=(0,j.useLocation)(),{currentLocale:o}=x(),i=e.theme||{},a=w(i.title,o)||"Boltdocs",m=i.navbar||[],u=i.socialLinks||[],l=i.githubRepo,g=m.map(f=>{let p=f.href||f.to||f.link||"";return{label:w(f.label||f.text,o),href:p,active:s.pathname===p,to:p.startsWith("http")||p.startsWith("//")?"external":void 0,items:f.items?.map(r=>({label:w(r.label||r.text,o),href:r.href||r.link||r.to||""}))}}),c=i.logo,n=c?typeof c=="string"?c:t==="dark"?c.dark:c.light:null,d={alt:(c&&typeof c=="object"?c.alt:void 0)||a,width:c&&typeof c=="object"?c.width:void 0,height:c&&typeof c=="object"?c.height:void 0},h=l?`https://github.com/${l}`:null;return{links:g,title:a,logo:n,logoProps:d,github:h,social:u,config:e,theme:t}}var D=require("react-router-dom");function fe(e){let t=b(),s=(0,D.useLocation)(),o=n=>n.endsWith("/")&&n.length>1?n.slice(0,-1):n,i=o(s.pathname),a=e.find(n=>o(n.path)===i),m=a?.tab?.toLowerCase(),u=m?e.filter(n=>!n.tab||n.tab.toLowerCase()===m):e,l=[],g=new Map;for(let n of u)n.group?(g.has(n.group)||g.set(n.group,{slug:n.group,title:n.groupTitle||n.group,routes:[],icon:n.groupIcon}),g.get(n.group).routes.push(n)):l.push(n);return{groups:Array.from(g.values()),ungrouped:l,activeRoute:a,activePath:i,config:t}}var R=require("react"),F=require("flexsearch");var $=ne(require("virtual:boltdocs-search"));function de(e){let{currentLocale:t,currentVersion:s}=x(),[o,i]=(0,R.useState)(!1),[a,m]=(0,R.useState)(""),[u,l]=(0,R.useState)(null);(0,R.useEffect)(()=>{if(!o||u)return;let c=new F.Index({preset:"match",tokenize:"full",resolution:9,cache:!0});for(let n of $.default)c.add(n.id,`${n.title} ${n.content}`);l(c)},[o,u]);let g=(0,R.useMemo)(()=>{if(!a)return e.filter(h=>{let f=!t||h.locale===t,p=!s||h.version===s;return f&&p}).slice(0,10).map(h=>({id:h.path,title:h.title,path:h.path,bio:h.description||"",groupTitle:h.groupTitle}));if(!u)return[];let c=u.search(a,{limit:20,suggest:!0}),n=[],d=new Set;for(let h of c){let f=$.default.find(L=>L.id===h);if(!f)continue;let p=!t||f.locale===t,r=!s||f.version===s;!p||!r||d.has(f.url)||(d.add(f.url),n.push({id:f.url,title:f.title,path:f.url,bio:f.display,groupTitle:f.display.split(" > ")[0],isHeading:f.url.includes("#")}))}return n.slice(0,10)},[a,u,t,s,e]);return{isOpen:o,setIsOpen:i,query:a,setQuery:m,list:g,input:{value:a,onChange:c=>m(c.target.value)}}}var z=require("react");function pe(e=[]){let[t,s]=(0,z.useState)(null);return{headings:e,activeId:t,setActiveId:s}}var U=require("react-router-dom"),V=require("react");function me(e=[],t=[]){let s=(0,U.useLocation)(),o=(0,V.useRef)([]),[i,a]=(0,V.useState)({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),u=t.find(c=>c.path===s.pathname)?.tab?.toLowerCase(),l=e.findIndex(c=>c.id.toLowerCase()===u),g=l===-1?0:l;return(0,V.useEffect)(()=>{let c=o.current[g];c&&a({opacity:1,width:c.offsetWidth,transform:`translateX(${c.offsetLeft}px)`})},[g,e.length,s.pathname]),{tabs:e,activeIndex:g,indicatorStyle:i,tabRefs:o,activeTabId:u}}var Q=require("react-router-dom");function y(e,t,s){let o=e;return t&&(o===t||o.startsWith(t+"/"))&&(o=o===t?"index.md":o.slice(t.length+1)),s&&(o===s||o.startsWith(s+"/"))&&(o=o===s?"index.md":o.slice(s.length+1)),o}function he(){let e=(0,Q.useNavigate)(),t=x(),{allRoutes:s,currentRoute:o,currentVersion:i,currentLocale:a,config:m}=t,u=m.versions,l=C(n=>n.setVersion),g=n=>{if(!u||n===i)return;l(n);let d=`/docs/${n}`;if(o){let h=y(o.filePath,o.version,o.locale),f=s.find(p=>y(p.filePath,p.version,p.locale)===h&&(p.version||u.defaultVersion)===n&&(a?p.locale===a:!p.locale));if(f)d=f.path;else{let p=s.find(r=>y(r.filePath,r.version,r.locale)==="index.md"&&(r.version||u.defaultVersion)===n&&(a?r.locale===a:!r.locale));d=p?p.path:`/docs/${n}${a?`/${a}`:""}`}}e(d)},c=t.availableVersions.map(n=>({...n,label:n.label,value:n.key}));return{currentVersion:i,currentVersionLabel:t.currentVersionLabel,availableVersions:c,handleVersionChange:g}}var X=require("react-router-dom");function ge(){let e=(0,X.useNavigate)(),t=x(),{allRoutes:s,currentRoute:o,currentLocale:i,config:a}=t,m=a.i18n,u=C(d=>d.setLocale),l=d=>{if(!m||d===i)return;u(d);let h="/";if(o){let f=y(o.filePath,o.version,o.locale),p=s.find(r=>y(r.filePath,r.version,r.locale)===f&&(r.locale||m.defaultLocale)===d&&r.version===o.version);if(p)h=p.path;else{let r=s.find(L=>y(L.filePath,L.version,L.locale)==="index.md"&&(L.locale||m.defaultLocale)===d&&L.version===o.version);h=r?r.path:d===m.defaultLocale?o.version?`/${o.version}`:"/":o.version?`/${o.version}/${d}`:`/${d}`}}else{let f=s.find(p=>(p.filePath==="index.mdx"||p.filePath==="index.md")&&(p.locale||m.defaultLocale)===d&&!p.version);f?h=f.path:h=d===m.defaultLocale?"/":`/${d}`}e(h)},c=a.i18n?.localeConfigs?.[i]?.label||a.i18n?.locales[i]||i,n=a.i18n?Object.entries(a.i18n.locales).map(([d,h])=>{let f=a.i18n?.localeConfigs?.[d];return{key:d,label:f?.label||h,value:d,isCurrent:d===i}}):[];return{currentLocale:i,currentLocaleLabel:c,availableLocales:n,handleLocaleChange:l}}var q=require("react-router-dom");function ve(){let{routes:e,currentRoute:t}=x(),s=(0,q.useLocation)();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let o=t.tab?.toLowerCase(),i=o?e.filter(l=>l.tab?.toLowerCase()===o):e.filter(l=>!l.tab),a=i.findIndex(l=>l.path===s.pathname),m=a>0?i[a-1]:null,u=a!==-1&&a<i.length-1?i[a+1]:null;return{prevPage:m,nextPage:u,currentRoute:t}}function xe(){let{currentRoute:e}=x(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}function Le(e){let t=b(),{currentLocale:s,currentVersion:o}=x();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let i=t.i18n,a=t.versions;if(!i&&!a)return e;let m=e.startsWith("/docs"),u=e.split("/").filter(Boolean),l=0;u[l]==="docs"&&l++,a&&u.length>l&&a.versions.find(h=>h.path===u[l])&&l++,i&&u.length>l&&i.locales[u[l]]&&l++;let g=u.slice(l),c=[];m&&(c.push("docs"),a&&o&&c.push(o)),i&&s&&s!==i.defaultLocale&&c.push(s),c.push(...g);let n=`/${c.join("/")}`;return n.length>1&&n.endsWith("/")?n.slice(0,-1):n||"/"}var J=require("react-router-dom"),be=()=>(0,J.useLocation)();
@@ -1 +1 @@
1
- import{b as e,c as m,d as p,e as f,f as a,g as c,h as n,i as s}from"../chunk-RSII2UPE.mjs";import"../chunk-JD3RSDE4.mjs";import{a as x}from"../chunk-JXHNX2WN.mjs";import{f as r,g as t}from"../chunk-NBCYHLAA.mjs";import"../chunk-JZXLCA2E.mjs";import{useLocation as o}from"react-router-dom";var u=()=>o();export{n as useBreadcrumbs,p as useI18n,t as useLocalizedTo,u as useLocation,e as useNavbar,c as useOnThisPage,s as usePageNav,r as useRoutes,x as useSearch,a as useSidebar,f as useTabs,m as useVersion};
1
+ import{b as e,c as m,d as p,e as f,f as a,g as c,h as n,i as s}from"../chunk-2HUVMMJU.mjs";import"../chunk-JD3RSDE4.mjs";import{a as x}from"../chunk-2Z5T6EAU.mjs";import{f as r,g as t}from"../chunk-NBCYHLAA.mjs";import"../chunk-JZXLCA2E.mjs";import{useLocation as o}from"react-router-dom";var u=()=>o();export{n as useBreadcrumbs,p as useI18n,t as useLocalizedTo,u as useLocation,e as useNavbar,c as useOnThisPage,s as usePageNav,r as useRoutes,x as useSearch,a as useSidebar,f as useTabs,m as useVersion};
@@ -27,6 +27,7 @@ declare function Breadcrumbs(): react_jsx_runtime.JSX.Element | null;
27
27
 
28
28
  /**
29
29
  * Component to display the previous and next page navigation buttons.
30
+ * Enhanced with subtle entrance animations and a modern card layout.
30
31
  */
31
32
  declare function PageNav(): react_jsx_runtime.JSX.Element | null;
32
33
 
@@ -57,11 +58,8 @@ declare class ErrorBoundary extends Component<Props, State> {
57
58
  declare function NotFound(): react_jsx_runtime.JSX.Element;
58
59
 
59
60
  /**
60
- * A premium loading component that includes an SVG fill animation
61
- * and a synchronized progress indicator.
62
- *
63
- * It features a glassmorphism container and a Bolt-style SVG logo
64
- * with a dynamic fill effect.
61
+ * A premium loading component that only skeletons the markdown content area.
62
+ * Designed to be used as a Suspense fallback within a persistent layout.
65
63
  */
66
64
  declare function Loading(): react_jsx_runtime.JSX.Element;
67
65
 
@@ -27,6 +27,7 @@ declare function Breadcrumbs(): react_jsx_runtime.JSX.Element | null;
27
27
 
28
28
  /**
29
29
  * Component to display the previous and next page navigation buttons.
30
+ * Enhanced with subtle entrance animations and a modern card layout.
30
31
  */
31
32
  declare function PageNav(): react_jsx_runtime.JSX.Element | null;
32
33
 
@@ -57,11 +58,8 @@ declare class ErrorBoundary extends Component<Props, State> {
57
58
  declare function NotFound(): react_jsx_runtime.JSX.Element;
58
59
 
59
60
  /**
60
- * A premium loading component that includes an SVG fill animation
61
- * and a synchronized progress indicator.
62
- *
63
- * It features a glassmorphism container and a Bolt-style SVG logo
64
- * with a dynamic fill effect.
61
+ * A premium loading component that only skeletons the markdown content area.
62
+ * Designed to be used as a Suspense fallback within a persistent layout.
65
63
  */
66
64
  declare function Loading(): react_jsx_runtime.JSX.Element;
67
65