boltdocs 3.1.0 → 3.2.2

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 (138) hide show
  1. package/dist/{adapters-DEXNIv3x.mjs → adapters-ByYY44Zy.mjs} +1 -1
  2. package/dist/{adapters-uGz-UKQa.cjs → adapters-DvmtpdSF.cjs} +1 -1
  3. package/dist/{banner-DjujkctF.d.ts → banner-BMop1KLF.d.ts} +2 -2
  4. package/dist/{banner-DdSgCs4G.d.cts → banner-CVD0GugR.d.cts} +2 -2
  5. package/dist/{cache-CfRTUzWC.cjs → cache-CO4Dy2uQ.cjs} +1 -1
  6. package/dist/{cache-B0C2i0yP.mjs → cache-Dk53iOo6.mjs} +1 -1
  7. package/dist/chunk-BFSpntXv.mjs +6 -0
  8. package/dist/{chunk-Ds5LZdWN.cjs → chunk-D1Md3oWO.cjs} +1 -1
  9. package/dist/client/index.cjs +219 -172
  10. package/dist/client/index.d.cts +75 -9
  11. package/dist/client/index.d.ts +75 -9
  12. package/dist/client/index.js +119 -73
  13. package/dist/client/mdx.cjs +1 -1
  14. package/dist/client/mdx.d.cts +1 -1
  15. package/dist/client/mdx.d.ts +1 -1
  16. package/dist/client/mdx.js +1 -1
  17. package/dist/client/primitives.cjs +7 -7
  18. package/dist/client/primitives.d.cts +5 -22
  19. package/dist/client/primitives.d.ts +5 -22
  20. package/dist/client/primitives.js +4 -4
  21. package/dist/client/theme/reset.css +31 -4
  22. package/dist/{shiki-adapter-fS94vy-z.d.mts → config-BpzaPsJj.d.cts} +325 -78
  23. package/dist/config-CCXp3aXO.mjs +7 -0
  24. package/dist/{config-BxsogK5A.cjs → config-CMd4XoFq.cjs} +1 -1
  25. package/dist/config-DlGoEM9D.cjs +7 -0
  26. package/dist/{shiki-adapter-l2kEP5rn.d.cts → config-xtS0ZkMm.d.mts} +325 -78
  27. package/dist/{csp-BX06rvdg.cjs → csp-CRp_3U7a.cjs} +1 -1
  28. package/dist/csp-oTC2ygvF.mjs +6 -0
  29. package/dist/{docs-layout-DyLDBwS6.js → docs-layout-BdtZ9z6s.js} +9 -28
  30. package/dist/{docs-layout-D1buSdua.cjs → docs-layout-CFWI15Id.cjs} +69 -88
  31. package/dist/{doctor-DPDcRKM1.cjs → doctor-BBtmNJE0.cjs} +1 -1
  32. package/dist/doctor-Bv16QSrI.cjs +7 -0
  33. package/dist/doctor-DOAbSaiL.mjs +7 -0
  34. package/dist/{generator-BN75lJOv.cjs → generator-COepVWGi.cjs} +1 -1
  35. package/dist/{handler-Btd4t_67.mjs → handler-DzQae4eA.mjs} +1 -1
  36. package/dist/{handler-1LRMYeI4.cjs → handler-XX7cLTqe.cjs} +1 -1
  37. package/dist/headers-Ddwek8K7.mjs +6 -0
  38. package/dist/{headers-YpD10rDb.cjs → headers-dg4SDrjY.cjs} +1 -1
  39. package/dist/{image-5WsgWYTh.js → image-Bz87fCla.js} +1 -1
  40. package/dist/{image-Hb105Gu6.cjs → image-C4TlpMHn.cjs} +18 -18
  41. package/dist/link-2PzgTnaP.js +673 -0
  42. package/dist/{icons-dev-YtDoLUsb.cjs → link-D1Gjkb-2.cjs} +0 -350
  43. package/dist/{mdx-Bv-pS6-O.js → mdx-BuO6a1f7.js} +195 -40
  44. package/dist/{mdx-CDUcJmye.cjs → mdx-CD-tSjRG.cjs} +234 -73
  45. package/dist/{meta-loader-CTB62-Mo.cjs → meta-loader-Dq1zcFnh.cjs} +1 -1
  46. package/dist/node/cache.cjs +1 -1
  47. package/dist/node/cache.d.cts +2 -1
  48. package/dist/node/cache.d.mts +2 -1
  49. package/dist/node/cache.mjs +1 -1
  50. package/dist/node/cli-entry.cjs +6 -6
  51. package/dist/node/cli-entry.mjs +9 -9
  52. package/dist/node/index.cjs +1 -1
  53. package/dist/node/index.d.cts +20 -174
  54. package/dist/node/index.d.mts +18 -175
  55. package/dist/node/index.mjs +1 -1
  56. package/dist/node/mdx/shiki-adapter.cjs +1 -1
  57. package/dist/node/mdx/shiki-adapter.d.cts +49 -1
  58. package/dist/node/mdx/shiki-adapter.d.mts +49 -1
  59. package/dist/node/mdx/shiki-adapter.mjs +1 -1
  60. package/dist/node-B5hu_6qj.cjs +104 -0
  61. package/dist/node-BXtqM1uH.mjs +6 -0
  62. package/dist/node-C8725aw7.mjs +104 -0
  63. package/dist/node-aD1eisrR.cjs +6 -0
  64. package/dist/{package-_-Oa8-qN.cjs → package-CH2ChQqw.cjs} +1 -1
  65. package/dist/{package-CoHWTf0N.mjs → package-DSSB8B5L.mjs} +1 -1
  66. package/dist/{pages-external-CX2uyW95.cjs → pages-external-XkYIs-d5.cjs} +1 -1
  67. package/dist/parser-DCiEWkSk.cjs +8 -0
  68. package/dist/parser-qk9FIHJ7.mjs +8 -0
  69. package/dist/plugin-CX1OZ6jB.cjs +73 -0
  70. package/dist/plugin-CgfiWaFZ.mjs +73 -0
  71. package/dist/routes-BW6zsk7Z.mjs +6 -0
  72. package/dist/routes-BgoIB5wb.cjs +6 -0
  73. package/dist/{routes-D_S9kjkS.cjs → routes-CORVxc02.cjs} +1 -1
  74. package/dist/{search-dialog-BpNULmrl.cjs → search-dialog-B1NERUNx.cjs} +101 -55
  75. package/dist/{search-dialog-BbtxA1uT.cjs → search-dialog-BRFno7HD.cjs} +8 -8
  76. package/dist/{search-dialog-DC7oXU-5.js → search-dialog-BmxHiKwt.js} +2 -2
  77. package/dist/{search-dialog-gp9lrJXm.js → search-dialog-D6TvjcuV.js} +1 -1
  78. package/dist/{search-dialog-PJrFRU5G.js → search-dialog-DFnlx8LO.js} +44 -4
  79. package/dist/{search-dialog-BIuxGQsg.cjs → search-dialog-DHqwjJuG.cjs} +1 -1
  80. package/dist/server/index.cjs +1 -1
  81. package/dist/server/index.d.mts +1 -1
  82. package/dist/server/index.mjs +1 -1
  83. package/dist/shiki-adapter-CoQ6jyJ4.cjs +6 -0
  84. package/dist/shiki-adapter-D-aKw7PP.mjs +6 -0
  85. package/dist/{sidebar-DknLUI1R.d.ts → sidebar-COTaMHR-.d.ts} +349 -41
  86. package/dist/{sidebar-DH2iPKXM.d.cts → sidebar-CrEdJuHX.d.cts} +349 -41
  87. package/dist/{types-generator-CYcHkDzZ.cjs → types-generator-BXhv7Ill.cjs} +1 -1
  88. package/dist/types-generator-bDPvUztF.mjs +26 -0
  89. package/dist/utils-Crm9oPcV.mjs +7 -0
  90. package/dist/utils-D6Xtj0FZ.cjs +7 -0
  91. package/package.json +13 -10
  92. package/src/shared/types.ts +361 -19
  93. package/dist/chunk-hT5z_Zn9-DsJawvsz.mjs +0 -6
  94. package/dist/chunk-hT5z_Zn9-SKz6VFXu.cjs +0 -6
  95. package/dist/config-DAgpZyh6.mjs +0 -7
  96. package/dist/config-DrRQYDCI.cjs +0 -7
  97. package/dist/csp-z2D0FuRW.mjs +0 -6
  98. package/dist/doctor-BadGEhXv.cjs +0 -7
  99. package/dist/doctor-vDsUDgqp.mjs +0 -7
  100. package/dist/escape-string-regexp-AG8q1e25-9Un9V90q.mjs +0 -6
  101. package/dist/escape-string-regexp-AG8q1e25-bJ9Ixe7c.cjs +0 -6
  102. package/dist/esm-shims-DSep1HcR.mjs +0 -6
  103. package/dist/headers-CL0pMcwm.mjs +0 -6
  104. package/dist/icons-dev-CHZOwhQA.js +0 -921
  105. package/dist/lib-BR0SoanK-CLswltLI.cjs +0 -6
  106. package/dist/lib-BR0SoanK-DcYeDrE6.mjs +0 -6
  107. package/dist/lib-DPoCz1YB-CLYXwKST.cjs +0 -6
  108. package/dist/lib-DPoCz1YB-CyGOqgSO.mjs +0 -6
  109. package/dist/micromark-util-character-5KqJafVT-C6gnc770.cjs +0 -6
  110. package/dist/micromark-util-character-5KqJafVT-DkPKsbgn.mjs +0 -6
  111. package/dist/node-BDBv8CT6.mjs +0 -104
  112. package/dist/node-DFV_FV0y.mjs +0 -6
  113. package/dist/node-DqsP7kXz.cjs +0 -6
  114. package/dist/node-yFmAavND.cjs +0 -104
  115. package/dist/parser-BZJgAa9E.mjs +0 -8
  116. package/dist/parser-DlanzESE.cjs +0 -8
  117. package/dist/plugin-BVuwx5D9.cjs +0 -73
  118. package/dist/plugin-BoxD91Yh.mjs +0 -73
  119. package/dist/rehype-slug--ZOxZ-_K-BNeYC4aT.cjs +0 -6
  120. package/dist/rehype-slug--ZOxZ-_K-CjIQEJCs.mjs +0 -6
  121. package/dist/remark-frontmatter-wFYRLcCt-CutW0gA3.mjs +0 -8
  122. package/dist/remark-frontmatter-wFYRLcCt-ENB5qG3y.cjs +0 -8
  123. package/dist/remark-gfm-B8TMkQbX-CjUJo8Rd.cjs +0 -21
  124. package/dist/remark-gfm-B8TMkQbX-Ctu0VV1_.mjs +0 -21
  125. package/dist/rolldown-runtime-fkIsjY3S.mjs +0 -6
  126. package/dist/rollup-DMqoG11U-CKcJ37u_.mjs +0 -59
  127. package/dist/rollup-DMqoG11U-DKdxvZIj.cjs +0 -59
  128. package/dist/routes-BN2XbGcT.mjs +0 -6
  129. package/dist/routes-Cnq8xTCv.cjs +0 -6
  130. package/dist/shiki-adapter-CGTmrR6S.cjs +0 -6
  131. package/dist/shiki-adapter-CK3llqw2.mjs +0 -6
  132. package/dist/types-generator-DVOnRVKU.mjs +0 -26
  133. package/dist/utils-B3xYMrpK.mjs +0 -7
  134. package/dist/utils-Bz1tG9Dg.cjs +0 -7
  135. /package/dist/{errors-C0Hx15Ag.mjs → errors-0zGHRLue.mjs} +0 -0
  136. /package/dist/{errors-Dx6JHoKE.cjs → errors-vKw8CkiX.cjs} +0 -0
  137. /package/dist/{index-DJYJzs-Z.d.mts → index-1KsTDq4o.d.mts} +0 -0
  138. /package/dist/{meta-loader-Bq-MjTXB.mjs → meta-loader-C4Hu9RN9.mjs} +0 -0
@@ -3,16 +3,16 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- const require_icons_dev = require('./icons-dev-YtDoLUsb.cjs');
6
+ const require_link = require('./link-D1Gjkb-2.cjs');
7
7
  let react = require("react");
8
8
  let react_router_dom = require("react-router-dom");
9
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
10
  let react_aria_components = require("react-aria-components");
11
- react_aria_components = require_icons_dev.__toESM(react_aria_components);
11
+ react_aria_components = require_link.__toESM(react_aria_components);
12
12
  let virtual_boltdocs_icons = require("virtual:boltdocs-icons");
13
- virtual_boltdocs_icons = require_icons_dev.__toESM(virtual_boltdocs_icons);
13
+ virtual_boltdocs_icons = require_link.__toESM(virtual_boltdocs_icons);
14
14
  let scroll_into_view_if_needed = require("scroll-into-view-if-needed");
