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
@@ -0,0 +1 @@
1
+ import{a as oe,b as ne,c as ie,d as se,e as le,f as me,g as ce,h as pe,i as ue}from"./chunk-2HUVMMJU.mjs";import{b as Y}from"./chunk-JD3RSDE4.mjs";import{J as Q,L as X,M as j,U as P,_ as N,a as S,b as z,e as I,ea as D,f as Z,ja as R,ka as ee,la as G,ma as _,na as te,qa as re,sa as ae,ta as A,wa as b,y as f}from"./chunk-W2NB4T6V.mjs";import{b as J,f as $,g as K}from"./chunk-NBCYHLAA.mjs";import{ArrowLeft as Ee}from"lucide-react";import{jsx as E,jsxs as de}from"react/jsx-runtime";function yt(){return E("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:de("div",{className:"space-y-4",children:[E("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),E("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),E("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."}),de(z,{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:[E(Ee,{size:16})," Go to Home"]})]})})}import{jsx as Me}from"react/jsx-runtime";function p({className:e,variant:t="rect",...a}){return Me("div",{className:S("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...a})}import{jsx as u,jsxs as w}from"react/jsx-runtime";function Ct(){return u("div",{className:S("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:w("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[w("div",{className:"flex gap-2",children:[u(p,{className:"h-3 w-16"}),u(p,{className:"h-3 w-24"})]}),u(p,{className:"h-10 w-[60%] sm:h-12"}),w("div",{className:"space-y-3",children:[u(p,{className:"h-4 w-full"}),u(p,{className:"h-4 w-[95%]"}),u(p,{className:"h-4 w-[40%]"})]}),w("div",{className:"space-y-6 pt-4",children:[u(p,{className:"h-7 w-32"}),w("div",{className:"space-y-3",children:[u(p,{className:"h-4 w-full"}),u(p,{className:"h-4 w-[98%]"}),u(p,{className:"h-4 w-[92%]"}),u(p,{className:"h-4 w-[60%]"})]})]}),u(p,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),w("div",{className:"space-y-6 pt-4",children:[u(p,{className:"h-7 w-48"}),w("div",{className:"space-y-3",children:[u(p,{className:"h-4 w-full"}),u(p,{className:"h-4 w-[85%]"})]})]})]})})}import{useEffect as Be,useState as Oe}from"react";import{Sun as fe,Moon as ge,Monitor as he}from"lucide-react";import{Button as He}from"react-aria-components";import{jsx as v,jsxs as M}from"react/jsx-runtime";function be(){let{theme:e,setTheme:t}=Y(),[a,r]=Oe(!1);return Be(()=>{r(!0)},[]),a?M(re,{placement:"bottom right",children:[v(He,{className:"flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main outline-none focus-visible:ring-2 focus-visible:ring-primary-500","aria-label":"Selection theme",children:v(e==="system"?he:e==="dark"?ge:fe,{size:20,className:"animate-in fade-in zoom-in duration-300"})}),M(ae,{selectionMode:"single",selectedKeys:[e],onSelectionChange:l=>{let o=Array.from(l)[0];t(o)},children:[M(A,{id:"light",children:[v(fe,{size:16}),v("span",{children:"Light"})]}),M(A,{id:"dark",children:[v(ge,{size:16}),v("span",{children:"Dark"})]}),M(A,{id:"system",children:[v(he,{size:16}),v("span",{children:"System"})]})]})]}):v("div",{className:"h-9 w-9"})}import{useEffect as Ae,useState as De}from"react";var $e="https://api.github.com";async function ve(e,t,a=$e){let r=new Headers;t&&r.append("authorization",t);let l=await(await fetch(`${a}/repos/${e}`,{headers:r})).json();return l.stargazers_count!==void 0?ze(l.stargazers_count):"0"}var ze=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);import{jsx as xe,jsxs as Ge}from"react/jsx-runtime";function Ne({repo:e}){let[t,a]=De(null);return Ae(()=>{e&&ve(e).then(r=>a(r)).catch(()=>a("0"))},[e]),Ge("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-muted transition-all hover:bg-bg-main hover:border-border-strong hover:text-text-main",children:[xe(Z,{className:"h-4 w-4"}),t&&xe("span",{className:"tabular-nums",children:t})]})}import*as _e from"lucide-react";import{jsx as C,jsxs as ye}from"react/jsx-runtime";function Pe({tabs:e,routes:t}){let{currentLocale:a}=$(),{indicatorStyle:r,tabRefs:n,activeIndex:l}=le(e,t),o=s=>{if(!s)return null;if(s.trim().startsWith("<svg"))return C("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:s}});let m=_e[s];return m?C(m,{size:16}):C("img",{src:s,alt:"",className:"h-4 w-4 object-contain"})};return C("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:ye(D.TabsList,{className:"border-none py-0",children:[e.map((s,m)=>{let h=m===l,c=t.find(d=>d.tab&&d.tab.toLowerCase()===s.id.toLowerCase()),x=c?c.path:"#";return ye(z,{href:x,ref:d=>{n.current[m]=d},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${h?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[o(s.icon),C("span",{children:oe(s.text,a)})]},s.id)}),C(D.TabsIndicator,{style:r})]})})}import{Suspense as Ve,lazy as qe}from"react";import{useLocation as Ue}from"react-router-dom";import{ChevronDown as we,Languages as Fe}from"lucide-react";import{jsx as i,jsxs as y}from"react/jsx-runtime";var We=qe(()=>import("./search-dialog-ZRXBAQJ5.mjs").then(e=>({default:e.SearchDialog})));function ur(){let{links:e,title:t,logo:a,logoProps:r,github:n,social:l,config:o}=ne(),{routes:s,allRoutes:m,currentVersion:h,currentLocale:c}=$(),{pathname:x}=Ue(),d=o.theme||{},F=d?.tabs&&d.tabs.length>0;return y(f.NavbarRoot,{className:F?"border-b-0":"",children:[y(f.Content,{children:[y(f.NavbarLeft,{children:[a&&i(f.NavbarLogo,{src:a,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),i(f.Title,{children:t}),o.versions&&h&&i(Ke,{}),i(f.Links,{children:e.map(H=>i(Je,{link:H},H.href))})]}),i(f.NavbarCenter,{children:i(Ve,{fallback:i("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:i(We,{routes:s||[]})})}),y(f.NavbarRight,{children:[o.i18n&&c&&i(Ye,{}),i(f.Split,{}),i(be,{}),n&&i(Ne,{repo:d?.githubRepo??""}),l.length>0&&i(f.Split,{}),i("div",{className:"flex items-center gap-1",children:l.map(({icon:H,link:W})=>i(f.Socials,{icon:H,link:W,className:"p-1.5"},W))})]})]}),x!=="/"&&F&&d?.tabs&&i("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:i(Pe,{tabs:d.tabs,routes:m||s||[]})})]})}function Je({link:e}){let t=K(e.href);return i(f.Link,{...e,href:t})}function Ke(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:a}=ie();return t.length===0?null:y(b.Trigger,{children:[i(I,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:i(we,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5",children:i("span",{className:"font-semibold text-[0.8125rem]",children:e})}),i(b.Root,{children:i(b.Section,{items:t,children:r=>i(b.Item,{onPress:()=>a(r.value),children:r.label},`${r.value??""}`)})})]})}function Ye(){let{currentLocale:e,availableLocales:t,handleLocaleChange:a}=se();return t.length===0?null:y(b.Trigger,{children:[i(I,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:i(we,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5 px-2.5",children:y("div",{className:"flex items-center gap-1.5",children:[i(Fe,{className:"w-3.5 h-3.5 text-primary-500"}),i("span",{className:"font-bold text-[0.75rem] tracking-wider uppercase opacity-90",children:e||"en"})]})}),i(b.Root,{children:i(b.Section,{items:t,children:r=>i(b.Item,{onPress:()=>a(r.value),children:y("div",{className:"flex items-center justify-between w-full gap-4",children:[i("span",{children:r.label}),i("span",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",children:r.value})]})},`${r.value??""}`)})})]})}import{Zap as Ze}from"lucide-react";import{jsx as V,jsxs as Te}from"react/jsx-runtime";function Le(){return V("div",{className:"flex items-center justify-center mt-10 mb-4 px-4 w-full",children:Te("a",{href:"https://github.com/jesusalcaladev/boltdocs",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center gap-2 px-4 py-2 rounded-full border border-border-subtle bg-bg-surface/50 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:bg-bg-surface hover:shadow-xl hover:shadow-primary-500/5 select-none",children:[V(Ze,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300",fill:"currentColor"}),Te("span",{className:"text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide",children:["Powered by"," ",V("strong",{className:"font-bold text-text-main/80 group-hover:text-text-main",children:"Boltdocs"})]})]})})}import{useState as Qe,useEffect as Xe,useMemo as je}from"react";import*as et from"lucide-react";import{jsx as T,jsxs as rt}from"react/jsx-runtime";function ke(e){return e&&et[e]||void 0}function tt({group:e,activePath:t,getIcon:a}){let r=je(()=>e.routes.some(o=>o.path===t),[e.routes,t]),[n,l]=Qe(!0);return Xe(()=>{r&&l(!0)},[r]),T(R.SidebarGroup,{title:e.title,isOpen:n,onToggle:()=>l(!n),children:e.routes.map(o=>{let s=t===(o.path.endsWith("/")?o.path.slice(0,-1):o.path);return T(R.SidebarLink,{label:o.title,href:o.path,active:s,icon:a(o.icon),badge:o.badge},o.path)})})}function Pr({routes:e,config:t}){let{groups:a,ungrouped:r,activePath:n}=me(e),l=t.theme||{};return rt(R.SidebarRoot,{children:[r.length>0&&T(R.SidebarGroup,{className:"mb-6",children:r.map(o=>{let s=n===(o.path.endsWith("/")?o.path.slice(0,-1):o.path);return T(R.SidebarLink,{label:o.title,href:o.path,active:s,icon:ke(o.icon),badge:o.badge},o.path)})}),a.map(o=>T(tt,{group:o,activePath:n,getIcon:ke},o.slug)),l?.poweredBy&&T("div",{className:"mt-auto pt-8",children:T(Le,{})})]})}import at,{useRef as Se,useEffect as ot,useState as nt,useCallback as it}from"react";import{Pencil as st,CircleHelp as lt,TextAlignStart as mt}from"lucide-react";import{jsx as g,jsxs as L}from"react/jsx-runtime";function Cr({headings:e=[],editLink:t,communityHelp:a,filePath:r}){let{headings:n}=ce(e),l=at.useMemo(()=>n.map(o=>({title:o.text,url:`#${o.id}`,depth:o.level})),[n]);return n.length===0?null:g(j,{toc:l,children:g(ct,{headings:n,editLink:t,communityHelp:a,filePath:r})})}function ct({headings:e,editLink:t,communityHelp:a,filePath:r}){let n=Q(),[l,o]=nt({opacity:0}),s=Se(null),m=Se(null);ot(()=>{if(!n||!s.current)return;let c=s.current.querySelector(`a[href="#${n}"]`);c&&o({transform:`translateY(${c.offsetTop}px)`,height:`${c.offsetHeight}px`,opacity:1})},[n]);let h=it((c,x)=>{c.preventDefault();let d=document.getElementById(x);d&&(d.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${x}`))},[]);return L(P.OnThisPageRoot,{children:[L(P.OnThisPageHeader,{className:"flex flex-row gap-x-2",children:[g(mt,{size:16}),"On this page"]}),g(X,{containerRef:m,children:L(P.OnThisPageContent,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:m,children:[g(P.OnThisPageIndicator,{style:l}),g("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:s,children:e.map(c=>g(P.OnThisPageItem,{level:c.level,children:g(P.OnThisPageLink,{href:`#${c.id}`,active:n===c.id,onClick:x=>h(x,c.id),className:"pl-4",children:c.text})},c.id))})]})}),(t||a)&&L("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[g("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),L("ul",{className:"space-y-3",children:[t&&r&&g("li",{children:L("a",{href:t.replace(":path",r),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[g(st,{size:16}),"Edit this page"]})}),a&&g("li",{children:L("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[g(lt,{size:16}),"Community help"]})})]})]})]})}import{useEffect as pt}from"react";import{useLocation as ut}from"react-router-dom";function Or({siteTitle:e,siteDescription:t,routes:a}){let r=ut();return pt(()=>{let n=a.find(h=>h.path===r.pathname),l=n?.title,o=n?.description||t||"";document.title=l?`${l} | ${e}`:e;let s=document.querySelector('meta[name="description"]');s||(s=document.createElement("meta"),s.name="description",document.head.appendChild(s)),s.content=o,k("property","og:title",document.title),k("property","og:description",o),k("property","og:type","article"),k("property","og:url",window.location.href),k("name","twitter:card","summary"),k("name","twitter:title",document.title),k("name","twitter:description",o);let m=document.querySelector('link[rel="canonical"]');m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m)),m.href=window.location.origin+r.pathname},[r.pathname,e,t,a]),null}function k(e,t,a){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.content=a}import{Home as dt}from"lucide-react";import{jsx as B,jsxs as Re}from"react/jsx-runtime";function _r(){let{crumbs:e,activeRoute:t}=pe(),r=J().theme||{};return e.length===0||!r?.breadcrumbs?null:Re(ee,{children:[B(G,{children:B(_,{href:"/",children:B(dt,{size:14})})}),e.map((n,l)=>Re(G,{children:[B(te,{}),B(_,{href:n.href,className:S({"font-medium text-text-main":n.href===t?.path}),children:n.label})]},`crumb-${n.href}-${n.label}-${l}`))]})}import{jsx as O,jsxs as q}from"react/jsx-runtime";function Wr(){let{prevPage:e,nextPage:t}=ue();return!e&&!t?null:q(N.PageNavRoot,{className:"animate-in fade-in slide-in-from-bottom-4 duration-700",children:[e?q(N.PageNavLink,{to:e.path,direction:"prev",children:[O(N.PageNavLink.Title,{children:"Previous"}),O(N.PageNavLink.Description,{children:e.title})]}):O("div",{}),t&&q(N.PageNavLink,{to:t.path,direction:"next",children:[O(N.PageNavLink.Title,{children:"Next"}),O(N.PageNavLink.Description,{children:t.title})]})]})}import{useEffect as ft,useState as gt}from"react";import{ProgressBar as ht}from"react-aria-components";import{jsx as Ce}from"react/jsx-runtime";function Qr(){let[e,t]=gt(0);return ft(()=>{let a=null,r,n=()=>{if(!a)return;let{scrollTop:o,scrollHeight:s,clientHeight:m}=a;if(s<=m){t(0);return}let h=o/(s-m)*100;t(Math.min(100,Math.max(0,h)))},l=()=>(a=document.querySelector(".boltdocs-content"),a?(a.addEventListener("scroll",n),n(),r&&clearInterval(r),!0):!1);return l()||(r=setInterval(l,100)),()=>{a&&a.removeEventListener("scroll",n),r&&clearInterval(r)}},[]),Ce(ht,{value:e,"aria-label":"Reading progress",className:"fixed top-0 left-0 right-0 z-999 h-0.5 bg-transparent w-full pointer-events-none",children:({percentage:a})=>Ce("div",{className:"h-full bg-primary-500 transition-[width] duration-300 ease-out shadow-[0_0_8px_rgba(var(--primary-rgb),0.4)]",style:{width:`${a}%`}})})}import{Component as bt}from"react";import{jsx as U,jsxs as vt}from"react/jsx-runtime";var Ie=class extends bt{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,a){console.error("Uncaught error in Boltdocs Layout:",t,a)}render(){return this.state.hasError?this.props.fallback||vt("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[U("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),U("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),U(I,{className:"rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer",onPress:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}};export{yt as a,Ct as b,be as c,Ne as d,Pe as e,ur as f,Le as g,Pr as h,Cr as i,Or as j,_r as k,Wr as l,Qr as m,Ie as n};
@@ -0,0 +1 @@
1
+ import{a as y}from"./chunk-2Z5T6EAU.mjs";import{A as u,B as m,C as p,D as S,E as d,F as f,G as D,y as g,z as h}from"./chunk-W2NB4T6V.mjs";import{useEffect as k,useCallback as C}from"react";import{useNavigate as E}from"react-router-dom";import{Fragment as M,jsx as o,jsxs as n}from"react/jsx-runtime";function x({routes:v}){let{isOpen:I,setIsOpen:a,query:R,setQuery:w,list:b}=y(v),r=E();k(()=>{let e=t=>{(/Mac/.test(navigator.userAgent)?t.metaKey:t.ctrlKey)&&(t.key==="k"||t.key==="j")&&(t.preventDefault(),a(i=>!i))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a]);let s=C(e=>{let t=String(e);if(a(!1),t.includes("#")){let[l,c]=t.split("#");r(l),setTimeout(()=>{let i=document.getElementById(c);i&&i.scrollIntoView({behavior:"smooth"})},100)}else r(t)},[r,a]);return n(M,{children:[o(g.SearchTrigger,{onPress:()=>a(!0)}),o(h,{isOpen:I,onOpenChange:a,children:n(u,{onSelectionChange:s,children:[o(m,{value:R,onChange:e=>w(e.target.value)}),o(p,{items:b,children:e=>n(S,{onPress:()=>s(e.id),textValue:e.title,children:[o(d,{isHeading:e.isHeading}),n("div",{className:"flex flex-col justify-center gap-0.5",children:[o(f,{children:e.title}),o(D,{children:e.bio})]})]},e.id)})]})})]})}export{x as a};
@@ -1 +1 @@
1
- import{a as l,e as d,oa as u,qa as c,sa as h,ta as m}from"./chunk-ZRJ55GGF.mjs";import{useState as g}from"react";import{Copy as x,Check as w,ExternalLink as f,ChevronDown as v}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var C=r=>{let[s,t]=g(!1);return{copied:s,handleCopy:()=>{navigator.clipboard.writeText(r),t(!0),setTimeout(()=>t(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([r],{type:"text/plain;charset=utf-8"}),p=URL.createObjectURL(a);window.open(p,"_blank")}}};function R({content:r,mdxRaw:s,config:t}){let i=s||r||"",{copied:n,handleCopy:a,handleOpenRaw:p}=C(i),b=t!==!1,y=typeof t=="object"&&t.text||"Copy Markdown";return!b||!i?null:e("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:o(u,{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:[e(d,{variant:"ghost",onPress:a,icon:n?e(w,{size:16}):e(x,{size:16}),iconPosition:"left",className:l("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!":y}),o(c,{placement:"bottom end",children:[e(d,{variant:"ghost",isIconOnly:!0,icon:e(v,{size:14}),className:l("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")}),o(h,{className:"w-52",children:[o(m,{onAction:a,className:"flex flex-row items-start gap-2.5 group",children:[e(x,{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"}),e("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),o(m,{onAction:p,className:"flex flex-row items-start gap-2.5 group",children:[e(f,{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"}),e("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}export{R as a};
1
+ import{a as l,e as d,oa as u,qa as c,sa as h,ta as m}from"./chunk-W2NB4T6V.mjs";import{useState as g}from"react";import{Copy as x,Check as w,ExternalLink as f,ChevronDown as v}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var C=r=>{let[s,t]=g(!1);return{copied:s,handleCopy:()=>{navigator.clipboard.writeText(r),t(!0),setTimeout(()=>t(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([r],{type:"text/plain;charset=utf-8"}),p=URL.createObjectURL(a);window.open(p,"_blank")}}};function R({content:r,mdxRaw:s,config:t}){let i=s||r||"",{copied:n,handleCopy:a,handleOpenRaw:p}=C(i),b=t!==!1,y=typeof t=="object"&&t.text||"Copy Markdown";return!b||!i?null:e("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:o(u,{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:[e(d,{variant:"ghost",onPress:a,icon:n?e(w,{size:16}):e(x,{size:16}),iconPosition:"left",className:l("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!":y}),o(c,{placement:"bottom end",children:[e(d,{variant:"ghost",isIconOnly:!0,icon:e(v,{size:14}),className:l("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")}),o(h,{className:"w-52",children:[o(m,{onAction:a,className:"flex flex-row items-start gap-2.5 group",children:[e(x,{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"}),e("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),o(m,{onAction:p,className:"flex flex-row items-start gap-2.5 group",children:[e(f,{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"}),e("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}export{R as a};
@@ -1 +1 @@
1
- import{a as se}from"./chunk-ZK2266IZ.mjs";import{b as ee}from"./chunk-JD3RSDE4.mjs";import{b as oe}from"./chunk-T3W44KWY.mjs";import{a,b as Q,d as te,e as re,g as ne,h as $}from"./chunk-ZRJ55GGF.mjs";import{b as F}from"./chunk-NBCYHLAA.mjs";import{a as Ue}from"./chunk-JZXLCA2E.mjs";var nr={};Ue(nr,{Admonition:()=>P,Badge:()=>ye,Button:()=>ae,Card:()=>Re,Cards:()=>Ne,Caution:()=>Ve,CodeBlock:()=>L,ComponentPreview:()=>Ke,ComponentProps:()=>qe,CopyMarkdown:()=>se,Danger:()=>Ee,Field:()=>We,FileTree:()=>Me,Image:()=>_e,Important:()=>Ie,InfoBox:()=>Le,Link:()=>$e,List:()=>Se,Note:()=>we,Tab:()=>be,Table:()=>Oe,Tabs:()=>fe,Tip:()=>Te,Video:()=>ge,Warning:()=>Ae});import{jsx as je}from"react/jsx-runtime";var ae=({className:e,variant:t,size:r,rounded:o,iconSize:n,disabled:s,...u})=>je(re,{className:a("group",te({variant:t,size:r,rounded:o,iconSize:n,disabled:s,className:e})),...u});import*as O from"react-aria-components";import{Copy as Je,Check as Qe}from"lucide-react";var ie=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 le,useEffect as Ye,useRef as Ze,useState as _}from"react";function de(e){let{title:t,sandbox:r}=e,[o,n]=_(!1),[s,u]=_(!1),[p,c]=_(!1),l=Ze(null),i=F(),d=le(async()=>{let b=l.current?.textContent??"";ie(b),n(!0),setTimeout(()=>n(!1),2e3)},[]),m=le(()=>{let b=l.current?.textContent??"",v=i?.integrations?.sandbox?.config||{},x=typeof r=="object"?r:v,C=x.entry||"src/App.tsx";oe({title:t??"Code Snippet",...x,files:{...x.files,[C]:{content:b}}})},[t,i,r]);return Ye(()=>{let b=l.current?.textContent?.length??0;c(b>120)},[e.children,e.highlightedHtml]),{copied:o,isExpanded:s,setIsExpanded:u,isExpandable:p,preRef:l,handleCopy:d,handleSandbox:m,shouldTruncate:p&&!s}}import{jsx as N,jsxs as ce}from"react/jsx-runtime";function L(e){let{children:t,sandbox:r,hideSandbox:o=!0,hideCopy:n=!1,highlightedHtml:s,...u}=e,l=!!F()?.integrations?.sandbox?.enable&&!o,{copied:i,isExpanded:d,setIsExpanded:m,isExpandable:b,preRef:v,handleCopy:x,handleSandbox:C,shouldTruncate:A}=de(e);return ce("div",{className:a("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",A&&"[&>pre]:max-h-[250px] [&>pre]:overflow-hidden"),children:[ce("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:[l&&N($,{content:"Open in CodeSandbox",children:N(O.Button,{onPress:C,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:N(ne,{size:20})})}),!n&&N($,{content:i?"Copied!":"Copy code",children:N(O.Button,{onPress:x,className:a("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",i?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:i?N(Qe,{size:20}):N(Je,{size:20})})})]}),s?N("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:s}}):N("pre",{ref:v,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...u,children:t}),b&&N("div",{className:a(A?"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:N(O.Button,{onPress:()=>m(!d),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:d?"Show less":"Expand code"})})]})}import{Children as ot,isValidElement as nt,useMemo as st}from"react";import*as w from"react-aria-components";import{useState as pe,useRef as et,useEffect as tt,useCallback as rt}from"react";function me({initialIndex:e=0,tabs:t}){let r=t[e]?.props.disabled?t.findIndex(l=>!l.props.disabled):e,[o,n]=pe(r===-1?0:r),s=et([]),[u,p]=pe({opacity:0,transform:"translateX(0)",width:0});tt(()=>{let l=s.current[o];l&&p({opacity:1,width:l.offsetWidth,transform:`translateX(${l.offsetLeft}px)`})},[o,t]);let c=rt(l=>{let i=0;if(l.key==="ArrowRight"?i=1:l.key==="ArrowLeft"&&(i=-1),i!==0){let d=(o+i+t.length)%t.length;for(;t[d].props.disabled&&d!==o;)d=(d+i+t.length)%t.length;d!==o&&!t[d].props.disabled&&(n(d),s.current[d]?.focus())}},[o,t]);return{active:o,setActive:n,tabRefs:s,indicatorStyle:u,handleKeyDown:c}}import{cva as ue}from"class-variance-authority";import{jsx as k,jsxs as q}from"react/jsx-runtime";var at=ue("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"}}),it=ue("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 be({children:e}){let t=typeof e=="string"?k(L,{className:"language-bash",children:k("code",{children:e.trim()})}):e;return k("div",{className:"py-4",children:t})}function fe({defaultIndex:e=0,children:t}){let r=st(()=>ot.toArray(t).filter(p=>nt(p)&&p.props?.label),[t]),{active:o,setActive:n,tabRefs:s,indicatorStyle:u}=me({initialIndex:e,tabs:r});return k("div",{className:"my-8 w-full group/tabs",children:q(w.Tabs,{selectedKey:o.toString(),onSelectionChange:p=>n(Number(p)),className:"w-full",children:[q(w.TabList,{"aria-label":"Content Tabs",className:a(at()),children:[r.map((p,c)=>{let{label:l,icon:i,disabled:d}=p.props,m=c.toString();return q(w.Tab,{id:m,isDisabled:d,ref:b=>{s.current[c]=b},className:({isSelected:b,isDisabled:v})=>a(it({isActive:b,isDisabled:v})),children:[!!i&&k("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:i}),k("span",{children:l})]},m)}),k("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:u,"aria-hidden":"true"})]}),r.map((p,c)=>k(w.TabPanel,{id:c.toString(),children:r[c]},c))]})})}import{useRef as lt,useState as dt,useEffect as ct}from"react";import{jsx as xe,jsxs as pt}from"react/jsx-runtime";function ge({src:e,poster:t,alt:r,children:o,controls:n,preload:s="metadata",...u}){let p=lt(null),[c,l]=dt(!1);return ct(()=>{let i=p.current;if(!i)return;let d=new IntersectionObserver(([m])=>{m.isIntersecting&&(l(!0),d.disconnect())},{rootMargin:"200px"});return d.observe(i),()=>d.disconnect()},[]),xe("div",{ref:p,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:c?pt("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:s,playsInline:!0,...u,children:[o,"Your browser does not support the video tag."]}):xe("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":r||"Video"})})}import{cva as mt}from"class-variance-authority";import{jsx as bt}from"react/jsx-runtime";var ut=mt("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 ye({variant:e="default",children:t,className:r="",...o}){return bt("span",{className:a(ut({variant:e}),r),...o,children:t})}import{useCallback as ft,useRef as he}from"react";import*as Ce from"react-aria-components";import{cva as xt}from"class-variance-authority";import{Fragment as yt,jsx as E,jsxs as ve}from"react/jsx-runtime";var gt=xt("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 Ne({cols:e=3,children:t,className:r="",...o}){return E("div",{className:a(gt({cols:e}),r),...o,children:t})}function Re({title:e,icon:t,href:r,children:o,className:n="",...s}){let u=he(null),p=he(null),c=ft(d=>{let m=u.current||p.current;if(!m)return;let{left:b,top:v}=m.getBoundingClientRect();m.style.setProperty("--x",`${d.clientX-b}px`),m.style.setProperty("--y",`${d.clientY-v}px`)},[]),l=ve(yt,{children:[E("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&&E("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}),ve("div",{className:"space-y-1.5",children:[e&&E("h3",{className:"text-sm font-bold text-text-main",children:e}),o&&E("div",{className:"text-sm text-text-muted leading-relaxed",children:o})]})]}),i=a("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return r?E(Ce.Link,{ref:p,href:r,className:a(i,"no-underline cursor-pointer"),onMouseMove:c,...s,children:l}):E("div",{ref:u,role:"presentation",className:i,onMouseMove:c,...s,children:l})}import{Info as ht,Lightbulb as vt,AlertTriangle as Ct,ShieldAlert as Nt,Bookmark as Rt,Zap as Pt,Flame as kt}from"lucide-react";import{cva as wt}from"class-variance-authority";import{jsx as g,jsxs as ke}from"react/jsx-runtime";var Tt={note:g(Rt,{size:18}),tip:g(vt,{size:18}),info:g(ht,{size:18}),warning:g(Ct,{size:18}),danger:g(Nt,{size:18}),important:g(kt,{size:18}),caution:g(Pt,{size:18})},At={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},Pe=wt("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 P({type:e="note",title:t,children:r,className:o="",...n}){return ke("div",{className:a(Pe({type:e}),o),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[ke("div",{className:"flex items-center flex-row gap-2 mb-2",children:[g("span",{className:a("shrink-0",Pe({type:e})),children:Tt[e]}),g("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||At[e]})]}),g("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:r})]})}var we=e=>g(P,{type:"note",...e}),Te=e=>g(P,{type:"tip",...e}),Ae=e=>g(P,{type:"warning",...e}),Ee=e=>g(P,{type:"danger",...e}),Le=e=>g(P,{type:"info",...e}),Ie=e=>g(P,{type:"important",...e}),Ve=e=>g(P,{type:"caution",...e});import{Children as Et,isValidElement as Lt}from"react";import{Check as It,ChevronRight as Vt,Circle as St}from"lucide-react";import{cva as G}from"class-variance-authority";import{jsx as T,jsxs as Ft}from"react/jsx-runtime";var Bt=G("my-6 transition-all duration-200",{variants:{variant:{default:"list-disc pl-5 text-text-muted marker:text-primary-500/50",number:"list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold",checked:"list-none p-0",arrow:"list-none p-0",bubble:"list-none p-0"},cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"},isGrid:{true:"grid gap-x-8 gap-y-3",false:"space-y-2"},dense:{true:"space-y-1",false:"space-y-2"}},compoundVariants:[{variant:"default",dense:!0,className:"space-y-0.5"}],defaultVariants:{variant:"default",cols:1,isGrid:!1,dense:!1}}),Mt=G("group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200",{variants:{variant:{default:"",number:"",checked:"hover:translate-x-0.5",arrow:"hover:translate-x-0.5",bubble:"hover:translate-x-0.5"},dense:{true:"py-0",false:"py-0.5"}},defaultVariants:{variant:"default",dense:!1}}),Dt=G("mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110",{variants:{variant:{bubble:"h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold",default:""}},defaultVariants:{variant:"default"}});function zt({icon:e,children:t,variant:r,dense:o}){return Ft("li",{className:a(Mt({variant:r,dense:o})),children:[e&&T("span",{className:a(Dt({variant:r==="bubble"?"bubble":"default"})),children:e}),T("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Ht={checked:e=>T(It,{size:14,className:a("text-emerald-500 shrink-0",e)}),arrow:e=>T(Vt,{size:14,className:a("text-primary-400 shrink-0",e)}),bubble:e=>T(St,{size:6,fill:"currentColor",className:a("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function Se({variant:e="default",cols:t=1,dense:r=!1,children:o,className:n,...s}){let u=t!==void 0&&Number(t)>1,p=Ht[e],c=Bt({variant:e,cols:t,dense:r,isGrid:u,className:n}),l=e==="number"?"ol":"ul";return e==="default"||e==="number"?T(l,{className:c,...s,children:o}):T("ul",{className:c,...s,children:Et.map(o,i=>{if(!Lt(i))return i;let d=i,m=d.type==="li"?d.props.children:d.props.children||i;return T(zt,{icon:p(),variant:e,dense:r,children:m})})})}import{Children as X,isValidElement as Z,useMemo as Ot}from"react";import*as R from"react-aria-components";import{Folder as Wt,FileText as $t,File as _t,FileCode as qt,FileImage as Gt,ChevronRight as Xt}from"lucide-react";import{jsx as y,jsxs as j}from"react/jsx-runtime";var S=16,B=2,K={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 Y(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(Y).join(""):Z(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?Y(e.props.children):""}function Kt(e,t){let r=e.toLowerCase(),o="shrink-0 transition-colors duration-200";if(t)return y(Wt,{size:S,strokeWidth:B,className:a(o,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=a(o,"text-text-dim group-hover:text-text-main");return K.CODE.test(r)?y(qt,{size:S,strokeWidth:B,className:n}):K.TEXT.test(r)?y($t,{size:S,strokeWidth:B,className:n}):K.IMAGE.test(r)?y(Gt,{size:S,strokeWidth:B,className:n}):y(_t,{size:S,strokeWidth:B,className:n})}function U(e,t){if(!Z(e))return!1;let r=e.type;if(typeof r=="string")return r===t;if(typeof r=="function")return r.name===t||r.name?.toLowerCase()===t;let o=e.props;return o?.originalType===t||o?.mdxType===t}function Ut(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function W(e,t="root"){if(!Z(e))return[];let r=[];if(U(e,"ul"))return X.forEach(e.props.children,(o,n)=>{r.push(...W(o,`${t}-${n}`))}),r;if(U(e,"li")){let o=X.toArray(e.props.children),n=o.findIndex(v=>U(v,"ul")),s=n!==-1,u=s?o.slice(0,n):o,p=s?o.slice(n):[],c=Y(u),{name:l,comment:i}=Ut(c),d=l.endsWith("/"),m=d?l.slice(0,-1):l,b=s||d;return r.push({id:`${t}-${m}`,name:m,comment:i,isFolder:b,children:s?W(p[0],`${t}-${m}`):void 0}),r}return e.props&&typeof e.props=="object"&&"children"in e.props&&X.forEach(e.props.children,(o,n)=>{r.push(...W(o,`${t}-${n}`))}),r}function Be({item:e}){return j(R.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[y(R.TreeItemContent,{children:({isExpanded:t,hasChildItems:r})=>j("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[y("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),r?y(R.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:y(Xt,{size:14,strokeWidth:3,className:a("transition-transform duration-200",t&&"rotate-90")})}):y("div",{className:"w-[18px]"}),Kt(e.name,e.isFolder),y("span",{className:a("text-sm transition-colors truncate select-none",e.isFolder?"font-semibold text-text-main":"text-text-muted group-hover:text-text-main"),children:e.name}),e.comment&&j("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&&y(R.Collection,{items:e.children,children:t=>y(Be,{item:t})})]})}function Me({children:e}){let t=Ot(()=>W(e),[e]);return y("div",{className:"my-8",children:y(R.Tree,{items:t,"aria-label":"File Tree",className:a("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:r=>y(Be,{item:r})})})}import*as M from"react-aria-components";import{useState as De,useMemo as ze}from"react";function He({data:e,sortable:t=!1,paginated:r=!1,pageSize:o=10}){let[n,s]=De(null),[u,p]=De(1),c=ze(()=>{if(!e)return[];let m=[...e];return t&&n!==null&&m.sort((b,v)=>{let x=b[n.key],C=v[n.key],A=typeof x=="string"?x:"",H=typeof C=="string"?C:"";return A<H?n.direction==="asc"?-1:1:A>H?n.direction==="asc"?1:-1:0}),m},[e,n,t]),l=Math.ceil(c.length/o),i=ze(()=>{if(!r)return c;let m=(u-1)*o;return c.slice(m,m+o)},[c,r,u,o]);return{sortConfig:n,currentPage:u,setCurrentPage:p,totalPages:l,paginatedData:i,requestSort:m=>{if(!t)return;let b="asc";n&&n.key===m&&n.direction==="asc"&&(b="desc"),s({key:m,direction:b})}}}import{ChevronUp as jt,ChevronDown as Fe,ChevronLeft as Yt,ChevronRight as Zt,ChevronsLeft as Jt,ChevronsRight as Qt}from"lucide-react";import{Fragment as er,jsx as f,jsxs as I}from"react/jsx-runtime";function Oe({headers:e,data:t,children:r,className:o="",sortable:n=!1,paginated:s=!1,pageSize:u=10}){let{sortConfig:p,currentPage:c,setCurrentPage:l,totalPages:i,paginatedData:d,requestSort:m}=He({data:t,sortable:n,paginated:s,pageSize:u}),b=x=>n?p?.key!==x?f(Fe,{size:14,className:"ml-1 opacity-30"}):p.direction==="asc"?f(jt,{size:14,className:"ml-1 text-primary-400"}):f(Fe,{size:14,className:"ml-1 text-primary-400"}):null,v=r||I(er,{children:[e&&f("thead",{children:f("tr",{children:e.map((x,C)=>f("th",{onClick:()=>m(C),className:a("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:I("div",{className:"flex items-center",children:[x,b(C)]})},C))})}),d&&f("tbody",{children:d.map((x,C)=>f("tr",{className:"transition-colors hover:bg-bg-surface",children:x.map((A,H)=>f("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:A},H))},C))})]});return I("div",{className:a("my-6 rounded-lg border border-border-subtle overflow-hidden",o),children:[f("div",{className:"overflow-x-auto",children:f("table",{className:"w-full border-collapse text-sm",children:v})}),s&&i>1&&I("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[I("span",{className:"text-xs text-text-muted",children:["Page ",c," of ",i]}),I("div",{className:"flex items-center gap-1",children:[f(M.Button,{onPress:()=>l(1),isDisabled:c===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:f(Jt,{size:16})}),f(M.Button,{onPress:()=>l(x=>Math.max(x-1,1)),isDisabled:c===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:f(Yt,{size:16})}),f(M.Button,{onPress:()=>l(x=>Math.min(x+1,i)),isDisabled:c===i,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:f(Zt,{size:16})}),f(M.Button,{onPress:()=>l(i),isDisabled:c===i,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:f(Qt,{size:16})})]})]})]})}import{jsx as V,jsxs as D}from"react/jsx-runtime";function We({name:e,type:t,defaultValue:r,required:o=!1,children:n,id:s,className:u=""}){return D("article",{className:a("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",u),id:s,children:[D("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[D("div",{className:"flex flex-wrap items-center gap-2.5",children:[V("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&&V("span",{className:"rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider shadow-sm",children:t}),o&&D("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:[V("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),r&&D("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:[V("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),V("code",{className:"font-mono text-text-main font-medium",children:r})]})]}),V("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}import{jsx as tr}from"react/jsx-runtime";function $e({to:e,children:t,className:r="",...o}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),s=a("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",r);return tr(Q,{href:e,className:s,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...o,children:t})}import{jsx as rr}from"react/jsx-runtime";function _e({src:e,alt:t,theme:r,...o}){let{theme:n}=ee();return r&&r!==n?null:rr("img",{src:e,alt:t||"",...o})}import{jsx as h,jsxs as z}from"react/jsx-runtime";function qe({title:e,props:t,className:r=""}){return z("div",{className:a("my-6",r),children:[e&&h("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),h("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:z("table",{className:"w-full border-collapse text-sm",children:[h("thead",{children:z("tr",{children:[h("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"}),h("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"}),h("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"}),h("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"})]})}),h("tbody",{children:t.map((o,n)=>z("tr",{className:"transition-colors hover:bg-bg-surface",children:[z("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[h("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:o.name}),o.required&&h("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),h("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:h("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:o.type})}),h("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:o.defaultValue?h("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:o.defaultValue}):h("span",{className:"text-text-dim",children:"\u2014"})}),h("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:o.description})]},`${o.name}-${n}`))})]})})]})}import{useMemo as Ge}from"react";function Xe(e){let{code:t,children:r,preview:o}=e,n=Ge(()=>(t??(typeof r=="string"?r:"")).trim(),[t,r]),s=Ge(()=>o??(typeof r!="string"?r:null),[o,r]);return{initialCode:n,previewElement:s}}import{jsx as J,jsxs as or}from"react/jsx-runtime";function Ke(e){let{highlightedHtml:t,hideCode:r=!1,hideSandbox:o=!1,hideCopy:n=!1,sandboxOptions:s={}}=e,{initialCode:u,previewElement:p}=Xe(e);return or("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[J("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:p}),!r&&J("div",{className:"border-t border-border-subtle",children:J(L,{hideSandbox:o,hideCopy:n,title:s.title,lang:"tsx",highlightedHtml:t,children:u})})]})}export{ae as a,L as b,be as c,fe as d,ge as e,ye as f,Ne as g,Re as h,P as i,we as j,Te as k,Ae as l,Ee as m,Le as n,Ie as o,Ve as p,Se as q,Me as r,Oe as s,We as t,$e as u,_e as v,qe as w,Ke as x,nr as y};
1
+ import{a as se}from"./chunk-RPUERTVC.mjs";import{b as ee}from"./chunk-JD3RSDE4.mjs";import{b as oe}from"./chunk-T3W44KWY.mjs";import{a,b as Q,d as te,e as re,g as ne,h as $}from"./chunk-W2NB4T6V.mjs";import{b as F}from"./chunk-NBCYHLAA.mjs";import{a as Ue}from"./chunk-JZXLCA2E.mjs";var nr={};Ue(nr,{Admonition:()=>P,Badge:()=>ye,Button:()=>ae,Card:()=>Re,Cards:()=>Ne,Caution:()=>Ve,CodeBlock:()=>L,ComponentPreview:()=>Ke,ComponentProps:()=>qe,CopyMarkdown:()=>se,Danger:()=>Ee,Field:()=>We,FileTree:()=>Me,Image:()=>_e,Important:()=>Ie,InfoBox:()=>Le,Link:()=>$e,List:()=>Se,Note:()=>we,Tab:()=>be,Table:()=>Oe,Tabs:()=>fe,Tip:()=>Te,Video:()=>ge,Warning:()=>Ae});import{jsx as je}from"react/jsx-runtime";var ae=({className:e,variant:t,size:r,rounded:o,iconSize:n,disabled:s,...u})=>je(re,{className:a("group",te({variant:t,size:r,rounded:o,iconSize:n,disabled:s,className:e})),...u});import*as O from"react-aria-components";import{Copy as Je,Check as Qe}from"lucide-react";var ie=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 le,useEffect as Ye,useRef as Ze,useState as _}from"react";function de(e){let{title:t,sandbox:r}=e,[o,n]=_(!1),[s,u]=_(!1),[p,c]=_(!1),l=Ze(null),i=F(),d=le(async()=>{let b=l.current?.textContent??"";ie(b),n(!0),setTimeout(()=>n(!1),2e3)},[]),m=le(()=>{let b=l.current?.textContent??"",v=i?.integrations?.sandbox?.config||{},x=typeof r=="object"?r:v,C=x.entry||"src/App.tsx";oe({title:t??"Code Snippet",...x,files:{...x.files,[C]:{content:b}}})},[t,i,r]);return Ye(()=>{let b=l.current?.textContent?.length??0;c(b>120)},[e.children,e.highlightedHtml]),{copied:o,isExpanded:s,setIsExpanded:u,isExpandable:p,preRef:l,handleCopy:d,handleSandbox:m,shouldTruncate:p&&!s}}import{jsx as N,jsxs as ce}from"react/jsx-runtime";function L(e){let{children:t,sandbox:r,hideSandbox:o=!0,hideCopy:n=!1,highlightedHtml:s,...u}=e,l=!!F()?.integrations?.sandbox?.enable&&!o,{copied:i,isExpanded:d,setIsExpanded:m,isExpandable:b,preRef:v,handleCopy:x,handleSandbox:C,shouldTruncate:A}=de(e);return ce("div",{className:a("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",A&&"[&>pre]:max-h-[250px] [&>pre]:overflow-hidden"),children:[ce("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:[l&&N($,{content:"Open in CodeSandbox",children:N(O.Button,{onPress:C,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:N(ne,{size:20})})}),!n&&N($,{content:i?"Copied!":"Copy code",children:N(O.Button,{onPress:x,className:a("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",i?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:i?N(Qe,{size:20}):N(Je,{size:20})})})]}),s?N("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:s}}):N("pre",{ref:v,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...u,children:t}),b&&N("div",{className:a(A?"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:N(O.Button,{onPress:()=>m(!d),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:d?"Show less":"Expand code"})})]})}import{Children as ot,isValidElement as nt,useMemo as st}from"react";import*as w from"react-aria-components";import{useState as pe,useRef as et,useEffect as tt,useCallback as rt}from"react";function me({initialIndex:e=0,tabs:t}){let r=t[e]?.props.disabled?t.findIndex(l=>!l.props.disabled):e,[o,n]=pe(r===-1?0:r),s=et([]),[u,p]=pe({opacity:0,transform:"translateX(0)",width:0});tt(()=>{let l=s.current[o];l&&p({opacity:1,width:l.offsetWidth,transform:`translateX(${l.offsetLeft}px)`})},[o,t]);let c=rt(l=>{let i=0;if(l.key==="ArrowRight"?i=1:l.key==="ArrowLeft"&&(i=-1),i!==0){let d=(o+i+t.length)%t.length;for(;t[d].props.disabled&&d!==o;)d=(d+i+t.length)%t.length;d!==o&&!t[d].props.disabled&&(n(d),s.current[d]?.focus())}},[o,t]);return{active:o,setActive:n,tabRefs:s,indicatorStyle:u,handleKeyDown:c}}import{cva as ue}from"class-variance-authority";import{jsx as k,jsxs as q}from"react/jsx-runtime";var at=ue("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"}}),it=ue("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 be({children:e}){let t=typeof e=="string"?k(L,{className:"language-bash",children:k("code",{children:e.trim()})}):e;return k("div",{className:"py-4",children:t})}function fe({defaultIndex:e=0,children:t}){let r=st(()=>ot.toArray(t).filter(p=>nt(p)&&p.props?.label),[t]),{active:o,setActive:n,tabRefs:s,indicatorStyle:u}=me({initialIndex:e,tabs:r});return k("div",{className:"my-8 w-full group/tabs",children:q(w.Tabs,{selectedKey:o.toString(),onSelectionChange:p=>n(Number(p)),className:"w-full",children:[q(w.TabList,{"aria-label":"Content Tabs",className:a(at()),children:[r.map((p,c)=>{let{label:l,icon:i,disabled:d}=p.props,m=c.toString();return q(w.Tab,{id:m,isDisabled:d,ref:b=>{s.current[c]=b},className:({isSelected:b,isDisabled:v})=>a(it({isActive:b,isDisabled:v})),children:[!!i&&k("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:i}),k("span",{children:l})]},m)}),k("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:u,"aria-hidden":"true"})]}),r.map((p,c)=>k(w.TabPanel,{id:c.toString(),children:r[c]},c))]})})}import{useRef as lt,useState as dt,useEffect as ct}from"react";import{jsx as xe,jsxs as pt}from"react/jsx-runtime";function ge({src:e,poster:t,alt:r,children:o,controls:n,preload:s="metadata",...u}){let p=lt(null),[c,l]=dt(!1);return ct(()=>{let i=p.current;if(!i)return;let d=new IntersectionObserver(([m])=>{m.isIntersecting&&(l(!0),d.disconnect())},{rootMargin:"200px"});return d.observe(i),()=>d.disconnect()},[]),xe("div",{ref:p,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:c?pt("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:s,playsInline:!0,...u,children:[o,"Your browser does not support the video tag."]}):xe("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":r||"Video"})})}import{cva as mt}from"class-variance-authority";import{jsx as bt}from"react/jsx-runtime";var ut=mt("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 ye({variant:e="default",children:t,className:r="",...o}){return bt("span",{className:a(ut({variant:e}),r),...o,children:t})}import{useCallback as ft,useRef as he}from"react";import*as Ce from"react-aria-components";import{cva as xt}from"class-variance-authority";import{Fragment as yt,jsx as E,jsxs as ve}from"react/jsx-runtime";var gt=xt("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 Ne({cols:e=3,children:t,className:r="",...o}){return E("div",{className:a(gt({cols:e}),r),...o,children:t})}function Re({title:e,icon:t,href:r,children:o,className:n="",...s}){let u=he(null),p=he(null),c=ft(d=>{let m=u.current||p.current;if(!m)return;let{left:b,top:v}=m.getBoundingClientRect();m.style.setProperty("--x",`${d.clientX-b}px`),m.style.setProperty("--y",`${d.clientY-v}px`)},[]),l=ve(yt,{children:[E("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&&E("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}),ve("div",{className:"space-y-1.5",children:[e&&E("h3",{className:"text-sm font-bold text-text-main",children:e}),o&&E("div",{className:"text-sm text-text-muted leading-relaxed",children:o})]})]}),i=a("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return r?E(Ce.Link,{ref:p,href:r,className:a(i,"no-underline cursor-pointer"),onMouseMove:c,...s,children:l}):E("div",{ref:u,role:"presentation",className:i,onMouseMove:c,...s,children:l})}import{Info as ht,Lightbulb as vt,AlertTriangle as Ct,ShieldAlert as Nt,Bookmark as Rt,Zap as Pt,Flame as kt}from"lucide-react";import{cva as wt}from"class-variance-authority";import{jsx as g,jsxs as ke}from"react/jsx-runtime";var Tt={note:g(Rt,{size:18}),tip:g(vt,{size:18}),info:g(ht,{size:18}),warning:g(Ct,{size:18}),danger:g(Nt,{size:18}),important:g(kt,{size:18}),caution:g(Pt,{size:18})},At={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},Pe=wt("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 P({type:e="note",title:t,children:r,className:o="",...n}){return ke("div",{className:a(Pe({type:e}),o),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[ke("div",{className:"flex items-center flex-row gap-2 mb-2",children:[g("span",{className:a("shrink-0",Pe({type:e})),children:Tt[e]}),g("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||At[e]})]}),g("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:r})]})}var we=e=>g(P,{type:"note",...e}),Te=e=>g(P,{type:"tip",...e}),Ae=e=>g(P,{type:"warning",...e}),Ee=e=>g(P,{type:"danger",...e}),Le=e=>g(P,{type:"info",...e}),Ie=e=>g(P,{type:"important",...e}),Ve=e=>g(P,{type:"caution",...e});import{Children as Et,isValidElement as Lt}from"react";import{Check as It,ChevronRight as Vt,Circle as St}from"lucide-react";import{cva as G}from"class-variance-authority";import{jsx as T,jsxs as Ft}from"react/jsx-runtime";var Bt=G("my-6 transition-all duration-200",{variants:{variant:{default:"list-disc pl-5 text-text-muted marker:text-primary-500/50",number:"list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold",checked:"list-none p-0",arrow:"list-none p-0",bubble:"list-none p-0"},cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"},isGrid:{true:"grid gap-x-8 gap-y-3",false:"space-y-2"},dense:{true:"space-y-1",false:"space-y-2"}},compoundVariants:[{variant:"default",dense:!0,className:"space-y-0.5"}],defaultVariants:{variant:"default",cols:1,isGrid:!1,dense:!1}}),Mt=G("group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200",{variants:{variant:{default:"",number:"",checked:"hover:translate-x-0.5",arrow:"hover:translate-x-0.5",bubble:"hover:translate-x-0.5"},dense:{true:"py-0",false:"py-0.5"}},defaultVariants:{variant:"default",dense:!1}}),Dt=G("mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110",{variants:{variant:{bubble:"h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold",default:""}},defaultVariants:{variant:"default"}});function zt({icon:e,children:t,variant:r,dense:o}){return Ft("li",{className:a(Mt({variant:r,dense:o})),children:[e&&T("span",{className:a(Dt({variant:r==="bubble"?"bubble":"default"})),children:e}),T("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Ht={checked:e=>T(It,{size:14,className:a("text-emerald-500 shrink-0",e)}),arrow:e=>T(Vt,{size:14,className:a("text-primary-400 shrink-0",e)}),bubble:e=>T(St,{size:6,fill:"currentColor",className:a("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function Se({variant:e="default",cols:t=1,dense:r=!1,children:o,className:n,...s}){let u=t!==void 0&&Number(t)>1,p=Ht[e],c=Bt({variant:e,cols:t,dense:r,isGrid:u,className:n}),l=e==="number"?"ol":"ul";return e==="default"||e==="number"?T(l,{className:c,...s,children:o}):T("ul",{className:c,...s,children:Et.map(o,i=>{if(!Lt(i))return i;let d=i,m=d.type==="li"?d.props.children:d.props.children||i;return T(zt,{icon:p(),variant:e,dense:r,children:m})})})}import{Children as X,isValidElement as Z,useMemo as Ot}from"react";import*as R from"react-aria-components";import{Folder as Wt,FileText as $t,File as _t,FileCode as qt,FileImage as Gt,ChevronRight as Xt}from"lucide-react";import{jsx as y,jsxs as j}from"react/jsx-runtime";var S=16,B=2,K={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 Y(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(Y).join(""):Z(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?Y(e.props.children):""}function Kt(e,t){let r=e.toLowerCase(),o="shrink-0 transition-colors duration-200";if(t)return y(Wt,{size:S,strokeWidth:B,className:a(o,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=a(o,"text-text-dim group-hover:text-text-main");return K.CODE.test(r)?y(qt,{size:S,strokeWidth:B,className:n}):K.TEXT.test(r)?y($t,{size:S,strokeWidth:B,className:n}):K.IMAGE.test(r)?y(Gt,{size:S,strokeWidth:B,className:n}):y(_t,{size:S,strokeWidth:B,className:n})}function U(e,t){if(!Z(e))return!1;let r=e.type;if(typeof r=="string")return r===t;if(typeof r=="function")return r.name===t||r.name?.toLowerCase()===t;let o=e.props;return o?.originalType===t||o?.mdxType===t}function Ut(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function W(e,t="root"){if(!Z(e))return[];let r=[];if(U(e,"ul"))return X.forEach(e.props.children,(o,n)=>{r.push(...W(o,`${t}-${n}`))}),r;if(U(e,"li")){let o=X.toArray(e.props.children),n=o.findIndex(v=>U(v,"ul")),s=n!==-1,u=s?o.slice(0,n):o,p=s?o.slice(n):[],c=Y(u),{name:l,comment:i}=Ut(c),d=l.endsWith("/"),m=d?l.slice(0,-1):l,b=s||d;return r.push({id:`${t}-${m}`,name:m,comment:i,isFolder:b,children:s?W(p[0],`${t}-${m}`):void 0}),r}return e.props&&typeof e.props=="object"&&"children"in e.props&&X.forEach(e.props.children,(o,n)=>{r.push(...W(o,`${t}-${n}`))}),r}function Be({item:e}){return j(R.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[y(R.TreeItemContent,{children:({isExpanded:t,hasChildItems:r})=>j("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[y("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),r?y(R.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:y(Xt,{size:14,strokeWidth:3,className:a("transition-transform duration-200",t&&"rotate-90")})}):y("div",{className:"w-[18px]"}),Kt(e.name,e.isFolder),y("span",{className:a("text-sm transition-colors truncate select-none",e.isFolder?"font-semibold text-text-main":"text-text-muted group-hover:text-text-main"),children:e.name}),e.comment&&j("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&&y(R.Collection,{items:e.children,children:t=>y(Be,{item:t})})]})}function Me({children:e}){let t=Ot(()=>W(e),[e]);return y("div",{className:"my-8",children:y(R.Tree,{items:t,"aria-label":"File Tree",className:a("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:r=>y(Be,{item:r})})})}import*as M from"react-aria-components";import{useState as De,useMemo as ze}from"react";function He({data:e,sortable:t=!1,paginated:r=!1,pageSize:o=10}){let[n,s]=De(null),[u,p]=De(1),c=ze(()=>{if(!e)return[];let m=[...e];return t&&n!==null&&m.sort((b,v)=>{let x=b[n.key],C=v[n.key],A=typeof x=="string"?x:"",H=typeof C=="string"?C:"";return A<H?n.direction==="asc"?-1:1:A>H?n.direction==="asc"?1:-1:0}),m},[e,n,t]),l=Math.ceil(c.length/o),i=ze(()=>{if(!r)return c;let m=(u-1)*o;return c.slice(m,m+o)},[c,r,u,o]);return{sortConfig:n,currentPage:u,setCurrentPage:p,totalPages:l,paginatedData:i,requestSort:m=>{if(!t)return;let b="asc";n&&n.key===m&&n.direction==="asc"&&(b="desc"),s({key:m,direction:b})}}}import{ChevronUp as jt,ChevronDown as Fe,ChevronLeft as Yt,ChevronRight as Zt,ChevronsLeft as Jt,ChevronsRight as Qt}from"lucide-react";import{Fragment as er,jsx as f,jsxs as I}from"react/jsx-runtime";function Oe({headers:e,data:t,children:r,className:o="",sortable:n=!1,paginated:s=!1,pageSize:u=10}){let{sortConfig:p,currentPage:c,setCurrentPage:l,totalPages:i,paginatedData:d,requestSort:m}=He({data:t,sortable:n,paginated:s,pageSize:u}),b=x=>n?p?.key!==x?f(Fe,{size:14,className:"ml-1 opacity-30"}):p.direction==="asc"?f(jt,{size:14,className:"ml-1 text-primary-400"}):f(Fe,{size:14,className:"ml-1 text-primary-400"}):null,v=r||I(er,{children:[e&&f("thead",{children:f("tr",{children:e.map((x,C)=>f("th",{onClick:()=>m(C),className:a("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:I("div",{className:"flex items-center",children:[x,b(C)]})},C))})}),d&&f("tbody",{children:d.map((x,C)=>f("tr",{className:"transition-colors hover:bg-bg-surface",children:x.map((A,H)=>f("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:A},H))},C))})]});return I("div",{className:a("my-6 rounded-lg border border-border-subtle overflow-hidden",o),children:[f("div",{className:"overflow-x-auto",children:f("table",{className:"w-full border-collapse text-sm",children:v})}),s&&i>1&&I("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[I("span",{className:"text-xs text-text-muted",children:["Page ",c," of ",i]}),I("div",{className:"flex items-center gap-1",children:[f(M.Button,{onPress:()=>l(1),isDisabled:c===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:f(Jt,{size:16})}),f(M.Button,{onPress:()=>l(x=>Math.max(x-1,1)),isDisabled:c===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:f(Yt,{size:16})}),f(M.Button,{onPress:()=>l(x=>Math.min(x+1,i)),isDisabled:c===i,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:f(Zt,{size:16})}),f(M.Button,{onPress:()=>l(i),isDisabled:c===i,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:f(Qt,{size:16})})]})]})]})}import{jsx as V,jsxs as D}from"react/jsx-runtime";function We({name:e,type:t,defaultValue:r,required:o=!1,children:n,id:s,className:u=""}){return D("article",{className:a("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",u),id:s,children:[D("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[D("div",{className:"flex flex-wrap items-center gap-2.5",children:[V("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&&V("span",{className:"rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider shadow-sm",children:t}),o&&D("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:[V("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),r&&D("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:[V("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),V("code",{className:"font-mono text-text-main font-medium",children:r})]})]}),V("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}import{jsx as tr}from"react/jsx-runtime";function $e({to:e,children:t,className:r="",...o}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),s=a("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",r);return tr(Q,{href:e,className:s,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...o,children:t})}import{jsx as rr}from"react/jsx-runtime";function _e({src:e,alt:t,theme:r,...o}){let{theme:n}=ee();return r&&r!==n?null:rr("img",{src:e,alt:t||"",...o})}import{jsx as h,jsxs as z}from"react/jsx-runtime";function qe({title:e,props:t,className:r=""}){return z("div",{className:a("my-6",r),children:[e&&h("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),h("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:z("table",{className:"w-full border-collapse text-sm",children:[h("thead",{children:z("tr",{children:[h("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"}),h("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"}),h("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"}),h("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"})]})}),h("tbody",{children:t.map((o,n)=>z("tr",{className:"transition-colors hover:bg-bg-surface",children:[z("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[h("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:o.name}),o.required&&h("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),h("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:h("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:o.type})}),h("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:o.defaultValue?h("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:o.defaultValue}):h("span",{className:"text-text-dim",children:"\u2014"})}),h("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:o.description})]},`${o.name}-${n}`))})]})})]})}import{useMemo as Ge}from"react";function Xe(e){let{code:t,children:r,preview:o}=e,n=Ge(()=>(t??(typeof r=="string"?r:"")).trim(),[t,r]),s=Ge(()=>o??(typeof r!="string"?r:null),[o,r]);return{initialCode:n,previewElement:s}}import{jsx as J,jsxs as or}from"react/jsx-runtime";function Ke(e){let{highlightedHtml:t,hideCode:r=!1,hideSandbox:o=!1,hideCopy:n=!1,sandboxOptions:s={}}=e,{initialCode:u,previewElement:p}=Xe(e);return or("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[J("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:p}),!r&&J("div",{className:"border-t border-border-subtle",children:J(L,{hideSandbox:o,hideCopy:n,title:s.title,lang:"tsx",highlightedHtml:t,children:u})})]})}export{ae as a,L as b,be as c,fe as d,ge as e,ye as f,Ne as g,Re as h,P as i,we as j,Te as k,Ae as l,Ee as m,Le as n,Ie as o,Ve as p,Se as q,Me as r,Oe as s,We as t,$e as u,_e as v,qe as w,Ke as x,nr as y};
@@ -0,0 +1 @@
1
+ import{c as $,g as H}from"./chunk-NBCYHLAA.mjs";import{useState as Ce,useEffect as ye}from"react";import{Button as Ne}from"react-aria-components";import{Search as Re,Sun as we,Moon as Pe,ExternalLink as Te,ChevronDown as Ae}from"lucide-react";import{jsx as b,jsxs as k}from"react/jsx-runtime";function A(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var ee=e=>k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...A(e),children:[b("title",{children:"GitHub"}),b("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),te=e=>k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...A(e),children:[b("title",{children:"Discord"}),b("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z"})]}),oe=e=>k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...A(e),children:[b("title",{children:"X"}),b("path",{d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"})]}),oo=e=>k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...A(e),children:[b("title",{children:"CodeSandbox"}),b("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]}),re=e=>k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...A(e),children:[b("title",{children:"Bluesky"}),b("path",{d:"M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"})]});import{jsx as a,jsxs as R}from"react/jsx-runtime";var ke=({children:e,className:t,...o})=>a("header",{className:n("boltdocs-navbar sticky top-0 z-50 w-full border-b border-border-subtle bg-bg-main/80 backdrop-blur-md",t),...o,children:e}),Ie=({children:e,className:t})=>a("div",{className:n("mx-auto flex lg:h-navbar max-w-(--breakpoint-3xl) items-center justify-between px-4 md:px-6",t),children:e}),Be=({children:e,className:t})=>a("div",{className:n("flex items-center gap-4",t),children:e}),Le=({children:e,className:t})=>a("div",{className:n("flex items-center gap-2 md:gap-4",t),children:e}),Se=({children:e,className:t})=>a("div",{className:n("hidden lg:flex flex-1 justify-center items-center gap-4 px-4",t),children:e}),Me=({src:e,alt:t,width:o=24,height:r=24,className:s})=>a(y,{href:"/",className:n("flex items-center gap-2 shrink-0 outline-none",s),children:e?a("img",{src:e,alt:t,width:o,height:r,className:"h-6 w-6 object-contain"}):null}),Oe=({children:e,className:t})=>a("span",{className:n("text-lg font-bold tracking-tight hidden sm:inline-block",t),children:e}),Ee=({children:e,className:t})=>a("nav",{className:n("hidden md:flex items-center gap-6 text-sm font-medium",t),children:e}),ze=({label:e,href:t,active:o,to:r,className:s})=>R(y,{href:t,target:r==="external"?"_blank":void 0,className:n("transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm",{"text-primary-500 font-bold":o,"text-text-muted hover:text-text-main font-medium":!o},s),children:[e,r==="external"&&a("span",{className:"ml-1 inline-block",children:a(Te,{size:12})})]}),De=({className:e,onPress:t})=>{let[o,r]=Ce(!1),s=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return ye(()=>{r(!0)},[]),R(Ne,{onPress:t,className:n("flex items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-muted outline-none cursor-pointer","transition-all duration-200 hover:border-border-strong hover:text-text-main hover:bg-bg-muted hover:shadow-sm active:scale-[0.98]","focus-visible:ring-2 focus-visible:ring-primary-500/30","w-full max-w-[320px] justify-between",e),children:[R("div",{className:"flex items-center gap-2",children:[a(Re,{size:16}),a("span",{className:"hidden sm:inline-block",children:"Search docs..."})]}),R("div",{className:"hidden sm:flex items-center gap-1 pointer-events-none select-none",children:[a("kbd",{className:"flex h-5 items-center justify-center rounded border border-border-subtle bg-bg-main px-1.5 font-mono text-[10px] font-medium",children:s?"\u2318":"Ctrl"}),a("kbd",{className:"flex h-5 w-5 items-center justify-center rounded border border-border-subtle bg-bg-main font-mono text-[10px] font-medium",children:"K"})]})]})},He=({className:e,theme:t,onThemeChange:o})=>a(ie,{isSelected:t==="dark",onChange:o,className:n("rounded-md p-2 text-text-muted outline-none cursor-pointer","transition-all duration-300 hover:bg-bg-surface hover:text-text-main hover:rotate-12 active:scale-90","focus-visible:ring-2 focus-visible:ring-primary-500/30",e),"aria-label":"Toggle theme",children:t==="dark"?a(we,{size:20}):a(Pe,{size:20})}),lo=({label:e,children:t,className:o,icon:r})=>R(V,{placement:"bottom end",children:[R(ne,{variant:"ghost",className:n("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-text-muted outline-none cursor-pointer transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:[r&&a("span",{className:"flex items-center shrink-0",children:r}),a("span",{className:"text-[13px] font-bold uppercase tracking-wide",children:e}),a(Ae,{size:14,className:"ml-0.5 opacity-50"})]}),a(G,{className:"min-w-[180px]",children:t})]}),Ve=({label:e,className:t,onPress:o,isCurrent:r})=>a(F,{onAction:o,className:n(r&&"bg-primary-500 text-white font-medium hover:bg-primary-600 focus:bg-primary-600 focus:text-white",t),children:e}),Ge=({name:e})=>{if(e==="github")return a(ee,{});if(e==="discord")return a(te,{});if(e==="x")return a(oe,{});if(e==="bluesky")return a(re,{})},Fe=({icon:e,link:t,className:o})=>a(y,{href:t,target:"_blank",rel:"noopener noreferrer",className:n("rounded-md p-2 text-text-muted outline-none transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:a(Ge,{name:e})}),We=({className:e})=>a(se,{orientation:"vertical",className:n("h-6 w-px bg-border-subtle mx-1",e)}),co={NavbarRoot:ke,NavbarLeft:Be,NavbarRight:Le,NavbarCenter:Se,NavbarLogo:Me,Title:Oe,Links:Ee,Link:ze,SearchTrigger:De,Theme:He,Item:Ve,Socials:Fe,Split:We,Content:Ie};import*as I from"react-aria-components";import{ChevronDown as bo}from"lucide-react";import{clsx as je}from"clsx";import{twMerge as _e}from"tailwind-merge";function n(...e){return _e(je(e))}import{Fragment as No,jsx as Co,jsxs as yo}from"react/jsx-runtime";import*as d from"react-aria-components";import{Search as Xe,Hash as Ke,FileText as Ue,CornerDownLeft as Ze}from"lucide-react";import{Fragment as rt,jsx as p,jsxs as W}from"react/jsx-runtime";var qe=({children:e,isOpen:t,onOpenChange:o,className:r})=>p(d.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:n("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:p(d.Modal,{className:n("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",r),children:p(d.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Je=({children:e,className:t,onSelectionChange:o,...r})=>p("div",{className:t,children:p(d.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),Qe=({className:e,...t})=>W(d.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[p(Xe,{className:"h-5 w-5 text-text-muted"}),p(d.Input,{...t,className:n("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),p("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:p("kbd",{className:"font-sans",children:"ESC"})})]}),Ye=({children:e,className:t,...o})=>p(d.ListBox,{...o,className:n("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),$e=({children:e,className:t,...o})=>p(d.ListBoxItem,{...o,className:n("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:r=>W(rt,{children:[e,(r.isFocused||r.isSelected)&&W("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[p("span",{className:"text-[10px]",children:"Select"}),p(Ze,{size:10})]})]})}),et=({isHeading:e,className:t})=>p("div",{className:n("shrink-0",t),children:e?p(Ke,{size:18}):p(Ue,{size:18})}),tt=({children:e,className:t})=>p("span",{className:n("block font-medium truncate flex-1 text-sm",t),children:e}),ot=({children:e,className:t})=>p("span",{className:n("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),To={Root:qe,Autocomplete:Je,Input:Qe,List:Ye,Item:Object.assign($e,{Icon:et,Title:tt,Bio:ot})};import{createContext as le,use as _,useEffect as M,useImperativeHandle as it,useMemo as K,useRef as ce,useState as U}from"react";import at from"scroll-into-view-if-needed";import{useEffect as nt,useRef as st}from"react";function ae(e,t){let o=st(e);nt(()=>{o.current!==e&&(t(e),o.current=e)},[e,t])}function j(e){return e.startsWith("#")?e.slice(1):null}import{jsx as v}from"react/jsx-runtime";var Z=le(null),me=le(null),X=class{items=[];single=!1;observer=null;onChange;callback(t){if(t.length===0)return;let o=!1;if(this.items=this.items.map(r=>{let s=t.find(l=>l.target.id===r.id),i=s?s.isIntersecting:r.active&&!r.fallback;return this.single&&o&&(i=!1),r.active!==i&&(r={...r,t:Date.now(),active:i,fallback:!1}),i&&(o=!0),r}),!o&&t[0].rootBounds){let r=t[0].rootBounds.top,s=Number.MAX_VALUE,i=-1;for(let l=0;l<this.items.length;l++){let c=document.getElementById(this.items[l].id);if(!c)continue;let u=Math.abs(r-c.getBoundingClientRect().top);u<s&&(i=l,s=u)}i!==-1&&(this.items[i]={...this.items[i],active:!0,fallback:!0,t:Date.now()})}this.onChange?.()}setItems(t){let o=this.observer;if(o)for(let r of this.items){let s=document.getElementById(r.id);s&&o.unobserve(s)}this.items=[];for(let r of t){let s=j(r.url);s&&this.items.push({id:s,active:!1,fallback:!1,t:0,original:r})}this.watchItems(),typeof window<"u"&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(t){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),t),this.watchItems())}watchItems(){if(this.observer)for(let t of this.items){let o=document.getElementById(t.id);o&&this.observer.observe(o)}}unwatch(){this.observer?.disconnect(),this.observer=null}};function pe(){let e=_(Z);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function lt(e){let[t,o]=U({isOverflowing:!1,isAtBottom:!1});return M(()=>{let r=e.current;if(!r)return;let s=()=>{let l=r.scrollHeight>r.clientHeight,c=r.scrollHeight-r.scrollTop<=r.clientHeight+2;o({isOverflowing:l,isAtBottom:c})};s(),r.addEventListener("scroll",s,{passive:!0}),window.addEventListener("resize",s);let i=new MutationObserver(s);return i.observe(r,{childList:!0,subtree:!0}),()=>{r.removeEventListener("scroll",s),window.removeEventListener("resize",s),i.disconnect()}},[e]),t}function Ho(){let e=pe();return K(()=>{let t;for(let o of e)o.active&&(!t||o.t>t.t)&&(t=o);return t?.id},[e])}function Vo(){let e=pe();return K(()=>{let t=[];for(let o of e)o.active&&t.push(o.id);return t},[e])}function Go({containerRef:e,children:t}){return v(me.Provider,{value:e,children:t})}function Fo({toc:e,single:t=!1,children:o}){let r=K(()=>new X,[]),[s,i]=U(r.items);return r.single=t,M(()=>{r.setItems(e)},[r,e]),M(()=>(r.watch({rootMargin:"0px",threshold:.98}),r.onChange=()=>i([...r.items]),()=>{r.unwatch()}),[r]),v(Z.Provider,{value:s,children:o})}var ct=({children:e,className:t})=>v("nav",{className:n("sticky top-navbar hidden xl:flex flex-col shrink-0","w-toc","py-8 pl-6 pr-4",t),children:e}),mt=({children:e,className:t,...o})=>v("div",{className:n("mb-4 text-xs font-bold uppercase tracking-wider text-text-main",t),...o,children:e}),de=({children:e,className:t,ref:o,...r})=>{let s=ce(null);it(o,()=>s.current);let{isOverflowing:i,isAtBottom:l}=lt(s);return v("div",{ref:s,className:n("relative overflow-y-auto boltdocs-otp-content",i&&!l&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...r,children:e})};de.displayName="OnThisPageContent";var pt=({children:e,className:t})=>v("ul",{className:n("relative space-y-1 text-sm border-l border-border-subtle",t),children:e}),dt=({level:e,children:t,className:o})=>v("li",{className:n(e===3&&"pl-3",o),children:t}),ut=({children:e,href:t,active:o,onClick:r,className:s})=>{let i=_(Z),l=_(me),c=t?j(t):null,u=ce(null),[g,C]=U(o);return ae(c&&i?i.find(f=>f.id===c)?.active:null,f=>{f!==null&&f!==g&&(C(!!f),f&&u.current&&l?.current&&at(u.current,{behavior:"smooth",block:"center",inline:"center",scrollMode:"if-needed",boundary:l.current}))}),M(()=>{o!==void 0&&C(o)},[o]),v("a",{ref:u,href:t,onClick:r,"data-active":g,className:n("block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main",g?"text-primary-500 font-medium":"text-text-muted",s),children:e})},ft=({style:e,className:t})=>v("div",{className:n("absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300",t),style:e}),Wo={OnThisPageRoot:ct,OnThisPageHeader:mt,OnThisPageContent:de,OnThisPageList:pt,OnThisPageItem:dt,OnThisPageLink:ut,OnThisPageIndicator:ft};import*as ue from"react-aria-components";import{ChevronLeft as gt,ChevronRight as xt}from"lucide-react";import{Fragment as Rt,jsx as N,jsxs as Nt}from"react/jsx-runtime";var bt=({children:e,className:t})=>N("nav",{className:n("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),ht=({children:e,to:t,direction:o,className:r})=>{let s=o==="next";return Nt(ue.Link,{href:t,className:n("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",s?"text-right justify-end":"text-left justify-start",r),children:[!s&&N(gt,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),N("div",{className:"flex flex-col gap-1 flex-1",children:e}),s&&N(xt,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},vt=({children:e,className:t})=>N("span",{className:n("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Ct=({children:e,className:t})=>N("span",{className:n("text-base font-bold text-text-main truncate",t),children:e}),yt=({children:e})=>N(Rt,{children:e}),Uo={PageNavRoot:bt,PageNavLink:Object.assign(ht,{Title:vt,Description:Ct,Icon:yt})};import{jsx as B}from"react/jsx-runtime";var wt=({children:e,className:t="",...o})=>B("div",{className:n("w-full",t),...o,children:e}),Pt=({children:e,className:t=""})=>B("div",{role:"tablist",className:n("relative flex flex-row items-center border-b border-border-subtle",t),children:e}),Tt=({children:e,id:t,selected:o,className:r="",...s})=>B("button",{role:"tab","aria-selected":o,className:n("flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors outline-none cursor-pointer bg-transparent border-none",o?"text-primary-500":"text-text-muted hover:text-text-main",r),...s,children:e}),At=({children:e,className:t=""})=>B("div",{className:n("p-4 outline-none",t),children:e}),kt=({className:e="",style:t})=>B("div",{className:n("absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300",e),style:t}),Qo={TabsRoot:wt,TabsList:Pt,TabsItem:Tt,TabsContent:At,TabsIndicator:kt};import fe from"react";import{Link as It}from"react-aria-components";import{useLocation as Bt}from"react-router-dom";import{jsx as ge}from"react/jsx-runtime";var y=fe.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:s,onFocus:i,...l}=e,c=H(o??""),{preload:u}=$();return ge(It,{...l,ref:t,href:c,onMouseEnter:f=>{s?.(f),r==="hover"&&typeof c=="string"&&c.startsWith("/")&&u(c)},onFocus:f=>{i?.(f),r==="hover"&&typeof c=="string"&&c.startsWith("/")&&u(c)}})});y.displayName="Link";var Lt=fe.forwardRef((e,t)=>{let{href:o,end:r=!1,className:s,children:i,...l}=e,c=Bt(),u=H(o??""),g=r?c.pathname===u:c.pathname.startsWith(u),C=typeof s=="function"?s({isActive:g}):n(s,g&&"active"),f=typeof i=="function"?i({isActive:g}):i;return ge(y,{...l,ref:t,href:o,className:C,children:f})});Lt.displayName="NavLink";import*as xe from"react-aria-components";import{ChevronRight as St}from"lucide-react";import{jsx as h,jsxs as O}from"react/jsx-runtime";var Mt=({badge:e})=>{let t={new:"bg-primary-500/20 text-primary-500",updated:"bg-gray-500/20 text-gray-500",deprecated:"bg-red-500/20 text-red-500"};if(typeof e=="object"&&e?.expires){let r=new Date(e.expires),s=new Date,i=r.getTime()-s.getTime();if(Math.ceil(i/(1e3*60*60*24))===0)return null}let o=typeof e=="string"?e:e?.text;return h("span",{className:n("ml-auto flex h-4.5 items-center rounded-full text-[9px] font-medium px-1.5 py-0.5 text-center whitespace-nowrap",t[o]||t.new),children:o})},Ot=({children:e,className:t})=>h("aside",{className:n("boltdocs-sidebar sticky top-navbar hidden lg:flex flex-col shrink-0","w-sidebar h-full","overflow-y-auto border-r border-border-subtle bg-bg-main","py-6 px-4",t),children:h("nav",{className:"flex-1 space-y-6",children:e})}),Et=({children:e,title:t,icon:o,isOpen:r=!0,onToggle:s,className:i})=>O("div",{className:n("space-y-1",i),children:[t&&O(xe.Button,{onPress:s,className:n("flex w-full items-center justify-between px-2 py-1.5 text-xs font-bold uppercase tracking-wider outline-none cursor-pointer","text-text-muted hover:text-text-main transition-colors","focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md"),children:[O("div",{className:"flex items-center gap-2",children:[o&&h(o,{size:14}),t]}),h(St,{size:14,className:n("transition-transform duration-200",r&&"rotate-90")})]}),r&&h("div",{className:"space-y-0.5",children:e})]}),zt=({children:e,className:t})=>h("div",{className:n(t),children:e}),Dt=({label:e,href:t,active:o,icon:r,badge:s,className:i})=>O(y,{href:t,className:n("group flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none","transition-all duration-200 ease-in-out","focus-visible:ring-2 focus-visible:ring-primary-500/30",o?"bg-primary-500/10 text-primary-500 font-medium":"text-text-muted hover:bg-bg-surface hover:text-text-main hover:translate-x-1",i),children:[r&&h(r,{size:16,className:n(o?"text-primary-500":"text-text-muted group-hover:text-text-main")}),h("span",{className:"truncate",children:e}),s&&h(Mt,{badge:s})]}),pr={SidebarRoot:Ot,SidebarGroup:Et,SidebarGroupItem:zt,SidebarLink:Dt};import{Breadcrumb as Ht,Breadcrumbs as Vt,Link as Gt}from"react-aria-components";import{ChevronRight as Ft}from"lucide-react";import{jsx as E}from"react/jsx-runtime";var br=({children:e,className:t,...o})=>E(Vt,{className:n("flex items-center gap-1.5 pl-0! mb-0 text-sm text-text-muted",t),...o,children:e}),hr=({children:e,className:t,...o})=>E(Ht,{className:n("flex items-center mb-0 gap-1.5",t),...o,children:e}),vr=({children:e,href:t,className:o,...r})=>E(Gt,{href:t,className:n("transition-colors outline-none hover:text-text-main focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm","current:font-medium current:text-text-main current:pointer-events-none cursor-pointer",o),...r,children:e}),Cr=({className:e})=>E(Ft,{size:14,className:n("shrink-0 text-text-dim",e)});import*as z from"react-aria-components";import{cva as Wt}from"class-variance-authority";import{Fragment as jt,jsx as w,jsxs as _t}from"react/jsx-runtime";var be=Wt("flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none",{variants:{variant:{primary:"bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg",secondary:"bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong",outline:"bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500",ghost:"bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main",danger:"bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15",success:"bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15",warning:"bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15",info:"bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15",subtle:"bg-primary-500/10 text-primary-500 hover:bg-primary-500/20",link:"bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline"},size:{sm:"min-h-8 px-3.5 text-[0.8125rem] gap-1.5",md:"min-h-10 px-5 text-[0.9375rem] gap-2",lg:"min-h-12 px-7 text-[1.05rem] gap-2.5"},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},iconSize:{sm:"w-8 h-8 p-0",md:"w-10 h-10 p-0",lg:"w-12 h-12 p-0"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:null}},defaultVariants:{variant:"primary",size:"md",rounded:"md"}}),ne=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:s,className:i,variant:l,size:c,rounded:u,iconSize:g,disabled:C,...f})=>{let D=r||!s&&!!t,Y=D?w("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):_t(jt,{children:[t&&o==="left"&&w("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),w("span",{className:"flex items-center",children:s}),t&&o==="right"&&w("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?w(z.Link,{href:e,className:n(be({variant:l,size:c,rounded:u,iconSize:D?g:void 0,disabled:C}),i),...f,children:Y}):w(z.Button,{className:n(be({variant:l,size:c,rounded:u,iconSize:D?g:void 0,disabled:C}),i),...f,children:Y})};import{jsx as Xt}from"react/jsx-runtime";var kr=({children:e,className:t,vertical:o=!1})=>Xt("div",{className:n("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});import{Check as Ut,ChevronRight as Zt,Dot as qt}from"lucide-react";import he from"react";import*as m from"react-aria-components";import*as P from"react-aria-components";import{jsx as q,jsxs as Kt}from"react/jsx-runtime";var J=({children:e,className:t,showArrow:o,...r})=>Kt(P.Popover,{offset:8,...r,className:P.composeRenderProps(t,s=>n("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards",s)),children:[o&&q(P.OverlayArrow,{className:"group",children:q("svg",{viewBox:"0 0 12 12",className:"block h-3 w-3 fill-bg-surface/80 stroke-border-subtle group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90","aria-hidden":"true",children:q("path",{d:"M0 0 L6 6 L12 0"})})}),e]});import{Fragment as $t,jsx as x,jsxs as L}from"react/jsx-runtime";function V(e){let[t,o]=he.Children.toArray(e.children).slice(0,2);return L(m.MenuTrigger,{...e,children:[t,x(J,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function Jt(e){let[t,o]=he.Children.toArray(e.children).slice(0,2);return L(m.SubmenuTrigger,{...e,children:[t,x(J,{offset:-4,crossOffset:-4,children:o})]})}function G(e){return x(m.Menu,{...e,className:m.composeRenderProps(e.className,t=>n("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function F(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return x(m.MenuItem,{...e,textValue:t,className:m.composeRenderProps(e.className,(o,{isFocused:r,isPressed:s,isDisabled:i})=>n("group relative flex flex-row items-center gap-2.5 px-3 py-1.5 rounded-lg outline-none cursor-default transition-all duration-200","text-text-main text-[0.8125rem]",r&&"bg-primary-500/10 text-primary-600 shadow-sm",s&&"scale-[0.98] bg-primary-500/15",i&&"opacity-40 grayscale pointer-events-none",o)),children:m.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:s,hasSubmenu:i})=>L($t,{children:[r!=="none"&&L("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[s&&r==="multiple"&&x(Ut,{className:"w-3.5 h-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),s&&r==="single"&&x(qt,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),x("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),i&&x(Zt,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function Qt({title:e,...t}){return L(m.MenuSection,{...t,className:n("flex flex-col gap-0.5",t.className),children:[e&&x(m.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),x(m.Collection,{items:t.items,children:t.children})]})}function Yt(e){return x(m.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}var Hr={Root:G,Item:F,Trigger:V,SubTrigger:Jt,Section:Qt,Separator:Yt};import*as T from"react-aria-components";import{Fragment as to,jsx as S,jsxs as Q}from"react/jsx-runtime";var eo=({className:e,children:t,...o})=>S(T.Tooltip,{...o,offset:8,className:r=>n("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>Q(to,{children:[S(T.OverlayArrow,{children:Q("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90",children:[S("title",{children:"Arrow"}),S("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),Wr=({content:e,children:t,delay:o=500,closeDelay:r=0,...s})=>Q(T.TooltipTrigger,{delay:o,closeDelay:r,children:[t,S(eo,{...s,children:e})]});import{Separator as se,ToggleButton as ie}from"react-aria-components";export{n as a,y as b,Lt as c,be as d,ne as e,ee as f,oo as g,Wr as h,ke as i,Ie as j,Be as k,Le as l,Se as m,Me as n,Oe as o,Ee as p,ze as q,De as r,He as s,lo as t,Ve as u,Ge as v,Fe as w,We as x,co as y,qe as z,Je as A,Qe as B,Ye as C,$e as D,et as E,tt as F,ot as G,pe as H,lt as I,Ho as J,Vo as K,Go as L,Fo as M,ct as N,mt as O,de as P,pt as Q,dt as R,ut as S,ft as T,Wo as U,bt as V,ht as W,vt as X,Ct as Y,yt as Z,Uo as _,wt as $,Pt as aa,Tt as ba,At as ca,kt as da,Qo as ea,Ot as fa,Et as ga,zt as ha,Dt as ia,pr as ja,br as ka,hr as la,vr as ma,Cr as na,kr as oa,J as pa,V as qa,Jt as ra,G as sa,F as ta,Qt as ua,Yt as va,Hr as wa,se as xa,ie as ya};
@@ -0,0 +1 @@
1
+ var E=Object.defineProperty;var y=(s,t)=>()=>(s&&(t=s(s=0)),t);var V=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports),q=(s,t)=>{for(var e in t)E(s,e,{get:t[e],enumerable:!0})};import J from"path";import{fileURLToPath as X}from"url";var u=y(()=>{"use strict"});import P from"fs";import L from"gray-matter";import O from"isomorphic-dompurify";function tt(s){return s.replace(/\\/g,"/")}function M(s){return s.replace(/^\d+\./,"")}function et(s){let t=s.match(/^(\d+)\./);return t?parseInt(t[1],10):void 0}function st(s){return/\.mdx?$/.test(s)}function m(s){try{return P.statSync(s).mtimeMs}catch{return 0}}function rt(s){let t=P.readFileSync(s,"utf-8");try{let{data:e,content:r}=L(t);return{data:e,content:r}}catch{return{data:{},content:t}}}function A(s){return s.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function it(s){return A(s)}function nt(s){let e=s.split("/").map(M).join("/").replace(/\/$/,"");return e=e.replace(/\.mdx?$/,""),(e==="index"||e.endsWith("/index"))&&(e=e.replace(/index$/,"")),e.startsWith("/")||(e="/"+e),e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e}function at(s){return O.sanitize(s)}function ct(s){return O.sanitize(s,{ALLOWED_TAGS:[],KEEP_CONTENT:!0})}function ot(s){return s.charAt(0).toUpperCase()+s.slice(1)}function ht(s,t){return s?typeof s=="string"?s:t&&s[t]?s[t]:Object.values(s)[0]||"":""}var _=y(()=>{"use strict";u()});import a from"fs";import o from"path";import g from"crypto";import d from"zlib";import{promisify as l}from"util";async function vt(){await h.flush()}var p,B,f,S,xt,C,N,R,j,I,x,v,h,b,z,$,K=y(()=>{u();_();p=l(a.writeFile),B=l(a.readFile),f=l(a.mkdir),S=l(a.rename),xt=l(a.unlink),C=process.env.BOLTDOCS_CACHE_DIR||".boltdocs",N="assets",R="shards",j=parseInt(process.env.BOLTDOCS_CACHE_LRU_LIMIT||"2000",10),I=process.env.BOLTDOCS_CACHE_COMPRESS!=="0",x=class{constructor(t){this.limit=t}cache=new Map;get(t){let e=this.cache.get(t);return e!==void 0&&(this.cache.delete(t),this.cache.set(t,e)),e}set(t,e){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.limit){let r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(t,e)}get size(){return this.cache.size}clear(){this.cache.clear()}},v=class{queue=Promise.resolve();pendingCount=0;add(t){this.pendingCount++,this.queue=this.queue.then(t).finally(()=>{this.pendingCount--})}async flush(){await this.queue}get pending(){return this.pendingCount}},h=new v,b=class{entries=new Map;cachePath=null;compress;constructor(t={}){if(this.compress=t.compress!==void 0?t.compress:I,t.name){let e=t.root||process.cwd(),r=this.compress?"json.gz":"json";this.cachePath=o.resolve(e,C,`${t.name}.${r}`)}}load(){if(process.env.BOLTDOCS_NO_CACHE!=="1"&&!(!this.cachePath||!a.existsSync(this.cachePath)))try{let t=a.readFileSync(this.cachePath);this.cachePath.endsWith(".gz")&&(t=d.gunzipSync(t));let e=JSON.parse(t.toString("utf-8"));this.entries=new Map(Object.entries(e))}catch{}}save(){if(process.env.BOLTDOCS_NO_CACHE==="1"||!this.cachePath)return;let t=Object.fromEntries(this.entries),e=JSON.stringify(t),r=this.cachePath,n=this.compress;h.add(async()=>{try{await f(o.dirname(r),{recursive:!0});let i=Buffer.from(e);n&&(i=d.gzipSync(i));let c=`${r}.${g.randomBytes(4).toString("hex")}.tmp`;await p(c,i),await S(c,r)}catch{}})}get(t){let e=this.entries.get(t);return!e||m(t)!==e.mtime?null:e.data}set(t,e){this.entries.set(t,{data:e,mtime:m(t)})}isValid(t){let e=this.entries.get(t);return e?m(t)===e.mtime:!1}invalidate(t){this.entries.delete(t)}invalidateAll(){this.entries.clear()}pruneStale(t){for(let e of this.entries.keys())t.has(e)||this.entries.delete(e)}get size(){return this.entries.size}async flush(){await h.flush()}},z=class{index=new Map;memoryCache=new x(j);baseDir;shardsDir;indexPath;constructor(t,e=process.cwd()){this.baseDir=o.resolve(e,C,`transform-${t}`),this.shardsDir=o.resolve(this.baseDir,R),this.indexPath=o.resolve(this.baseDir,"index.json")}load(){if(process.env.BOLTDOCS_NO_CACHE!=="1"&&a.existsSync(this.indexPath))try{let t=a.readFileSync(this.indexPath,"utf-8");this.index=new Map(Object.entries(JSON.parse(t)))}catch{}}save(){if(process.env.BOLTDOCS_NO_CACHE==="1")return;let t=JSON.stringify(Object.fromEntries(this.index)),e=this.indexPath;h.add(async()=>{await f(o.dirname(e),{recursive:!0}),await p(e,t)})}async getMany(t){let e=new Map,r=[];for(let n of t){let i=this.memoryCache.get(n);i?e.set(n,i):this.index.has(n)&&r.push(n)}if(r.length>0){let n=await Promise.all(r.map(async i=>{let c=this.index.get(i),T=o.resolve(this.shardsDir,`${c}.gz`);try{let w=await B(T),D=d.gunzipSync(w).toString("utf-8");return this.memoryCache.set(i,D),{key:i,val:D}}catch{return null}}));for(let i of n)i&&e.set(i.key,i.val)}return e}get(t){let e=this.memoryCache.get(t);if(e)return e;let r=this.index.get(t);if(!r)return null;let n=o.resolve(this.shardsDir,`${r}.gz`);if(!a.existsSync(n))return null;try{let i=a.readFileSync(n),c=d.gunzipSync(i).toString("utf-8");return this.memoryCache.set(t,c),c}catch{return null}}set(t,e){let r=g.createHash("md5").update(e).digest("hex");this.index.set(t,r),this.memoryCache.set(t,e);let n=o.resolve(this.shardsDir,`${r}.gz`);h.add(async()=>{if(a.existsSync(n))return;await f(this.shardsDir,{recursive:!0});let i=d.gzipSync(Buffer.from(e)),c=`${n}.${g.randomBytes(4).toString("hex")}.tmp`;await p(c,i),await S(c,n)})}get size(){return this.index.size}async flush(){await h.flush()}},$=class{assetsDir;constructor(t=process.cwd()){this.assetsDir=o.resolve(t,C,N)}getFileHash(t){return g.createHash("md5").update(a.readFileSync(t)).digest("hex")}get(t,e){if(!a.existsSync(t))return null;let r=this.getFileHash(t),n=this.getCachedPath(t,`${e}-${r}`);return a.existsSync(n)?n:null}set(t,e,r){let n=this.getFileHash(t),i=this.getCachedPath(t,`${e}-${n}`);h.add(async()=>{await f(this.assetsDir,{recursive:!0});let c=`${i}.${g.randomBytes(4).toString("hex")}.tmp`;await p(c,r),await S(c,i)})}getCachedPath(t,e){let r=o.extname(t),n=o.basename(t,r),i=e.replace(/[^a-z0-9]/gi,"-").toLowerCase();return o.join(this.assetsDir,`${n}.${i}${r}`)}clear(){a.existsSync(this.assetsDir)&&a.rmSync(this.assetsDir,{recursive:!0,force:!0})}async flush(){await h.flush()}}});export{y as a,V as b,q as c,u as d,tt as e,M as f,et as g,st as h,rt as i,A as j,it as k,nt as l,at as m,ct as n,ot as o,ht as p,_ as q,b as r,z as s,$ as t,vt as u,K as v};
@@ -3,7 +3,7 @@ export { c as BoltdocsThemeConfig, C as ComponentRoute, L as LayoutProps, S as S
3
3
  export { u as useRoutes } from '../use-routes-DDL0_jkQ.mjs';
4
4
  import React__default from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
- export { B as Breadcrumbs, E as ErrorBoundary, H as Head, L as Loading, N as Navbar, a as NotFound, O as OnThisPage, P as PageNav, b as ProgressBar, S as Sidebar } from '../loading-BqGrFWO5.mjs';
6
+ export { B as Breadcrumbs, E as ErrorBoundary, H as Head, L as Loading, N as Navbar, a as NotFound, O as OnThisPage, P as PageNav, b as ProgressBar, S as Sidebar } from '../loading-WuaQbsKb.mjs';
7
7
  export { C as CopyMarkdown } from '../copy-markdown-CbS8X-qe.mjs';
8
8
  export { Admonition, AdmonitionProps, Badge, BadgeProps, Button, Card, CardProps, Cards, CardsProps, Caution, CodeBlock, ComponentPreview, ComponentPreviewProps, ComponentProps, ComponentPropsProps, Danger, Field, FieldProps, FileTree, FileTreeProps, Image, ImageProps, Important, InfoBox, Link, LinkProps, List, ListProps, Note, Tab, TabProps, Table, TableProps, Tabs, TabsProps, Tip, Video, Warning } from '../mdx/index.mjs';
9
9
  export { defineSandbox, embedSandbox, openSandbox } from '../integrations/index.mjs';
@@ -3,7 +3,7 @@ export { c as BoltdocsThemeConfig, C as ComponentRoute, L as LayoutProps, S as S
3
3
  export { u as useRoutes } from '../use-routes-Cd806kGw.js';
4
4
  import React__default from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
- export { B as Breadcrumbs, E as ErrorBoundary, H as Head, L as Loading, N as Navbar, a as NotFound, O as OnThisPage, P as PageNav, b as ProgressBar, S as Sidebar } from '../loading-chS3pm9W.js';
6
+ export { B as Breadcrumbs, E as ErrorBoundary, H as Head, L as Loading, N as Navbar, a as NotFound, O as OnThisPage, P as PageNav, b as ProgressBar, S as Sidebar } from '../loading-B7X5Wchs.js';
7
7
  export { C as CopyMarkdown } from '../copy-markdown-C-90ixSe.js';
8
8
  export { Admonition, AdmonitionProps, Badge, BadgeProps, Button, Card, CardProps, Cards, CardsProps, Caution, CodeBlock, ComponentPreview, ComponentPreviewProps, ComponentProps, ComponentPropsProps, Danger, Field, FieldProps, FileTree, FileTreeProps, Image, ImageProps, Important, InfoBox, Link, LinkProps, List, ListProps, Note, Tab, TabProps, Table, TableProps, Tabs, TabsProps, Tip, Video, Warning } from '../mdx/index.js';
9
9
  export { defineSandbox, embedSandbox, openSandbox } from '../integrations/index.js';