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.
Files changed (77) hide show
  1. package/dist/{build-mdx-6UAK5FF5.js → build-mdx-W3233QBZ.js} +1 -1
  2. package/dist/bun/index.d.ts +7 -1
  3. package/dist/bun/index.js +9 -8
  4. package/dist/{chunk-5YXP7JLN.js → chunk-5OBUOALK.js} +8 -5
  5. package/dist/{chunk-ZY6UZ7NH.js → chunk-6RPNS75C.js} +1 -1
  6. package/dist/{chunk-XHJCLBZ4.js → chunk-ED3ON275.js} +86 -162
  7. package/dist/{chunk-7L2KNF6B.js → chunk-GB4W3YCZ.js} +51 -7
  8. package/dist/{chunk-SLY7WXTX.js → chunk-KOPLIEVQ.js} +5 -6
  9. package/dist/{chunk-OXSRIWQW.js → chunk-LPX7ZO66.js} +4 -3
  10. package/dist/{chunk-SRSRFOVI.js → chunk-OLL7FM7W.js} +3 -3
  11. package/dist/{chunk-5UMZCWKV.js → chunk-Q5OSGLJL.js} +1 -1
  12. package/dist/{chunk-E5DJTSIM.js → chunk-S7KOJHHO.js} +4 -1
  13. package/dist/{chunk-6NISOLQ6.js → chunk-USWQVJWR.js} +1 -1
  14. package/dist/chunk-WBIHDYMN.js +126 -0
  15. package/dist/config/index.d.ts +6 -1
  16. package/dist/config/index.js +1 -1
  17. package/dist/{index-D7JdSMpp.d.cts → core-C3QZSdEx.d.ts} +73 -4
  18. package/dist/{index-BlVBvy-z.d.ts → index-RVIZxMZG.d.ts} +1 -1
  19. package/dist/index.d.ts +56 -3
  20. package/dist/load-from-file-OZ5N7DXU.js +8 -0
  21. package/dist/next/index.cjs +263 -193
  22. package/dist/next/index.d.ts +7 -2
  23. package/dist/next/index.js +12 -10
  24. package/dist/node/loader.js +4 -4
  25. package/dist/plugins/index-file.d.ts +7 -22
  26. package/dist/plugins/index-file.js +2 -2
  27. package/dist/plugins/json-schema.d.ts +7 -1
  28. package/dist/plugins/last-modified.d.ts +15 -2
  29. package/dist/plugins/last-modified.js +43 -6
  30. package/dist/runtime/browser.d.ts +22 -19
  31. package/dist/runtime/browser.js +5 -6
  32. package/dist/runtime/dynamic.d.ts +12 -12
  33. package/dist/runtime/dynamic.js +12 -11
  34. package/dist/runtime/server.d.ts +10 -157
  35. package/dist/runtime/server.js +3 -3
  36. package/dist/runtime/types.d.ts +61 -0
  37. package/dist/runtime/types.js +0 -0
  38. package/dist/vite/index.d.ts +7 -2
  39. package/dist/vite/index.js +10 -9
  40. package/dist/webpack/mdx.d.ts +8 -2
  41. package/dist/webpack/mdx.js +5 -5
  42. package/dist/webpack/meta.d.ts +8 -2
  43. package/dist/webpack/meta.js +4 -4
  44. package/package.json +4 -6
  45. package/dist/bin.cjs +0 -1889
  46. package/dist/bin.d.cts +0 -1
  47. package/dist/bun/index.cjs +0 -1112
  48. package/dist/bun/index.d.cts +0 -19
  49. package/dist/chunk-PKI7ZDA5.js +0 -29
  50. package/dist/config/index.cjs +0 -400
  51. package/dist/config/index.d.cts +0 -13
  52. package/dist/index-D7JdSMpp.d.ts +0 -272
  53. package/dist/index-P2NNUkHn.d.cts +0 -8
  54. package/dist/index.cjs +0 -18
  55. package/dist/index.d.cts +0 -8
  56. package/dist/load-from-file-I3ALLIVB.js +0 -8
  57. package/dist/next/index.d.cts +0 -28
  58. package/dist/node/loader.cjs +0 -1165
  59. package/dist/node/loader.d.cts +0 -5
  60. package/dist/plugins/index-file.cjs +0 -471
  61. package/dist/plugins/index-file.d.cts +0 -29
  62. package/dist/plugins/json-schema.cjs +0 -114
  63. package/dist/plugins/json-schema.d.cts +0 -25
  64. package/dist/plugins/last-modified.cjs +0 -75
  65. package/dist/plugins/last-modified.d.cts +0 -27
  66. package/dist/runtime/browser.cjs +0 -94
  67. package/dist/runtime/browser.d.cts +0 -50
  68. package/dist/runtime/dynamic.cjs +0 -985
  69. package/dist/runtime/dynamic.d.cts +0 -27
  70. package/dist/runtime/server.cjs +0 -173
  71. package/dist/runtime/server.d.cts +0 -161
  72. package/dist/vite/index.cjs +0 -1620
  73. package/dist/vite/index.d.cts +0 -39
  74. package/dist/webpack/mdx.cjs +0 -1089
  75. package/dist/webpack/mdx.d.cts +0 -14
  76. package/dist/webpack/meta.cjs +0 -649
  77. package/dist/webpack/meta.d.cts +0 -14