15
- scroll_into_view_if_needed = require_icons_dev.__toESM(scroll_into_view_if_needed);
15
+ scroll_into_view_if_needed = require_link.__toESM(scroll_into_view_if_needed);
16
16
 
17
17
  //#region src/client/app/ui-context.tsx
18
18
  const UIContext = (0, react.createContext)(void 0);
@@ -47,30 +47,30 @@ function useUI() {
47
47
  //#region src/client/components/primitives/breadcrumbs.tsx
48
48
  function Breadcrumbs({ children, className, ...props }) {
49
49
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Breadcrumbs, {
50
- className: require_icons_dev.cn("flex flex-wrap items-center", className),
50
+ className: require_link.cn("flex flex-wrap items-center", className),
51
51
  ...props,
52
52
  children
53
53
  });
54
54
  }
55
55
  function BreadcrumbsItem({ children, className, ...props }) {
56
56
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Breadcrumb, {
57
- className: require_icons_dev.cn("flex items-center", className),
57
+ className: require_link.cn("flex items-center", className),
58
58
  ...props,
59
59
  children
60
60
  });
61
61
  }
62
62
  function BreadcrumbsLink({ children, href, className, ...props }) {
63
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Link, {
63
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_link.Link, {
64
64
  href,
65
- className: require_icons_dev.cn("cursor-pointer", className),
65
+ className: require_link.cn("cursor-pointer", className),
66
66
  ...props,
67
67
  children
68
68
  });
69
69
  }
70
70
  function BreadcrumbsSeparator({ className }) {
71
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.ChevronRight, {
71
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_link.ChevronRight, {
72
72
  size: 14,
73
- className: require_icons_dev.cn("shrink-0", className)
73
+ className: require_link.cn("shrink-0", className)
74
74
  });
75
75
  }
76
76
  Breadcrumbs.Root = Breadcrumbs;
@@ -82,7 +82,7 @@ Breadcrumbs.Separator = BreadcrumbsSeparator;
82
82
  //#region src/client/components/primitives/button-group.tsx
