boltdocs 2.6.1 → 2.7.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 (177) hide show
  1. package/bin/boltdocs.js +0 -1
  2. package/dist/cache-CQKlT4fI.mjs +6 -0
  3. package/dist/cache-DorPMFgW.cjs +6 -0
  4. package/dist/cards-BLoSiRuL.d.ts +30 -0
  5. package/dist/cards-CQn9mXZS.d.cts +30 -0
  6. package/dist/chunk-Ds5LZdWN.cjs +6 -0
  7. package/dist/client/index.cjs +1 -1
  8. package/dist/client/index.d.cts +173 -1328
  9. package/dist/client/index.d.ts +172 -1327
  10. package/dist/client/index.js +1 -1
  11. package/dist/{package-c99Cs7mD.cjs → client/mdx.cjs} +1 -1
  12. package/dist/client/mdx.d.cts +128 -0
  13. package/dist/client/mdx.d.ts +129 -0
  14. package/dist/client/mdx.js +6 -0
  15. package/dist/client/primitives.cjs +6 -0
  16. package/dist/client/primitives.d.cts +818 -0
  17. package/dist/client/primitives.d.ts +818 -0
  18. package/dist/client/primitives.js +6 -0
  19. package/dist/client/theme/neutral.css +74 -361
  20. package/dist/client/theme/reset.css +189 -0
  21. package/dist/docs-layout-BlDhcQRv.cjs +6 -0
  22. package/dist/docs-layout-BvAOWEJw.js +6 -0
  23. package/dist/doctor-BQiQhCTl.cjs +6 -0
  24. package/dist/doctor-COpf35L2.cjs +20 -0
  25. package/dist/doctor-Dh1XP7Pz.mjs +20 -0
  26. package/dist/generator-DGW6pkCC.cjs +22 -0
  27. package/dist/generator-Dv3wEmhZ.mjs +22 -0
  28. package/dist/icons-dev-CrQLjoQp.js +6 -0
  29. package/dist/icons-dev-rzdz6Lf3.cjs +6 -0
  30. package/dist/image-BkIfa9oo.js +6 -0
  31. package/dist/image-DIGjCPe6.cjs +6 -0
  32. package/dist/mdx-K0WYBAJ3.js +7 -0
  33. package/dist/mdx-hpErbRUe.cjs +7 -0
  34. package/dist/meta-loader-0gJ4PtBC.cjs +6 -0
  35. package/dist/meta-loader-9IpAHWDS.mjs +6 -0
  36. package/dist/node/cli-entry.cjs +1 -2
  37. package/dist/node/cli-entry.mjs +1 -2
  38. package/dist/node/index.cjs +1 -1
  39. package/dist/node/index.d.cts +66 -13
  40. package/dist/node/index.d.mts +66 -14
  41. package/dist/node/index.mjs +1 -1
  42. package/dist/node/routes/worker.cjs +6 -0
  43. package/dist/node/routes/worker.d.cts +2 -0
  44. package/dist/node/routes/worker.d.mts +2 -0
  45. package/dist/node/routes/worker.mjs +6 -0
  46. package/dist/node-C2nWXElP.mjs +112 -0
  47. package/dist/node-CinkUtxV.cjs +112 -0
  48. package/dist/package-BMYLDBBP.cjs +6 -0
  49. package/dist/{package-DukYeKmD.mjs → package-HegMOTL_.mjs} +1 -1
  50. package/dist/parser-Bh11BsdA.cjs +6 -0
  51. package/dist/parser-D8eQvE7N.mjs +6 -0
  52. package/dist/parser-DYRzXWmA.cjs +6 -0
  53. package/dist/routes-CHf76Ye4.cjs +6 -0
  54. package/dist/routes-CMUZGI6T.mjs +6 -0
  55. package/dist/routes-Co1mRM58.cjs +6 -0
  56. package/dist/search-dialog-BACuzoVX.cjs +6 -0
  57. package/dist/search-dialog-BKagVT17.js +6 -0
  58. package/dist/search-dialog-C8w12eUx.js +6 -0
  59. package/dist/search-dialog-CGyrozZE.cjs +6 -0
  60. package/dist/search-dialog-D26rUnJ_.cjs +6 -0
  61. package/dist/sidebar-DKvg6KOc.d.cts +491 -0
  62. package/dist/sidebar-Dr1TiRIy.d.ts +491 -0
  63. package/dist/utils-BxNAXhZZ.mjs +7 -0
  64. package/dist/utils-Clzu7jvb.cjs +7 -0
  65. package/dist/worker-pool-Bd8Y9KDv.mjs +6 -0
  66. package/dist/worker-pool-BwU8ckrg.cjs +6 -0
  67. package/package.json +27 -8
  68. package/src/client/app/doc-page.tsx +9 -5
  69. package/src/client/app/docs-layout.tsx +17 -3
  70. package/src/client/app/head.tsx +122 -0
  71. package/src/client/app/helmet-compat.tsx +36 -0
  72. package/src/client/app/mdx-component.tsx +5 -52
  73. package/src/client/app/mdx-components-context.tsx +32 -8
  74. package/src/client/app/routes-context.tsx +2 -2
  75. package/src/client/app/scroll-handler.tsx +1 -1
  76. package/src/client/app/theme-context.tsx +5 -5
  77. package/src/client/app/ui-context.tsx +42 -0
  78. package/src/client/components/docs-layout-default.tsx +85 -0
  79. package/src/client/components/icons-dev.tsx +38 -15
  80. package/src/client/components/mdx/callout.tsx +97 -0
  81. package/src/client/components/mdx/card.tsx +73 -98
  82. package/src/client/components/mdx/cards.tsx +27 -0
  83. package/src/client/components/mdx/code-block.tsx +37 -17
  84. package/src/client/components/mdx/field.tsx +24 -56
  85. package/src/client/components/mdx/image.tsx +36 -15
  86. package/src/client/components/mdx/index.ts +19 -53
  87. package/src/client/components/mdx/table.tsx +46 -148
  88. package/src/client/components/mdx/typographics.tsx +120 -0
  89. package/src/client/components/mdx/{hooks/use-code-block.ts → use-code-block.ts} +5 -7
  90. package/src/client/components/primitives/breadcrumbs.tsx +5 -24
  91. package/src/client/components/primitives/button.tsx +3 -142
  92. package/src/client/components/primitives/code-block.tsx +104 -97
  93. package/src/client/components/{docs-layout.tsx → primitives/docs-layout.tsx} +15 -24
  94. package/src/client/components/primitives/error-boundary.tsx +107 -0
  95. package/src/client/components/primitives/heading.tsx +128 -0
  96. package/src/client/components/primitives/helpers/observer.ts +62 -32
  97. package/src/client/components/primitives/image.tsx +26 -0
  98. package/src/client/components/primitives/link.tsx +50 -52
  99. package/src/client/components/primitives/menu.tsx +25 -49
  100. package/src/client/components/primitives/navbar.tsx +234 -59
  101. package/src/client/components/primitives/on-this-page.tsx +169 -40
  102. package/src/client/components/primitives/page-nav.tsx +11 -39
  103. package/src/client/components/primitives/popover.tsx +12 -30
  104. package/src/client/components/primitives/search-dialog.tsx +77 -71
  105. package/src/client/components/primitives/sidebar.tsx +312 -119
  106. package/src/client/components/primitives/skeleton.tsx +1 -1
  107. package/src/client/components/primitives/tabs.tsx +5 -16
  108. package/src/client/components/primitives/tooltip.tsx +1 -1
  109. package/src/client/components/ui-base/banner.tsx +66 -0
  110. package/src/client/components/ui-base/breadcrumbs.tsx +26 -20
  111. package/src/client/components/ui-base/copy-markdown.tsx +43 -35
  112. package/src/client/components/ui-base/error-boundary.tsx +9 -46
  113. package/src/client/components/ui-base/github-stars.tsx +5 -3
  114. package/src/client/components/ui-base/index.ts +3 -3
  115. package/src/client/components/ui-base/last-updated.tsx +27 -0
  116. package/src/client/components/ui-base/navbar.tsx +183 -89
  117. package/src/client/components/ui-base/not-found.tsx +11 -9
  118. package/src/client/components/ui-base/on-this-page.tsx +8 -104
  119. package/src/client/components/ui-base/page-nav.tsx +23 -9
  120. package/src/client/components/ui-base/search-dialog.tsx +111 -36
  121. package/src/client/components/ui-base/search-highlight.tsx +10 -0
  122. package/src/client/components/ui-base/sidebar.tsx +77 -154
  123. package/src/client/components/ui-base/tabs.tsx +20 -7
  124. package/src/client/components/ui-base/theme-toggle.tsx +88 -10
  125. package/src/client/components/ui-base/version-i18n.tsx +80 -0
  126. package/src/client/hooks/index.ts +2 -1
  127. package/src/client/hooks/use-analytics.ts +272 -0
  128. package/src/client/hooks/use-i18n.ts +120 -53
  129. package/src/client/hooks/use-localized-to.ts +70 -30
  130. package/src/client/hooks/use-navbar.ts +69 -39
  131. package/src/client/hooks/use-page-nav.ts +28 -25
  132. package/src/client/hooks/use-routes.ts +64 -81
  133. package/src/client/hooks/use-search-highlight.ts +185 -0
  134. package/src/client/hooks/use-search.ts +12 -3
  135. package/src/client/hooks/use-sidebar.ts +183 -77
  136. package/src/client/hooks/use-tabs.ts +3 -4
  137. package/src/client/hooks/use-version.ts +46 -18
  138. package/src/client/index.ts +13 -86
  139. package/src/client/mdx.ts +2 -0
  140. package/src/client/primitives.ts +19 -0
  141. package/src/client/ssg/boltdocs-shell.tsx +78 -57
  142. package/src/client/ssg/create-routes.tsx +290 -50
  143. package/src/client/ssg/mdx-page.tsx +2 -1
  144. package/src/client/store/boltdocs-context.tsx +83 -12
  145. package/src/client/theme/neutral.css +74 -361
  146. package/src/client/theme/reset.css +189 -0
  147. package/src/client/types.ts +10 -2
  148. package/src/client/utils/path.ts +9 -0
  149. package/src/client/utils/react-to-text.ts +24 -24
  150. package/src/client/virtual.d.ts +1 -1
  151. package/src/shared/types.ts +97 -21
  152. package/dist/node-CWN8U_p8.mjs +0 -88
  153. package/dist/node-D5iosYXv.cjs +0 -88
  154. package/dist/search-dialog-3lvKsbVG.js +0 -6
  155. package/dist/search-dialog-DMK5OpgH.cjs +0 -6
  156. package/dist/use-search-C9bxCqfF.js +0 -6
  157. package/dist/use-search-DcfZSunO.cjs +0 -6
  158. package/src/client/components/mdx/admonition.tsx +0 -91
  159. package/src/client/components/mdx/badge.tsx +0 -41
  160. package/src/client/components/mdx/button.tsx +0 -35
  161. package/src/client/components/mdx/component-preview.tsx +0 -37
  162. package/src/client/components/mdx/component-props.tsx +0 -83
  163. package/src/client/components/mdx/file-tree.tsx +0 -325
  164. package/src/client/components/mdx/hooks/use-component-preview.ts +0 -16
  165. package/src/client/components/mdx/hooks/useTable.ts +0 -74
  166. package/src/client/components/mdx/hooks/useTabs.ts +0 -68
  167. package/src/client/components/mdx/link.tsx +0 -38
  168. package/src/client/components/mdx/list.tsx +0 -192
  169. package/src/client/components/mdx/tabs.tsx +0 -135
  170. package/src/client/components/mdx/video.tsx +0 -68
  171. package/src/client/components/primitives/index.ts +0 -19
  172. package/src/client/components/primitives/navigation-menu.tsx +0 -114
  173. package/src/client/components/ui-base/head.tsx +0 -76
  174. package/src/client/components/ui-base/loading.tsx +0 -57
  175. package/src/client/components/ui-base/powered-by.tsx +0 -25
  176. package/src/client/hooks/use-onthispage.ts +0 -23
  177. package/src/client/utils/use-on-change.ts +0 -15
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ const e=require(`./icons-dev-rzdz6Lf3.cjs`),t=require(`./image-DIGjCPe6.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`),i=require(`lucide-react`),a=require(`react-aria-components`);const o={note:{container:`bg-slate-500/5 dark:bg-slate-500/10 border-slate-500/40 text-slate-800 dark:text-slate-200`,titleText:`text-slate-900 dark:text-slate-100`,iconColor:`text-slate-500`,icon:i.Info,defaultTitle:`Note`},info:{container:`bg-indigo-500/5 dark:bg-indigo-500/10 border-indigo-500/40 text-indigo-800 dark:text-indigo-200`,titleText:`text-indigo-900 dark:text-indigo-100`,iconColor:`text-indigo-500`,icon:i.Info,defaultTitle:`Info`},tip:{container:`bg-green-500/5 dark:bg-green-500/10 border-green-500/40 text-green-800 dark:text-green-200`,titleText:`text-green-900 dark:text-green-100`,iconColor:`text-green-500`,icon:i.Lightbulb,defaultTitle:`Tip`},warning:{container:`bg-amber-500/5 dark:bg-amber-500/10 border-amber-500/40 text-amber-800 dark:text-amber-200`,titleText:`text-amber-900 dark:text-amber-100`,iconColor:`text-amber-500`,icon:i.AlertTriangle,defaultTitle:`Warning`},danger:{container:`bg-rose-500/5 dark:bg-rose-500/10 border-rose-500/40 text-rose-800 dark:text-rose-200`,titleText:`text-rose-900 dark:text-rose-100`,iconColor:`text-rose-500`,icon:i.AlertCircle,defaultTitle:`Danger`}};function s({children:t,className:n=``,variant:i=`note`,title:a,...s}){let c=o[i]||o.note,l=c.icon;return(0,r.jsxs)(`div`,{className:e.y(`my-6 flex gap-4 p-4 rounded-xl border-2`,c.container,n),...s,children:[(0,r.jsx)(`div`,{className:e.y(`shrink-0 pt-0.5`,c.iconColor),children:(0,r.jsx)(l,{className:`w-5 h-5 stroke-[2]`})}),(0,r.jsxs)(`div`,{className:`flex-1 text-[0.875rem] leading-[1.6]`,children:[(0,r.jsx)(`div`,{className:e.y(`font-bold text-sm mb-1`,c.titleText),children:a||c.defaultTitle}),(0,r.jsx)(`div`,{className:`prose prose-neutral dark:prose-invert max-w-none [&>p]:m-0 [&>p+p]:mt-2`,children:t})]})]})}const c=({children:e,name:t,type:n,description:i,required:a})=>(0,r.jsxs)(`div`,{className:`my-4 border border-subtle bg-surface/50 p-4 rounded-xl flex flex-col gap-1 text-sm select-none`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,r.jsx)(`span`,{className:`font-mono font-bold text-primary-500`,children:t}),n&&(0,r.jsx)(`span`,{className:`text-xs text-muted font-mono bg-soft px-1.5 py-0.5 rounded-md`,children:n}),a&&(0,r.jsx)(`span`,{className:`text-xs text-rose-500 font-semibold`,children:`required`})]}),i&&(0,r.jsx)(`div`,{className:`text-muted text-xs mt-1`,children:i}),e&&(0,r.jsx)(`div`,{className:`mt-2`,children:e})]}),l=({href:t,children:n,className:i,...a})=>(0,r.jsx)(e._,{href:t||``,className:e.y(`text-primary-500 hover:text-primary-400 dark:text-primary-500 hover:underline font-medium transition-colors duration-200`,i),...a,children:n}),u={1:`text-3xl sm:text-[2.5rem] font-extrabold tracking-tight text-body mb-4 leading-tight`,2:`text-2xl sm:text-[1.75rem] font-bold tracking-tight text-body mt-14 mb-5 pb-2 border-b border-subtle scroll-mt-24`,3:`text-lg sm:text-[1.4rem] font-semibold tracking-tight text-body mt-10 mb-4 scroll-mt-24`,4:`text-base sm:text-[1.1rem] font-semibold tracking-tight text-body mt-8 mb-3 scroll-mt-24`,5:`text-sm sm:text-[0.9rem] font-semibold tracking-tight text-body mt-6 mb-2 scroll-mt-24`,6:`text-xs sm:text-[0.75rem] font-semibold tracking-tight text-body mt-6 mb-2 scroll-mt-24`},d=({level:n,className:i,...a})=>(0,r.jsx)(t.s,{level:n,className:e.y(u[n]||``,i),...a}),f={a:l,h1:e=>(0,r.jsx)(d,{level:1,...e}),h2:e=>(0,r.jsx)(d,{level:2,...e}),h3:e=>(0,r.jsx)(d,{level:3,...e}),h4:e=>(0,r.jsx)(d,{level:4,...e}),h5:e=>(0,r.jsx)(d,{level:5,...e}),h6:e=>(0,r.jsx)(d,{level:6,...e}),p:({className:t,...n})=>(0,r.jsx)(`p`,{className:e.y(`text-paragraph leading-relaxed my-5`,t),...n}),strong:({className:t,...n})=>(0,r.jsx)(`strong`,{className:e.y(`font-semibold text-body`,t),...n}),mark:({className:t,...n})=>(0,r.jsx)(`mark`,{className:e.y(`bg-primary-500/10 text-primary-500 font-semibold px-1.5 py-0.5 rounded-md`,t),...n}),blockquote:({className:t,...n})=>(0,r.jsx)(`blockquote`,{className:e.y(`border-l-4 border-primary-500 bg-soft/30 pl-4 py-2 my-6 italic text-muted rounded-r-lg`,t),...n}),hr:({className:t,...n})=>(0,r.jsx)(`hr`,{className:e.y(`my-8 border-t border-subtle`,t),...n}),ul:({className:t,...n})=>(0,r.jsx)(`ul`,{className:e.y(`list-disc pl-6 my-5 space-y-2 text-paragraph`,t),...n}),ol:({className:t,...n})=>(0,r.jsx)(`ol`,{className:e.y(`list-decimal pl-6 my-5 space-y-2 text-paragraph`,t),...n}),li:({className:t,...n})=>(0,r.jsx)(`li`,{className:e.y(`pl-1`,t),...n})},p={table:e=>(0,r.jsx)(`div`,{className:`my-6 w-full overflow-x-auto rounded-xl border border-subtle bg-surface/30`,children:(0,r.jsx)(`table`,{className:`w-full border-collapse text-left text-sm`,...e})}),thead:t=>(0,r.jsx)(`thead`,{className:e.y(`border-b border-subtle bg-soft/50`,t.className),...t}),tbody:e=>(0,r.jsx)(`tbody`,{...e}),tr:t=>(0,r.jsx)(`tr`,{className:e.y(`border-b border-subtle last:border-0 even:bg-soft/10 hover:bg-soft/20 transition-colors`,t.className),...t}),th:t=>(0,r.jsx)(`th`,{className:e.y(`px-4 py-3 font-semibold text-body text-xs font-mono`,t.className),...t}),td:t=>(0,r.jsx)(`td`,{className:e.y(`px-4 py-3 text-paragraph leading-relaxed`,t.className),...t})},m=(e,t)=>{if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`||typeof e==`number`)return String(e);if(Array.isArray(e))return e.map(e=>m(e,t)).join(``);if((0,n.isValidElement)(e)){let n=t?.get(e.type);return n?n(e.props):m(e.props.children,t)}return``},h=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);return t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t),!0}};function g(e){let[t,r]=(0,n.useState)(!1),[i,a]=(0,n.useState)(!1),[o,s]=(0,n.useState)(!1),c=(0,n.useRef)(null),l=(0,n.useCallback)(async()=>{h(c.current?.textContent??``),r(!0),setTimeout(()=>r(!1),2e3)},[]);return(0,n.useEffect)(()=>{let e=(c.current?.textContent??``).trim().split(`
7
+ `).length;s(e>6)},[e.children,e.highlightedHtml]),{copied:t,isExpanded:i,setIsExpanded:a,isExpandable:o,preRef:c,handleCopy:l,shouldTruncate:o&&!i}}const _={ts:e.m,tsx:e.d,js:e.c,jsx:e.d,json:e.l,css:e.i,html:e.n,md:e.u,mdx:e.u,bash:e.p,sh:e.p,yaml:e.g,yml:e.g,rs:e.f,rust:e.f,toml:e.r,csv:e.a},v=({copied:n,handleCopy:o})=>(0,r.jsx)(t.n,{content:n?`Copied!`:`Copy code`,children:(0,r.jsx)(a.Button,{onPress:o,className:e.y(`grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2 z-10`,n?`text-emerald-400`:`text-muted hover:text-body`),"aria-label":`Copy code`,children:n?(0,r.jsx)(i.Check,{size:20}):(0,r.jsx)(i.Copy,{size:20})})});function y(n){let{children:o,hideCopy:s=!1,highlightedHtml:c,"data-highlighted-html":l,title:u,"data-title":d,"data-lang":f,plain:p=!1,...h}=n,y=c||l,b=typeof y==`string`?y.replace(/<span class="line">\s*(?:<span[^>]*>\s*<\/span>)?\s*<\/span>\s*(<\/code>\s*<\/pre>)/g,`$1`):y,x=u||d,S=n.lang||f||``,{copied:C,isExpanded:w,setIsExpanded:T,isExpandable:E,preRef:D,handleCopy:O,shouldTruncate:k}=g(n),A=_[S];return(0,r.jsxs)(t.r,{plain:p,className:n.className,children:[(x||!s)&&(0,r.jsxs)(t.o,{className:e.y({"absolute top-2 left-0 w-full":!x}),children:[(0,r.jsx)(t.a,{children:x&&(0,r.jsxs)(r.Fragment,{children:[A?(0,r.jsx)(A,{size:14}):(0,r.jsx)(i.File,{size:14,className:`opacity-60`}),(0,r.jsx)(`span`,{children:x})]})}),(0,r.jsx)(`div`,{className:`flex items-center gap-1`,children:!s&&(0,r.jsx)(v,{copied:C,handleCopy:O})})]}),(0,r.jsxs)(t.i,{shouldTruncate:k,children:[b?(0,r.jsx)(`div`,{ref:D,className:`shiki-wrapper overflow-x-auto [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>pre>code]:text-[0.875rem]! [&>pre>code]:leading-[1.6]! [&>.shiki.shiki-themes]:bg-transparent!`,dangerouslySetInnerHTML:{__html:b}}):(0,r.jsx)(`pre`,{ref:D,className:`m-0! p-5! rounded-none! border-none! bg-inherit! font-mono text-[0.875rem] leading-[1.6] overflow-x-auto`,...h,children:m(o).trimEnd()}),E&&(0,r.jsx)(`div`,{className:e.y(k?`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 pb-4 pt-1 -mt-4`),children:(0,r.jsx)(a.Button,{onPress:()=>T(!w),className:`rounded-full bg-surface border border-subtle px-5 py-2 text-[0.8125rem] font-medium text-body outline-none cursor-pointer transition-all hover:bg-soft hover:-translate-y-px backdrop-blur-md`,children:w?`Show less`:`Expand code`})})]})]})}const b=({src:n,alt:i,title:a,theme:o,className:s,...c})=>{let{theme:l}=t.l();if(!n||o!==l)return null;let u=a||i;return(0,r.jsxs)(`figure`,{className:`my-6 sm:my-8 flex flex-col items-center justify-center group not-prose`,children:[(0,r.jsx)(`div`,{className:`relative w-full overflow-hidden rounded-lg sm:rounded-2xl border border-subtle bg-soft/30 transition-all duration-300 sm:max-w-[85%] lg:max-w-full`,children:(0,r.jsx)(t.t,{src:n,alt:i||``,theme:o,loading:`lazy`,decoding:`async`,className:e.y(`w-full h-auto object-contain transition-transform duration-500 group-hover:scale-[1.01] my-0 rounded-md sm:rounded-xl block`,s),...c})}),u&&(0,r.jsx)(`figcaption`,{className:`mt-2 sm:mt-3 text-center text-xs sm:text-sm text-muted font-medium select-none tracking-wide opacity-90 sm:opacity-80 group-hover:opacity-100 transition-opacity duration-300 px-2`,children:u})]})},x={img:b,Image:b};function S({className:t,title:i,icon:a,href:o,children:s,...c}){let[l,u]=(0,n.useState)({x:0,y:0}),[d,f]=(0,n.useState)(0),p=(0,n.useRef)(null),m=e=>{if(!p.current)return;let t=p.current.getBoundingClientRect();u({x:e.clientX-t.left,y:e.clientY-t.top})},h=()=>f(1),g=()=>f(0),_=o?`a`:`div`,v=`var(--color-primary-500, #eb5828)`;return(0,r.jsxs)(_,{ref:p,href:o,onMouseMove:m,onMouseEnter:h,onMouseLeave:g,className:e.y(`group relative flex flex-col gap-3 rounded-2xl border p-6 overflow-hidden transition-all duration-300`,`hover:shadow-lg dark:hover:shadow-none hover:-translate-y-0.5`,`bg-surface border-subtle text-paragraph`,o&&`cursor-pointer`,t),...c,children:[(0,r.jsx)(`div`,{className:`pointer-events-none absolute inset-0 transition-opacity duration-300`,style:{opacity:d,background:`radial-gradient(600px circle at ${l.x}px ${l.y}px, color-mix(in srgb, ${v} 8%, transparent), transparent 40%)`}}),(0,r.jsx)(`div`,{className:`pointer-events-none absolute inset-0 rounded-2xl transition-opacity duration-300`,style:{opacity:d,padding:`1px`,background:`radial-gradient(400px circle at ${l.x}px ${l.y}px, color-mix(in srgb, ${v} 50%, transparent), transparent 40%)`,WebkitMask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,WebkitMaskComposite:`xor`,maskComposite:`exclude`}}),(0,r.jsxs)(`div`,{className:`relative z-10 flex items-center gap-3`,children:[a&&(0,r.jsx)(`div`,{className:e.y(`shrink-0 transition-transform duration-500 group-hover:rotate-[15deg] group-hover:scale-110 flex items-center justify-center text-muted group-hover:text-primary-500`,`[&>svg]:w-6 [&>svg]:h-6 [&>svg]:stroke-[1.5]`),children:a}),i&&(0,r.jsx)(`h3`,{className:`font-semibold text-base m-0 leading-none text-body`,children:i})]}),(0,r.jsx)(`div`,{className:`relative z-10 text-[0.875rem] leading-[1.6] opacity-90 prose prose-neutral dark:prose-invert max-w-none [&>p]:m-0 [&>p+p]:mt-2`,children:s})]})}function C({children:t,className:n,cols:i=2,...a}){return(0,r.jsx)(`div`,{className:e.y(`grid gap-4 my-6`,{"grid-cols-1":i===1,"grid-cols-1 sm:grid-cols-2":i===2,"grid-cols-1 sm:grid-cols-2 md:grid-cols-3":i===3,"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4":i===4},n),...a,children:t})}const w={...f,...p,...x,pre:y,Field:c,Callout:s,Card:S,Cards:C};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return w}});
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ const e=require(`./chunk-Ds5LZdWN.cjs`);let t=require(`node:path`);t=e.n(t);let n=require(`fdir`),r=require(`node:fs/promises`);r=e.n(r);async function i(e){let i={};try{let a=(await new n.fdir().withFullPaths().filter(e=>e.endsWith(`meta.json`)).crawl(e).withPromise()).filter(e=>{let n=t.default.basename(e);return n===`meta.json`||n===`_meta.json`}),o=await Promise.allSettled(a.map(async n=>{let i=await r.default.readFile(n,`utf-8`),a=t.default.relative(e,t.default.dirname(n)).replace(/\\/g,`/`);return{key:a===``?`.`:a,content:JSON.parse(i)}}));for(let e of o)e.status===`fulfilled`?i[e.value.key]=e.value.content:console.warn(`[Boltdocs] Failed to read meta.json:`,e.reason)}catch(e){console.error(`[Boltdocs] Error loading directory metadata:`,e)}return i}exports.loadDirectoryMeta=i;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import e from"node:path";import{fdir as t}from"fdir";import n from"node:fs/promises";async function r(r){let i={};try{let a=(await new t().withFullPaths().filter(e=>e.endsWith(`meta.json`)).crawl(r).withPromise()).filter(t=>{let n=e.basename(t);return n===`meta.json`||n===`_meta.json`}),o=await Promise.allSettled(a.map(async t=>{let i=await n.readFile(t,`utf-8`),a=e.relative(r,e.dirname(t)).replace(/\\/g,`/`);return{key:a===``?`.`:a,content:JSON.parse(i)}}));for(let e of o)e.status===`fulfilled`?i[e.value.key]=e.value.content:console.warn(`[Boltdocs] Failed to read meta.json:`,e.reason)}catch(e){console.error(`[Boltdocs] Error loading directory metadata:`,e)}return i}export{r as loadDirectoryMeta};
@@ -4,5 +4,4 @@
4
4
  * Copyright (c) 2026 Jesus Alcala
5
5
  * Licensed under the MIT License.
6
6
  */
7
- const e=require(`../node-D5iosYXv.cjs`);let t=require(`vite`),n=require(`fast-glob`);n=e.S(n);let r=require(`fs`);r=e.S(r);let i=require(`path`);i=e.S(i);let a=require(`cac`);a=e.S(a);let o=require(`@bdocs/ssg/node`);var s=e.x({colors:()=>c,error:()=>d,formatLog:()=>l,info:()=>u,success:()=>f});const c={reset:`\x1B[0m`,bold:`\x1B[1m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,cyan:`\x1B[36m`,gray:`\x1B[90m`};function l(e,t=``){return`${t}${c.bold}[boltdocs]${c.reset} ${e}${c.reset}`}function u(e){console.log(l(e))}function d(e,t){console.error(l(e,c.red)),t&&console.error(t)}function f(e){console.log(l(e,c.green))}async function p(t=process.cwd()){try{let n=await(0,o.createServer)(await e.n(t,`development`));await n.listen(),n.printUrls(),n.bindCLIShortcuts({print:!0})}catch(e){d(`Failed to start dev server:`,e),process.exit(1)}}async function m(t=process.cwd()){try{await(0,o.build)({entry:`boltdocs/entry`},await e.n(t,`production`)),f(`SSG build completed successfully!`)}catch(e){d(`Build failed:`,e),process.exit(1)}}async function h(n=process.cwd()){try{(await(0,t.preview)(await e.n(n,`production`))).printUrls()}catch(e){d(`Failed to start preview server:`,e),process.exit(1)}}async function g(t=process.cwd()){let{colors:a}=s;u(`${a.bold}Running documentation health check...${a.reset}\n`);let o=performance.now();try{let s=await e.g(`docs`,t),c=i.default.resolve(t,`docs`);r.default.existsSync(c)||(d(`Documentation directory not found at ${c}`),process.exit(1));let l=await(0,n.default)([`**/*.md`,`**/*.mdx`],{cwd:c,absolute:!0,suppressErrors:!0}),p=0,m=0,h=0,g=new Map,_=(e,t)=>{let n=i.default.relative(c,e),r=g.get(n);r||(r=[],g.set(n,r)),r.push(t),t.level===`high`?p++:t.level===`warning`?m++:t.level===`low`&&h++},v=`/docs`;for(let t of l){let{data:n,content:a}=e.y(t);n.title||_(t,{level:`warning`,message:`Missing "title" in frontmatter.`,suggestion:"Add `title: Your Title` to the YAML frontmatter at the top of the file."}),n.description||_(t,{level:`low`,message:`Missing "description" in frontmatter.`,suggestion:`Adding a description helps with SEO and search previews.`});let o=/\[.*?\]\((.*?)\)/g,s=/<a\s+[^>]*href=["']([^"']+)["'][^>]*>/g,l=[...a.matchAll(o),...a.matchAll(s)];for(let e of l){let n=e[1];if(!n||n.startsWith(`http`)||n.startsWith(`https`)||n.startsWith(`#`)||n.startsWith(`mailto:`)||n.startsWith(`tel:`)||(n=n.split(`#`)[0],!n))continue;let a;if(n.startsWith(`/`)){let e=n;(n.startsWith(v+`/`)||n===v)&&(e=n.substring(5)),a=i.default.join(c,e)}else a=i.default.resolve(i.default.dirname(t),n);let o=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`],s=!1;for(let e of o){let t=a+e;if(r.default.existsSync(t)&&r.default.statSync(t).isFile()){s=!0;break}}s||_(t,{level:`high`,message:`Broken internal link: "${n}"`,suggestion:`Ensure the file exists at "${a}". If it's a directory, ensure it has an "index.md" or "index.mdx".`})}}if(s.i18n){let{defaultLocale:t,locales:n}=s.i18n,a=Object.keys(n).filter(e=>e!==t);for(let n of l){let o=e.v(i.default.relative(c,n)).split(`/`);if(o[0]===t){let e=o.slice(1).join(`/`);for(let t of a){let a=[t,...o.slice(1)],s=i.default.join(c,...a);r.default.existsSync(s)||_(n,{level:`warning`,message:`Missing translation for locale "${t}"`,suggestion:`Create a translated version of this file at "${t}/${e}".`})}}}}if(g.size===0)f(`All documentation files are healthy!
8
- `);else{for(let[e,t]of g.entries()){console.log(`📄 ${a.bold}${e}${a.reset}`);let n=t.sort((e,t)=>{let n={high:1,warning:2,low:3};return n[e.level]-n[t.level]});for(let e of n){let t=``,n=``;e.level===`high`?(t=`❌`,n=a.red):e.level===`warning`?(t=`⚠️`,n=a.yellow):(t=`ℹ️`,n=a.cyan),console.log(` ${n}${t} ${e.level.toUpperCase()}:${a.reset} ${e.message}`),e.suggestion&&console.log(` ${a.gray}💡 Suggestion: ${e.suggestion}${a.reset}`)}console.log(``)}console.log(`${a.bold}Summary:${a.reset}`),console.log(` ${a.red}${p} high-level errors${a.reset}`),console.log(` ${a.yellow}${m} warnings${a.reset}`),console.log(` ${a.cyan}${h} minor improvements${a.reset}\n`),p>0&&d(`HIGH ERROR: Fix these to ensure your documentation builds correctly.`),(m>0||h>0)&&u(`TIP: Address warnings and suggestions for premium quality docs.`),console.log(``)}u(`Finished in ${(performance.now()-o).toFixed(2)}ms\n`),p>0&&process.exit(1)}catch(e){d(`Failed to run doctor check:`,e),process.exit(1)}}const _=(0,a.default)(`boltdocs`);_.command(`[root]`,`Start development server`).alias(`dev`).action(p),_.command(`build [root]`,`Build for production`).action(m),_.command(`preview [root]`,`Preview production build`).action(h),_.command(`doctor [root]`,`Check documentation health`).action(g),_.help(),_.version(`2.0.0`),_.parse();
7
+ const e=require(`../chunk-Ds5LZdWN.cjs`),t=require(`../routes-Co1mRM58.cjs`),n=require(`../node-CinkUtxV.cjs`),r=require(`../doctor-COpf35L2.cjs`);let i=require(`vite`),a=require(`node:path`);a=e.n(a);let o=require(`cac`);o=e.n(o);let s=require(`@bdocs/ssg/node`);async function c(e=process.cwd()){try{let t=await(0,s.createServer)(await n.n(e,`development`));await t.listen(),t.printUrls(),t.bindCLIShortcuts({print:!0})}catch(e){r.u(`Failed to start dev server:`,e),process.exit(1)}}async function l(e=process.cwd()){try{let i=await n.n(e,`production`),o=await r.p(`docs`,e),c=await t.t(a.default.resolve(e,`docs`),o,i.base),l={};for(let e of c)if(e.path&&e.componentPath){l[e.path]=e.componentPath;let t=e.path.replace(/\/$/,``);l[t]=e.componentPath}await(0,s.build)({entry:`boltdocs/entry`,routeToSourceFileMap:l,cacheDir:a.default.resolve(e,`.boltdocs`)},i),r.d(`SSG build completed successfully!`)}catch(e){r.u(`Build failed:`,e),process.exit(1)}}async function u(e=process.cwd()){try{(await(0,i.preview)(await n.n(e,`production`))).printUrls()}catch(e){r.u(`Failed to start preview server:`,e),process.exit(1)}}const d=(0,o.default)(`boltdocs`);d.command(`[root]`,`Start development server`).alias(`dev`).action(c),d.command(`build [root]`,`Build for production`).action(l),d.command(`preview [root]`,`Preview production build`).action(u),d.command(`doctor [root]`,`Check the health of your documentation`).option(`--fix`,`Automatically fix broken internal links and sync translations`).option(`--check-external`,`Verify external links (slower)`).option(`--init`,`Initialize doctor.json with default configuration`).action(async(e,t)=>{let{doctorAction:n}=await Promise.resolve().then(()=>require(`../doctor-BQiQhCTl.cjs`));await n(e,t)}),d.command(`generate-changelog <file>`,`Generate changelog documentation from CHANGELOG.md`).option(`-o, --output <path>`,`Output folder (default: docs/changelog)`,{default:`docs/changelog`}).option(`-t, --title <text>`,`Title for changelog pages`,{default:`Changelog`}).option(`--infer-tab`,`Infer tab from folder name (default: true)`,{default:!0}).option(`-l, --limit <number>`,`Limit number of versions to generate`).action(async(e,t)=>{let{generateChangelog:n}=await Promise.resolve().then(()=>require(`../generator-DGW6pkCC.cjs`));await n(e,{output:t.output,title:t.title,inferTab:t.inferTab,limit:t.limit?parseInt(String(t.limit),10):void 0})}),d.help(),d.version(`2.0.0`),d.parse();
@@ -4,5 +4,4 @@
4
4
  * Copyright (c) 2026 Jesus Alcala
5
5
  * Licensed under the MIT License.
6
6
  */
7
- import{g as e,n as t,v as n,y as r}from"../node-CWN8U_p8.mjs";import{preview as i}from"vite";import a from"fast-glob";import o from"fs";import s from"path";import c from"cac";import{build as l,createServer as u}from"@bdocs/ssg/node";var d=Object.defineProperty,f=((e,t)=>{let n={};for(var r in e)d(n,r,{get:e[r],enumerable:!0});return t||d(n,Symbol.toStringTag,{value:`Module`}),n})({colors:()=>p,error:()=>g,formatLog:()=>m,info:()=>h,success:()=>_});const p={reset:`\x1B[0m`,bold:`\x1B[1m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,cyan:`\x1B[36m`,gray:`\x1B[90m`};function m(e,t=``){return`${t}${p.bold}[boltdocs]${p.reset} ${e}${p.reset}`}function h(e){console.log(m(e))}function g(e,t){console.error(m(e,p.red)),t&&console.error(t)}function _(e){console.log(m(e,p.green))}async function v(e=process.cwd()){try{let n=await u(await t(e,`development`));await n.listen(),n.printUrls(),n.bindCLIShortcuts({print:!0})}catch(e){g(`Failed to start dev server:`,e),process.exit(1)}}async function y(e=process.cwd()){try{await l({entry:`boltdocs/entry`},await t(e,`production`)),_(`SSG build completed successfully!`)}catch(e){g(`Build failed:`,e),process.exit(1)}}async function b(e=process.cwd()){try{(await i(await t(e,`production`))).printUrls()}catch(e){g(`Failed to start preview server:`,e),process.exit(1)}}async function x(t=process.cwd()){let{colors:i}=f;h(`${i.bold}Running documentation health check...${i.reset}\n`);let c=performance.now();try{let l=await e(`docs`,t),u=s.resolve(t,`docs`);o.existsSync(u)||(g(`Documentation directory not found at ${u}`),process.exit(1));let d=await a([`**/*.md`,`**/*.mdx`],{cwd:u,absolute:!0,suppressErrors:!0}),f=0,p=0,m=0,v=new Map,y=(e,t)=>{let n=s.relative(u,e),r=v.get(n);r||(r=[],v.set(n,r)),r.push(t),t.level===`high`?f++:t.level===`warning`?p++:t.level===`low`&&m++},b=`/docs`;for(let e of d){let{data:t,content:n}=r(e);t.title||y(e,{level:`warning`,message:`Missing "title" in frontmatter.`,suggestion:"Add `title: Your Title` to the YAML frontmatter at the top of the file."}),t.description||y(e,{level:`low`,message:`Missing "description" in frontmatter.`,suggestion:`Adding a description helps with SEO and search previews.`});let i=/\[.*?\]\((.*?)\)/g,a=/<a\s+[^>]*href=["']([^"']+)["'][^>]*>/g,c=[...n.matchAll(i),...n.matchAll(a)];for(let t of c){let n=t[1];if(!n||n.startsWith(`http`)||n.startsWith(`https`)||n.startsWith(`#`)||n.startsWith(`mailto:`)||n.startsWith(`tel:`)||(n=n.split(`#`)[0],!n))continue;let r;if(n.startsWith(`/`)){let e=n;(n.startsWith(b+`/`)||n===b)&&(e=n.substring(5)),r=s.join(u,e)}else r=s.resolve(s.dirname(e),n);let i=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`],a=!1;for(let e of i){let t=r+e;if(o.existsSync(t)&&o.statSync(t).isFile()){a=!0;break}}a||y(e,{level:`high`,message:`Broken internal link: "${n}"`,suggestion:`Ensure the file exists at "${r}". If it's a directory, ensure it has an "index.md" or "index.mdx".`})}}if(l.i18n){let{defaultLocale:e,locales:t}=l.i18n,r=Object.keys(t).filter(t=>t!==e);for(let t of d){let i=n(s.relative(u,t)).split(`/`);if(i[0]===e){let e=i.slice(1).join(`/`);for(let n of r){let r=[n,...i.slice(1)],a=s.join(u,...r);o.existsSync(a)||y(t,{level:`warning`,message:`Missing translation for locale "${n}"`,suggestion:`Create a translated version of this file at "${n}/${e}".`})}}}}if(v.size===0)_(`All documentation files are healthy!
8
- `);else{for(let[e,t]of v.entries()){console.log(`📄 ${i.bold}${e}${i.reset}`);let n=t.sort((e,t)=>{let n={high:1,warning:2,low:3};return n[e.level]-n[t.level]});for(let e of n){let t=``,n=``;e.level===`high`?(t=`❌`,n=i.red):e.level===`warning`?(t=`⚠️`,n=i.yellow):(t=`ℹ️`,n=i.cyan),console.log(` ${n}${t} ${e.level.toUpperCase()}:${i.reset} ${e.message}`),e.suggestion&&console.log(` ${i.gray}💡 Suggestion: ${e.suggestion}${i.reset}`)}console.log(``)}console.log(`${i.bold}Summary:${i.reset}`),console.log(` ${i.red}${f} high-level errors${i.reset}`),console.log(` ${i.yellow}${p} warnings${i.reset}`),console.log(` ${i.cyan}${m} minor improvements${i.reset}\n`),f>0&&g(`HIGH ERROR: Fix these to ensure your documentation builds correctly.`),(p>0||m>0)&&h(`TIP: Address warnings and suggestions for premium quality docs.`),console.log(``)}h(`Finished in ${(performance.now()-c).toFixed(2)}ms\n`),f>0&&process.exit(1)}catch(e){g(`Failed to run doctor check:`,e),process.exit(1)}}const S=c(`boltdocs`);S.command(`[root]`,`Start development server`).alias(`dev`).action(v),S.command(`build [root]`,`Build for production`).action(y),S.command(`preview [root]`,`Preview production build`).action(b),S.command(`doctor [root]`,`Check documentation health`).action(x),S.help(),S.version(`2.0.0`),S.parse();export{};
7
+ import{i as e,o as t,r as n}from"../doctor-Dh1XP7Pz.mjs";import{t as r}from"../routes-CMUZGI6T.mjs";import{n as i}from"../node-C2nWXElP.mjs";import{preview as a}from"vite";import o from"node:path";import s from"cac";import{build as c,createServer as l}from"@bdocs/ssg/node";async function u(e=process.cwd()){try{let t=await l(await i(e,`development`));await t.listen(),t.printUrls(),t.bindCLIShortcuts({print:!0})}catch(e){n(`Failed to start dev server:`,e),process.exit(1)}}async function d(a=process.cwd()){try{let n=await i(a,`production`),s=await t(`docs`,a),l=await r(o.resolve(a,`docs`),s,n.base),u={};for(let e of l)if(e.path&&e.componentPath){u[e.path]=e.componentPath;let t=e.path.replace(/\/$/,``);u[t]=e.componentPath}await c({entry:`boltdocs/entry`,routeToSourceFileMap:u,cacheDir:o.resolve(a,`.boltdocs`)},n),e(`SSG build completed successfully!`)}catch(e){n(`Build failed:`,e),process.exit(1)}}async function f(e=process.cwd()){try{(await a(await i(e,`production`))).printUrls()}catch(e){n(`Failed to start preview server:`,e),process.exit(1)}}const p=s(`boltdocs`);p.command(`[root]`,`Start development server`).alias(`dev`).action(u),p.command(`build [root]`,`Build for production`).action(d),p.command(`preview [root]`,`Preview production build`).action(f),p.command(`doctor [root]`,`Check the health of your documentation`).option(`--fix`,`Automatically fix broken internal links and sync translations`).option(`--check-external`,`Verify external links (slower)`).option(`--init`,`Initialize doctor.json with default configuration`).action(async(e,t)=>{let{doctorAction:n}=await import(`../doctor-Dh1XP7Pz.mjs`).then(e=>e.t);await n(e,t)}),p.command(`generate-changelog <file>`,`Generate changelog documentation from CHANGELOG.md`).option(`-o, --output <path>`,`Output folder (default: docs/changelog)`,{default:`docs/changelog`}).option(`-t, --title <text>`,`Title for changelog pages`,{default:`Changelog`}).option(`--infer-tab`,`Infer tab from folder name (default: true)`,{default:!0}).option(`-l, --limit <number>`,`Limit number of versions to generate`).action(async(e,t)=>{let{generateChangelog:n}=await import(`../generator-Dv3wEmhZ.mjs`);await n(e,{output:t.output,title:t.title,inferTab:t.inferTab,limit:t.limit?parseInt(String(t.limit),10):void 0})}),p.help(),p.version(`2.0.0`),p.parse();export{};
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../node-D5iosYXv.cjs`);exports.BoltdocsPluginStore=e.l,exports.PluginCompatibilityError=e.u,exports.PluginError=e.d,exports.PluginHookError=e.f,exports.PluginLifecycleManager=e.i,exports.PluginPermissionError=e.p,exports.PluginSandbox=e.a,exports.PluginValidationError=e.m,exports.SecurePluginSchema=e.o,exports.createPlugin=e.r,exports.createViteConfig=e.n,exports.default=e.t,exports.defineConfig=e._,exports.generateEntryCode=e.h,exports.hasPermission=e.s,exports.normalizePath=e.v,exports.resolveConfig=e.g,exports.sanitizeFilename=e.b,exports.validatePlugins=e.c;
6
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../utils-Clzu7jvb.cjs`),t=require(`../node-CinkUtxV.cjs`),n=require(`../doctor-COpf35L2.cjs`);exports.BoltdocsPluginStore=t.u,exports.PluginCompatibilityError=t.d,exports.PluginError=t.f,exports.PluginHookError=t.p,exports.PluginLifecycleManager=t.a,exports.PluginPermissionError=t.m,exports.PluginSandbox=t.o,exports.PluginValidationError=t.h,exports.SecurePluginSchema=t.s,exports.createPlugin=t.i,exports.createViteConfig=t.n,exports.default=t.t,exports.defineConfig=n.h,exports.generateEntryCode=t.r,exports.hasPermission=t.c,exports.normalizePath=e.l,exports.resolveConfig=n.p,exports.sanitizeFilename=e.d,exports.validatePlugins=t.l;
@@ -33,24 +33,26 @@ interface BoltdocsThemeConfig {
33
33
  navbar?: Array<{
34
34
  label: string | Record<string, string>;
35
35
  href: string;
36
+ items?: Array<{
37
+ label: string | Record<string, string>;
38
+ href: string;
39
+ }>;
36
40
  }>;
37
41
  sidebar?: Record<string, Array<{
38
42
  text: string;
39
43
  link: string;
40
44
  }>>;
41
45
  sidebarGroups?: Record<string, {
42
- title?: string;
46
+ title?: string | Record<string, string>;
43
47
  icon?: string;
44
48
  }>;
45
49
  socialLinks?: BoltdocsSocialLink[];
46
50
  footer?: BoltdocsFooterConfig;
47
- breadcrumbs?: boolean;
48
51
  editLink?: string;
49
52
  communityHelp?: string;
50
53
  version?: string;
51
54
  githubRepo?: string;
52
55
  favicon?: string;
53
- poweredBy?: boolean;
54
56
  tabs?: Array<{
55
57
  id: string;
56
58
  text: string | Record<string, string>;
@@ -60,10 +62,6 @@ interface BoltdocsThemeConfig {
60
62
  light: ShikiTheme;
61
63
  dark: ShikiTheme;
62
64
  };
63
- copyMarkdown?: boolean | {
64
- text?: string;
65
- icon?: string;
66
- };
67
65
  }
68
66
  /**
69
67
  * List of supported syntax highlighting themes.
@@ -94,7 +92,7 @@ interface BoltdocsLocaleConfig {
94
92
  */
95
93
  interface BoltdocsI18nConfig {
96
94
  defaultLocale: string;
97
- locales: Record<string, string>;
95
+ locales: string[] | Record<string, string>;
98
96
  localeConfigs?: Record<string, BoltdocsLocaleConfig>;
99
97
  }
100
98
  /**
@@ -145,6 +143,34 @@ interface BoltdocsSeoConfig {
145
143
  background?: string;
146
144
  };
147
145
  }
146
+ /**
147
+ * Configuration for Google Analytics 4 (GA4).
148
+ */
149
+ interface BoltdocsGA4Config {
150
+ measurementId: string;
151
+ debug?: boolean;
152
+ anonymizeIp?: boolean;
153
+ sendPageView?: boolean;
154
+ cookieFlags?: string;
155
+ autoTrack?: {
156
+ pageViews?: boolean;
157
+ downloads?: boolean;
158
+ externalLinks?: boolean;
159
+ search?: boolean;
160
+ };
161
+ }
162
+ /**
163
+ * Configuration for Google Tag Manager (GTM).
164
+ */
165
+ interface BoltdocsGTMConfig {
166
+ tagId: string;
167
+ dataLayerName?: string;
168
+ preview?: string;
169
+ }
170
+ interface BoltdocsIntegrationsConfig {
171
+ ga4?: BoltdocsGA4Config;
172
+ gtm?: BoltdocsGTMConfig;
173
+ }
148
174
  /**
149
175
  * The root configuration object for Boltdocs.
150
176
  */
@@ -152,7 +178,6 @@ interface BoltdocsConfig {
152
178
  siteUrl?: string;
153
179
  docsDir?: string;
154
180
  base?: string;
155
- homePage?: string;
156
181
  theme?: BoltdocsThemeConfig;
157
182
  i18n?: BoltdocsI18nConfig;
158
183
  versions?: BoltdocsVersionsConfig;
@@ -160,8 +185,20 @@ interface BoltdocsConfig {
160
185
  robots?: BoltdocsRobotsConfig;
161
186
  security?: BoltdocsSecurityConfig;
162
187
  seo?: BoltdocsSeoConfig;
188
+ integrations?: BoltdocsIntegrationsConfig;
189
+ /** Aggregated metadata from local meta.json files */
190
+ directoryMeta?: Record<string, any>;
163
191
  vite?: any;
164
192
  }
193
+ /**
194
+ * Global namespace for Boltdocs types that can be augmented by generated code.
195
+ * This allows for strictly typed locales and versions based on the project configuration.
196
+ */
197
+ declare global {
198
+ namespace Boltdocs {
199
+ interface Types {}
200
+ }
201
+ }
165
202
  //#endregion
166
203
  //#region src/shared/config-utils.d.ts
167
204
  /**
@@ -191,8 +228,6 @@ declare function resolveConfig(docsDir: string, root?: string): Promise<Boltdocs
191
228
  interface BoltdocsPluginOptions {
192
229
  /** The root directory containing markdown files (default: 'docs') */
193
230
  docsDir?: string;
194
- /** Path to a custom home page component (relative to project root) to render at '/' */
195
- homePage?: string;
196
231
  }
197
232
  //#endregion
198
233
  //#region src/node/plugin/entry.d.ts
@@ -204,7 +239,7 @@ interface BoltdocsPluginOptions {
204
239
  * @param config - The resolved Boltdocs configuration containing custom plugins and components
205
240
  * @returns A string of JavaScript code to be evaluated by the browser
206
241
  */
207
- declare function generateEntryCode(options: BoltdocsPluginOptions, config?: BoltdocsConfig): string;
242
+ declare function generateEntryCode(options: BoltdocsPluginOptions, config?: BoltdocsConfig, isBuild?: boolean): string;
208
243
  //#endregion
209
244
  //#region src/node/routes/types.d.ts
210
245
  /**
@@ -259,6 +294,24 @@ interface RouteMeta {
259
294
  _rawContent?: string;
260
295
  /** Extracted SEO and Open Graph metadata from frontmatter */
261
296
  seo?: Record<string, any>;
297
+ /** The publication date */
298
+ date?: string | Date;
299
+ /** The last updated timestamp or date */
300
+ lastUpdated?: string | number | Date;
301
+ /** Optional category for the page */
302
+ category?: string;
303
+ /** Optional explicit order (alternative to sidebarPosition) */
304
+ order?: number;
305
+ /** Optional explicit label for the sidebar */
306
+ sidebarLabel?: string;
307
+ /** Whether the page is hidden from the sidebar */
308
+ sidebarHidden?: boolean;
309
+ /** Raw extensible frontmatter data for custom components and formatters */
310
+ frontmatter?: Record<string, any>;
311
+ /** Optional recursive child routes for deep sidebar hierarchies */
312
+ subRoutes?: RouteMeta[];
313
+ /** Clean URL segments stripped of locale/version prefixes */
314
+ slugParts?: string[];
262
315
  }
263
316
  //#endregion
264
317
  //#region src/node/utils.d.ts
@@ -283,7 +336,7 @@ declare function sanitizeFilename(name: string): string;
283
336
  /**
284
337
  * Permissions that a plugin can request to access specific Boltdocs capabilities.
285
338
  */
286
- type PluginPermission = 'fs:read' | 'fs:write' | 'vite:config' | 'mdx:remark' | 'mdx:rehype' | 'components' | 'hooks:build' | 'hooks:dev';
339
+ type PluginPermission = 'fs:read' | 'fs:write' | 'vite:config' | 'mdx:remark' | 'mdx:rehype' | 'components' | 'hooks:build' | 'hooks:dev' | 'analytics:track' | 'analytics:config';
287
340
  /**
288
341
  * Shared context injected into every plugin lifecycle hook.
289
342
  */
@@ -2,7 +2,6 @@
2
2
  import * as _$vite from "vite";
3
3
  import { InlineConfig, Plugin } from "vite";
4
4
  import { z } from "zod";
5
-
6
5
  //#region src/shared/types.d.ts
7
6
  /**
8
7
  * Represents a single social link in the configuration.
@@ -33,24 +32,26 @@ interface BoltdocsThemeConfig {
33
32
  navbar?: Array<{
34
33
  label: string | Record<string, string>;
35
34
  href: string;
35
+ items?: Array<{
36
+ label: string | Record<string, string>;
37
+ href: string;
38
+ }>;
36
39
  }>;
37
40
  sidebar?: Record<string, Array<{
38
41
  text: string;
39
42
  link: string;
40
43
  }>>;
41
44
  sidebarGroups?: Record<string, {
42
- title?: string;
45
+ title?: string | Record<string, string>;
43
46
  icon?: string;
44
47
  }>;
45
48
  socialLinks?: BoltdocsSocialLink[];
46
49
  footer?: BoltdocsFooterConfig;
47
- breadcrumbs?: boolean;
48
50
  editLink?: string;
49
51
  communityHelp?: string;
50
52
  version?: string;
51
53
  githubRepo?: string;
52
54
  favicon?: string;
53
- poweredBy?: boolean;
54
55
  tabs?: Array<{
55
56
  id: string;
56
57
  text: string | Record<string, string>;
@@ -60,10 +61,6 @@ interface BoltdocsThemeConfig {
60
61
  light: ShikiTheme;
61
62
  dark: ShikiTheme;
62
63
  };
63
- copyMarkdown?: boolean | {
64
- text?: string;
65
- icon?: string;
66
- };
67
64
  }
68
65
  /**
69
66
  * List of supported syntax highlighting themes.
@@ -94,7 +91,7 @@ interface BoltdocsLocaleConfig {
94
91
  */
95
92
  interface BoltdocsI18nConfig {
96
93
  defaultLocale: string;
97
- locales: Record<string, string>;
94
+ locales: string[] | Record<string, string>;
98
95
  localeConfigs?: Record<string, BoltdocsLocaleConfig>;
99
96
  }
100
97
  /**
@@ -145,6 +142,34 @@ interface BoltdocsSeoConfig {
145
142
  background?: string;
146
143
  };
147
144
  }
145
+ /**
146
+ * Configuration for Google Analytics 4 (GA4).
147
+ */
148
+ interface BoltdocsGA4Config {
149
+ measurementId: string;
150
+ debug?: boolean;
151
+ anonymizeIp?: boolean;
152
+ sendPageView?: boolean;
153
+ cookieFlags?: string;
154
+ autoTrack?: {
155
+ pageViews?: boolean;
156
+ downloads?: boolean;
157
+ externalLinks?: boolean;
158
+ search?: boolean;
159
+ };
160
+ }
161
+ /**
162
+ * Configuration for Google Tag Manager (GTM).
163
+ */
164
+ interface BoltdocsGTMConfig {
165
+ tagId: string;
166
+ dataLayerName?: string;
167
+ preview?: string;
168
+ }
169
+ interface BoltdocsIntegrationsConfig {
170
+ ga4?: BoltdocsGA4Config;
171
+ gtm?: BoltdocsGTMConfig;
172
+ }
148
173
  /**
149
174
  * The root configuration object for Boltdocs.
150
175
  */
@@ -152,7 +177,6 @@ interface BoltdocsConfig {
152
177
  siteUrl?: string;
153
178
  docsDir?: string;
154
179
  base?: string;
155
- homePage?: string;
156
180
  theme?: BoltdocsThemeConfig;
157
181
  i18n?: BoltdocsI18nConfig;
158
182
  versions?: BoltdocsVersionsConfig;
@@ -160,8 +184,20 @@ interface BoltdocsConfig {
160
184
  robots?: BoltdocsRobotsConfig;
161
185
  security?: BoltdocsSecurityConfig;
162
186
  seo?: BoltdocsSeoConfig;
187
+ integrations?: BoltdocsIntegrationsConfig;
188
+ /** Aggregated metadata from local meta.json files */
189
+ directoryMeta?: Record<string, any>;
163
190
  vite?: any;
164
191
  }
192
+ /**
193
+ * Global namespace for Boltdocs types that can be augmented by generated code.
194
+ * This allows for strictly typed locales and versions based on the project configuration.
195
+ */
196
+ declare global {
197
+ namespace Boltdocs {
198
+ interface Types {}
199
+ }
200
+ }
165
201
  //#endregion
166
202
  //#region src/shared/config-utils.d.ts
167
203
  /**
@@ -191,8 +227,6 @@ declare function resolveConfig(docsDir: string, root?: string): Promise<Boltdocs
191
227
  interface BoltdocsPluginOptions {
192
228
  /** The root directory containing markdown files (default: 'docs') */
193
229
  docsDir?: string;
194
- /** Path to a custom home page component (relative to project root) to render at '/' */
195
- homePage?: string;
196
230
  }
197
231
  //#endregion
198
232
  //#region src/node/plugin/entry.d.ts
@@ -204,7 +238,7 @@ interface BoltdocsPluginOptions {
204
238
  * @param config - The resolved Boltdocs configuration containing custom plugins and components
205
239
  * @returns A string of JavaScript code to be evaluated by the browser
206
240
  */
207
- declare function generateEntryCode(options: BoltdocsPluginOptions, config?: BoltdocsConfig): string;
241
+ declare function generateEntryCode(options: BoltdocsPluginOptions, config?: BoltdocsConfig, isBuild?: boolean): string;
208
242
  //#endregion
209
243
  //#region src/node/routes/types.d.ts
210
244
  /**
@@ -259,6 +293,24 @@ interface RouteMeta {
259
293
  _rawContent?: string;
260
294
  /** Extracted SEO and Open Graph metadata from frontmatter */
261
295
  seo?: Record<string, any>;
296
+ /** The publication date */
297
+ date?: string | Date;
298
+ /** The last updated timestamp or date */
299
+ lastUpdated?: string | number | Date;
300
+ /** Optional category for the page */
301
+ category?: string;
302
+ /** Optional explicit order (alternative to sidebarPosition) */
303
+ order?: number;
304
+ /** Optional explicit label for the sidebar */
305
+ sidebarLabel?: string;
306
+ /** Whether the page is hidden from the sidebar */
307
+ sidebarHidden?: boolean;
308
+ /** Raw extensible frontmatter data for custom components and formatters */
309
+ frontmatter?: Record<string, any>;
310
+ /** Optional recursive child routes for deep sidebar hierarchies */
311
+ subRoutes?: RouteMeta[];
312
+ /** Clean URL segments stripped of locale/version prefixes */
313
+ slugParts?: string[];
262
314
  }
263
315
  //#endregion
264
316
  //#region src/node/utils.d.ts
@@ -283,7 +335,7 @@ declare function sanitizeFilename(name: string): string;
283
335
  /**
284
336
  * Permissions that a plugin can request to access specific Boltdocs capabilities.
285
337
  */
286
- type PluginPermission = 'fs:read' | 'fs:write' | 'vite:config' | 'mdx:remark' | 'mdx:rehype' | 'components' | 'hooks:build' | 'hooks:dev';
338
+ type PluginPermission = 'fs:read' | 'fs:write' | 'vite:config' | 'mdx:remark' | 'mdx:rehype' | 'components' | 'hooks:build' | 'hooks:dev' | 'analytics:track' | 'analytics:config';
287
339
  /**
288
340
  * Shared context injected into every plugin lifecycle hook.
289
341
  */
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- import{_ as e,a as t,b as n,c as r,d as i,f as a,g as o,h as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _,v}from"../node-CWN8U_p8.mjs";export{l as BoltdocsPluginStore,_ as PluginCompatibilityError,i as PluginError,a as PluginHookError,c as PluginLifecycleManager,p as PluginPermissionError,t as PluginSandbox,u as PluginValidationError,f as SecurePluginSchema,m as createPlugin,d as createViteConfig,g as default,e as defineConfig,s as generateEntryCode,h as hasPermission,v as normalizePath,o as resolveConfig,n as sanitizeFilename,r as validatePlugins};
6
+ import{c as e,o as t}from"../doctor-Dh1XP7Pz.mjs";import{d as n,l as r}from"../utils-BxNAXhZZ.mjs";import{a as i,c as a,d as o,f as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v}from"../node-C2nWXElP.mjs";export{v as BoltdocsPluginStore,o as PluginCompatibilityError,s as PluginError,m as PluginHookError,i as PluginLifecycleManager,d as PluginPermissionError,p as PluginSandbox,c as PluginValidationError,g as SecurePluginSchema,l as createPlugin,f as createViteConfig,_ as default,e as defineConfig,h as generateEntryCode,a as hasPermission,r as normalizePath,t as resolveConfig,n as sanitizeFilename,u as validatePlugins};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ require(`../../chunk-Ds5LZdWN.cjs`);const e=require(`../../parser-DYRzXWmA.cjs`);let t=require(`node:worker_threads`);if(!t.parentPort)throw Error(`This file must be run as a worker thread.`);t.parentPort.on(`message`,async n=>{if(n.type===`PARSE_FILE`)try{let r=await e.t(n.file,n.docsDir,n.basePath,n.config);t.parentPort?.postMessage({type:`SUCCESS`,file:n.file,result:r})}catch(e){t.parentPort?.postMessage({type:`ERROR`,file:n.file,error:e.message||`Unknown parsing error`})}});
@@ -0,0 +1,2 @@
1
+
2
+ export { };
@@ -0,0 +1,2 @@
1
+
2
+ export { };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import{n as e}from"../../parser-D8eQvE7N.mjs";import{parentPort as t}from"node:worker_threads";if(!t)throw Error(`This file must be run as a worker thread.`);t.on(`message`,async n=>{if(n.type===`PARSE_FILE`)try{let r=await e(n.file,n.docsDir,n.basePath,n.config);t?.postMessage({type:`SUCCESS`,file:n.file,result:r})}catch(e){t?.postMessage({type:`ERROR`,file:n.file,error:e.message||`Unknown parsing error`})}});export{};