@@ -0,0 +1,126 @@
1
+ // src/utils/codegen.ts
2
+ import path from "path";
3
+ import { glob } from "tinyglobby";
4
+ function createCodegen({
5
+ target = "default",
6
+ outDir = "",
7
+ jsExtension = false,
8
+ globCache = /* @__PURE__ */ new Map()
9
+ }) {
10
+ let eagerImportId = 0;
11
+ const banner = ["// @ts-nocheck"];
12
+ if (target === "vite") {
13
+ banner.push('/// <reference types="vite/client" />');
14
+ }
15
+ return {
16
+ options: {
17
+ target,
18
+ outDir
19
+ },
20
+ lines: [],
21
+ addImport(statement) {
22
+ this.lines.unshift(statement);
23
+ },
24
+ async pushAsync(insert) {
25
+ for (const line of await Promise.all(insert)) {
26
+ if (line === void 0) continue;
27
+ this.lines.push(line);
28
+ }
29
+ },
30
+ async generateGlobImport(patterns, options) {
31
+ if (target === "vite") {
32
+ return this.generateViteGlobImport(patterns, options);
33
+ }
34
+ return this.generateNodeGlobImport(patterns, options);
35
+ },
36
+ generateViteGlobImport(patterns, { base, ...rest }) {
37
+ patterns = (typeof patterns === "string" ? [patterns] : patterns).map(
38
+ normalizeViteGlobPath
39
+ );
40
+ return `import.meta.glob(${JSON.stringify(patterns)}, ${JSON.stringify(
41
+ {
42
+ base: normalizeViteGlobPath(path.relative(outDir, base)),
43
+ ...rest
44
+ },
45
+ null,
46
+ 2
47
+ )})`;
48
+ },
49
+ async generateNodeGlobImport(patterns, {
50
+ base,
51
+ eager = false,
52
+ query = {},
53
+ import: importName
54
+ }) {
55
+ const cacheKey = JSON.stringify({ patterns, base });
56
+ let files = globCache.get(cacheKey);
57
+ if (!files) {
58
+ files = glob(patterns, {
59
+ cwd: base
60
+ });
61
+ globCache.set(cacheKey, files);
62
+ }
63
+ let code = "{";
64
+ for (const item of await files) {
65
+ const fullPath = path.join(base, item);
66
+ const searchParams = new URLSearchParams();
67
+ for (const [k, v] of Object.entries(query)) {
68
+ searchParams.set(k, v);
69
+ }
70
+ const importPath = this.formatImportPath(fullPath) + "?" + searchParams.toString();
71
+ if (eager) {
72
+ const name = `__fd_glob_${eagerImportId++}`;
73
+ this.lines.unshift(
74
+ importName ? `import { ${importName} as ${name} } from ${JSON.stringify(importPath)}` : `import * as ${name} from ${JSON.stringify(importPath)}`
75
+ );
76
+ code += `${JSON.stringify(item)}: ${name}, `;
77
+ } else {
78
+ let line = `${JSON.stringify(item)}: () => import(${JSON.stringify(importPath)})`;
79
+ if (importName) {
80
+ line += `.then(mod => mod.${importName})`;
81
+ }
82
+ code += `${line}, `;
83
+ }
84
+ }
85
+ code += "}";
86
+ return code;
87
+ },
88
+ formatImportPath(file) {
89
+ const ext = path.extname(file);
90
+ let filename;
91
+ if (ext === ".ts" && jsExtension) {
92
+ filename = file.substring(0, file.length - ext.length) + ".js";
93
+ } else if (ext === ".ts") {
94
+ filename = file.substring(0, file.length - ext.length);
95
+ } else {
96
+ filename = file;
97
+ }
98
+ const importPath = slash(path.relative(outDir, filename));
99
+ return importPath.startsWith(".") ? importPath : `./${importPath}`;
100
+ },
101
+ toString() {
102
+ return [...banner, ...this.lines].join("\n");
103
+ }
104
+ };
105
+ }
106
+ function normalizeViteGlobPath(file) {
107
+ file = slash(file);
108
+ if (file.startsWith("./")) return file;
109
+ if (file.startsWith("/")) return `.${file}`;
110
+ return `./${file}`;
111
+ }
112
+ function slash(path2) {
113
+ const isExtendedLengthPath = path2.startsWith("\\\\?\\");
114
+ if (isExtendedLengthPath) {
115
+ return path2;
116
+ }
117
+ return path2.replaceAll("\\", "/");
118
+ }
119
+ function ident(code, tab = 1) {
120
+ return code.split("\n").map((v) => " ".repeat(tab) + v).join("\n");
121
+ }
122
+
123
+ export {
124
+ createCodegen,
125
+ ident
126
+ };
@@ -1,4 +1,4 @@
1
- export { A as AnyCollection, B as BaseCollection, a as CollectionSchema, f as DefaultMDXOptions, D as DocCollection, b as DocsCollection, G as GlobalConfig, g as MDXPresetOptions, M as MetaCollection, P as PostprocessOptions, h as applyMdxPreset, d as defineCollections, e as defineConfig, c as defineDocs, i as frontmatterSchema, m as metaSchema } from '../index-D7JdSMpp.js';
1
+ export { A as AnyCollection, B as BaseCollection, a as CollectionSchema, f as DefaultMDXOptions, D as DocCollection, b as DocsCollection, G as GlobalConfig, g as MDXPresetOptions, M as MetaCollection, P as PostprocessOptions, h as applyMdxPreset, d as defineCollections, e as defineConfig, c as defineDocs, i as frontmatterSchema, m as metaSchema } from '../core-C3QZSdEx.js';
2
2
  import { Processor, Transformer } from 'unified';
