fumadocs-core 16.15.7 → 16.15.9
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/{algolia-C0E5qQhM.d.ts → algolia-DSjV89ug.d.ts} +10 -1
- package/dist/breadcrumb.d.ts +8 -9
- package/dist/build-doc-Cjg7QvFR.js +51 -0
- package/dist/{build-doc-4OvfjVN2.js → build-index-COlcoMFJ.js} +13 -51
- package/dist/{client-DURack0W.d.ts → client-ByEdoQoD.d.ts} +1 -1
- package/dist/content/github.d.ts +3 -4
- package/dist/content/md/frontmatter.d.ts +2 -3
- package/dist/content/md.d.ts +6 -7
- package/dist/content/mdx/preset-bundler.d.ts +5 -6
- package/dist/content/mdx/preset-runtime.d.ts +5 -6
- package/dist/content/toc.d.ts +3 -4
- package/dist/{definitions-CFOhwE1k.d.ts → definitions-BZlqdyOx.d.ts} +4 -2
- package/dist/dynamic-link.d.ts +4 -4
- package/dist/{dynamic-CTsodhTH.js → dynamic-lx_V4971.js} +7 -0
- package/dist/framework/astro.d.ts +3 -4
- package/dist/framework/index.d.ts +11 -12
- package/dist/framework/next.d.ts +2 -3
- package/dist/framework/next.js +3 -3
- package/dist/framework/react-router.d.ts +2 -3
- package/dist/framework/tanstack.d.ts +2 -3
- package/dist/framework/waku.d.ts +2 -3
- package/dist/highlight/client.d.ts +2 -3
- package/dist/highlight/index.d.ts +6 -7
- package/dist/highlight/shiki/full.d.ts +3 -4
- package/dist/highlight/shiki/react.d.ts +4 -5
- package/dist/i18n/middleware.d.ts +6 -7
- package/dist/i18n/middleware.js +1 -1
- package/dist/{index-BRReQe5Z.d.ts → index-BEGAd2ej.d.ts} +34 -10
- package/dist/index-Cyv18VFj.d.ts +23 -0
- package/dist/{index-B-0R0VbS.d.ts → index-DNn03jFO.d.ts} +2 -2
- package/dist/{index-E8Qh_yQs.d.ts → index-DUWMH-uy.d.ts} +5 -2
- package/dist/link.d.ts +3 -3
- package/dist/mcp.d.ts +14 -0
- package/dist/mcp.js +51 -0
- package/dist/mdx-plugins/index.d.ts +3 -3
- package/dist/mdx-plugins/rehype-code.core.d.ts +1 -1
- package/dist/mdx-plugins/rehype-code.d.ts +2 -2
- package/dist/mdx-plugins/remark-block-id.d.ts +3 -4
- package/dist/mdx-plugins/remark-llms.runtime.d.ts +3 -4
- package/dist/negotiation/index.d.ts +3 -4
- package/dist/page-tree/index.d.ts +2 -2
- package/dist/{rehype-code-BgS9oBmJ.d.ts → rehype-code-CGahijs1.d.ts} +1 -1
- package/dist/{rehype-code.core-DiSTr8bK.d.ts → rehype-code.core-COgx9A69.d.ts} +5 -4
- package/dist/search/algolia.d.ts +2 -2
- package/dist/search/algolia.js +15 -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/mixedbread.d.ts +1 -1
- package/dist/search/client/orama-cloud-legacy.d.ts +1 -1
- package/dist/search/client/orama-cloud.d.ts +1 -1
- package/dist/search/client/orama-static.d.ts +1 -1
- package/dist/search/client.d.ts +1 -1
- package/dist/search/flexsearch.d.ts +12 -13
- package/dist/search/flexsearch.js +2 -1
- package/dist/search/mixedbread.d.ts +5 -6
- package/dist/search/orama-cloud-legacy.d.ts +8 -9
- package/dist/search/orama-cloud.d.ts +17 -9
- package/dist/search/orama-cloud.js +15 -1
- package/dist/search/server.d.ts +1 -1
- package/dist/search/server.js +2 -1
- package/dist/{server-CWA0y2Az.d.ts → server-D1FyGpz2.d.ts} +1 -1
- package/dist/server.browser.d.ts +6 -7
- package/dist/server.d.ts +7 -8
- package/dist/source/client/index.d.ts +1 -1
- package/dist/source/dynamic.d.ts +1 -1
- package/dist/source/dynamic.js +1 -1
- package/dist/source/index.d.ts +2 -2
- package/dist/source/index.js +1 -1
- package/dist/source/llms.d.ts +2 -2
- package/dist/source/llms.js +42 -23
- package/dist/source/plugins/lucide-icons.d.ts +3 -4
- package/dist/source/plugins/slugs.d.ts +1 -1
- package/dist/source/plugins/status-badges.d.ts +8 -9
- package/dist/source/schema.d.ts +4 -5
- package/dist/utils/use-media-query.d.ts +2 -3
- package/dist/utils/use-on-change.d.ts +2 -3
- package/package.json +13 -6
- package/dist/index-BhCV0aBx.d.ts +0 -16
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { t as Awaitable } from "./types-D89QoQR-.js";
|
|
1
2
|
import { i as StructuredData } from "./remark-structure-CnHwvNZr.js";
|
|
3
|
+
import { S as LoaderOutput, b as LoaderConfig } from "./index-BEGAd2ej.js";
|
|
2
4
|
import { Algoliasearch } from "algoliasearch";
|
|
3
5
|
//#region src/search/algolia.d.ts
|
|
4
6
|
interface DocumentRecord {
|
|
@@ -23,6 +25,13 @@ interface DocumentRecord {
|
|
|
23
25
|
*/
|
|
24
26
|
extra_data?: object;
|
|
25
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Build the search indexes of every page in a source.
|
|
30
|
+
*/
|
|
31
|
+
declare function toDocuments<C extends LoaderConfig>(source: LoaderOutput<C> | (() => Awaitable<LoaderOutput<C>>), options?: {
|
|
32
|
+
/** Tag to filter results by. */
|
|
33
|
+
tag?: (page: C['page']) => string;
|
|
34
|
+
}): Promise<DocumentRecord[]>;
|
|
26
35
|
interface SyncOptions {
|
|
27
36
|
/**
|
|
28
37
|
* Index Name for documents.
|
|
@@ -63,4 +72,4 @@ interface BaseIndex {
|
|
|
63
72
|
content: string;
|
|
64
73
|
}
|
|
65
74
|
//#endregion
|
|
66
|
-
export { sync as a, setIndexSettings as i, DocumentRecord as n,
|
|
75
|
+
export { sync as a, setIndexSettings as i, DocumentRecord as n, toDocuments as o, SyncOptions as r, updateDocuments as s, BaseIndex as t };
|
package/dist/breadcrumb.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { i as Root, r as Node, t as Folder } from "./definitions-
|
|
1
|
+
import { i as Root, o as definitions_d_exports, r as Node, t as Folder } from "./definitions-BZlqdyOx.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
//#region src/breadcrumb.d.ts
|
|
4
|
-
interface BreadcrumbItem {
|
|
4
|
+
export interface BreadcrumbItem {
|
|
5
5
|
name: ReactNode;
|
|
6
6
|
url?: string;
|
|
7
7
|
}
|
|
8
|
-
interface BreadcrumbOptions {
|
|
8
|
+
export interface BreadcrumbOptions {
|
|
9
9
|
/**
|
|
10
10
|
* Include the root folders in the breadcrumb items array.
|
|
11
11
|
*
|
|
@@ -30,9 +30,9 @@ interface BreadcrumbOptions {
|
|
|
30
30
|
*/
|
|
31
31
|
includeSeparator?: boolean;
|
|
32
32
|
}
|
|
33
|
-
declare function useBreadcrumb(url: string, tree: Root | Folder, options?: BreadcrumbOptions): BreadcrumbItem[];
|
|
34
|
-
declare function getBreadcrumbItems(url: string, tree: Root | Folder, options?: BreadcrumbOptions): BreadcrumbItem[];
|
|
35
|
-
declare function getBreadcrumbItemsFromPath(tree: Root | Folder, path: Node[], options: BreadcrumbOptions): BreadcrumbItem[];
|
|
33
|
+
export declare function useBreadcrumb(url: string, tree: Root | Folder, options?: BreadcrumbOptions): BreadcrumbItem[];
|
|
34
|
+
export declare function getBreadcrumbItems(url: string, tree: Root | Folder, options?: BreadcrumbOptions): BreadcrumbItem[];
|
|
35
|
+
export declare function getBreadcrumbItemsFromPath(tree: Root | Folder, path: Node[], options: BreadcrumbOptions): BreadcrumbItem[];
|
|
36
36
|
/**
|
|
37
37
|
* Search the path of a node in the tree by a specified url
|
|
38
38
|
*
|
|
@@ -41,6 +41,5 @@ declare function getBreadcrumbItemsFromPath(tree: Root | Folder, path: Node[], o
|
|
|
41
41
|
* @returns The path to the target node from root
|
|
42
42
|
* @internal Don't use this on your own
|
|
43
43
|
*/
|
|
44
|
-
declare function searchPath(nodes: Node[], url: string): Node[] | null;
|
|
45
|
-
//#endregion
|
|
46
|
-
export { BreadcrumbItem, BreadcrumbOptions, getBreadcrumbItems, getBreadcrumbItemsFromPath, searchPath, useBreadcrumb };
|
|
44
|
+
export declare function searchPath(nodes: Node[], url: string): Node[] | null;
|
|
45
|
+
//#endregion
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//#region src/search/server/build-doc.ts
|
|
2
|
+
function buildDocuments(indexes) {
|
|
3
|
+
const docs = [];
|
|
4
|
+
for (const page of indexes) {
|
|
5
|
+
const pageTag = page.tag ?? [];
|
|
6
|
+
const tags = Array.isArray(pageTag) ? pageTag : [pageTag];
|
|
7
|
+
const data = page.structuredData;
|
|
8
|
+
let id = 0;
|
|
9
|
+
docs.push({
|
|
10
|
+
id: page.id,
|
|
11
|
+
page_id: page.id,
|
|
12
|
+
type: "page",
|
|
13
|
+
content: page.title,
|
|
14
|
+
breadcrumbs: page.breadcrumbs,
|
|
15
|
+
tags,
|
|
16
|
+
url: page.url,
|
|
17
|
+
locale: page.locale
|
|
18
|
+
});
|
|
19
|
+
const nextId = () => `${page.id}-${id++}`;
|
|
20
|
+
if (page.description && !data.contents.some((item) => item.content === page.description)) docs.push({
|
|
21
|
+
id: nextId(),
|
|
22
|
+
page_id: page.id,
|
|
23
|
+
tags,
|
|
24
|
+
type: "text",
|
|
25
|
+
url: page.url,
|
|
26
|
+
content: page.description,
|
|
27
|
+
locale: page.locale
|
|
28
|
+
});
|
|
29
|
+
for (const heading of data.headings) docs.push({
|
|
30
|
+
id: nextId(),
|
|
31
|
+
page_id: page.id,
|
|
32
|
+
type: "heading",
|
|
33
|
+
tags,
|
|
34
|
+
url: `${page.url}#${heading.id}`,
|
|
35
|
+
content: heading.content,
|
|
36
|
+
locale: page.locale
|
|
37
|
+
});
|
|
38
|
+
for (const content of data.contents) docs.push({
|
|
39
|
+
id: nextId(),
|
|
40
|
+
page_id: page.id,
|
|
41
|
+
tags,
|
|
42
|
+
type: "text",
|
|
43
|
+
url: content.heading ? `${page.url}#${content.heading}` : page.url,
|
|
44
|
+
content: content.content,
|
|
45
|
+
locale: page.locale
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return docs;
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
export { buildDocuments as t };
|
|
@@ -14,6 +14,18 @@ async function buildIndexDefault(page) {
|
|
|
14
14
|
structuredData
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Build a search index for every page, in parallel.
|
|
19
|
+
*/
|
|
20
|
+
async function buildDocuments(source, map) {
|
|
21
|
+
const loader = typeof source === "function" ? await source() : source;
|
|
22
|
+
const tasks = [];
|
|
23
|
+
for (const page of loader.getPages()) tasks.push(build(page));
|
|
24
|
+
async function build(page) {
|
|
25
|
+
return map(await buildIndexDefault(page), page);
|
|
26
|
+
}
|
|
27
|
+
return Promise.all(tasks);
|
|
28
|
+
}
|
|
17
29
|
function isBreadcrumbItem(item) {
|
|
18
30
|
return typeof item === "string" && item.length > 0;
|
|
19
31
|
}
|
|
@@ -32,54 +44,4 @@ function buildBreadcrumbs(source, page) {
|
|
|
32
44
|
}
|
|
33
45
|
}
|
|
34
46
|
//#endregion
|
|
35
|
-
|
|
36
|
-
function buildDocuments(indexes) {
|
|
37
|
-
const docs = [];
|
|
38
|
-
for (const page of indexes) {
|
|
39
|
-
const pageTag = page.tag ?? [];
|
|
40
|
-
const tags = Array.isArray(pageTag) ? pageTag : [pageTag];
|
|
41
|
-
const data = page.structuredData;
|
|
42
|
-
let id = 0;
|
|
43
|
-
docs.push({
|
|
44
|
-
id: page.id,
|
|
45
|
-
page_id: page.id,
|
|
46
|
-
type: "page",
|
|
47
|
-
content: page.title,
|
|
48
|
-
breadcrumbs: page.breadcrumbs,
|
|
49
|
-
tags,
|
|
50
|
-
url: page.url,
|
|
51
|
-
locale: page.locale
|
|
52
|
-
});
|
|
53
|
-
const nextId = () => `${page.id}-${id++}`;
|
|
54
|
-
if (page.description && !data.contents.some((item) => item.content === page.description)) docs.push({
|
|
55
|
-
id: nextId(),
|
|
56
|
-
page_id: page.id,
|
|
57
|
-
tags,
|
|
58
|
-
type: "text",
|
|
59
|
-
url: page.url,
|
|
60
|
-
content: page.description,
|
|
61
|
-
locale: page.locale
|
|
62
|
-
});
|
|
63
|
-
for (const heading of data.headings) docs.push({
|
|
64
|
-
id: nextId(),
|
|
65
|
-
page_id: page.id,
|
|
66
|
-
type: "heading",
|
|
67
|
-
tags,
|
|
68
|
-
url: `${page.url}#${heading.id}`,
|
|
69
|
-
content: heading.content,
|
|
70
|
-
locale: page.locale
|
|
71
|
-
});
|
|
72
|
-
for (const content of data.contents) docs.push({
|
|
73
|
-
id: nextId(),
|
|
74
|
-
page_id: page.id,
|
|
75
|
-
tags,
|
|
76
|
-
type: "text",
|
|
77
|
-
url: content.heading ? `${page.url}#${content.heading}` : page.url,
|
|
78
|
-
content: content.content,
|
|
79
|
-
locale: page.locale
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
return docs;
|
|
83
|
-
}
|
|
84
|
-
//#endregion
|
|
85
|
-
export { buildBreadcrumbs as n, buildIndexDefault as r, buildDocuments as t };
|
|
47
|
+
export { buildDocuments as n, buildIndexDefault as r, buildBreadcrumbs as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Awaitable } from "./types-D89QoQR-.js";
|
|
2
|
-
import { t as BaseIndex } from "./algolia-C0E5qQhM.js";
|
|
3
2
|
import { r as SortedResult } from "./index-BM36H-xw.js";
|
|
3
|
+
import { t as BaseIndex } from "./algolia-DSjV89ug.js";
|
|
4
4
|
import { DependencyList } from "react";
|
|
5
5
|
import { AnyZBSearch, SearchParams } from "zbsearch";
|
|
6
6
|
import { LiteClient, SearchResponse } from "algoliasearch/lite";
|
package/dist/content/github.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/content/github.d.ts
|
|
2
|
-
interface GetGithubLastCommitOptions {
|
|
2
|
+
export interface GetGithubLastCommitOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Repository name, like "fumadocs"
|
|
5
5
|
*/
|
|
@@ -36,6 +36,5 @@ interface GetGithubLastCommitOptions {
|
|
|
36
36
|
* By default, this will cache the result forever.
|
|
37
37
|
* Set `options.next.revalidate` to customize this.
|
|
38
38
|
*/
|
|
39
|
-
declare function getGithubLastEdit({ repo, token, owner, path, sha, baseUrl, options, params: customParams }: GetGithubLastCommitOptions): Promise<Date | null>;
|
|
40
|
-
//#endregion
|
|
41
|
-
export { GetGithubLastCommitOptions, getGithubLastEdit };
|
|
39
|
+
export declare function getGithubLastEdit({ repo, token, owner, path, sha, baseUrl, options, params: customParams }: GetGithubLastCommitOptions): Promise<Date | null>;
|
|
40
|
+
//#endregion
|
package/dist/content/md.d.ts
CHANGED
|
@@ -4,21 +4,20 @@ import { Compatible } from "vfile";
|
|
|
4
4
|
import { Components } from "hast-util-to-jsx-runtime";
|
|
5
5
|
import { PluggableList } from "unified";
|
|
6
6
|
//#region src/content/md.d.ts
|
|
7
|
-
interface MarkdownRendererOptions {
|
|
7
|
+
export interface MarkdownRendererOptions {
|
|
8
8
|
remarkPlugins?: PluggableList;
|
|
9
9
|
rehypePlugins?: PluggableList;
|
|
10
10
|
remarkRehypeOptions?: Options;
|
|
11
11
|
}
|
|
12
|
-
interface MarkdownRenderer {
|
|
12
|
+
export interface MarkdownRenderer {
|
|
13
13
|
Markdown: FC<MarkdownProps>;
|
|
14
14
|
MarkdownServer: FC<Omit<MarkdownProps, 'async'>>;
|
|
15
15
|
}
|
|
16
|
-
interface MarkdownProps {
|
|
16
|
+
export interface MarkdownProps {
|
|
17
17
|
async?: boolean;
|
|
18
18
|
components?: Components;
|
|
19
19
|
children: Compatible;
|
|
20
20
|
}
|
|
21
|
-
declare function createMarkdownRenderer({ rehypePlugins, remarkPlugins, remarkRehypeOptions }?: MarkdownRendererOptions): MarkdownRenderer;
|
|
22
|
-
declare function Markdown(props: MarkdownProps & MarkdownRendererOptions): Promise<import("react").ReactNode> | import("react").ReactNode;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { Markdown, MarkdownProps, MarkdownRenderer, MarkdownRendererOptions, createMarkdownRenderer };
|
|
21
|
+
export declare function createMarkdownRenderer({ rehypePlugins, remarkPlugins, remarkRehypeOptions }?: MarkdownRendererOptions): MarkdownRenderer;
|
|
22
|
+
export declare function Markdown(props: MarkdownProps & MarkdownRendererOptions): Promise<import("react").ReactNode> | import("react").ReactNode;
|
|
23
|
+
//#endregion
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { t as RehypeCodeOptions } from "../../rehype-code-
|
|
1
|
+
import { t as RehypeCodeOptions } from "../../rehype-code-CGahijs1.js";
|
|
2
2
|
import { t as RemarkImageOptions } from "../../remark-image-BI2S9LOb.js";
|
|
3
3
|
import { r as StructureOptions } from "../../remark-structure-CnHwvNZr.js";
|
|
4
4
|
import { t as RemarkHeadingOptions } from "../../remark-heading-DEIzTkU5.js";
|
|
5
5
|
import { t as RemarkCodeTabOptions } from "../../remark-code-tab-DE_4bdnu.js";
|
|
6
6
|
import { t as RemarkNpmOptions } from "../../remark-npm-BbpvkJaT.js";
|
|
7
|
-
import "../../index-
|
|
7
|
+
import { t as index_d_exports } from "../../index-Cyv18VFj.js";
|
|
8
8
|
import { t as ResolvePlugins } from "../../util-BDsqOxh3.js";
|
|
9
9
|
import { Pluggable } from "unified";
|
|
10
10
|
import { ProcessorOptions } from "@mdx-js/mdx";
|
|
11
11
|
//#region src/content/mdx/preset-bundler.d.ts
|
|
12
|
-
type MDXBundlerPresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins'> & {
|
|
12
|
+
export type MDXBundlerPresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins'> & {
|
|
13
13
|
rehypePlugins?: ResolvePlugins;
|
|
14
14
|
remarkPlugins?: ResolvePlugins;
|
|
15
15
|
/** @private for `remark-include` */
|
|
@@ -24,6 +24,5 @@ type MDXBundlerPresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugin
|
|
|
24
24
|
/**
|
|
25
25
|
* apply MDX processor presets
|
|
26
26
|
*/
|
|
27
|
-
declare function mdxPreset(options?: MDXBundlerPresetOptions): Promise<ProcessorOptions>;
|
|
28
|
-
//#endregion
|
|
29
|
-
export { MDXBundlerPresetOptions, mdxPreset };
|
|
27
|
+
export declare function mdxPreset(options?: MDXBundlerPresetOptions): Promise<ProcessorOptions>;
|
|
28
|
+
//#endregion
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { t as RehypeCodeOptions } from "../../rehype-code-
|
|
1
|
+
import { t as RehypeCodeOptions } from "../../rehype-code-CGahijs1.js";
|
|
2
2
|
import { t as RemarkImageOptions } from "../../remark-image-BI2S9LOb.js";
|
|
3
3
|
import { r as StructureOptions } from "../../remark-structure-CnHwvNZr.js";
|
|
4
4
|
import { t as RemarkHeadingOptions } from "../../remark-heading-DEIzTkU5.js";
|
|
5
5
|
import { t as RemarkCodeTabOptions } from "../../remark-code-tab-DE_4bdnu.js";
|
|
6
6
|
import { t as RemarkNpmOptions } from "../../remark-npm-BbpvkJaT.js";
|
|
7
|
-
import "../../index-
|
|
7
|
+
import { t as index_d_exports } from "../../index-Cyv18VFj.js";
|
|
8
8
|
import { t as ResolvePlugins } from "../../util-BDsqOxh3.js";
|
|
9
9
|
import { ProcessorOptions } from "@mdx-js/mdx";
|
|
10
10
|
//#region src/content/mdx/preset-runtime.d.ts
|
|
11
|
-
type MDXRuntimePresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins'> & {
|
|
11
|
+
export type MDXRuntimePresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins'> & {
|
|
12
12
|
rehypePlugins?: ResolvePlugins;
|
|
13
13
|
remarkPlugins?: ResolvePlugins;
|
|
14
14
|
remarkStructureOptions?: StructureOptions | false;
|
|
@@ -21,6 +21,5 @@ type MDXRuntimePresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugin
|
|
|
21
21
|
/**
|
|
22
22
|
* apply MDX processor presets
|
|
23
23
|
*/
|
|
24
|
-
declare function mdxPreset(options?: MDXRuntimePresetOptions): Promise<ProcessorOptions>;
|
|
25
|
-
//#endregion
|
|
26
|
-
export { MDXRuntimePresetOptions, mdxPreset };
|
|
24
|
+
export declare function mdxPreset(options?: MDXRuntimePresetOptions): Promise<ProcessorOptions>;
|
|
25
|
+
//#endregion
|
package/dist/content/toc.d.ts
CHANGED
|
@@ -7,13 +7,12 @@ import { PluggableList } from "unified";
|
|
|
7
7
|
*
|
|
8
8
|
* @param content - Markdown content or file
|
|
9
9
|
*/
|
|
10
|
-
declare function getTableOfContents(content: Compatible): TOCItemType[];
|
|
10
|
+
export declare function getTableOfContents(content: Compatible): TOCItemType[];
|
|
11
11
|
/**
|
|
12
12
|
* Get Table of Contents from markdown/mdx document (using remark)
|
|
13
13
|
*
|
|
14
14
|
* @param content - Markdown content or file
|
|
15
15
|
* @param remarkPlugins - remark plugins to be applied first
|
|
16
16
|
*/
|
|
17
|
-
declare function getTableOfContents(content: Compatible, remarkPlugins: PluggableList): Promise<TOCItemType[]>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { getTableOfContents };
|
|
17
|
+
export declare function getTableOfContents(content: Compatible, remarkPlugins: PluggableList): Promise<TOCItemType[]>;
|
|
18
|
+
//#endregion
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
declare namespace definitions_d_exports {
|
|
3
|
+
export { Folder, Item, Node, Root, Separator };
|
|
4
|
+
}
|
|
3
5
|
interface ID {
|
|
4
6
|
/**
|
|
5
7
|
* ID for the node, unique in all page trees (even across different locales)
|
|
@@ -69,4 +71,4 @@ interface Folder extends ID {
|
|
|
69
71
|
children: Node[];
|
|
70
72
|
}
|
|
71
73
|
//#endregion
|
|
72
|
-
export { Separator as a, Root as i, Item as n, Node as r, Folder as t };
|
|
74
|
+
export { Separator as a, Root as i, Item as n, definitions_d_exports as o, Node as r, Folder as t };
|
package/dist/dynamic-link.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { LinkProps } from "./link.js";
|
|
2
2
|
//#region src/dynamic-link.d.ts
|
|
3
|
-
type DynamicLinkProps = LinkProps;
|
|
3
|
+
export type DynamicLinkProps = LinkProps;
|
|
4
4
|
/**
|
|
5
5
|
* Extends the default `Link` component
|
|
6
6
|
*
|
|
7
7
|
* It supports dynamic hrefs, which means you can use `/[lang]/my-page` with `dynamicHrefs` enabled
|
|
8
8
|
*/
|
|
9
|
-
declare function DynamicLink({ href, ref, ...props }: DynamicLinkProps): import("react").JSX.Element;
|
|
10
|
-
declare function updateHref(href: string, params: Record<string, string | string[]>): string;
|
|
9
|
+
export declare function DynamicLink({ href, ref, ...props }: DynamicLinkProps): import("react").JSX.Element;
|
|
10
|
+
export declare function updateHref(href: string, params: Record<string, string | string[]>): string;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { DynamicLink
|
|
12
|
+
export { DynamicLink as default };
|
|
@@ -741,6 +741,13 @@ function loader(...args) {
|
|
|
741
741
|
getPage(slugs = [], language = i18n?.defaultLanguage) {
|
|
742
742
|
return indexer.getPageBySlugs(slugs, language);
|
|
743
743
|
},
|
|
744
|
+
getPageByUrl(url, language) {
|
|
745
|
+
if (language !== void 0 || !i18n) return indexer.getPageByUrl(url, language);
|
|
746
|
+
for (const lang of i18n.languages) {
|
|
747
|
+
const page = indexer.getPageByUrl(url, lang);
|
|
748
|
+
if (page) return page;
|
|
749
|
+
}
|
|
750
|
+
},
|
|
744
751
|
getNodeMeta(node, language = i18n?.defaultLanguage) {
|
|
745
752
|
const ref = node.$ref;
|
|
746
753
|
if (!ref?.meta) return;
|
|
@@ -2,7 +2,7 @@ import { Framework } from "./index.js";
|
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
//#region src/framework/astro.d.ts
|
|
4
4
|
type AstroParams = Record<string, string | string[] | undefined>;
|
|
5
|
-
interface AstroProviderProps {
|
|
5
|
+
export interface AstroProviderProps {
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
pathname: string;
|
|
8
8
|
params?: AstroParams;
|
|
@@ -16,6 +16,5 @@ interface AstroProviderProps {
|
|
|
16
16
|
* Pass `pathname` and `params` from `Astro.url.pathname` and `Astro.params`.
|
|
17
17
|
* You can pass `navigate` from `astro:transitions/client` to preserve client navigation.
|
|
18
18
|
*/
|
|
19
|
-
declare function AstroProvider({ children, pathname, params, navigate, Link, Image }: AstroProviderProps): import("react").JSX.Element;
|
|
20
|
-
//#endregion
|
|
21
|
-
export { AstroProvider, AstroProviderProps };
|
|
19
|
+
export declare function AstroProvider({ children, pathname, params, navigate, Link, Image }: AstroProviderProps): import("react").JSX.Element;
|
|
20
|
+
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentProps, FC, ReactNode } from "react";
|
|
2
|
-
import { StaticImport } from "next/dist/shared/lib/get-img-props
|
|
2
|
+
import { StaticImport } from "next/dist/shared/lib/get-img-props";
|
|
3
3
|
//#region src/framework/index.d.ts
|
|
4
|
-
interface ImageProps extends Omit<ComponentProps<'img'>, 'src'> {
|
|
4
|
+
export interface ImageProps extends Omit<ComponentProps<'img'>, 'src'> {
|
|
5
5
|
sizes?: string;
|
|
6
6
|
/**
|
|
7
7
|
* Next.js Image component has other allowed type for `src`
|
|
@@ -15,11 +15,11 @@ interface ImageProps extends Omit<ComponentProps<'img'>, 'src'> {
|
|
|
15
15
|
interface LinkProps extends ComponentProps<'a'> {
|
|
16
16
|
prefetch?: boolean;
|
|
17
17
|
}
|
|
18
|
-
interface Router {
|
|
18
|
+
export interface Router {
|
|
19
19
|
push: (url: string) => void | Promise<void>;
|
|
20
20
|
refresh: () => void | Promise<void>;
|
|
21
21
|
}
|
|
22
|
-
interface Framework {
|
|
22
|
+
export interface Framework {
|
|
23
23
|
usePathname: () => string;
|
|
24
24
|
useParams: () => Record<string, string | string[]>;
|
|
25
25
|
useRouter: () => Router;
|
|
@@ -28,13 +28,12 @@ interface Framework {
|
|
|
28
28
|
}>;
|
|
29
29
|
Image?: FC<ImageProps>;
|
|
30
30
|
}
|
|
31
|
-
declare function FrameworkProvider({ Link, useRouter, useParams, usePathname, Image, children }: Framework & {
|
|
31
|
+
export declare function FrameworkProvider({ Link, useRouter, useParams, usePathname, Image, children }: Framework & {
|
|
32
32
|
children: ReactNode;
|
|
33
33
|
}): import("react").JSX.Element;
|
|
34
|
-
declare function usePathname(): string;
|
|
35
|
-
declare function useRouter(): Router;
|
|
36
|
-
declare function useParams(): Record<string, string | string[]>;
|
|
37
|
-
declare function Image(props: ImageProps): import("react").JSX.Element;
|
|
38
|
-
declare function Link(props: LinkProps): import("react").JSX.Element;
|
|
39
|
-
//#endregion
|
|
40
|
-
export { Framework, FrameworkProvider, Image, ImageProps, Link, Router, useParams, usePathname, useRouter };
|
|
34
|
+
export declare function usePathname(): string;
|
|
35
|
+
export declare function useRouter(): Router;
|
|
36
|
+
export declare function useParams(): Record<string, string | string[]>;
|
|
37
|
+
export declare function Image(props: ImageProps): import("react").JSX.Element;
|
|
38
|
+
export declare function Link(props: LinkProps): import("react").JSX.Element;
|
|
39
|
+
//#endregion
|
package/dist/framework/next.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Framework } from "./index.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
//#region src/framework/next.d.ts
|
|
4
|
-
declare function NextProvider({ children, Link: CustomLink, Image: CustomImage }: {
|
|
4
|
+
export declare function NextProvider({ children, Link: CustomLink, Image: CustomImage }: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
Link?: Framework['Link'];
|
|
7
7
|
Image?: Framework['Image'];
|
|
8
8
|
}): import("react").JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { NextProvider };
|
|
9
|
+
//#endregion
|
package/dist/framework/next.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { FrameworkProvider } from "./index.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { useParams, usePathname, useRouter } from "next/navigation
|
|
5
|
-
import Link from "next/link
|
|
6
|
-
import Image from "next/image
|
|
4
|
+
import { useParams, usePathname, useRouter } from "next/navigation";
|
|
5
|
+
import Link from "next/link";
|
|
6
|
+
import Image from "next/image";
|
|
7
7
|
//#region src/framework/next.tsx
|
|
8
8
|
function NextProvider({ children, Link: CustomLink, Image: CustomImage }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(FrameworkProvider, {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Framework } from "./index.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
//#region src/framework/react-router.d.ts
|
|
4
|
-
declare function ReactRouterProvider({ children, Link: CustomLink, Image: CustomImage }: {
|
|
4
|
+
export declare function ReactRouterProvider({ children, Link: CustomLink, Image: CustomImage }: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
Link?: Framework['Link'];
|
|
7
7
|
Image?: Framework['Image'];
|
|
8
8
|
}): import("react").JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { ReactRouterProvider };
|
|
9
|
+
//#endregion
|
|
@@ -4,10 +4,9 @@ import { ReactNode } from "react";
|
|
|
4
4
|
/**
|
|
5
5
|
* Fumadocs adapter for Tanstack Router/Start
|
|
6
6
|
*/
|
|
7
|
-
declare function TanstackProvider({ children, Link: CustomLink, Image: CustomImage }: {
|
|
7
|
+
export declare function TanstackProvider({ children, Link: CustomLink, Image: CustomImage }: {
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
Link?: Framework['Link'];
|
|
10
10
|
Image?: Framework['Image'];
|
|
11
11
|
}): import("react").JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { TanstackProvider };
|
|
12
|
+
//#endregion
|
package/dist/framework/waku.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Framework } from "./index.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
//#region src/framework/waku.d.ts
|
|
4
|
-
declare function WakuProvider({ children, Link: CustomLink, Image: CustomImage }: {
|
|
4
|
+
export declare function WakuProvider({ children, Link: CustomLink, Image: CustomImage }: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
Link?: Framework['Link'];
|
|
7
7
|
Image?: Framework['Image'];
|
|
8
8
|
}): import("react").JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { WakuProvider };
|
|
9
|
+
//#endregion
|
|
@@ -6,6 +6,5 @@ import { DependencyList, ReactNode } from "react";
|
|
|
6
6
|
*
|
|
7
7
|
* note: results are cached with (lang, code) as keys, if this is not the desired behaviour, pass a `deps` instead.
|
|
8
8
|
*/
|
|
9
|
-
declare function useShiki(code: string, options: HighlightOptions, deps?: DependencyList): ReactNode;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { useShiki };
|
|
9
|
+
export declare function useShiki(code: string, options: HighlightOptions, deps?: DependencyList): ReactNode;
|
|
10
|
+
//#endregion
|
|
@@ -3,10 +3,10 @@ import { Components } from "hast-util-to-jsx-runtime";
|
|
|
3
3
|
import { Root } from "hast";
|
|
4
4
|
import { BundledLanguage, BundledTheme, CodeOptionsMeta, CodeOptionsThemes, CodeToHastOptionsCommon, LanguageRegistration, ThemeRegistrationAny } from "shiki";
|
|
5
5
|
//#region src/highlight/index.d.ts
|
|
6
|
-
type HighlightOptions = HighlightHastOptions & {
|
|
6
|
+
export type HighlightOptions = HighlightHastOptions & {
|
|
7
7
|
components?: Partial<Components>;
|
|
8
8
|
};
|
|
9
|
-
type HighlightHastOptions = CodeToHastOptionsCommon<BundledLanguage> & CodeOptionsMeta & {
|
|
9
|
+
export type HighlightHastOptions = CodeToHastOptionsCommon<BundledLanguage> & CodeOptionsMeta & {
|
|
10
10
|
fallbackLanguage?: BundledLanguage | (string & {});
|
|
11
11
|
/**
|
|
12
12
|
* The Regex Engine for Shiki
|
|
@@ -15,17 +15,16 @@ type HighlightHastOptions = CodeToHastOptionsCommon<BundledLanguage> & CodeOptio
|
|
|
15
15
|
*/
|
|
16
16
|
engine?: 'js' | 'oniguruma';
|
|
17
17
|
} & (CodeOptionsThemes<BundledTheme> | Record<never, never>);
|
|
18
|
-
declare function highlightHast(code: string, options: HighlightHastOptions): Promise<Root>;
|
|
18
|
+
export declare function highlightHast(code: string, options: HighlightHastOptions): Promise<Root>;
|
|
19
19
|
/**
|
|
20
20
|
* Get Shiki highlighter instance of Fumadocs (mostly for internal use, you should use Shiki directly over this).
|
|
21
21
|
*
|
|
22
22
|
* @param engineType - Shiki Regex engine to use.
|
|
23
23
|
* @param options - Shiki options.
|
|
24
24
|
*/
|
|
25
|
-
declare function getHighlighter(engineType: 'js' | 'oniguruma', options?: {
|
|
25
|
+
export declare function getHighlighter(engineType: 'js' | 'oniguruma', options?: {
|
|
26
26
|
langs?: (BundledLanguage | LanguageRegistration)[];
|
|
27
27
|
themes?: (BundledTheme | ThemeRegistrationAny)[];
|
|
28
28
|
}): Promise<import("shiki").HighlighterCore>;
|
|
29
|
-
declare function highlight(code: string, options: HighlightOptions): Promise<ReactNode>;
|
|
30
|
-
//#endregion
|
|
31
|
-
export { HighlightHastOptions, HighlightOptions, getHighlighter, highlight, highlightHast };
|
|
29
|
+
export declare function highlight(code: string, options: HighlightOptions): Promise<ReactNode>;
|
|
30
|
+
//#endregion
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { n as ShikiFactory } from "../../index-BMEUQz-F.js";
|
|
2
2
|
//#region src/highlight/shiki/full.d.ts
|
|
3
|
-
declare const defaultShikiFactory: ShikiFactory;
|
|
3
|
+
export declare const defaultShikiFactory: ShikiFactory;
|
|
4
4
|
/** factory using the WASM powered Regex engine */
|
|
5
|
-
declare const wasmShikiFactory: ShikiFactory;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { defaultShikiFactory, wasmShikiFactory };
|
|
5
|
+
export declare const wasmShikiFactory: ShikiFactory;
|
|
6
|
+
//#endregion
|
|
@@ -4,13 +4,13 @@ import { DependencyList, ReactNode } from "react";
|
|
|
4
4
|
import { Components } from "hast-util-to-jsx-runtime";
|
|
5
5
|
import { HighlighterCore } from "shiki";
|
|
6
6
|
//#region src/highlight/shiki/react.d.ts
|
|
7
|
-
type UseShikiOptions = HighlightHastOptions & {
|
|
7
|
+
export type UseShikiOptions = HighlightHastOptions & {
|
|
8
8
|
components?: Partial<Components>;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* get highlighted results (uncached), use `useEffect` instead of React 19 APIs.
|
|
12
12
|
*/
|
|
13
|
-
declare function useShikiDynamic(highlighter: HighlighterCore | (() => Awaitable<HighlighterCore>), code: string, options: UseShikiOptions & {
|
|
13
|
+
export declare function useShikiDynamic(highlighter: HighlighterCore | (() => Awaitable<HighlighterCore>), code: string, options: UseShikiOptions & {
|
|
14
14
|
defaultValue?: ReactNode;
|
|
15
15
|
}, deps: DependencyList): ReactNode;
|
|
16
16
|
/**
|
|
@@ -18,6 +18,5 @@ declare function useShikiDynamic(highlighter: HighlighterCore | (() => Awaitable
|
|
|
18
18
|
*
|
|
19
19
|
* note: results are cached with (lang, code) as keys, if this is not the desired behaviour, pass a `deps` instead.
|
|
20
20
|
*/
|
|
21
|
-
declare function useShiki(highlighter: HighlighterCore | (() => Awaitable<HighlighterCore>), code: string, options: UseShikiOptions, deps?: DependencyList): ReactNode;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { UseShikiOptions, useShiki, useShikiDynamic };
|
|
21
|
+
export declare function useShiki(highlighter: HighlighterCore | (() => Awaitable<HighlighterCore>), code: string, options: UseShikiOptions, deps?: DependencyList): ReactNode;
|
|
22
|
+
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as I18nConfig } from "../index-DydiXvgS.js";
|
|
2
|
-
import { NextProxy } from "next/server
|
|
3
|
-
import { NextURL } from "next/dist/server/web/next-url
|
|
2
|
+
import { NextProxy } from "next/server";
|
|
3
|
+
import { NextURL } from "next/dist/server/web/next-url";
|
|
4
4
|
//#region src/i18n/middleware.d.ts
|
|
5
5
|
interface MiddlewareOptions extends I18nConfig {
|
|
6
6
|
/**
|
|
@@ -14,7 +14,7 @@ interface MiddlewareOptions extends I18nConfig {
|
|
|
14
14
|
*/
|
|
15
15
|
cookieName?: string;
|
|
16
16
|
}
|
|
17
|
-
interface URLFormatter {
|
|
17
|
+
export interface URLFormatter {
|
|
18
18
|
/**
|
|
19
19
|
* get locale code from request URL
|
|
20
20
|
*/
|
|
@@ -28,7 +28,6 @@ interface URLFormatter {
|
|
|
28
28
|
*/
|
|
29
29
|
remove: (url: NextURL) => URL;
|
|
30
30
|
}
|
|
31
|
-
declare const DefaultFormatter: URLFormatter;
|
|
32
|
-
declare function createI18nMiddleware({ languages, defaultLanguage, format, cookieName, hideLocale }: MiddlewareOptions): NextProxy;
|
|
33
|
-
//#endregion
|
|
34
|
-
export { DefaultFormatter, URLFormatter, createI18nMiddleware };
|
|
31
|
+
export declare const DefaultFormatter: URLFormatter;
|
|
32
|
+
export declare function createI18nMiddleware({ languages, defaultLanguage, format, cookieName, hideLocale }: MiddlewareOptions): NextProxy;
|
|
33
|
+
//#endregion
|
package/dist/i18n/middleware.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NextResponse } from "next/server
|
|
1
|
+
import { NextResponse } from "next/server";
|
|
2
2
|
//#region ../../node_modules/.pnpm/@formatjs+fast-memoize@3.1.7/node_modules/@formatjs/fast-memoize/index.js
|
|
3
3
|
function memoize(fn, options) {
|
|
4
4
|
const cache = options && options.cache ? options.cache : cacheDefault;
|