fumadocs-core 16.7.11 → 16.7.13

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 (118) hide show
  1. package/dist/{advanced-B6xijHpk.js → advanced-Bv_qi9IC.js} +1 -1
  2. package/dist/{algolia-CV1p_BGs.d.ts → algolia-DphIPKrc.d.ts} +1 -1
  3. package/dist/breadcrumb.d.ts +1 -1
  4. package/dist/{build-doc-CRrL6r30.js → build-doc-DKBeOVIN.js} +1 -1
  5. package/dist/{client-DwXJpdzf.d.ts → client-D3PZ2z2N.d.ts} +3 -3
  6. package/dist/content/mdx/preset-bundler.d.ts +7 -7
  7. package/dist/content/mdx/preset-bundler.js +1 -1
  8. package/dist/content/mdx/preset-runtime.d.ts +7 -7
  9. package/dist/content/mdx/preset-runtime.js +1 -1
  10. package/dist/content/toc.d.ts +1 -1
  11. package/dist/dist-BvsXWCqT.js +808 -0
  12. package/dist/fromFile-rjAsJGw3.js +845 -0
  13. package/dist/highlight/shiki/full.d.ts +1 -1
  14. package/dist/highlight/shiki/index.d.ts +1 -1
  15. package/dist/highlight/shiki/react.d.ts +2 -2
  16. package/dist/i18n/index.d.ts +1 -1
  17. package/dist/i18n/middleware.d.ts +1 -1
  18. package/dist/i18n/middleware.js +3763 -2
  19. package/dist/{index-DkqXqEn8.d.ts → index-9M3g3SDy.d.ts} +3 -3
  20. package/dist/{index-D-UKvVrz.d.ts → index-Bm0msojm.d.ts} +1 -1
  21. package/dist/{index-D2XxhP9t.d.ts → index-C4kyQCbj.d.ts} +1 -1
  22. package/dist/{index-Ca0YkTYK2.d.ts → index-CDOu1Gxx2.d.ts} +1 -1
  23. package/dist/mdx-plugins/codeblock-utils.d.ts +1 -1
  24. package/dist/mdx-plugins/index.d.ts +17 -17
  25. package/dist/mdx-plugins/index.js +2 -2
  26. package/dist/mdx-plugins/rehype-code.core.d.ts +1 -1
  27. package/dist/mdx-plugins/rehype-code.core.js +1 -1
  28. package/dist/mdx-plugins/rehype-code.d.ts +2 -2
  29. package/dist/mdx-plugins/rehype-code.js +1 -1
  30. package/dist/mdx-plugins/rehype-toc.d.ts +1 -1
  31. package/dist/mdx-plugins/remark-admonition.d.ts +1 -1
  32. package/dist/mdx-plugins/remark-code-tab.d.ts +1 -1
  33. package/dist/mdx-plugins/remark-directive-admonition.d.ts +1 -1
  34. package/dist/mdx-plugins/remark-feedback-block.d.ts +1 -1
  35. package/dist/mdx-plugins/remark-gfm.d.ts +1 -1
  36. package/dist/mdx-plugins/remark-heading.d.ts +1 -1
  37. package/dist/mdx-plugins/remark-image.d.ts +1 -1
  38. package/dist/mdx-plugins/remark-image.js +2 -2
  39. package/dist/mdx-plugins/remark-llms.d.ts +1 -1
  40. package/dist/mdx-plugins/remark-llms.runtime.d.ts +1 -1
  41. package/dist/mdx-plugins/remark-mdx-files.d.ts +1 -1
  42. package/dist/mdx-plugins/remark-mdx-mermaid.d.ts +1 -1
  43. package/dist/mdx-plugins/remark-npm.d.ts +1 -1
  44. package/dist/mdx-plugins/remark-npm.js +1 -64
  45. package/dist/mdx-plugins/remark-steps.d.ts +1 -1
  46. package/dist/mdx-plugins/remark-structure.d.ts +1 -1
  47. package/dist/mdx-plugins/stringifier.d.ts +1 -1
  48. package/dist/negotiation/index.js +1 -37
  49. package/dist/negotiation-CMIpYwJJ.js +1021 -0
  50. package/dist/page-tree/index.d.ts +2 -2
  51. package/dist/{rehype-code-CMrTh9Lu.d.ts → rehype-code-BceXtwzN.d.ts} +1 -1
  52. package/dist/{rehype-code.core-AAMsXdqJ.d.ts → rehype-code.core-DfJelVqH.d.ts} +2 -2
  53. package/dist/{remark-heading-95OQNNoH.d.ts → remark-heading-C3ZesmHL.d.ts} +1 -1
  54. package/dist/{remark-llms-Bjyq1jdk.d.ts → remark-llms-4bK9f_wN.d.ts} +1 -1
  55. package/dist/remark-npm-DIGXA7E3.js +593 -0
  56. package/dist/{remark-structure-c-gm2PCy.d.ts → remark-structure-DLKk-p9t.d.ts} +1 -1
  57. package/dist/search/algolia.d.ts +1 -1
  58. package/dist/search/client/algolia.d.ts +1 -1
  59. package/dist/search/client/fetch.d.ts +1 -1
  60. package/dist/search/client/flexsearch-static.d.ts +1 -1
  61. package/dist/search/client/flexsearch-static.js +1 -1
  62. package/dist/search/client/mixedbread.d.ts +1 -1
  63. package/dist/search/client/mixedbread.js +1 -1
  64. package/dist/search/client/orama-cloud-legacy.d.ts +1 -1
  65. package/dist/search/client/orama-cloud-legacy.js +1 -1
  66. package/dist/search/client/orama-cloud.d.ts +1 -1
  67. package/dist/search/client/orama-cloud.js +1 -1
  68. package/dist/search/client/orama-static.d.ts +1 -1
  69. package/dist/search/client/orama-static.js +1 -1
  70. package/dist/search/client.d.ts +1 -1
  71. package/dist/search/flexsearch.d.ts +4 -4
  72. package/dist/search/flexsearch.js +3 -3
  73. package/dist/search/index.d.ts +1 -1
  74. package/dist/search/mixedbread.d.ts +2 -2
  75. package/dist/search/mixedbread.js +2 -2
  76. package/dist/search/orama-cloud-legacy.d.ts +1 -1
  77. package/dist/search/orama-cloud.d.ts +1 -1
  78. package/dist/search/server.d.ts +1 -1
  79. package/dist/search/server.js +3 -3
  80. package/dist/{server-B89IM_4v.d.ts → server-D74cMtck.d.ts} +5 -5
  81. package/dist/source/client/index.d.ts +1 -1
  82. package/dist/source/index.d.ts +1 -1
  83. package/dist/source/index.js +2 -2
  84. package/dist/source/plugins/lucide-icons.d.ts +1 -1
  85. package/dist/source/plugins/lucide-icons.js +1 -1
  86. package/dist/source/plugins/slugs.d.ts +1 -1
  87. package/dist/source/plugins/slugs.js +1 -1
  88. package/dist/source/plugins/status-badges.d.ts +2 -2
  89. package/dist/toc.d.ts +1 -1
  90. package/dist/toc.js +12 -26
  91. package/package.json +87 -103
  92. /package/dist/{codeblock-utils-DuhKfwET.d.ts → codeblock-utils-BMoNeXUb.d.ts} +0 -0
  93. /package/dist/{definitions-j1YD3oZE.d.ts → definitions-DH0vdUJV.d.ts} +0 -0
  94. /package/dist/{endpoint-Bs6bqGYq.js → endpoint-BWgZs3LL.js} +0 -0
  95. /package/dist/{icon-CfEtMzdP.js → icon-DXrdIp2K.js} +0 -0
  96. /package/dist/{index-DAzunKMp.d.ts → index-B_5tvyCk.d.ts} +0 -0
  97. /package/dist/{index-CQ5TBOzH.d.ts → index-WhA-NTMB.d.ts} +0 -0
  98. /package/dist/{path-CL7hf0GY.js → path-ClKaiDuq.js} +0 -0
  99. /package/dist/{rehype-code.core-23F1yz08.js → rehype-code.core-B9asBGBz.js} +0 -0
  100. /package/dist/{rehype-toc-iWxg6ELI.d.ts → rehype-toc-Dk5ozAin.d.ts} +0 -0
  101. /package/dist/{remark-admonition-0gZM40ZU.d.ts → remark-admonition-D6mMI676.d.ts} +0 -0
  102. /package/dist/{remark-code-tab-Dk79zZwn.d.ts → remark-code-tab-Cl4XxpJ9.d.ts} +0 -0
  103. /package/dist/{remark-directive-admonition-CxFIkQ_i.d.ts → remark-directive-admonition-BJwUZuIt.d.ts} +0 -0
  104. /package/dist/{remark-feedback-block-CehhnqT0.d.ts → remark-feedback-block-PeBl_Fvl.d.ts} +0 -0
  105. /package/dist/{remark-gfm-DIHBRjLx.d.ts → remark-gfm-IilhXQUz.d.ts} +0 -0
  106. /package/dist/{remark-image-DQlJevNY.d.ts → remark-image-Co-rKW87.d.ts} +0 -0
  107. /package/dist/{remark-mdx-files-C50nFvnY.d.ts → remark-mdx-files-Ba1Yf3sk.d.ts} +0 -0
  108. /package/dist/{remark-mdx-mermaid-BkA2vurg.d.ts → remark-mdx-mermaid-DPDDbIZJ.d.ts} +0 -0
  109. /package/dist/{remark-npm-7SDuqMc6.d.ts → remark-npm-B7OPb7Ze.d.ts} +0 -0
  110. /package/dist/{remark-steps-DsnXM6Xj.d.ts → remark-steps-PxfBg8ws.d.ts} +0 -0
  111. /package/dist/{remove-markdown-Cte6pwYx.js → remove-markdown-CQ--9YPQ.js} +0 -0
  112. /package/dist/{remove-undefined-PK1FA5gc.js → remove-undefined-DLE4y6II.js} +0 -0
  113. /package/dist/{stringifier-l_KdmdPb.d.ts → stringifier-D6T4zhkn.d.ts} +0 -0
  114. /package/dist/{toc-CgnJPi4Q.d.ts → toc-DXlLlbv_.d.ts} +0 -0
  115. /package/dist/{types-Dr0HqbXP.d.ts → types-D8S_yMgI.d.ts} +0 -0
  116. /package/dist/{util-D2LMvKsn.d.ts → util-CZD_oO6N.d.ts} +0 -0
  117. /package/dist/{util-BnfE-P1F.js → util-D3lJGMcv.js} +0 -0
  118. /package/dist/{utils-D_KDPEof.js → utils-CEyx3kFf.js} +0 -0
