fumadocs-mdx 13.0.8 → 14.0.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/bin.cjs +985 -893
- package/dist/bin.js +3 -3
- package/dist/build-mdx-6UAK5FF5.js +8 -0
- package/dist/bun/index.cjs +613 -471
- package/dist/bun/index.d.cts +9 -2
- package/dist/bun/index.d.ts +9 -2
- package/dist/bun/index.js +15 -14
- package/dist/chunk-4JSFLXXT.js +8 -0
- package/dist/chunk-5OBUOALK.js +141 -0
- package/dist/{chunk-2E2JCOSO.js → chunk-6NISOLQ6.js} +16 -44
- package/dist/chunk-7UKSZSPY.js +331 -0
- package/dist/chunk-BEBCWQC7.js +224 -0
- package/dist/chunk-E5DJTSIM.js +86 -0
- package/dist/{chunk-K5ZLPEIQ.js → chunk-FBLMK4RS.js} +9 -6
- package/dist/chunk-IQGEFL2B.js +17 -0
- package/dist/{chunk-5FTSWCB4.js → chunk-K6HCOGOX.js} +9 -11
- package/dist/{chunk-QXHN25N3.js → chunk-MTTISKQJ.js} +6 -6
- package/dist/{chunk-3J3WL7WN.js → chunk-SLY7WXTX.js} +71 -58
- package/dist/chunk-TYJDYTKH.js +85 -0
- package/dist/chunk-WBIHDYMN.js +126 -0
- package/dist/{chunk-2HXTGJBI.js → chunk-ZY6UZ7NH.js} +22 -19
- package/dist/config/index.cjs +79 -71
- package/dist/config/index.d.cts +7 -1
- package/dist/config/index.d.ts +7 -1
- package/dist/config/index.js +5 -5
- package/dist/core-B9ZoS6sA.d.ts +341 -0
- package/dist/core-DTuP23zu.d.cts +341 -0
- package/dist/index-BD8Woo4m.d.cts +8 -0
- package/dist/index-CNOvhtOn.d.ts +8 -0
- package/dist/index.d.cts +38 -56
- package/dist/index.d.ts +38 -56
- package/dist/load-from-file-5HUQN36V.js +8 -0
- package/dist/next/index.cjs +763 -473
- package/dist/next/index.d.cts +16 -1
- package/dist/next/index.d.ts +16 -1
- package/dist/next/index.js +80 -281
- package/dist/node/loader.cjs +764 -627
- package/dist/node/loader.js +10 -11
- package/dist/plugins/index-file.cjs +495 -0
- package/dist/plugins/index-file.d.cts +14 -0
- package/dist/plugins/index-file.d.ts +14 -0
- package/dist/plugins/index-file.js +8 -0
- package/dist/plugins/json-schema.d.cts +9 -2
- package/dist/plugins/json-schema.d.ts +9 -2
- package/dist/plugins/last-modified.cjs +110 -0
- package/dist/plugins/last-modified.d.cts +37 -0
- package/dist/plugins/last-modified.d.ts +37 -0
- package/dist/plugins/last-modified.js +74 -0
- package/dist/runtime/browser.cjs +93 -0
- package/dist/runtime/browser.d.cts +53 -0
- package/dist/runtime/browser.d.ts +53 -0
- package/dist/runtime/browser.js +67 -0
- package/dist/runtime/dynamic.cjs +1023 -0
- package/dist/runtime/dynamic.d.cts +27 -0
- package/dist/runtime/dynamic.d.ts +27 -0
- package/dist/runtime/dynamic.js +79 -0
- package/dist/runtime/server.cjs +176 -0
- package/dist/runtime/server.d.cts +14 -0
- package/dist/runtime/server.d.ts +14 -0
- package/dist/runtime/server.js +8 -0
- package/dist/runtime/types.cjs +18 -0
- package/dist/runtime/types.d.cts +61 -0
- package/dist/runtime/types.d.ts +61 -0
- package/dist/runtime/types.js +0 -0
- package/dist/vite/index.cjs +984 -621
- package/dist/vite/index.d.cts +17 -22
- package/dist/vite/index.d.ts +17 -22
- package/dist/vite/index.js +32 -222
- package/dist/webpack/mdx.cjs +647 -514
- package/dist/webpack/mdx.d.cts +15 -1
- package/dist/webpack/mdx.d.ts +15 -1
- package/dist/webpack/mdx.js +12 -17
- package/dist/webpack/meta.cjs +360 -231
- package/dist/webpack/meta.d.cts +15 -1
- package/dist/webpack/meta.d.ts +15 -1
- package/dist/webpack/meta.js +13 -15
- package/package.json +15 -32
- package/dist/build-mdx-BjXOmv0b.d.cts +0 -53
- package/dist/build-mdx-CY5UldCO.d.ts +0 -53
- package/dist/chunk-2AQRQXSO.js +0 -119
- package/dist/chunk-CXA4JO4Z.js +0 -45
- package/dist/chunk-DMJ6I4C3.js +0 -76
- package/dist/chunk-FSZMKRVH.js +0 -80
- package/dist/chunk-II3H5ZVZ.js +0 -77
- package/dist/chunk-KILFIBVW.js +0 -75
- package/dist/chunk-NVRDCY6Z.js +0 -30
- package/dist/chunk-VUEZTR2H.js +0 -26
- package/dist/core-DB7TdlyC.d.cts +0 -234
- package/dist/core-DB7TdlyC.d.ts +0 -234
- package/dist/index-D7s7kCc2.d.cts +0 -7
- package/dist/index-D7s7kCc2.d.ts +0 -7
- package/dist/load-from-file-AVYOFOI7.js +0 -7
- package/dist/preset-ZMP6U62C.js +0 -6
- package/dist/runtime/next/async.cjs +0 -760
- package/dist/runtime/next/async.d.cts +0 -19
- package/dist/runtime/next/async.d.ts +0 -19
- package/dist/runtime/next/async.js +0 -86
- package/dist/runtime/next/index.cjs +0 -136
- package/dist/runtime/next/index.d.cts +0 -33
- package/dist/runtime/next/index.d.ts +0 -33
- package/dist/runtime/next/index.js +0 -11
- package/dist/runtime/vite/browser.cjs +0 -107
- package/dist/runtime/vite/browser.d.cts +0 -59
- package/dist/runtime/vite/browser.d.ts +0 -59
- package/dist/runtime/vite/browser.js +0 -11
- package/dist/runtime/vite/server.cjs +0 -243
- package/dist/runtime/vite/server.d.cts +0 -30
- package/dist/runtime/vite/server.d.ts +0 -30
- package/dist/runtime/vite/server.js +0 -111
- package/dist/types-Bnh9n7mj.d.cts +0 -45
- package/dist/types-ey1AZqrg.d.ts +0 -45
package/dist/index.d.cts
CHANGED
|
@@ -1,79 +1,61 @@
|
|
|
1
|
+
export { p as CompilationContext, u as Core, i as CoreOptions, n as EmitEntry, s as EmitOptions, E as ExtractedReference, j as Plugin, o as PluginContext, q as PluginOption, r as ServerContext, T as TransformOptions, _ as _Defaults, t as createCore } from './core-DTuP23zu.cjs';
|
|
2
|
+
import { createProcessor } from '@mdx-js/mdx';
|
|
1
3
|
import { StructuredData } from 'fumadocs-core/mdx-plugins';
|
|
2
4
|
import { TOCItemType } from 'fumadocs-core/toc';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export { r as Core, C as CoreOptions, k as EmitEntry, o as EmitOptions, i as Plugin, l as PluginContext, n as PluginOption, S as ServerContext, q as createCore, p as findConfigFile } from './core-DB7TdlyC.cjs';
|
|
6
|
-
import { Root } from 'mdast';
|
|
7
|
-
import { C as CompiledMDXProperties } from './build-mdx-BjXOmv0b.cjs';
|
|
8
|
-
import '@mdx-js/mdx';
|
|
5
|
+
import { FC } from 'react';
|
|
6
|
+
import { MDXProps } from 'mdx/types';
|
|
9
7
|
import '@standard-schema/spec';
|
|
10
8
|
import 'unified';
|
|
11
9
|
import 'zod';
|
|
12
10
|
import 'chokidar';
|
|
13
|
-
import '
|
|
11
|
+
import 'vfile';
|
|
12
|
+
import 'fumadocs-core/source';
|
|
13
|
+
import './runtime/types.cjs';
|
|
14
|
+
import 'fumadocs-core/mdx-plugins/remark-structure';
|
|
15
|
+
import 'mdast';
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
path: string;
|
|
20
|
-
/**
|
|
21
|
-
* the file path in file system
|
|
22
|
-
*/
|
|
23
|
-
fullPath: string;
|
|
17
|
+
type Processor = ReturnType<typeof createProcessor>;
|
|
18
|
+
interface CompilerOptions {
|
|
19
|
+
addDependency: (file: string) => void;
|
|
24
20
|
}
|
|
25
|
-
interface
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*/
|
|
29
|
-
body: MDXContent;
|
|
30
|
-
/**
|
|
31
|
-
* table of contents generated from content.
|
|
32
|
-
*/
|
|
21
|
+
interface CompiledMDXProperties<Frontmatter = Record<string, unknown>> {
|
|
22
|
+
frontmatter: Frontmatter;
|
|
23
|
+
structuredData: StructuredData;
|
|
33
24
|
toc: TOCItemType[];
|
|
25
|
+
default: FC<MDXProps>;
|
|
34
26
|
/**
|
|
35
|
-
*
|
|
27
|
+
* Enable from `postprocess` option.
|
|
36
28
|
*/
|
|
37
|
-
|
|
29
|
+
_markdown?: string;
|
|
38
30
|
/**
|
|
39
|
-
*
|
|
31
|
+
* Enable from `postprocess` option.
|
|
40
32
|
*/
|
|
41
|
-
|
|
33
|
+
_mdast?: string;
|
|
34
|
+
}
|
|
35
|
+
interface FumadocsDataMap {
|
|
42
36
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* Only available when `lastModifiedTime` is enabled on global config.
|
|
37
|
+
* [Fumadocs MDX] raw frontmatter, you can modify it
|
|
46
38
|
*/
|
|
47
|
-
|
|
39
|
+
frontmatter?: Record<string, unknown>;
|
|
48
40
|
/**
|
|
49
|
-
*
|
|
41
|
+
* [Fumadocs MDX] additional ESM exports to write
|
|
50
42
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
'mdx-export'?: {
|
|
44
|
+
name: string;
|
|
45
|
+
value: unknown;
|
|
46
|
+
}[];
|
|
54
47
|
/**
|
|
55
|
-
*
|
|
48
|
+
* [Fumadocs MDX] The compiler object from loader
|
|
56
49
|
*/
|
|
57
|
-
|
|
50
|
+
_compiler?: CompilerOptions;
|
|
58
51
|
/**
|
|
59
|
-
* get
|
|
60
|
-
*
|
|
61
|
-
* - `type: raw` - read the original content from file system.
|
|
62
|
-
* - `type: processed` - get the processed Markdown content, only available when `includeProcessedMarkdown` is enabled on collection config.
|
|
52
|
+
* [Fumadocs MDX] get internal processor, do not use this on user land.
|
|
63
53
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
_getProcessor?: (format: 'md' | 'mdx') => Processor;
|
|
55
|
+
}
|
|
56
|
+
declare module 'vfile' {
|
|
57
|
+
interface DataMap extends FumadocsDataMap {
|
|
58
|
+
}
|
|
66
59
|
}
|
|
67
|
-
type MetaCollectionEntry<Data> = Data & {
|
|
68
|
-
/**
|
|
69
|
-
* file info
|
|
70
|
-
*/
|
|
71
|
-
info: FileInfo;
|
|
72
|
-
};
|
|
73
|
-
type DocCollectionEntry<Frontmatter> = DocData & DocMethods & Frontmatter;
|
|
74
|
-
type AsyncDocCollectionEntry<Frontmatter> = DocMethods & {
|
|
75
|
-
load: () => Promise<DocData>;
|
|
76
|
-
} & Frontmatter;
|
|
77
|
-
declare function createDocMethods(info: FileInfo, load: () => Promise<CompiledMDXProperties<any>>): DocMethods;
|
|
78
60
|
|
|
79
|
-
export
|
|
61
|
+
export type { CompiledMDXProperties };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,79 +1,61 @@
|
|
|
1
|
+
export { p as CompilationContext, u as Core, i as CoreOptions, n as EmitEntry, s as EmitOptions, E as ExtractedReference, j as Plugin, o as PluginContext, q as PluginOption, r as ServerContext, T as TransformOptions, _ as _Defaults, t as createCore } from './core-B9ZoS6sA.js';
|
|
2
|
+
import { createProcessor } from '@mdx-js/mdx';
|
|
1
3
|
import { StructuredData } from 'fumadocs-core/mdx-plugins';
|
|
2
4
|
import { TOCItemType } from 'fumadocs-core/toc';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export { r as Core, C as CoreOptions, k as EmitEntry, o as EmitOptions, i as Plugin, l as PluginContext, n as PluginOption, S as ServerContext, q as createCore, p as findConfigFile } from './core-DB7TdlyC.js';
|
|
6
|
-
import { Root } from 'mdast';
|
|
7
|
-
import { C as CompiledMDXProperties } from './build-mdx-CY5UldCO.js';
|
|
8
|
-
import '@mdx-js/mdx';
|
|
5
|
+
import { FC } from 'react';
|
|
6
|
+
import { MDXProps } from 'mdx/types';
|
|
9
7
|
import '@standard-schema/spec';
|
|
10
8
|
import 'unified';
|
|
11
9
|
import 'zod';
|
|
12
10
|
import 'chokidar';
|
|
13
|
-
import '
|
|
11
|
+
import 'vfile';
|
|
12
|
+
import 'fumadocs-core/source';
|
|
13
|
+
import './runtime/types.js';
|
|
14
|
+
import 'fumadocs-core/mdx-plugins/remark-structure';
|
|
15
|
+
import 'mdast';
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
path: string;
|
|
20
|
-
/**
|
|
21
|
-
* the file path in file system
|
|
22
|
-
*/
|
|
23
|
-
fullPath: string;
|
|
17
|
+
type Processor = ReturnType<typeof createProcessor>;
|
|
18
|
+
interface CompilerOptions {
|
|
19
|
+
addDependency: (file: string) => void;
|
|
24
20
|
}
|
|
25
|
-
interface
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*/
|
|
29
|
-
body: MDXContent;
|
|
30
|
-
/**
|
|
31
|
-
* table of contents generated from content.
|
|
32
|
-
*/
|
|
21
|
+
interface CompiledMDXProperties<Frontmatter = Record<string, unknown>> {
|
|
22
|
+
frontmatter: Frontmatter;
|
|
23
|
+
structuredData: StructuredData;
|
|
33
24
|
toc: TOCItemType[];
|
|
25
|
+
default: FC<MDXProps>;
|
|
34
26
|
/**
|
|
35
|
-
*
|
|
27
|
+
* Enable from `postprocess` option.
|
|
36
28
|
*/
|
|
37
|
-
|
|
29
|
+
_markdown?: string;
|
|
38
30
|
/**
|
|
39
|
-
*
|
|
31
|
+
* Enable from `postprocess` option.
|
|
40
32
|
*/
|
|
41
|
-
|
|
33
|
+
_mdast?: string;
|
|
34
|
+
}
|
|
35
|
+
interface FumadocsDataMap {
|
|
42
36
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* Only available when `lastModifiedTime` is enabled on global config.
|
|
37
|
+
* [Fumadocs MDX] raw frontmatter, you can modify it
|
|
46
38
|
*/
|
|
47
|
-
|
|
39
|
+
frontmatter?: Record<string, unknown>;
|
|
48
40
|
/**
|
|
49
|
-
*
|
|
41
|
+
* [Fumadocs MDX] additional ESM exports to write
|
|
50
42
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
'mdx-export'?: {
|
|
44
|
+
name: string;
|
|
45
|
+
value: unknown;
|
|
46
|
+
}[];
|
|
54
47
|
/**
|
|
55
|
-
*
|
|
48
|
+
* [Fumadocs MDX] The compiler object from loader
|
|
56
49
|
*/
|
|
57
|
-
|
|
50
|
+
_compiler?: CompilerOptions;
|
|
58
51
|
/**
|
|
59
|
-
* get
|
|
60
|
-
*
|
|
61
|
-
* - `type: raw` - read the original content from file system.
|
|
62
|
-
* - `type: processed` - get the processed Markdown content, only available when `includeProcessedMarkdown` is enabled on collection config.
|
|
52
|
+
* [Fumadocs MDX] get internal processor, do not use this on user land.
|
|
63
53
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
_getProcessor?: (format: 'md' | 'mdx') => Processor;
|
|
55
|
+
}
|
|
56
|
+
declare module 'vfile' {
|
|
57
|
+
interface DataMap extends FumadocsDataMap {
|
|
58
|
+
}
|
|
66
59
|
}
|
|
67
|
-
type MetaCollectionEntry<Data> = Data & {
|
|
68
|
-
/**
|
|
69
|
-
* file info
|
|
70
|
-
*/
|
|
71
|
-
info: FileInfo;
|
|
72
|
-
};
|
|
73
|
-
type DocCollectionEntry<Frontmatter> = DocData & DocMethods & Frontmatter;
|
|
74
|
-
type AsyncDocCollectionEntry<Frontmatter> = DocMethods & {
|
|
75
|
-
load: () => Promise<DocData>;
|
|
76
|
-
} & Frontmatter;
|
|
77
|
-
declare function createDocMethods(info: FileInfo, load: () => Promise<CompiledMDXProperties<any>>): DocMethods;
|
|
78
60
|
|
|
79
|
-
export
|
|
61
|
+
export type { CompiledMDXProperties };
|