fumadocs-mdx 11.9.0 → 11.10.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/{runtime/vite.d.ts → browser-B2G8uAF2.d.cts} +9 -35
- package/dist/{runtime/vite.d.cts → browser-DrH7tKRi.d.ts} +9 -35
- package/dist/bun/index.cjs +667 -0
- package/dist/bun/index.d.cts +8 -0
- package/dist/bun/index.d.ts +8 -0
- package/dist/bun/index.js +50 -0
- package/dist/{chunk-766EAFX6.js → chunk-2HKRTQYP.js} +64 -0
- package/dist/chunk-46UPKP5R.js +77 -0
- package/dist/chunk-5XJM5RPV.js +149 -0
- package/dist/chunk-NVX3U5YE.js +82 -0
- package/dist/config/index.d.cts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/zod-3.d.cts +1 -1
- package/dist/config/zod-3.d.ts +1 -1
- package/dist/{define-DnJzAZrj.d.ts → define-BH4bnHQl.d.cts} +6 -0
- package/dist/{define-DnJzAZrj.d.cts → define-BH4bnHQl.d.ts} +6 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/loader-mdx.cjs +345 -265
- package/dist/loader-mdx.js +11 -80
- package/dist/next/index.js +4 -6
- package/dist/node/loader.cjs +748 -0
- package/dist/node/loader.d.cts +5 -0
- package/dist/node/loader.d.ts +5 -0
- package/dist/node/loader.js +23 -0
- package/dist/runtime/async.d.cts +2 -2
- package/dist/runtime/async.d.ts +2 -2
- package/dist/runtime/vite/browser.cjs +103 -0
- package/dist/runtime/vite/browser.d.cts +11 -0
- package/dist/runtime/vite/browser.d.ts +11 -0
- package/dist/runtime/vite/browser.js +10 -0
- package/dist/runtime/{vite.cjs → vite/server.cjs} +77 -63
- package/dist/runtime/vite/server.d.cts +41 -0
- package/dist/runtime/vite/server.d.ts +41 -0
- package/dist/runtime/{vite.js → vite/server.js} +10 -64
- package/dist/{types-WSHJKA8L.d.ts → types-DN9KrG7R.d.ts} +1 -1
- package/dist/{types-BmVgoqsr.d.cts → types-DT83Ijs6.d.cts} +1 -1
- package/dist/vite/index.cjs +356 -282
- package/dist/vite/index.js +12 -78
- package/package.json +21 -11
- package/dist/chunk-GX3THK2Q.js +0 -66
- package/dist/chunk-UCY7OBZG.js +0 -12
|
@@ -1,30 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as DocCollection, b as DocsCollection, M as MetaCollection } from '
|
|
1
|
+
import { C as CompiledMDXProperties } from './build-mdx-DnC1jKvn.cjs';
|
|
2
|
+
import { ReactNode, FC } from 'react';
|
|
3
|
+
import { a as DocCollection, b as DocsCollection, M as MetaCollection } from './define-BH4bnHQl.cjs';
|
|
4
4
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
5
|
-
import { PageData, MetaData, Source } from 'fumadocs-core/source';
|
|
6
|
-
import { C as CompiledMDXProperties } from '../build-mdx-DnC1jKvn.js';
|
|
7
|
-
import 'fumadocs-core/mdx-plugins';
|
|
8
|
-
import '@mdx-js/mdx';
|
|
9
|
-
import 'unified';
|
|
10
|
-
import 'zod';
|
|
11
|
-
import 'fumadocs-core/server';
|
|
12
5
|
|
|
13
6
|
type CompiledMDXFile<Frontmatter> = CompiledMDXProperties<Frontmatter> & Record<string, unknown>;
|
|
14
|
-
type Override<A, B> = Omit<A, keyof B> & B;
|
|
15
|
-
type MDXFileToPageData<Frontmatter> = Override<Omit<CompiledMDXProperties<Frontmatter>, 'frontmatter' | 'default'>, Frontmatter & {
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated use `body` instead.
|
|
18
|
-
*/
|
|
19
|
-
default: FC<MDXProps>;
|
|
20
|
-
_exports: Record<string, unknown>;
|
|
21
|
-
body: FC<MDXProps>;
|
|
22
|
-
}>;
|
|
23
|
-
type MDXFileToPageDataLazy<Frontmatter> = Override<Frontmatter, {
|
|
24
|
-
load: () => Promise<Omit<CompiledMDXFile<Frontmatter>, 'default'> & {
|
|
25
|
-
body: FC<MDXProps>;
|
|
26
|
-
}>;
|
|
27
|
-
}>;
|
|
28
7
|
type DocMap<Frontmatter> = Record<string, (() => Promise<CompiledMDXFile<Frontmatter>>) & {
|
|
29
8
|
base: string;
|
|
30
9
|
}>;
|
|
@@ -36,19 +15,14 @@ interface LazyDocMap<Frontmatter> {
|
|
|
36
15
|
head: Record<string, () => Promise<Frontmatter>>;
|
|
37
16
|
body: Record<string, () => Promise<CompiledMDXFile<Frontmatter>>>;
|
|
38
17
|
}
|
|
39
|
-
|
|
18
|
+
|
|
19
|
+
interface BaseCreate<Config> {
|
|
40
20
|
doc: <Name extends keyof Config>(name: Name, base: string, glob: Record<string, () => Promise<unknown>>) => Config[Name] extends DocCollection<infer Schema> | DocsCollection<infer Schema> ? DocMap<StandardSchemaV1.InferOutput<Schema>> : never;
|
|
41
21
|
docLazy: <Name extends keyof Config>(name: Name, base: string, headGlob: Record<string, () => Promise<unknown>>, bodyGlob: Record<string, () => Promise<unknown>>) => Config[Name] extends DocCollection<infer Schema> | DocsCollection<infer Schema> ? LazyDocMap<StandardSchemaV1.InferOutput<Schema>> : never;
|
|
42
22
|
meta: <Name extends keyof Config>(name: Name, base: string, glob: Record<string, () => Promise<unknown>>) => Config[Name] extends MetaCollection<infer Schema> | DocsCollection<StandardSchemaV1, infer Schema> ? MetaMap<StandardSchemaV1.InferOutput<Schema>> : never;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}>>;
|
|
47
|
-
sourceLazy: <DocOut extends PageData, MetaOut extends MetaData>(doc: LazyDocMap<DocOut>, meta: MetaMap<MetaOut>) => Promise<Source<{
|
|
48
|
-
pageData: MDXFileToPageDataLazy<DocOut>;
|
|
49
|
-
metaData: MetaOut;
|
|
50
|
-
}>>;
|
|
51
|
-
};
|
|
23
|
+
}
|
|
24
|
+
declare function fromConfigBase<Config>(): BaseCreate<Config>;
|
|
25
|
+
|
|
52
26
|
interface ClientLoaderOptions<Frontmatter, Props> {
|
|
53
27
|
/**
|
|
54
28
|
* Loader ID (usually your collection name)
|
|
@@ -74,4 +48,4 @@ interface ClientLoader<Frontmatter, Props> {
|
|
|
74
48
|
declare function createClientLoader<Frontmatter, Props = object>(files: Record<string, () => Promise<CompiledMDXFile<Frontmatter>>>, options: ClientLoaderOptions<Frontmatter, Props>): ClientLoader<Frontmatter, Props>;
|
|
75
49
|
declare function toClientRenderer<Frontmatter, Props = object>(files: Record<string, () => Promise<CompiledMDXFile<Frontmatter>>>, component: (loaded: CompiledMDXFile<Frontmatter>, props: Props) => ReactNode): ClientRenderer<Props>;
|
|
76
50
|
|
|
77
|
-
export { type
|
|
51
|
+
export { type BaseCreate as B, type CompiledMDXFile as C, type DocMap as D, type LazyDocMap as L, type MetaMap as M, type ClientLoader as a, type ClientLoaderOptions as b, createClientLoader as c, fromConfigBase as f, toClientRenderer as t };
|
|
@@ -1,30 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as DocCollection, b as DocsCollection, M as MetaCollection } from '
|
|
1
|
+
import { C as CompiledMDXProperties } from './build-mdx-DnC1jKvn.js';
|
|
2
|
+
import { ReactNode, FC } from 'react';
|
|
3
|
+
import { a as DocCollection, b as DocsCollection, M as MetaCollection } from './define-BH4bnHQl.js';
|
|
4
4
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
5
|
-
import { PageData, MetaData, Source } from 'fumadocs-core/source';
|
|
6
|
-
import { C as CompiledMDXProperties } from '../build-mdx-DnC1jKvn.cjs';
|
|
7
|
-
import 'fumadocs-core/mdx-plugins';
|
|
8
|
-
import '@mdx-js/mdx';
|
|
9
|
-
import 'unified';
|
|
10
|
-
import 'zod';
|
|
11
|
-
import 'fumadocs-core/server';
|
|
12
5
|
|
|
13
6
|
type CompiledMDXFile<Frontmatter> = CompiledMDXProperties<Frontmatter> & Record<string, unknown>;
|
|
14
|
-
type Override<A, B> = Omit<A, keyof B> & B;
|
|
15
|
-
type MDXFileToPageData<Frontmatter> = Override<Omit<CompiledMDXProperties<Frontmatter>, 'frontmatter' | 'default'>, Frontmatter & {
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated use `body` instead.
|
|
18
|
-
*/
|
|
19
|
-
default: FC<MDXProps>;
|
|
20
|
-
_exports: Record<string, unknown>;
|
|
21
|
-
body: FC<MDXProps>;
|
|
22
|
-
}>;
|
|
23
|
-
type MDXFileToPageDataLazy<Frontmatter> = Override<Frontmatter, {
|
|
24
|
-
load: () => Promise<Omit<CompiledMDXFile<Frontmatter>, 'default'> & {
|
|
25
|
-
body: FC<MDXProps>;
|
|
26
|
-
}>;
|
|
27
|
-
}>;
|
|
28
7
|
type DocMap<Frontmatter> = Record<string, (() => Promise<CompiledMDXFile<Frontmatter>>) & {
|
|
29
8
|
base: string;
|
|
30
9
|
}>;
|
|
@@ -36,19 +15,14 @@ interface LazyDocMap<Frontmatter> {
|
|
|
36
15
|
head: Record<string, () => Promise<Frontmatter>>;
|
|
37
16
|
body: Record<string, () => Promise<CompiledMDXFile<Frontmatter>>>;
|
|
38
17
|
}
|
|
39
|
-
|
|
18
|
+
|
|
19
|
+
interface BaseCreate<Config> {
|
|
40
20
|
doc: <Name extends keyof Config>(name: Name, base: string, glob: Record<string, () => Promise<unknown>>) => Config[Name] extends DocCollection<infer Schema> | DocsCollection<infer Schema> ? DocMap<StandardSchemaV1.InferOutput<Schema>> : never;
|
|
41
21
|
docLazy: <Name extends keyof Config>(name: Name, base: string, headGlob: Record<string, () => Promise<unknown>>, bodyGlob: Record<string, () => Promise<unknown>>) => Config[Name] extends DocCollection<infer Schema> | DocsCollection<infer Schema> ? LazyDocMap<StandardSchemaV1.InferOutput<Schema>> : never;
|
|
42
22
|
meta: <Name extends keyof Config>(name: Name, base: string, glob: Record<string, () => Promise<unknown>>) => Config[Name] extends MetaCollection<infer Schema> | DocsCollection<StandardSchemaV1, infer Schema> ? MetaMap<StandardSchemaV1.InferOutput<Schema>> : never;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}>>;
|
|
47
|
-
sourceLazy: <DocOut extends PageData, MetaOut extends MetaData>(doc: LazyDocMap<DocOut>, meta: MetaMap<MetaOut>) => Promise<Source<{
|
|
48
|
-
pageData: MDXFileToPageDataLazy<DocOut>;
|
|
49
|
-
metaData: MetaOut;
|
|
50
|
-
}>>;
|
|
51
|
-
};
|
|
23
|
+
}
|
|
24
|
+
declare function fromConfigBase<Config>(): BaseCreate<Config>;
|
|
25
|
+
|
|
52
26
|
interface ClientLoaderOptions<Frontmatter, Props> {
|
|
53
27
|
/**
|
|
54
28
|
* Loader ID (usually your collection name)
|
|
@@ -74,4 +48,4 @@ interface ClientLoader<Frontmatter, Props> {
|
|
|
74
48
|
declare function createClientLoader<Frontmatter, Props = object>(files: Record<string, () => Promise<CompiledMDXFile<Frontmatter>>>, options: ClientLoaderOptions<Frontmatter, Props>): ClientLoader<Frontmatter, Props>;
|
|
75
49
|
declare function toClientRenderer<Frontmatter, Props = object>(files: Record<string, () => Promise<CompiledMDXFile<Frontmatter>>>, component: (loaded: CompiledMDXFile<Frontmatter>, props: Props) => ReactNode): ClientRenderer<Props>;
|
|
76
50
|
|
|
77
|
-
export { type
|
|
51
|
+
export { type BaseCreate as B, type CompiledMDXFile as C, type DocMap as D, type LazyDocMap as L, type MetaMap as M, type ClientLoader as a, type ClientLoaderOptions as b, createClientLoader as c, fromConfigBase as f, toClientRenderer as t };
|