fumadocs-mdx 12.0.1 → 12.0.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/bin.cjs +1 -1
- package/dist/{browser-D5lvL8vv.d.ts → browser-BupUnhpC.d.ts} +1 -1
- package/dist/{browser-DjWADqp8.d.cts → browser-R0x9IPaQ.d.cts} +1 -1
- package/dist/bun/index.js +6 -6
- package/dist/{chunk-AUOOMFAI.js → chunk-OMAMTKDE.js} +1 -1
- package/dist/config/index.d.cts +2 -6
- package/dist/config/index.d.ts +2 -6
- package/dist/{define--6HQ1ehX.d.cts → define-DJbJduHy.d.cts} +15 -15
- package/dist/{define--6HQ1ehX.d.ts → define-DJbJduHy.d.ts} +15 -15
- package/dist/index.cjs +127 -0
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +11 -0
- package/dist/loader-mdx.js +3 -3
- package/dist/next/index.cjs +1 -1
- package/dist/next/index.js +6 -6
- package/dist/node/loader.js +3 -3
- package/dist/postinstall-SCSXM4IM.js +1 -1
- package/dist/runtime/next/async.cjs +1 -1
- package/dist/runtime/next/async.d.cts +3 -3
- package/dist/runtime/next/async.d.ts +3 -3
- package/dist/runtime/next/async.js +1 -1
- package/dist/runtime/next/index.cjs +1 -1
- package/dist/runtime/next/index.d.cts +8 -8
- package/dist/runtime/next/index.d.ts +8 -8
- package/dist/runtime/next/index.js +1 -1
- package/dist/runtime/vite/browser.d.cts +2 -2
- package/dist/runtime/vite/browser.d.ts +2 -2
- package/dist/runtime/vite/server.cjs +6 -2
- package/dist/runtime/vite/server.d.cts +5 -5
- package/dist/runtime/vite/server.d.ts +5 -5
- package/dist/runtime/vite/server.js +6 -2
- package/dist/{shared-0QIuV0XZ.d.ts → shared-CfiiRctw.d.ts} +6 -6
- package/dist/{shared-CqgMnt9h.d.cts → shared-fFqiuWJC.d.cts} +6 -6
- package/dist/{types-DkGjw-Uo.d.cts → types-BRx1QsIJ.d.cts} +3 -3
- package/dist/{types-CFlQxTN8.d.ts → types-TeHjsmja.d.ts} +3 -3
- package/dist/vite/index.cjs +6 -1
- package/dist/vite/index.d.cts +6 -0
- package/dist/vite/index.d.ts +6 -0
- package/dist/vite/index.js +12 -7
- package/package.json +16 -12
- package/dist/{chunk-SP7CHRTS.js → chunk-RMDXSZYE.js} +3 -3
package/dist/bin.cjs
CHANGED
|
@@ -429,7 +429,7 @@ async function generateJS(configPath, config, importPath, configHash = false) {
|
|
|
429
429
|
getImportCode({
|
|
430
430
|
type: "named",
|
|
431
431
|
names: ["_runtime"],
|
|
432
|
-
specifier: "fumadocs-mdx"
|
|
432
|
+
specifier: "fumadocs-mdx/runtime/next"
|
|
433
433
|
}),
|
|
434
434
|
getImportCode({
|
|
435
435
|
type: "namespace",
|
|
@@ -3,7 +3,7 @@ import { StructuredData } from 'fumadocs-core/mdx-plugins';
|
|
|
3
3
|
import { TableOfContents } from 'fumadocs-core/server';
|
|
4
4
|
import { FC, ReactNode } from 'react';
|
|
5
5
|
import { MDXProps } from 'mdx/types';
|
|
6
|
-
import { E as ExtractedReference, a as DocCollection, b as DocsCollection, M as MetaCollection } from './define
|
|
6
|
+
import { E as ExtractedReference, a as DocCollection, b as DocsCollection, M as MetaCollection } from './define-DJbJduHy.js';
|
|
7
7
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
8
8
|
|
|
9
9
|
type Processor = ReturnType<typeof createProcessor>;
|
|
@@ -3,7 +3,7 @@ import { StructuredData } from 'fumadocs-core/mdx-plugins';
|
|
|
3
3
|
import { TableOfContents } from 'fumadocs-core/server';
|
|
4
4
|
import { FC, ReactNode } from 'react';
|
|
5
5
|
import { MDXProps } from 'mdx/types';
|
|
6
|
-
import { E as ExtractedReference, a as DocCollection, b as DocsCollection, M as MetaCollection } from './define
|
|
6
|
+
import { E as ExtractedReference, a as DocCollection, b as DocsCollection, M as MetaCollection } from './define-DJbJduHy.cjs';
|
|
7
7
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
8
8
|
|
|
9
9
|
type Processor = ReturnType<typeof createProcessor>;
|
package/dist/bun/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildConfig
|
|
3
|
+
} from "../chunk-U4MQ44TS.js";
|
|
1
4
|
import {
|
|
2
5
|
createMdxLoader
|
|
3
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-RMDXSZYE.js";
|
|
7
|
+
import "../chunk-QAUWMR5D.js";
|
|
8
|
+
import "../chunk-LMG6UWCL.js";
|
|
4
9
|
import "../chunk-IQAEAI4P.js";
|
|
5
10
|
import {
|
|
6
11
|
findConfigFile,
|
|
7
12
|
resolvedConfig
|
|
8
13
|
} from "../chunk-XMFLD5J6.js";
|
|
9
|
-
import {
|
|
10
|
-
buildConfig
|
|
11
|
-
} from "../chunk-U4MQ44TS.js";
|
|
12
|
-
import "../chunk-QAUWMR5D.js";
|
|
13
|
-
import "../chunk-LMG6UWCL.js";
|
|
14
14
|
import "../chunk-VWJKRQZR.js";
|
|
15
15
|
|
|
16
16
|
// src/bun/index.ts
|
package/dist/config/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AnyCollection, B as BaseCollection, C as CollectionSchema, D as DefaultMDXOptions, a as DocCollection, b as DocsCollection, G as GlobalConfig, M as MetaCollection, d as defineCollections, e as defineConfig, c as defineDocs, f as frontmatterSchema, g as getDefaultMDXOptions, m as metaSchema } from '../define
|
|
1
|
+
export { A as AnyCollection, B as BaseCollection, C as CollectionSchema, D as DefaultMDXOptions, a as DocCollection, b as DocsCollection, G as GlobalConfig, M as MetaCollection, P as PostprocessOptions, d as defineCollections, e as defineConfig, c as defineDocs, f as frontmatterSchema, g as getDefaultMDXOptions, m as metaSchema } from '../define-DJbJduHy.cjs';
|
|
2
2
|
import { Processor, Transformer } from 'unified';
|
|
3
3
|
import { Root } from 'mdast';
|
|
4
4
|
import '@standard-schema/spec';
|
|
@@ -6,10 +6,6 @@ import 'fumadocs-core/mdx-plugins';
|
|
|
6
6
|
import '@mdx-js/mdx';
|
|
7
7
|
import 'zod';
|
|
8
8
|
|
|
9
|
-
interface Params {
|
|
10
|
-
lang?: string;
|
|
11
|
-
meta?: string;
|
|
12
|
-
}
|
|
13
9
|
declare function remarkInclude(this: Processor): Transformer<Root, Root>;
|
|
14
10
|
|
|
15
|
-
export {
|
|
11
|
+
export { remarkInclude };
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AnyCollection, B as BaseCollection, C as CollectionSchema, D as DefaultMDXOptions, a as DocCollection, b as DocsCollection, G as GlobalConfig, M as MetaCollection, d as defineCollections, e as defineConfig, c as defineDocs, f as frontmatterSchema, g as getDefaultMDXOptions, m as metaSchema } from '../define
|
|
1
|
+
export { A as AnyCollection, B as BaseCollection, C as CollectionSchema, D as DefaultMDXOptions, a as DocCollection, b as DocsCollection, G as GlobalConfig, M as MetaCollection, P as PostprocessOptions, d as defineCollections, e as defineConfig, c as defineDocs, f as frontmatterSchema, g as getDefaultMDXOptions, m as metaSchema } from '../define-DJbJduHy.js';
|
|
2
2
|
import { Processor, Transformer } from 'unified';
|
|
3
3
|
import { Root } from 'mdast';
|
|
4
4
|
import '@standard-schema/spec';
|
|
@@ -6,10 +6,6 @@ import 'fumadocs-core/mdx-plugins';
|
|
|
6
6
|
import '@mdx-js/mdx';
|
|
7
7
|
import 'zod';
|
|
8
8
|
|
|
9
|
-
interface Params {
|
|
10
|
-
lang?: string;
|
|
11
|
-
meta?: string;
|
|
12
|
-
}
|
|
13
9
|
declare function remarkInclude(this: Processor): Transformer<Root, Root>;
|
|
14
10
|
|
|
15
|
-
export {
|
|
11
|
+
export { remarkInclude };
|
|
@@ -4,6 +4,20 @@ import { ProcessorOptions } from '@mdx-js/mdx';
|
|
|
4
4
|
import { Pluggable } from 'unified';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
7
|
+
interface ExtractedReference {
|
|
8
|
+
href: string;
|
|
9
|
+
}
|
|
10
|
+
interface PostprocessOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Properties to export from `vfile.data`
|
|
13
|
+
*/
|
|
14
|
+
valueToExport?: string[];
|
|
15
|
+
/**
|
|
16
|
+
* stringify MDAST and export via `_markdown`.
|
|
17
|
+
*/
|
|
18
|
+
includeProcessedMarkdown?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
7
21
|
type ResolvePlugins = Pluggable[] | ((v: Pluggable[]) => Pluggable[]);
|
|
8
22
|
type DefaultMDXOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins' | '_ctx'> & {
|
|
9
23
|
rehypePlugins?: ResolvePlugins;
|
|
@@ -38,20 +52,6 @@ declare const frontmatterSchema: z.ZodObject<{
|
|
|
38
52
|
_openapi: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
39
53
|
}, z.core.$strip>;
|
|
40
54
|
|
|
41
|
-
interface ExtractedReference {
|
|
42
|
-
href: string;
|
|
43
|
-
}
|
|
44
|
-
interface PostprocessOptions {
|
|
45
|
-
/**
|
|
46
|
-
* Properties to export from `vfile.data`
|
|
47
|
-
*/
|
|
48
|
-
valueToExport?: string[];
|
|
49
|
-
/**
|
|
50
|
-
* stringify MDAST and export via `_markdown`.
|
|
51
|
-
*/
|
|
52
|
-
includeProcessedMarkdown?: boolean;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
55
|
type CollectionSchema<Schema extends StandardSchemaV1, Context> = Schema | ((ctx: Context) => Schema);
|
|
56
56
|
type AnyCollection = DocsCollection | DocCollection | MetaCollection;
|
|
57
57
|
interface BaseCollection {
|
|
@@ -128,4 +128,4 @@ declare function defineDocs<DocSchema extends StandardSchemaV1 = typeof frontmat
|
|
|
128
128
|
}): DocsCollection<DocSchema, MetaSchema, Async>;
|
|
129
129
|
declare function defineConfig(config?: GlobalConfig): GlobalConfig;
|
|
130
130
|
|
|
131
|
-
export { type AnyCollection as A, type BaseCollection as B, type CollectionSchema as C, type DefaultMDXOptions as D, type ExtractedReference as E, type GlobalConfig as G, type MetaCollection as M, type DocCollection as a, type DocsCollection as b, defineDocs as c, defineCollections as d, defineConfig as e, frontmatterSchema as f, getDefaultMDXOptions as g, metaSchema as m };
|
|
131
|
+
export { type AnyCollection as A, type BaseCollection as B, type CollectionSchema as C, type DefaultMDXOptions as D, type ExtractedReference as E, type GlobalConfig as G, type MetaCollection as M, type PostprocessOptions as P, type DocCollection as a, type DocsCollection as b, defineDocs as c, defineCollections as d, defineConfig as e, frontmatterSchema as f, getDefaultMDXOptions as g, metaSchema as m };
|
|
@@ -4,6 +4,20 @@ import { ProcessorOptions } from '@mdx-js/mdx';
|
|
|
4
4
|
import { Pluggable } from 'unified';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
7
|
+
interface ExtractedReference {
|
|
8
|
+
href: string;
|
|
9
|
+
}
|
|
10
|
+
interface PostprocessOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Properties to export from `vfile.data`
|
|
13
|
+
*/
|
|
14
|
+
valueToExport?: string[];
|
|
15
|
+
/**
|
|
16
|
+
* stringify MDAST and export via `_markdown`.
|
|
17
|
+
*/
|
|
18
|
+
includeProcessedMarkdown?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
7
21
|
type ResolvePlugins = Pluggable[] | ((v: Pluggable[]) => Pluggable[]);
|
|
8
22
|
type DefaultMDXOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins' | '_ctx'> & {
|
|
9
23
|
rehypePlugins?: ResolvePlugins;
|
|
@@ -38,20 +52,6 @@ declare const frontmatterSchema: z.ZodObject<{
|
|
|
38
52
|
_openapi: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
39
53
|
}, z.core.$strip>;
|
|
40
54
|
|
|
41
|
-
interface ExtractedReference {
|
|
42
|
-
href: string;
|
|
43
|
-
}
|
|
44
|
-
interface PostprocessOptions {
|
|
45
|
-
/**
|
|
46
|
-
* Properties to export from `vfile.data`
|
|
47
|
-
*/
|
|
48
|
-
valueToExport?: string[];
|
|
49
|
-
/**
|
|
50
|
-
* stringify MDAST and export via `_markdown`.
|
|
51
|
-
*/
|
|
52
|
-
includeProcessedMarkdown?: boolean;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
55
|
type CollectionSchema<Schema extends StandardSchemaV1, Context> = Schema | ((ctx: Context) => Schema);
|
|
56
56
|
type AnyCollection = DocsCollection | DocCollection | MetaCollection;
|
|
57
57
|
interface BaseCollection {
|
|
@@ -128,4 +128,4 @@ declare function defineDocs<DocSchema extends StandardSchemaV1 = typeof frontmat
|
|
|
128
128
|
}): DocsCollection<DocSchema, MetaSchema, Async>;
|
|
129
129
|
declare function defineConfig(config?: GlobalConfig): GlobalConfig;
|
|
130
130
|
|
|
131
|
-
export { type AnyCollection as A, type BaseCollection as B, type CollectionSchema as C, type DefaultMDXOptions as D, type ExtractedReference as E, type GlobalConfig as G, type MetaCollection as M, type DocCollection as a, type DocsCollection as b, defineDocs as c, defineCollections as d, defineConfig as e, frontmatterSchema as f, getDefaultMDXOptions as g, metaSchema as m };
|
|
131
|
+
export { type AnyCollection as A, type BaseCollection as B, type CollectionSchema as C, type DefaultMDXOptions as D, type ExtractedReference as E, type GlobalConfig as G, type MetaCollection as M, type PostprocessOptions as P, type DocCollection as a, type DocsCollection as b, defineDocs as c, defineCollections as d, defineConfig as e, frontmatterSchema as f, getDefaultMDXOptions as g, metaSchema as m };
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
_runtime: () => _runtime,
|
|
34
|
+
createMDXSource: () => createMDXSource,
|
|
35
|
+
resolveFiles: () => resolveFiles
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(index_exports);
|
|
38
|
+
|
|
39
|
+
// src/runtime/next/index.ts
|
|
40
|
+
var fs = __toESM(require("fs/promises"), 1);
|
|
41
|
+
|
|
42
|
+
// src/runtime/shared.ts
|
|
43
|
+
function missingProcessedMarkdown() {
|
|
44
|
+
throw new Error(
|
|
45
|
+
"getText('processed') requires `includeProcessedMarkdown` to be enabled in your collection config."
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// src/runtime/next/index.ts
|
|
50
|
+
var _runtime = {
|
|
51
|
+
doc(files) {
|
|
52
|
+
return files.map((file) => {
|
|
53
|
+
const data = file.data;
|
|
54
|
+
const filePath = file.info.fullPath;
|
|
55
|
+
return {
|
|
56
|
+
info: file.info,
|
|
57
|
+
_exports: data,
|
|
58
|
+
body: data.default,
|
|
59
|
+
lastModified: data.lastModified,
|
|
60
|
+
toc: data.toc,
|
|
61
|
+
structuredData: data.structuredData,
|
|
62
|
+
extractedReferences: data.extractedReferences,
|
|
63
|
+
...data.frontmatter,
|
|
64
|
+
async getText(type) {
|
|
65
|
+
if (type === "raw") {
|
|
66
|
+
return (await fs.readFile(filePath)).toString();
|
|
67
|
+
}
|
|
68
|
+
if (typeof data._markdown !== "string") missingProcessedMarkdown();
|
|
69
|
+
return data._markdown;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
meta(files) {
|
|
75
|
+
return files.map((file) => {
|
|
76
|
+
return {
|
|
77
|
+
info: file.info,
|
|
78
|
+
...file.data
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
docs(docs, metas) {
|
|
83
|
+
const parsedDocs = this.doc(docs);
|
|
84
|
+
const parsedMetas = this.meta(metas);
|
|
85
|
+
return {
|
|
86
|
+
docs: parsedDocs,
|
|
87
|
+
meta: parsedMetas,
|
|
88
|
+
toFumadocsSource() {
|
|
89
|
+
return createMDXSource(parsedDocs, parsedMetas);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
function createMDXSource(docs, meta = []) {
|
|
95
|
+
return {
|
|
96
|
+
files: resolveFiles({
|
|
97
|
+
docs,
|
|
98
|
+
meta
|
|
99
|
+
})
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function resolveFiles({ docs, meta }) {
|
|
103
|
+
const outputs = [];
|
|
104
|
+
for (const entry of docs) {
|
|
105
|
+
outputs.push({
|
|
106
|
+
type: "page",
|
|
107
|
+
absolutePath: entry.info.fullPath,
|
|
108
|
+
path: entry.info.path,
|
|
109
|
+
data: entry
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
for (const entry of meta) {
|
|
113
|
+
outputs.push({
|
|
114
|
+
type: "meta",
|
|
115
|
+
absolutePath: entry.info.fullPath,
|
|
116
|
+
path: entry.info.path,
|
|
117
|
+
data: entry
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
return outputs;
|
|
121
|
+
}
|
|
122
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
123
|
+
0 && (module.exports = {
|
|
124
|
+
_runtime,
|
|
125
|
+
createMDXSource,
|
|
126
|
+
resolveFiles
|
|
127
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { A as AsyncDocCollectionEntry, D as DocCollectionEntry, a as DocData, b as DocMethods, F as FileInfo, M as MetaCollectionEntry, m as missingProcessedMarkdown } from './shared-fFqiuWJC.cjs';
|
|
2
|
+
export { AnyCollectionEntry, _runtime, createMDXSource, resolveFiles } from './runtime/next/index.cjs';
|
|
3
|
+
export { E as ExtractedReference } from './define-DJbJduHy.cjs';
|
|
4
|
+
export { c as AsyncDocOut, A as AsyncRuntimeFile, D as DocOut, M as MetaOut, a as Runtime, R as RuntimeAsync, b as RuntimeFile } from './types-BRx1QsIJ.cjs';
|
|
5
|
+
import 'fumadocs-core/mdx-plugins';
|
|
6
|
+
import 'fumadocs-core/server';
|
|
7
|
+
import 'react';
|
|
8
|
+
import 'mdx/types';
|
|
9
|
+
import 'fumadocs-core/source';
|
|
10
|
+
import '@standard-schema/spec';
|
|
11
|
+
import '@mdx-js/mdx';
|
|
12
|
+
import 'unified';
|
|
13
|
+
import 'zod';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { A as AsyncDocCollectionEntry, D as DocCollectionEntry, a as DocData, b as DocMethods, F as FileInfo, M as MetaCollectionEntry, m as missingProcessedMarkdown } from './shared-CfiiRctw.js';
|
|
2
|
+
export { AnyCollectionEntry, _runtime, createMDXSource, resolveFiles } from './runtime/next/index.js';
|
|
3
|
+
export { E as ExtractedReference } from './define-DJbJduHy.js';
|
|
4
|
+
export { c as AsyncDocOut, A as AsyncRuntimeFile, D as DocOut, M as MetaOut, a as Runtime, R as RuntimeAsync, b as RuntimeFile } from './types-TeHjsmja.js';
|
|
5
|
+
import 'fumadocs-core/mdx-plugins';
|
|
6
|
+
import 'fumadocs-core/server';
|
|
7
|
+
import 'react';
|
|
8
|
+
import 'mdx/types';
|
|
9
|
+
import 'fumadocs-core/source';
|
|
10
|
+
import '@standard-schema/spec';
|
|
11
|
+
import '@mdx-js/mdx';
|
|
12
|
+
import 'unified';
|
|
13
|
+
import 'zod';
|
package/dist/index.js
ADDED
package/dist/loader-mdx.js
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-VXEBLM4X.js";
|
|
4
4
|
import {
|
|
5
5
|
createMdxLoader
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RMDXSZYE.js";
|
|
7
|
+
import "./chunk-QAUWMR5D.js";
|
|
8
|
+
import "./chunk-LMG6UWCL.js";
|
|
7
9
|
import "./chunk-IQAEAI4P.js";
|
|
8
10
|
import {
|
|
9
11
|
dynamicConfig
|
|
10
12
|
} from "./chunk-XMFLD5J6.js";
|
|
11
|
-
import "./chunk-QAUWMR5D.js";
|
|
12
|
-
import "./chunk-LMG6UWCL.js";
|
|
13
13
|
import "./chunk-VWJKRQZR.js";
|
|
14
14
|
|
|
15
15
|
// src/loader-mdx.ts
|
package/dist/next/index.cjs
CHANGED
|
@@ -441,7 +441,7 @@ async function generateJS(configPath, config, importPath, configHash = false) {
|
|
|
441
441
|
getImportCode({
|
|
442
442
|
type: "named",
|
|
443
443
|
names: ["_runtime"],
|
|
444
|
-
specifier: "fumadocs-mdx"
|
|
444
|
+
specifier: "fumadocs-mdx/runtime/next"
|
|
445
445
|
}),
|
|
446
446
|
getImportCode({
|
|
447
447
|
type: "namespace",
|
package/dist/next/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readFileWithCache,
|
|
3
|
+
removeFileCache
|
|
4
|
+
} from "../chunk-ADR6R7HM.js";
|
|
1
5
|
import {
|
|
2
6
|
getGlobPatterns,
|
|
3
7
|
getImportCode,
|
|
@@ -8,6 +12,7 @@ import {
|
|
|
8
12
|
getConfigHash,
|
|
9
13
|
loadConfig
|
|
10
14
|
} from "../chunk-LGYVNESJ.js";
|
|
15
|
+
import "../chunk-U4MQ44TS.js";
|
|
11
16
|
import {
|
|
12
17
|
ValidationError,
|
|
13
18
|
getGitTimestamp,
|
|
@@ -16,11 +21,6 @@ import {
|
|
|
16
21
|
import {
|
|
17
22
|
findConfigFile
|
|
18
23
|
} from "../chunk-XMFLD5J6.js";
|
|
19
|
-
import {
|
|
20
|
-
readFileWithCache,
|
|
21
|
-
removeFileCache
|
|
22
|
-
} from "../chunk-ADR6R7HM.js";
|
|
23
|
-
import "../chunk-U4MQ44TS.js";
|
|
24
24
|
import {
|
|
25
25
|
fumaMatter
|
|
26
26
|
} from "../chunk-VWJKRQZR.js";
|
|
@@ -40,7 +40,7 @@ async function generateJS(configPath, config, importPath, configHash = false) {
|
|
|
40
40
|
getImportCode({
|
|
41
41
|
type: "named",
|
|
42
42
|
names: ["_runtime"],
|
|
43
|
-
specifier: "fumadocs-mdx"
|
|
43
|
+
specifier: "fumadocs-mdx/runtime/next"
|
|
44
44
|
}),
|
|
45
45
|
getImportCode({
|
|
46
46
|
type: "namespace",
|
package/dist/node/loader.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "../chunk-VXEBLM4X.js";
|
|
4
4
|
import {
|
|
5
5
|
createMdxLoader
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-RMDXSZYE.js";
|
|
7
|
+
import "../chunk-QAUWMR5D.js";
|
|
8
|
+
import "../chunk-LMG6UWCL.js";
|
|
7
9
|
import "../chunk-IQAEAI4P.js";
|
|
8
10
|
import {
|
|
9
11
|
dynamicConfig,
|
|
10
12
|
findConfigFile
|
|
11
13
|
} from "../chunk-XMFLD5J6.js";
|
|
12
|
-
import "../chunk-QAUWMR5D.js";
|
|
13
|
-
import "../chunk-LMG6UWCL.js";
|
|
14
14
|
import "../chunk-VWJKRQZR.js";
|
|
15
15
|
|
|
16
16
|
// src/node/loader.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { L as LoadedConfig,
|
|
1
|
+
import { L as LoadedConfig, R as RuntimeAsync } from '../../types-BRx1QsIJ.cjs';
|
|
2
2
|
import '@standard-schema/spec';
|
|
3
3
|
import 'fumadocs-core/source';
|
|
4
|
-
import '../../define
|
|
4
|
+
import '../../define-DJbJduHy.cjs';
|
|
5
5
|
import 'fumadocs-core/mdx-plugins';
|
|
6
6
|
import '@mdx-js/mdx';
|
|
7
7
|
import 'unified';
|
|
8
8
|
import 'zod';
|
|
9
|
-
import '../../shared-
|
|
9
|
+
import '../../shared-fFqiuWJC.cjs';
|
|
10
10
|
import 'fumadocs-core/server';
|
|
11
11
|
import 'react';
|
|
12
12
|
import 'mdx/types';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { L as LoadedConfig,
|
|
1
|
+
import { L as LoadedConfig, R as RuntimeAsync } from '../../types-TeHjsmja.js';
|
|
2
2
|
import '@standard-schema/spec';
|
|
3
3
|
import 'fumadocs-core/source';
|
|
4
|
-
import '../../define
|
|
4
|
+
import '../../define-DJbJduHy.js';
|
|
5
5
|
import 'fumadocs-core/mdx-plugins';
|
|
6
6
|
import '@mdx-js/mdx';
|
|
7
7
|
import 'unified';
|
|
8
8
|
import 'zod';
|
|
9
|
-
import '../../shared-
|
|
9
|
+
import '../../shared-CfiiRctw.js';
|
|
10
10
|
import 'fumadocs-core/server';
|
|
11
11
|
import 'react';
|
|
12
12
|
import 'mdx/types';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { F as FileInfo } from '../../shared-fFqiuWJC.cjs';
|
|
1
2
|
import { PageData, MetaData, Source, VirtualFile } from 'fumadocs-core/source';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
import
|
|
5
|
-
import '@standard-schema/spec';
|
|
6
|
-
import '../../define--6HQ1ehX.cjs';
|
|
3
|
+
import { a as Runtime } from '../../types-BRx1QsIJ.cjs';
|
|
4
|
+
export { c as AsyncDocOut, A as AsyncRuntimeFile, D as DocOut, M as MetaOut, R as RuntimeAsync, b as RuntimeFile } from '../../types-BRx1QsIJ.cjs';
|
|
5
|
+
import '../../define-DJbJduHy.cjs';
|
|
7
6
|
import 'fumadocs-core/mdx-plugins';
|
|
8
|
-
import '@mdx-js/mdx';
|
|
9
|
-
import 'unified';
|
|
10
|
-
import 'zod';
|
|
11
7
|
import 'fumadocs-core/server';
|
|
12
8
|
import 'react';
|
|
13
9
|
import 'mdx/types';
|
|
10
|
+
import '@standard-schema/spec';
|
|
11
|
+
import '@mdx-js/mdx';
|
|
12
|
+
import 'unified';
|
|
13
|
+
import 'zod';
|
|
14
14
|
|
|
15
15
|
declare const _runtime: Runtime;
|
|
16
16
|
interface AnyCollectionEntry {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { F as FileInfo } from '../../shared-CfiiRctw.js';
|
|
1
2
|
import { PageData, MetaData, Source, VirtualFile } from 'fumadocs-core/source';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
import
|
|
5
|
-
import '@standard-schema/spec';
|
|
6
|
-
import '../../define--6HQ1ehX.js';
|
|
3
|
+
import { a as Runtime } from '../../types-TeHjsmja.js';
|
|
4
|
+
export { c as AsyncDocOut, A as AsyncRuntimeFile, D as DocOut, M as MetaOut, R as RuntimeAsync, b as RuntimeFile } from '../../types-TeHjsmja.js';
|
|
5
|
+
import '../../define-DJbJduHy.js';
|
|
7
6
|
import 'fumadocs-core/mdx-plugins';
|
|
8
|
-
import '@mdx-js/mdx';
|
|
9
|
-
import 'unified';
|
|
10
|
-
import 'zod';
|
|
11
7
|
import 'fumadocs-core/server';
|
|
12
8
|
import 'react';
|
|
13
9
|
import 'mdx/types';
|
|
10
|
+
import '@standard-schema/spec';
|
|
11
|
+
import '@mdx-js/mdx';
|
|
12
|
+
import 'unified';
|
|
13
|
+
import 'zod';
|
|
14
14
|
|
|
15
15
|
declare const _runtime: Runtime;
|
|
16
16
|
interface AnyCollectionEntry {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { C as ClientLoader, a as ClientLoaderOptions, c as createClientLoader, f as fromConfig, t as toClientRenderer } from '../../browser-
|
|
1
|
+
export { C as ClientLoader, a as ClientLoaderOptions, c as createClientLoader, f as fromConfig, t as toClientRenderer } from '../../browser-R0x9IPaQ.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@mdx-js/mdx';
|
|
4
4
|
import 'fumadocs-core/mdx-plugins';
|
|
5
5
|
import 'fumadocs-core/server';
|
|
6
6
|
import 'mdx/types';
|
|
7
|
-
import '../../define
|
|
7
|
+
import '../../define-DJbJduHy.cjs';
|
|
8
8
|
import '@standard-schema/spec';
|
|
9
9
|
import 'unified';
|
|
10
10
|
import 'zod';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { C as ClientLoader, a as ClientLoaderOptions, c as createClientLoader, f as fromConfig, t as toClientRenderer } from '../../browser-
|
|
1
|
+
export { C as ClientLoader, a as ClientLoaderOptions, c as createClientLoader, f as fromConfig, t as toClientRenderer } from '../../browser-BupUnhpC.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@mdx-js/mdx';
|
|
4
4
|
import 'fumadocs-core/mdx-plugins';
|
|
5
5
|
import 'fumadocs-core/server';
|
|
6
6
|
import 'mdx/types';
|
|
7
|
-
import '../../define
|
|
7
|
+
import '../../define-DJbJduHy.js';
|
|
8
8
|
import '@standard-schema/spec';
|
|
9
9
|
import 'unified';
|
|
10
10
|
import 'zod';
|
|
@@ -198,7 +198,9 @@ function fromConfig() {
|
|
|
198
198
|
};
|
|
199
199
|
})
|
|
200
200
|
];
|
|
201
|
-
return {
|
|
201
|
+
return {
|
|
202
|
+
files: await Promise.all(virtualFiles)
|
|
203
|
+
};
|
|
202
204
|
},
|
|
203
205
|
async sourceLazy(doc, meta) {
|
|
204
206
|
const virtualFiles = [
|
|
@@ -221,7 +223,9 @@ function fromConfig() {
|
|
|
221
223
|
};
|
|
222
224
|
})
|
|
223
225
|
];
|
|
224
|
-
return {
|
|
226
|
+
return {
|
|
227
|
+
files: await Promise.all(virtualFiles)
|
|
228
|
+
};
|
|
225
229
|
}
|
|
226
230
|
};
|
|
227
231
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { B as BaseCreate, D as DocMap, M as MetaMap, L as LazyDocMap } from '../../browser-
|
|
2
|
-
export { C as ClientLoader, a as ClientLoaderOptions, b as CompiledMDXFile, c as createClientLoader, t as toClientRenderer } from '../../browser-
|
|
1
|
+
import { B as BaseCreate, D as DocMap, M as MetaMap, L as LazyDocMap } from '../../browser-R0x9IPaQ.cjs';
|
|
2
|
+
export { C as ClientLoader, a as ClientLoaderOptions, b as CompiledMDXFile, c as createClientLoader, t as toClientRenderer } from '../../browser-R0x9IPaQ.cjs';
|
|
3
3
|
import { PageData, MetaData, Source } from 'fumadocs-core/source';
|
|
4
|
-
import { D as DocCollectionEntry, M as MetaCollectionEntry, A as AsyncDocCollectionEntry } from '../../shared-
|
|
4
|
+
import { D as DocCollectionEntry, M as MetaCollectionEntry, A as AsyncDocCollectionEntry } from '../../shared-fFqiuWJC.cjs';
|
|
5
5
|
import '@mdx-js/mdx';
|
|
6
6
|
import 'fumadocs-core/mdx-plugins';
|
|
7
7
|
import 'fumadocs-core/server';
|
|
8
8
|
import 'react';
|
|
9
9
|
import 'mdx/types';
|
|
10
|
-
import '../../define
|
|
10
|
+
import '../../define-DJbJduHy.cjs';
|
|
11
11
|
import '@standard-schema/spec';
|
|
12
12
|
import 'unified';
|
|
13
13
|
import 'zod';
|
|
@@ -24,4 +24,4 @@ interface ServerCreate<Config> extends BaseCreate<Config> {
|
|
|
24
24
|
}
|
|
25
25
|
declare function fromConfig<Config>(): ServerCreate<Config>;
|
|
26
26
|
|
|
27
|
-
export { type ServerCreate, fromConfig };
|
|
27
|
+
export { DocMap, LazyDocMap, MetaMap, type ServerCreate, fromConfig };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { B as BaseCreate, D as DocMap, M as MetaMap, L as LazyDocMap } from '../../browser-
|
|
2
|
-
export { C as ClientLoader, a as ClientLoaderOptions, b as CompiledMDXFile, c as createClientLoader, t as toClientRenderer } from '../../browser-
|
|
1
|
+
import { B as BaseCreate, D as DocMap, M as MetaMap, L as LazyDocMap } from '../../browser-BupUnhpC.js';
|
|
2
|
+
export { C as ClientLoader, a as ClientLoaderOptions, b as CompiledMDXFile, c as createClientLoader, t as toClientRenderer } from '../../browser-BupUnhpC.js';
|
|
3
3
|
import { PageData, MetaData, Source } from 'fumadocs-core/source';
|
|
4
|
-
import { D as DocCollectionEntry, M as MetaCollectionEntry, A as AsyncDocCollectionEntry } from '../../shared-
|
|
4
|
+
import { D as DocCollectionEntry, M as MetaCollectionEntry, A as AsyncDocCollectionEntry } from '../../shared-CfiiRctw.js';
|
|
5
5
|
import '@mdx-js/mdx';
|
|
6
6
|
import 'fumadocs-core/mdx-plugins';
|
|
7
7
|
import 'fumadocs-core/server';
|
|
8
8
|
import 'react';
|
|
9
9
|
import 'mdx/types';
|
|
10
|
-
import '../../define
|
|
10
|
+
import '../../define-DJbJduHy.js';
|
|
11
11
|
import '@standard-schema/spec';
|
|
12
12
|
import 'unified';
|
|
13
13
|
import 'zod';
|
|
@@ -24,4 +24,4 @@ interface ServerCreate<Config> extends BaseCreate<Config> {
|
|
|
24
24
|
}
|
|
25
25
|
declare function fromConfig<Config>(): ServerCreate<Config>;
|
|
26
26
|
|
|
27
|
-
export { type ServerCreate, fromConfig };
|
|
27
|
+
export { DocMap, LazyDocMap, MetaMap, type ServerCreate, fromConfig };
|
|
@@ -88,7 +88,9 @@ function fromConfig() {
|
|
|
88
88
|
};
|
|
89
89
|
})
|
|
90
90
|
];
|
|
91
|
-
return {
|
|
91
|
+
return {
|
|
92
|
+
files: await Promise.all(virtualFiles)
|
|
93
|
+
};
|
|
92
94
|
},
|
|
93
95
|
async sourceLazy(doc, meta) {
|
|
94
96
|
const virtualFiles = [
|
|
@@ -111,7 +113,9 @@ function fromConfig() {
|
|
|
111
113
|
};
|
|
112
114
|
})
|
|
113
115
|
];
|
|
114
|
-
return {
|
|
116
|
+
return {
|
|
117
|
+
files: await Promise.all(virtualFiles)
|
|
118
|
+
};
|
|
115
119
|
}
|
|
116
120
|
};
|
|
117
121
|
}
|
|
@@ -2,7 +2,7 @@ import { StructuredData } from 'fumadocs-core/mdx-plugins';
|
|
|
2
2
|
import { TableOfContents } from 'fumadocs-core/server';
|
|
3
3
|
import { FC } from 'react';
|
|
4
4
|
import { MDXProps } from 'mdx/types';
|
|
5
|
-
import { E as ExtractedReference } from './define
|
|
5
|
+
import { E as ExtractedReference } from './define-DJbJduHy.js';
|
|
6
6
|
|
|
7
7
|
interface FileInfo {
|
|
8
8
|
/**
|
|
@@ -61,10 +61,10 @@ type MetaCollectionEntry<Data> = Data & {
|
|
|
61
61
|
*/
|
|
62
62
|
info: FileInfo;
|
|
63
63
|
};
|
|
64
|
-
type DocCollectionEntry<Frontmatter> =
|
|
65
|
-
type AsyncDocCollectionEntry<Frontmatter> =
|
|
64
|
+
type DocCollectionEntry<Frontmatter> = DocData & DocMethods & Frontmatter;
|
|
65
|
+
type AsyncDocCollectionEntry<Frontmatter> = DocMethods & {
|
|
66
66
|
load: () => Promise<DocData>;
|
|
67
|
-
}
|
|
68
|
-
|
|
67
|
+
} & Frontmatter;
|
|
68
|
+
declare function missingProcessedMarkdown(): never;
|
|
69
69
|
|
|
70
|
-
export type
|
|
70
|
+
export { type AsyncDocCollectionEntry as A, type DocCollectionEntry as D, type FileInfo as F, type MetaCollectionEntry as M, type DocData as a, type DocMethods as b, missingProcessedMarkdown as m };
|
|
@@ -2,7 +2,7 @@ import { StructuredData } from 'fumadocs-core/mdx-plugins';
|
|
|
2
2
|
import { TableOfContents } from 'fumadocs-core/server';
|
|
3
3
|
import { FC } from 'react';
|
|
4
4
|
import { MDXProps } from 'mdx/types';
|
|
5
|
-
import { E as ExtractedReference } from './define
|
|
5
|
+
import { E as ExtractedReference } from './define-DJbJduHy.cjs';
|
|
6
6
|
|
|
7
7
|
interface FileInfo {
|
|
8
8
|
/**
|
|
@@ -61,10 +61,10 @@ type MetaCollectionEntry<Data> = Data & {
|
|
|
61
61
|
*/
|
|
62
62
|
info: FileInfo;
|
|
63
63
|
};
|
|
64
|
-
type DocCollectionEntry<Frontmatter> =
|
|
65
|
-
type AsyncDocCollectionEntry<Frontmatter> =
|
|
64
|
+
type DocCollectionEntry<Frontmatter> = DocData & DocMethods & Frontmatter;
|
|
65
|
+
type AsyncDocCollectionEntry<Frontmatter> = DocMethods & {
|
|
66
66
|
load: () => Promise<DocData>;
|
|
67
|
-
}
|
|
68
|
-
|
|
67
|
+
} & Frontmatter;
|
|
68
|
+
declare function missingProcessedMarkdown(): never;
|
|
69
69
|
|
|
70
|
-
export type
|
|
70
|
+
export { type AsyncDocCollectionEntry as A, type DocCollectionEntry as D, type FileInfo as F, type MetaCollectionEntry as M, type DocData as a, type DocMethods as b, missingProcessedMarkdown as m };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
2
|
import { Source, PageData, MetaData } from 'fumadocs-core/source';
|
|
3
|
-
import { a as DocCollection, M as MetaCollection, b as DocsCollection, G as GlobalConfig } from './define
|
|
3
|
+
import { a as DocCollection, M as MetaCollection, b as DocsCollection, G as GlobalConfig } from './define-DJbJduHy.cjs';
|
|
4
4
|
import { ProcessorOptions } from '@mdx-js/mdx';
|
|
5
|
-
import { F as FileInfo,
|
|
5
|
+
import { F as FileInfo, D as DocCollectionEntry, M as MetaCollectionEntry, A as AsyncDocCollectionEntry } from './shared-fFqiuWJC.cjs';
|
|
6
6
|
|
|
7
7
|
interface LoadedConfig {
|
|
8
8
|
collections: Map<string, DocCollection | MetaCollection | DocsCollection>;
|
|
@@ -49,4 +49,4 @@ interface RuntimeAsync {
|
|
|
49
49
|
} : never;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
export type { AsyncRuntimeFile as A, DocOut as D, LoadedConfig as L, MetaOut as M,
|
|
52
|
+
export type { AsyncRuntimeFile as A, DocOut as D, LoadedConfig as L, MetaOut as M, RuntimeAsync as R, Runtime as a, RuntimeFile as b, AsyncDocOut as c };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
2
|
import { Source, PageData, MetaData } from 'fumadocs-core/source';
|
|
3
|
-
import { a as DocCollection, M as MetaCollection, b as DocsCollection, G as GlobalConfig } from './define
|
|
3
|
+
import { a as DocCollection, M as MetaCollection, b as DocsCollection, G as GlobalConfig } from './define-DJbJduHy.js';
|
|
4
4
|
import { ProcessorOptions } from '@mdx-js/mdx';
|
|
5
|
-
import { F as FileInfo,
|
|
5
|
+
import { F as FileInfo, D as DocCollectionEntry, M as MetaCollectionEntry, A as AsyncDocCollectionEntry } from './shared-CfiiRctw.js';
|
|
6
6
|
|
|
7
7
|
interface LoadedConfig {
|
|
8
8
|
collections: Map<string, DocCollection | MetaCollection | DocsCollection>;
|
|
@@ -49,4 +49,4 @@ interface RuntimeAsync {
|
|
|
49
49
|
} : never;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
export type { AsyncRuntimeFile as A, DocOut as D, LoadedConfig as L, MetaOut as M,
|
|
52
|
+
export type { AsyncRuntimeFile as A, DocOut as D, LoadedConfig as L, MetaOut as M, RuntimeAsync as R, Runtime as a, RuntimeFile as b, AsyncDocOut as c };
|
package/dist/vite/index.cjs
CHANGED
|
@@ -905,7 +905,11 @@ async function postInstall(configPath = findConfigFile(), outDir, addJsExtension
|
|
|
905
905
|
// src/vite/index.ts
|
|
906
906
|
var FumadocsDeps = ["fumadocs-core", "fumadocs-ui", "fumadocs-openapi"];
|
|
907
907
|
function mdx(config, options = {}) {
|
|
908
|
-
const {
|
|
908
|
+
const {
|
|
909
|
+
generateIndexFile = true,
|
|
910
|
+
updateViteConfig = true,
|
|
911
|
+
configPath = "source.config.ts"
|
|
912
|
+
} = options;
|
|
909
913
|
const loaded = buildConfig(config);
|
|
910
914
|
const mdxLoader = toVite(createMdxLoader(resolvedConfig(loaded)));
|
|
911
915
|
async function transformMeta(path10, query, value) {
|
|
@@ -945,6 +949,7 @@ function mdx(config, options = {}) {
|
|
|
945
949
|
// needed, otherwise other plugins will be executed before our `transform`.
|
|
946
950
|
enforce: "pre",
|
|
947
951
|
config(config2) {
|
|
952
|
+
if (!updateViteConfig) return config2;
|
|
948
953
|
return (0, import_vite.mergeConfig)(config2, {
|
|
949
954
|
optimizeDeps: {
|
|
950
955
|
exclude: FumadocsDeps
|
package/dist/vite/index.d.cts
CHANGED
|
@@ -19,6 +19,12 @@ interface PluginOptions {
|
|
|
19
19
|
* @defaultValue source.config.ts
|
|
20
20
|
*/
|
|
21
21
|
configPath?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Update Vite config to fix module resolution of Fumadocs
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue true
|
|
26
|
+
*/
|
|
27
|
+
updateViteConfig?: boolean;
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
declare function mdx(config: Record<string, unknown>, options?: PluginOptions): Plugin;
|
package/dist/vite/index.d.ts
CHANGED
|
@@ -19,6 +19,12 @@ interface PluginOptions {
|
|
|
19
19
|
* @defaultValue source.config.ts
|
|
20
20
|
*/
|
|
21
21
|
configPath?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Update Vite config to fix module resolution of Fumadocs
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue true
|
|
26
|
+
*/
|
|
27
|
+
updateViteConfig?: boolean;
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
declare function mdx(config: Record<string, unknown>, options?: PluginOptions): Plugin;
|
package/dist/vite/index.js
CHANGED
|
@@ -4,12 +4,17 @@ import {
|
|
|
4
4
|
} from "../chunk-ZX7TM4AR.js";
|
|
5
5
|
import "../chunk-6Y5JDZHD.js";
|
|
6
6
|
import "../chunk-LGYVNESJ.js";
|
|
7
|
+
import {
|
|
8
|
+
buildConfig
|
|
9
|
+
} from "../chunk-U4MQ44TS.js";
|
|
7
10
|
import {
|
|
8
11
|
toVite
|
|
9
12
|
} from "../chunk-VXEBLM4X.js";
|
|
10
13
|
import {
|
|
11
14
|
createMdxLoader
|
|
12
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-RMDXSZYE.js";
|
|
16
|
+
import "../chunk-QAUWMR5D.js";
|
|
17
|
+
import "../chunk-LMG6UWCL.js";
|
|
13
18
|
import {
|
|
14
19
|
ValidationError,
|
|
15
20
|
validate
|
|
@@ -17,11 +22,6 @@ import {
|
|
|
17
22
|
import {
|
|
18
23
|
resolvedConfig
|
|
19
24
|
} from "../chunk-XMFLD5J6.js";
|
|
20
|
-
import {
|
|
21
|
-
buildConfig
|
|
22
|
-
} from "../chunk-U4MQ44TS.js";
|
|
23
|
-
import "../chunk-QAUWMR5D.js";
|
|
24
|
-
import "../chunk-LMG6UWCL.js";
|
|
25
25
|
import "../chunk-VWJKRQZR.js";
|
|
26
26
|
|
|
27
27
|
// src/vite/index.ts
|
|
@@ -34,7 +34,11 @@ import * as path from "path";
|
|
|
34
34
|
import { load } from "js-yaml";
|
|
35
35
|
var FumadocsDeps = ["fumadocs-core", "fumadocs-ui", "fumadocs-openapi"];
|
|
36
36
|
function mdx(config, options = {}) {
|
|
37
|
-
const {
|
|
37
|
+
const {
|
|
38
|
+
generateIndexFile = true,
|
|
39
|
+
updateViteConfig = true,
|
|
40
|
+
configPath = "source.config.ts"
|
|
41
|
+
} = options;
|
|
38
42
|
const loaded = buildConfig(config);
|
|
39
43
|
const mdxLoader = toVite(createMdxLoader(resolvedConfig(loaded)));
|
|
40
44
|
async function transformMeta(path2, query, value) {
|
|
@@ -74,6 +78,7 @@ function mdx(config, options = {}) {
|
|
|
74
78
|
// needed, otherwise other plugins will be executed before our `transform`.
|
|
75
79
|
enforce: "pre",
|
|
76
80
|
config(config2) {
|
|
81
|
+
if (!updateViteConfig) return config2;
|
|
77
82
|
return mergeConfig(config2, {
|
|
78
83
|
optimizeDeps: {
|
|
79
84
|
exclude: FumadocsDeps
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-mdx",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.3",
|
|
4
4
|
"description": "The built-in source for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
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",
|
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
"require": "./dist/vite/index.cjs"
|
|
30
30
|
},
|
|
31
31
|
".": {
|
|
32
|
+
"import": "./dist/index.js",
|
|
33
|
+
"types": "./dist/index.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./runtime/next": {
|
|
32
36
|
"import": "./dist/runtime/next/index.js",
|
|
33
37
|
"types": "./dist/runtime/next/index.d.ts"
|
|
34
38
|
},
|
|
@@ -76,26 +80,26 @@
|
|
|
76
80
|
"zod": "^4.1.11"
|
|
77
81
|
},
|
|
78
82
|
"devDependencies": {
|
|
79
|
-
"@types/bun": "^1.2.
|
|
83
|
+
"@types/bun": "^1.2.23",
|
|
80
84
|
"@types/js-yaml": "^4.0.9",
|
|
81
|
-
"@types/mdast": "^4.0.
|
|
85
|
+
"@types/mdast": "^4.0.4",
|
|
82
86
|
"@types/mdx": "^2.0.13",
|
|
83
|
-
"@types/node": "^24.
|
|
84
|
-
"@types/react": "^19.
|
|
87
|
+
"@types/node": "^24.6.2",
|
|
88
|
+
"@types/react": "^19.2.0",
|
|
85
89
|
"mdast-util-directive": "^3.1.0",
|
|
86
90
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
87
91
|
"next": "^15.5.4",
|
|
88
|
-
"react": "^19.
|
|
92
|
+
"react": "^19.2.0",
|
|
89
93
|
"remark": "^15.0.1",
|
|
90
94
|
"remark-directive": "^4.0.0",
|
|
91
95
|
"remark-stringify": "^11.0.0",
|
|
92
|
-
"rollup": "^4.52.
|
|
96
|
+
"rollup": "^4.52.4",
|
|
93
97
|
"vfile": "^6.0.3",
|
|
94
|
-
"vite": "^7.1.
|
|
95
|
-
"webpack": "^5.
|
|
98
|
+
"vite": "^7.1.9",
|
|
99
|
+
"webpack": "^5.102.0",
|
|
100
|
+
"@fumadocs/mdx-remote": "1.4.2",
|
|
96
101
|
"eslint-config-custom": "0.0.0",
|
|
97
|
-
"
|
|
98
|
-
"fumadocs-core": "15.8.0",
|
|
102
|
+
"fumadocs-core": "15.8.4",
|
|
99
103
|
"tsconfig": "0.0.0"
|
|
100
104
|
},
|
|
101
105
|
"peerDependencies": {
|