boltdocs 3.3.6 → 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 (116) 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-CxT38vPv.cjs → build-CNkXRdk8.cjs} +1 -1
  4. package/dist/{build-BJnL-FHG.mjs → build-CqUBsXVC.mjs} +1 -1
  5. package/dist/client/index.cjs +223 -51
  6. package/dist/client/index.d.cts +3 -3
  7. package/dist/client/index.d.ts +3 -3
  8. package/dist/client/index.js +226 -56
  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 +53 -34
  13. package/dist/client/primitives.d.ts +62 -43
  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-BJp3lGzE.cjs → config-B3SEoVjG.cjs} +2 -2
  21. package/dist/{config-BC_qhXws.cjs → config-Bfakeadu.cjs} +1 -1
  22. package/dist/{config-B3_iVsbi.mjs → config-CTcfF-0c.mjs} +2 -2
  23. package/dist/dev-D1DmOSjn.mjs +6 -0
  24. package/dist/dev-DH6cSge8.cjs +6 -0
  25. package/dist/{docs-layout-D3Fmb0Wd.js → docs-layout-CmntYM6p.js} +33 -33
  26. package/dist/{docs-layout-SgphExoE.cjs → docs-layout-DIgxJ5c7.cjs} +9 -9
  27. package/dist/{doctor-BqxOFRt3.cjs → doctor-BLxm2alc.cjs} +1 -1
  28. package/dist/{doctor-TS3JGNEU.cjs → doctor-Dd-JMTRo.cjs} +1 -1
  29. package/dist/{doctor-Cv5lXnay.mjs → doctor-DogHujrP.mjs} +1 -1
  30. package/dist/{image-Bkx85rsq.cjs → image-Bke2ojW1.cjs} +3 -3
  31. package/dist/{image-BAiDReNd.js → image-CaY2w0ua.js} +2 -1
  32. package/dist/index--xbYbT8N.d.ts +343 -0
  33. package/dist/{index-B1Mx0dHl.d.ts → index-B_o5y34l.d.cts} +89 -10
  34. package/dist/{index-DLaHgD-i.d.cts → index-Bx0CUd7Q.d.ts} +89 -10
  35. package/dist/index-RK7W_Fxy.d.cts +343 -0
  36. package/dist/{link-q1qHNGK_.js → link-CSe_oD8Y.js} +86 -113
  37. package/dist/{link-hLWOsx0x.cjs → link-Xb69Oy2F.cjs} +87 -143
  38. package/dist/{mdx-Qi0DmaY8.cjs → mdx-BCOrMd-P.cjs} +68 -16
  39. package/dist/{mdx-CJGWzBGy.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 +18 -39
  47. package/dist/node/index.d.mts +19 -40
  48. package/dist/node/index.mjs +1 -1
  49. package/dist/node/mdx/shiki-adapter.d.cts +1 -1
  50. package/dist/node/mdx/shiki-adapter.d.mts +1 -1
  51. package/dist/node-BgiLCa0I.cjs +39 -0
  52. package/dist/node-Da3tYBHo.mjs +39 -0
  53. package/dist/{package-Bah2tHjK.cjs → package-D1gVs5gQ.cjs} +1 -1
  54. package/dist/{package-D6bf68FR.mjs → package-YgQJn3Yh.mjs} +1 -1
  55. package/dist/pages-external-B_r6gvqP.cjs +6 -0
  56. package/dist/pages-external-jmK7AHaO.mjs +6 -0
  57. package/dist/{parser-CD8Oo8qh.mjs → parser-CvNZc5s3.mjs} +1 -1
  58. package/dist/{parser-vPaKvzLp.cjs → parser-DJLWTiO-.cjs} +1 -1
  59. package/dist/plugin-DW9K2fW5.mjs +69 -0
  60. package/dist/plugin-NwGKyTJX.cjs +69 -0
  61. package/dist/{plugin-context-b5qVVQSU.mjs → plugin-context-COh-cbsW.mjs} +1 -1
  62. package/dist/{plugin-context-BZs5lvDu.cjs → plugin-context-FIHaWn6r.cjs} +1 -1
  63. package/dist/{plugin-lifecycle-s89gzTlh.cjs → plugin-lifecycle-D9fTRaWY.cjs} +1 -1
  64. package/dist/{registry-B8pt41zj.d.cts → registry-BFmzj1yg.d.mts} +1 -1
  65. package/dist/{registry-BrrH2X9c.d.mts → registry-BoswPzYV.d.cts} +1 -1
  66. package/dist/{resolve-C5rT6B21.mjs → resolve-5puUe7eS.mjs} +1 -1
  67. package/dist/{resolve-BelytNYR.cjs → resolve-CF4ZLfqx.cjs} +1 -1
  68. package/dist/route-paths-B6ocUfNY.cjs +6 -0
  69. package/dist/route-paths-DyDji4bX.mjs +6 -0
  70. package/dist/{router-CZBxMRAH.js → router-B5e8k4qK.js} +175 -10
  71. package/dist/{router-C3kygdRK.cjs → router-DKC0Lu0n.cjs} +204 -9
  72. package/dist/{routes-Dq_2EUIB.cjs → routes-D55M8UrH.cjs} +1 -1
  73. package/dist/{routes-CzhKOw67.cjs → routes-DdE6Lfcl.cjs} +1 -1
  74. package/dist/{routes-Dw6g0bfF.mjs → routes-_I_8PQYF.mjs} +1 -1
  75. package/dist/{search-dialog-CguKVtUu.cjs → search-dialog-BOQRHKTb.cjs} +53 -20
  76. package/dist/{search-dialog-mYnqU4v7.js → search-dialog-BXil4_7P.js} +57 -24
  77. package/dist/{search-dialog-BYZS9aeO.cjs → search-dialog-CwlBd-Mu.cjs} +5 -5
  78. package/dist/{search-dialog-DQwod5Xc.js → search-dialog-D3Obh3eA.js} +1 -1
  79. package/dist/{search-dialog-DzObE-Ar.js → search-dialog-DeplpVEB.js} +3 -3
  80. package/dist/{search-dialog-QgKRRbsI.cjs → search-dialog-cHXR5zhL.cjs} +1 -1
  81. package/dist/server/index.cjs +1 -1
  82. package/dist/server/index.d.mts +1 -1
  83. package/dist/server/index.mjs +1 -1
  84. package/dist/ssg-static-options-Br1_u9qp.mjs +6 -0
  85. package/dist/ssg-static-options-CVvGKM8i.cjs +6 -0
  86. package/dist/types-58Ac3UGI.d.cts +114 -0
  87. package/dist/types-BwnGf-1E.d.mts +114 -0
  88. package/dist/{virtual-modules-C3S3Nz8r.cjs → virtual-modules-C4-qxFlL.cjs} +1 -1
  89. package/dist/{virtual-modules-CaxqrFd6.mjs → virtual-modules-DiWUKJGP.mjs} +1 -1
  90. package/package.json +5 -3
  91. package/src/shared/types.ts +133 -987
  92. package/dist/dev-46NiL0MC.cjs +0 -6
  93. package/dist/dev-C4kjO5xs.mjs +0 -6
  94. package/dist/index-CgWkOCCn.d.cts +0 -1193
  95. package/dist/index-CuNSD3E2.d.ts +0 -1193
  96. package/dist/node-7Cfw6nMr.cjs +0 -23
  97. package/dist/node-CT2E84nY.mjs +0 -23
  98. package/dist/pages-external-BBw8ObVK.mjs +0 -6
  99. package/dist/pages-external-DPiPFxxP.cjs +0 -6
  100. package/dist/plugin-AgNI3ktz.cjs +0 -69
  101. package/dist/plugin-BAv_pYLt.mjs +0 -69
  102. package/dist/types-74i_xUe2.d.mts +0 -975
  103. package/dist/types-X_Pwk8Cg.d.cts +0 -975
  104. /package/dist/{audit-CMc_ydRr.mjs → audit-CYAkXXvP.mjs} +0 -0
  105. /package/dist/{audit-CHkGiV3c.cjs → audit-DxCZZTuX.cjs} +0 -0
  106. /package/dist/{csp-BiGAG8aF.cjs → csp-B-gc2Iha.cjs} +0 -0
  107. /package/dist/{csp-D0BOH8ae.mjs → csp-f8DOcI_7.mjs} +0 -0
  108. /package/dist/{generator-BCrZL53x.cjs → generator-CBAPKY6r.cjs} +0 -0
  109. /package/dist/{generator-CFukoGa0.mjs → generator-MRpn-yp6.mjs} +0 -0
  110. /package/dist/{handler-Lex5DbvG.mjs → handler-DBZqoWt2.mjs} +0 -0
  111. /package/dist/{handler-Ch-Q9NAB.cjs → handler-ryZR9Q41.cjs} +0 -0
  112. /package/dist/{index-HAwIo4nZ.d.mts → index-CPr34I2C.d.mts} +0 -0
  113. /package/dist/{native-BYKMke79.mjs → native-DZ6WMwjG.mjs} +0 -0
  114. /package/dist/{native-BOet8hpE.cjs → native-DeKxny_T.cjs} +0 -0
  115. /package/dist/{update-check-BXD1atVv.mjs → update-check-BXx8te9F.mjs} +0 -0
  116. /package/dist/{update-check-DFQZyoSU.cjs → update-check-CiIeC7CX.cjs} +0 -0
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- import{t as e}from"./chunk-BFSpntXv.mjs";import{d as t,o as n,t as r,u as i}from"./utils-8lzafE49.mjs";import{n as a}from"./pages-external-BBw8ObVK.mjs";import{FileCache as o}from"./node/cache.mjs";import{t as s}from"./cache-OY4HzIXl.mjs";import c from"node:path";import l from"node:fs";import u from"node:crypto";import{warn as d}from"@bdocs/dui";import f from"node:fs/promises";import{fdir as p}from"fdir";function m(e){return c.resolve(e)}function h(e,t){return u.createHash(`sha1`).update(`${m(e)}:${t}`).digest(`hex`).slice(0,16)}function g(e,t,r){let i=h(e,r),a=n();return{fingerprint:r,docCache:new o({name:`routes-${i}`,root:t}),parserCache:new s(t,i),cachedFileList:null,localizedPathCache:new Map,cachedNativeDocs:null,frontmatterHashes:new Map,directoryMeta:null,cachedDirectoryMetaFiles:null,directoryMetaEntries:new Map,discoverySnapshot:null,discoverySnapshotLoaded:!1,discoverySnapshotPath:c.resolve(t,a.dir,`route-discovery-${i}.json`)}}function _(e,t=c.dirname(c.resolve(e))){let n=m(e),r=c.resolve(t),i=g(n,r,`legacy`);return{docsDir:n,cacheRoot:r,docCache:i.docCache,parserCache:i.parserCache,cachedFileList:i.cachedFileList,localizedPathCache:i.localizedPathCache,cachedNativeDocs:i.cachedNativeDocs,frontmatterHashes:i.frontmatterHashes,directoryMeta:i.directoryMeta,cachedDirectoryMetaFiles:i.cachedDirectoryMetaFiles,variants:new Map([[`legacy`,i]]),activeVariant:i,activeGenerations:new Map,generationEpoch:0,disposed:!1}}const v=new Map;function y(e,t,n=!1){if(e.disposed)throw Error(`[boltdocs] Route cache context has been disposed.`);let r=e.variants.get(t);if(!r&&(r=g(e.docsDir,e.cacheRoot,t),e.variants.set(t,r),e.variants.size>8)){for(let[n,r]of e.variants)if(!(n===t||r===e.activeVariant)&&!e.activeGenerations.has(n)){e.variants.delete(n);break}}return n&&(e.activeVariant=r,e.docCache=r.docCache,e.parserCache=r.parserCache,e.cachedFileList=r.cachedFileList,e.localizedPathCache=r.localizedPathCache,e.cachedNativeDocs=r.cachedNativeDocs,e.frontmatterHashes=r.frontmatterHashes,e.directoryMeta=r.directoryMeta,e.cachedDirectoryMetaFiles=r.cachedDirectoryMetaFiles),r}function b(e,t){e.activeVariant===t&&(e.cachedFileList=t.cachedFileList,e.cachedNativeDocs=t.cachedNativeDocs,e.frontmatterHashes=t.frontmatterHashes,e.directoryMeta=t.directoryMeta,e.cachedDirectoryMetaFiles=t.cachedDirectoryMetaFiles)}function x(e,t){return u.createHash(`sha1`).update(JSON.stringify({basePath:t||e?.base||`/docs`,i18n:e?.i18n,versions:e?.versions,drafts:e?.drafts,featureFlags:e?.featureFlags,fileRouting:e?.experimental?.fileRouting,sidebarGroups:e?.theme?.sidebarGroups})).digest(`hex`)}function S(e,t){let n=m(e),r=v.get(n),i=t??r;(!i||r===i)&&v.delete(n),i&&(i.disposed=!0,i.generationEpoch++,i.activeGenerations.clear(),i.variants.clear(),i.activeVariant=null,i.cachedFileList=null,i.localizedPathCache.clear(),i.cachedNativeDocs=null,i.frontmatterHashes.clear(),i.directoryMeta=null,i.cachedDirectoryMetaFiles=null)}function C(e){let t=m(e),n=v.get(t);return n||(n=_(t),v.set(t,n)),n}const w=_(c.resolve(process.cwd(),`docs`)),T=w.docCache;function E(e){try{l.rmSync(e.discoverySnapshotPath,{force:!0})}catch{}}function D(e){let t=typeof e==`string`?C(e):e??w;for(let e of t.variants.values())e.cachedFileList=null,e.localizedPathCache.clear(),e.cachedNativeDocs=null,e.frontmatterHashes.clear(),e.directoryMeta=null,e.cachedDirectoryMetaFiles=null,e.discoverySnapshot=null,e.discoverySnapshotLoaded=!1,E(e),e.docCache.invalidateAll(),e.parserCache.clear();t.cachedFileList=null,t.localizedPathCache.clear(),t.cachedNativeDocs=null,t.frontmatterHashes.clear(),t.directoryMeta=null,t.cachedDirectoryMetaFiles=null,t.generationEpoch++}function O(e,t){let n=typeof t==`string`?C(t):t??w,r=c.resolve(e);for(let e of n.variants.values()){for(let t of e.directoryMetaEntries.keys())c.resolve(t)===r&&e.directoryMetaEntries.delete(t);e.directoryMeta=null,e.cachedDirectoryMetaFiles=null,e.discoverySnapshot=null,e.discoverySnapshotLoaded=!1,E(e)}n.directoryMeta=null,n.cachedDirectoryMetaFiles=null,n.generationEpoch++}function k(e,t){let n=typeof t==`string`?C(t):t??w;for(let t of n.variants.values())t.docCache.invalidate(e),t.parserCache.invalidate(e),t.cachedNativeDocs?.[e.replace(/\\/g,`/`)]&&delete t.cachedNativeDocs[e.replace(/\\/g,`/`)],t.frontmatterHashes.delete(e);n.cachedNativeDocs=n.activeVariant?.cachedNativeDocs??null,n.frontmatterHashes.delete(e),n.generationEpoch++}function A(e){return e.sort((e,t)=>{let n=e.group?e.groupPosition??999:e.sidebarPosition??999,r=t.group?t.groupPosition??999:t.sidebarPosition??999;return n===r?!e.group&&t.group?-1:e.group&&!t.group?1:e.group&&t.group&&e.group!==t.group?(e.groupTitle||e.group).localeCompare(t.groupTitle||t.group):j(e,t):n-r})}function j(e,t){if(e.sidebarPosition!==void 0&&t.sidebarPosition!==void 0){let n=e.sidebarPosition-t.sidebarPosition;if(n!==0)return n}else if(e.sidebarPosition!==void 0)return-1;else if(t.sidebarPosition!==void 0)return 1;let n=e.title.localeCompare(t.title);return n===0?e.path.localeCompare(t.path):n}const M=new Map;function N(e){let{lastUpdated:t,...n}=e;return u.createHash(`md5`).update(JSON.stringify(n)).digest(`hex`)}async function P(e){try{let{data:n}=await t(e);return N(n)}catch{return``}}function F(e,t,n){let r=n?.frontmatterHashes??t?.frontmatterHashes??M,i=r.get(e);if(i===void 0){let a=(n?.docCache??t?.docCache??T).getStale(e);a?.route?.frontmatter&&(i=N(a.route.frontmatter),r.set(e,i))}return i}function I(e,t,n,r){(r?.frontmatterHashes??n?.frontmatterHashes??M).set(e,t)}function L(e,t,n){(n?.frontmatterHashes??t?.frontmatterHashes??M).delete(e)}var R=e({generateRoutes:()=>J,getExternalRoutePaths:()=>a,invalidateDirectoryMetaFile:()=>G,invalidateFile:()=>K,invalidateRouteCache:()=>q});const z=Symbol(`route-generation-invalidated`);async function B(e,t,n){let r=[...t].sort((e,t)=>{if(c.dirname(e)===c.dirname(t)){let n=c.basename(e),r=c.basename(t);if(n===`_meta.json`&&r===`meta.json`)return-1;if(n===`meta.json`&&r===`_meta.json`)return 1}return e.localeCompare(t)}),i=new Set(r),a=n.directoryMetaEntries;for(let e of a.keys())i.has(e)||a.delete(e);await Promise.all(r.map(async e=>{let t;try{t=await f.stat(e)}catch(t){a.delete(e),d(`Failed to stat meta.json: ${t instanceof Error?t.message:String(t)}`);return}let n=a.get(e);if(!(n&&n.mtimeMs===t.mtimeMs&&n.size===t.size))try{let n=await f.readFile(e,`utf8`);a.set(e,{mtimeMs:t.mtimeMs,size:t.size,content:JSON.parse(n)})}catch(t){a.delete(e),d(`Failed to read meta.json: ${t instanceof Error?t.message:String(t)}`)}}));let o={};for(let t of r){let n=a.get(t);if(!n)continue;let r=c.relative(e,c.dirname(t)).replace(/\\/g,`/`);o[r||`.`]=n.content}return o}async function V(e,t){if(!t.discoverySnapshotPath||n().noCache)return null;if(t.discoverySnapshotLoaded)return t.discoverySnapshot;t.discoverySnapshotLoaded=!0;try{let n=await f.readFile(t.discoverySnapshotPath,`utf8`),r=JSON.parse(n),i=e=>Array.isArray(e)&&e.every(e=>typeof e==`string`),a=r.files,o=r.directoryMetaFiles,s=r.directories&&typeof r.directories==`object`?Object.entries(r.directories):[],l=c.resolve(e),u=await f.realpath(l),d=e=>{let t=c.resolve(e);return t===l||t.startsWith(`${l}${c.sep}`)},p=e=>/\.(?:md|mdx)$/i.test(e),m=e=>{let t=c.basename(e);return t===`meta.json`||t===`_meta.json`};if(r.version!==1||!i(a)||!i(o)||!r.directories||typeof r.directories!=`object`||Array.isArray(r.directories)||a.some(e=>!d(e)||!p(e))||o.some(e=>!d(e)||!m(e))||s.some(([e,t])=>!d(e)||typeof t!=`number`||!Number.isFinite(t)))return null;let h=e=>{let t=c.resolve(e);return t===u||t.startsWith(`${u}${c.sep}`)},g=await Promise.all([...a,...o].map(async e=>{try{return(await f.lstat(e)).isFile()?h(await f.realpath(e)):!1}catch{return!1}})),_=await Promise.all(s.map(async([e,t])=>{try{let n=await f.stat(e);return n.isDirectory()&&n.mtimeMs===t&&h(await f.realpath(e))}catch{return!1}}));if(g.every(Boolean)&&_.every(Boolean)){let e={version:1,files:a,directoryMetaFiles:o,directories:Object.fromEntries(s)};return t.discoverySnapshot=e,e}}catch{}return null}async function H(e,t){if(n().noCache){e.discoverySnapshot=null,e.discoverySnapshotLoaded=!1;return}e.discoverySnapshot=t,e.discoverySnapshotLoaded=!0;try{await f.mkdir(c.dirname(e.discoverySnapshotPath),{recursive:!0}),await f.writeFile(e.discoverySnapshotPath,JSON.stringify(t))}catch{}}async function U(e,t,n){if(!n){let n=await V(e,t);if(n)return n}let r=await new p({excludeSymlinks:!0}).withFullPaths().filter(t=>{let n=c.basename(t),r=n===`meta.json`||n===`_meta.json`;return!(t.endsWith(`.md`)||t.endsWith(`.mdx`))&&!r?!1:!c.relative(e,t).replace(/\\/g,`/`).split(`/`).some(e=>e.startsWith(`_`)&&e!==`_index.md`&&e!==`_index.mdx`&&e!==`_meta.json`)}).crawl(e).withPromise(),i=r.filter(e=>{let t=c.basename(e);return t===`meta.json`||t===`_meta.json`}).sort((e,t)=>e.localeCompare(t)),a=r.filter(e=>e.endsWith(`.md`)||e.endsWith(`.mdx`)),o=[/index\./i,/intro/i,/getting-started/i,/readme/i],s=a.map(e=>{let t=o.findIndex(t=>t.test(c.basename(e)));return{file:e,score:t===-1?2**53-1:t}});s.sort((e,t)=>e.score-t.score||e.file.localeCompare(t.file));let l=s.map(({file:e})=>e),u=[...l,...i],d=new Set([c.resolve(e)]);for(let t of u){let n=c.dirname(t);for(;n.startsWith(c.resolve(e))&&(d.add(n),n!==c.resolve(e));)n=c.dirname(n)}let m=await Promise.all([...d].sort().map(async e=>{try{return[e,(await f.stat(e)).mtimeMs]}catch{return null}})),h={version:1,files:l,directoryMetaFiles:i,directories:Object.fromEntries(m.filter(e=>e!==null))};return await H(t,h),h}async function W(e,t,n){let r=Array(e.length),i=0;async function a(){for(;i<e.length;){let t=i++;r[t]=await n(e[t])}}return await Promise.all(Array.from({length:Math.min(t,e.length)},()=>a())),r}function G(e,t){O(e,t)}function K(e,t){let n=typeof t==`string`?C(t):t;if(n){let t=e.replace(/\\/g,`/`);(c.basename(t)===`meta.json`||c.basename(t)===`_meta.json`)&&O(e,n),n.cachedNativeDocs?.[t]&&delete n.cachedNativeDocs[t],k(e,n);return}k(e)}function q(e){if(e){D(e);return}D()}async function J(e,t,a,o=!1,s,l){let u=s??C(e);if(u.disposed)throw Error(`[boltdocs] Route cache context has been disposed.`);let d=x(t,a);if(l&&l.fingerprint!==d)throw Error(`[boltdocs] Route cache variant does not match the requested route configuration fingerprint.`);if(l&&u.variants.get(d)!==l)throw Error(`[boltdocs] Route cache variant does not belong to the requested route cache context.`);let f=u.activeGenerations.get(d);if(f)return f;let p=l??y(u,d),m=u.generationEpoch,h=(async()=>{let s=a||t?.base||`/docs`;await p.docCache.load();let l,d=await U(e,p,o||n().noCache);l=d.files.filter(n=>t?.experimental?.fileRouting?!i(c.relative(e,n)).split(`/`).includes(`pages-external`):!0);let f=d.directoryMetaFiles;p.cachedFileList=l,p.cachedDirectoryMetaFiles=f,p.directoryMeta=await B(e,f,p),b(u,p),p.docCache.pruneStale(new Set(l));let h=process.env.NODE_ENV===`test`||process.env.VITEST===`true`,g,_=!0;for(let e of l)if(!p.docCache.get(e)){_=!1;break}if(_)g=l.map(e=>{let t=p.docCache.get(e);if(!t)throw Error(`[boltdocs] Route cache entry disappeared for ${e}`);return t});else{if(!h&&!p.cachedNativeDocs)try{let{runParser:t}=await import(`@bdocs/parser`);p.cachedNativeDocs=await t(e,!0)}catch{}if(!h&&p.cachedNativeDocs!==null&&p.cachedNativeDocs){let{parseDocFileWithNative:n}=await import(`./native-BYKMke79.mjs`).then(e=>e.t),r=l.filter(e=>!p.cachedNativeDocs?.[e.replace(/\\/g,`/`)]);if(r.length>0)try{let{runParserFiles:t}=await import(`@bdocs/parser`),n=await t(e,r,!0);p.cachedNativeDocs={...p.cachedNativeDocs,...n}}catch{}let i=l.some(e=>!p.cachedNativeDocs?.[e.replace(/\\/g,`/`)])?(await import(`./parser-CD8Oo8qh.mjs`)).parseDocFile:void 0;g=await W(l,32,async r=>{let a=p.docCache.get(r);if(a)return a;let o=r.replace(/\\/g,`/`),c=p.cachedNativeDocs[o];if(c){let i=await n(r,c,e,s,t,p.parserCache);return p.docCache.set(r,i),i}else{if(!i)throw Error(`[boltdocs] Native parser did not return a document for ${r}`);let n=await i(r,e,s,t,p.parserCache);return p.docCache.set(r,n),n}})}else{let{parseDocFile:n}=await import(`./parser-CD8Oo8qh.mjs`);g=await W(l,32,async r=>{let i=p.docCache.get(r);if(i)return i;let a=await n(r,e,s,t,p.parserCache);return p.docCache.set(r,a),a})}}if(u.generationEpoch!==m)throw z;for(let e of g)I(e.route.componentPath,N(e.route.frontmatter||{}),u,p);p.docCache.save();let v=[],y=new Map,x=process.env.NODE_ENV||`development`,S=t?.drafts?.visible||process.env.BOLTDOCS_DRAFTS===`true`||(t?.drafts?.environments?.includes(x)??!1);for(let e of g)if(!(e.route.draft&&!S)){if(e.route.featureFlags&&t?.featureFlags){if(!e.route.featureFlags.every(e=>{let n=t.featureFlags?.[e];return n===!0||n===x}))continue}else if(e.route.featureFlags&&!t?.featureFlags)continue;if(e.inferredCollection){let t=e.inferredCollection;y.has(t)||y.set(t,[]),y.get(t).push(e)}else v.push(e)}let C=new Map,w=[],T=t?.i18n?.defaultLocale||``;for(let e of v)if(e.isGroupIndex&&e.relativeDir&&w.push(e),e.relativeDir){let t=`${e.route.locale||T}:${e.relativeDir}`,n=C.get(t);n?n.position===void 0&&e.inferredGroupPosition!==void 0&&(n.position=e.inferredGroupPosition):(n={title:r(e.relativeDir),position:e.inferredGroupPosition},C.set(t,n))}for(let e of w){let t=`${e.route.locale||T}:${e.relativeDir}`,n=C.get(t);e.groupMeta&&(n.title=e.groupMeta.title,e.groupMeta.position!==void 0&&(n.position=e.groupMeta.position),e.groupMeta.icon&&(n.icon=e.groupMeta.icon))}if(t?.theme?.sidebarGroups){let e=t.i18n?Array.isArray(t.i18n.locales)?t.i18n.locales:Object.keys(t.i18n.locales):[T];for(let[n,i]of Object.entries(t.theme.sidebarGroups))for(let t of e){let e=`${t}:${n}`,a=C.get(e),o;typeof i.title==`string`?o=i.title:i.title&&(o=i.title[t]||i.title[T]),a?(o&&(a.title=o),i.icon&&(a.icon=i.icon)):C.set(e,{title:o||r(n),icon:i.icon})}}let E=Array(v.length);for(let e=0;e<v.length;e++){let t=v[e],n=t.relativeDir,i=t.route.locale||T,a=n?`${i}:${n}`:void 0,o=a?C.get(a):void 0,s;o&&(s=typeof o.title==`string`?o.title:o.title[i]||o.title[T]),E[e]={...t.route,group:n,groupTitle:s||(n?r(n):void 0),groupPosition:o?.position,groupIcon:o?.icon}}let D=[];for(let[,e]of y)for(let t of e)D.push({...t.route,collection:t.inferredCollection});D.sort((e,t)=>{let n=e=>{if(!e)return-1/0;let t=new Date(e).getTime();return Number.isFinite(t)?t:-1/0},r=n(e.date),i=n(t.date)-r;return i===0?e.path.localeCompare(t.path):i});let O=E;if(t?.i18n){let e=Y(E,t,s,p.localizedPathCache);O=[...E,...e]}let k=[...A(O),...D];if(u.generationEpoch!==m)throw z;return k})();u.activeGenerations.set(d,h);try{return await h}catch(n){if(n!==z)throw n;if(u.disposed)throw Error(`[boltdocs] Route cache context was disposed during generation.`);p.docCache.invalidateAll(),p.parserCache.clear(),u.activeGenerations.get(d)===h&&u.activeGenerations.delete(d);let r=0;for(;r<10;)try{return await J(e,t,a,o,u)}catch(e){if(e!==z)throw e;if(u.disposed)throw Error(`[boltdocs] Route cache context was disposed during generation.`);r++}throw Error(`[boltdocs] Route generation was repeatedly invalidated by concurrent file changes.`)}finally{u.activeGenerations.get(d)===h&&u.activeGenerations.delete(d)}}function Y(e,t,n,r){let i=t.i18n;if(!i)return[];let a=i.defaultLocale,o=Array.isArray(i.locales)?i.locales:Object.keys(i.locales),s=[],c=new Map,l=[];for(let t of e){let e=t.locale||a,n=c.get(e);n||(n=new Set,c.set(e,n)),n.add(t.path),e===a&&l.push(t)}for(let e of o){if(e===a)continue;let i=c.get(e)||new Set;for(let o of l){let c=X(o.path,a,e,n,t,r);c!==o.path&&(i.has(c)||s.push({...o,path:c,locale:e}))}}return s}function X(e,t,n,r,i,a){let o=`${e}:${n}`,s=a.get(o);if(s)return s;let c=r.startsWith(`/`)?r:`/`+r,l=c;if(i?.versions){let t=i.versions.prefix||``;for(let n of i.versions.versions){let r=`${c}/${t+n.path}`;if(e.startsWith(r)){l=r;break}let i=`${c}/${n.path}`;if(e.startsWith(i)){l=i;break}}}let u=e.substring(l.length),d=`/${t}`;if(u.startsWith(d+`/`))u=`/`+n+`/`+u.substring(d.length+1);else if(u===d)u=`/`+n;else if(u===`/`||u===``)u=`/`+n;else{let e=u.startsWith(`/`)?``:`/`;u=`/`+n+e+u}let f=l+u;return a.size>2e3&&a.clear(),a.set(o,f),f}export{P as a,I as c,C as d,y as f,R as i,S as l,O as m,K as n,F as o,x as p,q as r,L as s,J as t,T as u};
6
+ import{t as e}from"./chunk-BFSpntXv.mjs";import{d as t,o as n,t as r,u as i}from"./utils-8lzafE49.mjs";import{n as a}from"./pages-external-jmK7AHaO.mjs";import{FileCache as o}from"./node/cache.mjs";import{t as s}from"./cache-OY4HzIXl.mjs";import c from"node:path";import l from"node:fs";import u from"node:crypto";import{warn as d}from"@bdocs/dui";import f from"node:fs/promises";import{fdir as p}from"fdir";function m(e){return c.resolve(e)}function h(e,t){return u.createHash(`sha1`).update(`${m(e)}:${t}`).digest(`hex`).slice(0,16)}function g(e,t,r){let i=h(e,r),a=n();return{fingerprint:r,docCache:new o({name:`routes-${i}`,root:t}),parserCache:new s(t,i),cachedFileList:null,localizedPathCache:new Map,cachedNativeDocs:null,frontmatterHashes:new Map,directoryMeta:null,cachedDirectoryMetaFiles:null,directoryMetaEntries:new Map,discoverySnapshot:null,discoverySnapshotLoaded:!1,discoverySnapshotPath:c.resolve(t,a.dir,`route-discovery-${i}.json`)}}function _(e,t=c.dirname(c.resolve(e))){let n=m(e),r=c.resolve(t),i=g(n,r,`legacy`);return{docsDir:n,cacheRoot:r,docCache:i.docCache,parserCache:i.parserCache,cachedFileList:i.cachedFileList,localizedPathCache:i.localizedPathCache,cachedNativeDocs:i.cachedNativeDocs,frontmatterHashes:i.frontmatterHashes,directoryMeta:i.directoryMeta,cachedDirectoryMetaFiles:i.cachedDirectoryMetaFiles,variants:new Map([[`legacy`,i]]),activeVariant:i,activeGenerations:new Map,generationEpoch:0,disposed:!1}}const v=new Map;function y(e,t,n=!1){if(e.disposed)throw Error(`[boltdocs] Route cache context has been disposed.`);let r=e.variants.get(t);if(!r&&(r=g(e.docsDir,e.cacheRoot,t),e.variants.set(t,r),e.variants.size>8)){for(let[n,r]of e.variants)if(!(n===t||r===e.activeVariant)&&!e.activeGenerations.has(n)){e.variants.delete(n);break}}return n&&(e.activeVariant=r,e.docCache=r.docCache,e.parserCache=r.parserCache,e.cachedFileList=r.cachedFileList,e.localizedPathCache=r.localizedPathCache,e.cachedNativeDocs=r.cachedNativeDocs,e.frontmatterHashes=r.frontmatterHashes,e.directoryMeta=r.directoryMeta,e.cachedDirectoryMetaFiles=r.cachedDirectoryMetaFiles),r}function b(e,t){e.activeVariant===t&&(e.cachedFileList=t.cachedFileList,e.cachedNativeDocs=t.cachedNativeDocs,e.frontmatterHashes=t.frontmatterHashes,e.directoryMeta=t.directoryMeta,e.cachedDirectoryMetaFiles=t.cachedDirectoryMetaFiles)}function x(e,t){return u.createHash(`sha1`).update(JSON.stringify({basePath:t||e?.base||`/docs`,i18n:e?.i18n,versions:e?.versions,drafts:e?.drafts,featureFlags:e?.featureFlags,fileRouting:e?.experimental?.fileRouting,sidebarGroups:e?.theme?.sidebarGroups})).digest(`hex`)}function S(e,t){let n=m(e),r=v.get(n),i=t??r;(!i||r===i)&&v.delete(n),i&&(i.disposed=!0,i.generationEpoch++,i.activeGenerations.clear(),i.variants.clear(),i.activeVariant=null,i.cachedFileList=null,i.localizedPathCache.clear(),i.cachedNativeDocs=null,i.frontmatterHashes.clear(),i.directoryMeta=null,i.cachedDirectoryMetaFiles=null)}function C(e){let t=m(e),n=v.get(t);return n||(n=_(t),v.set(t,n)),n}const w=_(c.resolve(process.cwd(),`docs`)),T=w.docCache;function E(e){try{l.rmSync(e.discoverySnapshotPath,{force:!0})}catch{}}function D(e){let t=typeof e==`string`?C(e):e??w;for(let e of t.variants.values())e.cachedFileList=null,e.localizedPathCache.clear(),e.cachedNativeDocs=null,e.frontmatterHashes.clear(),e.directoryMeta=null,e.cachedDirectoryMetaFiles=null,e.discoverySnapshot=null,e.discoverySnapshotLoaded=!1,E(e),e.docCache.invalidateAll(),e.parserCache.clear();t.cachedFileList=null,t.localizedPathCache.clear(),t.cachedNativeDocs=null,t.frontmatterHashes.clear(),t.directoryMeta=null,t.cachedDirectoryMetaFiles=null,t.generationEpoch++}function O(e,t){let n=typeof t==`string`?C(t):t??w,r=c.resolve(e);for(let e of n.variants.values()){for(let t of e.directoryMetaEntries.keys())c.resolve(t)===r&&e.directoryMetaEntries.delete(t);e.directoryMeta=null,e.cachedDirectoryMetaFiles=null,e.discoverySnapshot=null,e.discoverySnapshotLoaded=!1,E(e)}n.directoryMeta=null,n.cachedDirectoryMetaFiles=null,n.generationEpoch++}function k(e,t){let n=typeof t==`string`?C(t):t??w;for(let t of n.variants.values())t.docCache.invalidate(e),t.parserCache.invalidate(e),t.cachedNativeDocs?.[e.replace(/\\/g,`/`)]&&delete t.cachedNativeDocs[e.replace(/\\/g,`/`)],t.frontmatterHashes.delete(e);n.cachedNativeDocs=n.activeVariant?.cachedNativeDocs??null,n.frontmatterHashes.delete(e),n.generationEpoch++}function A(e){return e.sort((e,t)=>{let n=e.group?e.groupPosition??999:e.sidebarPosition??999,r=t.group?t.groupPosition??999:t.sidebarPosition??999;return n===r?!e.group&&t.group?-1:e.group&&!t.group?1:e.group&&t.group&&e.group!==t.group?(e.groupTitle||e.group).localeCompare(t.groupTitle||t.group):j(e,t):n-r})}function j(e,t){if(e.sidebarPosition!==void 0&&t.sidebarPosition!==void 0){let n=e.sidebarPosition-t.sidebarPosition;if(n!==0)return n}else if(e.sidebarPosition!==void 0)return-1;else if(t.sidebarPosition!==void 0)return 1;let n=e.title.localeCompare(t.title);return n===0?e.path.localeCompare(t.path):n}const M=new Map;function N(e){let{lastUpdated:t,...n}=e;return u.createHash(`md5`).update(JSON.stringify(n)).digest(`hex`)}async function P(e){try{let{data:n}=await t(e);return N(n)}catch{return``}}function F(e,t,n){let r=n?.frontmatterHashes??t?.frontmatterHashes??M,i=r.get(e);if(i===void 0){let a=(n?.docCache??t?.docCache??T).getStale(e);a?.route?.frontmatter&&(i=N(a.route.frontmatter),r.set(e,i))}return i}function I(e,t,n,r){(r?.frontmatterHashes??n?.frontmatterHashes??M).set(e,t)}function L(e,t,n){(n?.frontmatterHashes??t?.frontmatterHashes??M).delete(e)}var R=e({generateRoutes:()=>J,getExternalRoutePaths:()=>a,invalidateDirectoryMetaFile:()=>G,invalidateFile:()=>K,invalidateRouteCache:()=>q});const z=Symbol(`route-generation-invalidated`);async function B(e,t,n){let r=[...t].sort((e,t)=>{if(c.dirname(e)===c.dirname(t)){let n=c.basename(e),r=c.basename(t);if(n===`_meta.json`&&r===`meta.json`)return-1;if(n===`meta.json`&&r===`_meta.json`)return 1}return e.localeCompare(t)}),i=new Set(r),a=n.directoryMetaEntries;for(let e of a.keys())i.has(e)||a.delete(e);await Promise.all(r.map(async e=>{let t;try{t=await f.stat(e)}catch(t){a.delete(e),d(`Failed to stat meta.json: ${t instanceof Error?t.message:String(t)}`);return}let n=a.get(e);if(!(n&&n.mtimeMs===t.mtimeMs&&n.size===t.size))try{let n=await f.readFile(e,`utf8`);a.set(e,{mtimeMs:t.mtimeMs,size:t.size,content:JSON.parse(n)})}catch(t){a.delete(e),d(`Failed to read meta.json: ${t instanceof Error?t.message:String(t)}`)}}));let o={};for(let t of r){let n=a.get(t);if(!n)continue;let r=c.relative(e,c.dirname(t)).replace(/\\/g,`/`);o[r||`.`]=n.content}return o}async function V(e,t){if(!t.discoverySnapshotPath||n().noCache)return null;if(t.discoverySnapshotLoaded)return t.discoverySnapshot;t.discoverySnapshotLoaded=!0;try{let n=await f.readFile(t.discoverySnapshotPath,`utf8`),r=JSON.parse(n),i=e=>Array.isArray(e)&&e.every(e=>typeof e==`string`),a=r.files,o=r.directoryMetaFiles,s=r.directories&&typeof r.directories==`object`?Object.entries(r.directories):[],l=c.resolve(e),u=await f.realpath(l),d=e=>{let t=c.resolve(e);return t===l||t.startsWith(`${l}${c.sep}`)},p=e=>/\.(?:md|mdx)$/i.test(e),m=e=>{let t=c.basename(e);return t===`meta.json`||t===`_meta.json`};if(r.version!==1||!i(a)||!i(o)||!r.directories||typeof r.directories!=`object`||Array.isArray(r.directories)||a.some(e=>!d(e)||!p(e))||o.some(e=>!d(e)||!m(e))||s.some(([e,t])=>!d(e)||typeof t!=`number`||!Number.isFinite(t)))return null;let h=e=>{let t=c.resolve(e);return t===u||t.startsWith(`${u}${c.sep}`)},g=await Promise.all([...a,...o].map(async e=>{try{return(await f.lstat(e)).isFile()?h(await f.realpath(e)):!1}catch{return!1}})),_=await Promise.all(s.map(async([e,t])=>{try{let n=await f.stat(e);return n.isDirectory()&&n.mtimeMs===t&&h(await f.realpath(e))}catch{return!1}}));if(g.every(Boolean)&&_.every(Boolean)){let e={version:1,files:a,directoryMetaFiles:o,directories:Object.fromEntries(s)};return t.discoverySnapshot=e,e}}catch{}return null}async function H(e,t){if(n().noCache){e.discoverySnapshot=null,e.discoverySnapshotLoaded=!1;return}e.discoverySnapshot=t,e.discoverySnapshotLoaded=!0;try{await f.mkdir(c.dirname(e.discoverySnapshotPath),{recursive:!0}),await f.writeFile(e.discoverySnapshotPath,JSON.stringify(t))}catch{}}async function U(e,t,n){if(!n){let n=await V(e,t);if(n)return n}let r=await new p({excludeSymlinks:!0}).withFullPaths().filter(t=>{let n=c.basename(t),r=n===`meta.json`||n===`_meta.json`;return!(t.endsWith(`.md`)||t.endsWith(`.mdx`))&&!r?!1:!c.relative(e,t).replace(/\\/g,`/`).split(`/`).some(e=>e.startsWith(`_`)&&e!==`_index.md`&&e!==`_index.mdx`&&e!==`_meta.json`)}).crawl(e).withPromise(),i=r.filter(e=>{let t=c.basename(e);return t===`meta.json`||t===`_meta.json`}).sort((e,t)=>e.localeCompare(t)),a=r.filter(e=>e.endsWith(`.md`)||e.endsWith(`.mdx`)),o=[/index\./i,/intro/i,/getting-started/i,/readme/i],s=a.map(e=>{let t=o.findIndex(t=>t.test(c.basename(e)));return{file:e,score:t===-1?2**53-1:t}});s.sort((e,t)=>e.score-t.score||e.file.localeCompare(t.file));let l=s.map(({file:e})=>e),u=[...l,...i],d=new Set([c.resolve(e)]);for(let t of u){let n=c.dirname(t);for(;n.startsWith(c.resolve(e))&&(d.add(n),n!==c.resolve(e));)n=c.dirname(n)}let m=await Promise.all([...d].sort().map(async e=>{try{return[e,(await f.stat(e)).mtimeMs]}catch{return null}})),h={version:1,files:l,directoryMetaFiles:i,directories:Object.fromEntries(m.filter(e=>e!==null))};return await H(t,h),h}async function W(e,t,n){let r=Array(e.length),i=0;async function a(){for(;i<e.length;){let t=i++;r[t]=await n(e[t])}}return await Promise.all(Array.from({length:Math.min(t,e.length)},()=>a())),r}function G(e,t){O(e,t)}function K(e,t){let n=typeof t==`string`?C(t):t;if(n){let t=e.replace(/\\/g,`/`);(c.basename(t)===`meta.json`||c.basename(t)===`_meta.json`)&&O(e,n),n.cachedNativeDocs?.[t]&&delete n.cachedNativeDocs[t],k(e,n);return}k(e)}function q(e){if(e){D(e);return}D()}async function J(e,t,a,o=!1,s,l){let u=s??C(e);if(u.disposed)throw Error(`[boltdocs] Route cache context has been disposed.`);let d=x(t,a);if(l&&l.fingerprint!==d)throw Error(`[boltdocs] Route cache variant does not match the requested route configuration fingerprint.`);if(l&&u.variants.get(d)!==l)throw Error(`[boltdocs] Route cache variant does not belong to the requested route cache context.`);let f=u.activeGenerations.get(d);if(f)return f;let p=l??y(u,d),m=u.generationEpoch,h=(async()=>{let s=a||t?.base||`/docs`;await p.docCache.load();let l,d=await U(e,p,o||n().noCache);l=d.files.filter(n=>t?.experimental?.fileRouting?!i(c.relative(e,n)).split(`/`).includes(`pages-external`):!0);let f=d.directoryMetaFiles;p.cachedFileList=l,p.cachedDirectoryMetaFiles=f,p.directoryMeta=await B(e,f,p),b(u,p),p.docCache.pruneStale(new Set(l));let h=process.env.NODE_ENV===`test`||process.env.VITEST===`true`,g,_=!0;for(let e of l)if(!p.docCache.get(e)){_=!1;break}if(_)g=l.map(e=>{let t=p.docCache.get(e);if(!t)throw Error(`[boltdocs] Route cache entry disappeared for ${e}`);return t});else{if(!h&&!p.cachedNativeDocs)try{let{runParser:t}=await import(`@bdocs/parser`);p.cachedNativeDocs=await t(e,!0)}catch{}if(!h&&p.cachedNativeDocs!==null&&p.cachedNativeDocs){let{parseDocFileWithNative:n}=await import(`./native-DZ6WMwjG.mjs`).then(e=>e.t),r=l.filter(e=>!p.cachedNativeDocs?.[e.replace(/\\/g,`/`)]);if(r.length>0)try{let{runParserFiles:t}=await import(`@bdocs/parser`),n=await t(e,r,!0);p.cachedNativeDocs={...p.cachedNativeDocs,...n}}catch{}let i=l.some(e=>!p.cachedNativeDocs?.[e.replace(/\\/g,`/`)])?(await import(`./parser-CvNZc5s3.mjs`)).parseDocFile:void 0;g=await W(l,32,async r=>{let a=p.docCache.get(r);if(a)return a;let o=r.replace(/\\/g,`/`),c=p.cachedNativeDocs[o];if(c){let i=await n(r,c,e,s,t,p.parserCache);return p.docCache.set(r,i),i}else{if(!i)throw Error(`[boltdocs] Native parser did not return a document for ${r}`);let n=await i(r,e,s,t,p.parserCache);return p.docCache.set(r,n),n}})}else{let{parseDocFile:n}=await import(`./parser-CvNZc5s3.mjs`);g=await W(l,32,async r=>{let i=p.docCache.get(r);if(i)return i;let a=await n(r,e,s,t,p.parserCache);return p.docCache.set(r,a),a})}}if(u.generationEpoch!==m)throw z;for(let e of g)I(e.route.componentPath,N(e.route.frontmatter||{}),u,p);p.docCache.save();let v=[],y=new Map,x=process.env.NODE_ENV||`development`,S=t?.drafts?.visible||process.env.BOLTDOCS_DRAFTS===`true`||(t?.drafts?.environments?.includes(x)??!1);for(let e of g)if(!(e.route.draft&&!S)){if(e.route.featureFlags&&t?.featureFlags){if(!e.route.featureFlags.every(e=>{let n=t.featureFlags?.[e];return n===!0||n===x}))continue}else if(e.route.featureFlags&&!t?.featureFlags)continue;if(e.inferredCollection){let t=e.inferredCollection;y.has(t)||y.set(t,[]),y.get(t).push(e)}else v.push(e)}let C=new Map,w=[],T=t?.i18n?.defaultLocale||``;for(let e of v)if(e.isGroupIndex&&e.relativeDir&&w.push(e),e.relativeDir){let t=`${e.route.locale||T}:${e.relativeDir}`,n=C.get(t);n?n.position===void 0&&e.inferredGroupPosition!==void 0&&(n.position=e.inferredGroupPosition):(n={title:r(e.relativeDir),position:e.inferredGroupPosition},C.set(t,n))}for(let e of w){let t=`${e.route.locale||T}:${e.relativeDir}`,n=C.get(t);e.groupMeta&&(n.title=e.groupMeta.title,e.groupMeta.position!==void 0&&(n.position=e.groupMeta.position),e.groupMeta.icon&&(n.icon=e.groupMeta.icon))}if(t?.theme?.sidebarGroups){let e=t.i18n?Array.isArray(t.i18n.locales)?t.i18n.locales:Object.keys(t.i18n.locales):[T];for(let[n,i]of Object.entries(t.theme.sidebarGroups))for(let t of e){let e=`${t}:${n}`,a=C.get(e),o;typeof i.title==`string`?o=i.title:i.title&&(o=i.title[t]||i.title[T]),a?(o&&(a.title=o),i.icon&&(a.icon=i.icon)):C.set(e,{title:o||r(n),icon:i.icon})}}let E=Array(v.length);for(let e=0;e<v.length;e++){let t=v[e],n=t.relativeDir,i=t.route.locale||T,a=n?`${i}:${n}`:void 0,o=a?C.get(a):void 0,s;o&&(s=typeof o.title==`string`?o.title:o.title[i]||o.title[T]),E[e]={...t.route,group:n,groupTitle:s||(n?r(n):void 0),groupPosition:o?.position,groupIcon:o?.icon}}let D=[];for(let[,e]of y)for(let t of e)D.push({...t.route,collection:t.inferredCollection});D.sort((e,t)=>{let n=e=>{if(!e)return-1/0;let t=new Date(e).getTime();return Number.isFinite(t)?t:-1/0},r=n(e.date),i=n(t.date)-r;return i===0?e.path.localeCompare(t.path):i});let O=E;if(t?.i18n){let e=Y(E,t,s,p.localizedPathCache);O=[...E,...e]}let k=[...A(O),...D];if(u.generationEpoch!==m)throw z;return k})();u.activeGenerations.set(d,h);try{return await h}catch(n){if(n!==z)throw n;if(u.disposed)throw Error(`[boltdocs] Route cache context was disposed during generation.`);p.docCache.invalidateAll(),p.parserCache.clear(),u.activeGenerations.get(d)===h&&u.activeGenerations.delete(d);let r=0;for(;r<10;)try{return await J(e,t,a,o,u)}catch(e){if(e!==z)throw e;if(u.disposed)throw Error(`[boltdocs] Route cache context was disposed during generation.`);r++}throw Error(`[boltdocs] Route generation was repeatedly invalidated by concurrent file changes.`)}finally{u.activeGenerations.get(d)===h&&u.activeGenerations.delete(d)}}function Y(e,t,n,r){let i=t.i18n;if(!i)return[];let a=i.defaultLocale,o=Array.isArray(i.locales)?i.locales:Object.keys(i.locales),s=[],c=new Map,l=[];for(let t of e){let e=t.locale||a,n=c.get(e);n||(n=new Set,c.set(e,n)),n.add(t.path),e===a&&l.push(t)}for(let e of o){if(e===a)continue;let i=c.get(e)||new Set;for(let o of l){let c=X(o.path,a,e,n,t,r);c!==o.path&&(i.has(c)||s.push({...o,path:c,locale:e}))}}return s}function X(e,t,n,r,i,a){let o=`${e}:${n}`,s=a.get(o);if(s)return s;let c=r.startsWith(`/`)?r:`/`+r,l=c;if(i?.versions){let t=i.versions.prefix||``;for(let n of i.versions.versions){let r=`${c}/${t+n.path}`;if(e.startsWith(r)){l=r;break}let i=`${c}/${n.path}`;if(e.startsWith(i)){l=i;break}}}let u=e.substring(l.length),d=`/${t}`;if(u.startsWith(d+`/`))u=`/`+n+`/`+u.substring(d.length+1);else if(u===d)u=`/`+n;else if(u===`/`||u===``)u=`/`+n;else{let e=u.startsWith(`/`)?``:`/`;u=`/`+n+e+u}let f=l+u;return a.size>2e3&&a.clear(),a.set(o,f),f}export{P as a,I as c,C as d,y as f,R as i,S as l,O as m,K as n,F as o,x as p,q as r,L as s,J as t,T as u};
@@ -3,15 +3,15 @@
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-hLWOsx0x.cjs');
6
+ const require_router = require('./router-DKC0Lu0n.cjs');
7
+ const require_link = require('./link-Xb69Oy2F.cjs');
8
8
  let react = require("react");
9
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
10
  let react_aria_components = require("react-aria-components");
11
11
  react_aria_components = require_router.__toESM(react_aria_components);
12
12
 
13
13
  //#region src/client/components/primitives/button.tsx
14
- function Button({ ...props }) {
14
+ function Button$1({ ...props }) {
15
15
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, { ...props });
16
16
  }
17
17
 
@@ -77,7 +77,7 @@ function ErrorBoundaryFallback({ error, resetErrorBoundary, className, titleClas
77
77
  className: require_link.cn("text-sm text-muted max-w-sm leading-relaxed", messageClassName),
78
78
  children: error?.message || "An unexpected error occurred while rendering this page."
79
79
  }),
80
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
80
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
81
81
  className: require_link.cn("rounded-xl border border-subtle bg-main px-6 py-2.5 text-xs font-semibold text-body hover:bg-primary-50/50 hover:border-primary-500/50 transition-all duration-300 cursor-pointer outline-none select-none", buttonClassName),
82
82
  onPress: resetErrorBoundary,
83
83
  children: "Try again"
@@ -158,13 +158,46 @@ function NavbarCenter({ children, className }) {
158
158
  children
159
159
  });
160
160
  }
161
- function NavbarLogo({ src, alt, width = 24, height = 24, className, logoClassName, href = "/" }) {
162
- const config = require_link.useConfig();
161
+ function NavbarLogo({ src, srcLight, srcDark, alt, width = 24, height = 24, className, logoClassName, logoLightClassName, logoDarkClassName, href = "/" }) {
162
+ const config = require_router.useConfig();
163
+ const light = srcLight ?? src;
164
+ const hasPair = Boolean(srcDark) && srcDark !== light;
165
+ const resolve = (value) => require_link.resolvePublicAssetUrl(value, config.base);
163
166
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_link.Link, {
164
167
  href,
165
168
  className: require_link.cn("flex items-center gap-2 shrink-0 outline-none", className),
166
- children: src ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
167
- src: require_link.resolvePublicAssetUrl(src, config.base),
169
+ children: hasPair ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
170
+ react_jsx_runtime.Fragment,
171
+ /**
172
+ * Both variants are always in the DOM and CSS picks the visible one.
173
+ *
174
+ * Rendering only the active source would make the markup depend on the
175
+ * resolved theme, which the server cannot know: it would render one
176
+ * `src` while the browser renders the other, the hoisted preload `href`
177
+ * would no longer match, and React would throw away the server HTML
178
+ * with a hydration mismatch. Two elements that are identical on both
179
+ * sides cost one extra request-free `<img>` and remove the whole class
180
+ * of bug.
181
+ */
182
+ { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
183
+ src: resolve(light),
184
+ alt,
185
+ width,
186
+ height,
187
+ fetchPriority: "high",
188
+ "data-logo-theme": "light",
189
+ className: require_link.cn("h-6 w-6 object-contain dark:hidden", logoClassName, logoLightClassName)
190
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
191
+ src: resolve(srcDark),
192
+ alt,
193
+ width,
194
+ height,
195
+ "data-logo-theme": "dark",
196
+ "aria-hidden": "true",
197
+ className: require_link.cn("hidden h-6 w-6 object-contain dark:block", logoClassName, logoDarkClassName)
198
+ })] }
199
+ ) : src ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
200
+ src: resolve(src),
168
201
  alt,
