fumadocs-mdx 15.4.0 → 15.4.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/bun/index.d.ts +5 -6
- package/dist/config/index.d.ts +2 -2
- package/dist/{core-ZgBVAQdE.d.ts → core-b6wXL1QY.d.ts} +43 -1
- package/dist/{index-BMgfRjXO.d.ts → index-BQOS0ghC.d.ts} +2 -2
- package/dist/{index-CCzEIOob.d.ts → index-BpgSE-Hl.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/macro/index.d.ts +11 -11
- package/dist/next/index.d.ts +5 -6
- package/dist/node/_loader.d.ts +3 -4
- package/dist/node/index.d.ts +4 -5
- package/dist/node/loader.d.ts +2 -3
- package/dist/plugins/index-file.d.ts +1 -1
- package/dist/plugins/json-schema.d.ts +4 -5
- package/dist/plugins/last-modified.d.ts +4 -5
- package/dist/rolldown/index.d.ts +4 -5
- package/dist/runtime/browser.d.ts +8 -9
- package/dist/runtime/dynamic.d.ts +7 -8
- package/dist/runtime/macro.d.ts +15 -16
- package/dist/runtime/server.d.ts +11 -12
- package/dist/vite/index.d.ts +8 -9
- package/dist/webpack/macro.d.ts +1 -1
- package/dist/webpack/mdx.d.ts +1 -1
- package/dist/webpack/meta.d.ts +1 -1
- package/package.json +16 -15
package/dist/bun/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as CoreOptions } from "../core-
|
|
1
|
+
import { r as CoreOptions } from "../core-b6wXL1QY.js";
|
|
2
2
|
import { n as ResolvedMacroOptions, t as MacroPluginOption } from "../options-aB6xV-d7.js";
|
|
3
3
|
import { BunPlugin } from "bun";
|
|
4
4
|
//#region src/bun/index.d.ts
|
|
5
|
-
interface MdxPluginOptions extends Pick<CoreOptions, 'configPath' | 'outDir' | 'plugins'> {
|
|
5
|
+
export interface MdxPluginOptions extends Pick<CoreOptions, 'configPath' | 'outDir' | 'plugins'> {
|
|
6
6
|
/**
|
|
7
7
|
* Configure the macro API (`fumadocs-mdx/macro`), or `false` to disable it.
|
|
8
8
|
*/
|
|
@@ -15,7 +15,6 @@ interface MdxPluginOptions extends Pick<CoreOptions, 'configPath' | 'outDir' | '
|
|
|
15
15
|
/**
|
|
16
16
|
* @internal
|
|
17
17
|
*/
|
|
18
|
-
declare function macroFilter(root: string, { include, exclude }: ResolvedMacroOptions): RegExp;
|
|
19
|
-
declare function createMdxPlugin(options?: MdxPluginOptions): BunPlugin;
|
|
20
|
-
//#endregion
|
|
21
|
-
export { MdxPluginOptions, createMdxPlugin, macroFilter };
|
|
18
|
+
export declare function macroFilter(root: string, { include, exclude }: ResolvedMacroOptions): RegExp;
|
|
19
|
+
export declare function createMdxPlugin(options?: MdxPluginOptions): BunPlugin;
|
|
20
|
+
//#endregion
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as DocsCollection, D as defineCollections, E as SatteriPresetOptions, F as DefaultMDXOptions, I as MDXPresetOptions, L as applyMdxPreset, O as defineConfig, P as PostprocessOptions, S as DocCollectionSatteri, T as MetaCollection, _ as BaseCollection, b as DocCollectionBase, g as AnyCollection, k as defineDocs, v as CollectionSchema, w as GlobalConfig, x as DocCollectionMdx, y as DocCollection } from "../core-
|
|
2
|
-
import { n as metaSchema, r as remarkInclude, t as frontmatterSchema } from "../index-
|
|
1
|
+
import { C as DocsCollection, D as defineCollections, E as SatteriPresetOptions, F as DefaultMDXOptions, I as MDXPresetOptions, L as applyMdxPreset, O as defineConfig, P as PostprocessOptions, S as DocCollectionSatteri, T as MetaCollection, _ as BaseCollection, b as DocCollectionBase, g as AnyCollection, k as defineDocs, v as CollectionSchema, w as GlobalConfig, x as DocCollectionMdx, y as DocCollection } from "../core-b6wXL1QY.js";
|
|
2
|
+
import { n as metaSchema, r as remarkInclude, t as frontmatterSchema } from "../index-BQOS0ghC.js";
|
|
3
3
|
export { AnyCollection, BaseCollection, CollectionSchema, DefaultMDXOptions, DocCollection, DocCollectionBase, DocCollectionMdx, DocCollectionSatteri, DocsCollection, GlobalConfig, MDXPresetOptions, MetaCollection, type PostprocessOptions, type SatteriPresetOptions, applyMdxPreset, defineCollections, defineConfig, defineDocs, frontmatterSchema, metaSchema, remarkInclude };
|
|
@@ -434,7 +434,49 @@ declare function createCore(options: CoreOptions): {
|
|
|
434
434
|
init({ config: newConfig }: {
|
|
435
435
|
config: Awaitable<LoadedConfig>;
|
|
436
436
|
}): Promise<void>;
|
|
437
|
-
getWorkspaces(): Map<string,
|
|
437
|
+
getWorkspaces(): Map<string, {
|
|
438
|
+
/**
|
|
439
|
+
* Convenient cache store, reset when config changes
|
|
440
|
+
*/
|
|
441
|
+
cache: Map<string, unknown>;
|
|
442
|
+
/**
|
|
443
|
+
* Collects the collections declared with `fumadocs-mdx/macro`.
|
|
444
|
+
*
|
|
445
|
+
* Assigned by the bundler adapter when the macro API is enabled, so that every loader of a
|
|
446
|
+
* build shares one collector (and hence one evaluation of each macro module).
|
|
447
|
+
*/
|
|
448
|
+
macro: MacroCollector | undefined;
|
|
449
|
+
/** absolute path */
|
|
450
|
+
readonly outDir: string;
|
|
451
|
+
/** absolute path */
|
|
452
|
+
readonly root: string;
|
|
453
|
+
/** absolute path */
|
|
454
|
+
readonly configPath: string;
|
|
455
|
+
readonly workspace: {
|
|
456
|
+
parent: Core;
|
|
457
|
+
name: string;
|
|
458
|
+
dir: string;
|
|
459
|
+
} | undefined;
|
|
460
|
+
readonly environment: string;
|
|
461
|
+
init({ config: newConfig }: {
|
|
462
|
+
config: Awaitable<LoadedConfig>;
|
|
463
|
+
}): Promise<void>;
|
|
464
|
+
getWorkspaces(): Map<string, /*elided*/ any>;
|
|
465
|
+
getConfig(): LoadedConfig;
|
|
466
|
+
/**
|
|
467
|
+
* The file path of compiled config file, the file may not exist (e.g. on Vite, or still compiling)
|
|
468
|
+
*/
|
|
469
|
+
getCompiledConfigPath(): string;
|
|
470
|
+
getPlugins(): Plugin[];
|
|
471
|
+
getCollections(): CollectionItem[];
|
|
472
|
+
getCollection(name: string): CollectionItem | undefined;
|
|
473
|
+
getPluginContext(): PluginContext;
|
|
474
|
+
initServer(server: ServerContext): Promise<void>;
|
|
475
|
+
emit(emitOptions?: EmitOptions): Promise<EmitOutput>;
|
|
476
|
+
transformMeta(options: TransformOptions<MetaCollectionItem>, data: unknown): Promise<unknown>;
|
|
477
|
+
transformFrontmatter(options: TransformOptions<DocCollectionItem>, data: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
478
|
+
transformVFile(options: TransformOptions<DocCollectionItem>, file: VFile): Promise<VFile>;
|
|
479
|
+
}>;
|
|
438
480
|
getConfig(): LoadedConfig;
|
|
439
481
|
/**
|
|
440
482
|
* The file path of compiled config file, the file may not exist (e.g. on Vite, or still compiling)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./core-
|
|
1
|
+
import "./core-b6wXL1QY.js";
|
|
2
2
|
import { Processor, Transformer } from "unified";
|
|
3
3
|
import { Root } from "mdast";
|
|
4
4
|
//#region src/loaders/mdx/remark-include.d.ts
|
|
@@ -19,7 +19,7 @@ declare const metaSchema: import("zod").ZodObject<{
|
|
|
19
19
|
pages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
20
20
|
pagesIndex: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
21
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
|
-
root: import("zod").ZodOptional<import("zod").ZodBoolean
|
|
22
|
+
root: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodBoolean, import("zod").ZodString]>>;
|
|
23
23
|
defaultOpen: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
24
24
|
collapsible: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
25
25
|
icon: import("zod").ZodOptional<import("zod").ZodString>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { N as ExtractedReference, a as EmitOptions, c as PluginContext, d as TransformOptions, i as EmitEntry, j as CompiledMDXProperties, l as PluginOption, n as Core, o as EmitOutput, r as CoreOptions, s as Plugin, t as CompilationContext, u as ServerContext } from "./core-
|
|
1
|
+
import { N as ExtractedReference, a as EmitOptions, c as PluginContext, d as TransformOptions, i as EmitEntry, j as CompiledMDXProperties, l as PluginOption, n as Core, o as EmitOutput, r as CoreOptions, s as Plugin, t as CompilationContext, u as ServerContext } from "./core-b6wXL1QY.js";
|
|
2
2
|
export type { CompilationContext, CompiledMDXProperties, Core, CoreOptions, EmitEntry, EmitOptions, EmitOutput, ExtractedReference, Plugin, PluginContext, PluginOption, ServerContext, TransformOptions };
|
package/dist/macro/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as SatteriOptionsInput, N as ExtractedReference, P as PostprocessOptions, h as BuildEnvironment, v as CollectionSchema } from "../core-
|
|
1
|
+
import { A as SatteriOptionsInput, N as ExtractedReference, P as PostprocessOptions, h as BuildEnvironment, v as CollectionSchema } from "../core-b6wXL1QY.js";
|
|
2
2
|
import { MacroAsyncDocCollection, MacroAsyncDocsCollection, MacroDocCollection, MacroDocsCollection, MacroMetaCollection } from "../runtime/macro.js";
|
|
3
3
|
import { metaSchema, pageSchema } from "fumadocs-core/source/schema";
|
|
4
4
|
import { MetaData, PageData } from "fumadocs-core/source";
|
|
5
5
|
import { ProcessorOptions } from "@mdx-js/mdx";
|
|
6
6
|
import { StandardJSONSchemaV1, StandardSchemaV1 } from "@standard-schema/spec";
|
|
7
7
|
//#region src/macro/index.d.ts
|
|
8
|
-
interface MacroSchemaContext {
|
|
8
|
+
export interface MacroSchemaContext {
|
|
9
9
|
path: string;
|
|
10
10
|
source: string;
|
|
11
11
|
}
|
|
@@ -19,7 +19,7 @@ type GetExtras<T extends DocMacroFlags> = (T['lastModified'] extends true ? {
|
|
|
19
19
|
} : unknown) & {
|
|
20
20
|
extractedReferences?: ExtractedReference[];
|
|
21
21
|
};
|
|
22
|
-
interface DocMacroOptions<T extends DocMacroFlags = DocMacroFlags> {
|
|
22
|
+
export interface DocMacroOptions<T extends DocMacroFlags = DocMacroFlags> {
|
|
23
23
|
/**
|
|
24
24
|
* Patterns of content files (relative to `dir`).
|
|
25
25
|
*
|
|
@@ -49,7 +49,7 @@ interface DocMacroOptions<T extends DocMacroFlags = DocMacroFlags> {
|
|
|
49
49
|
/** include last modified date in collection entries */
|
|
50
50
|
lastModified?: T['lastModified'];
|
|
51
51
|
}
|
|
52
|
-
interface MetaMacroOptions<Schema extends StandardSchemaV1 = StandardSchemaV1> {
|
|
52
|
+
export interface MetaMacroOptions<Schema extends StandardSchemaV1 = StandardSchemaV1> {
|
|
53
53
|
/**
|
|
54
54
|
* Patterns of meta files (relative to `dir`).
|
|
55
55
|
*
|
|
@@ -58,7 +58,7 @@ interface MetaMacroOptions<Schema extends StandardSchemaV1 = StandardSchemaV1> {
|
|
|
58
58
|
files?: string[];
|
|
59
59
|
schema?: CollectionSchema<Schema, MacroSchemaContext>;
|
|
60
60
|
}
|
|
61
|
-
interface DefineDocsOptions<T extends DocMacroFlags = DocMacroFlags, MetaSchema extends StandardSchemaV1 = StandardSchemaV1> {
|
|
61
|
+
export interface DefineDocsOptions<T extends DocMacroFlags = DocMacroFlags, MetaSchema extends StandardSchemaV1 = StandardSchemaV1> {
|
|
62
62
|
/**
|
|
63
63
|
* Directory of content files, relative to project root.
|
|
64
64
|
*
|
|
@@ -70,7 +70,7 @@ interface DefineDocsOptions<T extends DocMacroFlags = DocMacroFlags, MetaSchema
|
|
|
70
70
|
docs?: DocMacroOptions<T>;
|
|
71
71
|
meta?: MetaMacroOptions<MetaSchema>;
|
|
72
72
|
}
|
|
73
|
-
interface DefineDocCollectionsOptions<T extends DocMacroFlags = DocMacroFlags> extends DocMacroOptions<T> {
|
|
73
|
+
export interface DefineDocCollectionsOptions<T extends DocMacroFlags = DocMacroFlags> extends DocMacroOptions<T> {
|
|
74
74
|
type: 'doc';
|
|
75
75
|
/**
|
|
76
76
|
* Directory of content files, relative to project root.
|
|
@@ -79,7 +79,7 @@ interface DefineDocCollectionsOptions<T extends DocMacroFlags = DocMacroFlags> e
|
|
|
79
79
|
*/
|
|
80
80
|
dir: string;
|
|
81
81
|
}
|
|
82
|
-
interface DefineMetaCollectionsOptions<MetaSchema extends StandardSchemaV1 = StandardSchemaV1> extends MetaMacroOptions<MetaSchema> {
|
|
82
|
+
export interface DefineMetaCollectionsOptions<MetaSchema extends StandardSchemaV1 = StandardSchemaV1> extends MetaMacroOptions<MetaSchema> {
|
|
83
83
|
type: 'meta';
|
|
84
84
|
/**
|
|
85
85
|
* Directory of meta files, relative to project root.
|
|
@@ -93,7 +93,7 @@ interface DefineMetaCollectionsOptions<MetaSchema extends StandardSchemaV1 = Sta
|
|
|
93
93
|
*
|
|
94
94
|
* Requires the `include` option on your bundler plugin.
|
|
95
95
|
*/
|
|
96
|
-
declare function defineDocs<DocSchema extends StandardSchemaV1 = typeof pageSchema, MetaSchema extends StandardSchemaV1 = typeof metaSchema, const Async extends boolean = false, const LastModified extends boolean = false>(options?: DefineDocsOptions<{
|
|
96
|
+
export declare function defineDocs<DocSchema extends StandardSchemaV1 = typeof pageSchema, MetaSchema extends StandardSchemaV1 = typeof metaSchema, const Async extends boolean = false, const LastModified extends boolean = false>(options?: DefineDocsOptions<{
|
|
97
97
|
schema: DocSchema;
|
|
98
98
|
async: Async;
|
|
99
99
|
lastModified: LastModified;
|
|
@@ -106,8 +106,8 @@ declare function defineDocs<DocSchema extends StandardSchemaV1 = typeof pageSche
|
|
|
106
106
|
async: Async;
|
|
107
107
|
lastModified: LastModified;
|
|
108
108
|
}>> : never : never;
|
|
109
|
-
declare function defineCollections<MetaSchema extends StandardSchemaV1 = StandardSchemaV1>(options: DefineMetaCollectionsOptions<MetaSchema>): MacroMetaCollection<StandardJSONSchemaV1.InferOutput<MetaSchema>>;
|
|
110
|
-
declare function defineCollections<DocSchema extends StandardSchemaV1 = StandardSchemaV1, const Async extends boolean = false, const LastModified extends boolean = false>(options: DefineDocCollectionsOptions<{
|
|
109
|
+
export declare function defineCollections<MetaSchema extends StandardSchemaV1 = StandardSchemaV1>(options: DefineMetaCollectionsOptions<MetaSchema>): MacroMetaCollection<StandardJSONSchemaV1.InferOutput<MetaSchema>>;
|
|
110
|
+
export declare function defineCollections<DocSchema extends StandardSchemaV1 = StandardSchemaV1, const Async extends boolean = false, const LastModified extends boolean = false>(options: DefineDocCollectionsOptions<{
|
|
111
111
|
schema: DocSchema;
|
|
112
112
|
async: Async;
|
|
113
113
|
lastModified: LastModified;
|
|
@@ -121,4 +121,4 @@ declare function defineCollections<DocSchema extends StandardSchemaV1 = Standard
|
|
|
121
121
|
lastModified: LastModified;
|
|
122
122
|
}>>;
|
|
123
123
|
//#endregion
|
|
124
|
-
export {
|
|
124
|
+
export type { ExtractedReference };
|
package/dist/next/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as IndexFilePluginOptions, r as CoreOptions } from "../core-
|
|
1
|
+
import { p as IndexFilePluginOptions, r as CoreOptions } from "../core-b6wXL1QY.js";
|
|
2
2
|
import { t as MacroPluginOption } from "../options-aB6xV-d7.js";
|
|
3
3
|
import { NextConfig } from "next";
|
|
4
4
|
//#region src/next/index.d.ts
|
|
5
|
-
interface CreateMDXOptions extends Pick<CoreOptions, 'configPath' | 'outDir'> {
|
|
5
|
+
export interface CreateMDXOptions extends Pick<CoreOptions, 'configPath' | 'outDir'> {
|
|
6
6
|
/**
|
|
7
7
|
* Configure the macro API (`fumadocs-mdx/macro`), or `false` to disable it.
|
|
8
8
|
*
|
|
@@ -11,7 +11,6 @@ interface CreateMDXOptions extends Pick<CoreOptions, 'configPath' | 'outDir'> {
|
|
|
11
11
|
macro?: MacroPluginOption;
|
|
12
12
|
index?: IndexFilePluginOptions | false;
|
|
13
13
|
}
|
|
14
|
-
declare function createMDX(options?: CreateMDXOptions): (nextConfig?: NextConfig) => NextConfig & PromiseLike<NextConfig>;
|
|
15
|
-
declare function postInstall(options?: CreateMDXOptions): Promise<void>;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { CreateMDXOptions, createMDX, postInstall };
|
|
14
|
+
export declare function createMDX(options?: CreateMDXOptions): (nextConfig?: NextConfig) => NextConfig & PromiseLike<NextConfig>;
|
|
15
|
+
export declare function postInstall(options?: CreateMDXOptions): Promise<void>;
|
|
16
|
+
//#endregion
|
package/dist/node/_loader.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { NodeLoaderOptions } from "./index.js";
|
|
2
2
|
import { InitializeHook, LoadHook } from "node:module";
|
|
3
3
|
//#region src/node/_loader.d.ts
|
|
4
|
-
declare const initialize: InitializeHook<NodeLoaderOptions>;
|
|
5
|
-
declare const load: LoadHook;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { initialize, load };
|
|
4
|
+
export declare const initialize: InitializeHook<NodeLoaderOptions>;
|
|
5
|
+
export declare const load: LoadHook;
|
|
6
|
+
//#endregion
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as CoreOptions } from "../core-
|
|
1
|
+
import { r as CoreOptions } from "../core-b6wXL1QY.js";
|
|
2
2
|
import { t as MacroPluginOption } from "../options-aB6xV-d7.js";
|
|
3
3
|
//#region src/node/index.d.ts
|
|
4
|
-
interface NodeLoaderOptions extends Pick<CoreOptions, 'configPath' | 'outDir' | 'plugins'> {
|
|
4
|
+
export interface NodeLoaderOptions extends Pick<CoreOptions, 'configPath' | 'outDir' | 'plugins'> {
|
|
5
5
|
/**
|
|
6
6
|
* Configure the macro API (`fumadocs-mdx/macro`), or `false` to disable it.
|
|
7
7
|
*
|
|
@@ -13,6 +13,5 @@ interface NodeLoaderOptions extends Pick<CoreOptions, 'configPath' | 'outDir' |
|
|
|
13
13
|
*/
|
|
14
14
|
disableMetaFile?: boolean;
|
|
15
15
|
}
|
|
16
|
-
declare function register(options?: NodeLoaderOptions): void;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { NodeLoaderOptions, register };
|
|
16
|
+
export declare function register(options?: NodeLoaderOptions): void;
|
|
17
|
+
//#endregion
|
package/dist/node/loader.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { f as IndexFilePlugin, m as indexFile, p as IndexFilePluginOptions } from "../core-
|
|
1
|
+
import { f as IndexFilePlugin, m as indexFile, p as IndexFilePluginOptions } from "../core-b6wXL1QY.js";
|
|
2
2
|
export { IndexFilePlugin, IndexFilePluginOptions, indexFile as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { s as Plugin } from "../core-
|
|
1
|
+
import { s as Plugin } from "../core-b6wXL1QY.js";
|
|
2
2
|
//#region src/plugins/json-schema.d.ts
|
|
3
|
-
interface JSONSchemaOptions {
|
|
3
|
+
export interface JSONSchemaOptions {
|
|
4
4
|
/**
|
|
5
5
|
* insert `$schema` field to JSON files on creation.
|
|
6
6
|
*
|
|
@@ -13,6 +13,5 @@ interface JSONSchemaOptions {
|
|
|
13
13
|
*
|
|
14
14
|
* note: **it only works with Zod**
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
export { JSONSchemaOptions, jsonSchema as default };
|
|
16
|
+
export default function jsonSchema({ insert }?: JSONSchemaOptions): Plugin;
|
|
17
|
+
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as LastModifiedFn, s as Plugin } from "../core-
|
|
1
|
+
import { M as LastModifiedFn, s as Plugin } from "../core-b6wXL1QY.js";
|
|
2
2
|
//#region src/plugins/last-modified.d.ts
|
|
3
|
-
interface LastModifiedPluginOptions {
|
|
3
|
+
export interface LastModifiedPluginOptions {
|
|
4
4
|
/**
|
|
5
5
|
* Version control to obtain the last modified time.
|
|
6
6
|
*
|
|
@@ -24,6 +24,5 @@ interface LastModifiedPluginOptions {
|
|
|
24
24
|
* This is a shorthand for setting `lastModified` on each collection, collections that set it
|
|
25
25
|
* themselves are left untouched.
|
|
26
26
|
*/
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
export { LastModifiedPluginOptions, lastModified as default };
|
|
27
|
+
export default function lastModified(options?: LastModifiedPluginOptions): Plugin;
|
|
28
|
+
//#endregion
|
package/dist/rolldown/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as CoreOptions } from "../core-
|
|
1
|
+
import { r as CoreOptions } from "../core-b6wXL1QY.js";
|
|
2
2
|
import { t as MacroPluginOption } from "../options-aB6xV-d7.js";
|
|
3
3
|
import { RolldownPlugin } from "rolldown";
|
|
4
4
|
//#region src/rolldown/index.d.ts
|
|
5
|
-
interface PluginOptions extends Pick<CoreOptions, 'configPath' | 'outDir' | 'plugins'> {
|
|
5
|
+
export interface PluginOptions extends Pick<CoreOptions, 'configPath' | 'outDir' | 'plugins'> {
|
|
6
6
|
/**
|
|
7
7
|
* Configure the macro API (`fumadocs-mdx/macro`), or `false` to disable it.
|
|
8
8
|
*
|
|
@@ -14,6 +14,5 @@ interface PluginOptions extends Pick<CoreOptions, 'configPath' | 'outDir' | 'plu
|
|
|
14
14
|
*/
|
|
15
15
|
dev?: boolean;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { PluginOptions, mdx as default };
|
|
17
|
+
export default function mdx(config?: Record<string, unknown> | Promise<Record<string, unknown>>, options?: PluginOptions): Promise<RolldownPlugin[]>;
|
|
18
|
+
//#endregion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { C as DocsCollection, j as CompiledMDXProperties, y as DocCollection } from "../core-
|
|
1
|
+
import { C as DocsCollection, j as CompiledMDXProperties, y as DocCollection } from "../core-b6wXL1QY.js";
|
|
2
2
|
import { a as InternalTypeConfig } from "../types-1n7Fk5Dl.js";
|
|
3
3
|
import { FC, ReactNode } from "react";
|
|
4
4
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
5
|
//#region src/runtime/browser.d.ts
|
|
6
6
|
type CompiledMDXFile<Name extends string, Frontmatter, TC extends InternalTypeConfig> = CompiledMDXProperties<Frontmatter> & TC['DocData'][Name] & Record<string, unknown>;
|
|
7
|
-
interface ClientLoaderOptions<Doc, Props> {
|
|
7
|
+
export interface ClientLoaderOptions<Doc, Props> {
|
|
8
8
|
/**
|
|
9
9
|
* Loader ID (usually your collection name)
|
|
10
10
|
*
|
|
@@ -17,7 +17,7 @@ interface ClientLoaderOptions<Doc, Props> {
|
|
|
17
17
|
id?: string;
|
|
18
18
|
component: (loaded: Doc, props: Props) => ReactNode;
|
|
19
19
|
}
|
|
20
|
-
interface ClientLoader<Doc, Props> {
|
|
20
|
+
export interface ClientLoader<Doc, Props> {
|
|
21
21
|
preload: (path: string) => Promise<Doc>;
|
|
22
22
|
/**
|
|
23
23
|
* Get a component that renders content with `use()`.
|
|
@@ -28,14 +28,13 @@ interface ClientLoader<Doc, Props> {
|
|
|
28
28
|
*/
|
|
29
29
|
useContent: undefined extends Props ? (path: string, props?: Props) => ReactNode : (path: string, props: Props) => ReactNode;
|
|
30
30
|
}
|
|
31
|
-
type BrowserCreate<Config, TC extends InternalTypeConfig> = ReturnType<typeof browser<Config, TC>>;
|
|
32
|
-
interface DocCollectionEntry<Name extends string = string, Frontmatter = unknown, TC extends InternalTypeConfig = InternalTypeConfig> {
|
|
31
|
+
export type BrowserCreate<Config, TC extends InternalTypeConfig> = ReturnType<typeof browser<Config, TC>>;
|
|
32
|
+
export interface DocCollectionEntry<Name extends string = string, Frontmatter = unknown, TC extends InternalTypeConfig = InternalTypeConfig> {
|
|
33
33
|
raw: Record<string, () => Promise<CompiledMDXFile<Name, Frontmatter, TC>>>;
|
|
34
34
|
createClientLoader: <Props extends object | undefined = undefined>(options: ClientLoaderOptions<CompiledMDXFile<Name, Frontmatter, TC>, Props>) => ClientLoader<CompiledMDXFile<Name, Frontmatter, TC>, Props>;
|
|
35
35
|
}
|
|
36
|
-
declare function browser<Config, TC extends InternalTypeConfig>(): {
|
|
36
|
+
export declare function browser<Config, TC extends InternalTypeConfig>(): {
|
|
37
37
|
doc<Name extends keyof Config & string>(_name: Name, glob: Record<string, () => Promise<unknown>>): Config[Name] extends DocCollection<infer Schema> | DocsCollection<infer Schema> ? DocCollectionEntry<Name, StandardSchemaV1.InferOutput<Schema>, TC> : never;
|
|
38
38
|
};
|
|
39
|
-
declare function createClientLoader<Doc = CompiledMDXProperties, Props extends object | undefined = undefined>(globEntries: Record<string, () => Promise<Doc>>, options: ClientLoaderOptions<Doc, Props>): ClientLoader<Doc, Props>;
|
|
40
|
-
//#endregion
|
|
41
|
-
export { BrowserCreate, ClientLoader, ClientLoaderOptions, DocCollectionEntry, browser, createClientLoader };
|
|
39
|
+
export declare function createClientLoader<Doc = CompiledMDXProperties, Props extends object | undefined = undefined>(globEntries: Record<string, () => Promise<Doc>>, options: ClientLoaderOptions<Doc, Props>): ClientLoader<Doc, Props>;
|
|
40
|
+
//#endregion
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { C as DocsCollection, r as CoreOptions, y as DocCollection } from "../core-
|
|
2
|
-
import "../index-
|
|
1
|
+
import { C as DocsCollection, r as CoreOptions, y as DocCollection } from "../core-b6wXL1QY.js";
|
|
2
|
+
import "../index-BQOS0ghC.js";
|
|
3
3
|
import { a as InternalTypeConfig, r as FileInfo } from "../types-1n7Fk5Dl.js";
|
|
4
4
|
import { AsyncDocCollectionEntry, AsyncDocsCollectionEntry } from "./server.js";
|
|
5
5
|
//#region src/runtime/dynamic.d.ts
|
|
6
|
-
interface LazyEntry<Data = unknown> {
|
|
6
|
+
export interface LazyEntry<Data = unknown> {
|
|
7
7
|
info: FileInfo;
|
|
8
8
|
data: Data;
|
|
9
9
|
hash?: string;
|
|
10
10
|
}
|
|
11
|
-
type CreateDynamic<Config, TC extends InternalTypeConfig = InternalTypeConfig> = ReturnType<typeof dynamic<Config, TC>>;
|
|
12
|
-
declare function dynamic<Config, TC extends InternalTypeConfig>(configExports: Config, coreOptions: CoreOptions): Promise<{
|
|
13
|
-
doc<Name extends keyof Config & string>(name: Name, base: string, entries: LazyEntry<unknown>[]): Promise<Config[Name] extends
|
|
11
|
+
export type CreateDynamic<Config, TC extends InternalTypeConfig = InternalTypeConfig> = ReturnType<typeof dynamic<Config, TC>>;
|
|
12
|
+
export declare function dynamic<Config, TC extends InternalTypeConfig>(configExports: Config, coreOptions: CoreOptions): Promise<{
|
|
13
|
+
doc<Name extends keyof Config & string>(name: Name, base: string, entries: LazyEntry<unknown>[]): Promise<Config[Name] extends DocsCollection<infer Schema extends import("@standard-schema/spec").StandardSchemaV1<unknown, unknown>, import("@standard-schema/spec").StandardSchemaV1<unknown, unknown>> | DocCollection<infer Schema extends import("@standard-schema/spec").StandardSchemaV1<unknown, unknown>> ? AsyncDocCollectionEntry<Name, import("@standard-schema/spec").StandardSchemaV1.InferOutput<Schema>, TC>[] : never>;
|
|
14
14
|
docs<Name extends keyof Config & string>(name: Name, base: string, meta: Record<string, unknown>, entries: LazyEntry<unknown>[]): Promise<Config[Name] extends DocsCollection<infer Page extends import("@standard-schema/spec").StandardSchemaV1<unknown, unknown>, infer Meta extends import("@standard-schema/spec").StandardSchemaV1<unknown, unknown>> ? import("@standard-schema/spec").StandardSchemaV1.InferOutput<Page> extends import("fumadocs-core/source").PageData ? import("@standard-schema/spec").StandardSchemaV1.InferOutput<Meta> extends import("fumadocs-core/source").MetaData ? AsyncDocsCollectionEntry<Name, import("@standard-schema/spec").StandardSchemaV1.InferOutput<Page>, import("@standard-schema/spec").StandardSchemaV1.InferOutput<Meta>, TC> : never : never : never>;
|
|
15
15
|
}>;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { CreateDynamic, LazyEntry, dynamic };
|
|
16
|
+
//#endregion
|
package/dist/runtime/macro.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { MetaData, PageData, Source } from "fumadocs-core/source";
|
|
|
3
3
|
import { MDXContent } from "mdx/types";
|
|
4
4
|
import { StructuredData } from "fumadocs-core/mdx-plugins/remark-structure";
|
|
5
5
|
//#region src/runtime/macro.d.ts
|
|
6
|
-
interface BrowserDocMethods {
|
|
6
|
+
export interface BrowserDocMethods {
|
|
7
7
|
/**
|
|
8
8
|
* Preload the content, so it can be rendered synchronously afterwards.
|
|
9
9
|
*
|
|
@@ -13,8 +13,8 @@ interface BrowserDocMethods {
|
|
|
13
13
|
*/
|
|
14
14
|
preload: () => Promise<void>;
|
|
15
15
|
}
|
|
16
|
-
type MacroDocEntry<Frontmatter = unknown, Extra = unknown> = DocData & DocMethods & BrowserDocMethods & Frontmatter & Extra;
|
|
17
|
-
type MacroAsyncDocEntry<Frontmatter = unknown, Extra = unknown> = {
|
|
16
|
+
export type MacroDocEntry<Frontmatter = unknown, Extra = unknown> = DocData & DocMethods & BrowserDocMethods & Frontmatter & Extra;
|
|
17
|
+
export type MacroAsyncDocEntry<Frontmatter = unknown, Extra = unknown> = {
|
|
18
18
|
/**
|
|
19
19
|
* Load the compiled content.
|
|
20
20
|
*
|
|
@@ -29,8 +29,8 @@ type MacroAsyncDocEntry<Frontmatter = unknown, Extra = unknown> = {
|
|
|
29
29
|
*/
|
|
30
30
|
body: MDXContent;
|
|
31
31
|
} & DocMethods & BrowserDocMethods & Frontmatter;
|
|
32
|
-
type MacroMetaEntry<Data = unknown> = MetaMethods & Data;
|
|
33
|
-
interface MacroDocCollection<Frontmatter = unknown, Extra = unknown> {
|
|
32
|
+
export type MacroMetaEntry<Data = unknown> = MetaMethods & Data;
|
|
33
|
+
export interface MacroDocCollection<Frontmatter = unknown, Extra = unknown> {
|
|
34
34
|
entries: MacroDocEntry<Frontmatter, Extra>[];
|
|
35
35
|
/**
|
|
36
36
|
* get an entry by its file path (relative to collection directory)
|
|
@@ -41,7 +41,7 @@ interface MacroDocCollection<Frontmatter = unknown, Extra = unknown> {
|
|
|
41
41
|
metaData: MetaData;
|
|
42
42
|
}>;
|
|
43
43
|
}
|
|
44
|
-
interface MacroAsyncDocCollection<Frontmatter = unknown, Extra = unknown> {
|
|
44
|
+
export interface MacroAsyncDocCollection<Frontmatter = unknown, Extra = unknown> {
|
|
45
45
|
entries: MacroAsyncDocEntry<Frontmatter, Extra>[];
|
|
46
46
|
/**
|
|
47
47
|
* get an entry by its file path (relative to collection directory)
|
|
@@ -52,7 +52,7 @@ interface MacroAsyncDocCollection<Frontmatter = unknown, Extra = unknown> {
|
|
|
52
52
|
metaData: MetaData;
|
|
53
53
|
}>;
|
|
54
54
|
}
|
|
55
|
-
interface MacroMetaCollection<Data = unknown> {
|
|
55
|
+
export interface MacroMetaCollection<Data = unknown> {
|
|
56
56
|
entries: MacroMetaEntry<Data>[];
|
|
57
57
|
/**
|
|
58
58
|
* get an entry by its file path (relative to collection directory)
|
|
@@ -63,7 +63,7 @@ interface ToFumadocsSourceOptions {
|
|
|
63
63
|
/** base directory for virtual file paths */
|
|
64
64
|
baseDir?: string;
|
|
65
65
|
}
|
|
66
|
-
interface MacroDocsCollection<Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, Extra = unknown> {
|
|
66
|
+
export interface MacroDocsCollection<Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, Extra = unknown> {
|
|
67
67
|
docs: MacroDocEntry<Frontmatter, Extra>[];
|
|
68
68
|
meta: MacroMetaEntry<Meta>[];
|
|
69
69
|
getPage: (path: string) => MacroDocEntry<Frontmatter, Extra> | undefined;
|
|
@@ -73,7 +73,7 @@ interface MacroDocsCollection<Frontmatter extends PageData = PageData, Meta exte
|
|
|
73
73
|
metaData: MacroMetaEntry<Meta>;
|
|
74
74
|
}>;
|
|
75
75
|
}
|
|
76
|
-
interface MacroAsyncDocsCollection<Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, Extra = unknown> {
|
|
76
|
+
export interface MacroAsyncDocsCollection<Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, Extra = unknown> {
|
|
77
77
|
docs: MacroAsyncDocEntry<Frontmatter, Extra>[];
|
|
78
78
|
meta: MacroMetaEntry<Meta>[];
|
|
79
79
|
getPage: (path: string) => MacroAsyncDocEntry<Frontmatter, Extra> | undefined;
|
|
@@ -88,24 +88,23 @@ type LazyGlobEntries = Record<string, () => Promise<unknown>>;
|
|
|
88
88
|
interface BaseArgs {
|
|
89
89
|
base: string;
|
|
90
90
|
}
|
|
91
|
-
declare function doc(args: BaseArgs & {
|
|
91
|
+
export declare function doc(args: BaseArgs & {
|
|
92
92
|
entries: GlobEntries;
|
|
93
93
|
}): Promise<MacroDocCollection>;
|
|
94
|
-
declare function docAsync(args: BaseArgs & {
|
|
94
|
+
export declare function docAsync(args: BaseArgs & {
|
|
95
95
|
head: GlobEntries;
|
|
96
96
|
body: LazyGlobEntries;
|
|
97
97
|
}): Promise<MacroAsyncDocCollection>;
|
|
98
|
-
declare function meta(args: BaseArgs & {
|
|
98
|
+
export declare function meta(args: BaseArgs & {
|
|
99
99
|
entries: GlobEntries;
|
|
100
100
|
}): Promise<MacroMetaCollection>;
|
|
101
|
-
declare function docs(args: BaseArgs & {
|
|
101
|
+
export declare function docs(args: BaseArgs & {
|
|
102
102
|
entries: GlobEntries;
|
|
103
103
|
meta: GlobEntries;
|
|
104
104
|
}): Promise<MacroDocsCollection>;
|
|
105
|
-
declare function docsAsync(args: BaseArgs & {
|
|
105
|
+
export declare function docsAsync(args: BaseArgs & {
|
|
106
106
|
head: GlobEntries;
|
|
107
107
|
body: LazyGlobEntries;
|
|
108
108
|
meta: GlobEntries;
|
|
109
109
|
}): Promise<MacroAsyncDocsCollection>;
|
|
110
|
-
//#endregion
|
|
111
|
-
export { BrowserDocMethods, MacroAsyncDocCollection, MacroAsyncDocEntry, MacroAsyncDocsCollection, MacroDocCollection, MacroDocEntry, MacroDocsCollection, MacroMetaCollection, MacroMetaEntry, doc, docAsync, docs, docsAsync, meta };
|
|
110
|
+
//#endregion
|
package/dist/runtime/server.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { C as DocsCollection, T as MetaCollection, y as DocCollection } from "../core-
|
|
2
|
-
import "../index-
|
|
1
|
+
import { C as DocsCollection, T as MetaCollection, y as DocCollection } from "../core-b6wXL1QY.js";
|
|
2
|
+
import "../index-BQOS0ghC.js";
|
|
3
3
|
import { a as InternalTypeConfig, n as DocMethods, o as MetaMethods, t as DocData } from "../types-1n7Fk5Dl.js";
|
|
4
4
|
import { MetaData, PageData, Source } from "fumadocs-core/source";
|
|
5
5
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
6
6
|
import { StructuredData } from "fumadocs-core/mdx-plugins/remark-structure";
|
|
7
7
|
//#region src/runtime/server.d.ts
|
|
8
|
-
type MetaCollectionEntry<Data> = Data & MetaMethods;
|
|
9
|
-
type DocCollectionEntry<Name extends string = string, Frontmatter = unknown, TC extends InternalTypeConfig = InternalTypeConfig> = DocData & DocMethods & Frontmatter & TC['DocData'][Name];
|
|
8
|
+
export type MetaCollectionEntry<Data> = Data & MetaMethods;
|
|
9
|
+
export type DocCollectionEntry<Name extends string = string, Frontmatter = unknown, TC extends InternalTypeConfig = InternalTypeConfig> = DocData & DocMethods & Frontmatter & TC['DocData'][Name];
|
|
10
10
|
interface ToFumadocsSourceOptions {
|
|
11
11
|
/** base directory for virtual file paths */
|
|
12
12
|
baseDir?: string;
|
|
13
13
|
}
|
|
14
|
-
type AsyncDocCollectionEntry<Name extends string = string, Frontmatter = unknown, TC extends InternalTypeConfig = InternalTypeConfig> = {
|
|
14
|
+
export type AsyncDocCollectionEntry<Name extends string = string, Frontmatter = unknown, TC extends InternalTypeConfig = InternalTypeConfig> = {
|
|
15
15
|
load: () => Promise<DocData & TC['DocData'][Name]>;
|
|
16
16
|
structuredData: () => Promise<StructuredData>;
|
|
17
17
|
} & DocMethods & Frontmatter;
|
|
18
|
-
interface DocsCollectionEntry<Name extends string = string, Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, TC extends InternalTypeConfig = InternalTypeConfig> {
|
|
18
|
+
export interface DocsCollectionEntry<Name extends string = string, Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, TC extends InternalTypeConfig = InternalTypeConfig> {
|
|
19
19
|
docs: DocCollectionEntry<Name, Frontmatter, TC>[];
|
|
20
20
|
meta: MetaCollectionEntry<Meta>[];
|
|
21
21
|
toFumadocsSource: (options?: ToFumadocsSourceOptions) => Source<{
|
|
@@ -23,7 +23,7 @@ interface DocsCollectionEntry<Name extends string = string, Frontmatter extends
|
|
|
23
23
|
metaData: MetaCollectionEntry<Meta>;
|
|
24
24
|
}>;
|
|
25
25
|
}
|
|
26
|
-
interface AsyncDocsCollectionEntry<Name extends string = string, Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, TC extends InternalTypeConfig = InternalTypeConfig> {
|
|
26
|
+
export interface AsyncDocsCollectionEntry<Name extends string = string, Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, TC extends InternalTypeConfig = InternalTypeConfig> {
|
|
27
27
|
docs: AsyncDocCollectionEntry<Name, Frontmatter, TC>[];
|
|
28
28
|
meta: MetaCollectionEntry<Meta>[];
|
|
29
29
|
toFumadocsSource: (options?: ToFumadocsSourceOptions) => Source<{
|
|
@@ -32,17 +32,16 @@ interface AsyncDocsCollectionEntry<Name extends string = string, Frontmatter ext
|
|
|
32
32
|
}>;
|
|
33
33
|
}
|
|
34
34
|
type AwaitableGlobEntries<T> = Record<string, T | (() => Promise<T>)>;
|
|
35
|
-
type ServerCreate<Config, TC extends InternalTypeConfig = InternalTypeConfig> = ReturnType<typeof server<Config, TC>>;
|
|
36
|
-
declare function server<Config, TC extends InternalTypeConfig>(): {
|
|
35
|
+
export type ServerCreate<Config, TC extends InternalTypeConfig = InternalTypeConfig> = ReturnType<typeof server<Config, TC>>;
|
|
36
|
+
export declare function server<Config, TC extends InternalTypeConfig>(): {
|
|
37
37
|
doc<Name extends keyof Config & string>(_name: Name, base: string, glob: AwaitableGlobEntries<unknown>): Promise<Config[Name] extends DocCollection<infer Schema> | DocsCollection<infer Schema> ? DocCollectionEntry<Name, StandardSchemaV1.InferOutput<Schema>, TC>[] : never>;
|
|
38
38
|
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> | DocsCollection<infer Schema> ? AsyncDocCollectionEntry<Name, StandardSchemaV1.InferOutput<Schema>, TC>[] : never>;
|
|
39
39
|
meta<Name extends keyof Config & string>(_name: Name, base: string, glob: AwaitableGlobEntries<unknown>): Promise<Config[Name] extends MetaCollection<infer Schema> | DocsCollection<StandardSchemaV1, infer Schema> ? MetaCollectionEntry<StandardSchemaV1.InferOutput<Schema>>[] : never>;
|
|
40
40
|
docs<Name extends keyof Config & string>(name: Name, base: string, metaGlob: AwaitableGlobEntries<unknown>, docGlob: AwaitableGlobEntries<unknown>): Promise<Config[Name] extends DocsCollection<infer Page, infer Meta> ? StandardSchemaV1.InferOutput<Page> extends PageData ? StandardSchemaV1.InferOutput<Meta> extends MetaData ? DocsCollectionEntry<Name, StandardSchemaV1.InferOutput<Page>, StandardSchemaV1.InferOutput<Meta>, TC> : never : never : never>;
|
|
41
41
|
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, infer Meta> ? StandardSchemaV1.InferOutput<Page> extends PageData ? StandardSchemaV1.InferOutput<Meta> extends MetaData ? AsyncDocsCollectionEntry<Name, StandardSchemaV1.InferOutput<Page>, StandardSchemaV1.InferOutput<Meta>, TC> : never : never : never>;
|
|
42
42
|
};
|
|
43
|
-
declare function toFumadocsSource<Page extends DocMethods & PageData, Meta extends MetaMethods & MetaData>(pages: Page[], metas: Meta[], options?: ToFumadocsSourceOptions): Source<{
|
|
43
|
+
export declare function toFumadocsSource<Page extends DocMethods & PageData, Meta extends MetaMethods & MetaData>(pages: Page[], metas: Meta[], options?: ToFumadocsSourceOptions): Source<{
|
|
44
44
|
pageData: Page;
|
|
45
45
|
metaData: Meta;
|
|
46
46
|
}>;
|
|
47
|
-
//#endregion
|
|
48
|
-
export { AsyncDocCollectionEntry, AsyncDocsCollectionEntry, DocCollectionEntry, DocsCollectionEntry, MetaCollectionEntry, ServerCreate, server, toFumadocsSource };
|
|
47
|
+
//#endregion
|
package/dist/vite/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as IndexFilePluginOptions, r as CoreOptions, w as GlobalConfig } from "../core-
|
|
1
|
+
import { p as IndexFilePluginOptions, r as CoreOptions, w as GlobalConfig } from "../core-b6wXL1QY.js";
|
|
2
2
|
import { t as MacroPluginOption } from "../options-aB6xV-d7.js";
|
|
3
|
-
import "../index-
|
|
3
|
+
import "../index-BQOS0ghC.js";
|
|
4
4
|
import { Plugin } from "vite";
|
|
5
5
|
//#region src/vite/index.d.ts
|
|
6
|
-
interface PluginOptions extends Pick<CoreOptions, 'configPath' | 'outDir' | 'plugins'> {
|
|
6
|
+
export interface PluginOptions extends Pick<CoreOptions, 'configPath' | 'outDir' | 'plugins'> {
|
|
7
7
|
/**
|
|
8
8
|
* Configure the macro API (`fumadocs-mdx/macro`), or `false` to disable it.
|
|
9
9
|
*
|
|
@@ -26,12 +26,11 @@ interface PluginOptions extends Pick<CoreOptions, 'configPath' | 'outDir' | 'plu
|
|
|
26
26
|
/** extra global options, will be shallow-merged if another global config is specified in the main config file. */
|
|
27
27
|
globalOptions?: GlobalConfig;
|
|
28
28
|
}
|
|
29
|
-
interface FumadocsMdxOptions extends PluginOptions {
|
|
29
|
+
export interface FumadocsMdxOptions extends PluginOptions {
|
|
30
30
|
/** force a config module object instead of importing from config path. */
|
|
31
31
|
forcedConfig?: Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
32
32
|
}
|
|
33
|
-
declare function fumadocsMdx(options?: FumadocsMdxOptions): Plugin<any>[];
|
|
34
|
-
|
|
35
|
-
declare function postInstall(pluginOptions?: PluginOptions): Promise<void>;
|
|
36
|
-
//#endregion
|
|
37
|
-
export { FumadocsMdxOptions, PluginOptions, mdx as default, fumadocsMdx, postInstall };
|
|
33
|
+
export declare function fumadocsMdx(options?: FumadocsMdxOptions): Plugin<any>[];
|
|
34
|
+
export default function mdx(forcedConfig?: Record<string, unknown> | Promise<Record<string, unknown>> | undefined, pluginOptions?: PluginOptions): Plugin[];
|
|
35
|
+
export declare function postInstall(pluginOptions?: PluginOptions): Promise<void>;
|
|
36
|
+
//#endregion
|
package/dist/webpack/macro.d.ts
CHANGED
package/dist/webpack/mdx.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as WebpackLoaderOptions } from "../index-
|
|
1
|
+
import { t as WebpackLoaderOptions } from "../index-BpgSE-Hl.js";
|
|
2
2
|
import { LoaderDefinitionFunction } from "webpack";
|
|
3
3
|
//#region src/webpack/mdx.d.ts
|
|
4
4
|
declare const loader: LoaderDefinitionFunction<WebpackLoaderOptions>;
|
package/dist/webpack/meta.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as WebpackLoaderOptions } from "../index-
|
|
1
|
+
import { t as WebpackLoaderOptions } from "../index-BpgSE-Hl.js";
|
|
2
2
|
import { LoaderDefinitionFunction } from "webpack";
|
|
3
3
|
//#region src/webpack/meta.d.ts
|
|
4
4
|
declare const loader: LoaderDefinitionFunction<WebpackLoaderOptions>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-mdx",
|
|
3
|
-
"version": "15.4.
|
|
3
|
+
"version": "15.4.1",
|
|
4
4
|
"description": "The built-in source for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"bin.js"
|
|
25
25
|
],
|
|
26
26
|
"type": "module",
|
|
27
|
+
"sideEffects": false,
|
|
27
28
|
"exports": {
|
|
28
29
|
".": "./dist/index.js",
|
|
29
30
|
"./bin": "./dist/bin.js",
|
|
@@ -59,42 +60,42 @@
|
|
|
59
60
|
"esbuild": "^0.28.2",
|
|
60
61
|
"estree-util-value-to-estree": "^3.5.0",
|
|
61
62
|
"github-slugger": "^2.0.0",
|
|
62
|
-
"magic-string": "^1.2.
|
|
63
|
+
"magic-string": "^1.2.3",
|
|
63
64
|
"mdast-util-mdx": "^3.0.0",
|
|
64
65
|
"picocolors": "^1.1.1",
|
|
65
66
|
"picomatch": "^4.0.7",
|
|
66
|
-
"tinyexec": "^1.3.
|
|
67
|
+
"tinyexec": "^1.3.1",
|
|
67
68
|
"tinyglobby": "^0.2.17",
|
|
68
69
|
"unified": "^11.0.5",
|
|
69
70
|
"unist-util-remove-position": "^5.0.0",
|
|
70
71
|
"unist-util-visit": "^5.1.0",
|
|
71
72
|
"vfile": "^6.0.3",
|
|
72
73
|
"yaml": "^2.9.0",
|
|
73
|
-
"yuku-analyzer": "^0.9.
|
|
74
|
-
"zod": "^4.4
|
|
74
|
+
"yuku-analyzer": "^0.9.5",
|
|
75
|
+
"zod": "^4.5.4"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
77
|
-
"@types/bun": "^1.4.
|
|
78
|
+
"@types/bun": "^1.4.2",
|
|
78
79
|
"@types/mdast": "^4.0.4",
|
|
79
80
|
"@types/mdx": "^2.0.14",
|
|
80
|
-
"@types/node": "^26.
|
|
81
|
+
"@types/node": "^26.5.0",
|
|
81
82
|
"@types/picomatch": "^4.0.3",
|
|
82
83
|
"@types/react": "^19.2.18",
|
|
83
84
|
"mdast-util-directive": "^3.1.0",
|
|
84
|
-
"next": "^16.3.
|
|
85
|
+
"next": "^16.3.4",
|
|
85
86
|
"react": "^19.2.8",
|
|
86
87
|
"remark": "^15.0.1",
|
|
87
88
|
"remark-directive": "^4.0.0",
|
|
88
89
|
"remark-mdx": "^3.1.1",
|
|
89
|
-
"rolldown": "^1.2.
|
|
90
|
+
"rolldown": "^1.2.7",
|
|
90
91
|
"satteri": "^0.10.5",
|
|
91
|
-
"tsdown": "0.
|
|
92
|
+
"tsdown": "0.23.0",
|
|
92
93
|
"vite": "^8.2.2",
|
|
93
|
-
"webpack": "^5.
|
|
94
|
-
"@fumadocs/satteri": "0.5.
|
|
95
|
-
"fumadocs
|
|
96
|
-
"
|
|
97
|
-
"
|
|
94
|
+
"webpack": "^5.110.3",
|
|
95
|
+
"@fumadocs/satteri": "0.5.1",
|
|
96
|
+
"@fumadocs/vite": "0.1.0",
|
|
97
|
+
"fumadocs-core": "16.15.11",
|
|
98
|
+
"tsconfig": "0.0.0"
|
|
98
99
|
},
|
|
99
100
|
"peerDependencies": {
|
|
100
101
|
"@fumadocs/satteri": "0.x.x",
|