fumadocs-core 16.4.6 → 16.4.8

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 (255) hide show
  1. package/dist/{advanced-tbtFDsHU.js → advanced-BiZjLx5X.js} +3 -4
  2. package/dist/{algolia-B9GvomyW.d.ts → algolia-DWUn4vqa.d.ts} +2 -3
  3. package/dist/{algolia-Dbt0kj8j.js → algolia-IT2aRQE6.js} +2 -3
  4. package/dist/breadcrumb.d.ts +2 -3
  5. package/dist/breadcrumb.js +3 -4
  6. package/dist/{codeblock-utils-CdA7nXLP.d.ts → codeblock-utils-DA5Ql7wp.d.ts} +1 -2
  7. package/dist/content/github.d.ts +1 -2
  8. package/dist/content/github.js +1 -2
  9. package/dist/content/index.d.ts +3 -4
  10. package/dist/content/index.js +1 -2
  11. package/dist/content/mdx/preset-bundler.d.ts +9 -10
  12. package/dist/content/mdx/preset-bundler.js +2 -3
  13. package/dist/content/mdx/preset-runtime.d.ts +9 -10
  14. package/dist/content/mdx/preset-runtime.js +2 -3
  15. package/dist/content/toc.d.ts +1 -2
  16. package/dist/content/toc.js +2 -3
  17. package/dist/{definitions-Ca2P2viV.d.ts → definitions-fBNEDML4.d.ts} +1 -2
  18. package/dist/dynamic-link.d.ts +1 -2
  19. package/dist/dynamic-link.js +1 -2
  20. package/dist/{fetch-CiphcAUR.js → fetch-B9AxBORJ.js} +1 -2
  21. package/dist/framework/index.d.ts +5 -6
  22. package/dist/framework/index.js +1 -2
  23. package/dist/framework/next.d.ts +3 -4
  24. package/dist/framework/next.js +1 -2
  25. package/dist/framework/react-router.d.ts +3 -4
  26. package/dist/framework/react-router.js +1 -2
  27. package/dist/framework/tanstack.d.ts +3 -4
  28. package/dist/framework/tanstack.js +1 -2
  29. package/dist/framework/waku.d.ts +3 -4
  30. package/dist/framework/waku.js +1 -2
  31. package/dist/highlight/client.d.ts +2 -3
  32. package/dist/highlight/client.js +2 -3
  33. package/dist/highlight/index.d.ts +1 -1
  34. package/dist/highlight/index.js +1 -1
  35. package/dist/i18n/index.d.ts +1 -1
  36. package/dist/i18n/index.js +1 -2
  37. package/dist/i18n/middleware.d.ts +2 -3
  38. package/dist/i18n/middleware.js +1 -2
  39. package/dist/{icon-CL3r1pNG.js → icon-D9W4ODUt.js} +1 -2
  40. package/dist/{index-k5KwKJ_c.d.ts → index-Bn_dIR1t.d.ts} +6 -6
  41. package/dist/{index-DxhhLscI.d.ts → index-CNd0mkPr.d.ts} +1 -2
  42. package/dist/index-DbVQNAN8.d.ts +44 -0
  43. package/dist/index-Skpc1DNd.d.ts +18 -0
  44. package/dist/link.d.ts +3 -4
  45. package/dist/link.js +1 -2
  46. package/dist/{mdast-utils-B8O-41y4.js → mdast-utils-BqE5966y.js} +1 -2
  47. package/dist/mdx-plugins/codeblock-utils.d.ts +1 -1
  48. package/dist/mdx-plugins/codeblock-utils.js +1 -2
  49. package/dist/mdx-plugins/index.d.ts +15 -15
  50. package/dist/mdx-plugins/index.js +4 -4
  51. package/dist/mdx-plugins/rehype-code.d.ts +1 -1
  52. package/dist/mdx-plugins/rehype-code.js +2 -2
  53. package/dist/mdx-plugins/rehype-toc.d.ts +1 -1
  54. package/dist/mdx-plugins/rehype-toc.js +1 -1
  55. package/dist/mdx-plugins/remark-admonition.d.ts +1 -1
  56. package/dist/mdx-plugins/remark-admonition.js +2 -3
  57. package/dist/mdx-plugins/remark-code-tab.d.ts +1 -1
  58. package/dist/mdx-plugins/remark-code-tab.js +1 -2
  59. package/dist/mdx-plugins/remark-directive-admonition.d.ts +1 -1
  60. package/dist/mdx-plugins/remark-directive-admonition.js +1 -2
  61. package/dist/mdx-plugins/remark-feedback-block.d.ts +1 -1
  62. package/dist/mdx-plugins/remark-feedback-block.js +2 -3
  63. package/dist/mdx-plugins/remark-gfm.d.ts +1 -1
  64. package/dist/mdx-plugins/remark-heading.d.ts +1 -1
  65. package/dist/mdx-plugins/remark-heading.js +2 -3
  66. package/dist/mdx-plugins/remark-image.d.ts +1 -1
  67. package/dist/mdx-plugins/remark-image.js +1 -2
  68. package/dist/mdx-plugins/remark-mdx-files.d.ts +1 -1
  69. package/dist/mdx-plugins/remark-mdx-files.js +1 -2
  70. package/dist/mdx-plugins/remark-mdx-mermaid.d.ts +1 -1
  71. package/dist/mdx-plugins/remark-mdx-mermaid.js +1 -2
  72. package/dist/mdx-plugins/remark-npm.d.ts +1 -1
  73. package/dist/mdx-plugins/remark-npm.js +1 -2
  74. package/dist/mdx-plugins/remark-steps.d.ts +1 -1
  75. package/dist/mdx-plugins/remark-steps.js +1 -2
  76. package/dist/mdx-plugins/remark-structure.d.ts +1 -1
  77. package/dist/mdx-plugins/remark-structure.js +2 -3
  78. package/dist/{mixedbread-B0TvOHtt.js → mixedbread-B4x0e8AJ.js} +6 -5
  79. package/dist/negotiation/index.d.ts +1 -2
  80. package/dist/negotiation/index.js +1 -2
  81. package/dist/{normalize-url-CEfNKxaE.js → normalize-url-D88zV54r.js} +1 -2
  82. package/dist/{orama-cloud-yicpgD0c.js → orama-cloud-CiI54EU9.js} +3 -4
  83. package/dist/{orama-cloud-legacy-NJTbB19B.js → orama-cloud-legacy-DG0asrcn.js} +3 -4
  84. package/dist/page-tree/index.d.ts +3 -45
  85. package/dist/page-tree/index.js +1 -1
  86. package/dist/{path-CECfI3nn.js → path-B48ZWv8k.js} +2 -3
  87. package/dist/{rehype-code-Ct5Pb6BZ.js → rehype-code-8Te7jiPm.js} +2 -3
  88. package/dist/{rehype-code-BUrju-yF.d.ts → rehype-code-9wJ_hsjl.d.ts} +1 -2
  89. package/dist/{rehype-toc-Dcgzd_Vy.d.ts → rehype-toc-Bt9Ng_4w.d.ts} +1 -2
  90. package/dist/{rehype-toc-CTG0x7La.js → rehype-toc-CRXB92Tc.js} +1 -2
  91. package/dist/{remark-admonition-BvgS4oU1.d.ts → remark-admonition-DVevS9Wn.d.ts} +1 -2
  92. package/dist/{remark-code-tab-Ds_BdYXz.d.ts → remark-code-tab-DwGhoHpj.d.ts} +1 -2
  93. package/dist/{remark-directive-admonition-02cR5K1L.d.ts → remark-directive-admonition-DA7-ewEx.d.ts} +1 -2
  94. package/dist/{remark-feedback-block-fAyt4LdQ.d.ts → remark-feedback-block-PpERWDdJ.d.ts} +1 -2
  95. package/dist/{remark-heading-CSButCYt.d.ts → remark-heading-B02bkQ09.d.ts} +1 -2
  96. package/dist/{remark-image-C3MnP-3r.d.ts → remark-image-k8SDn3Hf.d.ts} +1 -2
  97. package/dist/{remark-mdx-files-BXUiiX3M.d.ts → remark-mdx-files-DXQKQsPS.d.ts} +1 -2
  98. package/dist/{remark-mdx-mermaid-C5ZBxx8x.d.ts → remark-mdx-mermaid-CzeZXfYX.d.ts} +1 -2
  99. package/dist/{remark-npm-DADZg0pf.d.ts → remark-npm-DS3cHDxB.d.ts} +1 -2
  100. package/dist/{remark-steps-CWEE34cT.d.ts → remark-steps-Bz-6C0tE.d.ts} +1 -2
  101. package/dist/{remark-structure-ChKxMXnK.d.ts → remark-structure-dZprfvCG.d.ts} +1 -2
  102. package/dist/{remove-undefined-Buxsprgu.js → remove-undefined-CiwokjLP.js} +1 -2
  103. package/dist/search/algolia.d.ts +2 -2
  104. package/dist/search/algolia.js +1 -2
  105. package/dist/search/client.d.ts +8 -7
  106. package/dist/search/client.js +7 -8
  107. package/dist/search/index.d.ts +1 -2
  108. package/dist/search/index.js +1 -1
  109. package/dist/search/orama-cloud-legacy.d.ts +6 -7
  110. package/dist/search/orama-cloud-legacy.js +1 -2
  111. package/dist/search/orama-cloud.d.ts +6 -7
  112. package/dist/search/orama-cloud.js +1 -2
  113. package/dist/search/server.d.ts +6 -4
  114. package/dist/search/server.js +5 -6
  115. package/dist/{search-DzqmOjzV.js → search-CBAFoCmV.js} +1 -2
  116. package/dist/{server-CjGgVKx_.d.ts → server-BqqfVZaS.d.ts} +4 -5
  117. package/dist/{shiki-B4NO99XD.js → shiki-BMakKE6A.js} +1 -2
  118. package/dist/{shiki-vKy7H_iw.d.ts → shiki-BjMLCq9L.d.ts} +1 -2
  119. package/dist/source/client/index.d.ts +4 -18
  120. package/dist/source/client/index.js +21 -12
  121. package/dist/source/index.d.ts +4 -2
  122. package/dist/source/index.js +118 -66
  123. package/dist/source/plugins/lucide-icons.d.ts +5 -4
  124. package/dist/source/plugins/lucide-icons.js +2 -3
  125. package/dist/source/plugins/slugs.d.ts +4 -2
  126. package/dist/source/plugins/slugs.js +2 -3
  127. package/dist/source/plugins/status-badges.d.ts +53 -0
  128. package/dist/source/plugins/status-badges.js +54 -0
  129. package/dist/source/schema.d.ts +1 -2
  130. package/dist/source/schema.js +1 -2
  131. package/dist/{static-C_WBOzek.js → static-Dg4_dKaf.js} +2 -3
  132. package/dist/toc.d.ts +1 -2
  133. package/dist/toc.js +1 -2
  134. package/dist/{util-d5FlPx1Z.d.ts → util-C1pcIt82.d.ts} +1 -2
  135. package/dist/{util-Dn-wseQ5.js → util-E8U2ttCR.js} +1 -2
  136. package/dist/utils/use-effect-event.d.ts +1 -2
  137. package/dist/utils/use-effect-event.js +1 -2
  138. package/dist/utils/use-media-query.d.ts +1 -2
  139. package/dist/utils/use-media-query.js +1 -2
  140. package/dist/utils/use-on-change.d.ts +1 -2
  141. package/dist/utils/use-on-change.js +1 -2
  142. package/dist/{utils-D10VxgVc.js → utils-BllAiz19.js} +1 -2
  143. package/package.json +14 -14
  144. package/dist/advanced-tbtFDsHU.js.map +0 -1
  145. package/dist/algolia-B9GvomyW.d.ts.map +0 -1
  146. package/dist/algolia-Dbt0kj8j.js.map +0 -1
  147. package/dist/breadcrumb.d.ts.map +0 -1
  148. package/dist/breadcrumb.js.map +0 -1
  149. package/dist/codeblock-utils-CdA7nXLP.d.ts.map +0 -1
  150. package/dist/content/github.d.ts.map +0 -1
  151. package/dist/content/github.js.map +0 -1
  152. package/dist/content/index.d.ts.map +0 -1
  153. package/dist/content/index.js.map +0 -1
  154. package/dist/content/mdx/preset-bundler.d.ts.map +0 -1
  155. package/dist/content/mdx/preset-bundler.js.map +0 -1
  156. package/dist/content/mdx/preset-runtime.d.ts.map +0 -1
  157. package/dist/content/mdx/preset-runtime.js.map +0 -1
  158. package/dist/content/toc.d.ts.map +0 -1
  159. package/dist/content/toc.js.map +0 -1
  160. package/dist/definitions-Ca2P2viV.d.ts.map +0 -1
  161. package/dist/dynamic-link.d.ts.map +0 -1
  162. package/dist/dynamic-link.js.map +0 -1
  163. package/dist/fetch-CiphcAUR.js.map +0 -1
  164. package/dist/framework/index.d.ts.map +0 -1
  165. package/dist/framework/index.js.map +0 -1
  166. package/dist/framework/next.d.ts.map +0 -1
  167. package/dist/framework/next.js.map +0 -1
  168. package/dist/framework/react-router.d.ts.map +0 -1
  169. package/dist/framework/react-router.js.map +0 -1
  170. package/dist/framework/tanstack.d.ts.map +0 -1
  171. package/dist/framework/tanstack.js.map +0 -1
  172. package/dist/framework/waku.d.ts.map +0 -1
  173. package/dist/framework/waku.js.map +0 -1
  174. package/dist/highlight/client.d.ts.map +0 -1
  175. package/dist/highlight/client.js.map +0 -1
  176. package/dist/i18n/index.js.map +0 -1
  177. package/dist/i18n/middleware.d.ts.map +0 -1
  178. package/dist/i18n/middleware.js.map +0 -1
  179. package/dist/icon-CL3r1pNG.js.map +0 -1
  180. package/dist/index-DxhhLscI.d.ts.map +0 -1
  181. package/dist/index-k5KwKJ_c.d.ts.map +0 -1
  182. package/dist/link.d.ts.map +0 -1
  183. package/dist/link.js.map +0 -1
  184. package/dist/mdast-utils-B8O-41y4.js.map +0 -1
  185. package/dist/mdx-plugins/codeblock-utils.js.map +0 -1
  186. package/dist/mdx-plugins/remark-admonition.js.map +0 -1
  187. package/dist/mdx-plugins/remark-code-tab.js.map +0 -1
  188. package/dist/mdx-plugins/remark-directive-admonition.js.map +0 -1
  189. package/dist/mdx-plugins/remark-feedback-block.js.map +0 -1
  190. package/dist/mdx-plugins/remark-heading.js.map +0 -1
  191. package/dist/mdx-plugins/remark-image.js.map +0 -1
  192. package/dist/mdx-plugins/remark-mdx-files.js.map +0 -1
  193. package/dist/mdx-plugins/remark-mdx-mermaid.js.map +0 -1
  194. package/dist/mdx-plugins/remark-npm.js.map +0 -1
  195. package/dist/mdx-plugins/remark-steps.js.map +0 -1
  196. package/dist/mdx-plugins/remark-structure.js.map +0 -1
  197. package/dist/mixedbread-B0TvOHtt.js.map +0 -1
  198. package/dist/negotiation/index.d.ts.map +0 -1
  199. package/dist/negotiation/index.js.map +0 -1
  200. package/dist/normalize-url-CEfNKxaE.js.map +0 -1
  201. package/dist/orama-cloud-legacy-NJTbB19B.js.map +0 -1
  202. package/dist/orama-cloud-yicpgD0c.js.map +0 -1
  203. package/dist/page-tree/index.d.ts.map +0 -1
  204. package/dist/path-CECfI3nn.js.map +0 -1
  205. package/dist/rehype-code-BUrju-yF.d.ts.map +0 -1
  206. package/dist/rehype-code-Ct5Pb6BZ.js.map +0 -1
  207. package/dist/rehype-toc-CTG0x7La.js.map +0 -1
  208. package/dist/rehype-toc-Dcgzd_Vy.d.ts.map +0 -1
  209. package/dist/remark-admonition-BvgS4oU1.d.ts.map +0 -1
  210. package/dist/remark-code-tab-Ds_BdYXz.d.ts.map +0 -1
  211. package/dist/remark-directive-admonition-02cR5K1L.d.ts.map +0 -1
  212. package/dist/remark-feedback-block-fAyt4LdQ.d.ts.map +0 -1
  213. package/dist/remark-heading-CSButCYt.d.ts.map +0 -1
  214. package/dist/remark-image-C3MnP-3r.d.ts.map +0 -1
  215. package/dist/remark-mdx-files-BXUiiX3M.d.ts.map +0 -1
  216. package/dist/remark-mdx-mermaid-C5ZBxx8x.d.ts.map +0 -1
  217. package/dist/remark-npm-DADZg0pf.d.ts.map +0 -1
  218. package/dist/remark-steps-CWEE34cT.d.ts.map +0 -1
  219. package/dist/remark-structure-ChKxMXnK.d.ts.map +0 -1
  220. package/dist/remove-undefined-Buxsprgu.js.map +0 -1
  221. package/dist/search/algolia.js.map +0 -1
  222. package/dist/search/client.d.ts.map +0 -1
  223. package/dist/search/client.js.map +0 -1
  224. package/dist/search/index.d.ts.map +0 -1
  225. package/dist/search/orama-cloud-legacy.d.ts.map +0 -1
  226. package/dist/search/orama-cloud-legacy.js.map +0 -1
  227. package/dist/search/orama-cloud.d.ts.map +0 -1
  228. package/dist/search/orama-cloud.js.map +0 -1
  229. package/dist/search/server.js.map +0 -1
  230. package/dist/search-DzqmOjzV.js.map +0 -1
  231. package/dist/server-CjGgVKx_.d.ts.map +0 -1
  232. package/dist/shiki-B4NO99XD.js.map +0 -1
  233. package/dist/shiki-vKy7H_iw.d.ts.map +0 -1
  234. package/dist/source/client/index.d.ts.map +0 -1
  235. package/dist/source/client/index.js.map +0 -1
  236. package/dist/source/index.js.map +0 -1
  237. package/dist/source/plugins/lucide-icons.d.ts.map +0 -1
  238. package/dist/source/plugins/lucide-icons.js.map +0 -1
  239. package/dist/source/plugins/slugs.js.map +0 -1
  240. package/dist/source/schema.d.ts.map +0 -1
  241. package/dist/source/schema.js.map +0 -1
  242. package/dist/static-C_WBOzek.js.map +0 -1
  243. package/dist/toc.d.ts.map +0 -1
  244. package/dist/toc.js.map +0 -1
  245. package/dist/util-Dn-wseQ5.js.map +0 -1
  246. package/dist/util-d5FlPx1Z.d.ts.map +0 -1
  247. package/dist/utils/use-effect-event.d.ts.map +0 -1
  248. package/dist/utils/use-effect-event.js.map +0 -1
  249. package/dist/utils/use-media-query.d.ts.map +0 -1
  250. package/dist/utils/use-media-query.js.map +0 -1
  251. package/dist/utils/use-on-change.d.ts.map +0 -1
  252. package/dist/utils/use-on-change.js.map +0 -1
  253. package/dist/utils-D10VxgVc.js.map +0 -1
  254. /package/dist/{chunk-C9UIFEcR.js → chunk-CQNP8FC4.js} +0 -0
  255. /package/dist/{remark-gfm-jrvaEZw5.d.ts → remark-gfm-Cvcfjik1.d.ts} +0 -0