3
3
  import { Root } from 'mdast';
4
4
  import '@mdx-js/mdx';
@@ -7,6 +7,11 @@ import 'fumadocs-core/mdx-plugins';
7
7
  import 'zod';
8
8
  import 'chokidar';
9
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 'mdx/types';
10
15
 
11
16
  declare function remarkInclude(this: Processor): Transformer<Root, Root>;
12
17
 
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-FBLMK4RS.js";
4
4
  import {
5
5
  applyMdxPreset
6
- } from "../chunk-E5DJTSIM.js";
6
+ } from "../chunk-S7KOJHHO.js";
7
7
  import "../chunk-VWJKRQZR.js";
8
8
 
9
9
  // src/config/zod-4.ts
@@ -5,6 +5,8 @@ import * as Plugins from 'fumadocs-core/mdx-plugins';
5
5
  import { z } from 'zod';
6
6
  import { FSWatcher } from 'chokidar';
7
7
  import { VFile } from 'vfile';
8
+ import { PageData, MetaData, Source } from 'fumadocs-core/source';
9
+ import { InternalTypeConfig, DocData, DocMethods, MetaMethods } from './runtime/types.js';
8
10
 
9
11
  type ResolvePlugins = Pluggable[] | ((v: Pluggable[]) => Pluggable[]);
10
12
  type DefaultMDXOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins' | '_ctx'> & {
@@ -174,6 +176,71 @@ interface DocsCollectionItem extends DocsCollection {
174
176
  hasFile: (filePath: string) => boolean;
175
177
  }
176
178
 
