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.
- package/dist/{advanced-B6xijHpk.js → advanced-Bv_qi9IC.js} +1 -1
- package/dist/{algolia-CV1p_BGs.d.ts → algolia-DphIPKrc.d.ts} +1 -1
- package/dist/breadcrumb.d.ts +1 -1
- package/dist/{build-doc-CRrL6r30.js → build-doc-DKBeOVIN.js} +1 -1
- package/dist/{client-DwXJpdzf.d.ts → client-D3PZ2z2N.d.ts} +3 -3
- package/dist/content/mdx/preset-bundler.d.ts +7 -7
- package/dist/content/mdx/preset-bundler.js +1 -1
- package/dist/content/mdx/preset-runtime.d.ts +7 -7
- package/dist/content/mdx/preset-runtime.js +1 -1
- package/dist/content/toc.d.ts +1 -1
- package/dist/dist-BvsXWCqT.js +808 -0
- package/dist/fromFile-rjAsJGw3.js +845 -0
- package/dist/highlight/shiki/full.d.ts +1 -1
- package/dist/highlight/shiki/index.d.ts +1 -1
- package/dist/highlight/shiki/react.d.ts +2 -2
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/middleware.d.ts +1 -1
- package/dist/i18n/middleware.js +3763 -2
- package/dist/{index-DkqXqEn8.d.ts → index-9M3g3SDy.d.ts} +3 -3
- package/dist/{index-D-UKvVrz.d.ts → index-Bm0msojm.d.ts} +1 -1
- package/dist/{index-D2XxhP9t.d.ts → index-C4kyQCbj.d.ts} +1 -1
- package/dist/{index-Ca0YkTYK2.d.ts → index-CDOu1Gxx2.d.ts} +1 -1
- package/dist/mdx-plugins/codeblock-utils.d.ts +1 -1
- package/dist/mdx-plugins/index.d.ts +17 -17
- package/dist/mdx-plugins/index.js +2 -2
- package/dist/mdx-plugins/rehype-code.core.d.ts +1 -1
- package/dist/mdx-plugins/rehype-code.core.js +1 -1
- package/dist/mdx-plugins/rehype-code.d.ts +2 -2
- package/dist/mdx-plugins/rehype-code.js +1 -1
- package/dist/mdx-plugins/rehype-toc.d.ts +1 -1
- package/dist/mdx-plugins/remark-admonition.d.ts +1 -1
- package/dist/mdx-plugins/remark-code-tab.d.ts +1 -1
- package/dist/mdx-plugins/remark-directive-admonition.d.ts +1 -1
- package/dist/mdx-plugins/remark-feedback-block.d.ts +1 -1
- package/dist/mdx-plugins/remark-gfm.d.ts +1 -1
- package/dist/mdx-plugins/remark-heading.d.ts +1 -1
- package/dist/mdx-plugins/remark-image.d.ts +1 -1
- package/dist/mdx-plugins/remark-image.js +2 -2
- package/dist/mdx-plugins/remark-llms.d.ts +1 -1
- package/dist/mdx-plugins/remark-llms.runtime.d.ts +1 -1
- package/dist/mdx-plugins/remark-mdx-files.d.ts +1 -1
- package/dist/mdx-plugins/remark-mdx-mermaid.d.ts +1 -1
- package/dist/mdx-plugins/remark-npm.d.ts +1 -1
- package/dist/mdx-plugins/remark-npm.js +1 -64
- package/dist/mdx-plugins/remark-steps.d.ts +1 -1
- package/dist/mdx-plugins/remark-structure.d.ts +1 -1
- package/dist/mdx-plugins/stringifier.d.ts +1 -1
- package/dist/negotiation/index.js +1 -37
- package/dist/negotiation-CMIpYwJJ.js +1021 -0
- package/dist/page-tree/index.d.ts +2 -2
- package/dist/{rehype-code-CMrTh9Lu.d.ts → rehype-code-BceXtwzN.d.ts} +1 -1
- package/dist/{rehype-code.core-AAMsXdqJ.d.ts → rehype-code.core-DfJelVqH.d.ts} +2 -2
- package/dist/{remark-heading-95OQNNoH.d.ts → remark-heading-C3ZesmHL.d.ts} +1 -1
- package/dist/{remark-llms-Bjyq1jdk.d.ts → remark-llms-4bK9f_wN.d.ts} +1 -1
- package/dist/remark-npm-DIGXA7E3.js +593 -0
- package/dist/{remark-structure-c-gm2PCy.d.ts → remark-structure-DLKk-p9t.d.ts} +1 -1
- package/dist/search/algolia.d.ts +1 -1
- package/dist/search/client/algolia.d.ts +1 -1
- package/dist/search/client/fetch.d.ts +1 -1
- package/dist/search/client/flexsearch-static.d.ts +1 -1
- package/dist/search/client/flexsearch-static.js +1 -1
- package/dist/search/client/mixedbread.d.ts +1 -1
- package/dist/search/client/mixedbread.js +1 -1
- package/dist/search/client/orama-cloud-legacy.d.ts +1 -1
- package/dist/search/client/orama-cloud-legacy.js +1 -1
- package/dist/search/client/orama-cloud.d.ts +1 -1
- package/dist/search/client/orama-cloud.js +1 -1
- package/dist/search/client/orama-static.d.ts +1 -1
- package/dist/search/client/orama-static.js +1 -1
- package/dist/search/client.d.ts +1 -1
- package/dist/search/flexsearch.d.ts +4 -4
- package/dist/search/flexsearch.js +3 -3
- package/dist/search/index.d.ts +1 -1
- package/dist/search/mixedbread.d.ts +2 -2
- package/dist/search/mixedbread.js +2 -2
- package/dist/search/orama-cloud-legacy.d.ts +1 -1
- package/dist/search/orama-cloud.d.ts +1 -1
- package/dist/search/server.d.ts +1 -1
- package/dist/search/server.js +3 -3
- package/dist/{server-B89IM_4v.d.ts → server-D74cMtck.d.ts} +5 -5
- package/dist/source/client/index.d.ts +1 -1
- package/dist/source/index.d.ts +1 -1
- package/dist/source/index.js +2 -2
- package/dist/source/plugins/lucide-icons.d.ts +1 -1
- package/dist/source/plugins/lucide-icons.js +1 -1
- package/dist/source/plugins/slugs.d.ts +1 -1
- package/dist/source/plugins/slugs.js +1 -1
- package/dist/source/plugins/status-badges.d.ts +2 -2
- package/dist/toc.d.ts +1 -1
- package/dist/toc.js +12 -26
- package/package.json +87 -103
- /package/dist/{codeblock-utils-DuhKfwET.d.ts → codeblock-utils-BMoNeXUb.d.ts} +0 -0
- /package/dist/{definitions-j1YD3oZE.d.ts → definitions-DH0vdUJV.d.ts} +0 -0
- /package/dist/{endpoint-Bs6bqGYq.js → endpoint-BWgZs3LL.js} +0 -0
- /package/dist/{icon-CfEtMzdP.js → icon-DXrdIp2K.js} +0 -0
- /package/dist/{index-DAzunKMp.d.ts → index-B_5tvyCk.d.ts} +0 -0
- /package/dist/{index-CQ5TBOzH.d.ts → index-WhA-NTMB.d.ts} +0 -0
- /package/dist/{path-CL7hf0GY.js → path-ClKaiDuq.js} +0 -0
- /package/dist/{rehype-code.core-23F1yz08.js → rehype-code.core-B9asBGBz.js} +0 -0
- /package/dist/{rehype-toc-iWxg6ELI.d.ts → rehype-toc-Dk5ozAin.d.ts} +0 -0
- /package/dist/{remark-admonition-0gZM40ZU.d.ts → remark-admonition-D6mMI676.d.ts} +0 -0
- /package/dist/{remark-code-tab-Dk79zZwn.d.ts → remark-code-tab-Cl4XxpJ9.d.ts} +0 -0
- /package/dist/{remark-directive-admonition-CxFIkQ_i.d.ts → remark-directive-admonition-BJwUZuIt.d.ts} +0 -0
- /package/dist/{remark-feedback-block-CehhnqT0.d.ts → remark-feedback-block-PeBl_Fvl.d.ts} +0 -0
- /package/dist/{remark-gfm-DIHBRjLx.d.ts → remark-gfm-IilhXQUz.d.ts} +0 -0
- /package/dist/{remark-image-DQlJevNY.d.ts → remark-image-Co-rKW87.d.ts} +0 -0
- /package/dist/{remark-mdx-files-C50nFvnY.d.ts → remark-mdx-files-Ba1Yf3sk.d.ts} +0 -0
- /package/dist/{remark-mdx-mermaid-BkA2vurg.d.ts → remark-mdx-mermaid-DPDDbIZJ.d.ts} +0 -0
- /package/dist/{remark-npm-7SDuqMc6.d.ts → remark-npm-B7OPb7Ze.d.ts} +0 -0
- /package/dist/{remark-steps-DsnXM6Xj.d.ts → remark-steps-PxfBg8ws.d.ts} +0 -0
- /package/dist/{remove-markdown-Cte6pwYx.js → remove-markdown-CQ--9YPQ.js} +0 -0
- /package/dist/{remove-undefined-PK1FA5gc.js → remove-undefined-DLE4y6II.js} +0 -0
- /package/dist/{stringifier-l_KdmdPb.d.ts → stringifier-D6T4zhkn.d.ts} +0 -0
- /package/dist/{toc-CgnJPi4Q.d.ts → toc-DXlLlbv_.d.ts} +0 -0
- /package/dist/{types-Dr0HqbXP.d.ts → types-D8S_yMgI.d.ts} +0 -0
- /package/dist/{util-D2LMvKsn.d.ts → util-CZD_oO6N.d.ts} +0 -0
- /package/dist/{util-BnfE-P1F.js → util-D3lJGMcv.js} +0 -0
- /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-
|
|
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-
|
|
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-
|
|
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-
|
|
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();
|
package/dist/search/client.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
2
|
-
import { t as I18nConfig } from "../index-
|
|
3
|
-
import { m as SharedIndex, n as SearchAPI, t as QueryOptions } from "../server-
|
|
4
|
-
import { i as LoaderConfig, o as LoaderOutput, u as Page } from "../index-
|
|
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-
|
|
2
|
-
import { n as buildBreadcrumbs, r as buildIndexDefault, t as buildDocuments } from "../build-doc-
|
|
3
|
-
import { n as search, t as createDocument } from "../utils-
|
|
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) {
|
package/dist/search/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as createContentHighlighter, n as ReactSortedResult, r as SortedResult, t as HighlightedText } from "../index-
|
|
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-
|
|
2
|
-
import { n as SearchAPI } from "../server-
|
|
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-
|
|
3
|
-
import { t as require_remove_markdown } from "../remove-markdown-
|
|
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);
|
package/dist/search/server.d.ts
CHANGED
|
@@ -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-
|
|
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 };
|
package/dist/search/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as defaultReadOptions, t as createEndpoint } from "../endpoint-
|
|
2
|
-
import { n as buildBreadcrumbs, r as buildIndexDefault, t as buildDocuments } from "../build-doc-
|
|
3
|
-
import { n as searchSimple, t as searchAdvanced } from "../advanced-
|
|
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-
|
|
2
|
-
import { i as StructuredData } from "./remark-structure-
|
|
3
|
-
import { t as I18nConfig } from "./index-
|
|
4
|
-
import { r as SortedResult } from "./index-
|
|
5
|
-
import { i as LoaderConfig, o as LoaderOutput, u as Page } from "./index-
|
|
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-
|
|
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 };
|
package/dist/source/index.d.ts
CHANGED
|
@@ -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-
|
|
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 };
|
package/dist/source/index.js
CHANGED
|
@@ -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-
|
|
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-
|
|
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,2 +1,2 @@
|
|
|
1
|
-
import { _ as getSlugs, g as SlugFn, v as slugsFromData, y as slugsPlugin } from "../../index-
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { a as Separator$1, n as Item$1, t as Folder$1 } from "../../definitions-
|
|
2
|
-
import { s as LoaderPlugin } from "../../index-
|
|
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-
|
|
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
|
|
52
|
+
const isInitialMountRef = useRef(true);
|
|
52
53
|
const anchorRef = useRef(null);
|
|
53
|
-
const [active, setActive] = useState(() =>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
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 (
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"./
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"./
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"./
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"./
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"./
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"./
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"./
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"./
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"./
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"./
|
|
59
|
-
|
|
60
|
-
|
|
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.
|
|
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.
|
|
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
|
-
"
|
|
159
|
-
"
|
|
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.
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|