83
83
  function ButtonGroup({ children, className, vertical = false }) {
84
84
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
85
- className: require_icons_dev.cn("inline-flex", vertical ? "flex-col" : "flex-row", !vertical && [
85
+ className: require_link.cn("inline-flex", vertical ? "flex-col" : "flex-row", !vertical && [
86
86
  "[&>*:not(:first-child)]:-ml-px",
87
87
  "[&>*:first-child]:rounded-r-none",
88
88
  "[&>*:last-child]:rounded-l-none",
@@ -109,7 +109,7 @@ function ButtonGroup({ children, className, vertical = false }) {
109
109
  function Popover({ children, className, ...props }) {
110
110
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Popover, {
111
111
  offset: 8,
112
- className: require_icons_dev.cn("z-50 overflow-auto outline-none transition-none", className),
112
+ className: require_link.cn("z-50 overflow-auto outline-none transition-none", className),
113
113
  ...props,
114
114
  children
115
115
  });
@@ -146,7 +146,7 @@ function SubmenuTrigger({ className, ...props }) {
146
146
  function Menu(props) {
147
147
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Menu, {
148
148
  ...props,
149
- className: react_aria_components.composeRenderProps(props.className, (className) => require_icons_dev.cn("outline-none overflow-auto", className))
149
+ className: react_aria_components.composeRenderProps(props.className, (className) => require_link.cn("outline-none overflow-auto", className))
150
150
  });
151
151
  }
152
152
  /**
@@ -157,24 +157,24 @@ function MenuItem(props) {
157
157
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.MenuItem, {
158
158
  ...props,
159
159
  textValue,
160
- className: react_aria_components.composeRenderProps(props.className, (className) => require_icons_dev.cn("group relative flex flex-row items-center cursor-default outline-none", className)),
160
+ className: react_aria_components.composeRenderProps(props.className, (className) => require_link.cn("group relative flex flex-row items-center cursor-default outline-none", className)),
161
161
  children: react_aria_components.composeRenderProps(props.children, (children, { selectionMode, isSelected, hasSubmenu }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
162
162
  selectionMode === "multiple" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
163
163
  className: "flex items-center shrink-0 justify-center",
164
- children: isSelected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Check, { className: "size-3.5" })
164
+ children: isSelected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_link.Check, { className: "size-3.5" })
165
165
  }),
166
166
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
167
167
  className: "flex flex-row w-full items-center",
168
168
  children
169
169
  }),
170
- hasSubmenu && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.ChevronRight, { className: "size-4 ml-auto" })
170
+ hasSubmenu && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_link.ChevronRight, { className: "size-4 ml-auto" })
171
171
  ] }))
172
172
  });
173
173
  }
174
174
  function MenuSection({ title, ...props }) {
175
175
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.MenuSection, {
176
176
  ...props,
177
- className: require_icons_dev.cn("flex flex-col", props.className),
177
+ className: require_link.cn("flex flex-col", props.className),
178
178
  children: [title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Header, {
179
179
  className: "select-none",
180
180
  children: title
@@ -190,7 +190,7 @@ function MenuSection({ title, ...props }) {
190
190
  function MenuSeparator(props) {
191
191
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Separator, {
192
192
  ...props,
193
- className: require_icons_dev.cn("border-t", props.className)
193
+ className: require_link.cn("border-t", props.className)
194
194
  });
195
195
  }
196
196
  Menu.Root = Menu;
@@ -204,7 +204,7 @@ Menu.Separator = MenuSeparator;
204
204
  //#region src/client/components/primitives/tabs.tsx
205
205
  function Tabs({ children, className = "", ...props }) {
206
206
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
207
- className: require_icons_dev.cn("w-full", className),
207
+ className: require_link.cn("w-full", className),
208
208
  ...props,
209
209
  children
210
210
  });
@@ -212,7 +212,7 @@ function Tabs({ children, className = "", ...props }) {
212
212
  function TabsList({ children, className = "" }) {
213
213
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
214
214
  role: "tablist",
215
- className: require_icons_dev.cn("relative flex flex-row items-center overflow-x-auto", className),
215
+ className: require_link.cn("relative flex flex-row items-center overflow-x-auto", className),
216
216
  children
217
217
  });
218
218
  }
@@ -221,20 +221,20 @@ function TabsItem({ children, id, selected, className = "", ...props }) {
221
221
  role: "tab",
222
222
  "aria-selected": selected,
223
223
  "data-selected": selected,
224
- className: require_icons_dev.cn("outline-none cursor-pointer bg-transparent border-none", className),
224
+ className: require_link.cn("outline-none cursor-pointer bg-transparent border-none", className),
225
225
  ...props,
226
226
  children
227
227
  });
228
228
  }
229
229
  function TabsContent({ children, className = "" }) {
230
230
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
231
- className: require_icons_dev.cn("outline-none", className),
231
+ className: require_link.cn("outline-none", className),
232
232
  children
233
233
  });
234
234
  }
235
235
  function TabsIndicator({ className = "", style }) {
236
236
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
237
- className: require_icons_dev.cn("absolute bottom-0", className),
237
+ className: require_link.cn("absolute bottom-0", className),
238
238
  style
239
239
  });
240
240
  }
@@ -303,11 +303,11 @@ const finalizeTree = (nodes) => {
303
303
  });
304
304
  };
305
305
  function useSidebar(routes) {
306
- const config = require_icons_dev.useConfig();
306
+ const config = require_link.useConfig();
307
307
  const { pathname } = (0, react_router_dom.useLocation)();
308
308
  return (0, react.useMemo)(() => {
309
- const currentPath = require_icons_dev.normalizePath(pathname);
310
- const activeRoute = routes.find((r) => require_icons_dev.normalizePath(r.path) === currentPath);
309
+ const currentPath = require_link.normalizePath(pathname);
310
+ const activeRoute = routes.find((r) => require_link.normalizePath(r.path) === currentPath);
311
311
  const activeTabId = activeRoute?.tab?.toLowerCase();
312
312
  const filteredRoutes = routes.filter((r) => !r.collection && !r.sidebarHidden && !r.fallback).filter((r) => !activeTabId || r.tab?.toLowerCase() === activeTabId).sort((a, b) => getRoutePosition(a) - getRoutePosition(b));
313
313
  const directoryMeta = getCleanDirectoryMeta(config.directoryMeta);
@@ -638,13 +638,13 @@ function AnchorProvider({ toc, single = false, observerOptions, children }) {
638
638
  }
639
639
  function OnThisPage({ children, className }) {
640
640
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
641
- className: require_icons_dev.cn("sticky top-navbar hidden xl:flex flex-col shrink-0", "w-toc", "py-4 pl-6 pr-4", className),
641
+ className: require_link.cn("sticky top-navbar hidden xl:flex flex-col shrink-0", "w-toc", "py-4 pl-6 pr-4", className),
642
642
  children
643
643
  });
644
644
  }
645
645
  function OnThisPageHeader({ children, className, ...props }) {
646
646
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
647
- className: require_icons_dev.cn("mb-4 text-xs font-bold text-body", className),
647
+ className: require_link.cn("mb-4 text-xs font-bold text-body", className),
648
648
  ...props,
649
649
  children
650
650
  });
@@ -654,7 +654,7 @@ function OnThisPageContent({ children, className, ref, ...props }) {
654
654
  (0, react.useImperativeHandle)(ref, () => internalRef.current);
655
655
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
656
656
  ref: internalRef,
657
- className: require_icons_dev.cn("relative overflow-y-auto boltdocs-otp-content pb-12", "max-h-[70%]", className),
657
+ className: require_link.cn("relative overflow-y-auto boltdocs-otp-content pb-12", "max-h-[70%]", className),
658
658
  style: {
659
659
  maskImage: "linear-gradient(to bottom, black 90%, transparent 100%)",
660
660
  WebkitMaskImage: "linear-gradient(to bottom, black 90%, transparent 100%)"
@@ -666,13 +666,13 @@ function OnThisPageContent({ children, className, ref, ...props }) {
666
666
  OnThisPageContent.displayName = "OnThisPageContent";
667
667
  function OnThisPageList({ children, className }) {
668
668
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
669
- className: require_icons_dev.cn("relative space-y-0.5 text-sm border-l border-subtle", className),
669
+ className: require_link.cn("relative space-y-0.5 text-sm border-l border-subtle", className),
670
670
  children
671
671
  });
672
672
  }
673
673
  function OnThisPageItem({ level, children, className }) {
674
674
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
675
- className: require_icons_dev.cn(level === 3 && "pl-3", className),
675
+ className: require_link.cn(level === 3 && "pl-3", className),
676
676
  children
677
677
  });
678
678
  }
@@ -708,7 +708,7 @@ function OnThisPageLink({ children, href, active, onClick, className }) {
708
708
  href,
709
709
  onClick: handleClick,
710
710
  "data-active": computedActive,
711
- className: require_icons_dev.cn("block py-0.5 pl-4 text-[13px] outline-none transition-colors", computedActive ? "text-primary-500" : "text-muted hover:text-body", className),
711
+ className: require_link.cn("block py-0.5 pl-4 text-[13px] outline-none transition-colors", computedActive ? "text-primary-500" : "text-muted hover:text-body", className),
712
712
  children
713
713
  });
714
714
  }
@@ -743,7 +743,7 @@ function OnThisPageIndicator({ style, className }) {
743
743
  }, [useItems(), style]);
744
744
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
745
745
  ref: containerRef,
746
- className: require_icons_dev.cn("absolute -left-px w-0.5 rounded-full bg-primary-500", className),
746
+ className: require_link.cn("absolute -left-px w-0.5 rounded-full bg-primary-500", className),
747
747
  style: {
748
748
  transition: "transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), height 180ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 150ms",
749
749
  ...internalStyle
@@ -808,34 +808,34 @@ OnThisPage.Tree = OnThisPageTree;
808
808
  //#region src/client/components/primitives/page-nav.tsx
809
809
  function PageNav({ children, className }) {
810
810
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
811
- className: require_icons_dev.cn("grid sm:grid-cols-2 gap-4", className),
811
+ className: require_link.cn("grid sm:grid-cols-2 gap-4", className),
812
812
  children
813
813
  });
814
814
  }
815
815
  function PageNavLink({ children, to, direction, className }) {
816
816
  const isNext = direction === "next";
817
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_icons_dev.Link, {
817
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_link.Link, {
818
818
  href: to,
819
- className: require_icons_dev.cn("flex items-center outline-none no-underline", isNext ? "justify-end" : "justify-start", className),
819
+ className: require_link.cn("flex items-center outline-none no-underline", isNext ? "justify-end" : "justify-start", className),
820
820
  children: [
821
- !isNext && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.ChevronLeft, { className: "shrink-0" }),
821
+ !isNext && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_link.ChevronLeft, { className: "shrink-0" }),
822
822
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
823
823
  className: "flex flex-col flex-1",
824
824
  children
825
825
  }),
826
- isNext && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.ChevronRight, { className: "shrink-0" })
826
+ isNext && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_link.ChevronRight, { className: "shrink-0" })
827
827
  ]
828
828
  });
829
829
  }
830
830
  function PageNavTitle({ children, className }) {
831
831
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
832
- className: require_icons_dev.cn(className),
832
+ className: require_link.cn(className),
833
833
  children
834
834
  });
835
835
  }
836
836
  function PageNavDescription({ children, className }) {
837
837
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
838
- className: require_icons_dev.cn("truncate", className),
838
+ className: require_link.cn("truncate", className),
839
839
  children
840
840
  });
841
841
  }
@@ -854,7 +854,7 @@ let sidebarScrollPos = 0;
854
854
  function getIcon(iconName) {
855
855
  if (!iconName) return void 0;
856
856
  const icons = {
857
- ...require_icons_dev.icons_exports,
857
+ ...require_link.icons_exports,
858
858
  ...virtual_boltdocs_icons.default
859
859
  };
860
860
  return icons[iconName] || icons[iconName + "Icon"] || void 0;
@@ -871,7 +871,7 @@ function Badge({ badge }) {
871
871
  const text = typeof badge === "string" ? badge : badge?.text;
872
872
  if (!text) return null;
873
873
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
874
- className: require_icons_dev.cn("ml-auto flex h-5 items-center rounded-md text-[10px] font-bold px-1.5 py-0.5 uppercase tracking-wider", colors[text] || colors.new),
874
+ className: require_link.cn("ml-auto flex h-5 items-center rounded-md text-[10px] font-bold px-1.5 py-0.5 uppercase tracking-wider", colors[text] || colors.new),
875
875
  children: text
876
876
  });
877
877
  }
@@ -880,7 +880,7 @@ function Badge({ badge }) {
880
880
  */
881
881
  function SidebarRoot({ children, className }) {
882
882
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("aside", {
883
- className: require_icons_dev.cn("hidden lg:flex flex-col w-sidebar sticky top-navbar h-[calc(100vh-var(--spacing-navbar))] border-r border-subtle bg-main", className),
883
+ className: require_link.cn("hidden lg:flex flex-col w-sidebar sticky top-navbar h-[calc(100vh-var(--spacing-navbar))] border-r border-subtle bg-main", className),
884
884
  children
885
885
  });
886
886
  }
@@ -893,9 +893,9 @@ function SidebarMobile({ children, className }) {
893
893
  isOpen: isSidebarOpen,
894
894
  onOpenChange: (open) => !open && closeSidebar(),
895
895
  isDismissable: true,
896
- className: require_icons_dev.cn("fixed inset-0 z-50 bg-black/20 backdrop-blur-sm lg:hidden", "entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out duration-300"),
896
+ className: require_link.cn("fixed inset-0 z-50 bg-black/20 backdrop-blur-sm lg:hidden", "entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out duration-300"),
897
897
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Modal, {
898
- className: require_icons_dev.cn("fixed top-0 left-0 bottom-0 w-80 bg-main border-r border-subtle shadow-2xl outline-none", "entering:animate-in entering:slide-in-from-left exiting:animate-out exiting:slide-out-to-left duration-300", className),
898
+ className: require_link.cn("fixed top-0 left-0 bottom-0 w-80 bg-main border-r border-subtle shadow-2xl outline-none", "entering:animate-in entering:slide-in-from-left exiting:animate-out exiting:slide-out-to-left duration-300", className),
899
899
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Dialog, {
900
900
  className: "h-full focus:outline-none outline-none flex flex-col",
901
901
  children
@@ -908,7 +908,7 @@ function SidebarMobile({ children, className }) {
908
908
  */
909
909
  function SidebarHeader({ children, className }) {
910
910
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
911
- className: require_icons_dev.cn("flex items-center justify-between p-4 border-b border-subtle", className),
911
+ className: require_link.cn("flex items-center justify-between p-4 border-b border-subtle", className),
912
912
  children
913
913
  });
914
914
  }
@@ -931,7 +931,7 @@ function SidebarContent({ children, className }) {
931
931
  }, []);
932
932
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
933
933
  ref: scrollRef,
934
- className: require_icons_dev.cn("flex-1 overflow-y-auto p-4 pb-16 custom-scrollbar", className),
934
+ className: require_link.cn("flex-1 overflow-y-auto p-4 pb-16 custom-scrollbar", className),
935
935
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
936
936
  className: "flex flex-col gap-6",
937
937
  children
@@ -956,9 +956,9 @@ function SidebarGroup({ title, icon: Icon, children, className, collapsible = fa
956
956
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
957
957
  className: "flex items-center gap-2",
958
958
  children: [Icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { size: 12 }), title]
959
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.ChevronRight, {
959
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_link.ChevronRight, {
960
960
  size: 12,
961
- className: require_icons_dev.cn("transition-transform duration-200 text-muted/40 group-hover:text-body", isOpen && "rotate-90")
961
+ className: require_link.cn("transition-transform duration-200 text-muted/40 group-hover:text-body", isOpen && "rotate-90")
962
962
  })]
963
963
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("h4", {
964
964
  className: "px-2 mb-2 flex items-center gap-2 text-[11px] font-bold uppercase tracking-widest text-muted/50",
@@ -970,13 +970,13 @@ function SidebarGroup({ title, icon: Icon, children, className, collapsible = fa
970
970
  });
971
971
  }
972
972
  function SidebarLink({ label, href, active, icon: Icon, badge, className }) {
973
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_icons_dev.Link, {
973
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_link.Link, {
974
974
  href,
975
- className: require_icons_dev.cn("group flex items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-sm transition-all outline-none", active ? "bg-primary-500/10 text-primary-500 font-medium shadow-sm" : "text-muted hover:bg-surface hover:text-body", className),
975
+ className: require_link.cn("group flex items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-sm transition-all outline-none", active ? "bg-primary-500/10 text-primary-500 font-medium shadow-sm" : "text-muted hover:bg-surface hover:text-body", className),
976
976
  children: [
977
977
  Icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
978
978
  size: 16,
979
- className: require_icons_dev.cn(active ? "text-primary-500" : "text-muted group-hover:text-body")
979
+ className: require_link.cn(active ? "text-primary-500" : "text-muted group-hover:text-body")
980
980
  }),
981
981
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
982
982
  className: "truncate",
@@ -1000,7 +1000,7 @@ function SidebarSubGroup({ label, href, active, icon: Icon, badge, isOpen, onTog
1000
1000
  active,
1001
1001
  icon: Icon,
1002
1002
  badge,
1003
- className: require_icons_dev.cn("flex-1 pr-8", className)
1003
+ className: require_link.cn("flex-1 pr-8", className)
1004
1004
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1005
1005
  onClick: (e) => {
1006
1006
  e.preventDefault();
@@ -1008,9 +1008,9 @@ function SidebarSubGroup({ label, href, active, icon: Icon, badge, isOpen, onTog
1008
1008
  onToggle();
1009
1009
  },
1010
1010
  className: "absolute right-1 p-1.5 text-muted hover:text-body transition-colors outline-none cursor-pointer",
1011
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.ChevronRight, {
1011
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_link.ChevronRight, {
1012
1012
  size: 14,
1013
- className: require_icons_dev.cn("transition-transform duration-200", isOpen && "rotate-90")
1013
+ className: require_link.cn("transition-transform duration-200", isOpen && "rotate-90")
1014
1014
  })
1015
1015
  })]
1016
1016
  }), isOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -1020,7 +1020,7 @@ function SidebarSubGroup({ label, href, active, icon: Icon, badge, isOpen, onTog
1020
1020
  });
1021
1021
  }
1022
1022
  function SidebarItem({ route, activePath, activeRoute, className }) {
1023
- const localizedHref = require_icons_dev.useLocalizedTo(route.path);
1023
+ const localizedHref = require_link.useLocalizedTo(route.path);
1024
1024
  const isCurrent = activePath === (localizedHref.endsWith("/") ? localizedHref.slice(0, -1) : localizedHref) || !!activeRoute?.filePath && !!route.filePath && activeRoute.filePath === route.filePath;
1025
1025
  const hasChildren = !!route.routes?.length || !!route.subRoutes?.length;
1026
1026
  const children = route.routes || route.subRoutes;
@@ -1111,7 +1111,7 @@ function SidebarItems({ routes, className }) {
1111
1111
  }
1112
1112
  pushUngrouped();
1113
1113
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1114
- className: require_icons_dev.cn("flex flex-col gap-6", className),
1114
+ className: require_link.cn("flex flex-col gap-6", className),
1115
1115
  children: renderedElements
1116
1116
  });
1117
1117
  }
@@ -1144,69 +1144,50 @@ function SearchHighlight() {
1144
1144
  //#endregion
1145
1145
  //#region src/client/components/primitives/docs-layout.tsx
1146
1146
  /**
1147
- * Root layout shell. Renders a full-height flex column.
1148
- *
1149
- * Usage:
1150
- * ```tsx
1151
- * <DocsLayout>
1152
- * <Navbar />
1153
- * <DocsLayout.Body>...</DocsLayout.Body>
1154
- * </DocsLayout>
1155
- * ```
1147
+ * Root layout shell. Mount children like:
1148
+ * <DocsLayout><Navbar /><DocsLayout.Body>...</DocsLayout.Body></DocsLayout>
1156
1149
  */
1157
1150
  function DocsLayoutRoot({ children, className, style }) {
1158
1151
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1159
- className: require_icons_dev.cn("h-screen flex flex-col overflow-hidden bg-main text-body", className),
1152
+ className: require_link.cn("h-screen flex flex-col overflow-hidden bg-main text-body", className),
1160
1153
  style,
1161
1154
  children
1162
1155
  });
1163
1156
  }
1164
- /**
1165
- * Horizontal flex container for sidebar + content + toc.
1166
- */
1167
1157
  function Body({ children, className, style }) {
1168
1158
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1169
- className: require_icons_dev.cn("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-main overflow-hidden", className),
1159
+ className: require_link.cn("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-main overflow-hidden", className),
1170
1160
  style,
1171
1161
  children
1172
1162
  });
1173
1163
  }
1174
- /**
1175
- * Main scrollable content area.
1176
- */
1177
1164
  function Content({ children, className, style }) {
1178
1165
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("main", {
1179
- className: require_icons_dev.cn("boltdocs-content flex-1 min-w-0 overflow-y-auto", "contain-layout", className),
1166
+ className: require_link.cn("boltdocs-content flex-1 min-w-0 overflow-y-auto", className),
1180
1167
  style,
1181
1168
  children
1182
1169
  });
1183
1170
  }
1184
- /**
1185
- * MDX Content wrapper with standard page padding and max-width logic.
1186
- */
1187
1171
  function ContentMdx({ children, className, style }) {
1188
1172
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1189
- className: require_icons_dev.cn("boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8", className),
1173
+ className: require_link.cn("boltdocs-page w-full pt-4 pb-20 px-4 sm:px-8", className),
1190
1174
  style,
1191
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchHighlight, {}), children]
1175
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchHighlight, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1176
+ className: "mx-auto w-full max-w-3xl sm:max-w-4xl lg:max-w-5xl",
1177
+ children
1178
+ })]
1192
1179
  });
1193
1180
  }
1194
- /**
1195
- * Content header area (breadcrumbs, title, description, etc).
1196
- */
1197
1181
  function Header({ children, className, style }) {
1198
1182
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
1199
- className: require_icons_dev.cn("mb-10", className),
1183
+ className: require_link.cn("mb-10", className),
1200
1184
  style,
1201
1185
  children
1202
1186
  });
1203
1187
  }