@@ -1,2 +1,2 @@
1
- import { d as OramaCloudOptions, f as oramaCloudClient } from "../../client-DwXJpdzf.js";
1
+ import { d as OramaCloudOptions, f as oramaCloudClient } from "../../client-D3PZ2z2N.js";
2
2
  export { OramaCloudOptions, oramaCloudClient };
@@ -1,5 +1,5 @@
1
1
  import { createContentHighlighter } from "../index.js";
2
- import { t as removeUndefined } from "../../remove-undefined-PK1FA5gc.js";
2
+ import { t as removeUndefined } from "../../remove-undefined-DLE4y6II.js";
3
3
  //#region src/search/client/orama-cloud.ts
4
4
  function oramaCloudClient(options) {
5
5
  const { index = "default", client, params: extraParams, tag } = options;
@@ -1,2 +1,2 @@
1
- import { g as oramaStaticClient, h as StaticOptions } from "../../client-DwXJpdzf.js";
1
+ import { g as oramaStaticClient, h as StaticOptions } from "../../client-D3PZ2z2N.js";
2
2
  export { StaticOptions, oramaStaticClient };
@@ -1,4 +1,4 @@
1
- import { n as searchSimple, t as searchAdvanced } from "../../advanced-B6xijHpk.js";
1
+ import { n as searchSimple, t as searchAdvanced } from "../../advanced-Bv_qi9IC.js";
2
2
  import { create, load } from "@orama/orama";
3
3
  //#region src/search/client/orama-static.ts
4
4
  const cache = /* @__PURE__ */ new Map();
@@ -1,2 +1,2 @@
1
- import { _ as FetchOptions, d as OramaCloudOptions, h as StaticOptions, n as SearchClient, p as AlgoliaOptions, r as useDocsSearch, t as ClientPreset } from "../client-DwXJpdzf.js";
1
+ import { _ as FetchOptions, d as OramaCloudOptions, h as StaticOptions, n as SearchClient, p as AlgoliaOptions, r as useDocsSearch, t as ClientPreset } from "../client-D3PZ2z2N.js";
2
2
  export { AlgoliaOptions, ClientPreset, FetchOptions, OramaCloudOptions, SearchClient, StaticOptions, useDocsSearch };
@@ -1,7 +1,7 @@
1
- import { t as Awaitable } from "../types-Dr0HqbXP.js";
2
- import { t as I18nConfig } from "../index-DAzunKMp.js";
3
- import { m as SharedIndex, n as SearchAPI, t as QueryOptions } from "../server-B89IM_4v.js";
4
- import { i as LoaderConfig, o as LoaderOutput, u as Page } from "../index-DkqXqEn8.js";
1
+ import { t as Awaitable } from "../types-D8S_yMgI.js";
2
+ import { t as I18nConfig } from "../index-B_5tvyCk.js";
3
+ import { m as SharedIndex, n as SearchAPI, t as QueryOptions } from "../server-D74cMtck.js";
4
+ import { i as LoaderConfig, o as LoaderOutput, u as Page } from "../index-9M3g3SDy.js";
5
5
  import { DocumentData, DocumentOptions } from "flexsearch";
6
6
 
7
7
  //#region src/search/server/build-doc.d.ts
@@ -1,6 +1,6 @@
1
- import { t as createEndpoint } from "../endpoint-Bs6bqGYq.js";
2
- import { n as buildBreadcrumbs, r as buildIndexDefault, t as buildDocuments } from "../build-doc-CRrL6r30.js";
3
- import { n as search, t as createDocument } from "../utils-D_KDPEof.js";
1
+ import { t as createEndpoint } from "../endpoint-BWgZs3LL.js";
2
+ import { n as buildBreadcrumbs, r as buildIndexDefault, t as buildDocuments } from "../build-doc-DKBeOVIN.js";
3
+ import { n as search, t as createDocument } from "../utils-CEyx3kFf.js";
4
4
  import Search from "flexsearch";
5
5
  //#region src/search/flexsearch.ts
6
6
  function server(options) {
@@ -1,2 +1,2 @@
1
- import { i as createContentHighlighter, n as ReactSortedResult, r as SortedResult, t as HighlightedText } from "../index-CQ5TBOzH.js";
1
+ import { i as createContentHighlighter, n as ReactSortedResult, r as SortedResult, t as HighlightedText } from "../index-WhA-NTMB.js";
2
2
  export { HighlightedText, ReactSortedResult, SortedResult, createContentHighlighter };
@@ -1,5 +1,5 @@
1
- import { r as SortedResult } from "../index-CQ5TBOzH.js";
2
- import { n as SearchAPI } from "../server-B89IM_4v.js";
1
+ import { r as SortedResult } from "../index-WhA-NTMB.js";
2
+ import { n as SearchAPI } from "../server-D74cMtck.js";
3
3
  import Mixedbread from "@mixedbread/sdk";
4
4
  import { StoreSearchResponse } from "@mixedbread/sdk/resources/stores";
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { r as __toESM } from "../chunk-BoAXSpZd.js";
2
- import { t as createEndpoint } from "../endpoint-Bs6bqGYq.js";
3
- import { t as require_remove_markdown } from "../remove-markdown-Cte6pwYx.js";
2
+ import { t as createEndpoint } from "../endpoint-BWgZs3LL.js";
3
+ import { t as require_remove_markdown } from "../remove-markdown-CQ--9YPQ.js";
4
4
  import Slugger from "github-slugger";
5
5
  //#region src/search/mixedbread.ts
6
6
  var import_remove_markdown = /* @__PURE__ */ __toESM(require_remove_markdown(), 1);
@@ -1,4 +1,4 @@
1
- import { i as StructuredData } from "../remark-structure-c-gm2PCy.js";
1
+ import { i as StructuredData } from "../remark-structure-DLKk-p9t.js";
2
2
  import { CloudManager } from "@oramacloud/client";
3
3
 
4
4
  //#region src/search/orama-cloud-legacy.d.ts
@@ -1,4 +1,4 @@
1
- import { i as StructuredData } from "../remark-structure-c-gm2PCy.js";
1
+ import { i as StructuredData } from "../remark-structure-DLKk-p9t.js";
2
2
  import { OramaCloud } from "@orama/core";
3
3
 
4
4
  //#region src/search/orama-cloud.d.ts
@@ -1,2 +1,2 @@
1
- import { a as AdvancedOptions, c as SimpleOptions, d as createSearchAPI, f as initAdvancedSearch, i as AdvancedIndex, l as createFromSource, n as SearchAPI, o as ExportedData, p as initSimpleSearch, r as SearchServer, s as Index, t as QueryOptions, u as createI18nSearchAPI } from "../server-B89IM_4v.js";
1
+ import { a as AdvancedOptions, c as SimpleOptions, d as createSearchAPI, f as initAdvancedSearch, i as AdvancedIndex, l as createFromSource, n as SearchAPI, o as ExportedData, p as initSimpleSearch, r as SearchServer, s as Index, t as QueryOptions, u as createI18nSearchAPI } from "../server-D74cMtck.js";
2
2
  export { AdvancedIndex, AdvancedOptions, ExportedData, Index, QueryOptions, SearchAPI, SearchServer, SimpleOptions, createFromSource, createI18nSearchAPI, createSearchAPI, initAdvancedSearch, initSimpleSearch };
@@ -1,6 +1,6 @@
1
- import { n as defaultReadOptions, t as createEndpoint } from "../endpoint-Bs6bqGYq.js";
2
- import { n as buildBreadcrumbs, r as buildIndexDefault, t as buildDocuments } from "../build-doc-CRrL6r30.js";
3
- import { n as searchSimple, t as searchAdvanced } from "../advanced-B6xijHpk.js";
1
+ import { n as defaultReadOptions, t as createEndpoint } from "../endpoint-BWgZs3LL.js";
2
+ import { n as buildBreadcrumbs, r as buildIndexDefault, t as buildDocuments } from "../build-doc-DKBeOVIN.js";
3
+ import { n as searchSimple, t as searchAdvanced } from "../advanced-Bv_qi9IC.js";
4
4
  import { create, insertMultiple, save } from "@orama/orama";
5
5
  //#region src/search/orama/_stemmers.ts
6
6
  const STEMMERS = {
@@ -1,8 +1,8 @@
1
- import { t as Awaitable } from "./types-Dr0HqbXP.js";
2
- import { i as StructuredData } from "./remark-structure-c-gm2PCy.js";
3
- import { t as I18nConfig } from "./index-DAzunKMp.js";
4
- import { r as SortedResult } from "./index-CQ5TBOzH.js";
5
- import { i as LoaderConfig, o as LoaderOutput, u as Page } from "./index-DkqXqEn8.js";
1
+ import { t as Awaitable } from "./types-D8S_yMgI.js";
2
+ import { i as StructuredData } from "./remark-structure-DLKk-p9t.js";
3
+ import { t as I18nConfig } from "./index-B_5tvyCk.js";
4
+ import { r as SortedResult } from "./index-WhA-NTMB.js";
5
+ import { i as LoaderConfig, o as LoaderOutput, u as Page } from "./index-9M3g3SDy.js";
6
6
  import { Language, Orama, RawData, SearchParams, TypedDocument, create } from "@orama/orama";
7
7
 
8
8
  //#region src/search/orama/create-db.d.ts
@@ -1,2 +1,2 @@
1
- import { i as useFumadocsLoader, n as SerializedPageTree, r as deserializePageTree, t as Serialized } from "../../index-Ca0YkTYK2.js";
1
+ import { i as useFumadocsLoader, n as SerializedPageTree, r as deserializePageTree, t as Serialized } from "../../index-CDOu1Gxx2.js";
2
2
  export { Serialized, SerializedPageTree, deserializePageTree, useFumadocsLoader };
@@ -1,2 +1,2 @@
1
- import { A as PageData, C as PageTreeTransformer, D as ContentStoragePageFile, E as ContentStorageMetaFile, 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 PageTreeOptions, T as ContentStorageFile, _ as getSlugs, a as LoaderOptions, b as PageTreeBuilder, c as LoaderPluginOption, d as ResolvedLoaderConfig, f as createGetUrl, h as llms, i as LoaderConfig, j as Source, k as MetaData, l as Meta, m as LLMsConfig, n as InferMetaType, o as LoaderOutput, p as loader, r as InferPageType, s as LoaderPlugin, t as path_d_exports, u as Page, w as ContentStorage, x as PageTreeBuilderContext } from "../index-DkqXqEn8.js";
1
+ import { A as PageData, C as PageTreeTransformer, D as ContentStoragePageFile, E as ContentStorageMetaFile, 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 PageTreeOptions, T as ContentStorageFile, _ as getSlugs, a as LoaderOptions, b as PageTreeBuilder, c as LoaderPluginOption, d as ResolvedLoaderConfig, f as createGetUrl, h as llms, i as LoaderConfig, j as Source, k as MetaData, l as Meta, m as LLMsConfig, n as InferMetaType, o as LoaderOutput, p as loader, r as InferPageType, s as LoaderPlugin, t as path_d_exports, u as Page, w as ContentStorage, x as PageTreeBuilderContext } from "../index-9M3g3SDy.js";
2
2
  export { ContentStorage, ContentStorageFile, ContentStorageMetaFile, ContentStoragePageFile, FileSystem, InferMetaType, InferPageType, LLMsConfig, LoaderConfig, LoaderOptions, LoaderOutput, LoaderPlugin, LoaderPluginOption, Meta, MetaData, Page, PageData, PageTreeBuilder, PageTreeBuilderContext, PageTreeOptions, PageTreeTransformer, path_d_exports as PathUtils, ResolvedLoaderConfig, Source, SourceConfig, VirtualFile, _ConfigUnion_, _SourceUpdate_, createGetUrl, getSlugs, llms, loader, multiple, source, update };
@@ -1,8 +1,8 @@
1
1
  import { t as normalizeUrl } from "../normalize-url-J3kqKlu4.js";
2
2
  import { c as visit } from "../utils-BFW0mEx9.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-CL7hf0GY.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-ClKaiDuq.js";
4
4
  import { getSlugs, slugsPlugin } from "./plugins/slugs.js";
5
- import { t as iconPlugin } from "../icon-CfEtMzdP.js";
5
+ import { t as iconPlugin } from "../icon-DXrdIp2K.js";
6
6
  import path from "node:path";
7
7
  //#region src/source/source.ts
8
8
  function multiple(sources) {
@@ -1,4 +1,4 @@
1
- import { s as LoaderPlugin } from "../../index-DkqXqEn8.js";
1
+ import { s as LoaderPlugin } from "../../index-9M3g3SDy.js";
2
2
  import { icons } from "lucide-react";
3
3
 
4
4
  //#region src/source/plugins/lucide-icons.d.ts
@@ -1,4 +1,4 @@
1
- import { t as iconPlugin } from "../../icon-CfEtMzdP.js";
1
+ import { t as iconPlugin } from "../../icon-DXrdIp2K.js";
2
2
  import { createElement } from "react";
3
3
  import { icons } from "lucide-react";
4
4
  //#region src/source/plugins/lucide-icons.ts
@@ -1,2 +1,2 @@
1
- import { _ as getSlugs, g as SlugFn, v as slugsFromData, y as slugsPlugin } from "../../index-DkqXqEn8.js";
1
+ import { _ as getSlugs, g as SlugFn, v as slugsFromData, y as slugsPlugin } from "../../index-9M3g3SDy.js";
2
2
  export { SlugFn, getSlugs, slugsFromData, slugsPlugin };
@@ -1,4 +1,4 @@
1
- import { n as dirname, r as extname, t as basename } from "../../path-CL7hf0GY.js";
1
+ import { n as dirname, r as extname, t as basename } from "../../path-ClKaiDuq.js";
2
2
  //#region src/source/plugins/slugs.ts
3
3
  /**
4
4
  * Generate slugs for pages if missing
@@ -1,5 +1,5 @@
1
- import { a as Separator$1, n as Item$1, t as Folder$1 } from "../../definitions-j1YD3oZE.js";
2
- import { s as LoaderPlugin } from "../../index-DkqXqEn8.js";
1
+ import { a as Separator$1, n as Item$1, t as Folder$1 } from "../../definitions-DH0vdUJV.js";
2
+ import { s as LoaderPlugin } from "../../index-9M3g3SDy.js";
3
3
  import { ReactNode } from "react";
4
4
 
5
5
  //#region src/source/plugins/status-badges.d.ts
package/dist/toc.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as TOCItem, c as TOCItemType, d as useActiveAnchors, f as useItems, i as ScrollProviderProps, l as TableOfContents, n as AnchorProviderProps, o as TOCItemInfo, r as ScrollProvider, s as TOCItemProps, t as AnchorProvider, u as useActiveAnchor } from "./toc-CgnJPi4Q.js";
1
+ import { a as TOCItem, c as TOCItemType, d as useActiveAnchors, f as useItems, i as ScrollProviderProps, l as TableOfContents, n as AnchorProviderProps, o as TOCItemInfo, r as ScrollProvider, s as TOCItemProps, t as AnchorProvider, u as useActiveAnchor } from "./toc-DXlLlbv_.js";
2
2
  export { AnchorProvider, AnchorProviderProps, ScrollProvider, ScrollProviderProps, TOCItem, TOCItemInfo, TOCItemProps, TOCItemType, TableOfContents, useActiveAnchor, useActiveAnchors, useItems };
package/dist/toc.js CHANGED
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import { useOnChange } from "./utils/use-on-change.js";
3
2
  import { createContext, use, useEffect, useMemo, useRef, useState } from "react";
4
3
  import { jsx } from "react/jsx-runtime";
5
4
  import scrollIntoView from "scroll-into-view-if-needed";
@@ -46,43 +45,30 @@ function AnchorProvider({ toc, single = false, children }) {
46
45
  });
47
46
  }
48
47
  function TOCItem({ ref, onActiveChange = () => null, ...props }) {
48
+ const id = props.href ? getItemId(props.href) : null;
49
49
  const items = useItems();
50
+ const itemData = id ? items.find((item) => item.id === id) : null;
50
51
  const containerRef = use(ScrollContext);
51
- const id = props.href ? getItemId(props.href) : null;
52
+ const isInitialMountRef = useRef(true);
52
53
  const anchorRef = useRef(null);
53
- const [active, setActive] = useState(() => id && items.some((item) => item.active && item.id === id));
54
- const initialShouldScrollRef = useRef(null);
55
- if (initialShouldScrollRef.current === null) {
56
- const lastActive = items.findLast((item) => item.active);
57
- initialShouldScrollRef.current = lastActive !== void 0 && lastActive.id === id;
54
+ const [active, setActive] = useState(() => itemData != null && itemData.active);
55
+ if (itemData && itemData.active !== active) {
56
+ setActive(itemData.active);
57
+ onActiveChange(itemData.active);
58
58
  }
59
- useOnChange(items, () => {
60
- if (id === null) return;
61
- const currentItem = items.find((item) => item.id === id);
62
- if (!currentItem || currentItem.active === active) return;
63
- const anchor = anchorRef.current;
64
- const container = containerRef?.current;
65
- if (currentItem.active && items.every((item) => !item.active || item.t <= currentItem.t) && container && anchor) scrollIntoView(anchor, {
66
- behavior: "smooth",
67
- block: "center",
68
- inline: "center",
69
- scrollMode: "always",
70
- boundary: container
71
- });
72
- setActive(currentItem.active);
73
- onActiveChange(currentItem.active);
74
- });
59
+ const shouldScroll = itemData?.active && items.every((item) => !item.active || item.t <= itemData.t);
75
60
  useEffect(() => {
76
61
  const anchor = anchorRef.current;
77
62
  const container = containerRef?.current;
78
- if (initialShouldScrollRef.current && container && anchor) scrollIntoView(anchor, {
79
- behavior: "instant",
63
+ if (shouldScroll && container && anchor) scrollIntoView(anchor, {
64
+ behavior: isInitialMountRef.current ? "instant" : "smooth",
80
65
  block: "center",
81
66
  inline: "center",
82
67
  scrollMode: "always",
83
68
  boundary: container
84
69
  });
85
- }, [containerRef]);
70
+ isInitialMountRef.current = false;
71
+ }, [shouldScroll, containerRef]);
86
72
  return /* @__PURE__ */ jsx("a", {
87
73
  ref: mergeRefs(anchorRef, ref),
88
74
  "data-active": active,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-core",
3
- "version": "16.7.11",
3
+ "version": "16.7.13",
4
4
  "description": "The React.js library for building a documentation website",
5
5
  "keywords": [
6
6
  "Docs",
@@ -15,108 +15,82 @@
15
15
  ],
16
16
  "type": "module",
17
17
  "exports": {
18
- "./breadcrumb": {
19
- "types": "./dist/breadcrumb.d.ts",
20
- "import": "./dist/breadcrumb.js"
21
- },
22
- "./toc": {
23
- "types": "./dist/toc.d.ts",
24
- "import": "./dist/toc.js"
25
- },
26
- "./content": {
27
- "types": "./dist/content/md.d.ts",
28
- "import": "./dist/content/md.js"
29
- },
30
- "./content/*": {
31
- "types": "./dist/content/*.d.ts",
32
- "import": "./dist/content/*.js"
33
- },
34
- "./negotiation": {
35
- "types": "./dist/negotiation/index.d.ts",
36
- "import": "./dist/negotiation/index.js"
37
- },
38
- "./page-tree": {
39
- "types": "./dist/page-tree/index.d.ts",
40
- "import": "./dist/page-tree/index.js"
41
- },
42
- "./search": {
43
- "types": "./dist/search/index.d.ts",
44
- "import": "./dist/search/index.js"
45
- },
46
- "./search/*": {
47
- "types": "./dist/search/*.d.ts",
48
- "import": "./dist/search/*.js"
49
- },
50
- "./source": {
51
- "types": "./dist/source/index.d.ts",
52
- "import": "./dist/source/index.js"
53
- },
54
- "./source/client": {
55
- "types": "./dist/source/client/index.d.ts",
56
- "import": "./dist/source/client/index.js"
57
- },
58
- "./source/schema": {
59
- "types": "./dist/source/schema.d.ts",
60
- "import": "./dist/source/schema.js"
61
- },
18
+ "./breadcrumb": "./dist/breadcrumb.js",
19
+ "./content/github": "./dist/content/github.js",
20
+ "./content/md": "./dist/content/md.js",
21
+ "./content/mdx/preset-bundler": "./dist/content/mdx/preset-bundler.js",
22
+ "./content/mdx/preset-runtime": "./dist/content/mdx/preset-runtime.js",
23
+ "./content/toc": "./dist/content/toc.js",
24
+ "./dynamic-link": "./dist/dynamic-link.js",
25
+ "./framework": "./dist/framework/index.js",
26
+ "./framework/next": "./dist/framework/next.js",
27
+ "./framework/react-router": "./dist/framework/react-router.js",
28
+ "./framework/tanstack": "./dist/framework/tanstack.js",
29
+ "./framework/waku": "./dist/framework/waku.js",
30
+ "./highlight": "./dist/highlight/index.js",
31
+ "./highlight/client": "./dist/highlight/client.js",
32
+ "./highlight/shiki": "./dist/highlight/shiki/index.js",
33
+ "./highlight/shiki/full": "./dist/highlight/shiki/full.js",
34
+ "./highlight/shiki/react": "./dist/highlight/shiki/react.js",
35
+ "./i18n": "./dist/i18n/index.js",
36
+ "./i18n/middleware": "./dist/i18n/middleware.js",
37
+ "./link": "./dist/link.js",
38
+ "./mdx-plugins": "./dist/mdx-plugins/index.js",
39
+ "./mdx-plugins/codeblock-utils": "./dist/mdx-plugins/codeblock-utils.js",
40
+ "./mdx-plugins/rehype-code": "./dist/mdx-plugins/rehype-code.js",
41
+ "./mdx-plugins/rehype-code.core": "./dist/mdx-plugins/rehype-code.core.js",
42
+ "./mdx-plugins/rehype-toc": "./dist/mdx-plugins/rehype-toc.js",
43
+ "./mdx-plugins/remark-admonition": "./dist/mdx-plugins/remark-admonition.js",
44
+ "./mdx-plugins/remark-code-tab": "./dist/mdx-plugins/remark-code-tab.js",
45
+ "./mdx-plugins/remark-directive-admonition": "./dist/mdx-plugins/remark-directive-admonition.js",
46
+ "./mdx-plugins/remark-feedback-block": "./dist/mdx-plugins/remark-feedback-block.js",
47
+ "./mdx-plugins/remark-gfm": "./dist/mdx-plugins/remark-gfm.js",
48
+ "./mdx-plugins/remark-heading": "./dist/mdx-plugins/remark-heading.js",
49
+ "./mdx-plugins/remark-image": "./dist/mdx-plugins/remark-image.js",
50
+ "./mdx-plugins/remark-llms": "./dist/mdx-plugins/remark-llms.js",
51
+ "./mdx-plugins/remark-llms.runtime": "./dist/mdx-plugins/remark-llms.runtime.js",
52
+ "./mdx-plugins/remark-mdx-files": "./dist/mdx-plugins/remark-mdx-files.js",
53
+ "./mdx-plugins/remark-mdx-mermaid": "./dist/mdx-plugins/remark-mdx-mermaid.js",
54
+ "./mdx-plugins/remark-npm": "./dist/mdx-plugins/remark-npm.js",
55
+ "./mdx-plugins/remark-steps": "./dist/mdx-plugins/remark-steps.js",
56
+ "./mdx-plugins/remark-structure": "./dist/mdx-plugins/remark-structure.js",
57
+ "./mdx-plugins/stringifier": "./dist/mdx-plugins/stringifier.js",
58
+ "./negotiation": "./dist/negotiation/index.js",
59
+ "./page-tree": "./dist/page-tree/index.js",
60
+ "./search": "./dist/search/index.js",
61
+ "./search/algolia": "./dist/search/algolia.js",
62
+ "./search/client": "./dist/search/client.js",
63
+ "./search/client/algolia": "./dist/search/client/algolia.js",
64
+ "./search/client/fetch": "./dist/search/client/fetch.js",
65
+ "./search/client/flexsearch-static": "./dist/search/client/flexsearch-static.js",
66
+ "./search/client/mixedbread": "./dist/search/client/mixedbread.js",
67
+ "./search/client/orama-cloud": "./dist/search/client/orama-cloud.js",
68
+ "./search/client/orama-cloud-legacy": "./dist/search/client/orama-cloud-legacy.js",
69
+ "./search/client/orama-static": "./dist/search/client/orama-static.js",
70
+ "./search/flexsearch": "./dist/search/flexsearch.js",
71
+ "./search/mixedbread": "./dist/search/mixedbread.js",
72
+ "./search/orama-cloud": "./dist/search/orama-cloud.js",
73
+ "./search/orama-cloud-legacy": "./dist/search/orama-cloud-legacy.js",
74
+ "./search/server": "./dist/search/server.js",
75
+ "./source": "./dist/source/index.js",
76
+ "./source/client": "./dist/source/client/index.js",
77
+ "./source/plugins/lucide-icons": "./dist/source/plugins/lucide-icons.js",
78
+ "./source/plugins/slugs": "./dist/source/plugins/slugs.js",
79
+ "./source/plugins/status-badges": "./dist/source/plugins/status-badges.js",
80
+ "./source/schema": "./dist/source/schema.js",
81
+ "./toc": "./dist/toc.js",
82
+ "./utils/use-media-query": "./dist/utils/use-media-query.js",
83
+ "./utils/use-on-change": "./dist/utils/use-on-change.js",
84
+ "./package.json": "./package.json",
62
85
  "./source/*": {
63
86
  "types": "./dist/source/plugins/*.d.ts",
64
87
  "import": "./dist/source/plugins/*.js"
65
- },
66
- "./utils/*": {
67
- "types": "./dist/utils/*.d.ts",
68
- "import": "./dist/utils/*.js"
69
- },
70
- "./link": {
71
- "types": "./dist/link.d.ts",
72
- "import": "./dist/link.js"
73
- },
74
- "./dynamic-link": {
75
- "types": "./dist/dynamic-link.d.ts",
76
- "import": "./dist/dynamic-link.js"
77
- },
78
- "./mdx-plugins": {
79
- "types": "./dist/mdx-plugins/index.d.ts",
80
- "import": "./dist/mdx-plugins/index.js"
81
- },
82
- "./mdx-plugins/*": {
83
- "types": "./dist/mdx-plugins/*.d.ts",
84
- "import": "./dist/mdx-plugins/*.js"
85
- },
86
- "./i18n": {
87
- "types": "./dist/i18n/index.d.ts",
88
- "import": "./dist/i18n/index.js"
89
- },
90
- "./i18n/middleware": {
91
- "types": "./dist/i18n/middleware.d.ts",
92
- "import": "./dist/i18n/middleware.js"
93
- },
94
- "./highlight": {
95
- "types": "./dist/highlight/index.d.ts",
96
- "import": "./dist/highlight/index.js"
97
- },
98
- "./highlight/shiki": {
99
- "types": "./dist/highlight/shiki/index.d.ts",
100
- "import": "./dist/highlight/shiki/index.js"
101
- },
102
- "./highlight/*": {
103
- "types": "./dist/highlight/*.d.ts",
104
- "import": "./dist/highlight/*.js"
105
- },
106
- "./framework": {
107
- "types": "./dist/framework/index.d.ts",
108
- "import": "./dist/framework/index.js"
109
- },
110
- "./framework/*": {
111
- "types": "./dist/framework/*.d.ts",
112
- "import": "./dist/framework/*.js"
113
88
  }
114
89
  },
115
90
  "publishConfig": {
116
91
  "access": "public"
117
92
  },
118
93
  "dependencies": {
119
- "@formatjs/intl-localematcher": "^0.8.2",
120
94
  "@orama/orama": "^3.1.18",
121
95
  "@shikijs/rehype": "^4.0.2",
122
96
  "@shikijs/transformers": "^4.0.2",
@@ -124,12 +98,8 @@
124
98
  "github-slugger": "^2.0.0",
125
99
  "hast-util-to-estree": "^3.1.3",
126
100
  "hast-util-to-jsx-runtime": "^2.3.6",
127
- "image-size": "^2.0.2",
128
101
  "mdast-util-mdx": "^3.0.0",
129
102
  "mdast-util-to-markdown": "^2.1.2",
130
- "negotiator": "^1.0.0",
131
- "npm-to-yarn": "^3.0.1",
132
- "path-to-regexp": "^8.4.2",
133
103
  "remark": "^15.0.1",
134
104
  "remark-gfm": "^4.0.1",
135
105
  "remark-rehype": "^11.1.2",
@@ -141,29 +111,34 @@
141
111
  "vfile": "^6.0.3"
142
112
  },
143
113
  "devDependencies": {
114
+ "@formatjs/intl-localematcher": "^0.8.2",
144
115
  "@mdx-js/mdx": "^3.1.1",
145
116
  "@mixedbread/sdk": "^0.61.0",
146
117
  "@orama/core": "^1.2.19",
147
118
  "@oramacloud/client": "^2.1.4",
148
- "@tanstack/react-router": "1.168.10",
119
+ "@tanstack/react-router": "1.168.18",
149
120
  "@types/estree-jsx": "^1.0.5",
150
121
  "@types/hast": "^3.0.4",
151
122
  "@types/mdast": "^4.0.4",
152
123
  "@types/negotiator": "^0.6.4",
153
- "@types/node": "25.5.2",
124
+ "@types/node": "25.6.0",
154
125
  "@types/react": "^19.2.14",
155
126
  "@types/react-dom": "^19.2.3",
156
127
  "algoliasearch": "5.50.1",
157
128
  "flexsearch": "^0.8.212",
158
- "lucide-react": "^1.7.0",
159
- "next": "16.2.2",
129
+ "image-size": "^2.0.2",
130
+ "lucide-react": "^1.8.0",
131
+ "negotiator": "^1.0.0",
132
+ "next": "16.2.3",
133
+ "npm-to-yarn": "^3.0.1",
134
+ "path-to-regexp": "^8.4.2",
160
135
  "react-router": "^7.14.0",
161
136
  "remark-directive": "^4.0.0",
162
137
  "remark-mdx": "^3.1.1",
163
138
  "remove-markdown": "^0.6.3",
164
139
  "tsdown": "0.21.7",
165
140
  "typescript": "^6.0.2",
166
- "waku": "1.0.0-alpha.6",
141
+ "waku": "1.0.0-alpha.7",
167
142
  "zod": "^4.3.6",
168
143
  "tsconfig": "0.0.0"
169
144
  },
@@ -243,6 +218,15 @@
243
218
  "optional": true
244
219
  }
245
220
  },
221
+ "inlinedDependencies": {
222
+ "@formatjs/fast-memoize": "3.1.1",
223
+ "@formatjs/intl-localematcher": "0.8.2",
224
+ "image-size": "2.0.2",
225
+ "negotiator": "1.0.0",
226
+ "npm-to-yarn": "3.0.1",
227
+ "path-to-regexp": "8.4.2",
228
+ "remove-markdown": "0.6.3"
229
+ },
246
230
  "scripts": {
247
231
  "build": "tsdown",
248
232
  "clean": "rimraf dist",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes