fumadocs-core 15.8.1 → 15.8.3
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/README.md +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/{chunk-HV3YIUWE.js → chunk-2IYQ7QMS.js} +1 -12
- package/dist/chunk-CX7IQ5Z6.js +21 -0
- package/dist/chunk-DDDU7USP.js +19 -0
- package/dist/chunk-HSBNG7QC.js +42 -0
- package/dist/chunk-YVVDKJ2H.js +34 -0
- package/dist/{chunk-BDG7Y4PS.js → chunk-Z5V4JSQY.js} +0 -8
- package/dist/content/github.d.ts +34 -0
- package/dist/content/github.js +7 -0
- package/dist/{get-toc-Cr2URuiP.d.ts → content/toc.d.ts} +5 -10
- package/dist/content/toc.js +8 -0
- package/dist/i18n/middleware.js +4 -8
- package/dist/negotiation/index.d.ts +19 -0
- package/dist/negotiation/index.js +11 -0
- package/dist/page-tree/index.d.ts +32 -0
- package/dist/page-tree/index.js +15 -0
- package/dist/search/server.js +5 -5
- package/dist/server/index.d.ts +10 -71
- package/dist/server/index.js +9 -64
- package/dist/source/index.d.ts +48 -52
- package/dist/source/index.js +5 -20
- package/dist/source/plugins/lucide-icons.d.ts +14 -0
- package/dist/source/plugins/lucide-icons.js +23 -0
- package/dist/toc.d.ts +7 -4
- package/dist/utils/use-effect-event.d.ts +4 -3
- package/dist/utils/use-effect-event.js +8 -5
- package/package.json +32 -10
package/README.md
CHANGED
package/dist/breadcrumb.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/page-tree/utils.ts
|
|
2
2
|
function flattenTree(nodes) {
|
|
3
3
|
const out = [];
|
|
4
4
|
for (const node of nodes) {
|
|
@@ -36,16 +36,6 @@ function getPageTreeRoots(pageTree) {
|
|
|
36
36
|
if (!("type" in pageTree)) result.push(pageTree);
|
|
37
37
|
return result;
|
|
38
38
|
}
|
|
39
|
-
function separatePageTree(pageTree) {
|
|
40
|
-
return pageTree.children.flatMap((child) => {
|
|
41
|
-
if (child.type !== "folder") return [];
|
|
42
|
-
return {
|
|
43
|
-
name: child.name,
|
|
44
|
-
url: child.index?.url,
|
|
45
|
-
children: child.children
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
39
|
function getPageTreePeers(tree, url) {
|
|
50
40
|
const parent = findParentFromTree(tree, url);
|
|
51
41
|
if (!parent) return [];
|
|
@@ -102,7 +92,6 @@ export {
|
|
|
102
92
|
flattenTree,
|
|
103
93
|
findNeighbour,
|
|
104
94
|
getPageTreeRoots,
|
|
105
|
-
separatePageTree,
|
|
106
95
|
getPageTreePeers,
|
|
107
96
|
findPath
|
|
108
97
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
remarkHeading
|
|
3
|
+
} from "./chunk-QMATWJ5F.js";
|
|
4
|
+
|
|
5
|
+
// src/content/toc.ts
|
|
6
|
+
import { remark } from "remark";
|
|
7
|
+
function getTableOfContents(content, remarkPlugins) {
|
|
8
|
+
if (remarkPlugins) {
|
|
9
|
+
return remark().use(remarkPlugins).use(remarkHeading).process(content).then((result2) => {
|
|
10
|
+
if ("toc" in result2.data) return result2.data.toc;
|
|
11
|
+
return [];
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
const result = remark().use(remarkHeading).processSync(content);
|
|
15
|
+
if ("toc" in result.data) return result.data.toc;
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
getTableOfContents
|
|
21
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/source/plugins/icon.ts
|
|
2
|
+
function iconPlugin(resolveIcon) {
|
|
3
|
+
function replaceIcon(node) {
|
|
4
|
+
if (node.icon === void 0 || typeof node.icon === "string")
|
|
5
|
+
node.icon = resolveIcon(node.icon);
|
|
6
|
+
return node;
|
|
7
|
+
}
|
|
8
|
+
return {
|
|
9
|
+
transformPageTree: {
|
|
10
|
+
file: replaceIcon,
|
|
11
|
+
folder: replaceIcon,
|
|
12
|
+
separator: replaceIcon
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
iconPlugin
|
|
19
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/content/github.ts
|
|
2
|
+
async function getGithubLastEdit({
|
|
3
|
+
repo,
|
|
4
|
+
token,
|
|
5
|
+
owner,
|
|
6
|
+
path,
|
|
7
|
+
sha,
|
|
8
|
+
options = {},
|
|
9
|
+
params: customParams = {}
|
|
10
|
+
}) {
|
|
11
|
+
const headers = new Headers(options.headers);
|
|
12
|
+
const params = new URLSearchParams();
|
|
13
|
+
params.set("path", path);
|
|
14
|
+
params.set("page", "1");
|
|
15
|
+
params.set("per_page", "1");
|
|
16
|
+
if (sha) params.set("sha", sha);
|
|
17
|
+
for (const [key, value] of Object.entries(customParams)) {
|
|
18
|
+
params.set(key, value);
|
|
19
|
+
}
|
|
20
|
+
if (token) {
|
|
21
|
+
headers.append("authorization", token);
|
|
22
|
+
}
|
|
23
|
+
const res = await fetch(
|
|
24
|
+
`https://api.github.com/repos/${owner}/${repo}/commits?${params.toString()}`,
|
|
25
|
+
{
|
|
26
|
+
cache: "force-cache",
|
|
27
|
+
...options,
|
|
28
|
+
headers
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
if (!res.ok)
|
|
32
|
+
throw new Error(
|
|
33
|
+
`Failed to fetch last edit time from Git ${await res.text()}`
|
|
34
|
+
);
|
|
35
|
+
const data = await res.json();
|
|
36
|
+
if (data.length === 0) return null;
|
|
37
|
+
return new Date(data[0].commit.committer.date);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
getGithubLastEdit
|
|
42
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// src/negotiation/index.ts
|
|
2
|
+
import Negotiator from "negotiator";
|
|
3
|
+
import { compile, match } from "path-to-regexp";
|
|
4
|
+
function getNegotiator(request) {
|
|
5
|
+
const headers = {};
|
|
6
|
+
request.headers.forEach((value, key) => {
|
|
7
|
+
headers[key] = value;
|
|
8
|
+
});
|
|
9
|
+
return new Negotiator({ headers });
|
|
10
|
+
}
|
|
11
|
+
function rewritePath(source, destination) {
|
|
12
|
+
const matcher = match(source, { decode: false });
|
|
13
|
+
const compiler = compile(destination, { encode: false });
|
|
14
|
+
return {
|
|
15
|
+
rewrite(pathname) {
|
|
16
|
+
const result = matcher(pathname);
|
|
17
|
+
if (!result) return false;
|
|
18
|
+
return compiler(result.params);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function isMarkdownPreferred(request, options) {
|
|
23
|
+
const {
|
|
24
|
+
markdownMediaTypes = ["text/plain", "text/markdown", "text/x-markdown"]
|
|
25
|
+
} = options ?? {};
|
|
26
|
+
const mediaTypes = getNegotiator(request).mediaTypes();
|
|
27
|
+
return markdownMediaTypes.some((type) => mediaTypes.includes(type));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
getNegotiator,
|
|
32
|
+
rewritePath,
|
|
33
|
+
isMarkdownPreferred
|
|
34
|
+
};
|
|
@@ -30,13 +30,6 @@ function parseFilePath(path) {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function parseFolderPath(path) {
|
|
34
|
-
return {
|
|
35
|
-
dirname: dirname(path),
|
|
36
|
-
name: basename(path),
|
|
37
|
-
path
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
33
|
function splitPath(path) {
|
|
41
34
|
return path.split("/").filter((p) => p.length > 0);
|
|
42
35
|
}
|
|
@@ -69,7 +62,6 @@ export {
|
|
|
69
62
|
extname,
|
|
70
63
|
dirname,
|
|
71
64
|
parseFilePath,
|
|
72
|
-
parseFolderPath,
|
|
73
65
|
splitPath,
|
|
74
66
|
joinPath,
|
|
75
67
|
slash
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface GetGithubLastCommitOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Repository name, like "fumadocs"
|
|
4
|
+
*/
|
|
5
|
+
repo: string;
|
|
6
|
+
/** Owner of repository */
|
|
7
|
+
owner: string;
|
|
8
|
+
/**
|
|
9
|
+
* Path to file
|
|
10
|
+
*/
|
|
11
|
+
path: string;
|
|
12
|
+
/**
|
|
13
|
+
* GitHub access token
|
|
14
|
+
*/
|
|
15
|
+
token?: string;
|
|
16
|
+
/**
|
|
17
|
+
* SHA or ref (branch or tag) name.
|
|
18
|
+
*/
|
|
19
|
+
sha?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Custom query parameters
|
|
22
|
+
*/
|
|
23
|
+
params?: Record<string, string>;
|
|
24
|
+
options?: RequestInit;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get the last edit time of a file using GitHub API
|
|
28
|
+
*
|
|
29
|
+
* By default, this will cache the result forever.
|
|
30
|
+
* Set `options.next.revalidate` to customise this.
|
|
31
|
+
*/
|
|
32
|
+
declare function getGithubLastEdit({ repo, token, owner, path, sha, options, params: customParams, }: GetGithubLastCommitOptions): Promise<Date | null>;
|
|
33
|
+
|
|
34
|
+
export { type GetGithubLastCommitOptions, getGithubLastEdit };
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import { PluggableList } from 'unified';
|
|
3
2
|
import { Compatible } from 'vfile';
|
|
3
|
+
import { TOCItemType } from '../toc.js';
|
|
4
|
+
import 'react';
|
|
4
5
|
|
|
5
|
-
interface TOCItemType {
|
|
6
|
-
title: ReactNode;
|
|
7
|
-
url: string;
|
|
8
|
-
depth: number;
|
|
9
|
-
}
|
|
10
|
-
type TableOfContents = TOCItemType[];
|
|
11
6
|
/**
|
|
12
7
|
* Get Table of Contents from markdown/mdx document (using remark)
|
|
13
8
|
*
|
|
14
9
|
* @param content - Markdown content or file
|
|
15
10
|
*/
|
|
16
|
-
declare function getTableOfContents(content: Compatible):
|
|
11
|
+
declare function getTableOfContents(content: Compatible): TOCItemType[];
|
|
17
12
|
/**
|
|
18
13
|
* Get Table of Contents from markdown/mdx document (using remark)
|
|
19
14
|
*
|
|
20
15
|
* @param content - Markdown content or file
|
|
21
16
|
* @param remarkPlugins - remark plugins to be applied first
|
|
22
17
|
*/
|
|
23
|
-
declare function getTableOfContents(content: Compatible, remarkPlugins: PluggableList): Promise<
|
|
18
|
+
declare function getTableOfContents(content: Compatible, remarkPlugins: PluggableList): Promise<TOCItemType[]>;
|
|
24
19
|
|
|
25
|
-
export {
|
|
20
|
+
export { getTableOfContents };
|
package/dist/i18n/middleware.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getNegotiator
|
|
3
|
+
} from "../chunk-YVVDKJ2H.js";
|
|
1
4
|
import "../chunk-JSBRDJBE.js";
|
|
2
5
|
|
|
3
6
|
// src/i18n/middleware.ts
|
|
4
7
|
import { match as matchLocale } from "@formatjs/intl-localematcher";
|
|
5
|
-
import Negotiator from "negotiator";
|
|
6
8
|
import { NextResponse } from "next/server";
|
|
7
9
|
var COOKIE = "FD_LOCALE";
|
|
8
10
|
function getLocale(request, locales, defaultLanguage) {
|
|
9
|
-
const
|
|
10
|
-
request.headers.forEach((value, key) => {
|
|
11
|
-
negotiatorHeaders[key] = value;
|
|
12
|
-
});
|
|
13
|
-
const languages = new Negotiator({ headers: negotiatorHeaders }).languages(
|
|
14
|
-
locales
|
|
15
|
-
);
|
|
11
|
+
const languages = getNegotiator(request).languages(locales);
|
|
16
12
|
return matchLocale(languages, locales, defaultLanguage);
|
|
17
13
|
}
|
|
18
14
|
var defaultFormat = (locale, path) => {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Negotiator from 'negotiator';
|
|
2
|
+
|
|
3
|
+
declare function getNegotiator(request: Request): Negotiator;
|
|
4
|
+
/**
|
|
5
|
+
* Rewrite incoming path matching the `source` pattern into the `destination` pattern.
|
|
6
|
+
*
|
|
7
|
+
* See [`path-to-regexp`](https://github.com/pillarjs/path-to-regexp) for accepted pattern formats.
|
|
8
|
+
*
|
|
9
|
+
* @param source - the original pattern of incoming paths
|
|
10
|
+
* @param destination - the target pattern to convert into
|
|
11
|
+
*/
|
|
12
|
+
declare function rewritePath(source: string, destination: string): {
|
|
13
|
+
rewrite(pathname: string): string | false;
|
|
14
|
+
};
|
|
15
|
+
declare function isMarkdownPreferred(request: Request, options?: {
|
|
16
|
+
markdownMediaTypes?: string[];
|
|
17
|
+
}): boolean;
|
|
18
|
+
|
|
19
|
+
export { getNegotiator, isMarkdownPreferred, rewritePath };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { N as Node, I as Item, R as Root, F as Folder } from '../definitions-Q95-psoo.js';
|
|
2
|
+
export { S as Separator } from '../definitions-Q95-psoo.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Flatten tree to an array of page nodes
|
|
7
|
+
*/
|
|
8
|
+
declare function flattenTree(nodes: Node[]): Item[];
|
|
9
|
+
/**
|
|
10
|
+
* Get neighbours of a page, useful for implementing "previous & next" buttons
|
|
11
|
+
*/
|
|
12
|
+
declare function findNeighbour(tree: Root, url: string, options?: {
|
|
13
|
+
separateRoot?: boolean;
|
|
14
|
+
}): {
|
|
15
|
+
previous?: Item;
|
|
16
|
+
next?: Item;
|
|
17
|
+
};
|
|
18
|
+
declare function getPageTreeRoots(pageTree: Root | Folder): (Root | Folder)[];
|
|
19
|
+
/**
|
|
20
|
+
* Get other page tree nodes that lives under the same parent
|
|
21
|
+
*/
|
|
22
|
+
declare function getPageTreePeers(tree: Root, url: string): Item[];
|
|
23
|
+
/**
|
|
24
|
+
* Search the path of a node in the tree matched by the matcher.
|
|
25
|
+
*
|
|
26
|
+
* @returns The path to the target node (from starting root), or null if the page doesn't exist
|
|
27
|
+
*/
|
|
28
|
+
declare function findPath(nodes: Node[], matcher: (node: Node) => boolean, options?: {
|
|
29
|
+
includeSeparator?: boolean;
|
|
30
|
+
}): Node[] | null;
|
|
31
|
+
|
|
32
|
+
export { Folder, Item, Node, Root, findNeighbour, findPath, flattenTree, getPageTreePeers, getPageTreeRoots };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
findNeighbour,
|
|
3
|
+
findPath,
|
|
4
|
+
flattenTree,
|
|
5
|
+
getPageTreePeers,
|
|
6
|
+
getPageTreeRoots
|
|
7
|
+
} from "../chunk-2IYQ7QMS.js";
|
|
8
|
+
import "../chunk-JSBRDJBE.js";
|
|
9
|
+
export {
|
|
10
|
+
findNeighbour,
|
|
11
|
+
findPath,
|
|
12
|
+
flattenTree,
|
|
13
|
+
getPageTreePeers,
|
|
14
|
+
getPageTreeRoots
|
|
15
|
+
};
|
package/dist/search/server.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
basename,
|
|
3
|
-
extname
|
|
4
|
-
} from "../chunk-BDG7Y4PS.js";
|
|
5
1
|
import {
|
|
6
2
|
searchAdvanced,
|
|
7
3
|
searchSimple
|
|
@@ -10,9 +6,13 @@ import "../chunk-ZMWYLUDP.js";
|
|
|
10
6
|
import {
|
|
11
7
|
createContentHighlighter
|
|
12
8
|
} from "../chunk-OTD7MV33.js";
|
|
9
|
+
import {
|
|
10
|
+
basename,
|
|
11
|
+
extname
|
|
12
|
+
} from "../chunk-Z5V4JSQY.js";
|
|
13
13
|
import {
|
|
14
14
|
findPath
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-2IYQ7QMS.js";
|
|
16
16
|
import "../chunk-JSBRDJBE.js";
|
|
17
17
|
|
|
18
18
|
// src/search/server.ts
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,80 +1,16 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import { N as Node, I as Item, R as Root, F as Folder } from '../definitions-Q95-psoo.js';
|
|
3
|
-
export { d as PageTree } from '../definitions-Q95-psoo.js';
|
|
1
|
+
export { GetGithubLastCommitOptions, getGithubLastEdit } from '../content/github.js';
|
|
4
2
|
import { Metadata } from 'next';
|
|
5
3
|
import { NextRequest } from 'next/server';
|
|
6
4
|
import { LoaderOutput, LoaderConfig, InferPageType } from '../source/index.js';
|
|
5
|
+
export { getTableOfContents } from '../content/toc.js';
|
|
6
|
+
export { TOCItemType, TableOfContents } from '../toc.js';
|
|
7
7
|
export { SortedResult } from '../search/index.js';
|
|
8
|
+
export { findNeighbour, findPath, flattenTree, getPageTreePeers, getPageTreeRoots } from '../page-tree/index.js';
|
|
9
|
+
export { d as PageTree } from '../definitions-Q95-psoo.js';
|
|
10
|
+
import '../i18n/index.js';
|
|
8
11
|
import 'react';
|
|
9
12
|
import 'unified';
|
|
10
13
|
import 'vfile';
|
|
11
|
-
import '../i18n/index.js';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Flatten tree to an array of page nodes
|
|
15
|
-
*/
|
|
16
|
-
declare function flattenTree(nodes: Node[]): Item[];
|
|
17
|
-
/**
|
|
18
|
-
* Get neighbours of a page, useful for implementing "previous & next" buttons
|
|
19
|
-
*/
|
|
20
|
-
declare function findNeighbour(tree: Root, url: string, options?: {
|
|
21
|
-
separateRoot?: boolean;
|
|
22
|
-
}): {
|
|
23
|
-
previous?: Item;
|
|
24
|
-
next?: Item;
|
|
25
|
-
};
|
|
26
|
-
declare function getPageTreeRoots(pageTree: Root | Folder): (Root | Folder)[];
|
|
27
|
-
/**
|
|
28
|
-
* Separate the folder nodes of a root into multiple roots
|
|
29
|
-
*
|
|
30
|
-
* @deprecated it's useless
|
|
31
|
-
*/
|
|
32
|
-
declare function separatePageTree(pageTree: Root): Root[];
|
|
33
|
-
/**
|
|
34
|
-
* Get other page tree nodes that lives under the same parent
|
|
35
|
-
*/
|
|
36
|
-
declare function getPageTreePeers(tree: Root, url: string): Item[];
|
|
37
|
-
/**
|
|
38
|
-
* Search the path of a node in the tree matched by the matcher.
|
|
39
|
-
*
|
|
40
|
-
* @returns The path to the target node (from starting root), or null if the page doesn't exist
|
|
41
|
-
*/
|
|
42
|
-
declare function findPath(nodes: Node[], matcher: (node: Node) => boolean, options?: {
|
|
43
|
-
includeSeparator?: boolean;
|
|
44
|
-
}): Node[] | null;
|
|
45
|
-
|
|
46
|
-
interface GetGithubLastCommitOptions {
|
|
47
|
-
/**
|
|
48
|
-
* Repository name, like "fumadocs"
|
|
49
|
-
*/
|
|
50
|
-
repo: string;
|
|
51
|
-
/** Owner of repository */
|
|
52
|
-
owner: string;
|
|
53
|
-
/**
|
|
54
|
-
* Path to file
|
|
55
|
-
*/
|
|
56
|
-
path: string;
|
|
57
|
-
/**
|
|
58
|
-
* GitHub access token
|
|
59
|
-
*/
|
|
60
|
-
token?: string;
|
|
61
|
-
/**
|
|
62
|
-
* SHA or ref (branch or tag) name.
|
|
63
|
-
*/
|
|
64
|
-
sha?: string;
|
|
65
|
-
/**
|
|
66
|
-
* Custom query parameters
|
|
67
|
-
*/
|
|
68
|
-
params?: Record<string, string>;
|
|
69
|
-
options?: RequestInit;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Get the last edit time of a file using GitHub API
|
|
73
|
-
*
|
|
74
|
-
* By default, this will cache the result forever.
|
|
75
|
-
* Set `options.next.revalidate` to customise this.
|
|
76
|
-
*/
|
|
77
|
-
declare function getGithubLastEdit({ repo, token, owner, path, sha, options, params: customParams, }: GetGithubLastCommitOptions): Promise<Date | null>;
|
|
78
14
|
|
|
79
15
|
interface ImageMeta {
|
|
80
16
|
alt: string;
|
|
@@ -82,6 +18,9 @@ interface ImageMeta {
|
|
|
82
18
|
width: number;
|
|
83
19
|
height: number;
|
|
84
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Use the SEO features of your own React.js framework instead
|
|
23
|
+
*/
|
|
85
24
|
declare function createMetadataImage<S extends LoaderOutput<LoaderConfig>>(options: {
|
|
86
25
|
source: S;
|
|
87
26
|
/**
|
|
@@ -124,4 +63,4 @@ declare function createMetadataImage<S extends LoaderOutput<LoaderConfig>>(optio
|
|
|
124
63
|
}) => Response | Promise<Response>) => (request: NextRequest, options: any) => Response | Promise<Response>;
|
|
125
64
|
};
|
|
126
65
|
|
|
127
|
-
export {
|
|
66
|
+
export { createMetadataImage };
|
package/dist/server/index.js
CHANGED
|
@@ -1,72 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../chunk-
|
|
2
|
+
getTableOfContents
|
|
3
|
+
} from "../chunk-CX7IQ5Z6.js";
|
|
4
|
+
import "../chunk-QMATWJ5F.js";
|
|
4
5
|
import {
|
|
5
6
|
findNeighbour,
|
|
6
7
|
findPath,
|
|
7
8
|
flattenTree,
|
|
8
9
|
getPageTreePeers,
|
|
9
|
-
getPageTreeRoots
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
getPageTreeRoots
|
|
11
|
+
} from "../chunk-2IYQ7QMS.js";
|
|
12
|
+
import {
|
|
13
|
+
getGithubLastEdit
|
|
14
|
+
} from "../chunk-HSBNG7QC.js";
|
|
12
15
|
import "../chunk-JSBRDJBE.js";
|
|
13
16
|
|
|
14
|
-
// src/server/get-toc.ts
|
|
15
|
-
import { remark } from "remark";
|
|
16
|
-
function getTableOfContents(content, remarkPlugins) {
|
|
17
|
-
if (remarkPlugins) {
|
|
18
|
-
return remark().use(remarkPlugins).use(remarkHeading).process(content).then((result2) => {
|
|
19
|
-
if ("toc" in result2.data) return result2.data.toc;
|
|
20
|
-
return [];
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
const result = remark().use(remarkHeading).processSync(content);
|
|
24
|
-
if ("toc" in result.data) return result.data.toc;
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// src/source/page-tree/definitions.ts
|
|
29
|
-
var definitions_exports = {};
|
|
30
|
-
|
|
31
|
-
// src/server/git-api.ts
|
|
32
|
-
async function getGithubLastEdit({
|
|
33
|
-
repo,
|
|
34
|
-
token,
|
|
35
|
-
owner,
|
|
36
|
-
path,
|
|
37
|
-
sha,
|
|
38
|
-
options = {},
|
|
39
|
-
params: customParams = {}
|
|
40
|
-
}) {
|
|
41
|
-
const headers = new Headers(options.headers);
|
|
42
|
-
const params = new URLSearchParams();
|
|
43
|
-
params.set("path", path);
|
|
44
|
-
params.set("page", "1");
|
|
45
|
-
params.set("per_page", "1");
|
|
46
|
-
if (sha) params.set("sha", sha);
|
|
47
|
-
for (const [key, value] of Object.entries(customParams)) {
|
|
48
|
-
params.set(key, value);
|
|
49
|
-
}
|
|
50
|
-
if (token) {
|
|
51
|
-
headers.append("authorization", token);
|
|
52
|
-
}
|
|
53
|
-
const res = await fetch(
|
|
54
|
-
`https://api.github.com/repos/${owner}/${repo}/commits?${params.toString()}`,
|
|
55
|
-
{
|
|
56
|
-
cache: "force-cache",
|
|
57
|
-
...options,
|
|
58
|
-
headers
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
if (!res.ok)
|
|
62
|
-
throw new Error(
|
|
63
|
-
`Failed to fetch last edit time from Git ${await res.text()}`
|
|
64
|
-
);
|
|
65
|
-
const data = await res.json();
|
|
66
|
-
if (data.length === 0) return null;
|
|
67
|
-
return new Date(data[0].commit.committer.date);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
17
|
// src/server/metadata.ts
|
|
71
18
|
function createMetadataImage(options) {
|
|
72
19
|
const { filename = "image.png", imageRoute = "/docs-og" } = options;
|
|
@@ -126,7 +73,6 @@ function createMetadataImage(options) {
|
|
|
126
73
|
};
|
|
127
74
|
}
|
|
128
75
|
export {
|
|
129
|
-
definitions_exports as PageTree,
|
|
130
76
|
createMetadataImage,
|
|
131
77
|
findNeighbour,
|
|
132
78
|
findPath,
|
|
@@ -134,6 +80,5 @@ export {
|
|
|
134
80
|
getGithubLastEdit,
|
|
135
81
|
getPageTreePeers,
|
|
136
82
|
getPageTreeRoots,
|
|
137
|
-
getTableOfContents
|
|
138
|
-
separatePageTree
|
|
83
|
+
getTableOfContents
|
|
139
84
|
};
|
package/dist/source/index.d.ts
CHANGED
|
@@ -37,57 +37,6 @@ interface FolderInfo {
|
|
|
37
37
|
dirname: string;
|
|
38
38
|
}
|
|
39
39
|
declare function parseFilePath(path: string): FileInfo;
|
|
40
|
-
/**
|
|
41
|
-
* @deprecated use `dirname` and `basename` directly.
|
|
42
|
-
*/
|
|
43
|
-
declare function parseFolderPath(path: string): FolderInfo;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* In memory file system.
|
|
47
|
-
*/
|
|
48
|
-
declare class FileSystem<File> {
|
|
49
|
-
files: Map<string, File>;
|
|
50
|
-
folders: Map<string, string[]>;
|
|
51
|
-
constructor(inherit?: FileSystem<File>);
|
|
52
|
-
read(path: string): File | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* get the direct children of folder (in virtual file path)
|
|
55
|
-
*/
|
|
56
|
-
readDir(path: string): string[] | undefined;
|
|
57
|
-
write(path: string, file: File): void;
|
|
58
|
-
delete(path: string): boolean;
|
|
59
|
-
deleteDir(path: string): boolean;
|
|
60
|
-
getFiles(): string[];
|
|
61
|
-
makeDir(path: string): void;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
interface LoadOptions {
|
|
65
|
-
buildFile: (file: VirtualFile) => MetaFile | PageFile;
|
|
66
|
-
plugins?: LoaderPlugin[];
|
|
67
|
-
}
|
|
68
|
-
type ContentStorage<Page extends PageData = PageData, Meta extends MetaData = MetaData> = FileSystem<MetaFile<Meta> | PageFile<Page>>;
|
|
69
|
-
interface MetaFile<Data extends MetaData = MetaData> {
|
|
70
|
-
path: string;
|
|
71
|
-
absolutePath: string;
|
|
72
|
-
format: 'meta';
|
|
73
|
-
data: Data;
|
|
74
|
-
}
|
|
75
|
-
interface PageFile<Data extends PageData = PageData> {
|
|
76
|
-
path: string;
|
|
77
|
-
absolutePath: string;
|
|
78
|
-
format: 'page';
|
|
79
|
-
slugs: string[];
|
|
80
|
-
data: Data;
|
|
81
|
-
}
|
|
82
|
-
type Transformer = (context: {
|
|
83
|
-
storage: ContentStorage;
|
|
84
|
-
}) => void;
|
|
85
|
-
/**
|
|
86
|
-
* @returns a map of locale and its content storage.
|
|
87
|
-
*
|
|
88
|
-
* in the storage, locale codes are removed from file paths, hence the same file will have same file paths in every storage.
|
|
89
|
-
*/
|
|
90
|
-
declare function loadFiles(files: VirtualFile[], options: LoadOptions, i18n: I18nConfig): Record<string, ContentStorage>;
|
|
91
40
|
|
|
92
41
|
type LoaderPlugins<Page extends PageData, Meta extends MetaData> = LoaderPlugin<Page, Meta>[];
|
|
93
42
|
interface LoaderPlugin<Page extends PageData = PageData, Meta extends MetaData = MetaData> {
|
|
@@ -288,6 +237,53 @@ type InferMetaType<Utils extends LoaderOutput<any>> = Utils extends LoaderOutput
|
|
|
288
237
|
*/
|
|
289
238
|
type UrlFn = (slugs: string[], locale?: string) => string;
|
|
290
239
|
|
|
240
|
+
/**
|
|
241
|
+
* In memory file system.
|
|
242
|
+
*/
|
|
243
|
+
declare class FileSystem<File> {
|
|
244
|
+
files: Map<string, File>;
|
|
245
|
+
folders: Map<string, string[]>;
|
|
246
|
+
constructor(inherit?: FileSystem<File>);
|
|
247
|
+
read(path: string): File | undefined;
|
|
248
|
+
/**
|
|
249
|
+
* get the direct children of folder (in virtual file path)
|
|
250
|
+
*/
|
|
251
|
+
readDir(path: string): string[] | undefined;
|
|
252
|
+
write(path: string, file: File): void;
|
|
253
|
+
delete(path: string): boolean;
|
|
254
|
+
deleteDir(path: string): boolean;
|
|
255
|
+
getFiles(): string[];
|
|
256
|
+
makeDir(path: string): void;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
interface LoadOptions {
|
|
260
|
+
buildFile: (file: VirtualFile) => MetaFile | PageFile;
|
|
261
|
+
plugins?: LoaderPlugin[];
|
|
262
|
+
}
|
|
263
|
+
type ContentStorage<Page extends PageData = PageData, Meta extends MetaData = MetaData> = FileSystem<MetaFile<Meta> | PageFile<Page>>;
|
|
264
|
+
interface MetaFile<Data extends MetaData = MetaData> {
|
|
265
|
+
path: string;
|
|
266
|
+
absolutePath: string;
|
|
267
|
+
format: 'meta';
|
|
268
|
+
data: Data;
|
|
269
|
+
}
|
|
270
|
+
interface PageFile<Data extends PageData = PageData> {
|
|
271
|
+
path: string;
|
|
272
|
+
absolutePath: string;
|
|
273
|
+
format: 'page';
|
|
274
|
+
slugs: string[];
|
|
275
|
+
data: Data;
|
|
276
|
+
}
|
|
277
|
+
type Transformer = (context: {
|
|
278
|
+
storage: ContentStorage;
|
|
279
|
+
}) => void;
|
|
280
|
+
/**
|
|
281
|
+
* @returns a map of locale and its content storage.
|
|
282
|
+
*
|
|
283
|
+
* in the storage, locale codes are removed from file paths, hence the same file will have same file paths in every storage.
|
|
284
|
+
*/
|
|
285
|
+
declare function loadFiles(files: VirtualFile[], options: LoadOptions, i18n: I18nConfig): Record<string, ContentStorage>;
|
|
286
|
+
|
|
291
287
|
interface PageTreeBuilderContext<Page extends PageData = PageData, Meta extends MetaData = MetaData> {
|
|
292
288
|
/**
|
|
293
289
|
* @internal resolve paths without extensions
|
|
@@ -338,4 +334,4 @@ interface PageTreeBuilder {
|
|
|
338
334
|
}
|
|
339
335
|
declare function createPageTreeBuilder(getUrl: UrlFn): PageTreeBuilder;
|
|
340
336
|
|
|
341
|
-
export { type BaseOptions, type ContentStorage, type FileInfo, FileSystem, type FolderInfo, type InferMetaType, type InferPageType, type LanguageEntry, type LoadOptions, type LoaderConfig, type LoaderOptions, type LoaderOutput, type LoaderPlugin, type LoaderPlugins, type Meta, type MetaData, type MetaFile, type Page, type PageData, type PageFile, type PageTreeBuilder, type PageTreeBuilderContext, type PageTreeTransformer, type Source, type SourceConfig, type Transformer, type UrlFn, type VirtualFile, buildPlugins, createGetUrl, createPageTreeBuilder, getSlugs, loadFiles, loader, parseFilePath
|
|
337
|
+
export { type BaseOptions, type ContentStorage, type FileInfo, FileSystem, type FolderInfo, type InferMetaType, type InferPageType, type LanguageEntry, type LoadOptions, type LoaderConfig, type LoaderOptions, type LoaderOutput, type LoaderPlugin, type LoaderPlugins, type Meta, type MetaData, type MetaFile, type Page, type PageData, type PageFile, type PageTreeBuilder, type PageTreeBuilderContext, type PageTreeTransformer, type Source, type SourceConfig, type Transformer, type UrlFn, type VirtualFile, buildPlugins, createGetUrl, createPageTreeBuilder, getSlugs, loadFiles, loader, parseFilePath };
|
package/dist/source/index.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
iconPlugin
|
|
3
|
+
} from "../chunk-DDDU7USP.js";
|
|
1
4
|
import {
|
|
2
5
|
basename,
|
|
3
6
|
dirname,
|
|
4
7
|
extname,
|
|
5
8
|
joinPath,
|
|
6
9
|
parseFilePath,
|
|
7
|
-
parseFolderPath,
|
|
8
10
|
slash,
|
|
9
11
|
splitPath
|
|
10
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-Z5V4JSQY.js";
|
|
11
13
|
import {
|
|
12
14
|
normalizeUrl
|
|
13
15
|
} from "../chunk-PFNP6PEB.js";
|
|
@@ -504,22 +506,6 @@ function fromStorageTransformer(transformer) {
|
|
|
504
506
|
};
|
|
505
507
|
}
|
|
506
508
|
|
|
507
|
-
// src/source/plugins/icon.ts
|
|
508
|
-
function iconPlugin(resolveIcon) {
|
|
509
|
-
function replaceIcon(node) {
|
|
510
|
-
if (node.icon === void 0 || typeof node.icon === "string")
|
|
511
|
-
node.icon = resolveIcon(node.icon);
|
|
512
|
-
return node;
|
|
513
|
-
}
|
|
514
|
-
return {
|
|
515
|
-
transformPageTree: {
|
|
516
|
-
file: replaceIcon,
|
|
517
|
-
folder: replaceIcon,
|
|
518
|
-
separator: replaceIcon
|
|
519
|
-
}
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
|
|
523
509
|
// src/source/loader.ts
|
|
524
510
|
function indexPages(storages, getUrl) {
|
|
525
511
|
const result = {
|
|
@@ -758,6 +744,5 @@ export {
|
|
|
758
744
|
getSlugs,
|
|
759
745
|
loadFiles,
|
|
760
746
|
loader,
|
|
761
|
-
parseFilePath
|
|
762
|
-
parseFolderPath
|
|
747
|
+
parseFilePath
|
|
763
748
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LoaderPlugin } from '../index.js';
|
|
2
|
+
import { icons } from 'lucide-react';
|
|
3
|
+
import '../../definitions-Q95-psoo.js';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '../../i18n/index.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Convert icon names into Lucide Icons, requires `lucide-react` to be installed.
|
|
9
|
+
*/
|
|
10
|
+
declare function lucideIconsPlugin(options?: {
|
|
11
|
+
defaultIcon?: keyof typeof icons;
|
|
12
|
+
}): LoaderPlugin;
|
|
13
|
+
|
|
14
|
+
export { lucideIconsPlugin };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
iconPlugin
|
|
3
|
+
} from "../../chunk-DDDU7USP.js";
|
|
4
|
+
import "../../chunk-JSBRDJBE.js";
|
|
5
|
+
|
|
6
|
+
// src/source/plugins/lucide-icons.ts
|
|
7
|
+
import { icons } from "lucide-react";
|
|
8
|
+
import { createElement } from "react";
|
|
9
|
+
function lucideIconsPlugin(options = {}) {
|
|
10
|
+
const { defaultIcon } = options;
|
|
11
|
+
return iconPlugin((icon = defaultIcon) => {
|
|
12
|
+
if (icon === void 0) return;
|
|
13
|
+
const Icon = icons[icon];
|
|
14
|
+
if (!icon) {
|
|
15
|
+
console.warn(`[lucide-icons-plugin] Unknown icon detected: ${icon}.`);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
return createElement(Icon);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
lucideIconsPlugin
|
|
23
|
+
};
|
package/dist/toc.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, RefObject, AnchorHTMLAttributes } from 'react';
|
|
3
|
-
import { T as TableOfContents } from './get-toc-Cr2URuiP.js';
|
|
4
|
-
import 'unified';
|
|
5
|
-
import 'vfile';
|
|
6
3
|
|
|
4
|
+
interface TOCItemType {
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
url: string;
|
|
7
|
+
depth: number;
|
|
8
|
+
}
|
|
9
|
+
type TableOfContents = TOCItemType[];
|
|
7
10
|
/**
|
|
8
11
|
* The estimated active heading ID
|
|
9
12
|
*/
|
|
@@ -37,4 +40,4 @@ interface TOCItemProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'hr
|
|
|
37
40
|
}
|
|
38
41
|
declare const TOCItem: react.ForwardRefExoticComponent<TOCItemProps & react.RefAttributes<HTMLAnchorElement>>;
|
|
39
42
|
|
|
40
|
-
export { AnchorProvider, type AnchorProviderProps, ScrollProvider, type ScrollProviderProps, TOCItem, type TOCItemProps, useActiveAnchor, useActiveAnchors };
|
|
43
|
+
export { AnchorProvider, type AnchorProviderProps, ScrollProvider, type ScrollProviderProps, TOCItem, type TOCItemProps, type TOCItemType, type TableOfContents, useActiveAnchor, useActiveAnchors };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
type UseEffectEvent = <F extends (...params: never[]) => unknown>(callback: F) => F;
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
+
* Polyfill for React.js 19.2 `useEffectEvent`.
|
|
3
4
|
*
|
|
4
|
-
* @internal
|
|
5
|
+
* @internal Don't use this, could be deleted anytime.
|
|
5
6
|
*/
|
|
6
|
-
declare
|
|
7
|
+
declare const useEffectEvent: UseEffectEvent;
|
|
7
8
|
|
|
8
9
|
export { useEffectEvent };
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
import "../chunk-JSBRDJBE.js";
|
|
3
3
|
|
|
4
4
|
// src/utils/use-effect-event.ts
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
const ref = useRef(callback);
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
var useEffectEvent = "useEffectEvent" in React ? { ...React }.useEffectEvent : (callback) => {
|
|
7
|
+
const ref = React.useRef(callback);
|
|
8
8
|
ref.current = callback;
|
|
9
|
-
return useCallback(
|
|
10
|
-
|
|
9
|
+
return React.useCallback(
|
|
10
|
+
((...params) => ref.current(...params)),
|
|
11
|
+
[]
|
|
12
|
+
);
|
|
13
|
+
};
|
|
11
14
|
export {
|
|
12
15
|
useEffectEvent
|
|
13
16
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-core",
|
|
3
|
-
"version": "15.8.
|
|
4
|
-
"description": "The library for building a documentation website in
|
|
3
|
+
"version": "15.8.3",
|
|
4
|
+
"description": "The library for building a documentation website in any React.js framework",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
6
|
+
"Fumadocs",
|
|
7
7
|
"Docs"
|
|
8
8
|
],
|
|
9
|
-
"homepage": "https://fumadocs.
|
|
9
|
+
"homepage": "https://fumadocs.dev",
|
|
10
10
|
"repository": "github:fuma-nama/fumadocs",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "Fuma Nama",
|
|
@@ -28,10 +28,22 @@
|
|
|
28
28
|
"import": "./dist/content/index.js",
|
|
29
29
|
"types": "./dist/content/index.d.ts"
|
|
30
30
|
},
|
|
31
|
+
"./content/*": {
|
|
32
|
+
"import": "./dist/content/*.js",
|
|
33
|
+
"types": "./dist/content/*.d.ts"
|
|
34
|
+
},
|
|
31
35
|
"./hide-if-empty": {
|
|
32
36
|
"import": "./dist/hide-if-empty.js",
|
|
33
37
|
"types": "./dist/hide-if-empty.d.ts"
|
|
34
38
|
},
|
|
39
|
+
"./negotiation": {
|
|
40
|
+
"import": "./dist/negotiation/index.js",
|
|
41
|
+
"types": "./dist/negotiation/index.d.ts"
|
|
42
|
+
},
|
|
43
|
+
"./page-tree": {
|
|
44
|
+
"import": "./dist/page-tree/index.js",
|
|
45
|
+
"types": "./dist/page-tree/index.d.ts"
|
|
46
|
+
},
|
|
35
47
|
"./search": {
|
|
36
48
|
"import": "./dist/search/index.js",
|
|
37
49
|
"types": "./dist/search/index.d.ts"
|
|
@@ -48,6 +60,10 @@
|
|
|
48
60
|
"import": "./dist/source/index.js",
|
|
49
61
|
"types": "./dist/source/index.d.ts"
|
|
50
62
|
},
|
|
63
|
+
"./source/*": {
|
|
64
|
+
"import": "./dist/source/plugins/*.js",
|
|
65
|
+
"types": "./dist/source/plugins/*.d.ts"
|
|
66
|
+
},
|
|
51
67
|
"./utils/*": {
|
|
52
68
|
"import": "./dist/utils/*.js",
|
|
53
69
|
"types": "./dist/utils/*.d.ts"
|
|
@@ -104,6 +120,7 @@
|
|
|
104
120
|
"image-size": "^2.0.2",
|
|
105
121
|
"negotiator": "^1.0.0",
|
|
106
122
|
"npm-to-yarn": "^3.0.1",
|
|
123
|
+
"path-to-regexp": "^8.3.0",
|
|
107
124
|
"react-remove-scroll": "^2.7.1",
|
|
108
125
|
"remark": "^15.0.0",
|
|
109
126
|
"remark-gfm": "^4.0.1",
|
|
@@ -114,24 +131,25 @@
|
|
|
114
131
|
},
|
|
115
132
|
"devDependencies": {
|
|
116
133
|
"@mdx-js/mdx": "^3.1.1",
|
|
117
|
-
"@mixedbread/sdk": "^0.
|
|
134
|
+
"@mixedbread/sdk": "^0.31.1",
|
|
118
135
|
"@oramacloud/client": "^2.1.4",
|
|
119
|
-
"@tanstack/react-router": "^1.132.
|
|
136
|
+
"@tanstack/react-router": "^1.132.31",
|
|
120
137
|
"@types/estree-jsx": "^1.0.5",
|
|
121
138
|
"@types/hast": "^3.0.4",
|
|
122
139
|
"@types/mdast": "^4.0.3",
|
|
123
140
|
"@types/negotiator": "^0.6.4",
|
|
124
|
-
"@types/node": "24.
|
|
125
|
-
"@types/react": "^19.
|
|
126
|
-
"@types/react-dom": "^19.
|
|
141
|
+
"@types/node": "24.6.2",
|
|
142
|
+
"@types/react": "^19.2.0",
|
|
143
|
+
"@types/react-dom": "^19.2.0",
|
|
127
144
|
"algoliasearch": "5.39.0",
|
|
145
|
+
"lucide-react": "^0.544.0",
|
|
128
146
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
129
147
|
"mdast-util-mdxjs-esm": "^2.0.1",
|
|
130
148
|
"next": "^15.5.4",
|
|
131
149
|
"react-router": "^7.9.3",
|
|
132
150
|
"remark-mdx": "^3.1.1",
|
|
133
151
|
"remove-markdown": "^0.6.2",
|
|
134
|
-
"typescript": "^5.9.
|
|
152
|
+
"typescript": "^5.9.3",
|
|
135
153
|
"unified": "^11.0.5",
|
|
136
154
|
"vfile": "^6.0.3",
|
|
137
155
|
"waku": "^0.26.1",
|
|
@@ -144,6 +162,7 @@
|
|
|
144
162
|
"@tanstack/react-router": "1.x.x",
|
|
145
163
|
"@types/react": "*",
|
|
146
164
|
"algoliasearch": "5.x.x",
|
|
165
|
+
"lucide-react": "*",
|
|
147
166
|
"next": "14.x.x || 15.x.x",
|
|
148
167
|
"react": "18.x.x || 19.x.x",
|
|
149
168
|
"react-dom": "18.x.x || 19.x.x",
|
|
@@ -180,6 +199,9 @@
|
|
|
180
199
|
},
|
|
181
200
|
"@tanstack/react-router": {
|
|
182
201
|
"optional": true
|
|
202
|
+
},
|
|
203
|
+
"lucide-react": {
|
|
204
|
+
"optional": true
|
|
183
205
|
}
|
|
184
206
|
},
|
|
185
207
|
"publishConfig": {
|