boltdocs 3.3.5 → 3.4.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 (126) hide show
  1. package/dist/{adapters-BKzKe2mO.mjs → adapters-BXiBWAKs.mjs} +1 -1
  2. package/dist/{adapters-DwDTQoCG.cjs → adapters-Czl3WtQt.cjs} +1 -1
  3. package/dist/{build-B672n0hL.cjs → build-CNkXRdk8.cjs} +1 -1
  4. package/dist/{build-BVoMHMhw.mjs → build-CqUBsXVC.mjs} +1 -1
  5. package/dist/client/index.cjs +245 -56
  6. package/dist/client/index.d.cts +3 -3
  7. package/dist/client/index.d.ts +3 -3
  8. package/dist/client/index.js +246 -60
  9. package/dist/client/mdx.cjs +1 -1
  10. package/dist/client/mdx.js +1 -1
  11. package/dist/client/primitives.cjs +5 -5
  12. package/dist/client/primitives.d.cts +92 -42
  13. package/dist/client/primitives.d.ts +101 -51
  14. package/dist/client/primitives.js +4 -4
  15. package/dist/client/router.cjs +1 -1
  16. package/dist/client/router.d.cts +1 -1
  17. package/dist/client/router.d.ts +1 -1
  18. package/dist/client/router.js +1 -1
  19. package/dist/client/theme/reset.css +41 -0
  20. package/dist/config-B3SEoVjG.cjs +7 -0
  21. package/dist/{config-PLvresCv.cjs → config-Bfakeadu.cjs} +1 -1
  22. package/dist/config-CTcfF-0c.mjs +7 -0
  23. package/dist/dev-D1DmOSjn.mjs +6 -0
  24. package/dist/dev-DH6cSge8.cjs +6 -0
  25. package/dist/{docs-layout-CbZ7LDRe.js → docs-layout-CmntYM6p.js} +46 -147
  26. package/dist/{docs-layout-vzfXed1Q.cjs → docs-layout-DIgxJ5c7.cjs} +23 -130
  27. package/dist/{doctor-DMECtdK6.cjs → doctor-BLxm2alc.cjs} +1 -1
  28. package/dist/{doctor-FuFY1jBz.cjs → doctor-Dd-JMTRo.cjs} +1 -1
  29. package/dist/{doctor-i8Qmd8DJ.mjs → doctor-DogHujrP.mjs} +1 -1
  30. package/dist/{image-Hnaa2bJd.cjs → image-Bke2ojW1.cjs} +3 -3
  31. package/dist/{image-B-NDSDuY.js → image-CaY2w0ua.js} +2 -1
  32. package/dist/index--xbYbT8N.d.ts +343 -0
  33. package/dist/{index-Bg-JtZeK.d.cts → index-B_o5y34l.d.cts} +112 -13
  34. package/dist/{index-B3o307nd.d.ts → index-Bx0CUd7Q.d.ts} +112 -13
  35. package/dist/index-RK7W_Fxy.d.cts +343 -0
  36. package/dist/{link-CgdI6O2o.js → link-CSe_oD8Y.js} +137 -139
  37. package/dist/{link-vZjmD-es.cjs → link-Xb69Oy2F.cjs} +144 -169
  38. package/dist/{mdx-D0Absdq5.cjs → mdx-BCOrMd-P.cjs} +68 -16
  39. package/dist/{mdx-BRT71V5Q.js → mdx-BijiEbkp.js} +62 -15
  40. package/dist/{native-nLA4Jr0T.cjs → native-BbtRkce5.cjs} +1 -1
  41. package/dist/node/cli-entry.cjs +1 -1
  42. package/dist/node/cli-entry.mjs +1 -1
  43. package/dist/node/highlight.d.cts +2 -2
  44. package/dist/node/highlight.d.mts +2 -2
  45. package/dist/node/index.cjs +1 -1
  46. package/dist/node/index.d.cts +19 -37
  47. package/dist/node/index.d.mts +20 -38
  48. package/dist/node/index.mjs +1 -1
  49. package/dist/node/mdx/shiki-adapter.cjs +1 -1
  50. package/dist/node/mdx/shiki-adapter.d.cts +7 -2
  51. package/dist/node/mdx/shiki-adapter.d.mts +7 -2
  52. package/dist/node/mdx/shiki-adapter.mjs +1 -1
  53. package/dist/node-BgiLCa0I.cjs +39 -0
  54. package/dist/node-Da3tYBHo.mjs +39 -0
  55. package/dist/{package-CNqjEYE1.cjs → package-D1gVs5gQ.cjs} +1 -1
  56. package/dist/{package-sdcKhDhe.mjs → package-YgQJn3Yh.mjs} +1 -1
  57. package/dist/pages-external-B_r6gvqP.cjs +6 -0
  58. package/dist/pages-external-jmK7AHaO.mjs +6 -0
  59. package/dist/{parser-CD8Oo8qh.mjs → parser-CvNZc5s3.mjs} +1 -1
  60. package/dist/{parser-vPaKvzLp.cjs → parser-DJLWTiO-.cjs} +1 -1
  61. package/dist/plugin-DW9K2fW5.mjs +69 -0
  62. package/dist/plugin-NwGKyTJX.cjs +69 -0
  63. package/dist/{plugin-context-DuSg-Hax.mjs → plugin-context-COh-cbsW.mjs} +1 -1
  64. package/dist/{plugin-context-CscLcXjH.cjs → plugin-context-FIHaWn6r.cjs} +2 -2
  65. package/dist/{plugin-lifecycle-BywrEoWK.cjs → plugin-lifecycle-D9fTRaWY.cjs} +1 -1
  66. package/dist/{registry-BbB6NqSv.d.cts → registry-BFmzj1yg.d.mts} +1 -1
  67. package/dist/{registry-sJqDv0kE.d.mts → registry-BoswPzYV.d.cts} +1 -1
  68. package/dist/{resolve-C5rT6B21.mjs → resolve-5puUe7eS.mjs} +1 -1
  69. package/dist/{resolve-BelytNYR.cjs → resolve-CF4ZLfqx.cjs} +1 -1
  70. package/dist/route-paths-B6ocUfNY.cjs +6 -0
  71. package/dist/route-paths-DyDji4bX.mjs +6 -0
  72. package/dist/{router-CZBxMRAH.js → router-B5e8k4qK.js} +175 -10
  73. package/dist/{router-C3kygdRK.cjs → router-DKC0Lu0n.cjs} +204 -9
  74. package/dist/{routes-C3_w9fLX.cjs → routes-D55M8UrH.cjs} +1 -1
  75. package/dist/routes-DdE6Lfcl.cjs +6 -0
  76. package/dist/routes-_I_8PQYF.mjs +6 -0
  77. package/dist/{search-dialog-x_qHU8ty.cjs → search-dialog-BOQRHKTb.cjs} +197 -24
  78. package/dist/{search-dialog-BqkzDTq2.js → search-dialog-BXil4_7P.js} +190 -29
  79. package/dist/search-dialog-CwlBd-Mu.cjs +747 -0
  80. package/dist/{search-dialog-B9mdxsUC.js → search-dialog-D3Obh3eA.js} +1 -1
  81. package/dist/search-dialog-DeplpVEB.js +717 -0
  82. package/dist/{search-dialog-DCtm2dyR.cjs → search-dialog-cHXR5zhL.cjs} +1 -1
  83. package/dist/server/index.cjs +1 -1
  84. package/dist/server/index.d.mts +1 -1
  85. package/dist/server/index.mjs +1 -1
  86. package/dist/ssg-static-options-Br1_u9qp.mjs +6 -0
  87. package/dist/ssg-static-options-CVvGKM8i.cjs +6 -0
  88. package/dist/types-58Ac3UGI.d.cts +114 -0
  89. package/dist/types-BwnGf-1E.d.mts +114 -0
  90. package/dist/virtual-modules-C4-qxFlL.cjs +40 -0
  91. package/dist/virtual-modules-DiWUKJGP.mjs +40 -0
  92. package/package.json +8 -5
  93. package/src/shared/types.ts +133 -987
  94. package/dist/config-CrsQJHQz.cjs +0 -7
  95. package/dist/config-DC0nMMk7.mjs +0 -7
  96. package/dist/dev-B49V6O6p.mjs +0 -6
  97. package/dist/dev-DbuhNcF5.cjs +0 -6
  98. package/dist/index-CgWkOCCn.d.cts +0 -1193
  99. package/dist/index-CuNSD3E2.d.ts +0 -1193
  100. package/dist/node-BljvHMpS.cjs +0 -23
  101. package/dist/node-CWxGw4H4.mjs +0 -23
  102. package/dist/pages-external-BBw8ObVK.mjs +0 -6
  103. package/dist/pages-external-DPiPFxxP.cjs +0 -6
  104. package/dist/plugin-BPcm1cU0.mjs +0 -69
  105. package/dist/plugin-WUhxnpko.cjs +0 -69
  106. package/dist/routes-C0kb4ue6.cjs +0 -6
  107. package/dist/routes-C4wrLWwu.mjs +0 -6
  108. package/dist/search-dialog-Bp_ouN1c.cjs +0 -550
  109. package/dist/search-dialog-an2BNMj6.js +0 -526
  110. package/dist/types-Db6zToZH.d.mts +0 -975
  111. package/dist/types-o7iZ2BAR.d.cts +0 -975
  112. package/dist/virtual-modules-B2X4Ht2r.mjs +0 -39
  113. package/dist/virtual-modules-DPsdHKcu.cjs +0 -39
  114. /package/dist/{audit-CMc_ydRr.mjs → audit-CYAkXXvP.mjs} +0 -0
  115. /package/dist/{audit-CHkGiV3c.cjs → audit-DxCZZTuX.cjs} +0 -0
  116. /package/dist/{csp-BiGAG8aF.cjs → csp-B-gc2Iha.cjs} +0 -0
  117. /package/dist/{csp-D0BOH8ae.mjs → csp-f8DOcI_7.mjs} +0 -0
  118. /package/dist/{generator-BCrZL53x.cjs → generator-CBAPKY6r.cjs} +0 -0
  119. /package/dist/{generator-CFukoGa0.mjs → generator-MRpn-yp6.mjs} +0 -0
  120. /package/dist/{handler-Lex5DbvG.mjs → handler-DBZqoWt2.mjs} +0 -0
  121. /package/dist/{handler-Ch-Q9NAB.cjs → handler-ryZR9Q41.cjs} +0 -0
  122. /package/dist/{index-HAwIo4nZ.d.mts → index-CPr34I2C.d.mts} +0 -0
  123. /package/dist/{native-BYKMke79.mjs → native-DZ6WMwjG.mjs} +0 -0
  124. /package/dist/{native-BOet8hpE.cjs → native-DeKxny_T.cjs} +0 -0
  125. /package/dist/{update-check-BXD1atVv.mjs → update-check-BXx8te9F.mjs} +0 -0
  126. /package/dist/{update-check-DFQZyoSU.cjs → update-check-CiIeC7CX.cjs} +0 -0