179
+ type MetaCollectionEntry<Data> = Data & MetaMethods;
180
+ type DocCollectionEntry<Name extends string = string, Frontmatter = unknown, TC extends InternalTypeConfig = InternalTypeConfig> = DocData & DocMethods & Frontmatter & TC['DocData'][Name];
181
+ type AsyncDocCollectionEntry<Name extends string = string, Frontmatter = unknown, TC extends InternalTypeConfig = InternalTypeConfig> = {
182
+ load: () => Promise<DocData & TC['DocData'][Name]>;
183
+ } & DocMethods & Frontmatter;
184
+ interface DocsCollectionEntry<Name extends string = string, Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, TC extends InternalTypeConfig = InternalTypeConfig> {
185
+ docs: DocCollectionEntry<Name, Frontmatter, TC>[];
186
+ meta: MetaCollectionEntry<Meta>[];
187
+ toFumadocsSource: () => Source<{
188
+ pageData: DocCollectionEntry<Name, Frontmatter, TC>;
189
+ metaData: MetaCollectionEntry<Meta>;
190
+ }>;
191
+ }
192
+ interface AsyncDocsCollectionEntry<Name extends string = string, Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, TC extends InternalTypeConfig = InternalTypeConfig> {
193
+ docs: AsyncDocCollectionEntry<Name, Frontmatter, TC>[];
194
+ meta: MetaCollectionEntry<Meta>[];
195
+ toFumadocsSource: () => Source<{
196
+ pageData: AsyncDocCollectionEntry<Name, Frontmatter, TC>;
197
+ metaData: MetaCollectionEntry<Meta>;
198
+ }>;
199
+ }
200
+ type AwaitableGlobEntries<T> = Record<string, T | (() => Promise<T>)>;
201
+ type ServerCreate<Config, TC extends InternalTypeConfig = InternalTypeConfig> = ReturnType<typeof server<Config, TC>>;
202
+ interface ServerOptions {
203
+ doc?: {
204
+ passthroughs?: string[];
205
+ };
206
+ }
207
+ declare function server<Config, TC extends InternalTypeConfig>(options?: ServerOptions): {
208
+ doc<Name extends keyof Config & string>(_name: Name, base: string, glob: AwaitableGlobEntries<unknown>): Promise<Config[Name] extends DocCollection<infer Schema extends StandardSchemaV1<unknown, unknown>> | DocsCollection<infer Schema extends StandardSchemaV1<unknown, unknown>, StandardSchemaV1<unknown, unknown>> ? DocCollectionEntry<Name, StandardSchemaV1.InferOutput<Schema>, TC>[] : never>;
209
+ docLazy<Name extends keyof Config & string>(_name: Name, base: string, head: AwaitableGlobEntries<unknown>, body: Record<string, () => Promise<unknown>>): Promise<Config[Name] extends DocCollection<infer Schema extends StandardSchemaV1<unknown, unknown>> | DocsCollection<infer Schema extends StandardSchemaV1<unknown, unknown>, StandardSchemaV1<unknown, unknown>> ? AsyncDocCollectionEntry<Name, StandardSchemaV1.InferOutput<Schema>, TC>[] : never>;
210
+ meta<Name extends keyof Config & string>(_name: Name, base: string, glob: AwaitableGlobEntries<unknown>): Promise<Config[Name] extends MetaCollection<infer Schema extends StandardSchemaV1<unknown, unknown>> | DocsCollection<StandardSchemaV1<unknown, unknown>, infer Schema extends StandardSchemaV1<unknown, unknown>> ? MetaCollectionEntry<StandardSchemaV1.InferOutput<Schema>>[] : never>;
211
+ docs<Name extends keyof Config & string>(name: Name, base: string, metaGlob: AwaitableGlobEntries<unknown>, docGlob: AwaitableGlobEntries<unknown>): Promise<Config[Name] extends DocsCollection<infer Page extends StandardSchemaV1<unknown, unknown>, infer Meta extends StandardSchemaV1<unknown, unknown>> ? StandardSchemaV1.InferOutput<Page> extends PageData ? StandardSchemaV1.InferOutput<Meta> extends MetaData ? DocsCollectionEntry<Name, StandardSchemaV1.InferOutput<Page>, StandardSchemaV1.InferOutput<Meta>, TC> : never : never : never>;
212
+ docsLazy<Name extends keyof Config & string>(name: Name, base: string, metaGlob: AwaitableGlobEntries<unknown>, docHeadGlob: AwaitableGlobEntries<unknown>, docBodyGlob: Record<string, () => Promise<unknown>>): Promise<Config[Name] extends DocsCollection<infer Page extends StandardSchemaV1<unknown, unknown>, infer Meta extends StandardSchemaV1<unknown, unknown>> ? StandardSchemaV1.InferOutput<Page> extends PageData ? StandardSchemaV1.InferOutput<Meta> extends MetaData ? AsyncDocsCollectionEntry<Name, StandardSchemaV1.InferOutput<Page>, StandardSchemaV1.InferOutput<Meta>, TC> : never : never : never>;
213
+ };
214
+ declare function toFumadocsSource<Page extends DocMethods & PageData, Meta extends MetaMethods & MetaData>(pages: Page[], metas: Meta[]): Source<{
215
+ pageData: Page;
216
+ metaData: Meta;
217
+ }>;
218
+
219
+ interface IndexFilePluginOptions {
220
+ target?: 'default' | 'vite';
221
+ /**
222
+ * add `.js` extensions to imports, needed for ESM without bundler resolution
223
+ */
224
+ addJsExtension?: boolean;
225
+ /**
226
+ * Generate entry point for browser
227
+ * @defaultValue true
228
+ */
229
+ browser?: boolean;
230
+ /**
231
+ * Generate entry point for dynamic compilation
232
+ * @defaultValue true
233
+ */
234
+ dynamic?: boolean;
235
+ }
236
+ interface IndexFilePlugin {
237
+ ['index-file']?: {
238
+ generateTypeConfig?: (this: PluginContext) => string | void;
239
+ serverOptions?: (this: PluginContext, options: ServerOptions) => void;
240
+ };
241
+ }
242
+ declare function indexFile(options?: IndexFilePluginOptions): Plugin;
243
+
177
244
  type Awaitable<T> = T | Promise<T>;
