fumadocs-mdx 11.6.10 → 11.7.0
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/{chunk-64MMPGML.js → chunk-2CSSQTP6.js} +1 -10
- package/dist/{chunk-SXOJYWZ3.js → chunk-2KBRPMAM.js} +1 -1
- package/dist/{chunk-6PDS7MUA.js → chunk-C5INPAZJ.js} +4 -4
- package/dist/{chunk-DRVUBK5B.js → chunk-GWR7KMRU.js} +13 -1
- package/dist/chunk-JPPCALFT.js +34 -0
- package/dist/{chunk-OTM6WYMS.js → chunk-ZOWJF3OH.js} +7 -7
- package/dist/config/index.cjs +6 -19
- package/dist/config/index.d.cts +3 -7
- package/dist/config/index.d.ts +3 -7
- package/dist/config/index.js +8 -12
- package/dist/define-CCrinVBZ.d.cts +109 -0
- package/dist/define-CCrinVBZ.d.ts +109 -0
- package/dist/index.d.cts +6 -7
- package/dist/index.d.ts +6 -7
- package/dist/loader-mdx.cjs +156 -135
- package/dist/loader-mdx.js +7 -10
- package/dist/mdx-options-UDV5WEFU.js +6 -0
- package/dist/next/index.cjs +197 -54
- package/dist/next/index.js +7 -30
- package/dist/runtime/async.cjs +167 -15
- package/dist/runtime/async.d.cts +5 -6
- package/dist/runtime/async.d.ts +5 -6
- package/dist/runtime/async.js +26 -17
- package/dist/runtime/vite.cjs +116 -0
- package/dist/runtime/vite.d.cts +47 -0
- package/dist/runtime/vite.d.ts +47 -0
- package/dist/runtime/vite.js +90 -0
- package/dist/{types-Dk7DhSKZ.d.ts → types-C0bKwtAx.d.ts} +38 -50
- package/dist/{types-ZwLebhOl.d.cts → types-CnslxmoO.d.cts} +38 -50
- package/dist/vite/index.cjs +384 -137
- package/dist/vite/index.d.cts +12 -3
- package/dist/vite/index.d.ts +12 -3
- package/dist/vite/index.js +177 -21
- package/package.json +20 -10
- package/dist/types-DvTNxAvo.d.cts +0 -217
- package/dist/types-DvTNxAvo.d.ts +0 -217
package/dist/types-DvTNxAvo.d.ts
DELETED
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { MDXProps } from 'mdx/types';
|
|
2
|
-
import * as plugins from 'fumadocs-core/mdx-plugins';
|
|
3
|
-
import { StructuredData } from 'fumadocs-core/mdx-plugins';
|
|
4
|
-
import { TableOfContents } from 'fumadocs-core/server';
|
|
5
|
-
import { ProcessorOptions } from '@mdx-js/mdx';
|
|
6
|
-
import { Pluggable } from 'unified';
|
|
7
|
-
import { FC } from 'react';
|
|
8
|
-
import { z } from 'zod';
|
|
9
|
-
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
10
|
-
import { MDXOptions as MDXOptions$1 } from '@fumadocs/mdx-remote';
|
|
11
|
-
|
|
12
|
-
interface MDXOptions extends ProcessorOptions {
|
|
13
|
-
/**
|
|
14
|
-
* Name of collection
|
|
15
|
-
*/
|
|
16
|
-
collection?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Specify a file path for source
|
|
19
|
-
*/
|
|
20
|
-
filePath?: string;
|
|
21
|
-
frontmatter?: Record<string, unknown>;
|
|
22
|
-
/**
|
|
23
|
-
* Custom Vfile data
|
|
24
|
-
*/
|
|
25
|
-
data?: Record<string, unknown>;
|
|
26
|
-
_compiler?: CompilerOptions;
|
|
27
|
-
}
|
|
28
|
-
interface CompilerOptions {
|
|
29
|
-
addDependency: (file: string) => void;
|
|
30
|
-
}
|
|
31
|
-
declare module 'vfile' {
|
|
32
|
-
interface DataMap {
|
|
33
|
-
/**
|
|
34
|
-
* The compiler object from loader
|
|
35
|
-
*/
|
|
36
|
-
_compiler?: CompilerOptions;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
declare const metaSchema: z.ZodObject<{
|
|
41
|
-
title: z.ZodOptional<z.ZodString>;
|
|
42
|
-
pages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
43
|
-
description: z.ZodOptional<z.ZodString>;
|
|
44
|
-
root: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
-
defaultOpen: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
47
|
-
}, "strip", z.ZodTypeAny, {
|
|
48
|
-
root?: boolean | undefined;
|
|
49
|
-
title?: string | undefined;
|
|
50
|
-
pages?: string[] | undefined;
|
|
51
|
-
description?: string | undefined;
|
|
52
|
-
defaultOpen?: boolean | undefined;
|
|
53
|
-
icon?: string | undefined;
|
|
54
|
-
}, {
|
|
55
|
-
root?: boolean | undefined;
|
|
56
|
-
title?: string | undefined;
|
|
57
|
-
pages?: string[] | undefined;
|
|
58
|
-
description?: string | undefined;
|
|
59
|
-
defaultOpen?: boolean | undefined;
|
|
60
|
-
icon?: string | undefined;
|
|
61
|
-
}>;
|
|
62
|
-
declare const frontmatterSchema: z.ZodObject<{
|
|
63
|
-
title: z.ZodString;
|
|
64
|
-
description: z.ZodOptional<z.ZodString>;
|
|
65
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
66
|
-
full: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
-
_openapi: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
|
|
68
|
-
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
title: string;
|
|
70
|
-
description?: string | undefined;
|
|
71
|
-
icon?: string | undefined;
|
|
72
|
-
full?: boolean | undefined;
|
|
73
|
-
_openapi?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
74
|
-
}, {
|
|
75
|
-
title: string;
|
|
76
|
-
description?: string | undefined;
|
|
77
|
-
icon?: string | undefined;
|
|
78
|
-
full?: boolean | undefined;
|
|
79
|
-
_openapi?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
80
|
-
}>;
|
|
81
|
-
|
|
82
|
-
type CollectionSchema<Schema extends StandardSchemaV1, Context> = Schema | ((ctx: Context) => Schema);
|
|
83
|
-
interface BaseCollection {
|
|
84
|
-
/**
|
|
85
|
-
* Directories to scan
|
|
86
|
-
*/
|
|
87
|
-
dir: string | string[];
|
|
88
|
-
/**
|
|
89
|
-
* what files to include/exclude (glob patterns)
|
|
90
|
-
*
|
|
91
|
-
* Include all files if not specified
|
|
92
|
-
*/
|
|
93
|
-
files?: string[];
|
|
94
|
-
}
|
|
95
|
-
interface MetaCollection<Schema extends StandardSchemaV1 = StandardSchemaV1> extends BaseCollection {
|
|
96
|
-
type: 'meta';
|
|
97
|
-
schema?: CollectionSchema<Schema, {
|
|
98
|
-
path: string;
|
|
99
|
-
source: string;
|
|
100
|
-
}>;
|
|
101
|
-
}
|
|
102
|
-
interface DocCollection<Schema extends StandardSchemaV1 = StandardSchemaV1, Async extends boolean = boolean> extends BaseCollection {
|
|
103
|
-
type: 'doc';
|
|
104
|
-
mdxOptions?: MDXOptions;
|
|
105
|
-
/**
|
|
106
|
-
* Load files with async
|
|
107
|
-
*/
|
|
108
|
-
async?: Async;
|
|
109
|
-
schema?: CollectionSchema<Schema, {
|
|
110
|
-
path: string;
|
|
111
|
-
source: string;
|
|
112
|
-
}>;
|
|
113
|
-
}
|
|
114
|
-
interface DocsCollection<DocSchema extends StandardSchemaV1 = StandardSchemaV1, MetaSchema extends StandardSchemaV1 = StandardSchemaV1, Async extends boolean = boolean> {
|
|
115
|
-
type: 'docs';
|
|
116
|
-
dir: string | string[];
|
|
117
|
-
docs: DocCollection<DocSchema, Async>;
|
|
118
|
-
meta: MetaCollection<MetaSchema>;
|
|
119
|
-
}
|
|
120
|
-
declare function defineCollections<T extends 'doc' | 'meta', Schema extends StandardSchemaV1 = StandardSchemaV1<unknown, any>, Async extends boolean = false>(options: {
|
|
121
|
-
type: T;
|
|
122
|
-
} & (T extends 'doc' ? DocCollection<Schema, Async> : MetaCollection<Schema>)): {
|
|
123
|
-
type: T;
|
|
124
|
-
_type: {
|
|
125
|
-
async: Async;
|
|
126
|
-
schema: Schema;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
declare function defineDocs<DocSchema extends StandardSchemaV1 = typeof frontmatterSchema, MetaSchema extends StandardSchemaV1 = typeof metaSchema, Async extends boolean = false>(options?: {
|
|
130
|
-
/**
|
|
131
|
-
* The directory to scan files
|
|
132
|
-
*
|
|
133
|
-
* @defaultValue 'content/docs'
|
|
134
|
-
*/
|
|
135
|
-
dir?: string | string[];
|
|
136
|
-
docs?: Omit<DocCollection<DocSchema, Async>, 'dir' | 'type'>;
|
|
137
|
-
meta?: Omit<MetaCollection<MetaSchema>, 'dir' | 'type'>;
|
|
138
|
-
}): {
|
|
139
|
-
type: 'docs';
|
|
140
|
-
docs: {
|
|
141
|
-
type: 'doc';
|
|
142
|
-
_type: {
|
|
143
|
-
schema: DocSchema;
|
|
144
|
-
async: Async;
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
meta: {
|
|
148
|
-
type: 'meta';
|
|
149
|
-
_type: {
|
|
150
|
-
schema: MetaSchema;
|
|
151
|
-
async: false;
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
declare function defineConfig(config?: GlobalConfig): GlobalConfig;
|
|
156
|
-
|
|
157
|
-
interface LoadedConfig {
|
|
158
|
-
collections: Map<string, DocCollection | MetaCollection | DocsCollection>;
|
|
159
|
-
global?: GlobalConfig;
|
|
160
|
-
_mdx_loader?: {
|
|
161
|
-
cachedOptions?: ProcessorOptions;
|
|
162
|
-
};
|
|
163
|
-
_mdx_async?: {
|
|
164
|
-
cachedMdxOptions?: MDXOptions$1;
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
type ResolvePlugins = Pluggable[] | ((v: Pluggable[]) => Pluggable[]);
|
|
169
|
-
type DefaultMDXOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins' | '_ctx'> & {
|
|
170
|
-
rehypePlugins?: ResolvePlugins;
|
|
171
|
-
remarkPlugins?: ResolvePlugins;
|
|
172
|
-
/**
|
|
173
|
-
* Properties to export from `vfile.data`
|
|
174
|
-
*/
|
|
175
|
-
valueToExport?: string[];
|
|
176
|
-
remarkStructureOptions?: plugins.StructureOptions | false;
|
|
177
|
-
remarkHeadingOptions?: plugins.RemarkHeadingOptions;
|
|
178
|
-
remarkImageOptions?: plugins.RemarkImageOptions | false;
|
|
179
|
-
remarkCodeTabOptions?: plugins.RemarkCodeTabOptions | false;
|
|
180
|
-
remarkNpmOptions?: plugins.RemarkNpmOptions | false;
|
|
181
|
-
rehypeCodeOptions?: plugins.RehypeCodeOptions | false;
|
|
182
|
-
};
|
|
183
|
-
declare function loadDefaultOptions(config: LoadedConfig): Promise<ProcessorOptions>;
|
|
184
|
-
|
|
185
|
-
interface GlobalConfig {
|
|
186
|
-
/**
|
|
187
|
-
* Configure global MDX options
|
|
188
|
-
*/
|
|
189
|
-
mdxOptions?: DefaultMDXOptions | (() => DefaultMDXOptions | Promise<DefaultMDXOptions>);
|
|
190
|
-
/**
|
|
191
|
-
* Fetch last modified time with specified version control
|
|
192
|
-
* @defaultValue 'none'
|
|
193
|
-
*/
|
|
194
|
-
lastModifiedTime?: 'git' | 'none';
|
|
195
|
-
}
|
|
196
|
-
interface FileInfo {
|
|
197
|
-
path: string;
|
|
198
|
-
absolutePath: string;
|
|
199
|
-
}
|
|
200
|
-
interface MarkdownProps {
|
|
201
|
-
body: FC<MDXProps>;
|
|
202
|
-
structuredData: StructuredData;
|
|
203
|
-
toc: TableOfContents;
|
|
204
|
-
_exports: Record<string, unknown>;
|
|
205
|
-
/**
|
|
206
|
-
* Only available when `lastModifiedTime` is enabled on MDX loader
|
|
207
|
-
*/
|
|
208
|
-
lastModified?: Date;
|
|
209
|
-
}
|
|
210
|
-
interface BaseCollectionEntry {
|
|
211
|
-
/**
|
|
212
|
-
* Raw file path of collection entry, including absolute path (not normalized).
|
|
213
|
-
*/
|
|
214
|
-
_file: FileInfo;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export { type BaseCollectionEntry as B, type CollectionSchema as C, type DefaultMDXOptions as D, type FileInfo as F, type GlobalConfig as G, type LoadedConfig as L, type MarkdownProps as M, type BaseCollection as a, type MetaCollection as b, type DocCollection as c, type DocsCollection as d, defineCollections as e, frontmatterSchema as f, defineDocs as g, defineConfig as h, loadDefaultOptions as l, metaSchema as m };
|