@@ -1,9 +1,11 @@
1
- import "../definitions-Ca2P2viV.js";
2
- import "../remark-structure-ChKxMXnK.js";
3
- import { t as BaseIndex } from "../algolia-B9GvomyW.js";
1
+ import "../definitions-fBNEDML4.js";
2
+ import "../remark-structure-dZprfvCG.js";
3
+ import "../index-DbVQNAN8.js";
4
+ import { t as BaseIndex } from "../algolia-DWUn4vqa.js";
4
5
  import { SortedResult } from "./index.js";
5
- import "../server-CjGgVKx_.js";
6
- import "../index-k5KwKJ_c.js";
6
+ import "../server-BqqfVZaS.js";
7
+ import "../index-Bn_dIR1t.js";
8
+ import "../index-Skpc1DNd.js";
7
9
  import { DependencyList } from "react";
8
10
  import { AnyOrama } from "@orama/orama";
9
11
  import { LiteClient, SearchResponse } from "algoliasearch/lite";
@@ -165,5 +167,4 @@ declare function useDocsSearch(clientOptions: Client & {
165
167
  allowEmpty?: boolean;
166
168
  }, deps?: DependencyList): UseDocsSearch;
167
169
  //#endregion
168
- export { type AlgoliaOptions, Client, type FetchOptions, type OramaCloudOptions, type StaticOptions, useDocsSearch };
169
- //# sourceMappingURL=client.d.ts.map
170
+ export { type AlgoliaOptions, Client, type FetchOptions, type OramaCloudOptions, type StaticOptions, useDocsSearch };
@@ -54,27 +54,27 @@ function useDocsSearch(clientOptions, deps) {
54
54
  if (debouncedValue.length === 0 && !allowEmpty) return "empty";
55
55
  switch (client.type) {
56
56
  case "fetch": {
57
- const { fetchDocs } = await import("../fetch-CiphcAUR.js");
57
+ const { fetchDocs } = await import("../fetch-B9AxBORJ.js");
58
58
  return fetchDocs(debouncedValue, client);
59
59
  }
60
60
  case "algolia": {
61
- const { searchDocs } = await import("../algolia-Dbt0kj8j.js");
61
+ const { searchDocs } = await import("../algolia-IT2aRQE6.js");
62
62
  return searchDocs(debouncedValue, client);
63
63
  }
64
64
  case "orama-cloud": {
65
- const { searchDocs } = await import("../orama-cloud-yicpgD0c.js");
65
+ const { searchDocs } = await import("../orama-cloud-CiI54EU9.js");
66
66
  return searchDocs(debouncedValue, client);
67
67
  }
68
68
  case "orama-cloud-legacy": {
69
- const { searchDocs } = await import("../orama-cloud-legacy-NJTbB19B.js");
69
+ const { searchDocs } = await import("../orama-cloud-legacy-DG0asrcn.js");
70
70
  return searchDocs(debouncedValue, client);
71
71
  }
72
72
  case "mixedbread": {
73
- const { search: search$1 } = await import("../mixedbread-B0TvOHtt.js");
73
+ const { search: search$1 } = await import("../mixedbread-B4x0e8AJ.js");
74
74
  return search$1(debouncedValue, client);
75
75
  }
76
76
  case "static": {
77
- const { search: search$1 } = await import("../static-C_WBOzek.js");
77
+ const { search: search$1 } = await import("../static-Dg4_dKaf.js");
78
78
  return search$1(debouncedValue, client);
79
79
  }
80
80
  default: throw new Error("unknown search client");
@@ -102,5 +102,4 @@ function useDocsSearch(clientOptions, deps) {
102
102
  }
103
103
 
104
104
  //#endregion
105
- export { useDocsSearch };
106
- //# sourceMappingURL=client.js.map
105
+ export { useDocsSearch };
@@ -24,5 +24,4 @@ declare function createContentHighlighter(query: string | RegExp): {
24
24
  highlight(content: string): HighlightedText[];
25
25
  };
26
26
  //#endregion
27
- export { HighlightedText, ReactSortedResult, SortedResult, createContentHighlighter };
28
- //# sourceMappingURL=index.d.ts.map
27
+ export { HighlightedText, ReactSortedResult, SortedResult, createContentHighlighter };
@@ -1,3 +1,3 @@
1
- import { t as createContentHighlighter } from "../search-DzqmOjzV.js";
1
+ import { t as createContentHighlighter } from "../search-CBAFoCmV.js";
2
2
 
3
3
  export { createContentHighlighter };
@@ -1,8 +1,8 @@
1
- import "../remark-gfm-jrvaEZw5.js";
2
- import "../rehype-code-BUrju-yF.js";
3
- import { n as StructuredData } from "../remark-structure-ChKxMXnK.js";
4
- import "../remark-heading-CSButCYt.js";
5
- import "../remark-code-tab-Ds_BdYXz.js";
1
+ import "../remark-gfm-Cvcfjik1.js";
2
+ import "../rehype-code-9wJ_hsjl.js";
3
+ import { n as StructuredData } from "../remark-structure-dZprfvCG.js";
4
+ import "../remark-heading-B02bkQ09.js";
5
+ import "../remark-code-tab-DwGhoHpj.js";
6
6
  import "../mdx-plugins/index.js";
7
7
  import { CloudManager } from "@oramacloud/client";
8
8
 
@@ -77,5 +77,4 @@ interface OramaIndex {
77
77
  declare function sync(cloudManager: CloudManager, options: SyncOptions): Promise<void>;
78
78
  declare function syncI18n(cloudManager: CloudManager, options: I18nSyncOptions): Promise<void>;
79
79
  //#endregion
80
- export { I18nSyncOptions, OramaDocument, OramaIndex, SyncOptions, sync, syncI18n };
81
- //# sourceMappingURL=orama-cloud-legacy.d.ts.map
80
+ export { I18nSyncOptions, OramaDocument, OramaIndex, SyncOptions, sync, syncI18n };
@@ -46,5 +46,4 @@ function toIndex(page) {
46
46
  }
47
47
 
48
48
  //#endregion
49
- export { sync, syncI18n };
50
- //# sourceMappingURL=orama-cloud-legacy.js.map
49
+ export { sync, syncI18n };
@@ -1,8 +1,8 @@
1
- import "../remark-gfm-jrvaEZw5.js";
2
- import "../rehype-code-BUrju-yF.js";
3
- import { n as StructuredData } from "../remark-structure-ChKxMXnK.js";
4
- import "../remark-heading-CSButCYt.js";
5
- import "../remark-code-tab-Ds_BdYXz.js";
1
+ import "../remark-gfm-Cvcfjik1.js";
2
+ import "../rehype-code-9wJ_hsjl.js";
3
+ import { n as StructuredData } from "../remark-structure-dZprfvCG.js";
4
+ import "../remark-heading-B02bkQ09.js";
5
+ import "../remark-code-tab-DwGhoHpj.js";
6
6
  import "../mdx-plugins/index.js";
7
7
  import { OramaCloud } from "@orama/core";
8
8
 
@@ -77,5 +77,4 @@ interface OramaIndex {
77
77
  declare function sync(orama: OramaCloud, options: SyncOptions): Promise<void>;
78
78
  declare function syncI18n(orama: OramaCloud, options: I18nSyncOptions): Promise<void>;
79
79
  //#endregion
80
- export { I18nSyncOptions, OramaDocument, OramaIndex, SyncOptions, sync, syncI18n };
81
- //# sourceMappingURL=orama-cloud.d.ts.map
80
+ export { I18nSyncOptions, OramaDocument, OramaIndex, SyncOptions, sync, syncI18n };
@@ -48,5 +48,4 @@ function toIndex(page) {
48
48
  }
49
49
 
50
50
  //#endregion
51
- export { sync, syncI18n };
52
- //# sourceMappingURL=orama-cloud.js.map
51
+ export { sync, syncI18n };
@@ -1,6 +1,8 @@
1
- import "../definitions-Ca2P2viV.js";
2
- import "../remark-structure-ChKxMXnK.js";
1
+ import "../definitions-fBNEDML4.js";
2
+ import "../remark-structure-dZprfvCG.js";
3
+ import "../index-DbVQNAN8.js";
3
4
  import { HighlightedText, ReactSortedResult, SortedResult, createContentHighlighter } from "./index.js";
4
- import { a as Index, c as SimpleOptions, d as initSimpleSearch, f as createI18nSearchAPI, i as ExportedData, l as createSearchAPI, n as AdvancedOptions, o as SearchAPI, p as createFromSource, r as Dynamic, s as SearchServer, t as AdvancedIndex, u as initAdvancedSearch } from "../server-CjGgVKx_.js";
5
- import "../index-k5KwKJ_c.js";
5
+ import { a as Index, c as SimpleOptions, d as initSimpleSearch, f as createI18nSearchAPI, i as ExportedData, l as createSearchAPI, n as AdvancedOptions, o as SearchAPI, p as createFromSource, r as Dynamic, s as SearchServer, t as AdvancedIndex, u as initAdvancedSearch } from "../server-BqqfVZaS.js";
6
+ import "../index-Bn_dIR1t.js";
7
+ import "../index-Skpc1DNd.js";
6
8
  export { AdvancedIndex, AdvancedOptions, Dynamic, ExportedData, HighlightedText, Index, ReactSortedResult, SearchAPI, SearchServer, SimpleOptions, SortedResult, createContentHighlighter, createFromSource, createI18nSearchAPI, createSearchAPI, initAdvancedSearch, initSimpleSearch };
@@ -1,7 +1,7 @@
1
- import { r as findPath } from "../utils-D10VxgVc.js";
2
- import { t as createContentHighlighter } from "../search-DzqmOjzV.js";
3
- import { n as searchSimple, t as searchAdvanced } from "../advanced-tbtFDsHU.js";
4
- import { r as extname, t as basename } from "../path-CECfI3nn.js";
1
+ import { r as findPath } from "../utils-BllAiz19.js";
2
+ import { t as createContentHighlighter } from "../search-CBAFoCmV.js";
3
+ import { n as searchSimple, t as searchAdvanced } from "../advanced-BiZjLx5X.js";
4
+ import { r as extname, t as basename } from "../path-B48ZWv8k.js";
5
5
  import { create, insertMultiple, save } from "@orama/orama";
6
6
 
7
7
  //#region src/search/orama/create-endpoint.ts
@@ -319,5 +319,4 @@ function initAdvancedSearch(options) {
319
319
  }
320
320
 
321
321
  //#endregion
322
- export { createContentHighlighter, createFromSource, createI18nSearchAPI, createSearchAPI, initAdvancedSearch, initSimpleSearch };
323
- //# sourceMappingURL=server.js.map
322
+ export { createContentHighlighter, createFromSource, createI18nSearchAPI, createSearchAPI, initAdvancedSearch, initSimpleSearch };
@@ -40,5 +40,4 @@ function createContentHighlighter(query) {
40
40
  }
41
41
 
42
42
  //#endregion
43
- export { createContentHighlighter as t };
44
- //# sourceMappingURL=search-DzqmOjzV.js.map
43
+ export { createContentHighlighter as t };
@@ -1,7 +1,7 @@
1
- import { n as StructuredData } from "./remark-structure-ChKxMXnK.js";
2
- import { t as I18nConfig } from "./index-DxhhLscI.js";
1
+ import { n as StructuredData } from "./remark-structure-dZprfvCG.js";
2
+ import { t as I18nConfig } from "./index-CNd0mkPr.js";
3
3
  import { SortedResult } from "./search/index.js";
4
- import { i as LoaderConfig, o as LoaderOutput, u as Page } from "./index-k5KwKJ_c.js";
4
+ import { i as LoaderConfig, o as LoaderOutput, u as Page } from "./index-Bn_dIR1t.js";
5
5
  import { Language, Orama, RawData, SearchParams, TypedDocument, create } from "@orama/orama";
6
6
 
7
7
  //#region src/search/orama/create-db.d.ts
@@ -129,5 +129,4 @@ interface AdvancedIndex {
129
129
  }
130
130
  declare function initAdvancedSearch(options: AdvancedOptions): SearchServer;
131
131
  //#endregion
132
- export { Index as a, SimpleOptions as c, initSimpleSearch as d, createI18nSearchAPI as f, ExportedData as i, createSearchAPI as l, AdvancedOptions as n, SearchAPI as o, createFromSource as p, Dynamic as r, SearchServer as s, AdvancedIndex as t, initAdvancedSearch as u };
133
- //# sourceMappingURL=server-CjGgVKx_.d.ts.map
132
+ export { Index as a, SimpleOptions as c, initSimpleSearch as d, createI18nSearchAPI as f, ExportedData as i, createSearchAPI as l, AdvancedOptions as n, SearchAPI as o, createFromSource as p, Dynamic as r, SearchServer as s, AdvancedIndex as t, initAdvancedSearch as u };
@@ -76,5 +76,4 @@ async function highlight(code, options) {
76
76
  }
77
77
 
78
78
  //#endregion
79
- export { highlightHast as a, highlight as i, getHighlighter as n, hastToJsx as r, defaultThemes as t };
80
- //# sourceMappingURL=shiki-B4NO99XD.js.map
79
+ export { highlightHast as a, highlight as i, getHighlighter as n, hastToJsx as r, defaultThemes as t };
@@ -29,5 +29,4 @@ declare function hastToJsx(hast: Root, options?: Partial<Options>): JSX.Element;
29
29
  declare function getHighlighter(engineType: 'js' | 'oniguruma', options: Omit<BundledHighlighterOptions<BundledLanguage, BundledTheme>, 'engine'>): Promise<Highlighter>;
30
30
  declare function highlight(code: string, options: HighlightOptions): Promise<ReactNode>;
31
31
  //#endregion
32
- export { hastToJsx as a, getHighlighter as i, HighlightOptionsCommon as n, highlight as o, HighlightOptionsThemes as r, highlightHast as s, HighlightOptions as t };
33
- //# sourceMappingURL=shiki-vKy7H_iw.d.ts.map
32
+ export { hastToJsx as a, getHighlighter as i, HighlightOptionsCommon as n, highlight as o, HighlightOptionsThemes as r, highlightHast as s, HighlightOptions as t };
@@ -1,18 +1,4 @@
1
- import { i as Root } from "../../definitions-Ca2P2viV.js";
2
- import "../../page-tree/index.js";
3
-
4
- //#region src/source/client/index.d.ts
5
- declare function deserializePageTree(root: Root): Root;
6
- /**
7
- * Deserialize data passed from server-side loader.
8
- *
9
- * It only receives the serialized data from server-side, hence not sharing plugins and some properties.
10
- */
11
- declare function useFumadocsLoader<V extends {
12
- pageTree?: object;
13
- }>(serialized: V): {
14
- pageTree: V["pageTree"] extends object ? Root : undefined;
15
- };
16
- //#endregion
17
- export { deserializePageTree, useFumadocsLoader };
18
- //# sourceMappingURL=index.d.ts.map
1
+ import "../../definitions-fBNEDML4.js";
2
+ import "../../index-DbVQNAN8.js";
3
+ import { i as useFumadocsLoader, n as SerializedPageTree, r as deserializePageTree, t as Serialized } from "../../index-Skpc1DNd.js";
4
+ export { Serialized, SerializedPageTree, deserializePageTree, useFumadocsLoader };
@@ -1,12 +1,13 @@
1
- import { c as visit } from "../../utils-D10VxgVc.js";
1
+ import { c as visit } from "../../utils-BllAiz19.js";
2
2
  import { useMemo } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
 
5
5
  //#region src/source/client/index.tsx
6
- function deserializePageTree(root) {
7
- function deserializeHTML(html) {
8
- return /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: html } });
9
- }
6
+ function deserializeHTML(html) {
7
+ return /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: html } });
8
+ }
9
+ function deserializePageTree(serialized) {
10
+ const root = serialized.data;
10
11
  visit(root, (item) => {
11
12
  if ("icon" in item && typeof item.icon === "string") item.icon = deserializeHTML(item.icon);
12
13
  if (typeof item.name === "string") item.name = deserializeHTML(item.name);
@@ -14,17 +15,25 @@ function deserializePageTree(root) {
14
15
  return root;
15
16
  }
16
17
  /**
17
- * Deserialize data passed from server-side loader.
18
+ * Deserialize loader data that is serialized by the server-side Fumadocs `loader()`, supported:
19
+ * - Page Tree
18
20
  *
19
- * It only receives the serialized data from server-side, hence not sharing plugins and some properties.
21
+ * other unrelated properties are kept in the output.
20
22
  */
21
23
  function useFumadocsLoader(serialized) {
22
- const { pageTree } = serialized;
23
24
  return useMemo(() => {
24
- return { pageTree: pageTree ? deserializePageTree(pageTree) : void 0 };
25
- }, [pageTree]);
25
+ const out = {};
26
+ for (const k in serialized) {
27
+ const v = serialized[k];
28
+ if (isSerializedPageTree(v)) out[k] = deserializePageTree(v);
29
+ else out[k] = v;
30
+ }
31
+ return out;
32
+ }, [serialized]);
33
+ }
34
+ function isSerializedPageTree(v) {
35
+ return typeof v === "object" && v !== null && "$fumadocs_loader" in v && v.$fumadocs_loader === "page-tree";
26
36
  }
27
37
 
28
38
  //#endregion
29
- export { deserializePageTree, useFumadocsLoader };
30
- //# sourceMappingURL=index.js.map
39
+ export { deserializePageTree, useFumadocsLoader };
@@ -1,3 +1,5 @@
1
- import "../definitions-Ca2P2viV.js";
2
- import { A as PageData, C as ContentStorage, D as buildContentStorage, E as ContentStoragePageFile, F as _SourceUpdate_, I as multiple, L as source, M as SourceConfig, N as VirtualFile, O as FileSystem, P as _ConfigUnion_, R as update, S as createPageTreeBuilder, T as ContentStorageMetaFile, a as LoaderOptions, b as PageTreeOptions, c as LoaderPluginOption, d as ResolvedLoaderConfig, f as createGetUrl, h as getSlugs, i as LoaderConfig, j as Source, k as MetaData, l as Meta, n as InferMetaType, o as LoaderOutput, p as loader, r as InferPageType, s as LoaderPlugin, t as path_d_exports, u as Page, v as PageTreeBuilder, w as ContentStorageFile, x as PageTreeTransformer, y as PageTreeBuilderContext } from "../index-k5KwKJ_c.js";
1
+ import "../definitions-fBNEDML4.js";
2
+ import "../index-DbVQNAN8.js";
3
+ import { A as PageData, C as ContentStorage, D as buildContentStorage, E as ContentStoragePageFile, F as _SourceUpdate_, I as multiple, L as source, M as SourceConfig, N as VirtualFile, O as FileSystem, P as _ConfigUnion_, R as update, S as createPageTreeBuilder, T as ContentStorageMetaFile, a as LoaderOptions, b as PageTreeOptions, c as LoaderPluginOption, d as ResolvedLoaderConfig, f as createGetUrl, h as getSlugs, i as LoaderConfig, j as Source, k as MetaData, l as Meta, n as InferMetaType, o as LoaderOutput, p as loader, r as InferPageType, s as LoaderPlugin, t as path_d_exports, u as Page, v as PageTreeBuilder, w as ContentStorageFile, x as PageTreeTransformer, y as PageTreeBuilderContext } from "../index-Bn_dIR1t.js";
4
+ import "../index-Skpc1DNd.js";
3
5
  export { ContentStorage, ContentStorageFile, ContentStorageMetaFile, ContentStoragePageFile, FileSystem, InferMetaType, InferPageType, LoaderConfig, LoaderOptions, LoaderOutput, LoaderPlugin, LoaderPluginOption, Meta, MetaData, Page, PageData, PageTreeBuilder, PageTreeBuilderContext, PageTreeOptions, PageTreeTransformer, path_d_exports as PathUtils, ResolvedLoaderConfig, Source, SourceConfig, VirtualFile, _ConfigUnion_, _SourceUpdate_, buildContentStorage, createGetUrl, createPageTreeBuilder, getSlugs, loader, multiple, source, update };
@@ -1,8 +1,8 @@
1
- import { t as normalizeUrl } from "../normalize-url-CEfNKxaE.js";
2
- import { c as visit } from "../utils-D10VxgVc.js";
3
- import { a as path_exports, i as joinPath, n as dirname, o as slash, r as extname, s as splitPath, t as basename } from "../path-CECfI3nn.js";
1
+ import { t as normalizeUrl } from "../normalize-url-D88zV54r.js";
2
+ import { c as visit } from "../utils-BllAiz19.js";
3
+ import { a as path_exports, i as joinPath, n as dirname, o as slash, r as extname, s as splitPath, t as basename } from "../path-B48ZWv8k.js";
4
4
  import { getSlugs, slugsPlugin } from "./plugins/slugs.js";
5
- import { t as iconPlugin } from "../icon-CL3r1pNG.js";
5
+ import { t as iconPlugin } from "../icon-D9W4ODUt.js";
6
6
  import path from "node:path";
7
7
 
8
8
  //#region src/source/source.ts
@@ -213,7 +213,8 @@ function transformerFallback() {
213
213
  }
214
214
  if (isolatedStorage.getFiles().length === 0) return root;
215
215
  root.fallback = this.builder.build(isolatedStorage, {
216
- ...this.options,
216
+ noRef: this.noRef,
217
+ transformers: this.transformers,
217
218
  id: `fallback-${root.$id ?? ""}`,
218
219
  generateFallback: false
219
220
  });
@@ -261,7 +262,7 @@ function createPageTreeBuilder(loaderConfig) {
261
262
  rootId,
262
263
  transformers,
263
264
  builder: this,
264
- options,
265
+ noRef: options.noRef ?? false,
265
266
  getUrl: url,
266
267
  locale,
267
268
  storage,
@@ -289,7 +290,39 @@ function createFlattenPathResolver(storage) {
289
290
  }
290
291
  function createPageTreeBuilderUtils(ctx) {
291
292
  const resolveFlattenPath = createFlattenPathResolver(ctx.storage);
292
- const visitedPaths = /* @__PURE__ */ new Set();
293
+ /** virtual file path -> output page tree node (if built) */
294
+ const pathToNode = /* @__PURE__ */ new Map();
295
+ const nodeOwner = /* @__PURE__ */ new Map();
296
+ /**
297
+ * when a node is referenced by multiple folders via `...`, this determines which owner they should belong to.
298
+ *
299
+ * @returns whether the owner owns the node.
300
+ */
301
+ function registerOwner(ownerPath, node, priority) {
302
+ const existing = nodeOwner.get(node);
303
+ if (!existing) {
304
+ nodeOwner.set(node, {
305
+ owner: ownerPath,
306
+ priority
307
+ });
308
+ return true;
309
+ }
310
+ if (existing.owner === ownerPath) {
311
+ existing.priority = Math.max(existing.priority, priority);
312
+ return true;
313
+ }
314
+ if (existing.priority >= priority) return false;
315
+ const folder = pathToNode.get(existing.owner);
316
+ if (folder && folder.type === "folder") if (folder.index === node) delete folder.index;
317
+ else folder.children = folder.children.filter((child) => child !== node);
318
+ existing.owner = ownerPath;
319
+ existing.priority = priority;
320
+ return true;
321
+ }
322
+ function transferOwner(ownerPath, node) {
323
+ const existing = nodeOwner.get(node);
324
+ if (existing) existing.owner = ownerPath;
325
+ }
293
326
  function nextNodeId(localId = ctx.generateNodeId()) {
294
327
  return `${ctx.rootId}:${localId}`;
295
328
  }
@@ -311,11 +344,14 @@ function createPageTreeBuilderUtils(ctx) {
311
344
  items.push(...folders);
312
345
  return items;
313
346
  },
314
- resolveFolderItem(folderPath, item) {
315
- if (item === rest || item === restReversed) return item;
347
+ resolveFolderItem(folderPath, item, outputArray, excludedPaths) {
348
+ if (item === rest || item === restReversed) {
349
+ outputArray.push(item);
350
+ return;
351
+ }
316
352
  let match = separator.exec(item);
317
353
  if (match?.groups) {
318
- let node = {
354
+ let node$1 = {
319
355
  $id: nextNodeId(),
320
356
  type: "separator",
321
357
  icon: match.groups.icon,
@@ -323,14 +359,15 @@ function createPageTreeBuilderUtils(ctx) {
323
359
  };
324
360
  for (const transformer of ctx.transformers) {
325
361
  if (!transformer.separator) continue;
326
- node = transformer.separator.call(ctx, node);
362
+ node$1 = transformer.separator.call(ctx, node$1);
327
363
  }
328
- return [node];
364
+ outputArray.push(node$1);
365
+ return;
329
366
  }
330
367
  match = link.exec(item);
331
368
  if (match?.groups) {
332
369
  const { icon, url, name, external } = match.groups;
333
- let node = {
370
+ let node$1 = {
334
371
  $id: nextNodeId(),
335
372
  type: "page",
336
373
  icon,
@@ -340,52 +377,64 @@ function createPageTreeBuilderUtils(ctx) {
340
377
  };
341
378
  for (const transformer of ctx.transformers) {
342
379
  if (!transformer.file) continue;
343
- node = transformer.file.call(ctx, node);
380
+ node$1 = transformer.file.call(ctx, node$1);
344
381
  }
345
- return [node];
382
+ outputArray.push(node$1);
383
+ return;
346
384
  }
347
- const isExcept = item.startsWith(excludePrefix);
348
- const isExtract = !isExcept && item.startsWith(extractPrefix);
349
- let filename = item;
350
- if (isExcept) filename = item.slice(1);
351
- else if (isExtract) filename = item.slice(3);
352
- const path$1 = resolveFlattenPath(joinPath(folderPath, filename), "page");
353
- if (isExcept) {
354
- visitedPaths.add(path$1);
355
- return [];
385
+ if (item.startsWith(excludePrefix)) {
386
+ excludedPaths.add(resolveFlattenPath(joinPath(folderPath, item.slice(1)), "page"));
387
+ return;
388
+ }
389
+ if (item.startsWith(extractPrefix)) {
390
+ const path$2 = joinPath(folderPath, item.slice(3));
391
+ const node$1 = this.folder(path$2, false);
392
+ if (!node$1) return;
393
+ excludedPaths.add(path$2);
394
+ if (registerOwner(folderPath, node$1, 2)) for (const child of node$1.children) {
395
+ transferOwner(folderPath, node$1);
396
+ outputArray.push(child);
397
+ }
398
+ else for (const child of node$1.children) if (registerOwner(folderPath, child, 2)) outputArray.push(child);
399
+ return;
400
+ }
401
+ const path$1 = resolveFlattenPath(joinPath(folderPath, item), "page");
402
+ const node = this.folder(path$1, false) ?? this.file(path$1);
403
+ if (node) {
404
+ if (registerOwner(folderPath, node, 2)) outputArray.push(node);
405
+ excludedPaths.add(path$1);
356
406
  }
357
- const dirNode = this.folder(path$1, false);
358
- if (dirNode) return isExtract ? dirNode.children : [dirNode];
359
- const fileNode = this.file(path$1);
360
- return fileNode ? [fileNode] : [];
361
407
  },
362
408
  folder(folderPath, isGlobalRoot) {
363
- const { storage, options, transformers } = ctx;
364
- const files = storage.readDir(folderPath);
409
+ const cached = pathToNode.get(folderPath);
410
+ if (cached) return cached;
411
+ const files = ctx.storage.readDir(folderPath);
365
412
  if (!files) return;
366
413
  const metaPath = resolveFlattenPath(joinPath(folderPath, "meta"), "meta");
367
414
  const indexPath = resolveFlattenPath(joinPath(folderPath, "index"), "page");
368
- let meta = storage.read(metaPath);
415
+ let meta = ctx.storage.read(metaPath);
369
416
  if (meta && meta.format !== "meta") meta = void 0;
370
417
  const metadata = meta?.data ?? {};
371
- const { root = isGlobalRoot, pages } = metadata;
372
418
  let index;
373
- let children;
374
- if (pages) {
375
- const resolved = pages.flatMap((item) => this.resolveFolderItem(folderPath, item));
376
- if (!root && !visitedPaths.has(indexPath)) index = this.file(indexPath);
377
- for (let i = 0; i < resolved.length; i++) {
378
- const item = resolved[i];
379
- if (item !== rest && item !== restReversed) continue;
380
- const items = this.buildPaths(files.filter((file) => !visitedPaths.has(file)), item === restReversed);
381
- resolved.splice(i, 1, ...items);
382
- break;
383
- }
384
- children = resolved;
385
- } else {
386
- if (!root && !visitedPaths.has(indexPath)) index = this.file(indexPath);
387
- children = this.buildPaths(files.filter((file) => !visitedPaths.has(file)));
419
+ const children = [];
420
+ if (!(metadata.root ?? isGlobalRoot)) {
421
+ const file = this.file(indexPath);
422
+ if (file && registerOwner(folderPath, file, 0)) index = file;
388
423
  }
424
+ if (metadata.pages) {
425
+ const outputArray = [];
426
+ const excludedPaths = /* @__PURE__ */ new Set();
427
+ for (const item of metadata.pages) this.resolveFolderItem(folderPath, item, outputArray, excludedPaths);
428
+ for (const item of outputArray) {
429
+ if (item !== rest && item !== restReversed) {
430
+ if (item === index) index = void 0;
431
+ children.push(item);
432
+ continue;
433
+ }
434
+ const resolvedItem = this.buildPaths(files.filter((file) => !excludedPaths.has(file)), item === restReversed);
435
+ for (const child of resolvedItem) if (registerOwner(folderPath, child, 0)) children.push(child);
436
+ }
437
+ } else for (const item of this.buildPaths(files)) if (item !== index && registerOwner(folderPath, item, 0)) children.push(item);
389
438
  let node = {
390
439
  type: "folder",
391
440
  name: metadata.title ?? index?.name ?? (() => {
@@ -400,19 +449,20 @@ function createPageTreeBuilderUtils(ctx) {
400
449
  index,
401
450
  children,
402
451
  $id: nextNodeId(folderPath),
403
- $ref: !options.noRef && meta ? { metaFile: metaPath } : void 0
452
+ $ref: !ctx.noRef && meta ? { metaFile: metaPath } : void 0
404
453
  };
405
- visitedPaths.add(folderPath);
406
- for (const transformer of transformers) {
454
+ for (const transformer of ctx.transformers) {
407
455
  if (!transformer.folder) continue;
408
456
  node = transformer.folder.call(ctx, node, folderPath, metaPath);
409
457
  }
458
+ pathToNode.set(folderPath, node);
410
459
  return node;
411
460
  },
412
461
  file(path$1) {
413
- const { options, getUrl, storage, locale, transformers } = ctx;
414
- const page = storage.read(path$1);
415
- if (page?.format !== "page") return;
462
+ const cached = pathToNode.get(path$1);
463
+ if (cached) return cached;
464
+ const page = ctx.storage.read(path$1);
465
+ if (!page || page.format !== "page") return;
416
466
  const { title, description, icon } = page.data;
417
467
  let item = {
418
468
  $id: nextNodeId(path$1),
@@ -420,14 +470,14 @@ function createPageTreeBuilderUtils(ctx) {
420
470
  name: title ?? pathToName(basename(path$1, extname(path$1))),
421
471
  description,
422
472
  icon,
423
- url: getUrl(page.slugs, locale),
424
- $ref: !options.noRef ? { file: path$1 } : void 0
473
+ url: ctx.getUrl(page.slugs, ctx.locale),
474
+ $ref: !ctx.noRef ? { file: path$1 } : void 0
425
475
  };
426
- visitedPaths.add(path$1);
427
- for (const transformer of transformers) {
476
+ for (const transformer of ctx.transformers) {
428
477
  if (!transformer.file) continue;
429
478
  item = transformer.file.call(ctx, item, path$1);
430
479
  }
480
+ pathToNode.set(path$1, item);
431
481
  return item;
432
482
  },
433
483
  root() {
@@ -591,13 +641,16 @@ function loader(...args) {
591
641
  },
592
642
  async serializePageTree(tree) {
593
643
  const { renderToString } = await import("react-dom/server.edge");
594
- return visit(tree, (node) => {
595
- node = { ...node };
596
- if ("icon" in node && node.icon) node.icon = renderToString(node.icon);
597
- if (node.name) node.name = renderToString(node.name);
598
- if ("children" in node) node.children = [...node.children];
599
- return node;
600
- });
644
+ return {
645
+ $fumadocs_loader: "page-tree",
646
+ data: visit(tree, (node) => {
647
+ node = { ...node };
648
+ if ("icon" in node && node.icon) node.icon = renderToString(node.icon);
649
+ if (node.name) node.name = renderToString(node.name);
650
+ if ("children" in node) node.children = [...node.children];
651
+ return node;
652
+ })
653
+ };
601
654
  }
602
655
  };
603
656
  }
@@ -632,5 +685,4 @@ function buildPlugins(plugins, sort = true) {
632
685
  }
633
686
 
634
687
  //#endregion
635
- export { FileSystem, path_exports as PathUtils, createGetUrl, getSlugs, loader, multiple, source, update };
636
- //# sourceMappingURL=index.js.map
688
+ export { FileSystem, path_exports as PathUtils, createGetUrl, getSlugs, loader, multiple, source, update };
@@ -1,5 +1,7 @@
1
- import "../../definitions-Ca2P2viV.js";
2
- import { s as LoaderPlugin } from "../../index-k5KwKJ_c.js";
1
+ import "../../definitions-fBNEDML4.js";
2
+ import "../../index-DbVQNAN8.js";
3
+ import { s as LoaderPlugin } from "../../index-Bn_dIR1t.js";
4
+ import "../../index-Skpc1DNd.js";
3
5
  import { icons } from "lucide-react";
4
6
 
5
7
  //#region src/source/plugins/lucide-icons.d.ts
@@ -10,5 +12,4 @@ declare function lucideIconsPlugin(options?: {
10
12
  defaultIcon?: keyof typeof icons;
11
13
  }): LoaderPlugin;
12
14
  //#endregion
13
- export { lucideIconsPlugin };
14
- //# sourceMappingURL=lucide-icons.d.ts.map
15
+ export { lucideIconsPlugin };
@@ -1,4 +1,4 @@
1
- import { t as iconPlugin } from "../../icon-CL3r1pNG.js";
1
+ import { t as iconPlugin } from "../../icon-D9W4ODUt.js";
2
2
  import { createElement } from "react";
3
3
  import { icons } from "lucide-react";
4
4
 
@@ -20,5 +20,4 @@ function lucideIconsPlugin(options = {}) {
20
20
  }
21
21
 
22
22
  //#endregion
23
- export { lucideIconsPlugin };
24
- //# sourceMappingURL=lucide-icons.js.map
23
+ export { lucideIconsPlugin };
@@ -1,3 +1,5 @@
1
- import "../../definitions-Ca2P2viV.js";
2
- import { _ as slugsPlugin, g as slugsFromData, h as getSlugs, m as SlugFn } from "../../index-k5KwKJ_c.js";
1
+ import "../../definitions-fBNEDML4.js";
2
+ import "../../index-DbVQNAN8.js";
3
+ import { _ as slugsPlugin, g as slugsFromData, h as getSlugs, m as SlugFn } from "../../index-Bn_dIR1t.js";
4
+ import "../../index-Skpc1DNd.js";
3
5
  export { SlugFn, getSlugs, slugsFromData, slugsPlugin };
@@ -1,4 +1,4 @@
1
- import { n as dirname, r as extname, t as basename } from "../../path-CECfI3nn.js";
1
+ import { n as dirname, r as extname, t as basename } from "../../path-B48ZWv8k.js";
2
2
 
3
3
  //#region src/source/plugins/slugs.ts
4
4
  /**
@@ -61,5 +61,4 @@ function getSlugs(file) {
61
61
  }
62
62
 
63
63
  //#endregion
64
- export { getSlugs, slugsFromData, slugsPlugin };
65
- //# sourceMappingURL=slugs.js.map
64
+ export { getSlugs, slugsFromData, slugsPlugin };