fumadocs-mdx 14.2.1 → 14.2.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/dist/bun/index.js +2 -2
- package/dist/{chunk-ZAYZWFWP.js → chunk-RSASAHLX.js} +5 -3
- package/dist/{chunk-WSQ23PNV.js → chunk-XYVVDDIF.js} +3 -2
- package/dist/node/loader.js +2 -2
- package/dist/vite/index.js +2 -2
- package/dist/webpack/mdx.js +1 -1
- package/dist/webpack/meta.js +2 -2
- package/package.json +9 -5
package/dist/bun/index.js
CHANGED
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
} from "../chunk-USQZ5OLE.js";
|
|
8
8
|
import {
|
|
9
9
|
createMetaLoader
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-RSASAHLX.js";
|
|
11
11
|
import {
|
|
12
12
|
createIntegratedConfigLoader,
|
|
13
13
|
toBun
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-XYVVDDIF.js";
|
|
15
15
|
import "../chunk-4JSFLXXT.js";
|
|
16
16
|
import {
|
|
17
17
|
_Defaults,
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-4JSFLXXT.js";
|
|
4
4
|
|
|
5
5
|
// src/loaders/meta.ts
|
|
6
|
-
import {
|
|
6
|
+
import { load } from "js-yaml";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
var querySchema = z.object({
|
|
9
9
|
collection: z.string().optional(),
|
|
10
10
|
workspace: z.string().optional()
|
|
11
11
|
}).loose();
|
|
12
12
|
function createMetaLoader({ getCore }, resolve = {}) {
|
|
13
|
-
const { json: resolveJson = "js"
|
|
13
|
+
const { json: resolveJson = "js" } = resolve;
|
|
14
14
|
function parse(filePath, source) {
|
|
15
15
|
try {
|
|
16
16
|
if (filePath.endsWith(".json")) return JSON.parse(source);
|
|
@@ -59,11 +59,13 @@ function createMetaLoader({ getCore }, resolve = {}) {
|
|
|
59
59
|
const data = await result();
|
|
60
60
|
if (input.filePath.endsWith(".json")) {
|
|
61
61
|
return {
|
|
62
|
+
moduleType: resolveJson,
|
|
62
63
|
code: resolveJson === "json" ? JSON.stringify(data) : `export default ${JSON.stringify(data)}`
|
|
63
64
|
};
|
|
64
65
|
} else {
|
|
65
66
|
return {
|
|
66
|
-
|
|
67
|
+
moduleType: "js",
|
|
68
|
+
code: `export default ${JSON.stringify(data)}`
|
|
67
69
|
};
|
|
68
70
|
}
|
|
69
71
|
},
|
|
@@ -59,7 +59,8 @@ function toVite(loader) {
|
|
|
59
59
|
if (result === null) return null;
|
|
60
60
|
return {
|
|
61
61
|
code: result.code,
|
|
62
|
-
map: result.map
|
|
62
|
+
map: result.map,
|
|
63
|
+
moduleType: result.moduleType
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
66
|
};
|
|
@@ -97,7 +98,7 @@ function toBun(loader) {
|
|
|
97
98
|
if (!output) return;
|
|
98
99
|
return {
|
|
99
100
|
contents: output.code,
|
|
100
|
-
loader: "js"
|
|
101
|
+
loader: output.moduleType ?? "js"
|
|
101
102
|
};
|
|
102
103
|
}
|
|
103
104
|
return (build) => {
|
package/dist/node/loader.js
CHANGED
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "../chunk-USQZ5OLE.js";
|
|
4
4
|
import {
|
|
5
5
|
createMetaLoader
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-RSASAHLX.js";
|
|
7
7
|
import {
|
|
8
8
|
createStandaloneConfigLoader,
|
|
9
9
|
toNode
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-XYVVDDIF.js";
|
|
11
11
|
import "../chunk-4JSFLXXT.js";
|
|
12
12
|
import {
|
|
13
13
|
_Defaults,
|
package/dist/vite/index.js
CHANGED
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
} from "../chunk-USQZ5OLE.js";
|
|
8
8
|
import {
|
|
9
9
|
createMetaLoader
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-RSASAHLX.js";
|
|
11
11
|
import {
|
|
12
12
|
createIntegratedConfigLoader,
|
|
13
13
|
toVite
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-XYVVDDIF.js";
|
|
15
15
|
import "../chunk-4JSFLXXT.js";
|
|
16
16
|
import {
|
|
17
17
|
ValidationError,
|
package/dist/webpack/mdx.js
CHANGED
package/dist/webpack/meta.js
CHANGED
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "../chunk-257RZJEQ.js";
|
|
4
4
|
import {
|
|
5
5
|
createMetaLoader
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-RSASAHLX.js";
|
|
7
7
|
import {
|
|
8
8
|
createStandaloneConfigLoader,
|
|
9
9
|
toWebpack
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-XYVVDDIF.js";
|
|
11
11
|
import "../chunk-4JSFLXXT.js";
|
|
12
12
|
import "../chunk-KWSETXYC.js";
|
|
13
13
|
import "../chunk-2PY3JUIC.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-mdx",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.3",
|
|
4
4
|
"description": "The built-in source for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -86,21 +86,22 @@
|
|
|
86
86
|
"astro": "^5.16.6",
|
|
87
87
|
"mdast-util-directive": "^3.1.0",
|
|
88
88
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
89
|
-
"next": "16.1.
|
|
89
|
+
"next": "16.1.1",
|
|
90
90
|
"react": "^19.2.3",
|
|
91
91
|
"remark": "^15.0.1",
|
|
92
92
|
"remark-directive": "^4.0.0",
|
|
93
93
|
"remark-stringify": "^11.0.0",
|
|
94
|
-
"rollup": "^4.
|
|
94
|
+
"rollup": "^4.54.0",
|
|
95
95
|
"vite": "^7.3.0",
|
|
96
96
|
"webpack": "^5.104.1",
|
|
97
|
-
"@fumadocs/mdx-remote": "1.4.3",
|
|
98
97
|
"eslint-config-custom": "0.0.0",
|
|
99
|
-
"fumadocs-
|
|
98
|
+
"@fumadocs/mdx-remote": "1.4.3",
|
|
99
|
+
"fumadocs-core": "16.4.1",
|
|
100
100
|
"tsconfig": "0.0.0"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"@fumadocs/mdx-remote": "^1.4.0",
|
|
104
|
+
"@types/react": "*",
|
|
104
105
|
"fumadocs-core": "^15.0.0 || ^16.0.0",
|
|
105
106
|
"next": "^15.3.0 || ^16.0.0",
|
|
106
107
|
"react": "*",
|
|
@@ -110,6 +111,9 @@
|
|
|
110
111
|
"react": {
|
|
111
112
|
"optional": true
|
|
112
113
|
},
|
|
114
|
+
"@types/react": {
|
|
115
|
+
"optional": true
|
|
116
|
+
},
|
|
113
117
|
"next": {
|
|
114
118
|
"optional": true
|
|
115
119
|
},
|