boltdocs 1.10.2 → 2.0.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 (250) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +21 -0
  3. package/dist/cache-7G6D532T.mjs +1 -0
  4. package/dist/chunk-A4HQPEPU.mjs +1 -0
  5. package/dist/chunk-BA5NH5HU.mjs +1 -0
  6. package/dist/chunk-BQCD3DWG.mjs +1 -0
  7. package/dist/chunk-H63UMKYF.mjs +1 -0
  8. package/dist/chunk-IWHRQHS7.mjs +1 -0
  9. package/dist/chunk-JZXLCA2E.mjs +1 -0
  10. package/dist/chunk-MFU7Q6WF.mjs +1 -0
  11. package/dist/chunk-QYPNX5UN.mjs +1 -0
  12. package/dist/chunk-XEAPSFMB.mjs +1 -0
  13. package/dist/client/components/mdx/index.d.mts +209 -0
  14. package/dist/client/components/mdx/index.d.ts +209 -0
  15. package/dist/client/components/mdx/index.js +1 -0
  16. package/dist/client/components/mdx/index.mjs +1 -0
  17. package/dist/client/hooks/index.d.mts +133 -0
  18. package/dist/client/hooks/index.d.ts +133 -0
  19. package/dist/client/hooks/index.js +1 -0
  20. package/dist/client/hooks/index.mjs +1 -0
  21. package/dist/client/index.d.mts +138 -298
  22. package/dist/client/index.d.ts +138 -298
  23. package/dist/client/index.js +1 -3630
  24. package/dist/client/index.mjs +1 -697
  25. package/dist/client/ssr.d.mts +7 -3
  26. package/dist/client/ssr.d.ts +7 -3
  27. package/dist/client/ssr.js +1 -2928
  28. package/dist/client/ssr.mjs +1 -33
  29. package/dist/{config-BsFQ-ErD.d.ts → config-CX4l-ZNp.d.mts} +42 -35
  30. package/dist/{config-BsFQ-ErD.d.mts → config-CX4l-ZNp.d.ts} +42 -35
  31. package/dist/node/index.d.mts +2 -4
  32. package/dist/node/index.d.ts +2 -4
  33. package/dist/node/index.js +31 -1161
  34. package/dist/node/index.mjs +31 -736
  35. package/dist/search-dialog-EB3N4TYM.mjs +1 -0
  36. package/dist/types-BuZWFT7r.d.ts +159 -0
  37. package/dist/types-CvT-SGbK.d.mts +159 -0
  38. package/dist/use-routes-5bAtAAYX.d.mts +30 -0
  39. package/dist/use-routes-BefRXY3v.d.ts +30 -0
  40. package/package.json +34 -12
  41. package/src/client/app/config-context.tsx +18 -0
  42. package/src/client/app/docs-layout.tsx +14 -0
  43. package/src/client/app/index.tsx +137 -262
  44. package/src/client/app/mdx-component.tsx +52 -0
  45. package/src/client/app/mdx-components-context.tsx +23 -0
  46. package/src/client/app/mdx-page.tsx +20 -0
  47. package/src/client/app/preload.tsx +38 -30
  48. package/src/client/app/router.tsx +30 -0
  49. package/src/client/app/scroll-handler.tsx +40 -0
  50. package/src/client/app/theme-context.tsx +75 -0
  51. package/src/client/components/default-layout.tsx +80 -0
  52. package/src/client/components/docs-layout.tsx +105 -0
  53. package/src/client/components/icons-dev.tsx +74 -0
  54. package/src/client/components/mdx/admonition.tsx +107 -0
  55. package/src/client/components/mdx/badge.tsx +41 -0
  56. package/src/client/components/mdx/button.tsx +35 -0
  57. package/src/client/components/mdx/card.tsx +124 -0
  58. package/src/client/components/mdx/code-block.tsx +119 -0
  59. package/src/client/components/mdx/component-preview.tsx +47 -0
  60. package/src/client/components/mdx/component-props.tsx +83 -0
  61. package/src/client/components/mdx/field.tsx +66 -0
  62. package/src/client/components/mdx/file-tree.tsx +287 -0
  63. package/src/client/components/mdx/hooks/use-code-block.ts +56 -0
  64. package/src/client/components/mdx/hooks/use-component-preview.ts +16 -0
  65. package/src/client/components/mdx/hooks/useTable.ts +74 -0
  66. package/src/client/components/mdx/hooks/useTabs.ts +68 -0
  67. package/src/client/components/mdx/image.tsx +23 -0
  68. package/src/client/components/mdx/index.ts +53 -0
  69. package/src/client/components/mdx/link.tsx +38 -0
  70. package/src/client/components/mdx/list.tsx +192 -0
  71. package/src/client/components/mdx/table.tsx +156 -0
  72. package/src/client/components/mdx/tabs.tsx +135 -0
  73. package/src/client/components/mdx/video.tsx +68 -0
  74. package/src/client/components/primitives/breadcrumbs.tsx +79 -0
  75. package/src/client/components/primitives/button-group.tsx +54 -0
  76. package/src/client/components/primitives/button.tsx +145 -0
  77. package/src/client/components/primitives/helpers/observer.ts +120 -0
  78. package/src/client/components/primitives/index.ts +17 -0
  79. package/src/client/components/primitives/link.tsx +122 -0
  80. package/src/client/components/primitives/menu.tsx +159 -0
  81. package/src/client/components/primitives/navbar.tsx +359 -0
  82. package/src/client/components/primitives/navigation-menu.tsx +116 -0
  83. package/src/client/components/primitives/on-this-page.tsx +461 -0
  84. package/src/client/components/primitives/page-nav.tsx +87 -0
  85. package/src/client/components/primitives/popover.tsx +47 -0
  86. package/src/client/components/primitives/search-dialog.tsx +183 -0
  87. package/src/client/components/primitives/sidebar.tsx +154 -0
  88. package/src/client/components/primitives/tabs.tsx +90 -0
  89. package/src/client/components/primitives/tooltip.tsx +83 -0
  90. package/src/client/components/primitives/types.ts +11 -0
  91. package/src/client/components/ui-base/breadcrumbs.tsx +42 -0
  92. package/src/client/components/ui-base/copy-markdown.tsx +112 -0
  93. package/src/client/components/ui-base/error-boundary.tsx +52 -0
  94. package/src/client/components/ui-base/github-stars.tsx +27 -0
  95. package/src/client/components/ui-base/head.tsx +69 -0
  96. package/src/client/components/ui-base/loading.tsx +87 -0
  97. package/src/client/components/ui-base/navbar.tsx +138 -0
  98. package/src/client/components/ui-base/not-found.tsx +24 -0
  99. package/src/client/components/ui-base/on-this-page.tsx +152 -0
  100. package/src/client/components/ui-base/page-nav.tsx +39 -0
  101. package/src/client/components/ui-base/powered-by.tsx +19 -0
  102. package/src/client/components/ui-base/progress-bar.tsx +67 -0
  103. package/src/client/components/ui-base/search-dialog.tsx +82 -0
  104. package/src/client/components/ui-base/sidebar.tsx +104 -0
  105. package/src/client/components/ui-base/tabs.tsx +65 -0
  106. package/src/client/components/ui-base/theme-toggle.tsx +32 -0
  107. package/src/client/hooks/index.ts +12 -0
  108. package/src/client/hooks/use-breadcrumbs.ts +22 -0
  109. package/src/client/hooks/use-i18n.ts +84 -0
  110. package/src/client/hooks/use-localized-to.ts +95 -0
  111. package/src/client/hooks/use-location.ts +5 -0
  112. package/src/client/hooks/use-navbar.ts +60 -0
  113. package/src/client/hooks/use-onthispage.ts +23 -0
  114. package/src/client/hooks/use-page-nav.ts +22 -0
  115. package/src/client/hooks/use-routes.ts +72 -0
  116. package/src/client/hooks/use-search.ts +71 -0
  117. package/src/client/hooks/use-sidebar.ts +49 -0
  118. package/src/client/hooks/use-tabs.ts +43 -0
  119. package/src/client/hooks/use-version.ts +78 -0
  120. package/src/client/index.ts +55 -17
  121. package/src/client/integrations/codesandbox.ts +179 -0
  122. package/src/client/ssr.tsx +27 -16
  123. package/src/client/theme/neutral.css +360 -0
  124. package/src/client/types.ts +131 -27
  125. package/src/client/utils/cn.ts +6 -0
  126. package/src/client/utils/copy-clipboard.ts +22 -0
  127. package/src/client/utils/get-base-file-path.ts +21 -0
  128. package/src/client/utils/github.ts +121 -0
  129. package/src/client/utils/use-on-change.ts +15 -0
  130. package/src/client/virtual.d.ts +24 -0
  131. package/src/node/cache.ts +156 -156
  132. package/src/node/config.ts +159 -103
  133. package/src/node/index.ts +13 -13
  134. package/src/node/mdx.ts +213 -61
  135. package/src/node/plugin/entry.ts +29 -18
  136. package/src/node/plugin/html.ts +11 -11
  137. package/src/node/plugin/index.ts +161 -84
  138. package/src/node/plugin/types.ts +2 -4
  139. package/src/node/routes/cache.ts +6 -6
  140. package/src/node/routes/index.ts +206 -113
  141. package/src/node/routes/parser.ts +102 -82
  142. package/src/node/routes/sorter.ts +15 -15
  143. package/src/node/routes/types.ts +24 -24
  144. package/src/node/ssg/index.ts +73 -47
  145. package/src/node/ssg/meta.ts +4 -4
  146. package/src/node/ssg/options.ts +5 -5
  147. package/src/node/ssg/sitemap.ts +14 -14
  148. package/src/node/utils.ts +54 -31
  149. package/tsconfig.json +25 -20
  150. package/tsup.config.ts +23 -14
  151. package/dist/PackageManagerTabs-NVT7G625.mjs +0 -99
  152. package/dist/SearchDialog-AGVF6JBO.mjs +0 -194
  153. package/dist/SearchDialog-YPDOM7Q6.css +0 -2847
  154. package/dist/Video-KNTY5BNO.mjs +0 -6
  155. package/dist/cache-KNL5B4EE.mjs +0 -12
  156. package/dist/chunk-7SFUJWTB.mjs +0 -211
  157. package/dist/chunk-FFBNU6IJ.mjs +0 -386
  158. package/dist/chunk-FMTOYQLO.mjs +0 -37
  159. package/dist/chunk-TKLQWU7H.mjs +0 -1920
  160. package/dist/chunk-Z7JHYNAS.mjs +0 -57
  161. package/dist/client/index.css +0 -2847
  162. package/dist/client/ssr.css +0 -2847
  163. package/dist/types-Dj-bfnC3.d.mts +0 -74
  164. package/dist/types-Dj-bfnC3.d.ts +0 -74
  165. package/src/client/theme/components/CodeBlock/CodeBlock.tsx +0 -61
  166. package/src/client/theme/components/CodeBlock/index.ts +0 -1
  167. package/src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx +0 -131
  168. package/src/client/theme/components/PackageManagerTabs/index.ts +0 -1
  169. package/src/client/theme/components/PackageManagerTabs/pkg-tabs.css +0 -64
  170. package/src/client/theme/components/Playground/Playground.tsx +0 -180
  171. package/src/client/theme/components/Playground/index.ts +0 -1
  172. package/src/client/theme/components/Playground/playground.css +0 -238
  173. package/src/client/theme/components/Video/Video.tsx +0 -84
  174. package/src/client/theme/components/Video/index.ts +0 -1
  175. package/src/client/theme/components/Video/video.css +0 -41
  176. package/src/client/theme/components/mdx/Admonition.tsx +0 -80
  177. package/src/client/theme/components/mdx/Badge.tsx +0 -31
  178. package/src/client/theme/components/mdx/Button.tsx +0 -50
  179. package/src/client/theme/components/mdx/Card.tsx +0 -80
  180. package/src/client/theme/components/mdx/Field.tsx +0 -60
  181. package/src/client/theme/components/mdx/FileTree.tsx +0 -229
  182. package/src/client/theme/components/mdx/List.tsx +0 -57
  183. package/src/client/theme/components/mdx/Table.tsx +0 -151
  184. package/src/client/theme/components/mdx/Tabs.tsx +0 -123
  185. package/src/client/theme/components/mdx/index.ts +0 -27
  186. package/src/client/theme/components/mdx/mdx-components.css +0 -764
  187. package/src/client/theme/icons/bun.tsx +0 -62
  188. package/src/client/theme/icons/deno.tsx +0 -20
  189. package/src/client/theme/icons/discord.tsx +0 -12
  190. package/src/client/theme/icons/github.tsx +0 -15
  191. package/src/client/theme/icons/npm.tsx +0 -13
  192. package/src/client/theme/icons/pnpm.tsx +0 -72
  193. package/src/client/theme/icons/twitter.tsx +0 -12
  194. package/src/client/theme/styles/markdown.css +0 -394
  195. package/src/client/theme/styles/variables.css +0 -175
  196. package/src/client/theme/styles.css +0 -39
  197. package/src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx +0 -68
  198. package/src/client/theme/ui/Breadcrumbs/index.ts +0 -1
  199. package/src/client/theme/ui/CopyMarkdown/CopyMarkdown.tsx +0 -82
  200. package/src/client/theme/ui/CopyMarkdown/copy-markdown.css +0 -112
  201. package/src/client/theme/ui/CopyMarkdown/index.ts +0 -1
  202. package/src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx +0 -50
  203. package/src/client/theme/ui/ErrorBoundary/error-boundary.css +0 -55
  204. package/src/client/theme/ui/ErrorBoundary/index.ts +0 -1
  205. package/src/client/theme/ui/Footer/footer.css +0 -32
  206. package/src/client/theme/ui/Head/Head.tsx +0 -69
  207. package/src/client/theme/ui/Head/index.ts +0 -1
  208. package/src/client/theme/ui/LanguageSwitcher/LanguageSwitcher.tsx +0 -125
  209. package/src/client/theme/ui/LanguageSwitcher/index.ts +0 -1
  210. package/src/client/theme/ui/LanguageSwitcher/language-switcher.css +0 -98
  211. package/src/client/theme/ui/Layout/Layout.tsx +0 -203
  212. package/src/client/theme/ui/Layout/base.css +0 -106
  213. package/src/client/theme/ui/Layout/index.ts +0 -2
  214. package/src/client/theme/ui/Layout/pagination.css +0 -72
  215. package/src/client/theme/ui/Layout/responsive.css +0 -47
  216. package/src/client/theme/ui/Link/Link.tsx +0 -392
  217. package/src/client/theme/ui/Link/LinkPreview.tsx +0 -59
  218. package/src/client/theme/ui/Link/index.ts +0 -2
  219. package/src/client/theme/ui/Link/link-preview.css +0 -48
  220. package/src/client/theme/ui/Loading/Loading.tsx +0 -10
  221. package/src/client/theme/ui/Loading/index.ts +0 -1
  222. package/src/client/theme/ui/Loading/loading.css +0 -30
  223. package/src/client/theme/ui/Navbar/GithubStars.tsx +0 -27
  224. package/src/client/theme/ui/Navbar/Navbar.tsx +0 -193
  225. package/src/client/theme/ui/Navbar/Tabs.tsx +0 -99
  226. package/src/client/theme/ui/Navbar/index.ts +0 -2
  227. package/src/client/theme/ui/Navbar/navbar.css +0 -347
  228. package/src/client/theme/ui/NotFound/NotFound.tsx +0 -19
  229. package/src/client/theme/ui/NotFound/index.ts +0 -1
  230. package/src/client/theme/ui/NotFound/not-found.css +0 -64
  231. package/src/client/theme/ui/OnThisPage/OnThisPage.tsx +0 -244
  232. package/src/client/theme/ui/OnThisPage/index.ts +0 -1
  233. package/src/client/theme/ui/OnThisPage/toc.css +0 -152
  234. package/src/client/theme/ui/PoweredBy/PoweredBy.tsx +0 -18
  235. package/src/client/theme/ui/PoweredBy/index.ts +0 -1
  236. package/src/client/theme/ui/PoweredBy/powered-by.css +0 -76
  237. package/src/client/theme/ui/ProgressBar/ProgressBar.css +0 -17
  238. package/src/client/theme/ui/ProgressBar/ProgressBar.tsx +0 -51
  239. package/src/client/theme/ui/ProgressBar/index.ts +0 -1
  240. package/src/client/theme/ui/SearchDialog/SearchDialog.tsx +0 -209
  241. package/src/client/theme/ui/SearchDialog/index.ts +0 -1
  242. package/src/client/theme/ui/SearchDialog/search.css +0 -152
  243. package/src/client/theme/ui/Sidebar/Sidebar.tsx +0 -244
  244. package/src/client/theme/ui/Sidebar/index.ts +0 -1
  245. package/src/client/theme/ui/Sidebar/sidebar.css +0 -230
  246. package/src/client/theme/ui/ThemeToggle/ThemeToggle.tsx +0 -69
  247. package/src/client/theme/ui/ThemeToggle/index.ts +0 -1
  248. package/src/client/theme/ui/VersionSwitcher/VersionSwitcher.tsx +0 -136
  249. package/src/client/theme/ui/VersionSwitcher/index.ts +0 -1
  250. package/src/client/utils.ts +0 -49
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # boltdocs
2
+
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`105352e`](https://github.com/jesusalcaladev/boltdocs/commit/105352efc13f081c5fdb6bbcad11891be78f87a7) Thanks [@jesusalcaladev](https://github.com/jesusalcaladev)! - fix: secutity in build & production, repare error in build with virtual:boltdocs-layout
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Boltdocs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ import{l as a,m as b,n as c,o as d}from"./chunk-MFU7Q6WF.mjs";import"./chunk-JZXLCA2E.mjs";export{c as AssetCache,a as FileCache,b as TransformCache,d as flushCache};
@@ -0,0 +1 @@
1
+ import{b as de}from"./chunk-BA5NH5HU.mjs";import{B as pe,C as me,D as ue,E as X,a as d,b as ie,c as le,d as D,f as ce,g as G}from"./chunk-BQCD3DWG.mjs";import{b as j}from"./chunk-XEAPSFMB.mjs";import{a as st}from"./chunk-JZXLCA2E.mjs";var Cr={};st(Cr,{Admonition:()=>T,Badge:()=>Te,Button:()=>be,Card:()=>Ie,Cards:()=>Ee,Caution:()=>$e,CodeBlock:()=>M,ComponentPreview:()=>rt,ComponentProps:()=>Qe,CopyMarkdown:()=>nt,Danger:()=>ze,Field:()=>Je,FileTree:()=>je,Image:()=>Ze,Important:()=>He,InfoBox:()=>Fe,Link:()=>Ye,List:()=>We,Note:()=>Ve,Tab:()=>Re,Table:()=>Ke,Tabs:()=>Pe,Tip:()=>De,Video:()=>ke,Warning:()=>Oe});import{jsx as at}from"react/jsx-runtime";var be=({className:e,variant:t,size:r,rounded:o,iconSize:n,disabled:s,...l})=>at(D,{className:d("group",le({variant:t,size:r,rounded:o,iconSize:n,disabled:s,className:e})),...l});import*as q from"react-aria-components";import{Copy as ct,Check as pt}from"lucide-react";import{getParameters as K}from"codesandbox/lib/api/define.js";function J(e){let t=e.files||{},r=e.dependencies||{},o=e.devDependencies||{},n=e.title||"codesandbox-project",s=e.description||"Generic Sandbox",l={};for(let[c,a]of Object.entries(t)){let i=typeof a.content=="object"?JSON.stringify(a.content,null,2):a.content;l[c]={content:i,isBinary:a.isBinary??!1}}if(!l["package.json"]){let a=e.template==="vite"||!!o.vite||!!o["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};l["package.json"]={content:JSON.stringify({private:!0,name:n,description:s,type:"module",version:"1.0.0",scripts:e.scripts||a,dependencies:r,devDependencies:o},null,2),isBinary:!1}}return l}function it(e){let t=J(e),r=K({files:t}),o=new URLSearchParams({parameters:r,installDependencies:"true"});return e.entry&&o.set("file",`/${e.entry}`),{parameters:r,url:`https://codesandbox.io/api/v1/sandboxes/define?${o.toString()}`,options:e}}function fe(e){if(typeof window>"u")return it(e);let t=J(e),r=K({files:t}),o=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let s=(c,a)=>{let i=document.createElement("input");i.type="hidden",i.name=c,i.value=a,n.appendChild(i)},l=new URLSearchParams({file:`/${o}`,eslint:"0",codemirror:"1",installDependencies:"true"});return s("query",l.toString()),s("parameters",r),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:r,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${r}`,options:e}}function Ar(e){let t=J(e),r=K({files:t}),o=e.embed||{},n=new URLSearchParams({parameters:r,embed:"1"});return o.view&&n.set("view",o.view),o.theme&&n.set("theme",o.theme),o.hideNavigation&&n.set("hidenavigation","1"),e.entry&&n.set("file",`/${e.entry}`),{parameters:r,url:`https://codesandbox.io/api/v1/sandboxes/define?${n.toString()}`,options:e}}var xe=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 ge,useEffect as dt,useRef as lt,useState as Y}from"react";function ye(e){let{title:t,sandbox:r}=e,[o,n]=Y(!1),[s,l]=Y(!1),[c,a]=Y(!1),i=lt(null),p=j(),m=ge(async()=>{let b=i.current?.textContent??"";xe(b),n(!0),setTimeout(()=>n(!1),2e3)},[]),u=ge(()=>{let b=i.current?.textContent??"",N=p?.integrations?.sandbox?.config||{},y=typeof r=="object"?r:N,R=y.entry||"src/App.tsx";fe({title:t??"Code Snippet",...y,files:{...y.files,[R]:{content:b}}})},[t,p,r]);return dt(()=>{let b=i.current?.textContent?.length??0;a(b>120)},[e.children,e.highlightedHtml]),{copied:o,isExpanded:s,setIsExpanded:l,isExpandable:c,preRef:i,handleCopy:m,handleSandbox:u,shouldTruncate:c&&!s}}import{jsx as P,jsxs as he}from"react/jsx-runtime";function M(e){let{children:t,sandbox:r,hideSandbox:o=!0,hideCopy:n=!1,highlightedHtml:s,...l}=e,i=!!j()?.integrations?.sandbox?.enable&&!o,{copied:p,isExpanded:m,setIsExpanded:u,isExpandable:b,preRef:N,handleCopy:y,handleSandbox:R,shouldTruncate:E}=ye(e);return he("div",{className:d("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",E&&"[&>pre]:max-h-[250px] [&>pre]:overflow-hidden"),children:[he("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:[i&&P(G,{content:"Open in CodeSandbox",children:P(q.Button,{onPress:R,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:P(ce,{size:20})})}),!n&&P(G,{content:p?"Copied!":"Copy code",children:P(q.Button,{onPress:y,className:d("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",p?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:p?P(pt,{size:20}):P(ct,{size:20})})})]}),s?P("div",{ref:N,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}}):P("pre",{ref:N,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...l,children:t}),b&&P("div",{className:d(E?"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:P(q.Button,{onPress:()=>u(!m),className:"rounded-full bg-bg-surface border border-border-subtle px-5 py-2 text-[0.8125rem] font-medium text-text-main outline-none cursor-pointer transition-all hover:bg-border-subtle hover:-translate-y-px backdrop-blur-md",children:m?"Show less":"Expand code"})})]})}import{Children as ft,isValidElement as xt,useMemo as gt}from"react";import*as S from"react-aria-components";import{useState as ve,useRef as mt,useEffect as ut,useCallback as bt}from"react";function Ce({initialIndex:e=0,tabs:t}){let r=t[e]?.props.disabled?t.findIndex(i=>!i.props.disabled):e,[o,n]=ve(r===-1?0:r),s=mt([]),[l,c]=ve({opacity:0,transform:"translateX(0)",width:0});ut(()=>{let i=s.current[o];i&&c({opacity:1,width:i.offsetWidth,transform:`translateX(${i.offsetLeft}px)`})},[o,t]);let a=bt(i=>{let p=0;if(i.key==="ArrowRight"?p=1:i.key==="ArrowLeft"&&(p=-1),p!==0){let m=(o+p+t.length)%t.length;for(;t[m].props.disabled&&m!==o;)m=(m+p+t.length)%t.length;m!==o&&!t[m].props.disabled&&(n(m),s.current[m]?.focus())}},[o,t]);return{active:o,setActive:n,tabRefs:s,indicatorStyle:l,handleKeyDown:a}}import{cva as Ne}from"class-variance-authority";import{jsx as A,jsxs as Z}from"react/jsx-runtime";var yt=Ne("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"}}),ht=Ne("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 Re({children:e}){let t=typeof e=="string"?A(M,{className:"language-bash",children:A("code",{children:e.trim()})}):e;return A("div",{className:"py-4",children:t})}function Pe({defaultIndex:e=0,children:t}){let r=gt(()=>ft.toArray(t).filter(c=>xt(c)&&c.props?.label),[t]),{active:o,setActive:n,tabRefs:s,indicatorStyle:l}=Ce({initialIndex:e,tabs:r});return A("div",{className:"my-8 w-full group/tabs",children:Z(S.Tabs,{selectedKey:o.toString(),onSelectionChange:c=>n(Number(c)),className:"w-full",children:[Z(S.TabList,{"aria-label":"Content Tabs",className:d(yt()),children:[r.map((c,a)=>{let{label:i,icon:p,disabled:m}=c.props,u=a.toString();return Z(S.Tab,{id:u,isDisabled:m,ref:b=>{s.current[a]=b},className:({isSelected:b,isDisabled:N})=>d(ht({isActive:b,isDisabled:N})),children:[!!p&&A("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:p}),A("span",{children:i})]},u)}),A("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:l,"aria-hidden":"true"})]}),r.map((c,a)=>A(S.TabPanel,{id:a.toString(),children:r[a]},a))]})})}import{useRef as vt,useState as Ct,useEffect as Nt}from"react";import{jsx as we,jsxs as Rt}from"react/jsx-runtime";function ke({src:e,poster:t,alt:r,children:o,controls:n,preload:s="metadata",...l}){let c=vt(null),[a,i]=Ct(!1);return Nt(()=>{let p=c.current;if(!p)return;let m=new IntersectionObserver(([u])=>{u.isIntersecting&&(i(!0),m.disconnect())},{rootMargin:"200px"});return m.observe(p),()=>m.disconnect()},[]),we("div",{ref:c,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:a?Rt("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:s,playsInline:!0,...l,children:[o,"Your browser does not support the video tag."]}):we("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":r||"Video"})})}import{cva as Pt}from"class-variance-authority";import{jsx as kt}from"react/jsx-runtime";var wt=Pt("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 Te({variant:e="default",children:t,className:r="",...o}){return kt("span",{className:d(wt({variant:e}),r),...o,children:t})}import{useCallback as Tt,useRef as Ae}from"react";import*as Le from"react-aria-components";import{cva as At}from"class-variance-authority";import{Fragment as Lt,jsx as I,jsxs as Se}from"react/jsx-runtime";var St=At("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 Ee({cols:e=3,children:t,className:r="",...o}){return I("div",{className:d(St({cols:e}),r),...o,children:t})}function Ie({title:e,icon:t,href:r,children:o,className:n="",...s}){let l=Ae(null),c=Ae(null),a=Tt(m=>{let u=l.current||c.current;if(!u)return;let{left:b,top:N}=u.getBoundingClientRect();u.style.setProperty("--x",`${m.clientX-b}px`),u.style.setProperty("--y",`${m.clientY-N}px`)},[]),i=Se(Lt,{children:[I("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&&I("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}),Se("div",{className:"space-y-1.5",children:[e&&I("h3",{className:"text-sm font-bold text-text-main",children:e}),o&&I("div",{className:"text-sm text-text-muted leading-relaxed",children:o})]})]}),p=d("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?I(Le.Link,{ref:c,href:r,className:d(p,"no-underline cursor-pointer"),onMouseMove:a,...s,children:i}):I("div",{ref:l,role:"presentation",className:p,onMouseMove:a,...s,children:i})}import{Info as Et,Lightbulb as It,AlertTriangle as Mt,ShieldAlert as Bt,Bookmark as Vt,Zap as Dt,Flame as Ot}from"lucide-react";import{cva as zt}from"class-variance-authority";import{jsx as h,jsxs as Be}from"react/jsx-runtime";var Ft={note:h(Vt,{size:18}),tip:h(It,{size:18}),info:h(Et,{size:18}),warning:h(Mt,{size:18}),danger:h(Bt,{size:18}),important:h(Ot,{size:18}),caution:h(Dt,{size:18})},Ht={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},Me=zt("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 T({type:e="note",title:t,children:r,className:o="",...n}){return Be("div",{className:d(Me({type:e}),o),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[Be("div",{className:"flex items-center flex-row gap-2 mb-2",children:[h("span",{className:d("shrink-0",Me({type:e})),children:Ft[e]}),h("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||Ht[e]})]}),h("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:r})]})}var Ve=e=>h(T,{type:"note",...e}),De=e=>h(T,{type:"tip",...e}),Oe=e=>h(T,{type:"warning",...e}),ze=e=>h(T,{type:"danger",...e}),Fe=e=>h(T,{type:"info",...e}),He=e=>h(T,{type:"important",...e}),$e=e=>h(T,{type:"caution",...e});import{Children as $t,isValidElement as Wt}from"react";import{Check as _t,ChevronRight as jt,Circle as qt}from"lucide-react";import{cva as Q}from"class-variance-authority";import{jsx as L,jsxs as Yt}from"react/jsx-runtime";var Ut=Q("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}}),Gt=Q("group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200",{variants:{variant:{default:"",number:"",checked:"hover:translate-x-0.5",arrow:"hover:translate-x-0.5",bubble:"hover:translate-x-0.5"},dense:{true:"py-0",false:"py-0.5"}},defaultVariants:{variant:"default",dense:!1}}),Xt=Q("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 Kt({icon:e,children:t,variant:r,dense:o}){return Yt("li",{className:d(Gt({variant:r,dense:o})),children:[e&&L("span",{className:d(Xt({variant:r==="bubble"?"bubble":"default"})),children:e}),L("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Jt={checked:e=>L(_t,{size:14,className:d("text-emerald-500 shrink-0",e)}),arrow:e=>L(jt,{size:14,className:d("text-primary-400 shrink-0",e)}),bubble:e=>L(qt,{size:6,fill:"currentColor",className:d("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function We({variant:e="default",cols:t=1,dense:r=!1,children:o,className:n,...s}){let l=t!==void 0&&Number(t)>1,c=Jt[e],a=Ut({variant:e,cols:t,dense:r,isGrid:l,className:n}),i=e==="number"?"ol":"ul";return e==="default"||e==="number"?L(i,{className:a,...s,children:o}):L("ul",{className:a,...s,children:$t.map(o,p=>{if(!Wt(p))return p;let m=p,u=m.type==="li"?m.props.children:m.props.children||p;return L(Kt,{icon:c(),variant:e,dense:r,children:u})})})}import{Children as ee,isValidElement as se,useMemo as Zt}from"react";import*as w from"react-aria-components";import{Folder as Qt,FileText as er,File as tr,FileCode as rr,FileImage as or,ChevronRight as nr}from"lucide-react";import{jsx as v,jsxs as oe}from"react/jsx-runtime";var O=16,z=2,te={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 ne(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(ne).join(""):se(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?ne(e.props.children):""}function sr(e,t){let r=e.toLowerCase(),o="shrink-0 transition-colors duration-200";if(t)return v(Qt,{size:O,strokeWidth:z,className:d(o,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=d(o,"text-text-dim group-hover:text-text-main");return te.CODE.test(r)?v(rr,{size:O,strokeWidth:z,className:n}):te.TEXT.test(r)?v(er,{size:O,strokeWidth:z,className:n}):te.IMAGE.test(r)?v(or,{size:O,strokeWidth:z,className:n}):v(tr,{size:O,strokeWidth:z,className:n})}function re(e,t){if(!se(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 ar(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function U(e,t="root"){if(!se(e))return[];let r=[];if(re(e,"ul"))return ee.forEach(e.props.children,(o,n)=>{r.push(...U(o,`${t}-${n}`))}),r;if(re(e,"li")){let o=ee.toArray(e.props.children),n=o.findIndex(N=>re(N,"ul")),s=n!==-1,l=s?o.slice(0,n):o,c=s?o.slice(n):[],a=ne(l),{name:i,comment:p}=ar(a),m=i.endsWith("/"),u=m?i.slice(0,-1):i,b=s||m;return r.push({id:`${t}-${u}`,name:u,comment:p,isFolder:b,children:s?U(c[0],`${t}-${u}`):void 0}),r}return e.props&&typeof e.props=="object"&&"children"in e.props&&ee.forEach(e.props.children,(o,n)=>{r.push(...U(o,`${t}-${n}`))}),r}function _e({item:e}){return oe(w.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[v(w.TreeItemContent,{children:({isExpanded:t,hasChildItems:r})=>oe("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[v("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),r?v(w.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:v(nr,{size:14,strokeWidth:3,className:d("transition-transform duration-200",t&&"rotate-90")})}):v("div",{className:"w-[18px]"}),sr(e.name,e.isFolder),v("span",{className:d("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&&oe("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&&v(w.Collection,{items:e.children,children:t=>v(_e,{item:t})})]})}function je({children:e}){let t=Zt(()=>U(e),[e]);return v("div",{className:"my-8",children:v(w.Tree,{items:t,"aria-label":"File Tree",className:d("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=>v(_e,{item:r})})})}import*as F from"react-aria-components";import{useState as qe,useMemo as Ue}from"react";function Ge({data:e,sortable:t=!1,paginated:r=!1,pageSize:o=10}){let[n,s]=qe(null),[l,c]=qe(1),a=Ue(()=>{if(!e)return[];let u=[...e];return t&&n!==null&&u.sort((b,N)=>{let y=b[n.key],R=N[n.key],E=typeof y=="string"?y:"",_=typeof R=="string"?R:"";return E<_?n.direction==="asc"?-1:1:E>_?n.direction==="asc"?1:-1:0}),u},[e,n,t]),i=Math.ceil(a.length/o),p=Ue(()=>{if(!r)return a;let u=(l-1)*o;return a.slice(u,u+o)},[a,r,l,o]);return{sortConfig:n,currentPage:l,setCurrentPage:c,totalPages:i,paginatedData:p,requestSort:u=>{if(!t)return;let b="asc";n&&n.key===u&&n.direction==="asc"&&(b="desc"),s({key:u,direction:b})}}}import{ChevronUp as ir,ChevronDown as Xe,ChevronLeft as dr,ChevronRight as lr,ChevronsLeft as cr,ChevronsRight as pr}from"lucide-react";import{Fragment as mr,jsx as g,jsxs as B}from"react/jsx-runtime";function Ke({headers:e,data:t,children:r,className:o="",sortable:n=!1,paginated:s=!1,pageSize:l=10}){let{sortConfig:c,currentPage:a,setCurrentPage:i,totalPages:p,paginatedData:m,requestSort:u}=Ge({data:t,sortable:n,paginated:s,pageSize:l}),b=y=>n?c?.key!==y?g(Xe,{size:14,className:"ml-1 opacity-30"}):c.direction==="asc"?g(ir,{size:14,className:"ml-1 text-primary-400"}):g(Xe,{size:14,className:"ml-1 text-primary-400"}):null,N=r||B(mr,{children:[e&&g("thead",{children:g("tr",{children:e.map((y,R)=>g("th",{onClick:()=>u(R),className:d("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:B("div",{className:"flex items-center",children:[y,b(R)]})},R))})}),m&&g("tbody",{children:m.map((y,R)=>g("tr",{className:"transition-colors hover:bg-bg-surface",children:y.map((E,_)=>g("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:E},_))},R))})]});return B("div",{className:d("my-6 rounded-lg border border-border-subtle overflow-hidden",o),children:[g("div",{className:"overflow-x-auto",children:g("table",{className:"w-full border-collapse text-sm",children:N})}),s&&p>1&&B("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[B("span",{className:"text-xs text-text-muted",children:["Page ",a," of ",p]}),B("div",{className:"flex items-center gap-1",children:[g(F.Button,{onPress:()=>i(1),isDisabled:a===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:g(cr,{size:16})}),g(F.Button,{onPress:()=>i(y=>Math.max(y-1,1)),isDisabled:a===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:g(dr,{size:16})}),g(F.Button,{onPress:()=>i(y=>Math.min(y+1,p)),isDisabled:a===p,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:g(lr,{size:16})}),g(F.Button,{onPress:()=>i(p),isDisabled:a===p,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:g(pr,{size:16})})]})]})]})}import{jsx as V,jsxs as H}from"react/jsx-runtime";function Je({name:e,type:t,defaultValue:r,required:o=!1,children:n,id:s,className:l=""}){return H("article",{className:d("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",l),id:s,children:[H("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[H("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&&H("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&&H("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 ur}from"react/jsx-runtime";function Ye({to:e,children:t,className:r="",...o}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),s=d("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",r);return ur(ie,{href:e,className:s,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...o,children:t})}import{jsx as br}from"react/jsx-runtime";function Ze({src:e,alt:t,theme:r,...o}){let{theme:n}=de();return r&&r!==n?null:br("img",{src:e,alt:t||"",...o})}import{jsx as C,jsxs as $}from"react/jsx-runtime";function Qe({title:e,props:t,className:r=""}){return $("div",{className:d("my-6",r),children:[e&&C("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),C("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:$("table",{className:"w-full border-collapse text-sm",children:[C("thead",{children:$("tr",{children:[C("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"}),C("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"}),C("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"}),C("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"})]})}),C("tbody",{children:t.map((o,n)=>$("tr",{className:"transition-colors hover:bg-bg-surface",children:[$("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[C("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&&C("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),C("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:C("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:o.type})}),C("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:o.defaultValue?C("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:o.defaultValue}):C("span",{className:"text-text-dim",children:"\u2014"})}),C("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:o.description})]},`${o.name}-${n}`))})]})})]})}import{useMemo as et}from"react";function tt(e){let{code:t,children:r,preview:o}=e,n=et(()=>(t??(typeof r=="string"?r:"")).trim(),[t,r]),s=et(()=>o??(typeof r!="string"?r:null),[o,r]);return{initialCode:n,previewElement:s}}import{jsx as ae,jsxs as fr}from"react/jsx-runtime";function rt(e){let{highlightedHtml:t,hideCode:r=!1,hideSandbox:o=!1,hideCopy:n=!1,sandboxOptions:s={}}=e,{initialCode:l,previewElement:c}=tt(e);return fr("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[ae("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:c}),!r&&ae("div",{className:"border-t border-border-subtle",children:ae(M,{hideSandbox:o,hideCopy:n,title:s.title,lang:"tsx",highlightedHtml:t,children:l})})]})}import{useState as xr}from"react";import{Copy as ot,Check as gr,ExternalLink as yr,ChevronDown as hr}from"lucide-react";import{jsx as k,jsxs as W}from"react/jsx-runtime";var vr=e=>{let[t,r]=xr(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)},handleOpenRaw:()=>{let s=new Blob([e],{type:"text/plain;charset=utf-8"}),l=URL.createObjectURL(s);window.open(l,"_blank")}}};function nt({content:e,mdxRaw:t,config:r}){let o=t||e||"",{copied:n,handleCopy:s,handleOpenRaw:l}=vr(o),c=r!==!1,a=typeof r=="object"&&r.text||"Copy Markdown";return!c||!o?null:k("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:W(pe,{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:[k(D,{variant:"ghost",onPress:s,icon:n?k(gr,{size:16}):k(ot,{size:16}),iconPosition:"left",className:d("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!":a}),W(me,{placement:"bottom end",children:[k(D,{variant:"ghost",isIconOnly:!0,icon:k(hr,{size:14}),className:d("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")}),W(ue,{className:"w-52",children:[W(X,{onAction:s,className:"flex flex-row items-start gap-2.5 group",children:[k(ot,{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"}),k("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),W(X,{onAction:l,className:"flex flex-row items-start gap-2.5 group",children:[k(yr,{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"}),k("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}export{be as a,it as b,fe as c,Ar as d,M as e,Re as f,Pe as g,ke as h,Te as i,Ee as j,Ie as k,T as l,Ve as m,De as n,Oe as o,ze as p,Fe as q,He as r,$e as s,We as t,je as u,Ke as v,Je as w,Ye as x,Ze as y,Qe as z,rt as A,nt as B,Cr as C};
@@ -0,0 +1 @@
1
+ import{createContext as g,use as T,useEffect as a,useState as d}from"react";import{jsx as f}from"react/jsx-runtime";var c=g(void 0);function w({children:o}){let[r,t]=d("dark"),[n,i]=d(!1);a(()=>{i(!0);let e=localStorage.getItem("boltdocs-theme");if(e==="light"||e==="dark")t(e);else{let h=window.matchMedia("(prefers-color-scheme: dark)").matches;t(h?"dark":"light")}let s=window.matchMedia("(prefers-color-scheme: dark)"),m=h=>{localStorage.getItem("boltdocs-theme")||t(h.matches?"dark":"light")};return s.addEventListener("change",m),()=>s.removeEventListener("change",m)},[]),a(()=>{if(!n)return;let e=document.documentElement;r==="light"?(e.classList.add("theme-light"),e.dataset.theme="light"):(e.classList.remove("theme-light"),e.dataset.theme="dark")},[r,n]);let l=()=>{let e=r==="dark"?"light":"dark";t(e),localStorage.setItem("boltdocs-theme",e)},u=e=>{t(e),localStorage.setItem("boltdocs-theme",e)};return f(c.Provider,{value:{theme:r,toggleTheme:l,setTheme:u},children:o})}function x(){let o=T(c);if(o===void 0)throw new Error("useTheme must be used within a ThemeProvider");return o}export{w as a,x as b};
@@ -0,0 +1 @@
1
+ import{c as G,d as Y}from"./chunk-XEAPSFMB.mjs";import{useState as Et,useEffect as zt}from"react";import*as k from"react-aria-components";import{ChevronDown as lo}from"lucide-react";import{clsx as ve}from"clsx";import{twMerge as Ce}from"tailwind-merge";function n(...e){return Ce(ve(e))}import{Fragment as go,jsx as uo,jsxs as fo}from"react/jsx-runtime";import*as f from"react-aria-components";import{Search as ye,Hash as Ne,FileText as Re,CornerDownLeft as we}from"lucide-react";import{Fragment as Me,jsx as u,jsxs as F}from"react/jsx-runtime";var Pe=({children:e,isOpen:t,onOpenChange:o,className:r})=>u(f.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:u(f.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:u(f.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Te=({children:e,className:t,...o})=>u("div",{className:t,children:u(f.Autocomplete,{...o,className:"flex flex-col min-h-0",children:e})}),Ae=({className:e,...t})=>F(f.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[u(ye,{className:"h-5 w-5 text-text-muted"}),u(f.Input,{...t,className:n("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),u("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:u("kbd",{className:"font-sans",children:"ESC"})})]}),ke=({children:e,className:t,...o})=>u(f.ListBox,{...o,className:n("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Ie=({children:e,className:t,...o})=>u(f.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=>F(Me,{children:[e,(r.isFocused||r.isSelected)&&F("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[u("span",{className:"text-[10px]",children:"Select"}),u(we,{size:10})]})]})}),Be=({isHeading:e,className:t})=>u("div",{className:n("shrink-0",t),children:e?u(Ne,{size:18}):u(Re,{size:18})}),Le=({children:e,className:t})=>u("span",{className:n("block font-medium truncate flex-1 text-sm",t),children:e}),Se=({children:e,className:t})=>u("span",{className:n("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),vo={Root:Pe,Autocomplete:Te,Input:Ae,List:ke,Item:Object.assign(Ie,{Icon:Be,Title:Le,Bio:Se})};import{createContext as ee,use as j,useEffect as O,useImperativeHandle as ze,useMemo as te,useRef as oe,useState as X}from"react";import De from"scroll-into-view-if-needed";import{useEffect as Oe,useRef as Ee}from"react";function $(e,t){let o=Ee(e);Oe(()=>{o.current!==e&&(t(e),o.current=e)},[e,t])}function W(e){return e.startsWith("#")?e.slice(1):null}import{jsx as y}from"react/jsx-runtime";var K=ee(null),re=ee(null),_=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 g=Math.abs(r-c.getBoundingClientRect().top);g<s&&(i=l,s=g)}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=W(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 He(){let e=j(K);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function Ve(e){let[t,o]=X({isOverflowing:!1,isAtBottom:!1});return O(()=>{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 Oo(){let e=He();return te(()=>{let t;for(let o of e)o.active&&(!t||o.t>t.t)&&(t=o);return t?.id},[e])}function Eo({containerRef:e,children:t}){return y(re.Provider,{value:e,children:t})}function zo({toc:e,single:t=!1,children:o}){let r=te(()=>new _,[]),[s,i]=X(r.items);return r.single=t,O(()=>{r.setItems(e)},[r,e]),O(()=>(r.watch({rootMargin:"0px",threshold:.98}),r.onChange=()=>i([...r.items]),()=>{r.unwatch()}),[r]),y(K.Provider,{value:s,children:o})}var Ge=({children:e,className:t})=>y("nav",{className:n("sticky top-navbar hidden xl:flex flex-col shrink-0","w-toc","py-8 pl-6 pr-4",t),children:e}),Fe=({children:e,className:t,...o})=>y("div",{className:n("mb-4 text-xs font-bold uppercase tracking-wider text-text-main",t),...o,children:e}),ne=({children:e,className:t,ref:o,...r})=>{let s=oe(null);ze(o,()=>s.current);let{isOverflowing:i,isAtBottom:l}=Ve(s);return y("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})};ne.displayName="OnThisPageContent";var We=({children:e,className:t})=>y("ul",{className:n("relative space-y-1 text-sm border-l border-border-subtle",t),children:e}),je=({level:e,children:t,className:o})=>y("li",{className:n(e===3&&"pl-3",o),children:t}),_e=({children:e,href:t,active:o,onClick:r,className:s})=>{let i=j(K),l=j(re),c=t?W(t):null,g=oe(null),[b,N]=X(o);return $(c&&i?i.find(x=>x.id===c)?.active:null,x=>{x!==null&&x!==b&&(N(!!x),x&&g.current&&l?.current&&De(g.current,{behavior:"smooth",block:"center",inline:"center",scrollMode:"if-needed",boundary:l.current}))}),O(()=>{o!==void 0&&N(o)},[o]),y("a",{ref:g,href:t,onClick:r,"data-active":b,className:n("block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main",b?"text-primary-500 font-medium":"text-text-muted",s),children:e})},Xe=({style:e,className:t})=>y("div",{className:n("absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300",t),style:e}),Do={OnThisPageRoot:Ge,OnThisPageHeader:Fe,OnThisPageContent:ne,OnThisPageList:We,OnThisPageItem:je,OnThisPageLink:_e,OnThisPageIndicator:Xe};import*as se from"react-aria-components";import{ChevronLeft as Ke,ChevronRight as Ue}from"lucide-react";import{Fragment as et,jsx as w,jsxs as $e}from"react/jsx-runtime";var Ze=({children:e,className:t})=>w("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}),qe=({children:e,to:t,direction:o,className:r})=>{let s=o==="next";return $e(se.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&&w(Ke,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),w("div",{className:"flex flex-col gap-1 flex-1",children:e}),s&&w(Ue,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},Je=({children:e,className:t})=>w("span",{className:n("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Qe=({children:e,className:t})=>w("span",{className:n("text-base font-bold text-text-main truncate",t),children:e}),Ye=({children:e})=>w(et,{children:e}),jo={PageNavRoot:Ze,PageNavLink:Object.assign(qe,{Title:Je,Description:Qe,Icon:Ye})};import{jsx as I}from"react/jsx-runtime";var tt=({children:e,className:t="",...o})=>I("div",{className:n("w-full",t),...o,children:e}),ot=({children:e,className:t=""})=>I("div",{role:"tablist",className:n("relative flex flex-row items-center border-b border-border-subtle",t),children:e}),rt=({children:e,id:t,selected:o,className:r="",...s})=>I("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}),nt=({children:e,className:t=""})=>I("div",{className:n("p-4 outline-none",t),children:e}),st=({className:e="",style:t})=>I("div",{className:n("absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300",e),style:t}),Zo={TabsRoot:tt,TabsList:ot,TabsItem:rt,TabsContent:nt,TabsIndicator:st};import ie from"react";import{Link as it}from"react-aria-components";import{useLocation as at}from"react-router-dom";import{jsx as ae}from"react/jsx-runtime";var R=ie.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:s,onFocus:i,...l}=e,c=G(o??""),{preload:g}=Y();return ae(it,{...l,ref:t,href:c,onMouseEnter:x=>{s?.(x),r==="hover"&&typeof c=="string"&&c.startsWith("/")&&g(c)},onFocus:x=>{i?.(x),r==="hover"&&typeof c=="string"&&c.startsWith("/")&&g(c)}})});R.displayName="Link";var lt=ie.forwardRef((e,t)=>{let{href:o,end:r=!1,className:s,children:i,...l}=e,c=at(),g=G(o??""),b=r?c.pathname===g:c.pathname.startsWith(g),N=typeof s=="function"?s({isActive:b}):n(s,b&&"active"),x=typeof i=="function"?i({isActive:b}):i;return ae(R,{...l,ref:t,href:o,className:N,children:x})});lt.displayName="NavLink";import*as le from"react-aria-components";import{ChevronRight as ct}from"lucide-react";import{jsx as v,jsxs as E}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 v("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})},pt=({children:e,className:t})=>v("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:v("nav",{className:"flex-1 space-y-6",children:e})}),dt=({children:e,title:t,icon:o,isOpen:r=!0,onToggle:s,className:i})=>E("div",{className:n("space-y-1",i),children:[t&&E(le.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:[E("div",{className:"flex items-center gap-2",children:[o&&v(o,{size:14}),t]}),v(ct,{size:14,className:n("transition-transform duration-200",r&&"rotate-90")})]}),r&&v("div",{className:"space-y-0.5",children:e})]}),ut=({children:e,className:t})=>v("div",{className:n(t),children:e}),ft=({label:e,href:t,active:o,icon:r,badge:s,className:i})=>E(R,{href:t,className:n("group flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none transition-colors","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",i),children:[r&&v(r,{size:16,className:n(o?"text-primary-500":"text-text-muted group-hover:text-text-main")}),v("span",{className:"truncate",children:e}),s&&v(mt,{badge:s})]}),mr={SidebarRoot:pt,SidebarGroup:dt,SidebarGroupItem:ut,SidebarLink:ft};import{Breadcrumb as gt,Breadcrumbs as xt,Link as bt}from"react-aria-components";import{ChevronRight as ht}from"lucide-react";import{jsx as z}from"react/jsx-runtime";var br=({children:e,className:t,...o})=>z(xt,{className:n("flex items-center gap-1.5 mb-0 text-sm text-text-muted",t),...o,children:e}),hr=({children:e,className:t,...o})=>z(gt,{className:n("flex items-center mb-0 gap-1.5",t),...o,children:e}),vr=({children:e,href:t,className:o,...r})=>z(bt,{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})=>z(ht,{size:14,className:n("shrink-0 text-text-dim",e)});import*as D from"react-aria-components";import{cva as vt}from"class-variance-authority";import{Fragment as yt,jsx as P,jsxs as Nt}from"react/jsx-runtime";var ce=vt("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"}}),Ct=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:s,className:i,variant:l,size:c,rounded:g,iconSize:b,disabled:N,...x})=>{let V=r||!s&&!!t,Q=V?P("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):Nt(yt,{children:[t&&o==="left"&&P("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),P("span",{className:"flex items-center",children:s}),t&&o==="right"&&P("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?P(D.Link,{href:e,className:n(ce({variant:l,size:c,rounded:g,iconSize:V?b:void 0,disabled:N}),i),...x,children:Q}):P(D.Button,{className:n(ce({variant:l,size:c,rounded:g,iconSize:V?b:void 0,disabled:N}),i),...x,children:Q})};import{jsx as Rt}from"react/jsx-runtime";var Br=({children:e,className:t,vertical:o=!1})=>Rt("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 Pt,ChevronRight as Tt,Dot as At}from"lucide-react";import me from"react";import*as m from"react-aria-components";import*as T from"react-aria-components";import{jsx as U,jsxs as wt}from"react/jsx-runtime";var Z=({children:e,className:t,showArrow:o,...r})=>wt(T.Popover,{offset:8,...r,className:T.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&&U(T.OverlayArrow,{className:"group",children:U("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:U("path",{d:"M0 0 L6 6 L12 0"})})}),e]});import{Fragment as Lt,jsx as h,jsxs as B}from"react/jsx-runtime";function pe(e){let[t,o]=me.Children.toArray(e.children).slice(0,2);return B(m.MenuTrigger,{...e,children:[t,h(Z,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function kt(e){let[t,o]=me.Children.toArray(e.children).slice(0,2);return B(m.SubmenuTrigger,{...e,children:[t,h(Z,{offset:-4,crossOffset:-4,children:o})]})}function de(e){return h(m.Menu,{...e,className:m.composeRenderProps(e.className,t=>n("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function q(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return h(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})=>B(Lt,{children:[r!=="none"&&B("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[s&&r==="multiple"&&h(Pt,{className:"w-3.5 h-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),s&&r==="single"&&h(At,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),h("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),i&&h(Tt,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function It({title:e,...t}){return B(m.MenuSection,{...t,className:n("flex flex-col gap-0.5",t.className),children:[e&&h(m.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),h(m.Collection,{items:t.items,children:t.children})]})}function Bt(e){return h(m.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}var Wr={Root:de,Item:q,Trigger:pe,SubTrigger:kt,Section:It,Separator:Bt};import*as A from"react-aria-components";import{Fragment as Mt,jsx as L,jsxs as J}from"react/jsx-runtime";var St=({className:e,children:t,...o})=>L(A.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=>J(Mt,{children:[L(A.OverlayArrow,{children:J("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:[L("title",{children:"Arrow"}),L("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),Ur=({content:e,children:t,delay:o=500,closeDelay:r=0,...s})=>J(A.TooltipTrigger,{delay:o,closeDelay:r,children:[t,L(St,{...s,children:e})]});import{Separator as ue,ToggleButton as fe}from"react-aria-components";import{Button as Dt}from"react-aria-components";import{Search as Ht,Sun as Vt,Moon as Gt,ExternalLink as Ft,ChevronDown as Rn}from"lucide-react";import{jsx as C,jsxs as M}from"react/jsx-runtime";function S(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var ge=e=>M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...S(e),children:[C("title",{children:"GitHub"}),C("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"})]}),xe=e=>M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...S(e),children:[C("title",{children:"Discord"}),C("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"})]}),be=e=>M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...S(e),children:[C("title",{children:"X"}),C("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"})]}),xn=e=>M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...S(e),children:[C("title",{children:"CodeSandbox"}),C("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]}),he=e=>M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...S(e),children:[C("title",{children:"Bluesky"}),C("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 H}from"react/jsx-runtime";var Wt=({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}),jt=({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}),_t=({children:e,className:t})=>a("div",{className:n("flex items-center gap-4",t),children:e}),Xt=({children:e,className:t})=>a("div",{className:n("flex items-center gap-2 md:gap-4",t),children:e}),Kt=({children:e,className:t})=>a("div",{className:n("hidden lg:flex flex-1 justify-center items-center gap-4 px-4",t),children:e}),Ut=({src:e,alt:t,width:o=24,height:r=24,className:s})=>a(R,{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}),Zt=({children:e,className:t})=>a("span",{className:n("text-lg font-bold tracking-tight hidden sm:inline-block",t),children:e}),qt=({children:e,className:t})=>a("nav",{className:n("hidden md:flex items-center gap-6 text-sm font-medium",t),children:e}),Jt=({label:e,href:t,active:o,to:r,className:s})=>H(R,{href:t,target:r==="external"?"_blank":void 0,className:n("transition-colors outline-none hover:text-text-main focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm",o?"text-primary-500":"text-text-muted",s),children:[e,r==="external"&&a("span",{className:"ml-1 inline-block",children:a(Ft,{size:12})})]}),Qt=({className:e,onPress:t})=>{let[o,r]=Et(!1),s=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return zt(()=>{r(!0)},[]),H(Dt,{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-colors hover:border-border-strong hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30","w-full max-w-[320px] justify-between",e),children:[H("div",{className:"flex items-center gap-2",children:[a(Ht,{size:16}),a("span",{className:"hidden sm:inline-block",children:"Search docs..."})]}),H("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"})]})]})},Yt=({className:e,theme:t,onThemeChange:o})=>a(fe,{isSelected:t==="dark",onChange:o,className:n("rounded-md p-2 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",e),"aria-label":"Toggle theme",children:t==="dark"?a(Vt,{size:20}):a(Gt,{size:20})});var $t=({label:e,className:t,onPress:o,isCurrent:r})=>a(q,{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}),eo=({name:e})=>{if(e==="github")return a(ge,{});if(e==="discord")return a(xe,{});if(e==="x")return a(be,{});if(e==="bluesky")return a(he,{})},to=({icon:e,link:t,className:o})=>a(R,{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(eo,{name:e})}),oo=({className:e})=>a(ue,{orientation:"vertical",className:n("h-6 w-px bg-border-subtle mx-1",e)}),wn={NavbarRoot:Wt,NavbarLeft:_t,NavbarRight:Xt,NavbarCenter:Kt,NavbarLogo:Ut,Title:Zt,Links:qt,Link:Jt,SearchTrigger:Qt,Theme:Yt,Item:$t,Socials:to,Split:oo,Content:jt};export{n as a,R as b,ce as c,Ct as d,ge as e,xn as f,Ur as g,wn as h,Pe as i,Te as j,Ae as k,ke as l,Ie as m,Be as n,Le as o,Se as p,Oo as q,Eo as r,zo as s,Do as t,jo as u,Zo as v,mr as w,br as x,hr as y,vr as z,Cr as A,Br as B,pe as C,de as D,q as E,Wr as F};
@@ -0,0 +1 @@
1
+ import{useState as r,useMemo as c}from"react";function m(n){let[u,l]=r(!1),[e,s]=r(""),h=c(()=>{if(!e)return n.slice(0,10).map(t=>({id:t.path,title:t.title,path:t.path,bio:t.description||"",groupTitle:t.groupTitle}));let i=[],a=e.toLowerCase();for(let t of n)if(t.title?.toLowerCase().includes(a)&&i.push({id:t.path,title:t.title,path:t.path,bio:t.description||"",groupTitle:t.groupTitle}),t.headings)for(let o of t.headings)o.text.toLowerCase().includes(a)&&i.push({id:`${t.path}#${o.id}`,title:o.text,path:`${t.path}#${o.id}`,bio:`Heading in ${t.title}`,groupTitle:t.title,isHeading:!0});let p=new Set;return i.filter(t=>p.has(t.path)?!1:(p.add(t.path),!0)).slice(0,10)},[n,e]);return{isOpen:u,setIsOpen:l,query:e,setQuery:s,list:h,input:{value:e,onChange:i=>s(i.target.value)}}}export{m as a};
@@ -0,0 +1 @@
1
+ import{b as C}from"./chunk-BA5NH5HU.mjs";import{b as R,d as x}from"./chunk-XEAPSFMB.mjs";import{useLocation as y}from"react-router-dom";function v(){let{routes:o}=x(),n=R(),s=y(),t=o.find(f=>f.path===s.pathname),a=n.i18n?t?.locale||n.i18n.defaultLocale:void 0,i=n.versions?t?.version||n.versions.defaultVersion:void 0,p=o.filter(f=>{let g=n.i18n?(f.locale||n.i18n.defaultLocale)===a:!0,l=n.versions?(f.version||n.versions.defaultVersion)===i:!0;return g&&l}),u=n.i18n?.locales[a]||a,d=n.versions?.versions[i]||i,e=n.i18n?Object.entries(n.i18n.locales).map(([f,g])=>({key:f,label:g,isCurrent:f===a})):[],r=n.versions?Object.entries(n.versions.versions).map(([f,g])=>({key:f,label:g,isCurrent:f===i})):[];return{routes:p,allRoutes:o,currentRoute:t,currentLocale:a,currentLocaleLabel:u,availableLocales:e,currentVersion:i,currentVersionLabel:d,availableVersions:r,config:n}}import{useLocation as V}from"react-router-dom";function H(){let o=R(),{theme:n}=C(),s=V(),t=o.themeConfig||{},a=t.title||"Boltdocs",i=t.navbar||[],p=t.socialLinks||[],u=t.githubRepo,d=i.map(l=>{let c=l.href||l.to||l.link||"";return{label:l.label||l.text||"",href:c,active:s.pathname===c,to:c.startsWith("http")||c.startsWith("//")?"external":void 0}}),e=t.logo,r=e?typeof e=="string"?e:n==="dark"?e.dark:e.light:null,f={alt:(e&&typeof e=="object"?e.alt:void 0)||a,width:e&&typeof e=="object"?e.width:void 0,height:e&&typeof e=="object"?e.height:void 0},g=u?`https://github.com/${u}`:null;return{links:d,title:a,logo:r,logoProps:f,github:g,social:p,config:o,theme:n}}import{useNavigate as P}from"react-router-dom";function b(o,n,s){let t=o;return n&&(t===n||t.startsWith(n+"/"))&&(t=t===n?"index.md":t.slice(n.length+1)),s&&(t===s||t.startsWith(s+"/"))&&(t=t===s?"index.md":t.slice(s.length+1)),t}function K(){let o=P(),n=v(),{allRoutes:s,currentRoute:t,currentVersion:a,currentLocale:i,config:p}=n,u=p.versions,d=r=>{if(!u||r===a)return;let f=`/docs/${r}`;if(t){let g=b(t.filePath,t.version,t.locale),l=s.find(c=>b(c.filePath,c.version,c.locale)===g&&(c.version||u.defaultVersion)===r&&(i?c.locale===i:!c.locale));if(l)f=l.path;else{let c=s.find(L=>b(L.filePath,L.version,L.locale)==="index.md"&&(L.version||u.defaultVersion)===r&&(i?L.locale===i:!L.locale));f=c?c.path:`/docs/${r}${i?`/${i}`:""}`}}o(f)},e=n.availableVersions.map(r=>({...r,label:r.label,value:r.key}));return{currentVersion:a,currentVersionLabel:n.currentVersionLabel,availableVersions:e,handleVersionChange:d}}import{useNavigate as I}from"react-router-dom";function te(){let o=I(),n=v(),{allRoutes:s,currentRoute:t,currentLocale:a,config:i}=n,p=i.i18n,u=e=>{if(!p||e===a)return;let r="/";if(t){let f=b(t.filePath,t.version,t.locale),g=s.find(l=>b(l.filePath,l.version,l.locale)===f&&(l.locale||p.defaultLocale)===e&&l.version===t.version);if(g)r=g.path;else{let l=s.find(c=>b(c.filePath,c.version,c.locale)==="index.md"&&(c.locale||p.defaultLocale)===e&&c.version===t.version);r=l?l.path:e===p.defaultLocale?t.version?`/${t.version}`:"/":t.version?`/${t.version}/${e}`:`/${e}`}}else r=e===p.defaultLocale?"/":`/${e}`;o(r)},d=n.availableLocales.map(e=>({...e,label:e.label,value:e.key}));return{currentLocale:a,currentLocaleLabel:n.currentLocaleLabel,availableLocales:d,handleLocaleChange:u}}import{useLocation as w}from"react-router-dom";import{useEffect as T,useState as k,useRef as $}from"react";function ie(o=[],n=[]){let s=w(),t=$([]),[a,i]=k({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),u=n.find(r=>r.path===s.pathname)?.tab?.toLowerCase(),d=o.findIndex(r=>r.id.toLowerCase()===u),e=d===-1?0:d;return T(()=>{let r=t.current[e];r&&i({opacity:1,width:r.offsetWidth,transform:`translateX(${r.offsetLeft}px)`})},[e,o.length,s.pathname]),{tabs:o,activeIndex:e,indicatorStyle:a,tabRefs:t,activeTabId:u}}import{useLocation as S}from"react-router-dom";function fe(o){let n=R(),s=S(),t=o.find(e=>e.path===s.pathname),a=t?.tab?.toLowerCase(),i=a?o.filter(e=>!e.tab||e.tab.toLowerCase()===a):o,p=[],u=new Map;for(let e of i)e.group?(u.has(e.group)||u.set(e.group,{slug:e.group,title:e.groupTitle||e.group,routes:[],icon:e.groupIcon}),u.get(e.group).routes.push(e)):p.push(e);return{groups:Array.from(u.values()),ungrouped:p,activeRoute:t,activePath:s.pathname,config:n}}import{useState as B}from"react";function he(o=[]){let[n,s]=B(null);return{headings:o,activeId:n,setActiveId:s}}function Le(){let{currentRoute:o}=v(),n=[];return o&&(o.groupTitle&&n.push({label:o.groupTitle}),n.push({label:o.title,href:o.path})),{crumbs:n,activeRoute:o}}function ye(){let{routes:o}=v(),n=window.location.pathname,s=o.findIndex(p=>p.path===n),t=o[s],a=s>0?o[s-1]:null,i=s<o.length-1?o[s+1]:null;return{prevPage:a,nextPage:i,currentRoute:t}}export{v as a,H as b,K as c,te as d,ie as e,fe as f,he as g,Le as h,ye as i};
@@ -0,0 +1 @@
1
+ var d=Object.defineProperty;var e=(c,a)=>{for(var b in a)d(c,b,{get:a[b],enumerable:!0})};export{e as a};
@@ -0,0 +1 @@
1
+ import a from"fs";import o from"path";import d from"crypto";import u from"zlib";import{promisify as l}from"util";import w from"fs";import T from"gray-matter";import D from"isomorphic-dompurify";function j(s){return s.replace(/\\/g,"/")}function E(s){return s.replace(/^\d+\./,"")}function K(s){let t=s.match(/^(\d+)\./);return t?parseInt(t[1],10):void 0}function q(s){return/\.mdx?$/.test(s)}function g(s){try{return w.statSync(s).mtimeMs}catch{return 0}}function V(s){let t=w.readFileSync(s,"utf-8"),{data:e,content:r}=T(t);return{data:e,content:r}}function H(s){return s.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function W(s){return H(s)}function J(s){let e=s.split("/").map(E).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 U(s){return D.sanitize(s)}function G(s){return D.sanitize(s,{ALLOWED_TAGS:[],KEEP_CONTENT:!0})}function X(s){return s.charAt(0).toUpperCase()+s.slice(1)}var p=l(a.writeFile),F=l(a.readFile),m=l(a.mkdir),v=l(a.rename),it=l(a.unlink),x=process.env.BOLTDOCS_CACHE_DIR||".boltdocs",L="assets",M="shards",A=parseInt(process.env.BOLTDOCS_CACHE_LRU_LIMIT||"2000",10),B=process.env.BOLTDOCS_CACHE_COMPRESS!=="0",f=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()}},y=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 y,P=class{entries=new Map;cachePath=null;compress;constructor(t={}){if(this.compress=t.compress!==void 0?t.compress:B,t.name){let e=t.root||process.cwd(),r=this.compress?"json.gz":"json";this.cachePath=o.resolve(e,x,`${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=u.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 m(o.dirname(r),{recursive:!0});let i=Buffer.from(e);n&&(i=u.gzipSync(i));let c=`${r}.${d.randomBytes(4).toString("hex")}.tmp`;await p(c,i),await v(c,r)}catch{}})}get(t){let e=this.entries.get(t);return!e||g(t)!==e.mtime?null:e.data}set(t,e){this.entries.set(t,{data:e,mtime:g(t)})}isValid(t){let e=this.entries.get(t);return e?g(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()}},O=class{index=new Map;memoryCache=new f(A);baseDir;shardsDir;indexPath;constructor(t,e=process.cwd()){this.baseDir=o.resolve(e,x,`transform-${t}`),this.shardsDir=o.resolve(this.baseDir,M),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 m(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),z=o.resolve(this.shardsDir,`${c}.gz`);try{let S=await F(z),C=u.gunzipSync(S).toString("utf-8");return this.memoryCache.set(i,C),{key:i,val:C}}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=u.gunzipSync(i).toString("utf-8");return this.memoryCache.set(t,c),c}catch{return null}}set(t,e){let r=d.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 m(this.shardsDir,{recursive:!0});let i=u.gzipSync(Buffer.from(e)),c=`${n}.${d.randomBytes(4).toString("hex")}.tmp`;await p(c,i),await v(c,n)})}get size(){return this.index.size}async flush(){await h.flush()}},b=class{assetsDir;constructor(t=process.cwd()){this.assetsDir=o.resolve(t,x,L)}getFileHash(t){return d.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 m(this.assetsDir,{recursive:!0});let c=`${i}.${d.randomBytes(4).toString("hex")}.tmp`;await p(c,r),await v(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()}};async function nt(){await h.flush()}export{j as a,E as b,K as c,q as d,V as e,H as f,W as g,J as h,U as i,G as j,X as k,P as l,O as m,b as n,nt as o};
@@ -0,0 +1 @@
1
+ import{C as A,e as E}from"./chunk-A4HQPEPU.mjs";import{a as k}from"./chunk-BA5NH5HU.mjs";import{b as B}from"./chunk-BQCD3DWG.mjs";import{a as w,e as N}from"./chunk-XEAPSFMB.mjs";import{ArrowLeft as Q}from"lucide-react";import{jsx as x,jsxs as S}from"react/jsx-runtime";function M(){return x("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:S("div",{className:"space-y-4",children:[x("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),x("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),x("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."}),S(B,{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:[x(Q,{size:16})," Go to Home"]})]})})}import{useEffect as Y,useState as j}from"react";import{jsx as p,jsxs as P}from"react/jsx-runtime";function $(){let[e,o]=j(0);Y(()=>{let n=0,a=!0,s=setInterval(()=>{a?(n+=1,n>=100&&(n=100,a=!1)):(n-=1,n<=0&&(n=0,a=!0)),o(n)},20);return()=>clearInterval(s)},[]);let i=`inset(${100-e}% 0 0 0)`;return p("div",{className:"flex flex-col items-center justify-center min-h-[60vh] p-4 text-center",children:p("div",{className:"relative group",children:P("div",{className:"relative inline-block",children:[P("svg",{className:"w-24 h-auto opacity-10 filter grayscale brightness-50",viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[p("title",{children:"Loading indicator background"}),p("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),p("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]}),P("svg",{className:"absolute top-0 left-0 w-24 h-auto text-primary-500 drop-shadow-[0_0_20px_rgba(var(--primary-rgb),0.5)] transition-[clip-path] duration-100 ease-linear",style:{clipPath:i},viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[p("title",{children:"Loading indicator animated fill"}),p("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),p("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]})]})})})}import{createContext as ee,useContext as te}from"react";import{jsx as oe}from"react/jsx-runtime";var V=ee({});function D(){return te(V)}function O({components:e,children:o}){return oe(V.Provider,{value:e,children:o})}import b,{useEffect as Ce,useState as q,useMemo as W}from"react";import ge from"react-dom/client";import{BrowserRouter as he,Routes as ve,Route as y}from"react-router-dom";import T from"virtual:boltdocs-layout";import{startTransition as ne}from"react";import{RouterProvider as re}from"react-aria-components";import{useNavigate as ie,useHref as ae}from"react-router-dom";import{jsx as se}from"react/jsx-runtime";function I({children:e}){let o=ie();return se(re,{navigate:(i,n)=>{ne(()=>{o(i,n)})},useHref:ae,children:e})}import{useLayoutEffect as le}from"react";import{useLocation as me}from"react-router-dom";function U(){let{pathname:e,hash:o}=me();return le(()=>{let i=document.querySelector(".boltdocs-content");if(i){if(o){let n=o.replace("#",""),a=document.getElementById(n);if(a){let f=i.getBoundingClientRect().top,g=a.getBoundingClientRect().top-f-80+i.scrollTop;i.scrollTo({top:g,behavior:"smooth"});return}}i.scrollTo(0,0)}},[e,o]),null}import{Outlet as ce}from"react-router-dom";import pe from"virtual:boltdocs-layout";import{jsx as Z}from"react/jsx-runtime";function z(){return Z(pe,{children:Z(ce,{})})}import{MDXProvider as de}from"@mdx-js/react";import{jsx as F}from"react/jsx-runtime";function X({Component:e}){let o=D();return F(de,{components:o,children:F(e,{})})}import{Link as ue}from"lucide-react";import{jsx as l,jsxs as fe}from"react/jsx-runtime";var u=({level:e,id:o,children:i})=>{let n=`h${e}`;return fe(n,{id:o,className:"boltdocs-heading",children:[i,o&&l("a",{href:`#${o}`,className:"header-anchor","aria-label":"Anchor",children:l(ue,{size:16})})]})},_={...A,h1:e=>l(u,{level:1,...e}),h2:e=>l(u,{level:2,...e}),h3:e=>l(u,{level:3,...e}),h4:e=>l(u,{level:4,...e}),h5:e=>l(u,{level:5,...e}),h6:e=>l(u,{level:6,...e}),pre:e=>l(E,{...e,children:e.children})};import{jsx as t,jsxs as G}from"react/jsx-runtime";function xe({initialRoutes:e,initialConfig:o,docsDirName:i,modules:n,hot:a,homePage:s,externalPages:f,components:C={}}){let[d,g]=q(e),[h]=q(o),v=f||{},J=W(()=>d.filter(r=>!(s&&(r.path==="/"||r.path===""))&&!v[r.path===""?"/":r.path]).map(r=>{let R=Object.keys(n).find(L=>L===`/${i}/${r.filePath}`||L.endsWith(`/${i}/${r.filePath}`)||L.endsWith(`/${i}\\${r.filePath.replace(/\\/g,"/")}`)),H=R?n[R]:null;return{...r,Component:b.lazy(async()=>H?await H():{default:M})}}),[d,n,i,s,v]);Ce(()=>{a&&a.on("boltdocs:routes-update",r=>{g(r)})},[a]);let K=W(()=>({..._,...C}),[C]);return t(k,{children:t(O,{components:K,children:t(w.Provider,{value:h,children:t(I,{children:G(N,{routes:d,modules:n,children:[t(U,{}),G(ve,{children:[s&&t(y,{path:"/",element:t(T,{children:t(s,{})})}),Object.entries(v).map(([r,R])=>t(y,{path:r,element:t(T,{children:t(R,{})})},r)),t(y,{element:t(z,{}),children:J.map(r=>t(y,{path:r.path===""?"/":r.path,element:t(b.Suspense,{fallback:t($,{}),children:t(X,{Component:r.Component})})},r.path))},"docs-layout"),t(y,{path:"*",element:t(T,{children:t(M,{})})})]})]})})})})})}function xt(e){let{target:o,routes:i,docsDirName:n,config:a,modules:s,hot:f,homePage:C,externalPages:d,components:g}=e,h=document.querySelector(o);if(!h)throw new Error(`[boltdocs] Mount target "${o}" not found in document.`);let v=t(b.StrictMode,{children:t(he,{children:t(xe,{initialRoutes:i,initialConfig:a,docsDirName:n,modules:s,hot:f,homePage:C,externalPages:d,components:g})})});h.innerHTML="",ge.createRoot(h).render(v)}export{M as a,$ as b,D as c,xe as d,xt as e};
@@ -0,0 +1 @@
1
+ import{createContext as b,use as y}from"react";var R=b(null);function C(){let t=y(R);if(!t)throw new Error("useConfig must be used within a ConfigProvider");return t}import{useLocation as L}from"react-router-dom";function z(t){let a=L(),e=C();if(!e||typeof t!="string"||!e.i18n&&!e.versions)return t;let n="/docs";if(!t.startsWith(n))return t;let r=a.pathname.substring(n.length).split("/").filter(Boolean),l=e.versions?.defaultVersion,u=e.i18n?.defaultLocale,o=0;e.versions&&r.length>o&&e.versions.versions[r[o]]&&(l=r[o],o++),e.i18n&&r.length>o&&e.i18n.locales[r[o]]&&(u=r[o]);let i=t.substring(n.length).split("/").filter(Boolean),s=0,d=!1,m=!1;e.versions&&i.length>s&&e.versions.versions[i[s]]&&(d=!0,s++),e.i18n&&i.length>s&&e.i18n.locales[i[s]]&&(m=!0,s++);let x=i.slice(s),c=[];e.versions&&(d?c.push(i[0]):l&&c.push(l)),e.i18n&&(m?c.push(i[d?1:0]):u&&c.push(u)),c.push(...x);let f=`${n}/${c.join("/")}`;return f.endsWith("/")&&(f=f.slice(0,-1)),f===n?n:f}import{createContext as T,use as k,useCallback as w,useRef as B}from"react";import{jsx as S}from"react/jsx-runtime";var v=T({preload:()=>{},routes:[]});function N(){return k(v)}function O({routes:t,modules:a,children:e}){let n=B(null),h=w(r=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{let l=r.split("#")[0].split("?")[0],u=t.find(o=>o.path===l||l==="/"&&o.path==="");if(u?.filePath){let o=Object.keys(a).find(p=>p.endsWith("/"+u.filePath));o&&a[o]().catch(p=>{console.error(`[boltdocs] Failed to preload route ${r}:`,p)})}},100)},[t,a]);return S(v.Provider,{value:{preload:h,routes:t},children:e})}export{R as a,C as b,z as c,N as d,O as e};
@@ -0,0 +1,209 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import * as RAC from 'react-aria-components';
4
+ import { LinkProps as LinkProps$2 } from 'react-aria-components';
5
+ import { VariantProps } from 'class-variance-authority';
6
+ import { ComponentPropsWithoutRef, ReactNode, ImgHTMLAttributes } from 'react';
7
+ import { C as ComponentRoute, S as SandboxOptions } from '../../../types-CvT-SGbK.mjs';
8
+ import '../../../config-CX4l-ZNp.mjs';
9
+ import 'vite';
10
+
11
+ interface CopyMarkdownProps {
12
+ content?: string;
13
+ mdxRaw?: string;
14
+ route?: ComponentRoute;
15
+ config?: boolean | {
16
+ text?: string;
17
+ icon?: string;
18
+ };
19
+ }
20
+ declare function CopyMarkdown({ content, mdxRaw, config }: CopyMarkdownProps): react_jsx_runtime.JSX.Element | null;
21
+
22
+ interface CodeBlockProps {
23
+ children?: React.ReactNode;
24
+ className?: string;
25
+ sandbox?: boolean | any;
26
+ hideCopy?: boolean;
27
+ hideSandbox?: boolean;
28
+ title?: string;
29
+ lang?: string;
30
+ highlightedHtml?: string;
31
+ [key: string]: any;
32
+ }
33
+ declare function CodeBlock(props: CodeBlockProps): react_jsx_runtime.JSX.Element;
34
+
35
+ interface VideoProps {
36
+ src?: string;
37
+ poster?: string;
38
+ alt?: string;
39
+ controls?: boolean;
40
+ preload?: string;
41
+ children?: React.ReactNode;
42
+ [key: string]: any;
43
+ }
44
+ declare function Video({ src, poster, alt, children, controls, preload, ...rest }: VideoProps): react_jsx_runtime.JSX.Element;
45
+
46
+ declare const buttonVariants: (props?: ({
47
+ variant?: "link" | "primary" | "secondary" | "outline" | "ghost" | "danger" | "success" | "warning" | "info" | "subtle" | null | undefined;
48
+ size?: "sm" | "md" | "lg" | null | undefined;
49
+ rounded?: "none" | "sm" | "md" | "lg" | "full" | null | undefined;
50
+ iconSize?: "sm" | "md" | "lg" | null | undefined;
51
+ disabled?: boolean | null | undefined;
52
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
53
+ type ButtonVariantType = VariantProps<typeof buttonVariants>;
54
+ interface ButtonProps extends Omit<RAC.ButtonProps, 'children' | 'className'>, ButtonVariantType {
55
+ icon?: React.ReactNode;
56
+ iconPosition?: 'left' | 'right';
57
+ href?: string;
58
+ children?: React.ReactNode;
59
+ className?: string;
60
+ isIconOnly?: boolean;
61
+ }
62
+
63
+ declare const Button: ({ className, variant, size, rounded, iconSize, disabled, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
64
+
65
+ interface TabProps {
66
+ label: string;
67
+ icon?: React.ReactNode;
68
+ disabled?: boolean;
69
+ children: React.ReactNode;
70
+ }
71
+ declare function Tab({ children }: TabProps): react_jsx_runtime.JSX.Element;
72
+ interface TabsProps {
73
+ defaultIndex?: number;
74
+ children: React.ReactNode;
75
+ }
76
+ declare function Tabs({ defaultIndex, children }: TabsProps): react_jsx_runtime.JSX.Element;
77
+
78
+ declare const badgeVariants: (props?: ({
79
+ variant?: "primary" | "danger" | "success" | "warning" | "info" | "default" | null | undefined;
80
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
81
+ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
82
+ children: React.ReactNode;
83
+ }
84
+ declare function Badge({ variant, children, className, ...rest }: BadgeProps): react_jsx_runtime.JSX.Element;
85
+
86
+ declare const cardsVariants: (props?: ({
87
+ cols?: 1 | 2 | 3 | 4 | null | undefined;
88
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
89
+ type CardsVariants = VariantProps<typeof cardsVariants>;
90
+ interface CardsProps extends React.HTMLAttributes<HTMLDivElement>, CardsVariants {
91
+ }
92
+ declare function Cards({ cols, children, className, ...rest }: CardsProps): react_jsx_runtime.JSX.Element;
93
+ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
94
+ title?: string;
95
+ icon?: React.ReactNode;
96
+ href?: string;
97
+ children?: React.ReactNode;
98
+ }
99
+ declare function Card({ title, icon, href, children, className, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
100
+
101
+ declare const admonitionVariants: (props?: ({
102
+ type?: "note" | "danger" | "warning" | "info" | "tip" | "important" | "caution" | null | undefined;
103
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
104
+ type AdmonitionVariants = VariantProps<typeof admonitionVariants>;
105
+ interface AdmonitionProps extends React.HTMLAttributes<HTMLDivElement>, AdmonitionVariants {
106
+ title?: string;
107
+ children: React.ReactNode;
108
+ }
109
+ declare function Admonition({ type, title, children, className, ...rest }: AdmonitionProps): react_jsx_runtime.JSX.Element;
110
+ declare const Note: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
111
+ declare const Tip: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
112
+ declare const Warning: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
113
+ declare const Danger: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
114
+ declare const InfoBox: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
115
+ declare const Important: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
116
+ declare const Caution: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
117
+
118
+ declare const listVariants: (props?: ({
119
+ variant?: "number" | "default" | "checked" | "arrow" | "bubble" | null | undefined;
120
+ cols?: 1 | 2 | 3 | 4 | null | undefined;
121
+ isGrid?: boolean | null | undefined;
122
+ dense?: boolean | null | undefined;
123
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
124
+ type ListVariantProps = VariantProps<typeof listVariants>;
125
+ interface ListProps extends ComponentPropsWithoutRef<'ul'>, Omit<ListVariantProps, 'variant'> {
126
+ variant?: 'checked' | 'arrow' | 'default' | 'bubble' | 'number';
127
+ children: ReactNode;
128
+ }
129
+ declare function List({ variant, cols, dense, children, className, ...props }: ListProps): react_jsx_runtime.JSX.Element;
130
+
131
+ interface FileTreeProps {
132
+ children: React.ReactNode;
133
+ }
134
+ declare function FileTree({ children }: FileTreeProps): react_jsx_runtime.JSX.Element;
135
+
136
+ interface TableProps {
137
+ headers?: string[];
138
+ data?: (string | React.ReactNode)[][];
139
+ children?: React.ReactNode;
140
+ className?: string;
141
+ sortable?: boolean;
142
+ paginated?: boolean;
143
+ pageSize?: number;
144
+ }
145
+ declare function Table({ headers, data, children, className, sortable, paginated, pageSize, }: TableProps): react_jsx_runtime.JSX.Element;
146
+
147
+ interface FieldProps {
148
+ name: string;
149
+ type?: string;
150
+ defaultValue?: string;
151
+ required?: boolean;
152
+ children: React.ReactNode;
153
+ id?: string;
154
+ className?: string;
155
+ }
156
+ declare function Field({ name, type, defaultValue, required, children, id, className, }: FieldProps): react_jsx_runtime.JSX.Element;
157
+
158
+ interface LinkProps$1 extends LinkProps$2 {
159
+ /** Should prefetch the page on hover? Default 'hover' */
160
+ prefetch?: 'hover' | 'none';
161
+ }
162
+
163
+ type LinkProps = LinkProps$1 & {
164
+ to: string;
165
+ children?: React.ReactNode;
166
+ };
167
+ /**
168
+ * A premium Link component for Boltdocs that handles internal and external routing.
169
+ */
170
+ declare function Link({ to, children, className, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
171
+
172
+ interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
173
+ src: string;
174
+ darkSrc?: string;
175
+ theme?: 'light' | 'dark';
176
+ }
177
+ /**
178
+ * A themed Image component for Boltdocs.
179
+ * It supports rendering based on the current active theme.
180
+ */
181
+ declare function Image({ src, alt, theme: imageTheme, ...props }: ImageProps): react_jsx_runtime.JSX.Element | null;
182
+
183
+ interface PropItem {
184
+ name: string;
185
+ type: string;
186
+ defaultValue?: string;
187
+ required?: boolean;
188
+ description: React.ReactNode;
189
+ }
190
+ interface ComponentPropsProps {
191
+ title?: string;
192
+ props: PropItem[];
193
+ className?: string;
194
+ }
195
+ declare function ComponentProps({ title, props, className, }: ComponentPropsProps): react_jsx_runtime.JSX.Element;
196
+
197
+ interface ComponentPreviewProps {
198
+ code?: string;
199
+ highlightedHtml?: string;
200
+ children?: string;
201
+ preview?: React.ReactNode;
202
+ hideCode?: boolean;
203
+ hideSandbox?: boolean;
204
+ hideCopy?: boolean;
205
+ sandboxOptions?: SandboxOptions;
206
+ }
207
+ declare function ComponentPreview(props: ComponentPreviewProps): react_jsx_runtime.JSX.Element;
208
+
209
+ export { Admonition, type AdmonitionProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, Caution, CodeBlock, ComponentPreview, type ComponentPreviewProps, ComponentProps, type ComponentPropsProps, CopyMarkdown, type CopyMarkdownProps, Danger, Field, type FieldProps, FileTree, type FileTreeProps, Image, type ImageProps, Important, InfoBox, Link, type LinkProps, List, type ListProps, Note, Tab, type TabProps, Table, type TableProps, Tabs, type TabsProps, Tip, Video, Warning };