178
245
  interface EmitEntry {
179
246
  /**
@@ -191,7 +258,7 @@ interface TransformOptions<Collection> {
191
258
  filePath: string;
192
259
  source: string;
193
260
  }
194
- interface Plugin {
261
+ interface Plugin extends IndexFilePlugin {
195
262
  name?: string;
196
263
  /**
197
264
  * on config loaded/updated
@@ -247,19 +314,21 @@ declare const _Defaults: {
247
314
  outDir: string;
248
315
  };
249
316
  declare function createCore(options: CoreOptions, defaultPlugins?: PluginOption[]): {
250
- _options: CoreOptions;
251
317
  /**
252
318
  * Convenient cache store, reset when config changes
253
319
  */
254
320
  cache: Map<string, unknown>;
255
321
  init({ config: newConfig }: {
256
322
  config: Awaitable<LoadedConfig>;
257
- }): Promise</*elided*/ any>;
323
+ }): Promise<void>;
324
+ getOptions(): CoreOptions;
258
325
  getConfig(): LoadedConfig;
259
326
  /**
260
327
  * The file path of compiled config file, the file may not exist (e.g. on Vite, or still compiling)
261
328
  */
262
329
  getCompiledConfigPath(): string;
330
+ getPlugins(): Plugin[];
331
+ getPluginContext(): PluginContext;
263
332
  initServer(server: ServerContext): Promise<void>;
264
333
  emit({ filterPlugin }?: EmitOptions): Promise<EmitEntry[]>;
265
334
  emitAndWrite(emitOptions?: EmitOptions): Promise<void>;
