fumadocs-mdx 11.10.1 → 12.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 +126 -218
- package/dist/bin.js +1 -1
- package/dist/{browser-B2G8uAF2.d.cts → browser-D5lvL8vv.d.ts} +51 -4
- package/dist/{browser-DrH7tKRi.d.ts → browser-DjWADqp8.d.cts} +51 -4
- package/dist/bun/index.cjs +274 -230
- package/dist/bun/index.js +8 -8
- package/dist/chunk-ADR6R7HM.js +29 -0
- package/dist/{chunk-UOOPSLFY.js → chunk-AUOOMFAI.js} +27 -21
- package/dist/chunk-FSZMKRVH.js +80 -0
- package/dist/{chunk-766EAFX6.js → chunk-LGYVNESJ.js} +2 -36
- package/dist/chunk-LMG6UWCL.js +167 -0
- package/dist/chunk-QAUWMR5D.js +142 -0
- package/dist/{chunk-QJCCVMBJ.js → chunk-SP7CHRTS.js} +17 -47
- package/dist/{chunk-QVZ7JH4H.js → chunk-U4MQ44TS.js} +1 -1
- package/dist/{chunk-CNKI574E.js → chunk-VXEBLM4X.js} +1 -1
- package/dist/chunk-XMFLD5J6.js +30 -0
- package/dist/chunk-ZLCSVXCD.js +10 -0
- package/dist/{chunk-XXSKWWMB.js → chunk-ZX7TM4AR.js} +4 -2
- package/dist/config/index.cjs +97 -148
- package/dist/config/index.d.cts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +48 -9
- package/dist/{define-BH4bnHQl.d.ts → define--6HQ1ehX.d.cts} +18 -3
- package/dist/{define-BH4bnHQl.d.cts → define--6HQ1ehX.d.ts} +18 -3
- package/dist/load-UUXLUBHL.js +9 -0
- package/dist/loader-mdx.cjs +336 -305
- package/dist/loader-mdx.js +8 -8
- package/dist/next/index.cjs +152 -242
- package/dist/next/index.js +52 -66
- package/dist/node/loader.cjs +274 -243
- package/dist/node/loader.js +7 -8
- package/dist/postinstall-SCSXM4IM.js +10 -0
- package/dist/{mdx-options-T73E4LQB.js → preset-ZMP6U62C.js} +1 -1
- package/dist/runtime/next/async.cjs +304 -204
- package/dist/runtime/next/async.d.cts +3 -3
- package/dist/runtime/next/async.d.ts +3 -3
- package/dist/runtime/next/async.js +59 -32
- package/dist/runtime/next/index.cjs +32 -21
- package/dist/runtime/next/index.d.cts +11 -7
- package/dist/runtime/next/index.d.ts +11 -7
- package/dist/runtime/next/index.js +2 -1
- package/dist/runtime/vite/browser.d.cts +2 -3
- package/dist/runtime/vite/browser.d.ts +2 -3
- package/dist/runtime/vite/server.cjs +67 -21
- package/dist/runtime/vite/server.d.cts +14 -28
- package/dist/runtime/vite/server.d.ts +14 -28
- package/dist/runtime/vite/server.js +61 -21
- package/dist/shared-0QIuV0XZ.d.ts +70 -0
- package/dist/shared-CqgMnt9h.d.cts +70 -0
- package/dist/{types-DN9KrG7R.d.ts → types-CFlQxTN8.d.ts} +10 -37
- package/dist/{types-DT83Ijs6.d.cts → types-DkGjw-Uo.d.cts} +10 -37
- package/dist/vite/index.cjs +299 -279
- package/dist/vite/index.d.cts +1 -0
- package/dist/vite/index.d.ts +1 -0
- package/dist/vite/index.js +15 -20
- package/dist/{watcher-4NDMOH4R.js → watcher-HGOH3APP.js} +1 -1
- package/package.json +16 -16
- package/dist/build-mdx-DnC1jKvn.d.cts +0 -46
- package/dist/build-mdx-DnC1jKvn.d.ts +0 -46
- package/dist/chunk-GBMFGEC7.js +0 -57
- package/dist/chunk-QQWCBFFE.js +0 -40
- package/dist/chunk-SMSNZ6N5.js +0 -155
- package/dist/chunk-SVTXMVLQ.js +0 -139
- package/dist/config/zod-3.cjs +0 -422
- package/dist/config/zod-3.d.cts +0 -53
- package/dist/config/zod-3.d.ts +0 -53
- package/dist/config/zod-3.js +0 -40
- package/dist/postinstall-XV4WSHZP.js +0 -9
|
@@ -1,8 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { createProcessor } from '@mdx-js/mdx';
|
|
2
|
+
import { StructuredData } from 'fumadocs-core/mdx-plugins';
|
|
3
|
+
import { TableOfContents } from 'fumadocs-core/server';
|
|
4
|
+
import { FC, ReactNode } from 'react';
|
|
5
|
+
import { MDXProps } from 'mdx/types';
|
|
6
|
+
import { E as ExtractedReference, a as DocCollection, b as DocsCollection, M as MetaCollection } from './define--6HQ1ehX.cjs';
|
|
4
7
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
5
8
|
|
|
9
|
+
type Processor = ReturnType<typeof createProcessor>;
|
|
10
|
+
interface CompilerOptions {
|
|
11
|
+
addDependency: (file: string) => void;
|
|
12
|
+
}
|
|
13
|
+
interface CompiledMDXProperties<Frontmatter = Record<string, unknown>> {
|
|
14
|
+
frontmatter: Frontmatter;
|
|
15
|
+
structuredData: StructuredData;
|
|
16
|
+
toc: TableOfContents;
|
|
17
|
+
default: FC<MDXProps>;
|
|
18
|
+
/**
|
|
19
|
+
* Only available when `lastModifiedTime` is enabled on MDX loader
|
|
20
|
+
*/
|
|
21
|
+
lastModified?: Date;
|
|
22
|
+
extractedReferences?: ExtractedReference[];
|
|
23
|
+
_markdown?: string;
|
|
24
|
+
}
|
|
25
|
+
interface FumadocsDataMap {
|
|
26
|
+
/**
|
|
27
|
+
* [Fumadocs MDX] raw frontmatter, you can modify it
|
|
28
|
+
*/
|
|
29
|
+
frontmatter?: Record<string, unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* [Fumadocs MDX] additional ESM exports to write
|
|
32
|
+
*/
|
|
33
|
+
'mdx-export'?: {
|
|
34
|
+
name: string;
|
|
35
|
+
value: unknown;
|
|
36
|
+
}[];
|
|
37
|
+
extractedReferences: ExtractedReference[];
|
|
38
|
+
/**
|
|
39
|
+
* [Fumadocs MDX] The compiler object from loader
|
|
40
|
+
*/
|
|
41
|
+
_compiler?: CompilerOptions;
|
|
42
|
+
_getProcessor?: (format: 'md' | 'mdx') => Processor;
|
|
43
|
+
/**
|
|
44
|
+
* [Fumadocs MDX] Processed Markdown content before `remark-rehype`.
|
|
45
|
+
*/
|
|
46
|
+
_markdown?: string;
|
|
47
|
+
}
|
|
48
|
+
declare module 'vfile' {
|
|
49
|
+
interface DataMap extends FumadocsDataMap {
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
6
53
|
type CompiledMDXFile<Frontmatter> = CompiledMDXProperties<Frontmatter> & Record<string, unknown>;
|
|
7
54
|
type DocMap<Frontmatter> = Record<string, (() => Promise<CompiledMDXFile<Frontmatter>>) & {
|
|
8
55
|
base: string;
|
|
@@ -48,4 +95,4 @@ interface ClientLoader<Frontmatter, Props> {
|
|
|
48
95
|
declare function createClientLoader<Frontmatter, Props = object>(files: Record<string, () => Promise<CompiledMDXFile<Frontmatter>>>, options: ClientLoaderOptions<Frontmatter, Props>): ClientLoader<Frontmatter, Props>;
|
|
49
96
|
declare function toClientRenderer<Frontmatter, Props = object>(files: Record<string, () => Promise<CompiledMDXFile<Frontmatter>>>, component: (loaded: CompiledMDXFile<Frontmatter>, props: Props) => ReactNode): ClientRenderer<Props>;
|
|
50
97
|
|
|
51
|
-
export { type BaseCreate as B, type
|
|
98
|
+
export { type BaseCreate as B, type ClientLoader as C, type DocMap as D, type LazyDocMap as L, type MetaMap as M, type ClientLoaderOptions as a, type CompiledMDXFile as b, createClientLoader as c, fromConfigBase as f, toClientRenderer as t };
|