1204
- /**
1205
- * Footer area inside the content section (page nav).
1206
- */
1207
1188
  function Footer({ children, className, style }) {
1208
1189
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1209
- className: require_icons_dev.cn("mt-20", className),
1190
+ className: require_link.cn("mt-20", className),
1210
1191
  style,
1211
1192
  children
1212
1193
  });
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- const e=require(`./doctor-BadGEhXv.cjs`);exports.doctorAction=e.t;
6
+ const e=require(`./doctor-Bv16QSrI.cjs`);exports.doctorAction=e.t;
@@ -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(`./chunk-D1Md3oWO.cjs`),t=require(`./utils-D6Xtj0FZ.cjs`),n=require(`./pages-external-XkYIs-d5.cjs`),r=require(`./config-DlGoEM9D.cjs`),i=require(`./node/cli-entry.cjs`);let a=require(`node:path`);a=e.r(a);let o=require(`node:fs`);o=e.r(o);let s=require(`@bdocs/dui`),c=require(`fdir`),l=require(`picomatch`);l=e.r(l);let u=require(`fastest-levenshtein`);const d={$schema:`https://boltdocs.vercel.app/schemas/doctor-config.schema.json`,checks:{metadata:{enabled:!0,titleMin:10,titleMax:60,descriptionMin:50,required:[`title`,`description`],optional:[],validateDates:!1},links:{internal:!0,external:!1,timeout:1e4,concurrency:10,ignore:[]},i18n:{enabled:!0},performance:{enabled:!0,budgets:{maxJSBundleSize:`200kb`,maxCSSBundleSize:`30kb`,maxPageHTMLSize:`80kb`,maxImagesKB:500,maxBuildTime:3e4,maxFontCount:3}}},fix:{confirmChanges:!1,backupFiles:!1,backupPath:`.boltdocs/backups`},reporting:{format:`pretty`,outputFile:`.boltdocs/reports/doctor.json`,failOnError:!1,maxWarnings:-1},severity:{missingTranslation:`warning`,brokenLink:`high`,brokenAnchor:`warning`,largeFile:`warning`,orphanedPage:`low`,duplicateTitle:`low`,shortMetadata:`low`,missingMetadata:`warning`,malformedFrontmatter:`high`,invalidFrontmatter:`high`,budgetExceeded:`warning`},exclude:[]};function f(e,t){if(e==null)return t;if(typeof e==`number`)return e;let n=e.toLowerCase().match(/^(\d+(?:\.\d+)?)\s*(b|kb|mb|gb)?$/);if(!n)return t;let r=Number.parseFloat(n[1]),i=n[2]||`b`;return Math.round(r*({b:1,kb:1024,mb:1024*1024,gb:1024*1024*1024}[i]||1))}function p(e,t,n){return e.doctorConfig.severity[t]||n}async function m(e,t){o.default.existsSync(t)||o.default.mkdirSync(t,{recursive:!0});let n=a.default.basename(e),r=new Date().toISOString().replace(/[:.]/g,`-`),i=a.default.join(t,`${n}.${r}.bak`);o.default.copyFileSync(e,i)}const h=new Map;function g(e){let n=h.get(e);if(n)return n;let r=(async()=>{let n=await t.d(e,!1);return{raw:n.raw,data:n.data,content:n.content}})();return h.set(e,r),r}const _=new Map;function v(e){if(_.has(e))return _.get(e);let t=!1;try{t=o.default.existsSync(e)&&o.default.statSync(e).isFile()}catch{t=!1}return _.set(e,t),t}async function y(e){let t=a.default.resolve(e,`doctor.json`);if(o.default.existsSync(t))try{let e=JSON.parse(o.default.readFileSync(t,`utf-8`));return{...d,...e,checks:{...d.checks,...e.checks,metadata:{...d.checks.metadata,...e.checks?.metadata},links:{...d.checks.links,...e.checks?.links},i18n:{...d.checks.i18n,...e.checks?.i18n},performance:{...d.checks.performance,...e.checks?.performance,budgets:{...d.checks.performance?.budgets,...e.checks?.performance?.budgets}}},fix:{...d.fix,...e.fix},reporting:{...d.reporting,...e.reporting},severity:{...d.severity,...e.severity},exclude:[...d.exclude,...e.exclude||[]]}}catch(e){(0,s.warn)(`Failed to parse doctor.json: ${e}`)}return d}async function b(e,r=process.cwd(),i,s){let l=a.default.resolve(r,`.boltdocs`,`generated`);o.default.existsSync(l)||o.default.mkdirSync(l,{recursive:!0});let u=s;u||=await new c.fdir().withFullPaths().filter(e=>e.endsWith(`.md`)||e.endsWith(`.mdx`)).crawl(e).withPromise();let d=i?.base||`/docs`,f=[];for(let n=0;n<u.length;n+=100){let r=u.slice(n,n+100),i=await Promise.all(r.map(async n=>{let r=a.default.isAbsolute(n)?n:a.default.resolve(e,n),i=a.default.relative(e,r),{data:o}=await g(r),s;return s=o.permalink?String(o.permalink).startsWith(`/`)?String(o.permalink):`/${o.permalink}`:t.a(i),d===`/`?s:(d.endsWith(`/`)?d:d+`/`)+(s.startsWith(`/`)?s.substring(1):s)}));f.push(...i)}f.includes(d)||f.push(d);let p=n.t(e,i);for(let e of p)f.includes(e)||f.push(e);let m={routes:Array.from(new Set(f)).sort(),timestamp:Date.now()};return o.default.writeFileSync(a.default.resolve(l,`link-tree.json`),JSON.stringify(m,null,2)),m}function x(e,t){if(e===t)return 1;if(!e||!t)return 0;let n=e.split(`/`).filter(Boolean),r=t.split(`/`).filter(Boolean),i=n[n.length-1]||``,a=r[r.length-1]||``;if(i===a){let e=0;for(let t of n)r.includes(t)&&e++;return e>=2?.99:.9}if(i.length>3&&a.length>3&&(a.startsWith(i)||i.startsWith(a))&&Math.min(i.length,a.length)/Math.max(i.length,a.length)>.5)return .88;let o=1-(0,u.distance)(i,a)/Math.max(i.length,a.length);return o>.8?o*.95:1-(0,u.distance)(e,t)/Math.max(e.length,t.length)}const S=new Map;function C(e,t){if(S.has(e))return S.get(e);let n=e.length,r=``,i=0;for(let a of t){if(a===e)continue;let t=a.length,o=Math.max(n,t);if(o===0)continue;let s=1-Math.abs(n-t)/o;if(s<=.8&&s<=i)continue;let c=x(e,a);c>i&&(i=c,r=a)}let a={bestMatch:r,similarity:i};return S.set(e,a),a}async function w(e){let n=[];if(!e.doctorConfig.checks.metadata.enabled)return n;let{titleMin:r,titleMax:i,descriptionMin:o}=e.doctorConfig.checks.metadata,s=new Map;for(let c of e.files){let l=t.u(a.default.relative(e.docsDir,c));try{let{raw:a,data:u}=await g(c);if(a.trim().startsWith(`---`)&&a.split(`---`).length>=3&&Object.keys(u).length===0){let t=p(e,`malformedFrontmatter`,`high`);t!==`off`&&n.push({file:l,level:t,message:`Malformed frontmatter (YAML parsing failed).`,suggestion:`Check your YAML syntax for indentation or unquoted special characters.`})}let d=t._.safeParse(u);if(!d.success){let t=p(e,`invalidFrontmatter`,`high`);if(t!==`off`)for(let e of d.error.issues)n.push({file:l,level:t,message:`Invalid frontmatter field "${e.path.join(`.`)}": ${e.message}`,suggestion:`Ensure the field follows the correct type.`})}let f=Array.from(new Set([`title`,...e.doctorConfig.checks.metadata.required]));for(let t of f)if(u[t]===void 0){let r=p(e,`missingMetadata`,`warning`);r!==`off`&&n.push({file:l,level:r,message:`Missing required frontmatter field: "${t}".`,suggestion:`Add the "${t}" field to your frontmatter.`})}if(e.doctorConfig.checks.metadata.validateDates){let t=[`date`,`lastUpdated`,...e.doctorConfig.checks.metadata.optional.filter(e=>e.toLowerCase().includes(`date`))];for(let r of t)if(u[r]&&Number.isNaN(Date.parse(String(u[r])))){let t=p(e,`invalidFrontmatter`,`high`);t!==`off`&&n.push({file:l,level:t,message:`Invalid date format in field "${r}": "${u[r]}".`,suggestion:`Use a valid ISO date format (e.g., YYYY-MM-DD).`})}}if(u.title){let t=String(u.title);if(t.length<r){let i=p(e,`shortMetadata`,`low`);i!==`off`&&n.push({file:l,level:i,message:`Title is too short (${t.length} chars).`,suggestion:`Titles should be at least ${r} characters for better SEO.`})}else if(t.length>i){let r=p(e,`shortMetadata`,`low`);r!==`off`&&n.push({file:l,level:r,message:`Title is too long (${t.length} chars).`,suggestion:`Titles should be under ${i} characters.`})}let a=s.get(t)||[];a.push(l),s.set(t,a)}if(u.description&&String(u.description).length<o){let t=p(e,`shortMetadata`,`low`);t!==`off`&&n.push({file:l,level:t,message:`Description is very short.`,suggestion:`Descriptions should ideally be at least ${o} characters.`})}}catch(t){if(t instanceof Error){let r=p(e,`malformedFrontmatter`,`high`);r!==`off`&&n.push({file:l,level:r,message:`Malformed frontmatter (YAML error): ${t.message}`,suggestion:`Check your YAML syntax for indentation or unquoted special characters.`})}}}for(let[t,r]of s.entries())if(r.length>1){let i=p(e,`duplicateTitle`,`low`);if(i!==`off`)for(let e of r)n.push({file:e,level:i,message:`Duplicate title found: "${t}"`,suggestion:`Ensure each page has a unique title. Also used in: ${r.filter(t=>t!==e).join(`, `)}`})}return n}async function T(e){let n=[],{internal:r,external:i,ignore:c,timeout:l,concurrency:u}=e.doctorConfig.checks.links;if(!r&&!i&&!e.options.checkExternal)return n;let d=/(?:\[.*?\]\((.*?)\))|(?:href=["']([^"']+)["'])/g,f=new Set,m=5e5;for(let s of e.files){let l=t.u(a.default.relative(e.docsDir,s)),{content:u}=await g(s),_=[...(u.length>m?u.slice(0,m):u).replace(/```[\s\S]*?```/g,``).replace(/`[^`\n]*`/g,``).matchAll(d)];for(let t of _){let u=t[1]||t[2],d=!!t[1];if(!u||c.some(e=>u.includes(e)))continue;if(/^https?:\/\//i.test(u)){(i||e.options.checkExternal)&&f.add({url:u,file:s});continue}if(!r||/^(mailto|tel|#)/i.test(u))continue;let m;try{m=decodeURIComponent(u.split(`#`)[0].split(`?`)[0])}catch{m=u.split(`#`)[0].split(`?`)[0]}if(!m)continue;let g=!1,_=``;if(m.startsWith(`/`))if(e.routeIndex.has(m)||e.routeIndexWithSlash.has(m)||e.routeIndexWithoutSlash.has(m))g=!0;else{let t=e.basePrefix+(m.startsWith(`/`)?m:`/`+m);if(e.routeIndex.has(t)||e.routeIndexWithSlash.has(t))g=!1,_=t;else{let t=e.config.base!==`/`&&m.startsWith(e.config.base||`/`)?m.substring((e.config.base||`/`).length):m,n=t.startsWith(`/`)?t.substring(1):t;_=a.default.join(e.docsDir,n),g=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`].some(e=>v(_+e))}}else _=a.default.resolve(a.default.dirname(s),m),g=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`].some(e=>v(_+e));if(!g){let{bestMatch:t,similarity:r}=C(m,e.linkTree.routes),i=!1,a=e.basePrefix+(m.startsWith(`/`)?m:`/`+m);(e.routeIndex.has(a)||e.routeIndexWithSlash.has(a))&&(t=a,r=1,i=!0);let c=r>.6||i,f=r>.75&&t!==m||i,g=p(e,`brokenLink`,`high`);g!==`off`&&n.push({file:l,level:g,message:`Broken internal link: "${u}"`,suggestion:c?`Did you mean "${t}"?`:`Ensure the target exists or check for typos.`,fix:f?async()=>{let e=u.includes(`#`)?`#`+u.split(`#`)[1]:``,n=d?`(${u})`:`href="${u}"`,r=d?`(${t}${e})`:`href="${t}${e}"`,i=o.default.readFileSync(s,`utf-8`).replace(n,r);o.default.writeFileSync(s,i),h.delete(s)}:void 0})}}}if(f.size>0){(0,s.info)(s.colors.gray(`Verifying ${f.size} external links...`));let r=new Map;for(let e of f)r.has(e.url)||r.set(e.url,[]),r.get(e.url).push(e.file);let i=async e=>{try{let t=new AbortController,n=setTimeout(()=>t.abort(),l),r=await fetch(e,{method:`HEAD`,signal:t.signal,headers:{"User-Agent":`boltdocs-doctor/1.0`}});return clearTimeout(n),!r.ok&&r.status!==404?{url:e,ok:(await fetch(e,{method:`GET`,signal:t.signal,headers:{"User-Agent":`boltdocs-doctor/1.0`}})).ok}:{url:e,ok:r.ok}}catch(t){return{url:e,ok:!1,error:t instanceof Error?t.message:String(t)}}},o=Array.from(r.keys()),c=[];for(let e=0;e<o.length;e+=u){let t=o.slice(e,e+u),n=await Promise.allSettled(t.map(i));c.push(...n.map(e=>e.status===`fulfilled`?e.value:{url:`unknown`,ok:!1,error:String(e.reason)}))}for(let i of c)if(!i.ok){let o=p(e,`brokenLink`,`warning`);if(o!==`off`){let s=r.get(i.url)||[];for(let r of s)n.push({file:t.u(a.default.relative(e.docsDir,r)),level:o,message:`Broken external link: "${i.url}"`,suggestion:`Verify the URL or update it if it's permanently down. Error: ${i.error||`Status >= 400`}`})}}}return n}async function E(e){let n=[];if(!e.doctorConfig.checks.i18n.enabled||!e.config.i18n)return n;let{defaultLocale:r,locales:i}=e.config.i18n,s=Object.keys(i),c=s.filter(e=>e!==r);for(let i of e.files){let l=t.u(a.default.relative(e.docsDir,i)),u=l.split(`/`),d=u[0];if(d===r){let t=u.slice(1).join(`/`);for(let r of c){let s=a.default.join(e.docsDir,r,t);if(!v(s)){let c=p(e,`missingTranslation`,`warning`);c!==`off`&&n.push({file:l,level:c,message:`Missing translation for locale "${r}"`,suggestion:`Create a version at "${r}/${t}".`,fix:async()=>{let e=a.default.dirname(s);o.default.existsSync(e)||o.default.mkdirSync(e,{recursive:!0}),o.default.copyFileSync(i,s)}})}}}else if(s.includes(d)){let t=u.slice(1).join(`/`);if(!v(a.default.join(e.docsDir,r,t))){let a=p(e,`missingTranslation`,`low`);a!==`off`&&n.push({file:l,level:a,message:`Orphaned translation (source missing in "${r}")`,suggestion:`Remove this file or create the source at "${r}/${t}".`,fix:async()=>{o.default.unlinkSync(i)}})}}}return n}async function D(e){let t=[];if(!e.config.theme?.sidebar)return t;let n=new Set,r=e.config.theme.sidebar;for(let[i,a]of Object.entries(r))for(let r of a){if(!r.text){let n=p(e,`invalidFrontmatter`,`warning`);n!==`off`&&t.push({file:`boltdocs.config.ts`,level:n,message:`Sidebar item in group "${i}" is missing a label.`,suggestion:`Add a "text" property to the sidebar item.`})}if(r.link&&(n.add(r.link),!e.routeIndex.has(r.link))){let{bestMatch:n,similarity:i}=C(r.link,e.linkTree.routes),a=i>.6,o=p(e,`brokenLink`,`high`);o!==`off`&&t.push({file:`boltdocs.config.ts`,level:o,message:`Broken sidebar link: "${r.link}"`,suggestion:a?`Did you mean "${n}"?`:`Ensure the route exists and is correctly formatted.`})}}for(let r of e.linkTree.routes)if(!(r===`/`||r===``)&&!n.has(r)){let n=p(e,`orphanedPage`,`low`);n!==`off`&&t.push({file:`Sidebar`,level:n,message:`Orphaned page found: "${r}" is not linked in the sidebar.`,suggestion:`Consider adding it to the sidebar for better discoverability.`})}return t}async function O(e){let t=[],n=e.doctorConfig.checks.performance;if(!n?.enabled)return t;let r=a.default.resolve(e.root,`.boltdocs`,`reports`,`performance.json`);if(!o.default.existsSync(r))return t.push({file:`(build)`,level:p(e,`budgetExceeded`,`warning`)??`warning`,message:"Performance metrics not found. Run `boltdocs build` first."}),t;let i;try{i=JSON.parse(o.default.readFileSync(r,`utf-8`))}catch{return t.push({file:`(build)`,level:p(e,`budgetExceeded`,`warning`)??`warning`,message:`Failed to parse performance metrics file.`}),t}let s=n.budgets,c=p(e,`budgetExceeded`,`warning`),l=f(s?.maxJSBundleSize,1/0),u=f(s?.maxCSSBundleSize,1/0),d=f(s?.maxPageHTMLSize,1/0),m=s?.maxImagesKB??1/0,h=s?.maxBuildTime??1/0,g=s?.maxFontCount??1/0;if(l!==1/0&&i.totalJSBundleSize>l){let e=(i.totalJSBundleSize/1024).toFixed(0),n=(l/1024).toFixed(0);t.push({file:`(build)`,level:c,message:`JS bundle size exceeds budget: ${e}kb > ${n}kb`,suggestion:`Code-split large dependencies or lazy-load route components.`})}if(u!==1/0&&i.totalCSSBundleSize>u){let e=(i.totalCSSBundleSize/1024).toFixed(0),n=(u/1024).toFixed(0);t.push({file:`(build)`,level:c,message:`CSS bundle size exceeds budget: ${e}kb > ${n}kb`,suggestion:`Remove unused styles or split CSS by route.`})}if(d!==1/0){for(let e of i.pages)if(e.htmlSize>d){let n=(e.htmlSize/1024).toFixed(0),r=(d/1024).toFixed(0);t.push({file:e.route,level:c,message:`Page HTML size exceeds budget: ${n}kb > ${r}kb`,suggestion:`Reduce the amount of inline content or split into sub-pages.`})}}let _=m*1024;if(m!==1/0&&i.totalImagesSize>_){let e=(i.totalImagesSize/1024).toFixed(0);t.push({file:`(build)`,level:c,message:`Image assets exceed budget: ${e}kb > ${m}kb`,suggestion:`Optimize images with lossy compression or use next-gen formats (webp/avif).`})}if(h!==1/0&&i.buildTime>h){let e=(i.buildTime/1e3).toFixed(1),n=(h/1e3).toFixed(1);t.push({file:`(build)`,level:c,message:`Build time exceeds budget: ${e}s > ${n}s`,suggestion:"Check for large unoptimized assets or increase `concurrency` in SSG options."})}return g!==1/0&&i.fontCount>g&&t.push({file:`(build)`,level:c,message:`Font files exceed budget: ${i.fontCount} > ${g}`,suggestion:`Reduce the number of font families or use variable fonts.`}),t}async function k(e){let t=a.default.resolve(e,`doctor.json`);if(o.default.existsSync(t)){(0,s.warn)(`"doctor.json" already exists at ${e}.`);return}try{o.default.writeFileSync(t,JSON.stringify(d,null,2)),(0,s.success)(`Created "doctor.json" with default configuration.`)}catch(e){(0,s.error)(`Failed to create "doctor.json": ${e}`)}}async function A(e=process.cwd(),t={}){if(t.init){await k(e);return}i.t();try{let n=await y(e),{format:i}=n.reporting,u=performance.now(),d=await r.n(`docs`,e),f=a.default.resolve(e,`docs`);o.default.existsSync(f)||(i===`pretty`&&(0,s.error)(`Docs dir not found at ${f}`),process.exit(1)),i===`pretty`&&console.log((0,s.double)([` ${s.colors.dim(`Docs dir:`)} ${f}`,` ${s.colors.dim(`Reports:`)} ${e}/.boltdocs/reports/`],{title:`✦ DOCTOR — Documentation Health Check`})),i===`pretty`&&(0,s.info)(s.colors.dim(`🔍 Discovering files and routes...`));let p=(0,l.default)(n.exclude||[]),h=await new c.fdir().withFullPaths().filter(e=>{if(!(e.endsWith(`.md`)||e.endsWith(`.mdx`)))return!1;let t=a.default.relative(f,e).replace(/\\/g,`/`),n=t.split(`/`).some(e=>e.startsWith(`_`)&&e!==`_index.md`&&e!==`_index.mdx`);return!p(t)&&!n}).crawl(f).withPromise();for(let e of h)_.set(e,!0);let g=await b(f,e,d,h),v=d.base||`/`,x=v===`/`?``:v.endsWith(`/`)?v.slice(0,-1):v,S=new Set(g.routes),C=new Set(g.routes.map(e=>e.endsWith(`/`)?e:e+`/`)),k=new Set(g.routes.map(e=>e.endsWith(`/`)?e.slice(0,-1):e));i===`pretty`&&(0,s.info)(s.colors.dim(`🧪 Running diagnostic checks in parallel...`));let A={root:e,docsDir:f,config:d,doctorConfig:n,linkTree:g,files:h,options:t,routeIndex:S,routeIndexWithSlash:C,routeIndexWithoutSlash:k,basePrefix:x};i===`pretty`&&(0,s.info)(s.colors.dim(`🧪 Running diagnostic checks in parallel...`));let j=[w(A),T(A),E(A),D(A)];t.budget&&j.push(O(A));let[M,N,P,F,...I]=await Promise.all(j),L=t.budget?I[0]??[]:[],R=[...M,...N,...P,...F,...L];if(i===`pretty`){let e=[{label:`Metadata checks ${M.length>0?`— ${M.length} issue${M.length===1?``:`s`}`:`— OK`}`,done:M.length===0},{label:`Link checks ${N.length>0?`— ${N.length} issue${N.length===1?``:`s`}`:`— OK`}`,done:N.length===0},{label:`i18n checks ${P.length>0?`— ${P.length} issue${P.length===1?``:`s`}`:`— OK`}`,done:P.length===0},{label:`Sidebar checks ${F.length>0?`— ${F.length} issue${F.length===1?``:`s`}`:`— OK`}`,done:F.length===0}];t.budget&&e.push({label:`Performance budget ${L.length>0?`— ${L.length} issue${L.length===1?``:`s`}`:`— OK`}`,done:L.length===0}),console.log(`\n${(0,s.tasks)(e)}`)}let z=0;if(t.fix){for(let e of R)if(e.fix){if(A.doctorConfig.fix.confirmChanges&&!await(0,s.confirm)(`Fix issue in "${e.file}": ${e.message}?`))continue;if(A.doctorConfig.fix.backupFiles){let t=a.default.resolve(A.docsDir,e.file);o.default.existsSync(t)&&await m(t,a.default.resolve(A.root,A.doctorConfig.fix.backupPath))}await e.fix(),z++}}let B=((performance.now()-u)/1e3).toFixed(2),V=R.filter(e=>e.level===`high`).length,H=R.filter(e=>e.level===`warning`).length,U=R.filter(e=>e.level===`low`).length,W={summary:{total:R.length,high:V,warning:H,low:U,fixed:z,duration:B},issues:R.map(e=>({...e,fix:void 0}))};if(n.reporting.outputFile){let t=a.default.resolve(e,n.reporting.outputFile);o.default.existsSync(a.default.dirname(t))||o.default.mkdirSync(a.default.dirname(t),{recursive:!0}),o.default.writeFileSync(t,JSON.stringify(W,null,2))}if(i===`json`)console.log(JSON.stringify(W,null,2));else if(i===`pretty`){let e=R.reduce((e,t)=>(e[t.file]||(e[t.file]=[]),e[t.file].push(t),e),{});if(R.length>0){(0,s.dividerLog)();for(let[n,r]of Object.entries(e)){let e=[];for(let n of r){let r=n.level===`high`?`❌`:n.level===`warning`?`⚠️`:`ℹ️`,i=n.level===`high`?s.colors.red:n.level===`warning`?s.colors.yellow:s.colors.blue;e.push(`${r} ${i(n.level.toUpperCase())}: ${n.message}`),n.suggestion&&e.push(` ${s.colors.dim(`💡 ${n.suggestion}`)}`),t.fix&&n.fix&&e.push(` ${s.colors.green(`✅ Fixed automatically`)}`)}console.log(`\n${(0,s.single)(e,{title:`📄 ${n}`})}`)}(0,s.dividerLog)()}if(R.length===0)console.log((0,s.round)([` Everything looks perfect!`,` Your documentation is in great shape.`,``,` ${s.colors.dim(`Scanned ${h.length} file${h.length===1?``:`s`} in ${B}s`)}`],{title:`✨ Documentation Health Check`}));else{let e=[];V>0&&e.push(s.colors.red(`${V} Critical Error${V===1?``:`s`}`)),H>0&&e.push(s.colors.yellow(`${H} Warning${H===1?``:`s`}`)),U>0&&e.push(s.colors.blue(`${U} Improvement${U===1?``:`s`}`));let t=[...(0,s.bullet)(e).split(`
7
+ `).map(e=>e.trimStart()),``,s.colors.dim(`Scanned ${h.length} file${h.length===1?``:`s`} in ${B}s`)];console.log(`\n${(0,s.double)(t,{title:`Diagnosis Results`})}\n`),z>0&&(0,s.success)(`Successfully fixed ${z} issues automatically!`),V>0?(0,s.error)(`Please fix the critical errors before building for production.`):(0,s.success)(`No critical issues found. You are ready to go!`)}}n.reporting.failOnError&&V>0&&process.exit(1),n.reporting.maxWarnings!==-1&&H>n.reporting.maxWarnings&&(i===`pretty`&&(0,s.error)(`Failed: Too many warnings (${H} > ${n.reporting.maxWarnings})`),process.exit(1))}catch(e){(0,s.error)(`Doctor failed: ${e}`),process.exit(1)}}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return d}});
@@ -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
+ import{t as e}from"./chunk-BFSpntXv.mjs";import{_ as t,a as n,d as r,u as i}from"./utils-Crm9oPcV.mjs";import{t as a}from"./pages-external-BYa4JSda.mjs";import{r as o}from"./config-CCXp3aXO.mjs";import{t as s}from"./node/cli-entry.mjs";import c from"node:path";import l from"node:fs";import{bullet as u,colors as d,confirm as f,dividerLog as p,double as m,error as h,info as g,round as _,single as v,success as y,tasks as b,warn as x}from"@bdocs/dui";import{fdir as S}from"fdir";import C from"picomatch";import{distance as w}from"fastest-levenshtein";const T={$schema:`https://boltdocs.vercel.app/schemas/doctor-config.schema.json`,checks:{metadata:{enabled:!0,titleMin:10,titleMax:60,descriptionMin:50,required:[`title`,`description`],optional:[],validateDates:!1},links:{internal:!0,external:!1,timeout:1e4,concurrency:10,ignore:[]},i18n:{enabled:!0},performance:{enabled:!0,budgets:{maxJSBundleSize:`200kb`,maxCSSBundleSize:`30kb`,maxPageHTMLSize:`80kb`,maxImagesKB:500,maxBuildTime:3e4,maxFontCount:3}}},fix:{confirmChanges:!1,backupFiles:!1,backupPath:`.boltdocs/backups`},reporting:{format:`pretty`,outputFile:`.boltdocs/reports/doctor.json`,failOnError:!1,maxWarnings:-1},severity:{missingTranslation:`warning`,brokenLink:`high`,brokenAnchor:`warning`,largeFile:`warning`,orphanedPage:`low`,duplicateTitle:`low`,shortMetadata:`low`,missingMetadata:`warning`,malformedFrontmatter:`high`,invalidFrontmatter:`high`,budgetExceeded:`warning`},exclude:[]};function E(e,t){if(e==null)return t;if(typeof e==`number`)return e;let n=e.toLowerCase().match(/^(\d+(?:\.\d+)?)\s*(b|kb|mb|gb)?$/);if(!n)return t;let r=Number.parseFloat(n[1]),i=n[2]||`b`;return Math.round(r*({b:1,kb:1024,mb:1024*1024,gb:1024*1024*1024}[i]||1))}function D(e,t,n){return e.doctorConfig.severity[t]||n}async function ee(e,t){l.existsSync(t)||l.mkdirSync(t,{recursive:!0});let n=c.basename(e),r=new Date().toISOString().replace(/[:.]/g,`-`),i=c.join(t,`${n}.${r}.bak`);l.copyFileSync(e,i)}const O=new Map;function k(e){let t=O.get(e);if(t)return t;let n=(async()=>{let t=await r(e,!1);return{raw:t.raw,data:t.data,content:t.content}})();return O.set(e,n),n}const A=new Map;function j(e){if(A.has(e))return A.get(e);let t=!1;try{t=l.existsSync(e)&&l.statSync(e).isFile()}catch{t=!1}return A.set(e,t),t}async function M(e){let t=c.resolve(e,`doctor.json`);if(l.existsSync(t))try{let e=JSON.parse(l.readFileSync(t,`utf-8`));return{...T,...e,checks:{...T.checks,...e.checks,metadata:{...T.checks.metadata,...e.checks?.metadata},links:{...T.checks.links,...e.checks?.links},i18n:{...T.checks.i18n,...e.checks?.i18n},performance:{...T.checks.performance,...e.checks?.performance,budgets:{...T.checks.performance?.budgets,...e.checks?.performance?.budgets}}},fix:{...T.fix,...e.fix},reporting:{...T.reporting,...e.reporting},severity:{...T.severity,...e.severity},exclude:[...T.exclude,...e.exclude||[]]}}catch(e){x(`Failed to parse doctor.json: ${e}`)}return T}async function N(e,t=process.cwd(),r,i){let o=c.resolve(t,`.boltdocs`,`generated`);l.existsSync(o)||l.mkdirSync(o,{recursive:!0});let s=i;s||=await new S().withFullPaths().filter(e=>e.endsWith(`.md`)||e.endsWith(`.mdx`)).crawl(e).withPromise();let u=r?.base||`/docs`,d=[];for(let t=0;t<s.length;t+=100){let r=s.slice(t,t+100),i=await Promise.all(r.map(async t=>{let r=c.isAbsolute(t)?t:c.resolve(e,t),i=c.relative(e,r),{data:a}=await k(r),o;return o=a.permalink?String(a.permalink).startsWith(`/`)?String(a.permalink):`/${a.permalink}`:n(i),u===`/`?o:(u.endsWith(`/`)?u:u+`/`)+(o.startsWith(`/`)?o.substring(1):o)}));d.push(...i)}d.includes(u)||d.push(u);let f=a(e,r);for(let e of f)d.includes(e)||d.push(e);let p={routes:Array.from(new Set(d)).sort(),timestamp:Date.now()};return l.writeFileSync(c.resolve(o,`link-tree.json`),JSON.stringify(p,null,2)),p}function P(e,t){if(e===t)return 1;if(!e||!t)return 0;let n=e.split(`/`).filter(Boolean),r=t.split(`/`).filter(Boolean),i=n[n.length-1]||``,a=r[r.length-1]||``;if(i===a){let e=0;for(let t of n)r.includes(t)&&e++;return e>=2?.99:.9}if(i.length>3&&a.length>3&&(a.startsWith(i)||i.startsWith(a))&&Math.min(i.length,a.length)/Math.max(i.length,a.length)>.5)return .88;let o=1-w(i,a)/Math.max(i.length,a.length);return o>.8?o*.95:1-w(e,t)/Math.max(e.length,t.length)}const F=new Map;function I(e,t){if(F.has(e))return F.get(e);let n=e.length,r=``,i=0;for(let a of t){if(a===e)continue;let t=a.length,o=Math.max(n,t);if(o===0)continue;let s=1-Math.abs(n-t)/o;if(s<=.8&&s<=i)continue;let c=P(e,a);c>i&&(i=c,r=a)}let a={bestMatch:r,similarity:i};return F.set(e,a),a}async function L(e){let n=[];if(!e.doctorConfig.checks.metadata.enabled)return n;let{titleMin:r,titleMax:a,descriptionMin:o}=e.doctorConfig.checks.metadata,s=new Map;for(let l of e.files){let u=i(c.relative(e.docsDir,l));try{let{raw:i,data:c}=await k(l);if(i.trim().startsWith(`---`)&&i.split(`---`).length>=3&&Object.keys(c).length===0){let t=D(e,`malformedFrontmatter`,`high`);t!==`off`&&n.push({file:u,level:t,message:`Malformed frontmatter (YAML parsing failed).`,suggestion:`Check your YAML syntax for indentation or unquoted special characters.`})}let d=t.safeParse(c);if(!d.success){let t=D(e,`invalidFrontmatter`,`high`);if(t!==`off`)for(let e of d.error.issues)n.push({file:u,level:t,message:`Invalid frontmatter field "${e.path.join(`.`)}": ${e.message}`,suggestion:`Ensure the field follows the correct type.`})}let f=Array.from(new Set([`title`,...e.doctorConfig.checks.metadata.required]));for(let t of f)if(c[t]===void 0){let r=D(e,`missingMetadata`,`warning`);r!==`off`&&n.push({file:u,level:r,message:`Missing required frontmatter field: "${t}".`,suggestion:`Add the "${t}" field to your frontmatter.`})}if(e.doctorConfig.checks.metadata.validateDates){let t=[`date`,`lastUpdated`,...e.doctorConfig.checks.metadata.optional.filter(e=>e.toLowerCase().includes(`date`))];for(let r of t)if(c[r]&&Number.isNaN(Date.parse(String(c[r])))){let t=D(e,`invalidFrontmatter`,`high`);t!==`off`&&n.push({file:u,level:t,message:`Invalid date format in field "${r}": "${c[r]}".`,suggestion:`Use a valid ISO date format (e.g., YYYY-MM-DD).`})}}if(c.title){let t=String(c.title);if(t.length<r){let i=D(e,`shortMetadata`,`low`);i!==`off`&&n.push({file:u,level:i,message:`Title is too short (${t.length} chars).`,suggestion:`Titles should be at least ${r} characters for better SEO.`})}else if(t.length>a){let r=D(e,`shortMetadata`,`low`);r!==`off`&&n.push({file:u,level:r,message:`Title is too long (${t.length} chars).`,suggestion:`Titles should be under ${a} characters.`})}let i=s.get(t)||[];i.push(u),s.set(t,i)}if(c.description&&String(c.description).length<o){let t=D(e,`shortMetadata`,`low`);t!==`off`&&n.push({file:u,level:t,message:`Description is very short.`,suggestion:`Descriptions should ideally be at least ${o} characters.`})}}catch(t){if(t instanceof Error){let r=D(e,`malformedFrontmatter`,`high`);r!==`off`&&n.push({file:u,level:r,message:`Malformed frontmatter (YAML error): ${t.message}`,suggestion:`Check your YAML syntax for indentation or unquoted special characters.`})}}}for(let[t,r]of s.entries())if(r.length>1){let i=D(e,`duplicateTitle`,`low`);if(i!==`off`)for(let e of r)n.push({file:e,level:i,message:`Duplicate title found: "${t}"`,suggestion:`Ensure each page has a unique title. Also used in: ${r.filter(t=>t!==e).join(`, `)}`})}return n}async function R(e){let t=[],{internal:n,external:r,ignore:a,timeout:o,concurrency:s}=e.doctorConfig.checks.links;if(!n&&!r&&!e.options.checkExternal)return t;let u=/(?:\[.*?\]\((.*?)\))|(?:href=["']([^"']+)["'])/g,f=new Set,p=5e5;for(let o of e.files){let s=i(c.relative(e.docsDir,o)),{content:d}=await k(o),m=[...(d.length>p?d.slice(0,p):d).replace(/```[\s\S]*?```/g,``).replace(/`[^`\n]*`/g,``).matchAll(u)];for(let i of m){let u=i[1]||i[2],d=!!i[1];if(!u||a.some(e=>u.includes(e)))continue;if(/^https?:\/\//i.test(u)){(r||e.options.checkExternal)&&f.add({url:u,file:o});continue}if(!n||/^(mailto|tel|#)/i.test(u))continue;let p;try{p=decodeURIComponent(u.split(`#`)[0].split(`?`)[0])}catch{p=u.split(`#`)[0].split(`?`)[0]}if(!p)continue;let m=!1,h=``;if(p.startsWith(`/`))if(e.routeIndex.has(p)||e.routeIndexWithSlash.has(p)||e.routeIndexWithoutSlash.has(p))m=!0;else{let t=e.basePrefix+(p.startsWith(`/`)?p:`/`+p);if(e.routeIndex.has(t)||e.routeIndexWithSlash.has(t))m=!1,h=t;else{let t=e.config.base!==`/`&&p.startsWith(e.config.base||`/`)?p.substring((e.config.base||`/`).length):p,n=t.startsWith(`/`)?t.substring(1):t;h=c.join(e.docsDir,n),m=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`].some(e=>j(h+e))}}else h=c.resolve(c.dirname(o),p),m=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`].some(e=>j(h+e));if(!m){let{bestMatch:n,similarity:r}=I(p,e.linkTree.routes),i=!1,a=e.basePrefix+(p.startsWith(`/`)?p:`/`+p);(e.routeIndex.has(a)||e.routeIndexWithSlash.has(a))&&(n=a,r=1,i=!0);let c=r>.6||i,f=r>.75&&n!==p||i,m=D(e,`brokenLink`,`high`);m!==`off`&&t.push({file:s,level:m,message:`Broken internal link: "${u}"`,suggestion:c?`Did you mean "${n}"?`:`Ensure the target exists or check for typos.`,fix:f?async()=>{let e=u.includes(`#`)?`#`+u.split(`#`)[1]:``,t=d?`(${u})`:`href="${u}"`,r=d?`(${n}${e})`:`href="${n}${e}"`,i=l.readFileSync(o,`utf-8`).replace(t,r);l.writeFileSync(o,i),O.delete(o)}:void 0})}}}if(f.size>0){g(d.gray(`Verifying ${f.size} external links...`));let n=new Map;for(let e of f)n.has(e.url)||n.set(e.url,[]),n.get(e.url).push(e.file);let r=async e=>{try{let t=new AbortController,n=setTimeout(()=>t.abort(),o),r=await fetch(e,{method:`HEAD`,signal:t.signal,headers:{"User-Agent":`boltdocs-doctor/1.0`}});return clearTimeout(n),!r.ok&&r.status!==404?{url:e,ok:(await fetch(e,{method:`GET`,signal:t.signal,headers:{"User-Agent":`boltdocs-doctor/1.0`}})).ok}:{url:e,ok:r.ok}}catch(t){return{url:e,ok:!1,error:t instanceof Error?t.message:String(t)}}},a=Array.from(n.keys()),l=[];for(let e=0;e<a.length;e+=s){let t=a.slice(e,e+s),n=await Promise.allSettled(t.map(r));l.push(...n.map(e=>e.status===`fulfilled`?e.value:{url:`unknown`,ok:!1,error:String(e.reason)}))}for(let r of l)if(!r.ok){let a=D(e,`brokenLink`,`warning`);if(a!==`off`){let o=n.get(r.url)||[];for(let n of o)t.push({file:i(c.relative(e.docsDir,n)),level:a,message:`Broken external link: "${r.url}"`,suggestion:`Verify the URL or update it if it's permanently down. Error: ${r.error||`Status >= 400`}`})}}}return t}async function z(e){let t=[];if(!e.doctorConfig.checks.i18n.enabled||!e.config.i18n)return t;let{defaultLocale:n,locales:r}=e.config.i18n,a=Object.keys(r),o=a.filter(e=>e!==n);for(let r of e.files){let s=i(c.relative(e.docsDir,r)),u=s.split(`/`),d=u[0];if(d===n){let n=u.slice(1).join(`/`);for(let i of o){let a=c.join(e.docsDir,i,n);if(!j(a)){let o=D(e,`missingTranslation`,`warning`);o!==`off`&&t.push({file:s,level:o,message:`Missing translation for locale "${i}"`,suggestion:`Create a version at "${i}/${n}".`,fix:async()=>{let e=c.dirname(a);l.existsSync(e)||l.mkdirSync(e,{recursive:!0}),l.copyFileSync(r,a)}})}}}else if(a.includes(d)){let i=u.slice(1).join(`/`);if(!j(c.join(e.docsDir,n,i))){let a=D(e,`missingTranslation`,`low`);a!==`off`&&t.push({file:s,level:a,message:`Orphaned translation (source missing in "${n}")`,suggestion:`Remove this file or create the source at "${n}/${i}".`,fix:async()=>{l.unlinkSync(r)}})}}}return t}async function B(e){let t=[];if(!e.config.theme?.sidebar)return t;let n=new Set,r=e.config.theme.sidebar;for(let[i,a]of Object.entries(r))for(let r of a){if(!r.text){let n=D(e,`invalidFrontmatter`,`warning`);n!==`off`&&t.push({file:`boltdocs.config.ts`,level:n,message:`Sidebar item in group "${i}" is missing a label.`,suggestion:`Add a "text" property to the sidebar item.`})}if(r.link&&(n.add(r.link),!e.routeIndex.has(r.link))){let{bestMatch:n,similarity:i}=I(r.link,e.linkTree.routes),a=i>.6,o=D(e,`brokenLink`,`high`);o!==`off`&&t.push({file:`boltdocs.config.ts`,level:o,message:`Broken sidebar link: "${r.link}"`,suggestion:a?`Did you mean "${n}"?`:`Ensure the route exists and is correctly formatted.`})}}for(let r of e.linkTree.routes)if(!(r===`/`||r===``)&&!n.has(r)){let n=D(e,`orphanedPage`,`low`);n!==`off`&&t.push({file:`Sidebar`,level:n,message:`Orphaned page found: "${r}" is not linked in the sidebar.`,suggestion:`Consider adding it to the sidebar for better discoverability.`})}return t}async function V(e){let t=[],n=e.doctorConfig.checks.performance;if(!n?.enabled)return t;let r=c.resolve(e.root,`.boltdocs`,`reports`,`performance.json`);if(!l.existsSync(r))return t.push({file:`(build)`,level:D(e,`budgetExceeded`,`warning`)??`warning`,message:"Performance metrics not found. Run `boltdocs build` first."}),t;let i;try{i=JSON.parse(l.readFileSync(r,`utf-8`))}catch{return t.push({file:`(build)`,level:D(e,`budgetExceeded`,`warning`)??`warning`,message:`Failed to parse performance metrics file.`}),t}let a=n.budgets,o=D(e,`budgetExceeded`,`warning`),s=E(a?.maxJSBundleSize,1/0),u=E(a?.maxCSSBundleSize,1/0),d=E(a?.maxPageHTMLSize,1/0),f=a?.maxImagesKB??1/0,p=a?.maxBuildTime??1/0,m=a?.maxFontCount??1/0;if(s!==1/0&&i.totalJSBundleSize>s){let e=(i.totalJSBundleSize/1024).toFixed(0),n=(s/1024).toFixed(0);t.push({file:`(build)`,level:o,message:`JS bundle size exceeds budget: ${e}kb > ${n}kb`,suggestion:`Code-split large dependencies or lazy-load route components.`})}if(u!==1/0&&i.totalCSSBundleSize>u){let e=(i.totalCSSBundleSize/1024).toFixed(0),n=(u/1024).toFixed(0);t.push({file:`(build)`,level:o,message:`CSS bundle size exceeds budget: ${e}kb > ${n}kb`,suggestion:`Remove unused styles or split CSS by route.`})}if(d!==1/0){for(let e of i.pages)if(e.htmlSize>d){let n=(e.htmlSize/1024).toFixed(0),r=(d/1024).toFixed(0);t.push({file:e.route,level:o,message:`Page HTML size exceeds budget: ${n}kb > ${r}kb`,suggestion:`Reduce the amount of inline content or split into sub-pages.`})}}let h=f*1024;if(f!==1/0&&i.totalImagesSize>h){let e=(i.totalImagesSize/1024).toFixed(0);t.push({file:`(build)`,level:o,message:`Image assets exceed budget: ${e}kb > ${f}kb`,suggestion:`Optimize images with lossy compression or use next-gen formats (webp/avif).`})}if(p!==1/0&&i.buildTime>p){let e=(i.buildTime/1e3).toFixed(1),n=(p/1e3).toFixed(1);t.push({file:`(build)`,level:o,message:`Build time exceeds budget: ${e}s > ${n}s`,suggestion:"Check for large unoptimized assets or increase `concurrency` in SSG options."})}return m!==1/0&&i.fontCount>m&&t.push({file:`(build)`,level:o,message:`Font files exceed budget: ${i.fontCount} > ${m}`,suggestion:`Reduce the number of font families or use variable fonts.`}),t}var H=e({DEFAULT_DOCTOR_CONFIG:()=>T,checkI18n:()=>z,checkLinks:()=>R,checkMetadata:()=>L,checkPerformance:()=>V,checkSidebar:()=>B,doctorAction:()=>W,doctorInit:()=>U,generateLinkTree:()=>N,loadDoctorConfig:()=>M});async function U(e){let t=c.resolve(e,`doctor.json`);if(l.existsSync(t)){x(`"doctor.json" already exists at ${e}.`);return}try{l.writeFileSync(t,JSON.stringify(T,null,2)),y(`Created "doctor.json" with default configuration.`)}catch(e){h(`Failed to create "doctor.json": ${e}`)}}async function W(e=process.cwd(),t={}){if(t.init){await U(e);return}s();try{let n=await M(e),{format:r}=n.reporting,i=performance.now(),a=await o(`docs`,e),s=c.resolve(e,`docs`);l.existsSync(s)||(r===`pretty`&&h(`Docs dir not found at ${s}`),process.exit(1)),r===`pretty`&&console.log(m([` ${d.dim(`Docs dir:`)} ${s}`,` ${d.dim(`Reports:`)} ${e}/.boltdocs/reports/`],{title:`✦ DOCTOR — Documentation Health Check`})),r===`pretty`&&g(d.dim(`🔍 Discovering files and routes...`));let x=C(n.exclude||[]),w=await new S().withFullPaths().filter(e=>{if(!(e.endsWith(`.md`)||e.endsWith(`.mdx`)))return!1;let t=c.relative(s,e).replace(/\\/g,`/`),n=t.split(`/`).some(e=>e.startsWith(`_`)&&e!==`_index.md`&&e!==`_index.mdx`);return!x(t)&&!n}).crawl(s).withPromise();for(let e of w)A.set(e,!0);let T=await N(s,e,a,w),E=a.base||`/`,D=E===`/`?``:E.endsWith(`/`)?E.slice(0,-1):E,O=new Set(T.routes),k=new Set(T.routes.map(e=>e.endsWith(`/`)?e:e+`/`)),j=new Set(T.routes.map(e=>e.endsWith(`/`)?e.slice(0,-1):e));r===`pretty`&&g(d.dim(`🧪 Running diagnostic checks in parallel...`));let P={root:e,docsDir:s,config:a,doctorConfig:n,linkTree:T,files:w,options:t,routeIndex:O,routeIndexWithSlash:k,routeIndexWithoutSlash:j,basePrefix:D};r===`pretty`&&g(d.dim(`🧪 Running diagnostic checks in parallel...`));let F=[L(P),R(P),z(P),B(P)];t.budget&&F.push(V(P));let[I,H,U,W,...G]=await Promise.all(F),K=t.budget?G[0]??[]:[],q=[...I,...H,...U,...W,...K];if(r===`pretty`){let e=[{label:`Metadata checks ${I.length>0?`— ${I.length} issue${I.length===1?``:`s`}`:`— OK`}`,done:I.length===0},{label:`Link checks ${H.length>0?`— ${H.length} issue${H.length===1?``:`s`}`:`— OK`}`,done:H.length===0},{label:`i18n checks ${U.length>0?`— ${U.length} issue${U.length===1?``:`s`}`:`— OK`}`,done:U.length===0},{label:`Sidebar checks ${W.length>0?`— ${W.length} issue${W.length===1?``:`s`}`:`— OK`}`,done:W.length===0}];t.budget&&e.push({label:`Performance budget ${K.length>0?`— ${K.length} issue${K.length===1?``:`s`}`:`— OK`}`,done:K.length===0}),console.log(`\n${b(e)}`)}let J=0;if(t.fix){for(let e of q)if(e.fix){if(P.doctorConfig.fix.confirmChanges&&!await f(`Fix issue in "${e.file}": ${e.message}?`))continue;if(P.doctorConfig.fix.backupFiles){let t=c.resolve(P.docsDir,e.file);l.existsSync(t)&&await ee(t,c.resolve(P.root,P.doctorConfig.fix.backupPath))}await e.fix(),J++}}let Y=((performance.now()-i)/1e3).toFixed(2),X=q.filter(e=>e.level===`high`).length,Z=q.filter(e=>e.level===`warning`).length,Q=q.filter(e=>e.level===`low`).length,$={summary:{total:q.length,high:X,warning:Z,low:Q,fixed:J,duration:Y},issues:q.map(e=>({...e,fix:void 0}))};if(n.reporting.outputFile){let t=c.resolve(e,n.reporting.outputFile);l.existsSync(c.dirname(t))||l.mkdirSync(c.dirname(t),{recursive:!0}),l.writeFileSync(t,JSON.stringify($,null,2))}if(r===`json`)console.log(JSON.stringify($,null,2));else if(r===`pretty`){let e=q.reduce((e,t)=>(e[t.file]||(e[t.file]=[]),e[t.file].push(t),e),{});if(q.length>0){p();for(let[n,r]of Object.entries(e)){let e=[];for(let n of r){let r=n.level===`high`?`❌`:n.level===`warning`?`⚠️`:`ℹ️`,i=n.level===`high`?d.red:n.level===`warning`?d.yellow:d.blue;e.push(`${r} ${i(n.level.toUpperCase())}: ${n.message}`),n.suggestion&&e.push(` ${d.dim(`💡 ${n.suggestion}`)}`),t.fix&&n.fix&&e.push(` ${d.green(`✅ Fixed automatically`)}`)}console.log(`\n${v(e,{title:`📄 ${n}`})}`)}p()}if(q.length===0)console.log(_([` Everything looks perfect!`,` Your documentation is in great shape.`,``,` ${d.dim(`Scanned ${w.length} file${w.length===1?``:`s`} in ${Y}s`)}`],{title:`✨ Documentation Health Check`}));else{let e=[];X>0&&e.push(d.red(`${X} Critical Error${X===1?``:`s`}`)),Z>0&&e.push(d.yellow(`${Z} Warning${Z===1?``:`s`}`)),Q>0&&e.push(d.blue(`${Q} Improvement${Q===1?``:`s`}`));let t=[...u(e).split(`
7
+ `).map(e=>e.trimStart()),``,d.dim(`Scanned ${w.length} file${w.length===1?``:`s`} in ${Y}s`)];console.log(`\n${m(t,{title:`Diagnosis Results`})}\n`),J>0&&y(`Successfully fixed ${J} issues automatically!`),X>0?h(`Please fix the critical errors before building for production.`):y(`No critical issues found. You are ready to go!`)}}n.reporting.failOnError&&X>0&&process.exit(1),n.reporting.maxWarnings!==-1&&Z>n.reporting.maxWarnings&&(r===`pretty`&&h(`Failed: Too many warnings (${Z} > ${n.reporting.maxWarnings})`),process.exit(1))}catch(e){h(`Doctor failed: ${e}`),process.exit(1)}}export{N as n,H as t};
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- const e=require(`./chunk-Ds5LZdWN.cjs`);let t=require(`node:path`);t=e.n(t);let n=require(`node:fs`);n=e.n(n);let r=require(`@bdocs/dui`);function i(e){return e.replace(/^v/,``).replace(/^\[|\]$/g,``)}function a(e){let t=e.match(/Thanks \[@(\w+)\]/);return t?t[1]:void 0}function o(e){let t=e.match(/Thanks \[@[^\]]+\]\(([^)]+)\)/);return t?t[1]:void 0}function s(e){let t=e.match(/\[`([a-f0-9]+)`\]/);return t?t[1]:void 0}function c(e){let t=e.match(/\[`[a-f0-9]+`\]\(([^)]+)\)/);return t?t[1]:void 0}function l(e,t){let n=e;return n=n.replace(/Thanks \[@[^\]]+\]\([^)]+\)/g,``),n=n.replace(/\[`[a-f0-9]+`\]\([^)]+\)/g,``),n=n.replace(/!\s*-/g,``),n=n.replace(/^-\s*/,``),n=n.replace(/^feat:\s*/i,``),n=n.replace(/^fix:\s*/i,``),n=n.replace(/^perf:\s*/i,``),n=n.replace(/^refactor:\s*/i,``),n=n.replace(/^docs:\s*/i,``),n=n.replace(/^chore:\s*/i,``),n=n.replace(/^\*\*[a-z]+(\([^)]+\))?:\*\*/gi,``),n.trim()}function u(e){let t=/^###\s+(Minor Changes|Major Changes|Patch Changes)/m.test(e),n=/^##\s+v?(\d+\.\d+\.\d+)/m.test(e);return t&&n}function d(e,t){for(let n=t+1;n<Math.min(t+10,e.length);n++){let t=e[n].trim().toLowerCase();if(t.startsWith(`### major`))return`major`;if(t.startsWith(`### minor`))return`minor`;if(t.startsWith(`### patch`))return`patch`}return null}function f(e){let t=e.split(`
6
+ const e=require(`./chunk-D1Md3oWO.cjs`);let t=require(`node:path`);t=e.r(t);let n=require(`node:fs`);n=e.r(n);let r=require(`@bdocs/dui`);function i(e){return e.replace(/^v/,``).replace(/^\[|\]$/g,``)}function a(e){let t=e.match(/Thanks \[@(\w+)\]/);return t?t[1]:void 0}function o(e){let t=e.match(/Thanks \[@[^\]]+\]\(([^)]+)\)/);return t?t[1]:void 0}function s(e){let t=e.match(/\[`([a-f0-9]+)`\]/);return t?t[1]:void 0}function c(e){let t=e.match(/\[`[a-f0-9]+`\]\(([^)]+)\)/);return t?t[1]:void 0}function l(e,t){let n=e;return n=n.replace(/Thanks \[@[^\]]+\]\([^)]+\)/g,``),n=n.replace(/\[`[a-f0-9]+`\]\([^)]+\)/g,``),n=n.replace(/!\s*-/g,``),n=n.replace(/^-\s*/,``),n=n.replace(/^feat:\s*/i,``),n=n.replace(/^fix:\s*/i,``),n=n.replace(/^perf:\s*/i,``),n=n.replace(/^refactor:\s*/i,``),n=n.replace(/^docs:\s*/i,``),n=n.replace(/^chore:\s*/i,``),n=n.replace(/^\*\*[a-z]+(\([^)]+\))?:\*\*/gi,``),n.trim()}function u(e){let t=/^###\s+(Minor Changes|Major Changes|Patch Changes)/m.test(e),n=/^##\s+v?(\d+\.\d+\.\d+)/m.test(e);return t&&n}function d(e,t){for(let n=t+1;n<Math.min(t+10,e.length);n++){let t=e[n].trim().toLowerCase();if(t.startsWith(`### major`))return`major`;if(t.startsWith(`### minor`))return`minor`;if(t.startsWith(`### patch`))return`patch`}return null}function f(e){let t=e.split(`
7
7
  `),n=[],r=null,u=``;for(let e=0;e<t.length;e++){let f=t[e].trim(),p=f.match(/^##\s+v?(\d+\.\d+\.\d+)/);if(p){r&&n.push(r);let a=i(p[1]),o=`patch`,s,c=f.match(/\((\d{4}-\d{2}-\d{2})\)/);c&&(s=c[1]);let l=d(t,e);l&&(o=l),r={version:a,type:o,date:s,changes:[]},u=``;continue}let m=f.match(/^###\s+(.+)$/i);if(m){u=m[1].toLowerCase();continue}if(f.startsWith(`- `)&&r){let e=f.slice(2).trim(),t=`other`;u.includes(`feat`)||u.includes(`minor`)?t=`feat`:u.includes(`fix`)||u.includes(`patch`)?t=`fix`:u.includes(`perf`)?t=`perf`:u.includes(`refactor`)?t=`refactor`:u.includes(`docs`)||u.includes(`documentation`)?t=`docs`:u.includes(`chore`)&&(t=`chore`);let n={type:t,message:l(e,t),author:a(e),authorUrl:o(e),commit:s(e),commitUrl:c(e)};r.changes.push(n)}}return r&&n.push(r),n}const p={name:`changesets`,detect:u,parse:f},m={added:`feat`,changed:`refactor`,deprecated:`fix`,removed:`fix`,fixed:`fix`,security:`fix`};function h(e){let t=/^#\s+Changelog/i.test(e),n=/^##\s*\[[\d.]+\]\s*-\s*\d{4}-\d{2}-\d{2}/m.test(e),r=/^###\s+(Added|Changed|Deprecated|Removed|Fixed|Security)$/m.test(e);return t&&n&&r}function g(e){let t=e.split(`
8
8
  `),n=[],r=null,u=``;for(let e=0;e<t.length;e++){let d=t[e].trim(),f=d.match(/^##\s*\[(\d+\.\d+\.\d+[^\]]*)\]\s*-\s*(\d{4}-\d{2}-\d{2})/);if(f){r&&n.push(r),r={version:i(f[1]),type:`patch`,date:f[2],changes:[]},u=``;continue}if(d.match(/^##\s*\[Unreleased\]/i)){r&&n.push(r),r={version:`unreleased`,type:`patch`,date:void 0,changes:[]},u=``;continue}let p=d.match(/^###\s+(Added|Changed|Deprecated|Removed|Fixed|Security)$/i);if(p){u=p[1].toLowerCase();continue}if((d.startsWith(`- `)||d.startsWith(`* `))&&r){let e=d.slice(2).trim(),t=m[u]||`other`,n={type:t,message:l(e,t),author:a(e),authorUrl:o(e),commit:s(e),commitUrl:c(e)};r.changes.push(n)}}return r&&n.push(r),n}const _={name:`keep-a-changelog`,detect:h,parse:g},v={features:`feat`,"breaking changes":`feat`,breaking:`feat`,"bug fixes":`fix`,bugfixes:`fix`,fixes:`fix`,performance:`perf`,"build system":`chore`,builds:`chore`,tests:`chore`,chores:`chore`,documentation:`docs`,docs:`docs`,revert:`fix`,reverts:`fix`,refactor:`refactor`,"code refactoring":`refactor`};function y(e){let t=/^###\s+(Features|Bug Fixes|BREAKING CHANGES|Build System|Tests|Chores|Documentation|Reverts)/m.test(e),n=/^\*\*[a-z]+(\([^)]+\))?:\*\*/m.test(e),r=/^##\s*\[[\d.]+\]\([^)]+\)\s*\(\d{4}-\d{2}-\d{2}\)/m.test(e);return t&&(n||r)}function b(e){let t=e.split(`
9
9
  `),n=[],r=null,u=``;for(let e=0;e<t.length;e++){let d=t[e].trim(),f=d.match(/^##\s*\[(\d+\.\d+\.\d+[^\]]*)\]\([^)]+\)\s*\((\d{4}-\d{2}-\d{2})\)/);if(f){r&&n.push(r);let a=i(f[1]),o=`patch`;for(let n=e+1;n<Math.min(e+20,t.length);n++){let e=t[n].toLowerCase();if(e.includes(`major`)||e.includes(`breaking`)){o=`major`;break}(e.includes(`minor`)||e.includes(`feat`))&&(o=`minor`)}r={version:a,type:o,date:f[2],changes:[]},u=``;continue}let p=d.match(/^###\s+(.+)$/i);if(p){u=p[1].toLowerCase();continue}if((d.startsWith(`- `)||d.startsWith(`* `))&&r){let e=d.slice(2).trim(),t=v[u]||`other`,n={type:t,message:l(e,t),author:a(e),authorUrl:o(e),commit:s(e),commitUrl:c(e)};r.changes.push(n)}}return r&&n.push(r),n}const x={name:`semantic-release`,detect:y,parse:b},S={features:`feat`,"breaking changes":`feat`,breaking:`feat`,"bug fixes":`fix`,fixes:`fix`,performance:`perf`,"build system":`chore`,builds:`chore`,tests:`chore`,chores:`chore`,documentation:`docs`,docs:`docs`,revert:`fix`,reverts:`fix`,refactor:`refactor`,"code refactoring":`refactor`};function C(e){let t=/^##\s+(\d+\.\d+\.\d+)\s*\((\d{4}-\d{2}-\d{2})\)/m.test(e),n=/^###\s+(Features|Bug Fixes|BREAKING CHANGES|Build System|Tests|Chores|Documentation)/m.test(e),r=/^[*-]\s+/m.test(e);return t&&n&&r}function w(e){let t=e.split(`
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- import{t as e}from"./rolldown-runtime-fkIsjY3S.mjs";import*as t from"zod";import n from"node:crypto";function r(e,t){let r={alg:`RS256`,typ:`JWT`},i=Math.floor(Date.now()/1e3),a={iat:i-60,exp:i+600,iss:e},o=e=>Buffer.from(JSON.stringify(e)).toString(`base64url`),s=o(r),c=o(a),l=n.createSign(`RSA-SHA256`);l.update(`${s}.${c}`);let u=t.replace(/\\n/g,`
6
+ import{t as e}from"./chunk-BFSpntXv.mjs";import*as t from"zod";import n from"node:crypto";function r(e,t){let r={alg:`RS256`,typ:`JWT`},i=Math.floor(Date.now()/1e3),a={iat:i-60,exp:i+600,iss:e},o=e=>Buffer.from(JSON.stringify(e)).toString(`base64url`),s=o(r),c=o(a),l=n.createSign(`RSA-SHA256`);l.update(`${s}.${c}`);let u=t.replace(/\\n/g,`
7
7
  `);return`${s}.${c}.${l.sign(u,`base64`)}`}async function i(e,t,n){let i=r(e,t),a=await fetch(`https://api.github.com/app/installations/${n}/access_tokens`,{method:`POST`,headers:{Authorization:`Bearer ${i}`,Accept:`application/vnd.github+json`,"User-Agent":`Boltdocs-Feedback`}});if(!a.ok){let e=await a.text();throw Error(`Failed to get installation access token: ${a.status} ${e}`)}return(await a.json()).token}async function a(e,t,n={}){let r=await fetch(`https://api.github.com/graphql`,{method:`POST`,headers:{Authorization:`bearer ${e}`,"Content-Type":`application/json`,"User-Agent":`Boltdocs-Feedback`},body:JSON.stringify({query:t,variables:n})});if(!r.ok){let e=await r.text();throw Error(`GitHub GraphQL API error: ${r.status} ${e}`)}let i=await r.json();if(i.errors?.length){let e=i.errors.map(e=>e.message).join(`, `);throw Error(`GitHub GraphQL Error: ${e}`)}return i.data}async function o(e,t){let n=t.token;if(!n)if(t.appId&&t.privateKey&&t.installationId)n=await i(t.appId,t.privateKey,t.installationId);else throw Error(`GitHub authentication credentials missing. Provide GITHUB_TOKEN or GITHUB_APP_* variables.`);let{owner:r,repo:o,categorySlug:s=`general`}=t,{rating:c,comment:l,path:u,title:d,blockId:f}=e,p=await a(n,`query GetRepoAndCategory($owner: String!, $name: String!, $categorySlug: String!) {
8
8
  repository(owner: $owner, name: $name) {
9
9
  id