@@ -3,12 +3,12 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- import { G as useOptionalConfig, H as icons_exports, W as useConfig, d as resolvePublicAssetUrl, h as Check, l as useRoutesContext, o as cn, s as useLocalizedTo, t as Link, u as normalizePath, v as ChevronRight } from "./link-CgdI6O2o.js";
7
- import { E as useLocation, L as defaultNavigate, O as useNavigate, m as parseUrlReference } from "./router-CZBxMRAH.js";
6
+ import { V as icons_exports, _ as ChevronRight, a as useLocalizedTo, c as useRoutesContext, i as cn, l as normalizePath, m as Check, t as Link, u as resolvePublicAssetUrl } from "./link-CSe_oD8Y.js";
7
+ import { E as useLocation, H as useOptionalConfig, L as defaultNavigate, O as useNavigate, V as useConfig, m as parseUrlReference } from "./router-B5e8k4qK.js";
8
+ import { r as useSearchHighlight } from "./search-dialog-BXil4_7P.js";
8
9
  import { Children, Fragment, createContext, use, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
9
10
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
- import * as RAC from "react-aria-components";
11
- import { Breadcrumb, Breadcrumbs, Popover } from "react-aria-components";
11
+ import { Breadcrumb, Breadcrumbs, Collection, Dialog, Header, Menu, MenuItem, MenuSection, MenuTrigger, Modal, ModalOverlay, Popover, Separator, SubmenuTrigger, composeRenderProps } from "react-aria-components";
12
12
  import DOMPurify from "isomorphic-dompurify";
13
13
  import virtualIcons from "virtual:boltdocs-icons";
14
14
  import scrollIntoView from "scroll-into-view-if-needed";
@@ -155,9 +155,9 @@ function Popover$1({ children, className, ...props }) {
155
155
 
156
156
  //#endregion
157
157
  //#region src/client/components/primitives/menu.tsx
158
- function MenuTrigger({ placement, className, ...props }) {
158
+ function MenuTrigger$1({ placement, className, ...props }) {
159
159
  const [trigger, menu] = Children.toArray(props.children).slice(0, 2);
160
- return /* @__PURE__ */ jsxs(RAC.MenuTrigger, {
160
+ return /* @__PURE__ */ jsxs(MenuTrigger, {
161
161
  ...props,
162
162
  children: [trigger, /* @__PURE__ */ jsx(Popover$1, {
163
163
  placement,
@@ -166,9 +166,9 @@ function MenuTrigger({ placement, className, ...props }) {
166
166
  })]
167
167
  });
168
168
  }
169
- function SubmenuTrigger({ className, ...props }) {
169
+ function SubmenuTrigger$1({ className, ...props }) {
170
170
  const [trigger, menu] = Children.toArray(props.children).slice(0, 2);
171
- return /* @__PURE__ */ jsxs(RAC.SubmenuTrigger, {
171
+ return /* @__PURE__ */ jsxs(SubmenuTrigger, {
172
172
  ...props,
173
173
  children: [trigger, /* @__PURE__ */ jsx(Popover$1, {
174
174
  offset: -4,
@@ -181,23 +181,23 @@ function SubmenuTrigger({ className, ...props }) {
181
181
  /**
182
182
  * The Menu container.
183
183
  */
184
- function Menu(props) {
185
- return /* @__PURE__ */ jsx(RAC.Menu, {
184
+ function Menu$1(props) {
185
+ return /* @__PURE__ */ jsx(Menu, {
186
186
  ...props,
187
- className: RAC.composeRenderProps(props.className, (className) => cn("outline-none overflow-auto", className))
187
+ className: composeRenderProps(props.className, (className) => cn("outline-none overflow-auto", className))
188
188
  });
189
189
  }
190
190
  /**
191
191
  * MenuItem with support for selection states and submenus.
192
192
  */
193
- function MenuItem(props) {
193
+ function MenuItem$1(props) {
194
194
  const textValue = props.textValue || (typeof props.children === "string" ? props.children : void 0);
195
195
  const { contentClassName, checkClassName, chevronClassName, check, chevron, ...racProps } = props;
196
- return /* @__PURE__ */ jsx(RAC.MenuItem, {
196
+ return /* @__PURE__ */ jsx(MenuItem, {
197
197
  ...racProps,
198
198
  textValue,
199
- className: RAC.composeRenderProps(props.className, (className) => cn("group relative flex flex-row items-center cursor-default outline-none", className)),
200
- children: RAC.composeRenderProps(props.children, (children, { selectionMode, isSelected, hasSubmenu }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
199
+ className: composeRenderProps(props.className, (className) => cn("group relative flex flex-row items-center cursor-default outline-none", className)),
200
+ children: composeRenderProps(props.children, (children, { selectionMode, isSelected, hasSubmenu }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
201
201
  selectionMode === "multiple" && /* @__PURE__ */ jsx("span", {
202
202
  className: cn("flex items-center shrink-0 justify-center", checkClassName),
203
203
  children: check ?? (isSelected ? /* @__PURE__ */ jsx(Check, { className: "size-3.5" }) : null)
@@ -213,14 +213,14 @@ function MenuItem(props) {
213
213
  ] }))
214
214
  });
215
215
  }
216
- function MenuSection({ title, headerClassName, ...props }) {
217
- return /* @__PURE__ */ jsxs(RAC.MenuSection, {
216
+ function MenuSection$1({ title, headerClassName, ...props }) {
217
+ return /* @__PURE__ */ jsxs(MenuSection, {
218
218
  ...props,
219
219
  className: cn("flex flex-col", props.className),
220
- children: [title && /* @__PURE__ */ jsx(RAC.Header, {
220
+ children: [title && /* @__PURE__ */ jsx(Header, {
221
221
  className: cn("select-none", headerClassName),
222
222
  children: title
223
- }), /* @__PURE__ */ jsx(RAC.Collection, {
223
+ }), /* @__PURE__ */ jsx(Collection, {
224
224
  items: props.items,
225
225
  children: props.children
226
226
  })]
@@ -230,17 +230,17 @@ function MenuSection({ title, headerClassName, ...props }) {
230
230
  * MenuSeparator for visual division.
231
231
  */
232
232
  function MenuSeparator(props) {
233
- return /* @__PURE__ */ jsx(RAC.Separator, {
233
+ return /* @__PURE__ */ jsx(Separator, {
234
234
  ...props,
235
235
  className: cn("border-t", props.className)
236
236
  });
237
237
  }
238
- Menu.Root = Menu;
239
- Menu.Item = MenuItem;
240
- Menu.Trigger = MenuTrigger;
241
- Menu.SubTrigger = SubmenuTrigger;
242
- Menu.Section = MenuSection;
243
- Menu.Separator = MenuSeparator;
238
+ Menu$1.Root = Menu$1;
239
+ Menu$1.Item = MenuItem$1;
240
+ Menu$1.Trigger = MenuTrigger$1;
241
+ Menu$1.SubTrigger = SubmenuTrigger$1;
242
+ Menu$1.Section = MenuSection$1;
243
+ Menu$1.Separator = MenuSeparator;
244
244
 
245
245
  //#endregion
246
246
  //#region src/client/components/primitives/tabs.tsx
@@ -251,9 +251,9 @@ function Tabs({ children, className = "", ...props }) {
251
251
  children
252
252
  });
253
253
  }
254
- function TabsList({ children, className = "" }) {
254
+ function TabsList({ children, className, role }) {
255
255
  return /* @__PURE__ */ jsx("div", {
256
- role: "tablist",
256
+ role: role === null ? void 0 : role ?? "tablist",
257
257
  className: cn("relative flex flex-row items-center overflow-x-auto", className),
258
258
  children
259
259
  });
@@ -569,112 +569,6 @@ function useSidebar(routes) {
569
569
  };
570
570
  }
571
571
 
572
- //#endregion
573
- //#region src/client/hooks/use-search-highlight.ts
574
- /**
575
- * Hook to highlight search terms based on the 'hl' query parameter.
576
- */
577
- function useSearchHighlight(containerSelector = ".boltdocs-page") {
578
- const { search } = useLocation();
579
- const query = new URLSearchParams(search).get("hl");
580
- useEffect(() => {
581
- if (!query) {
582
- clearHighlights(containerSelector);
583
- return;
584
- }
585
- const container = document.querySelector(containerSelector);
586
- if (!container) return;
587
- let rafId;
588
- const observer = new MutationObserver((mutations) => {
589
- if (mutations.some((m) => {
590
- const addedNodes = Array.from(m.addedNodes);
591
- const removedNodes = Array.from(m.removedNodes);
592
- return addedNodes.some((n) => !(n instanceof HTMLElement && n.hasAttribute("data-search-highlight"))) || removedNodes.some((n) => !(n instanceof HTMLElement && n.hasAttribute("data-search-highlight")));
593
- })) run();
594
- });
595
- function run() {
596
- cancelAnimationFrame(rafId);
597
- rafId = requestAnimationFrame(() => {
598
- observer.disconnect();
599
- clearHighlights(containerSelector);
600
- const terms = query.split(/\s+/).map((t) => t.trim()).filter((t) => t.length >= 2);
601
- if (terms.length > 0) highlightTerms(container, terms);
602
- observer.observe(container, {
603
- childList: true,
604
- subtree: true
605
- });
606
- });
607
- }
608
- run();
609
- return () => {
610
- cancelAnimationFrame(rafId);
611
- observer.disconnect();
612
- clearHighlights(containerSelector);
613
- };
614
- }, [query, containerSelector]);
615
- }
616
- function clearHighlights(selector) {
617
- document.querySelectorAll(`${selector} mark[data-search-highlight]`).forEach((mark) => {
618
- try {
619
- const parent = mark.parentNode;
620
- if (parent && parent.contains(mark)) {
621
- const text = mark.textContent || "";
622
- parent.replaceChild(document.createTextNode(text), mark);
623
- }
624
- } catch (e) {}
625
- });
626
- }
627
- function highlightTerms(container, terms) {
628
- const walker = document.createTreeWalker(container, NodeFilter.SHOW_TEXT, { acceptNode: (node) => {
629
- const parent = node.parentElement;
630
- if (parent && (parent.tagName === "SCRIPT" || parent.tagName === "STYLE" || parent.tagName === "MARK" || parent.closest("pre") || parent.closest("code"))) return NodeFilter.FILTER_REJECT;
631
- return NodeFilter.FILTER_ACCEPT;
632
- } });
633
- const nodes = [];
634
- let node = walker.nextNode();
635
- while (node) {
636
- nodes.push(node);
637
- node = walker.nextNode();
638
- }
639
- const accentMap = {
640
- a: "[aáàäâã]",
641
- e: "[eéèëê]",
642
- i: "[iíìïî]",
643
- o: "[oóòöôõ]",
644
- u: "[uúùüû]",
645
- n: "[nñ]",
646
- c: "[cç]"
647
- };
648
- const prepareRegex = (term) => {
649
- let pattern = term.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
650
- pattern = pattern.split("").map((char) => {
651
- return accentMap[char.toLowerCase()] || char;
652
- }).join("");
653
- return pattern;
654
- };
655
- const combinedPattern = terms.map(prepareRegex).join("|");
656
- const regex = new RegExp(`(${combinedPattern})`, "gi");
657
- const matchRegexes = terms.map((term) => {
658
- const p = prepareRegex(term);
659
- return new RegExp(`^${p}$`, "i");
660
- });
661
- nodes.forEach((textNode) => {
662
- const text = textNode.textContent;
663
- if (text && regex.test(text)) {
664
- const fragment = document.createDocumentFragment();
665
- text.split(regex).forEach((part) => {
666
- if (matchRegexes.some((rx) => rx.test(part))) {
667
- const mark = document.createElement("mark");
668
- mark.textContent = part;
669
- mark.setAttribute("data-search-highlight", "true");
670
- fragment.appendChild(mark);
671
- } else if (part) fragment.appendChild(document.createTextNode(part));
672
- });
673
- if (textNode.parentNode) textNode.parentNode.replaceChild(fragment, textNode);
674
- }
675
- });
676
- }
677
-
678
572
  //#endregion
679
573
  //#region src/client/components/primitives/helpers/observer.ts
680
574
  function getItemId(url) {
@@ -838,9 +732,10 @@ function AnchorProvider({ toc, single = false, observerOptions, children }) {
838
732
  children
839
733
  });
840
734
  }
841
- function OnThisPage({ children, className }) {
735
+ function OnThisPage({ children, className, label = "On this page" }) {
842
736
  return /* @__PURE__ */ jsx("nav", {
843
737
  "data-otp-root": true,
738
+ "aria-label": label,
844
739
  className,
845
740
  children
846
741
  });
@@ -935,7 +830,7 @@ function OnThisPageIndicator({ style, className }) {
935
830
  const items = useItems();
936
831
  useEffect(() => {
937
832
  if (items.length === 0) return;
938
- const parent = containerRef.current?.parentElement;
833
+ const parent = containerRef.current?.offsetParent;
939
834
  if (!parent) return;
940
835
  const activeLinks = parent.querySelectorAll("a[data-active=\"true\"]");
941
836
  if (activeLinks.length > 0) {
@@ -960,6 +855,7 @@ function OnThisPageIndicator({ style, className }) {
960
855
  return /* @__PURE__ */ jsx("div", {
961
856
  ref: containerRef,
962
857
  "data-otp-indicator": true,
858
+ "aria-hidden": "true",
963
859
  className: cn("absolute", className),
964
860
  style: {
965
861
  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",
@@ -973,9 +869,9 @@ function OnThisPageIndicator({ style, className }) {
973
869
  function OnThisPageItems({ headings = [], className, itemClassName, linkClassName, indicatorClassName }) {
974
870
  const activeIds = useActiveAnchors();
975
871
  if (headings.length === 0) return null;
976
- return /* @__PURE__ */ jsxs(OnThisPageList, {
872
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(OnThisPageIndicator, { className: indicatorClassName }), /* @__PURE__ */ jsx(OnThisPageList, {
977
873
  className,
978
- children: [/* @__PURE__ */ jsx(OnThisPageIndicator, { className: indicatorClassName }), headings.map((h) => /* @__PURE__ */ jsx(OnThisPageItem, {
874
+ children: headings.map((h) => /* @__PURE__ */ jsx(OnThisPageItem, {
979
875
  level: h.level,
980
876
  className: itemClassName,
981
877
  children: /* @__PURE__ */ jsx(OnThisPageLink, {
@@ -984,8 +880,8 @@ function OnThisPageItems({ headings = [], className, itemClassName, linkClassNam
984
880
  className: linkClassName,
985
881
  children: h.text
986
882
  })
987
- }, h.id))]
988
- });
883
+ }, h.id))
884
+ })] });
989
885
  }
990
886
  /**
991
887
  * High-level automated Table of Contents tree
@@ -1032,6 +928,7 @@ OnThisPage.Tree = OnThisPageTree;
1032
928
  //#region src/client/components/primitives/page-nav.tsx
1033
929
  function PageNav({ children, className }) {
1034
930
  return /* @__PURE__ */ jsx("nav", {
931
+ "aria-label": "Pagination",
1035
932
  className: cn("grid sm:grid-cols-2 gap-4", className),
1036
933
  children
1037
934
  });
@@ -1102,14 +999,14 @@ function SidebarRoot({ children, className }) {
1102
999
  */
1103
1000
  function SidebarMobile({ children, className, overlayClassName, dialogClassName }) {
1104
1001
  const { isSidebarOpen, closeSidebar } = useUI();
1105
- return /* @__PURE__ */ jsx(RAC.ModalOverlay, {
1002
+ return /* @__PURE__ */ jsx(ModalOverlay, {
1106
1003
  isOpen: isSidebarOpen,
1107
1004
  onOpenChange: (open) => !open && closeSidebar(),
1108
1005
  isDismissable: true,
1109
1006
  className: cn("lg:hidden", overlayClassName),
1110
- children: /* @__PURE__ */ jsx(RAC.Modal, {
1007
+ children: /* @__PURE__ */ jsx(Modal, {
1111
1008
  className: cn("lg:hidden", className),
1112
- children: /* @__PURE__ */ jsx(RAC.Dialog, {
1009
+ children: /* @__PURE__ */ jsx(Dialog, {
1113
1010
  className: cn("h-full flex flex-col outline-none focus:outline-none", dialogClassName),
1114
1011
  children
1115
1012
  })
@@ -1131,7 +1028,7 @@ function SidebarHeader({ children, className }) {
1131
1028
  * The scroll container doubles as the semantic `<nav>` landmark. State and
1132
1029
  * scroll-position handling live here; all visuals belong to the theme.
1133
1030
  */
1134
- function SidebarContent({ children, className }) {
1031
+ function SidebarContent({ children, className, label = "Docs navigation" }) {
1135
1032
  const scrollRef = useRef(null);
1136
1033
  useLayoutEffect(() => {
1137
1034
  if (scrollRef.current) scrollRef.current.scrollTop = sidebarScrollPos;
@@ -1148,6 +1045,7 @@ function SidebarContent({ children, className }) {
1148
1045
  return /* @__PURE__ */ jsx("nav", {
1149
1046
  ref: scrollRef,
1150
1047
  "data-sidebar-content": true,
1048
+ "aria-label": label,
1151
1049
  className,
1152
1050
  children
1153
1051
  });
@@ -1206,6 +1104,7 @@ function SidebarLink({ label, href, active, icon: Icon, badge, className, iconCl
1206
1104
  return /* @__PURE__ */ jsxs(Link, {
1207
1105
  ref: linkRef,
1208
1106
  href,
1107
+ prefetch: "viewport",
1209
1108
  "data-active": active || void 0,
1210
1109
  "data-depth": depth !== void 0 ? depth : void 0,
1211
1110
  "aria-current": active ? "page" : void 0,
@@ -1439,7 +1338,7 @@ function ContentMdx({ children, className, style, contentClassName, contentStyle
1439
1338
  })]
1440
1339
  });
1441
1340
  }
1442
- function Header({ children, className, style }) {
1341
+ function Header$1({ children, className, style }) {
1443
1342
  return /* @__PURE__ */ jsx("header", {
1444
1343
  className: cn("mb-10", className),
1445
1344
  style,
@@ -1450,8 +1349,8 @@ const DocsLayout = Object.assign(DocsLayoutRoot, {
1450
1349
  Body,
1451
1350
  Content,
1452
1351
  ContentMdx,
1453
- Header
1352
+ Header: Header$1
1454
1353
  });
1455
1354
 
1456
1355
  //#endregion
1457
- export { UIProvider as A, IconRenderer as C, Popover$1 as D, Menu as E, ButtonGroup as O, useSidebar as S, Tabs as T, ScrollProvider as _, SidebarHeader as a, useItems as b, SidebarLink as c, SidebarSubGroup as d, PageNav as f, OnThisPageTree as g, OnThisPageItems as h, SidebarGroup as i, useUI as j, Breadcrumbs$1 as k, SidebarMobile as l, OnThisPage as m, Sidebar as n, SidebarItem as o, AnchorProvider as p, SidebarContent as r, SidebarItems as s, DocsLayout as t, SidebarRoot as u, useActiveAnchor as v, resolveIcon as w, useSearchHighlight as x, useActiveAnchors as y };
1356
+ export { useUI as A, resolveIcon as C, ButtonGroup as D, Popover$1 as E, Breadcrumbs$1 as O, IconRenderer as S, Menu$1 as T, ScrollProvider as _, SidebarHeader as a, useItems as b, SidebarLink as c, SidebarSubGroup as d, PageNav as f, OnThisPageTree as g, OnThisPageItems as h, SidebarGroup as i, UIProvider as k, SidebarMobile as l, OnThisPage as m, Sidebar as n, SidebarItem as o, AnchorProvider as p, SidebarContent as r, SidebarItems as s, DocsLayout as t, SidebarRoot as u, useActiveAnchor as v, Tabs as w, useSidebar as x, useActiveAnchors as y };
@@ -3,12 +3,12 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- const require_router = require('./router-C3kygdRK.cjs');
7
- const require_link = require('./link-vZjmD-es.cjs');
6
+ const require_router = require('./router-DKC0Lu0n.cjs');
7
+ const require_link = require('./link-Xb69Oy2F.cjs');
8
+ const require_search_dialog = require('./search-dialog-BOQRHKTb.cjs');
8
9
  let react = require("react");
9
10
  let react_jsx_runtime = require("react/jsx-runtime");
10
11
  let react_aria_components = require("react-aria-components");
11
- react_aria_components = require_router.__toESM(react_aria_components);
12
12
  let isomorphic_dompurify = require("isomorphic-dompurify");
13
13
  isomorphic_dompurify = require_router.__toESM(isomorphic_dompurify);
14
14
  let virtual_boltdocs_icons = require("virtual:boltdocs-icons");
@@ -187,7 +187,7 @@ function SubmenuTrigger({ className, ...props }) {
187
187
  function Menu(props) {
188
188
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Menu, {
189
189
  ...props,
190
- className: react_aria_components.composeRenderProps(props.className, (className) => require_link.cn("outline-none overflow-auto", className))
190
+ className: (0, react_aria_components.composeRenderProps)(props.className, (className) => require_link.cn("outline-none overflow-auto", className))
191
191
  });
192
192
  }
193
193
  /**
@@ -199,8 +199,8 @@ function MenuItem(props) {
199
199
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.MenuItem, {
200
200
  ...racProps,
201
201
  textValue,
202
- className: react_aria_components.composeRenderProps(props.className, (className) => require_link.cn("group relative flex flex-row items-center cursor-default outline-none", className)),
203
- children: react_aria_components.composeRenderProps(props.children, (children, { selectionMode, isSelected, hasSubmenu }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
202
+ className: (0, react_aria_components.composeRenderProps)(props.className, (className) => require_link.cn("group relative flex flex-row items-center cursor-default outline-none", className)),
203
+ children: (0, react_aria_components.composeRenderProps)(props.children, (children, { selectionMode, isSelected, hasSubmenu }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
204
204
  selectionMode === "multiple" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
205
205
  className: require_link.cn("flex items-center shrink-0 justify-center", checkClassName),
206
206
  children: check ?? (isSelected ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_link.Check, { className: "size-3.5" }) : null)
@@ -254,9 +254,9 @@ function Tabs({ children, className = "", ...props }) {
254
254
  children
255
255
  });
256
256
  }
257
- function TabsList({ children, className = "" }) {
257
+ function TabsList({ children, className, role }) {
258
258
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
259
- role: "tablist",
259
+ role: role === null ? void 0 : role ?? "tablist",
260
260
  className: require_link.cn("relative flex flex-row items-center overflow-x-auto", className),
261
261
  children
262
262
  });
@@ -320,7 +320,7 @@ function isImageSource(value) {
320
320
  return /^(?:https?:|data:image\/|\/|\.\.?(?:\/|$))/.test(value) || /\.(?:svg|png|jpe?g|gif|webp|avif)(?:\?.*)?$/i.test(value);
321
321
  }
322
322
  function IconRenderer({ icon, size = 16, className, label }) {
323
- const config = require_link.useOptionalConfig();
323
+ const config = require_router.useOptionalConfig();
324
324
  const resolved = resolveIcon(icon);
325
325
  if (!resolved) return null;
326
326
  if (typeof resolved === "function") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(resolved, {
@@ -455,7 +455,7 @@ const finalizeTree = (nodes) => {
455
455
  });
456
456
  };
457
457
  function useSidebar(routes) {
458
- const config = require_link.useConfig();
458
+ const config = require_router.useConfig();
459
459
  const { pathname } = require_router.useLocation();
460
460
  const { index } = require_link.useRoutesContext();
461
461
  const currentPath = require_link.normalizePath(pathname);
@@ -572,112 +572,6 @@ function useSidebar(routes) {
572
572
  };
573
573
  }
574
574
 
575
- //#endregion
576
- //#region src/client/hooks/use-search-highlight.ts
577
- /**
578
- * Hook to highlight search terms based on the 'hl' query parameter.
579
- */
580
- function useSearchHighlight(containerSelector = ".boltdocs-page") {
581
- const { search } = require_router.useLocation();
582
- const query = new URLSearchParams(search).get("hl");
583
- (0, react.useEffect)(() => {
584
- if (!query) {
585
- clearHighlights(containerSelector);
586
- return;
587
- }
588
- const container = document.querySelector(containerSelector);
589
- if (!container) return;
590
- let rafId;
591
- const observer = new MutationObserver((mutations) => {
592
- if (mutations.some((m) => {
593
- const addedNodes = Array.from(m.addedNodes);
594
- const removedNodes = Array.from(m.removedNodes);
595
- return addedNodes.some((n) => !(n instanceof HTMLElement && n.hasAttribute("data-search-highlight"))) || removedNodes.some((n) => !(n instanceof HTMLElement && n.hasAttribute("data-search-highlight")));
596
- })) run();
597
- });
598
- function run() {
599
- cancelAnimationFrame(rafId);
600
- rafId = requestAnimationFrame(() => {
601
- observer.disconnect();
602
- clearHighlights(containerSelector);
603
- const terms = query.split(/\s+/).map((t) => t.trim()).filter((t) => t.length >= 2);
604
- if (terms.length > 0) highlightTerms(container, terms);
605
- observer.observe(container, {
606
- childList: true,
607
- subtree: true
608
- });
609
- });
610
- }
611
- run();
612
- return () => {
613
- cancelAnimationFrame(rafId);
614
- observer.disconnect();
615
- clearHighlights(containerSelector);
616
- };
617
- }, [query, containerSelector]);
618
- }
619
- function clearHighlights(selector) {
620
- document.querySelectorAll(`${selector} mark[data-search-highlight]`).forEach((mark) => {
621
- try {
622
- const parent = mark.parentNode;
623
- if (parent && parent.contains(mark)) {
624
- const text = mark.textContent || "";
625
- parent.replaceChild(document.createTextNode(text), mark);
626
- }
627
- } catch (e) {}
628
- });
629
- }
630
- function highlightTerms(container, terms) {
631
- const walker = document.createTreeWalker(container, NodeFilter.SHOW_TEXT, { acceptNode: (node) => {
632
- const parent = node.parentElement;
633
- if (parent && (parent.tagName === "SCRIPT" || parent.tagName === "STYLE" || parent.tagName === "MARK" || parent.closest("pre") || parent.closest("code"))) return NodeFilter.FILTER_REJECT;
634
- return NodeFilter.FILTER_ACCEPT;
635
- } });
636
- const nodes = [];
637
- let node = walker.nextNode();
638
- while (node) {
639
- nodes.push(node);
640
- node = walker.nextNode();
641
- }
642
- const accentMap = {
643
- a: "[aáàäâã]",
644
- e: "[eéèëê]",
645
- i: "[iíìïî]",
646
- o: "[oóòöôõ]",
647
- u: "[uúùüû]",
648
- n: "[nñ]",
649
- c: "[cç]"
650
- };
651
- const prepareRegex = (term) => {
652
- let pattern = term.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
653
- pattern = pattern.split("").map((char) => {
654
- return accentMap[char.toLowerCase()] || char;
655
- }).join("");
656
- return pattern;
657
- };
658
- const combinedPattern = terms.map(prepareRegex).join("|");
659
- const regex = new RegExp(`(${combinedPattern})`, "gi");
660
- const matchRegexes = terms.map((term) => {
661
- const p = prepareRegex(term);
662
- return new RegExp(`^${p}$`, "i");
663
- });
664
- nodes.forEach((textNode) => {
665
- const text = textNode.textContent;
666
- if (text && regex.test(text)) {
667
- const fragment = document.createDocumentFragment();
668
- text.split(regex).forEach((part) => {
669
- if (matchRegexes.some((rx) => rx.test(part))) {
670
- const mark = document.createElement("mark");
671
- mark.textContent = part;
672
- mark.setAttribute("data-search-highlight", "true");
673
- fragment.appendChild(mark);
674
- } else if (part) fragment.appendChild(document.createTextNode(part));
675
- });
676
- if (textNode.parentNode) textNode.parentNode.replaceChild(fragment, textNode);
677
- }
678
- });
679
- }
680
-
681
575
  //#endregion
682
576
  //#region src/client/components/primitives/helpers/observer.ts
683
577
  function getItemId(url) {
@@ -841,9 +735,10 @@ function AnchorProvider({ toc, single = false, observerOptions, children }) {
841
735
  children
842
736
  });
843
737
  }
844
- function OnThisPage({ children, className }) {
738
+ function OnThisPage({ children, className, label = "On this page" }) {
845
739
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
846
740
  "data-otp-root": true,
741
+ "aria-label": label,
847
742
  className,
848
743
  children
849
744
  });
@@ -938,7 +833,7 @@ function OnThisPageIndicator({ style, className }) {
938
833
  const items = useItems();
939
834
  (0, react.useEffect)(() => {
940
835
  if (items.length === 0) return;
941
- const parent = containerRef.current?.parentElement;
836
+ const parent = containerRef.current?.offsetParent;
942
837
  if (!parent) return;
943
838
  const activeLinks = parent.querySelectorAll("a[data-active=\"true\"]");
944
839
  if (activeLinks.length > 0) {
@@ -963,6 +858,7 @@ function OnThisPageIndicator({ style, className }) {
963
858
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
964
859
  ref: containerRef,
965
860
  "data-otp-indicator": true,
861
+ "aria-hidden": "true",
966
862
  className: require_link.cn("absolute", className),
967
863
  style: {
968
864
  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",
@@ -976,9 +872,9 @@ function OnThisPageIndicator({ style, className }) {
976
872
  function OnThisPageItems({ headings = [], className, itemClassName, linkClassName, indicatorClassName }) {
977
873
  const activeIds = useActiveAnchors();
978
874
  if (headings.length === 0) return null;
979
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(OnThisPageList, {
875
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(OnThisPageIndicator, { className: indicatorClassName }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OnThisPageList, {
980
876
  className,
981
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(OnThisPageIndicator, { className: indicatorClassName }), headings.map((h) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OnThisPageItem, {
877
+ children: headings.map((h) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OnThisPageItem, {
982
878
  level: h.level,
983
879
  className: itemClassName,
984
880
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OnThisPageLink, {
@@ -987,8 +883,8 @@ function OnThisPageItems({ headings = [], className, itemClassName, linkClassNam
987
883
  className: linkClassName,
988
884
  children: h.text
989
885
  })
990
- }, h.id))]
991
- });
886
+ }, h.id))
887
+ })] });
992
888
  }
993
889
  /**
994
890
  * High-level automated Table of Contents tree
@@ -1035,6 +931,7 @@ OnThisPage.Tree = OnThisPageTree;
1035
931
  //#region src/client/components/primitives/page-nav.tsx
1036
932
  function PageNav({ children, className }) {
1037
933
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
934
+ "aria-label": "Pagination",
1038
935
  className: require_link.cn("grid sm:grid-cols-2 gap-4", className),
1039
936
  children
1040
937
  });
@@ -1134,7 +1031,7 @@ function SidebarHeader({ children, className }) {
1134
1031
  * The scroll container doubles as the semantic `<nav>` landmark. State and
1135
1032
  * scroll-position handling live here; all visuals belong to the theme.
1136
1033
  */
1137
- function SidebarContent({ children, className }) {
1034
+ function SidebarContent({ children, className, label = "Docs navigation" }) {
1138
1035
  const scrollRef = (0, react.useRef)(null);
1139
1036
  (0, react.useLayoutEffect)(() => {
1140
1037
  if (scrollRef.current) scrollRef.current.scrollTop = sidebarScrollPos;
@@ -1151,6 +1048,7 @@ function SidebarContent({ children, className }) {
1151
1048
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
1152
1049
  ref: scrollRef,
1153
1050
  "data-sidebar-content": true,
1051
+ "aria-label": label,
1154
1052
  className,
1155
1053
  children
1156
1054
  });
@@ -1209,6 +1107,7 @@ function SidebarLink({ label, href, active, icon: Icon, badge, className, iconCl
1209
1107
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_link.Link, {
1210
1108
  ref: linkRef,
1211
1109
  href,
1110
+ prefetch: "viewport",
1212
1111
  "data-active": active || void 0,
1213
1112
  "data-depth": depth !== void 0 ? depth : void 0,
1214
1113
  "aria-current": active ? "page" : void 0,
@@ -1400,7 +1299,7 @@ const Sidebar = Object.assign(SidebarRoot, {
1400
1299
  * It doesn't render anything visible.
1401
1300
  */
1402
1301
  function SearchHighlight() {
1403
- useSearchHighlight(".boltdocs-page");
1302
+ require_search_dialog.useSearchHighlight(".boltdocs-page");
1404
1303
  return null;
1405
1304
  }
1406
1305
 
@@ -1625,12 +1524,6 @@ Object.defineProperty(exports, 'useItems', {
1625
1524
  return useItems;
1626
1525
  }
1627
1526
  });
1628
- Object.defineProperty(exports, 'useSearchHighlight', {
1629
- enumerable: true,
1630
- get: function () {
1631
- return useSearchHighlight;
1632
- }
1633
- });
1634
1527
  Object.defineProperty(exports, 'useSidebar', {
1635
1528
  enumerable: true,
1636
1529
  get: function () {