fumadocs-core 14.7.4 → 14.7.5
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/{chunk-2V6SCS43.js → chunk-DELA6Z2I.js} +2 -2
- package/dist/{chunk-BO6MEAPT.js → chunk-GIPLMX5F.js} +1 -1
- package/dist/mdx-plugins/index.js +1 -1
- package/dist/{orama-cloud-QNHGN6SO.js → orama-cloud-HAZVD2ZO.js} +1 -1
- package/dist/search/client.js +2 -2
- package/dist/search/server.js +2 -2
- package/dist/source/index.js +16 -9
- package/dist/{static-7O35FMI3.js → static-KPGOHAZ2.js} +2 -2
- package/package.json +5 -5
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
// src/mdx-plugins/rehype-code.ts
|
|
21
21
|
import rehypeShikiFromHighlighter from "@shikijs/rehype/core";
|
|
22
22
|
|
|
23
|
-
// ../../node_modules/.pnpm/shiki-transformers@1.0.1_shiki@1.27.
|
|
23
|
+
// ../../node_modules/.pnpm/shiki-transformers@1.0.1_shiki@1.27.2/node_modules/shiki-transformers/dist/index.js
|
|
24
24
|
var matchers = [
|
|
25
25
|
[/^(<!--)(.+)(-->)$/, false],
|
|
26
26
|
[/^(\/\*)(.+)(\*\/)$/, false],
|
package/dist/search/client.js
CHANGED
|
@@ -64,10 +64,10 @@ function useDocsSearch(client, locale, tag, delayMs = 100, allowEmpty = false, k
|
|
|
64
64
|
return searchDocs(index, debouncedValue, tag, rest);
|
|
65
65
|
}
|
|
66
66
|
if (client.type === "orama-cloud") {
|
|
67
|
-
const { searchDocs } = await import("../orama-cloud-
|
|
67
|
+
const { searchDocs } = await import("../orama-cloud-HAZVD2ZO.js");
|
|
68
68
|
return searchDocs(debouncedValue, tag, client);
|
|
69
69
|
}
|
|
70
|
-
const { createStaticClient } = await import("../static-
|
|
70
|
+
const { createStaticClient } = await import("../static-KPGOHAZ2.js");
|
|
71
71
|
if (!staticClient) staticClient = createStaticClient(client);
|
|
72
72
|
return staticClient.search(debouncedValue, locale, tag);
|
|
73
73
|
}
|
package/dist/search/server.js
CHANGED
package/dist/source/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
removeUndefined
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-DELA6Z2I.js";
|
|
4
4
|
import {
|
|
5
5
|
resolvePath,
|
|
6
6
|
slash,
|
|
@@ -17,13 +17,16 @@ var separator = /^---(?<name>.*?)---$/;
|
|
|
17
17
|
var rest = "...";
|
|
18
18
|
var extractPrefix = "...";
|
|
19
19
|
var excludePrefix = "!";
|
|
20
|
+
function isPageFile(node) {
|
|
21
|
+
return "data" in node && node.format === "page";
|
|
22
|
+
}
|
|
20
23
|
function buildAll(nodes, ctx, skipIndex) {
|
|
21
24
|
const output = [];
|
|
22
25
|
const folders = [];
|
|
23
26
|
for (const node of [...nodes].sort(
|
|
24
27
|
(a, b) => a.file.name.localeCompare(b.file.name)
|
|
25
28
|
)) {
|
|
26
|
-
if (
|
|
29
|
+
if (isPageFile(node) && !node.file.locale) {
|
|
27
30
|
const treeNode = buildFileNode(node, ctx);
|
|
28
31
|
if (node.file.name === "index") {
|
|
29
32
|
if (!skipIndex) output.unshift(treeNode);
|
|
@@ -32,7 +35,11 @@ function buildAll(nodes, ctx, skipIndex) {
|
|
|
32
35
|
output.push(treeNode);
|
|
33
36
|
}
|
|
34
37
|
if ("children" in node) {
|
|
35
|
-
|
|
38
|
+
if (node.children.length === 1 && node.children[0].file.name === "index" && isPageFile(node.children[0])) {
|
|
39
|
+
output.push(buildFileNode(node.children[0], ctx));
|
|
40
|
+
} else {
|
|
41
|
+
folders.push(buildFolderNode(node, false, ctx));
|
|
42
|
+
}
|
|
36
43
|
}
|
|
37
44
|
}
|
|
38
45
|
output.push(...folders);
|
|
@@ -40,17 +47,17 @@ function buildAll(nodes, ctx, skipIndex) {
|
|
|
40
47
|
}
|
|
41
48
|
function resolveFolderItem(folder, item, ctx, addedNodePaths) {
|
|
42
49
|
if (item === rest) return "...";
|
|
43
|
-
|
|
44
|
-
if (
|
|
50
|
+
let match = separator.exec(item);
|
|
51
|
+
if (match?.groups) {
|
|
45
52
|
const node = {
|
|
46
53
|
type: "separator",
|
|
47
|
-
name:
|
|
54
|
+
name: match.groups.name
|
|
48
55
|
};
|
|
49
56
|
return [ctx.options.attachSeparator?.(node) ?? node];
|
|
50
57
|
}
|
|
51
|
-
|
|
52
|
-
if (
|
|
53
|
-
const { icon, url, name } =
|
|
58
|
+
match = link.exec(item);
|
|
59
|
+
if (match?.groups) {
|
|
60
|
+
const { icon, url, name } = match.groups;
|
|
54
61
|
const isRelative = url.startsWith("/") || url.startsWith("#") || url.startsWith(".");
|
|
55
62
|
const node = {
|
|
56
63
|
type: "page",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-core",
|
|
3
|
-
"version": "14.7.
|
|
3
|
+
"version": "14.7.5",
|
|
4
4
|
"description": "The library for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"@formatjs/intl-localematcher": "^0.5.10",
|
|
81
81
|
"@orama/orama": "^2.1.1",
|
|
82
|
-
"@shikijs/rehype": "^1.
|
|
82
|
+
"@shikijs/rehype": "^1.27.2",
|
|
83
83
|
"github-slugger": "^2.0.0",
|
|
84
84
|
"hast-util-to-estree": "^3.1.1",
|
|
85
85
|
"hast-util-to-jsx-runtime": "^2.3.2",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"remark": "^15.0.0",
|
|
90
90
|
"remark-gfm": "^4.0.0",
|
|
91
91
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
92
|
-
"shiki": "^1.27.
|
|
92
|
+
"shiki": "^1.27.2",
|
|
93
93
|
"unist-util-visit": "^5.0.0"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
@@ -101,13 +101,13 @@
|
|
|
101
101
|
"@types/hast": "^3.0.4",
|
|
102
102
|
"@types/mdast": "^4.0.3",
|
|
103
103
|
"@types/negotiator": "^0.6.3",
|
|
104
|
-
"@types/node": "22.10.
|
|
104
|
+
"@types/node": "22.10.7",
|
|
105
105
|
"@types/react": "^19.0.7",
|
|
106
106
|
"@types/react-dom": "^19.0.3",
|
|
107
107
|
"algoliasearch": "4.24.0",
|
|
108
108
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
109
109
|
"mdast-util-mdxjs-esm": "^2.0.1",
|
|
110
|
-
"next": "^15.1.
|
|
110
|
+
"next": "^15.1.5",
|
|
111
111
|
"remark-mdx": "^3.1.0",
|
|
112
112
|
"remark-rehype": "^11.1.1",
|
|
113
113
|
"shiki-transformers": "^1.0.1",
|