169
202
  width,
170
203
  height,
@@ -196,6 +229,7 @@ function NavbarLink({ label, href, to, className, iconClassName }) {
196
229
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_link.Link, {
197
230
  href,
198
231
  target: to === "external" ? "_blank" : void 0,
232
+ prefetch: to === "external" ? "none" : "viewport",
199
233
  className: require_link.cn("transition-all outline-none", className),
200
234
  children: [label, to === "external" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
201
235
  className: require_link.cn("ml-1 inline-block", iconClassName),
@@ -536,7 +570,7 @@ function highlightTerms(container, terms) {
536
570
  //#endregion
537
571
  //#region src/client/components/primitives/search-dialog.tsx
538
572
  /**
539
- * Pure, unstyled SearchDialog Overlay (maps to RAC.ModalOverlay)
573
+ * Pure, unstyled SearchDialog Overlay (maps to ModalOverlay)
540
574
  */
541
575
  function SearchDialog({ className, ...props }) {
542
576
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ModalOverlay, {
@@ -545,7 +579,7 @@ function SearchDialog({ className, ...props }) {
545
579
  });
546
580
  }
547
581
  /**
548
- * Pure, unstyled SearchDialog Content (maps to RAC.Modal)
582
+ * Pure, unstyled SearchDialog Content (maps to Modal)
549
583
  */
550
584
  function SearchDialogContent({ className, ...props }) {
551
585
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Modal, {
@@ -554,7 +588,7 @@ function SearchDialogContent({ className, ...props }) {
554
588
  });
555
589
  }
556
590
  /**
557
- * Pure, unstyled SearchDialog Dialog (maps to RAC.Dialog)
591
+ * Pure, unstyled SearchDialog Dialog (maps to Dialog)
558
592
  */
559
593
  function SearchDialogDialog({ children, className, ...props }) {
560
594
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Dialog, {
@@ -564,7 +598,7 @@ function SearchDialogDialog({ children, className, ...props }) {
564
598
  });
565
599
  }
566
600
  /**
567
- * Pure, unstyled SearchDialog Input Field (maps to RAC.SearchField)
601
+ * Pure, unstyled SearchDialog Input Field (maps to SearchField)
568
602
  */
569
603
  function SearchDialogField({ className, ...props }) {
570
604
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.SearchField, {
@@ -573,7 +607,7 @@ function SearchDialogField({ className, ...props }) {
573
607
  });
574
608
  }
575
609
  /**
576
- * Pure, unstyled SearchInput (maps to RAC.Input)
610
+ * Pure, unstyled SearchInput (maps to Input)
577
611
  */
578
612
  function SearchDialogSearchInput({ className, ...props }) {
579
613
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Input, {
@@ -582,7 +616,7 @@ function SearchDialogSearchInput({ className, ...props }) {
582
616
  });
583
617
  }
584
618
  /**
585
- * Pure, unstyled Clear Button (maps to RAC.Button with slot="clear")
619
+ * Pure, unstyled Clear Button (maps to Button with slot="clear")
586
620
  */
587
621
  function SearchDialogClearButton({ className, ...props }) {
588
622
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
@@ -592,13 +626,12 @@ function SearchDialogClearButton({ className, ...props }) {
592
626
  });
593
627
  }
594
628
  /**
595
- * Pure, unstyled Autocomplete container (maps to RAC.Autocomplete)
629
+ * Pure, unstyled Autocomplete container (maps to Autocomplete)
596
630
  */
597
631
  function SearchDialogAutocomplete({ children, className, innerClassName, ...props }) {
598
- const Autocomplete = react_aria_components.Autocomplete;
599
632
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
600
633
  className: require_link.cn("flex-1 min-h-0", className),
601
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Autocomplete, {
634
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Autocomplete, {
602
635
  ...props,
603
636
  className: require_link.cn("flex flex-col min-h-0", innerClassName),
604
637
  children
@@ -606,7 +639,7 @@ function SearchDialogAutocomplete({ children, className, innerClassName, ...prop
606
639
  });
607
640
  }
608
641
  /**
609
- * Pure, unstyled List Box (maps to RAC.ListBox)
642
+ * Pure, unstyled List Box (maps to ListBox)
610
643
  */
611
644
  function SearchDialogList({ children, className, ...props }) {
612
645
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ListBox, {
@@ -616,7 +649,7 @@ function SearchDialogList({ children, className, ...props }) {
616
649
  });
617
650
  }
618
651
  /**
619
- * Pure, unstyled List Box Item (maps to RAC.ListBoxItem)
652
+ * Pure, unstyled List Box Item (maps to ListBoxItem)
620
653
  */
621
654
  function SearchDialogItemRoot({ children, className, hintClassName, renderHint, ...props }) {
622
655
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ListBoxItem, {
@@ -672,7 +705,7 @@ SearchDialog.Item = Object.assign(SearchDialogItemRoot, {
672
705
  Object.defineProperty(exports, 'Button', {
673
706
  enumerable: true,
674
707
  get: function () {
675
- return Button;
708
+ return Button$1;
676
709
  }
677
710
  });
678
711
  Object.defineProperty(exports, 'ErrorBoundary', {
@@ -3,12 +3,12 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- import { B as Sun, C as ExternalLink, D as FileText, G as useConfig, H as X, I as Moon, L as MoreVertical, O as Hash, S as CornerDownLeft, f as resolvePublicAssetUrl, o as cn, s as useLocalizedTo, t as Link } from "./link-q1qHNGK_.js";
7
- import { E as useLocation } from "./router-CZBxMRAH.js";
6
+ import { B as X, E as Hash, F as MoreVertical, P as Moon, R as Sun, T as FileText, a as useLocalizedTo, b as CornerDownLeft, i as cn, t as Link, u as resolvePublicAssetUrl, x as ExternalLink } from "./link-CSe_oD8Y.js";
7
+ import { E as useLocation, V as useConfig } from "./router-B5e8k4qK.js";
8
8
  import { Component, useEffect, useState } from "react";
9
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
10
  import * as RAC from "react-aria-components";
11
- import { Button, Dialog, Modal, ModalOverlay, Separator, ToggleButton } from "react-aria-components";
11
+ import { Autocomplete, Button, Dialog, Input, ListBox, ListBoxItem, Modal, ModalOverlay, SearchField, Separator, ToggleButton } from "react-aria-components";
12
12
 
13
13
  //#region src/client/components/primitives/button.tsx
14
14
  function Button$1({ ...props }) {
@@ -158,13 +158,46 @@ function NavbarCenter({ children, className }) {
158
158
  children
159
159
  });
160
160
  }
161
- function NavbarLogo({ src, alt, width = 24, height = 24, className, logoClassName, href = "/" }) {
161
+ function NavbarLogo({ src, srcLight, srcDark, alt, width = 24, height = 24, className, logoClassName, logoLightClassName, logoDarkClassName, href = "/" }) {
162
162
  const config = useConfig();
163
+ const light = srcLight ?? src;
164
+ const hasPair = Boolean(srcDark) && srcDark !== light;
165
+ const resolve = (value) => resolvePublicAssetUrl(value, config.base);
163
166
  return /* @__PURE__ */ jsx(Link, {
164
167
  href,
165
168
  className: cn("flex items-center gap-2 shrink-0 outline-none", className),
166
- children: src ? /* @__PURE__ */ jsx("img", {
167
- src: resolvePublicAssetUrl(src, config.base),
169
+ children: hasPair ? /* @__PURE__ */ jsxs(
170
+ Fragment$1,
171
+ /**
172
+ * Both variants are always in the DOM and CSS picks the visible one.
173
+ *
174
+ * Rendering only the active source would make the markup depend on the
175
+ * resolved theme, which the server cannot know: it would render one
176
+ * `src` while the browser renders the other, the hoisted preload `href`
177
+ * would no longer match, and React would throw away the server HTML
178
+ * with a hydration mismatch. Two elements that are identical on both
179
+ * sides cost one extra request-free `<img>` and remove the whole class
180
+ * of bug.
181
+ */
182
+ { children: [/* @__PURE__ */ jsx("img", {
183
+ src: resolve(light),
184
+ alt,
185
+ width,
186
+ height,
187
+ fetchPriority: "high",
188
+ "data-logo-theme": "light",
189
+ className: cn("h-6 w-6 object-contain dark:hidden", logoClassName, logoLightClassName)
190
+ }), /* @__PURE__ */ jsx("img", {
191
+ src: resolve(srcDark),
192
+ alt,
193
+ width,
194
+ height,
195
+ "data-logo-theme": "dark",
196
+ "aria-hidden": "true",
197
+ className: cn("hidden h-6 w-6 object-contain dark:block", logoClassName, logoDarkClassName)
198
+ })] }
199
+ ) : src ? /* @__PURE__ */ jsx("img", {
200
+ src: resolve(src),
168
201
  alt,
169
202
  width,
170
203
  height,
@@ -196,6 +229,7 @@ function NavbarLink({ label, href, to, className, iconClassName }) {
196
229
  return /* @__PURE__ */ jsxs(Link, {
197
230
  href,
198
231
  target: to === "external" ? "_blank" : void 0,
232
+ prefetch: to === "external" ? "none" : "viewport",
199
233
  className: cn("transition-all outline-none", className),
200
234
  children: [label, to === "external" && /* @__PURE__ */ jsx("span", {
201
235
  className: cn("ml-1 inline-block", iconClassName),
@@ -536,66 +570,65 @@ function highlightTerms(container, terms) {
536
570
  //#endregion
537
571
  //#region src/client/components/primitives/search-dialog.tsx
538
572
  /**
539
- * Pure, unstyled SearchDialog Overlay (maps to RAC.ModalOverlay)
573
+ * Pure, unstyled SearchDialog Overlay (maps to ModalOverlay)
540
574
  */
541
575
  function SearchDialog({ className, ...props }) {
542
- return /* @__PURE__ */ jsx(RAC.ModalOverlay, {
576
+ return /* @__PURE__ */ jsx(ModalOverlay, {
543
577
  className: cn("fixed inset-0 z-100", className),
544
578
  ...props
545
579
  });
546
580
  }
547
581
  /**
548
- * Pure, unstyled SearchDialog Content (maps to RAC.Modal)
582
+ * Pure, unstyled SearchDialog Content (maps to Modal)
549
583
  */
550
584
  function SearchDialogContent({ className, ...props }) {
551
- return /* @__PURE__ */ jsx(RAC.Modal, {
585
+ return /* @__PURE__ */ jsx(Modal, {
552
586
  className: cn(className),
553
587
  ...props
554
588
  });
555
589
  }
556
590
  /**
557
- * Pure, unstyled SearchDialog Dialog (maps to RAC.Dialog)
591
+ * Pure, unstyled SearchDialog Dialog (maps to Dialog)
558
592
  */
559
593
  function SearchDialogDialog({ children, className, ...props }) {
560
- return /* @__PURE__ */ jsx(RAC.Dialog, {
594
+ return /* @__PURE__ */ jsx(Dialog, {
561
595
  className: cn("flex flex-col focus:outline-none", className),
562
596
  ...props,
563
597
  children
564
598
  });
565
599
  }
566
600
  /**
567
- * Pure, unstyled SearchDialog Input Field (maps to RAC.SearchField)
601
+ * Pure, unstyled SearchDialog Input Field (maps to SearchField)
568
602
  */
569
603
  function SearchDialogField({ className, ...props }) {
570
- return /* @__PURE__ */ jsx(RAC.SearchField, {
604
+ return /* @__PURE__ */ jsx(SearchField, {
571
605
  className: cn("flex items-center", className),
572
606
  ...props
573
607
  });
574
608
  }
575
609
  /**
576
- * Pure, unstyled SearchInput (maps to RAC.Input)
610
+ * Pure, unstyled SearchInput (maps to Input)
577
611
  */
578
612
  function SearchDialogSearchInput({ className, ...props }) {
579
- return /* @__PURE__ */ jsx(RAC.Input, {
613
+ return /* @__PURE__ */ jsx(Input, {
580
614
  className: cn("w-full bg-transparent outline-none border-none", className),
581
615
  ...props
582
616
  });
583
617
  }
584
618
  /**
585
- * Pure, unstyled Clear Button (maps to RAC.Button with slot="clear")
619
+ * Pure, unstyled Clear Button (maps to Button with slot="clear")
586
620
  */
587
621
  function SearchDialogClearButton({ className, ...props }) {
588
- return /* @__PURE__ */ jsx(RAC.Button, {
622
+ return /* @__PURE__ */ jsx(Button, {
589
623
  slot: "clear",
590
624
  className: cn(className),
591
625
  ...props
592
626
  });
593
627
  }
594
628
  /**
595
- * Pure, unstyled Autocomplete container (maps to RAC.Autocomplete)
629
+ * Pure, unstyled Autocomplete container (maps to Autocomplete)
596
630
  */
597
631
  function SearchDialogAutocomplete({ children, className, innerClassName, ...props }) {
598
- const Autocomplete = RAC.Autocomplete;
599
632
  return /* @__PURE__ */ jsx("div", {
600
633
  className: cn("flex-1 min-h-0", className),
601
634
  children: /* @__PURE__ */ jsx(Autocomplete, {
@@ -606,20 +639,20 @@ function SearchDialogAutocomplete({ children, className, innerClassName, ...prop
606
639
  });
607
640
  }
608
641
  /**
609
- * Pure, unstyled List Box (maps to RAC.ListBox)
642
+ * Pure, unstyled List Box (maps to ListBox)
610
643
  */
611
644
  function SearchDialogList({ children, className, ...props }) {
612
- return /* @__PURE__ */ jsx(RAC.ListBox, {
645
+ return /* @__PURE__ */ jsx(ListBox, {
613
646
  ...props,
614
647
  className: cn("flex-1 overflow-y-auto outline-none min-h-0", className),
615
648
  children
616
649
  });
617
650
  }
618
651
  /**
619
- * Pure, unstyled List Box Item (maps to RAC.ListBoxItem)
652
+ * Pure, unstyled List Box Item (maps to ListBoxItem)
620
653
  */
621
654
  function SearchDialogItemRoot({ children, className, hintClassName, renderHint, ...props }) {
622
- return /* @__PURE__ */ jsx(RAC.ListBoxItem, {
655
+ return /* @__PURE__ */ jsx(ListBoxItem, {
623
656
  ...props,
624
657
  className: cn("group flex items-center outline-none cursor-pointer", className),
625
658
  children: (itemProps) => /* @__PURE__ */ jsxs(Fragment$1, { children: [children, renderHint ? renderHint({
@@ -3,9 +3,9 @@
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-hLWOsx0x.cjs');
8
- const require_search_dialog = require('./search-dialog-CguKVtUu.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');
9
9
  let react = require("react");
10
10
  let react_jsx_runtime = require("react/jsx-runtime");
11
11
  let virtual_boltdocs_search = require("virtual:boltdocs-search");
@@ -78,7 +78,7 @@ function useRoutes() {
78
78
  const routeContext = require_link.useRoutesContext();
79
79
  const allRoutes = routeContext.routes;
80
80
  const routeIndex = (0, react.useMemo)(() => routeContext.index?.byCollectionPath ? routeContext.index : require_link.createRouteIndex(allRoutes), [allRoutes, routeContext.index]);
81
- const config = require_link.useConfig();
81
+ const config = require_router.useConfig();
82
82
  const { pathname } = require_router.useLocation();
83
83
  const { currentLocale: currentLocaleStore, currentVersion: currentVersionStore } = require_link.useBoltdocsContext();
84
84
  const currentPath = (0, react.useMemo)(() => require_link.normalizePath(pathname || "/"), [pathname]);
@@ -253,7 +253,7 @@ function applySearchDelta(documents, delta) {
253
253
  }
254
254
  function useSearch(routes, options = {}) {
255
255
  const { currentLocale, currentVersion } = useRoutes();
256
- const config = require_link.useConfig();
256
+ const config = require_router.useConfig();
257
257
  const algoliaConfig = config.integrations?.search?.algolia;
258
258
  const [isOpen, setIsOpen] = (0, react.useState)(false);
259
259
  const [query, setQuery] = (0, react.useState)("");
@@ -3,6 +3,6 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- import { n as SearchResultHighlight, t as SearchDialog } from "./search-dialog-DzObE-Ar.js";
6
+ import { n as SearchResultHighlight, t as SearchDialog } from "./search-dialog-DeplpVEB.js";
7
7
 
8
8
  export { SearchDialog };
@@ -3,9 +3,9 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- import { G as useConfig, H as X, J as useBoltdocsContext, d as normalizePath, l as createRouteIndex, o as cn, u as useRoutesContext, z as Search } from "./link-q1qHNGK_.js";
7
- import { E as useLocation, O as useNavigate, f as normalizeUrlBase, o as getVersionPrefixSegments } from "./router-CZBxMRAH.js";
8
- import { i as Navbar, n as createSearchHighlightRegex, o as ErrorBoundary, t as SearchDialog$1 } from "./search-dialog-mYnqU4v7.js";
6
+ import { B as X, L as Search, U as useBoltdocsContext, c as useRoutesContext, i as cn, l as normalizePath, s as createRouteIndex } from "./link-CSe_oD8Y.js";
7
+ import { E as useLocation, O as useNavigate, V as useConfig, f as normalizeUrlBase, o as getVersionPrefixSegments } from "./router-B5e8k4qK.js";
8
+ import { i as Navbar, n as createSearchHighlightRegex, o as ErrorBoundary, t as SearchDialog$1 } from "./search-dialog-BXil4_7P.js";
9
9
  import { useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
10
10
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
11
11
  import fetchSearchData from "virtual:boltdocs-search";
@@ -3,6 +3,6 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- const require_search_dialog = require('./search-dialog-BYZS9aeO.cjs');
6
+ const require_search_dialog = require('./search-dialog-CwlBd-Mu.cjs');
7
7
 
8
8
  exports.SearchDialog = require_search_dialog.SearchDialog;
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../adapters-DwDTQoCG.cjs`);exports.handleAwsFeedback=e.t,exports.handleNetlifyFeedback=e.r,exports.handleVercelFeedback=e.i,exports.handleWebFeedback=e.n;
6
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../adapters-Czl3WtQt.cjs`);exports.handleAwsFeedback=e.t,exports.handleNetlifyFeedback=e.r,exports.handleVercelFeedback=e.i,exports.handleWebFeedback=e.n;
@@ -1,3 +1,3 @@
1
1
 
2
- import { i as handleVercelFeedback, n as handleWebFeedback, r as handleNetlifyFeedback, t as handleAwsFeedback } from "../index-HAwIo4nZ.mjs";
2
+ import { i as handleVercelFeedback, n as handleWebFeedback, r as handleNetlifyFeedback, t as handleAwsFeedback } from "../index-CPr34I2C.mjs";
3
3
  export { handleAwsFeedback, handleNetlifyFeedback, handleVercelFeedback, handleWebFeedback };
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- import{i as e,n as t,r as n,t as r}from"../adapters-BKzKe2mO.mjs";export{r as handleAwsFeedback,n as handleNetlifyFeedback,e as handleVercelFeedback,t as handleWebFeedback};
6
+ import{i as e,n as t,r as n,t as r}from"../adapters-BXiBWAKs.mjs";export{r as handleAwsFeedback,n as handleNetlifyFeedback,e as handleVercelFeedback,t as handleWebFeedback};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ function e(e){return e===`none`?!1:e===`beasties`?`beasties`:`zig-critters`}function t(t){return{entry:`boltdocs/entry`,htmlEntry:`index.html`,dirStyle:`flat`,includeAllRoutes:!0,mock:!0,script:`async`,beastiesOptions:!1,criticalCss:e(t?.ssg?.criticalCss),criticalCssMaxSize:t?.ssg?.criticalCssMaxSize}}export{t};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ function e(e){return e===`none`?!1:e===`beasties`?`beasties`:`zig-critters`}function t(t){return{entry:`boltdocs/entry`,htmlEntry:`index.html`,dirStyle:`flat`,includeAllRoutes:!0,mock:!0,script:`async`,beastiesOptions:!1,criticalCss:e(t?.ssg?.criticalCss),criticalCssMaxSize:t?.ssg?.criticalCssMaxSize}}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});