@@ -269,4 +338,4 @@ declare function createCore(options: CoreOptions, defaultPlugins?: PluginOption[
269
338
  };
270
339
  type Core = ReturnType<typeof createCore>;
271
340
 
272
- export { type AnyCollection as A, type BaseCollection as B, type CoreOptions as C, type DocCollection as D, type ExtractedReference as E, type GlobalConfig as G, type MetaCollection as M, type PostprocessOptions as P, type ServerContext as S, type TransformOptions as T, _Defaults as _, type CollectionSchema as a, type DocsCollection as b, defineDocs as c, defineCollections as d, defineConfig as e, type DefaultMDXOptions as f, type MDXPresetOptions as g, applyMdxPreset as h, frontmatterSchema as i, type Plugin as j, type EmitEntry as k, type PluginContext as l, metaSchema as m, type CompilationContext as n, type PluginOption as o, type EmitOptions as p, createCore as q, type Core as r };
341
+ export { type AnyCollection as A, type BaseCollection as B, type CoreOptions as C, type DocCollection as D, type ExtractedReference as E, toFumadocsSource as F, type GlobalConfig as G, indexFile as H, type IndexFilePluginOptions as I, type IndexFilePlugin as J, type MetaCollection as M, type PostprocessOptions as P, type ServerOptions as S, type TransformOptions as T, _Defaults as _, type CollectionSchema as a, type DocsCollection as b, defineDocs as c, defineCollections as d, defineConfig as e, type DefaultMDXOptions as f, type MDXPresetOptions as g, applyMdxPreset as h, frontmatterSchema as i, type Plugin as j, type AsyncDocCollectionEntry as k, type AsyncDocsCollectionEntry as l, metaSchema as m, type EmitEntry as n, type PluginContext as o, type CompilationContext as p, type PluginOption as q, type ServerContext as r, type EmitOptions as s, createCore as t, type Core as u, type MetaCollectionEntry as v, type DocCollectionEntry as w, type DocsCollectionEntry as x, type ServerCreate as y, server as z };
@@ -1,4 +1,4 @@
1
- import { C as CoreOptions } from './index-D7JdSMpp.js';
1
+ import { C as CoreOptions } from './core-C3QZSdEx.js';
2
2
 
3
3
  interface WebpackLoaderOptions extends CoreOptions {
4
4
  compiledConfigPath: string;
package/dist/index.d.ts CHANGED
@@ -1,8 +1,61 @@
1
- export { n as CompilationContext, r as Core, C as CoreOptions, k as EmitEntry, p as EmitOptions, E as ExtractedReference, j as Plugin, l as PluginContext, o as PluginOption, S as ServerContext, T as TransformOptions, _ as _Defaults, q as createCore } from './index-D7JdSMpp.js';
2
- import '@mdx-js/mdx';
1
+ export { p as CompilationContext, u as Core, C 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-C3QZSdEx.js';
2
+ import { createProcessor } from '@mdx-js/mdx';
3
+ import { StructuredData } from 'fumadocs-core/mdx-plugins';
4
+ import { TOCItemType } from 'fumadocs-core/toc';
5
+ import { FC } from 'react';
6
+ import { MDXProps } from 'mdx/types';
3
7
  import '@standard-schema/spec';
4
8
  import 'unified';
5
- import 'fumadocs-core/mdx-plugins';
6
9
  import 'zod';
7
10
  import 'chokidar';
8
11
  import 'vfile';
12
+ import 'fumadocs-core/source';
13
+ import './runtime/types.js';
14
+ import 'fumadocs-core/mdx-plugins/remark-structure';
15
+ import 'mdast';
16
+
17
+ type Processor = ReturnType<typeof createProcessor>;
18
+ interface CompilerOptions {
19
+ addDependency: (file: string) => void;
20
+ }
21
+ interface CompiledMDXProperties<Frontmatter = Record<string, unknown>> {
22
+ frontmatter: Frontmatter;
23
+ structuredData: StructuredData;
24
+ toc: TOCItemType[];
25
+ default: FC<MDXProps>;
26
+ /**
27
+ * Enable from `postprocess` option.
28
+ */
29
+ _markdown?: string;
30
+ /**
31
+ * Enable from `postprocess` option.
32
+ */
33
+ _mdast?: string;
34
+ }
35
+ interface FumadocsDataMap {
36
+ /**
37
+ * [Fumadocs MDX] raw frontmatter, you can modify it
38
+ */
39
+ frontmatter?: Record<string, unknown>;
40
+ /**
41
+ * [Fumadocs MDX] additional ESM exports to write
42
+ */
43
+ 'mdx-export'?: {
44
+ name: string;
45
+ value: unknown;
46
+ }[];
47
+ /**
48
+ * [Fumadocs MDX] The compiler object from loader
49
+ */
50
+ _compiler?: CompilerOptions;
51
+ /**
52
+ * [Fumadocs MDX] get internal processor, do not use this on user land.
53
+ */
54
+ _getProcessor?: (format: 'md' | 'mdx') => Processor;
55
+ }
56
+ declare module 'vfile' {
57
+ interface DataMap extends FumadocsDataMap {
58
+ }
59
+ }
60
+
61
+ export type { CompiledMDXProperties };
@@ -0,0 +1,8 @@
1
+ import {
2
+ loadConfig
3
+ } from "./chunk-LPX7ZO66.js";
4
+ import "./chunk-6RPNS75C.js";
5
+ import "./chunk-S7KOJHHO.js";
6
+ export {
7
+ loadConfig
8
+ };