fumadocs-mdx 11.6.0 → 11.6.1
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/config/index.d.cts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/{define-BaW0PQDJ.d.cts → define-CGHfrlrJ.d.cts} +1 -1
- package/dist/{define-BaW0PQDJ.d.ts → define-CGHfrlrJ.d.ts} +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/loader-mdx.js +1 -1
- package/dist/next/index.cjs +9 -18
- package/dist/next/index.js +9 -19
- package/dist/runtime/async.d.cts +2 -2
- package/dist/runtime/async.d.ts +2 -2
- package/dist/runtime/async.js +3 -3
- package/dist/{types-BNrQHCj5.d.cts → types-CTLLuPxW.d.cts} +1 -1
- package/dist/{types-DEduCvIT.d.ts → types-CUbprvBB.d.ts} +1 -1
- package/dist/{watcher-IAZDSTU7.js → watcher-7O2HAQ63.js} +2 -1
- package/package.json +5 -5
package/dist/config/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as BaseCollection, B as BaseCollectionEntry, C as CollectionSchema, h as DefaultMDXOptions, D as DocCollection, c as DocsCollection, F as FileInfo, G as GlobalConfig, M as MarkdownProps, b as MetaCollection, d as defineCollections, g as defineConfig, e as defineDocs, f as frontmatterSchema, i as getDefaultMDXOptions, m as metaSchema } from '../define-CGHfrlrJ.cjs';
|
|
2
2
|
import { Processor, Transformer } from 'unified';
|
|
3
3
|
import { Root } from 'mdast';
|
|
4
4
|
import '@mdx-js/mdx';
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as BaseCollection, B as BaseCollectionEntry, C as CollectionSchema, h as DefaultMDXOptions, D as DocCollection, c as DocsCollection, F as FileInfo, G as GlobalConfig, M as MarkdownProps, b as MetaCollection, d as defineCollections, g as defineConfig, e as defineDocs, f as frontmatterSchema, i as getDefaultMDXOptions, m as metaSchema } from '../define-CGHfrlrJ.js';
|
|
2
2
|
import { Processor, Transformer } from 'unified';
|
|
3
3
|
import { Root } from 'mdast';
|
|
4
4
|
import '@mdx-js/mdx';
|
|
@@ -198,4 +198,4 @@ declare function defineDocs<DocSchema extends StandardSchemaV1 = typeof frontmat
|
|
|
198
198
|
};
|
|
199
199
|
declare function defineConfig(config?: GlobalConfig): GlobalConfig;
|
|
200
200
|
|
|
201
|
-
export { type BaseCollectionEntry as B, type CollectionSchema as C, type DocCollection as D, type FileInfo as F, type GlobalConfig as G, type
|
|
201
|
+
export { type BaseCollectionEntry as B, type CollectionSchema as C, type DocCollection as D, type FileInfo as F, type GlobalConfig as G, type MarkdownProps as M, type BaseCollection as a, type MetaCollection as b, type DocsCollection as c, defineCollections as d, defineDocs as e, frontmatterSchema as f, defineConfig as g, type DefaultMDXOptions as h, getDefaultMDXOptions as i, metaSchema as m };
|
|
@@ -198,4 +198,4 @@ declare function defineDocs<DocSchema extends StandardSchemaV1 = typeof frontmat
|
|
|
198
198
|
};
|
|
199
199
|
declare function defineConfig(config?: GlobalConfig): GlobalConfig;
|
|
200
200
|
|
|
201
|
-
export { type BaseCollectionEntry as B, type CollectionSchema as C, type DocCollection as D, type FileInfo as F, type GlobalConfig as G, type
|
|
201
|
+
export { type BaseCollectionEntry as B, type CollectionSchema as C, type DocCollection as D, type FileInfo as F, type GlobalConfig as G, type MarkdownProps as M, type BaseCollection as a, type MetaCollection as b, type DocsCollection as c, defineCollections as d, defineDocs as e, frontmatterSchema as f, defineConfig as g, type DefaultMDXOptions as h, getDefaultMDXOptions as i, metaSchema as m };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PageData, MetaData, Source, VirtualFile } from 'fumadocs-core/source';
|
|
2
|
-
import { B as BaseCollectionEntry } from './define-
|
|
3
|
-
import { R as Runtime } from './types-
|
|
2
|
+
import { B as BaseCollectionEntry } from './define-CGHfrlrJ.cjs';
|
|
3
|
+
import { R as Runtime } from './types-CTLLuPxW.cjs';
|
|
4
4
|
import '@mdx-js/mdx';
|
|
5
5
|
import 'mdx/types';
|
|
6
6
|
import 'fumadocs-core/mdx-plugins';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PageData, MetaData, Source, VirtualFile } from 'fumadocs-core/source';
|
|
2
|
-
import { B as BaseCollectionEntry } from './define-
|
|
3
|
-
import { R as Runtime } from './types-
|
|
2
|
+
import { B as BaseCollectionEntry } from './define-CGHfrlrJ.js';
|
|
3
|
+
import { R as Runtime } from './types-CUbprvBB.js';
|
|
4
4
|
import '@mdx-js/mdx';
|
|
5
5
|
import 'mdx/types';
|
|
6
6
|
import 'fumadocs-core/mdx-plugins';
|
package/dist/loader-mdx.js
CHANGED
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
getConfigHash,
|
|
3
3
|
loadConfig
|
|
4
4
|
} from "./chunk-HFLDWPJA.js";
|
|
5
|
-
import "./chunk-DRVUBK5B.js";
|
|
6
5
|
import {
|
|
7
6
|
validate
|
|
8
7
|
} from "./chunk-2ZOW45YZ.js";
|
|
9
8
|
import {
|
|
10
9
|
remarkInclude
|
|
11
10
|
} from "./chunk-MK7EXW7O.js";
|
|
11
|
+
import "./chunk-DRVUBK5B.js";
|
|
12
12
|
|
|
13
13
|
// src/loader-mdx.ts
|
|
14
14
|
import * as path2 from "node:path";
|
package/dist/next/index.cjs
CHANGED
|
@@ -35,7 +35,7 @@ var watcher_exports = {};
|
|
|
35
35
|
__export(watcher_exports, {
|
|
36
36
|
watcher: () => watcher
|
|
37
37
|
});
|
|
38
|
-
function watcher(configPath, config) {
|
|
38
|
+
function watcher(configPath, config, ignored) {
|
|
39
39
|
const deps = [configPath];
|
|
40
40
|
function add(dir) {
|
|
41
41
|
if (Array.isArray(dir)) deps.push(...dir);
|
|
@@ -51,6 +51,7 @@ function watcher(configPath, config) {
|
|
|
51
51
|
}
|
|
52
52
|
return (0, import_chokidar.watch)(deps, {
|
|
53
53
|
ignoreInitial: true,
|
|
54
|
+
ignored,
|
|
54
55
|
persistent: true
|
|
55
56
|
});
|
|
56
57
|
}
|
|
@@ -429,14 +430,11 @@ function toImportPath(file, dir) {
|
|
|
429
430
|
|
|
430
431
|
// src/map/index.ts
|
|
431
432
|
async function start(dev, configPath, outDir2) {
|
|
432
|
-
void fs3.rm(path3.resolve(outDir2, `index.js`), { force: true });
|
|
433
|
-
void fs3.rm(path3.resolve(outDir2, `index.d.ts`), { force: true });
|
|
434
|
-
await fs3.mkdir(outDir2, { recursive: true });
|
|
435
433
|
let configHash = await getConfigHash(configPath);
|
|
436
434
|
let config = await loadConfig(configPath, configHash, true);
|
|
437
435
|
const outPath = path3.resolve(outDir2, `index.ts`);
|
|
438
436
|
async function updateMapFile() {
|
|
439
|
-
|
|
437
|
+
const start2 = Date.now();
|
|
440
438
|
try {
|
|
441
439
|
await fs3.writeFile(
|
|
442
440
|
outPath,
|
|
@@ -449,12 +447,12 @@ async function start(dev, configPath, outDir2) {
|
|
|
449
447
|
console.error(err);
|
|
450
448
|
}
|
|
451
449
|
}
|
|
452
|
-
console.
|
|
450
|
+
console.log(`[MDX] updated map file in ${Date.now() - start2}ms`);
|
|
453
451
|
}
|
|
454
452
|
await updateMapFile();
|
|
455
453
|
if (dev) {
|
|
456
454
|
const { watcher: watcher2 } = await Promise.resolve().then(() => (init_watcher(), watcher_exports));
|
|
457
|
-
const instance = watcher2(configPath, config);
|
|
455
|
+
const instance = watcher2(configPath, config, [outPath]);
|
|
458
456
|
instance.on("ready", () => {
|
|
459
457
|
console.log("[MDX] started dev server");
|
|
460
458
|
});
|
|
@@ -539,21 +537,14 @@ function createMDX({
|
|
|
539
537
|
|
|
540
538
|
// src/postinstall.ts
|
|
541
539
|
var path5 = __toESM(require("path"), 1);
|
|
542
|
-
var fs4 = __toESM(require("fs"), 1);
|
|
540
|
+
var fs4 = __toESM(require("fs/promises"), 1);
|
|
543
541
|
async function postInstall(configPath = findConfigFile()) {
|
|
544
542
|
const jsOut = path5.resolve(".source/index.ts");
|
|
545
543
|
const hash = await getConfigHash(configPath);
|
|
546
544
|
const config = await loadConfig(configPath, hash, true);
|
|
547
|
-
fs4.
|
|
548
|
-
fs4.
|
|
549
|
-
|
|
550
|
-
await generateJS(
|
|
551
|
-
configPath,
|
|
552
|
-
config,
|
|
553
|
-
path5.resolve(".source/index.ts"),
|
|
554
|
-
hash
|
|
555
|
-
)
|
|
556
|
-
);
|
|
545
|
+
await fs4.rm(path5.dirname(jsOut), { recursive: true });
|
|
546
|
+
await fs4.mkdir(path5.dirname(jsOut), { recursive: true });
|
|
547
|
+
await fs4.writeFile(jsOut, await generateJS(configPath, config, jsOut, hash));
|
|
557
548
|
console.log("[MDX] types generated");
|
|
558
549
|
}
|
|
559
550
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/next/index.js
CHANGED
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
getConfigHash,
|
|
4
4
|
loadConfig
|
|
5
5
|
} from "../chunk-HFLDWPJA.js";
|
|
6
|
-
import "../chunk-DRVUBK5B.js";
|
|
7
6
|
import {
|
|
8
7
|
ValidationError,
|
|
9
8
|
validate
|
|
10
9
|
} from "../chunk-2ZOW45YZ.js";
|
|
10
|
+
import "../chunk-DRVUBK5B.js";
|
|
11
11
|
|
|
12
12
|
// src/next/create.ts
|
|
13
13
|
import path3 from "node:path";
|
|
@@ -219,14 +219,11 @@ function toImportPath(file, dir) {
|
|
|
219
219
|
|
|
220
220
|
// src/map/index.ts
|
|
221
221
|
async function start(dev, configPath, outDir2) {
|
|
222
|
-
void fs2.rm(path2.resolve(outDir2, `index.js`), { force: true });
|
|
223
|
-
void fs2.rm(path2.resolve(outDir2, `index.d.ts`), { force: true });
|
|
224
|
-
await fs2.mkdir(outDir2, { recursive: true });
|
|
225
222
|
let configHash = await getConfigHash(configPath);
|
|
226
223
|
let config = await loadConfig(configPath, configHash, true);
|
|
227
224
|
const outPath = path2.resolve(outDir2, `index.ts`);
|
|
228
225
|
async function updateMapFile() {
|
|
229
|
-
|
|
226
|
+
const start2 = Date.now();
|
|
230
227
|
try {
|
|
231
228
|
await fs2.writeFile(
|
|
232
229
|
outPath,
|
|
@@ -239,12 +236,12 @@ async function start(dev, configPath, outDir2) {
|
|
|
239
236
|
console.error(err);
|
|
240
237
|
}
|
|
241
238
|
}
|
|
242
|
-
console.
|
|
239
|
+
console.log(`[MDX] updated map file in ${Date.now() - start2}ms`);
|
|
243
240
|
}
|
|
244
241
|
await updateMapFile();
|
|
245
242
|
if (dev) {
|
|
246
|
-
const { watcher } = await import("../watcher-
|
|
247
|
-
const instance = watcher(configPath, config);
|
|
243
|
+
const { watcher } = await import("../watcher-7O2HAQ63.js");
|
|
244
|
+
const instance = watcher(configPath, config, [outPath]);
|
|
248
245
|
instance.on("ready", () => {
|
|
249
246
|
console.log("[MDX] started dev server");
|
|
250
247
|
});
|
|
@@ -329,21 +326,14 @@ function createMDX({
|
|
|
329
326
|
|
|
330
327
|
// src/postinstall.ts
|
|
331
328
|
import * as path4 from "node:path";
|
|
332
|
-
import * as fs3 from "node:fs";
|
|
329
|
+
import * as fs3 from "node:fs/promises";
|
|
333
330
|
async function postInstall(configPath = findConfigFile()) {
|
|
334
331
|
const jsOut = path4.resolve(".source/index.ts");
|
|
335
332
|
const hash = await getConfigHash(configPath);
|
|
336
333
|
const config = await loadConfig(configPath, hash, true);
|
|
337
|
-
fs3.
|
|
338
|
-
fs3.
|
|
339
|
-
|
|
340
|
-
await generateJS(
|
|
341
|
-
configPath,
|
|
342
|
-
config,
|
|
343
|
-
path4.resolve(".source/index.ts"),
|
|
344
|
-
hash
|
|
345
|
-
)
|
|
346
|
-
);
|
|
334
|
+
await fs3.rm(path4.dirname(jsOut), { recursive: true });
|
|
335
|
+
await fs3.mkdir(path4.dirname(jsOut), { recursive: true });
|
|
336
|
+
await fs3.writeFile(jsOut, await generateJS(configPath, config, jsOut, hash));
|
|
347
337
|
console.log("[MDX] types generated");
|
|
348
338
|
}
|
|
349
339
|
export {
|
package/dist/runtime/async.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LoadedConfig, a as RuntimeAsync } from '../types-
|
|
2
|
-
import '../define-
|
|
1
|
+
import { L as LoadedConfig, a as RuntimeAsync } from '../types-CTLLuPxW.cjs';
|
|
2
|
+
import '../define-CGHfrlrJ.cjs';
|
|
3
3
|
import '@mdx-js/mdx';
|
|
4
4
|
import 'mdx/types';
|
|
5
5
|
import 'fumadocs-core/mdx-plugins';
|
package/dist/runtime/async.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LoadedConfig, a as RuntimeAsync } from '../types-
|
|
2
|
-
import '../define-
|
|
1
|
+
import { L as LoadedConfig, a as RuntimeAsync } from '../types-CUbprvBB.js';
|
|
2
|
+
import '../define-CGHfrlrJ.js';
|
|
3
3
|
import '@mdx-js/mdx';
|
|
4
4
|
import 'mdx/types';
|
|
5
5
|
import 'fumadocs-core/mdx-plugins';
|
package/dist/runtime/async.js
CHANGED
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
_runtime,
|
|
3
3
|
createMDXSource
|
|
4
4
|
} from "../chunk-VFALQK6O.js";
|
|
5
|
-
import {
|
|
6
|
-
buildConfig
|
|
7
|
-
} from "../chunk-DRVUBK5B.js";
|
|
8
5
|
import {
|
|
9
6
|
remarkInclude
|
|
10
7
|
} from "../chunk-MK7EXW7O.js";
|
|
8
|
+
import {
|
|
9
|
+
buildConfig
|
|
10
|
+
} from "../chunk-DRVUBK5B.js";
|
|
11
11
|
|
|
12
12
|
// src/runtime/async.ts
|
|
13
13
|
import { createCompiler } from "@fumadocs/mdx-remote";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DocCollection,
|
|
1
|
+
import { D as DocCollection, b as MetaCollection, c as DocsCollection, G as GlobalConfig, F as FileInfo, M as MarkdownProps, B as BaseCollectionEntry } from './define-CGHfrlrJ.cjs';
|
|
2
2
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
3
3
|
import { Source, PageData, MetaData } from 'fumadocs-core/source';
|
|
4
4
|
import { ProcessorOptions } from '@mdx-js/mdx';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DocCollection,
|
|
1
|
+
import { D as DocCollection, b as MetaCollection, c as DocsCollection, G as GlobalConfig, F as FileInfo, M as MarkdownProps, B as BaseCollectionEntry } from './define-CGHfrlrJ.js';
|
|
2
2
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
3
3
|
import { Source, PageData, MetaData } from 'fumadocs-core/source';
|
|
4
4
|
import { ProcessorOptions } from '@mdx-js/mdx';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/map/watcher.ts
|
|
2
2
|
import { watch } from "chokidar";
|
|
3
|
-
function watcher(configPath, config) {
|
|
3
|
+
function watcher(configPath, config, ignored) {
|
|
4
4
|
const deps = [configPath];
|
|
5
5
|
function add(dir) {
|
|
6
6
|
if (Array.isArray(dir)) deps.push(...dir);
|
|
@@ -16,6 +16,7 @@ function watcher(configPath, config) {
|
|
|
16
16
|
}
|
|
17
17
|
return watch(deps, {
|
|
18
18
|
ignoreInitial: true,
|
|
19
|
+
ignored,
|
|
19
20
|
persistent: true
|
|
20
21
|
});
|
|
21
22
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-mdx",
|
|
3
|
-
"version": "11.6.
|
|
3
|
+
"version": "11.6.1",
|
|
4
4
|
"description": "The built-in source for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -53,21 +53,21 @@
|
|
|
53
53
|
"lru-cache": "^11.1.0",
|
|
54
54
|
"picocolors": "^1.1.1",
|
|
55
55
|
"unist-util-visit": "^5.0.0",
|
|
56
|
-
"zod": "^3.24.
|
|
56
|
+
"zod": "^3.24.3"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/cross-spawn": "^6.0.6",
|
|
60
60
|
"@types/mdast": "^4.0.3",
|
|
61
61
|
"@types/mdx": "^2.0.13",
|
|
62
|
-
"@types/react": "^19.1.
|
|
62
|
+
"@types/react": "^19.1.2",
|
|
63
63
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
64
|
-
"next": "^15.3.
|
|
64
|
+
"next": "^15.3.1",
|
|
65
65
|
"unified": "^11.0.5",
|
|
66
66
|
"vfile": "^6.0.3",
|
|
67
67
|
"webpack": "^5.99.5",
|
|
68
68
|
"@fumadocs/mdx-remote": "1.3.0",
|
|
69
69
|
"eslint-config-custom": "0.0.0",
|
|
70
|
-
"fumadocs-core": "15.2.
|
|
70
|
+
"fumadocs-core": "15.2.9",
|
|
71
71
|
"tsconfig": "0.0.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|