fumadocs-mdx 14.0.0 → 14.0.2
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/{build-mdx-6UAK5FF5.js → build-mdx-W3233QBZ.js} +1 -1
- package/dist/bun/index.d.ts +7 -1
- package/dist/bun/index.js +9 -8
- package/dist/{chunk-5YXP7JLN.js → chunk-5OBUOALK.js} +8 -5
- package/dist/{chunk-ZY6UZ7NH.js → chunk-6RPNS75C.js} +1 -1
- package/dist/{chunk-XHJCLBZ4.js → chunk-ED3ON275.js} +86 -162
- package/dist/{chunk-7L2KNF6B.js → chunk-GB4W3YCZ.js} +51 -7
- package/dist/{chunk-SLY7WXTX.js → chunk-KOPLIEVQ.js} +5 -6
- package/dist/{chunk-OXSRIWQW.js → chunk-LPX7ZO66.js} +4 -3
- package/dist/{chunk-SRSRFOVI.js → chunk-OLL7FM7W.js} +3 -3
- package/dist/{chunk-5UMZCWKV.js → chunk-Q5OSGLJL.js} +1 -1
- package/dist/{chunk-E5DJTSIM.js → chunk-S7KOJHHO.js} +4 -1
- package/dist/{chunk-6NISOLQ6.js → chunk-USWQVJWR.js} +1 -1
- package/dist/chunk-WBIHDYMN.js +126 -0
- package/dist/config/index.d.ts +6 -1
- package/dist/config/index.js +1 -1
- package/dist/{index-D7JdSMpp.d.cts → core-C3QZSdEx.d.ts} +73 -4
- package/dist/{index-BlVBvy-z.d.ts → index-RVIZxMZG.d.ts} +1 -1
- package/dist/index.d.ts +56 -3
- package/dist/load-from-file-OZ5N7DXU.js +8 -0
- package/dist/next/index.cjs +263 -193
- package/dist/next/index.d.ts +7 -2
- package/dist/next/index.js +12 -10
- package/dist/node/loader.js +4 -4
- package/dist/plugins/index-file.d.ts +7 -22
- package/dist/plugins/index-file.js +2 -2
- package/dist/plugins/json-schema.d.ts +7 -1
- package/dist/plugins/last-modified.d.ts +15 -2
- package/dist/plugins/last-modified.js +43 -6
- package/dist/runtime/browser.d.ts +22 -19
- package/dist/runtime/browser.js +5 -6
- package/dist/runtime/dynamic.d.ts +12 -12
- package/dist/runtime/dynamic.js +12 -11
- package/dist/runtime/server.d.ts +10 -157
- package/dist/runtime/server.js +3 -3
- package/dist/runtime/types.d.ts +61 -0
- package/dist/runtime/types.js +0 -0
- package/dist/vite/index.d.ts +7 -2
- package/dist/vite/index.js +10 -9
- package/dist/webpack/mdx.d.ts +8 -2
- package/dist/webpack/mdx.js +5 -5
- package/dist/webpack/meta.d.ts +8 -2
- package/dist/webpack/meta.js +4 -4
- package/package.json +4 -6
- package/dist/bin.cjs +0 -1889
- package/dist/bin.d.cts +0 -1
- package/dist/bun/index.cjs +0 -1112
- package/dist/bun/index.d.cts +0 -19
- package/dist/chunk-PKI7ZDA5.js +0 -29
- package/dist/config/index.cjs +0 -400
- package/dist/config/index.d.cts +0 -13
- package/dist/index-D7JdSMpp.d.ts +0 -272
- package/dist/index-P2NNUkHn.d.cts +0 -8
- package/dist/index.cjs +0 -18
- package/dist/index.d.cts +0 -8
- package/dist/load-from-file-I3ALLIVB.js +0 -8
- package/dist/next/index.d.cts +0 -28
- package/dist/node/loader.cjs +0 -1165
- package/dist/node/loader.d.cts +0 -5
- package/dist/plugins/index-file.cjs +0 -471
- package/dist/plugins/index-file.d.cts +0 -29
- package/dist/plugins/json-schema.cjs +0 -114
- package/dist/plugins/json-schema.d.cts +0 -25
- package/dist/plugins/last-modified.cjs +0 -75
- package/dist/plugins/last-modified.d.cts +0 -27
- package/dist/runtime/browser.cjs +0 -94
- package/dist/runtime/browser.d.cts +0 -50
- package/dist/runtime/dynamic.cjs +0 -985
- package/dist/runtime/dynamic.d.cts +0 -27
- package/dist/runtime/server.cjs +0 -173
- package/dist/runtime/server.d.cts +0 -161
- package/dist/vite/index.cjs +0 -1620
- package/dist/vite/index.d.cts +0 -39
- package/dist/webpack/mdx.cjs +0 -1089
- package/dist/webpack/mdx.d.cts +0 -14
- package/dist/webpack/meta.cjs +0 -649
- package/dist/webpack/meta.d.cts +0 -14
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { StructuredData } from 'fumadocs-core/mdx-plugins/remark-structure';
|
|
2
|
+
import { TOCItemType } from 'fumadocs-core/toc';
|
|
3
|
+
import { Root } from 'mdast';
|
|
4
|
+
import { MDXContent } from 'mdx/types';
|
|
5
|
+
|
|
6
|
+
interface DocData {
|
|
7
|
+
/**
|
|
8
|
+
* Compiled MDX content (as component)
|
|
9
|
+
*/
|
|
10
|
+
body: MDXContent;
|
|
11
|
+
/**
|
|
12
|
+
* table of contents generated from content.
|
|
13
|
+
*/
|
|
14
|
+
toc: TOCItemType[];
|
|
15
|
+
/**
|
|
16
|
+
* structured data for document search indexing.
|
|
17
|
+
*/
|
|
18
|
+
structuredData: StructuredData;
|
|
19
|
+
/**
|
|
20
|
+
* Raw exports from the compiled MDX file.
|
|
21
|
+
*/
|
|
22
|
+
_exports: Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
interface FileInfo {
|
|
25
|
+
/**
|
|
26
|
+
* virtualized path for Source API
|
|
27
|
+
*/
|
|
28
|
+
path: string;
|
|
29
|
+
/**
|
|
30
|
+
* the file path in file system
|
|
31
|
+
*/
|
|
32
|
+
fullPath: string;
|
|
33
|
+
}
|
|
34
|
+
interface DocMethods {
|
|
35
|
+
/**
|
|
36
|
+
* file info
|
|
37
|
+
*/
|
|
38
|
+
info: FileInfo;
|
|
39
|
+
/**
|
|
40
|
+
* get document as text.
|
|
41
|
+
*
|
|
42
|
+
* - `type: raw` - read the original content from file system.
|
|
43
|
+
* - `type: processed` - get the processed Markdown content, only available when `includeProcessedMarkdown` is enabled on collection config.
|
|
44
|
+
*/
|
|
45
|
+
getText: (type: 'raw' | 'processed') => Promise<string>;
|
|
46
|
+
getMDAST: () => Promise<Root>;
|
|
47
|
+
}
|
|
48
|
+
interface MetaMethods {
|
|
49
|
+
/**
|
|
50
|
+
* file info
|
|
51
|
+
*/
|
|
52
|
+
info: FileInfo;
|
|
53
|
+
}
|
|
54
|
+
interface InternalTypeConfig {
|
|
55
|
+
/**
|
|
56
|
+
* collection name -> collection properties
|
|
57
|
+
*/
|
|
58
|
+
DocData: Record<string, unknown>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type { DocData, DocMethods, FileInfo, InternalTypeConfig, MetaMethods };
|
|
File without changes
|
package/dist/vite/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
import { IndexFilePluginOptions } from '../
|
|
3
|
-
import '../index-D7JdSMpp.js';
|
|
2
|
+
import { I as IndexFilePluginOptions } from '../core-C3QZSdEx.js';
|
|
4
3
|
import '@mdx-js/mdx';
|
|
5
4
|
import '@standard-schema/spec';
|
|
6
5
|
import 'unified';
|
|
@@ -8,6 +7,12 @@ import 'fumadocs-core/mdx-plugins';
|
|
|
8
7
|
import 'zod';
|
|
9
8
|
import 'chokidar';
|
|
10
9
|
import 'vfile';
|
|
10
|
+
import 'fumadocs-core/source';
|
|
11
|
+
import '../runtime/types.js';
|
|
12
|
+
import 'fumadocs-core/mdx-plugins/remark-structure';
|
|
13
|
+
import 'fumadocs-core/toc';
|
|
14
|
+
import 'mdast';
|
|
15
|
+
import 'mdx/types';
|
|
11
16
|
|
|
12
17
|
interface PluginOptions {
|
|
13
18
|
/**
|
package/dist/vite/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildConfig
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-6RPNS75C.js";
|
|
4
|
+
import "../chunk-S7KOJHHO.js";
|
|
5
5
|
import {
|
|
6
6
|
createMdxLoader
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-USWQVJWR.js";
|
|
8
8
|
import {
|
|
9
9
|
createMetaLoader
|
|
10
10
|
} from "../chunk-TYJDYTKH.js";
|
|
11
11
|
import {
|
|
12
12
|
createIntegratedConfigLoader,
|
|
13
13
|
toVite
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-OLL7FM7W.js";
|
|
15
15
|
import "../chunk-4JSFLXXT.js";
|
|
16
16
|
import {
|
|
17
17
|
ValidationError,
|
|
18
18
|
_Defaults,
|
|
19
19
|
createCore
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-GB4W3YCZ.js";
|
|
21
21
|
import {
|
|
22
22
|
indexFile
|
|
23
|
-
} from "../chunk-
|
|
24
|
-
import "../chunk-
|
|
23
|
+
} from "../chunk-ED3ON275.js";
|
|
24
|
+
import "../chunk-WBIHDYMN.js";
|
|
25
25
|
import "../chunk-VWJKRQZR.js";
|
|
26
26
|
|
|
27
27
|
// src/vite/index.ts
|
|
@@ -29,7 +29,8 @@ import { mergeConfig } from "vite";
|
|
|
29
29
|
var FumadocsDeps = ["fumadocs-core", "fumadocs-ui", "fumadocs-openapi"];
|
|
30
30
|
async function mdx(config, pluginOptions = {}) {
|
|
31
31
|
const options = applyDefaults(pluginOptions);
|
|
32
|
-
const core =
|
|
32
|
+
const core = createViteCore(options);
|
|
33
|
+
await core.init({
|
|
33
34
|
config: buildConfig(config)
|
|
34
35
|
});
|
|
35
36
|
const configLoader = createIntegratedConfigLoader(core);
|
|
@@ -82,7 +83,7 @@ async function mdx(config, pluginOptions = {}) {
|
|
|
82
83
|
};
|
|
83
84
|
}
|
|
84
85
|
async function postInstall(pluginOptions = {}) {
|
|
85
|
-
const { loadConfig } = await import("../load-from-file-
|
|
86
|
+
const { loadConfig } = await import("../load-from-file-OZ5N7DXU.js");
|
|
86
87
|
const core = createViteCore(applyDefaults(pluginOptions));
|
|
87
88
|
await core.init({
|
|
88
89
|
config: loadConfig(core, true)
|
package/dist/webpack/mdx.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LoaderContext } from 'webpack';
|
|
2
|
-
import { W as WebpackLoaderOptions } from '../index-
|
|
3
|
-
import '../
|
|
2
|
+
import { W as WebpackLoaderOptions } from '../index-RVIZxMZG.js';
|
|
3
|
+
import '../core-C3QZSdEx.js';
|
|
4
4
|
import '@mdx-js/mdx';
|
|
5
5
|
import '@standard-schema/spec';
|
|
6
6
|
import 'unified';
|
|
@@ -8,6 +8,12 @@ import 'fumadocs-core/mdx-plugins';
|
|
|
8
8
|
import 'zod';
|
|
9
9
|
import 'chokidar';
|
|
10
10
|
import 'vfile';
|
|
11
|
+
import 'fumadocs-core/source';
|
|
12
|
+
import '../runtime/types.js';
|
|
13
|
+
import 'fumadocs-core/mdx-plugins/remark-structure';
|
|
14
|
+
import 'fumadocs-core/toc';
|
|
15
|
+
import 'mdast';
|
|
16
|
+
import 'mdx/types';
|
|
11
17
|
|
|
12
18
|
declare function loader(this: LoaderContext<WebpackLoaderOptions>, source: string, callback: LoaderContext<WebpackLoaderOptions>['callback']): Promise<void>;
|
|
13
19
|
|
package/dist/webpack/mdx.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getCore
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-Q5OSGLJL.js";
|
|
4
4
|
import {
|
|
5
5
|
createMdxLoader
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-USWQVJWR.js";
|
|
7
7
|
import {
|
|
8
8
|
createStandaloneConfigLoader,
|
|
9
9
|
toWebpack
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-OLL7FM7W.js";
|
|
11
11
|
import "../chunk-4JSFLXXT.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-GB4W3YCZ.js";
|
|
13
|
+
import "../chunk-WBIHDYMN.js";
|
|
14
14
|
import "../chunk-VWJKRQZR.js";
|
|
15
15
|
|
|
16
16
|
// src/webpack/mdx.ts
|
package/dist/webpack/meta.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LoaderContext } from 'webpack';
|
|
2
|
-
import { W as WebpackLoaderOptions } from '../index-
|
|
3
|
-
import '../
|
|
2
|
+
import { W as WebpackLoaderOptions } from '../index-RVIZxMZG.js';
|
|
3
|
+
import '../core-C3QZSdEx.js';
|
|
4
4
|
import '@mdx-js/mdx';
|
|
5
5
|
import '@standard-schema/spec';
|
|
6
6
|
import 'unified';
|
|
@@ -8,6 +8,12 @@ import 'fumadocs-core/mdx-plugins';
|
|
|
8
8
|
import 'zod';
|
|
9
9
|
import 'chokidar';
|
|
10
10
|
import 'vfile';
|
|
11
|
+
import 'fumadocs-core/source';
|
|
12
|
+
import '../runtime/types.js';
|
|
13
|
+
import 'fumadocs-core/mdx-plugins/remark-structure';
|
|
14
|
+
import 'fumadocs-core/toc';
|
|
15
|
+
import 'mdast';
|
|
16
|
+
import 'mdx/types';
|
|
11
17
|
|
|
12
18
|
declare function loader(this: LoaderContext<WebpackLoaderOptions>, source: string, callback: LoaderContext<WebpackLoaderOptions>['callback']): Promise<void>;
|
|
13
19
|
|
package/dist/webpack/meta.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getCore
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-Q5OSGLJL.js";
|
|
4
4
|
import {
|
|
5
5
|
createMetaLoader
|
|
6
6
|
} from "../chunk-TYJDYTKH.js";
|
|
7
7
|
import {
|
|
8
8
|
createStandaloneConfigLoader,
|
|
9
9
|
toWebpack
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-OLL7FM7W.js";
|
|
11
11
|
import "../chunk-4JSFLXXT.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-GB4W3YCZ.js";
|
|
13
|
+
import "../chunk-WBIHDYMN.js";
|
|
14
14
|
|
|
15
15
|
// src/webpack/meta.ts
|
|
16
16
|
var instance;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-mdx",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.2",
|
|
4
4
|
"description": "The built-in source for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
"./loader-meta": "./loader-meta.cjs",
|
|
17
17
|
"./config": {
|
|
18
18
|
"import": "./dist/config/index.js",
|
|
19
|
-
"types": "./dist/config/index.d.ts"
|
|
20
|
-
"require": "./dist/config/index.cjs"
|
|
19
|
+
"types": "./dist/config/index.d.ts"
|
|
21
20
|
},
|
|
22
21
|
"./next": {
|
|
23
22
|
"import": "./dist/next/index.js",
|
|
@@ -26,8 +25,7 @@
|
|
|
26
25
|
},
|
|
27
26
|
"./vite": {
|
|
28
27
|
"import": "./dist/vite/index.js",
|
|
29
|
-
"types": "./dist/vite/index.d.ts"
|
|
30
|
-
"require": "./dist/vite/index.cjs"
|
|
28
|
+
"types": "./dist/vite/index.d.ts"
|
|
31
29
|
},
|
|
32
30
|
".": {
|
|
33
31
|
"import": "./dist/index.js",
|
|
@@ -99,7 +97,7 @@
|
|
|
99
97
|
"webpack": "^5.102.1",
|
|
100
98
|
"@fumadocs/mdx-remote": "1.4.3",
|
|
101
99
|
"eslint-config-custom": "0.0.0",
|
|
102
|
-
"fumadocs-core": "16.0.
|
|
100
|
+
"fumadocs-core": "16.0.14",
|
|
103
101
|
"tsconfig": "0.0.0"
|
|
104
102
|
},
|
|
105
103
|
"peerDependencies": {
|