fumadocs-mdx 15.0.4 → 15.0.5
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/bin.js +0 -0
- package/dist/bin.js +0 -0
- package/dist/bun/index.d.ts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/{core-DAna8bb8.d.ts → core-DM-l-bvr.d.ts} +7 -3
- package/dist/index.d.ts +1 -1
- package/dist/next/index.d.ts +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/plugins/index-file.d.ts +1 -1
- package/dist/plugins/json-schema.d.ts +1 -1
- package/dist/plugins/last-modified.d.ts +1 -1
- package/dist/runtime/browser.d.ts +1 -1
- package/dist/runtime/dynamic.d.ts +1 -1
- package/dist/runtime/server.d.ts +1 -1
- package/dist/runtime/server.js +8 -7
- package/dist/vite/index.d.ts +1 -1
- package/package.json +3 -3
package/bin.js
CHANGED
|
File without changes
|
package/dist/bin.js
CHANGED
|
File without changes
|
package/dist/bun/index.d.ts
CHANGED
package/dist/config/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as DocCollection, B as MDXPresetOptions, D as AnyCollection, E as remarkInclude, F as defineConfig, I as defineDocs, M as GlobalConfig, N as MetaCollection, O as BaseCollection, P as defineCollections, R as PostprocessOptions, T as metaSchema, V as applyMdxPreset, j as DocsCollection, k as CollectionSchema, w as frontmatterSchema, z as DefaultMDXOptions } from "../core-
|
|
1
|
+
import { A as DocCollection, B as MDXPresetOptions, D as AnyCollection, E as remarkInclude, F as defineConfig, I as defineDocs, M as GlobalConfig, N as MetaCollection, O as BaseCollection, P as defineCollections, R as PostprocessOptions, T as metaSchema, V as applyMdxPreset, j as DocsCollection, k as CollectionSchema, w as frontmatterSchema, z as DefaultMDXOptions } from "../core-DM-l-bvr.js";
|
|
2
2
|
export { AnyCollection, BaseCollection, CollectionSchema, DefaultMDXOptions, DocCollection, DocsCollection, GlobalConfig, MDXPresetOptions, MetaCollection, PostprocessOptions, applyMdxPreset, defineCollections, defineConfig, defineDocs, frontmatterSchema, metaSchema, remarkInclude };
|
|
@@ -197,13 +197,17 @@ declare const metaSchema$1: _$zod.ZodObject<{
|
|
|
197
197
|
//#region src/runtime/server.d.ts
|
|
198
198
|
type MetaCollectionEntry<Data> = Data & MetaMethods;
|
|
199
199
|
type DocCollectionEntry<Name extends string = string, Frontmatter = unknown, TC extends InternalTypeConfig = InternalTypeConfig> = DocData & DocMethods & Frontmatter & TC['DocData'][Name];
|
|
200
|
+
interface ToFumadocsSourceOptions {
|
|
201
|
+
/** base directory for virtual file paths */
|
|
202
|
+
baseDir?: string;
|
|
203
|
+
}
|
|
200
204
|
type AsyncDocCollectionEntry<Name extends string = string, Frontmatter = unknown, TC extends InternalTypeConfig = InternalTypeConfig> = {
|
|
201
205
|
load: () => Promise<DocData & TC['DocData'][Name]>;
|
|
202
206
|
} & DocMethods & Frontmatter;
|
|
203
207
|
interface DocsCollectionEntry<Name extends string = string, Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, TC extends InternalTypeConfig = InternalTypeConfig> {
|
|
204
208
|
docs: DocCollectionEntry<Name, Frontmatter, TC>[];
|
|
205
209
|
meta: MetaCollectionEntry<Meta>[];
|
|
206
|
-
toFumadocsSource: () => Source<{
|
|
210
|
+
toFumadocsSource: (options?: ToFumadocsSourceOptions) => Source<{
|
|
207
211
|
pageData: DocCollectionEntry<Name, Frontmatter, TC>;
|
|
208
212
|
metaData: MetaCollectionEntry<Meta>;
|
|
209
213
|
}>;
|
|
@@ -211,7 +215,7 @@ interface DocsCollectionEntry<Name extends string = string, Frontmatter extends
|
|
|
211
215
|
interface AsyncDocsCollectionEntry<Name extends string = string, Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, TC extends InternalTypeConfig = InternalTypeConfig> {
|
|
212
216
|
docs: AsyncDocCollectionEntry<Name, Frontmatter, TC>[];
|
|
213
217
|
meta: MetaCollectionEntry<Meta>[];
|
|
214
|
-
toFumadocsSource: () => Source<{
|
|
218
|
+
toFumadocsSource: (options?: ToFumadocsSourceOptions) => Source<{
|
|
215
219
|
pageData: AsyncDocCollectionEntry<Name, Frontmatter, TC>;
|
|
216
220
|
metaData: MetaCollectionEntry<Meta>;
|
|
217
221
|
}>;
|
|
@@ -230,7 +234,7 @@ declare function server<Config, TC extends InternalTypeConfig>(options?: ServerO
|
|
|
230
234
|
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>;
|
|
231
235
|
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>;
|
|
232
236
|
};
|
|
233
|
-
declare function toFumadocsSource<Page extends DocMethods & PageData, Meta extends MetaMethods & MetaData>(pages: Page[], metas: Meta[]): Source<{
|
|
237
|
+
declare function toFumadocsSource<Page extends DocMethods & PageData, Meta extends MetaMethods & MetaData>(pages: Page[], metas: Meta[], options?: ToFumadocsSourceOptions): Source<{
|
|
234
238
|
pageData: Page;
|
|
235
239
|
metaData: Meta;
|
|
236
240
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { L as ExtractedReference, a as EmitOptions, c as PluginContext, d as TransformOptions, i as EmitEntry, 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 { L as ExtractedReference, a as EmitOptions, c as PluginContext, d as TransformOptions, i as EmitEntry, l as PluginOption, n as Core, o as EmitOutput, r as CoreOptions, s as Plugin, t as CompilationContext, u as ServerContext } from "./core-DM-l-bvr.js";
|
|
2
2
|
import { t as CompiledMDXProperties } from "./build-mdx-CAXqH1_C.js";
|
|
3
3
|
export { type CompilationContext, type CompiledMDXProperties, type Core, type CoreOptions, type EmitEntry, type EmitOptions, type EmitOutput, type ExtractedReference, type Plugin, type PluginContext, type PluginOption, type ServerContext, type TransformOptions };
|
package/dist/next/index.d.ts
CHANGED
package/dist/node/index.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-DM-l-bvr.js";
|
|
2
2
|
export { IndexFilePlugin, IndexFilePluginOptions, indexFile as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as DocCollection, j as DocsCollection } from "../core-
|
|
1
|
+
import { A as DocCollection, j as DocsCollection } from "../core-DM-l-bvr.js";
|
|
2
2
|
import { i as InternalTypeConfig } from "../types-DRpz2Vq2.js";
|
|
3
3
|
import { t as CompiledMDXProperties } from "../build-mdx-CAXqH1_C.js";
|
|
4
4
|
import { FC, ReactNode } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as DocCollection, g as AsyncDocsCollectionEntry, h as AsyncDocCollectionEntry, j as DocsCollection, r as CoreOptions, x as ServerOptions } from "../core-
|
|
1
|
+
import { A as DocCollection, g as AsyncDocsCollectionEntry, h as AsyncDocCollectionEntry, j as DocsCollection, r as CoreOptions, x as ServerOptions } from "../core-DM-l-bvr.js";
|
|
2
2
|
import { i as InternalTypeConfig, r as FileInfo } from "../types-DRpz2Vq2.js";
|
|
3
3
|
import * as _$_standard_schema_spec0 from "@standard-schema/spec";
|
|
4
4
|
import * as _$fumadocs_core_source0 from "fumadocs-core/source";
|
package/dist/runtime/server.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as toFumadocsSource, S as server, _ as DocCollectionEntry, b as ServerCreate, g as AsyncDocsCollectionEntry, h as AsyncDocCollectionEntry, v as DocsCollectionEntry, x as ServerOptions, y as MetaCollectionEntry } from "../core-
|
|
1
|
+
import { C as toFumadocsSource, S as server, _ as DocCollectionEntry, b as ServerCreate, g as AsyncDocsCollectionEntry, h as AsyncDocCollectionEntry, v as DocsCollectionEntry, x as ServerOptions, y as MetaCollectionEntry } from "../core-DM-l-bvr.js";
|
|
2
2
|
export { AsyncDocCollectionEntry, AsyncDocsCollectionEntry, DocCollectionEntry, DocsCollectionEntry, MetaCollectionEntry, ServerCreate, ServerOptions, server, toFumadocsSource };
|
package/dist/runtime/server.js
CHANGED
|
@@ -56,8 +56,8 @@ function server(options = {}) {
|
|
|
56
56
|
return {
|
|
57
57
|
docs: await this.doc(name, base, docGlob),
|
|
58
58
|
meta: await this.meta(name, base, metaGlob),
|
|
59
|
-
toFumadocsSource() {
|
|
60
|
-
return toFumadocsSource(this.docs, this.meta);
|
|
59
|
+
toFumadocsSource(options) {
|
|
60
|
+
return toFumadocsSource(this.docs, this.meta, options);
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
},
|
|
@@ -65,24 +65,25 @@ function server(options = {}) {
|
|
|
65
65
|
return {
|
|
66
66
|
docs: await this.docLazy(name, base, docHeadGlob, docBodyGlob),
|
|
67
67
|
meta: await this.meta(name, base, metaGlob),
|
|
68
|
-
toFumadocsSource() {
|
|
69
|
-
return toFumadocsSource(this.docs, this.meta);
|
|
68
|
+
toFumadocsSource(options) {
|
|
69
|
+
return toFumadocsSource(this.docs, this.meta, options);
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
function toFumadocsSource(pages, metas) {
|
|
75
|
+
function toFumadocsSource(pages, metas, options) {
|
|
76
|
+
const baseDir = options?.baseDir;
|
|
76
77
|
const files = [];
|
|
77
78
|
for (const entry of pages) files.push({
|
|
78
79
|
type: "page",
|
|
79
|
-
path: entry.info.path,
|
|
80
|
+
path: baseDir ? path$1.join(baseDir, entry.info.path) : entry.info.path,
|
|
80
81
|
absolutePath: entry.info.fullPath,
|
|
81
82
|
data: entry
|
|
82
83
|
});
|
|
83
84
|
for (const entry of metas) files.push({
|
|
84
85
|
type: "meta",
|
|
85
|
-
path: entry.info.path,
|
|
86
|
+
path: baseDir ? path$1.join(baseDir, entry.info.path) : entry.info.path,
|
|
86
87
|
absolutePath: entry.info.fullPath,
|
|
87
88
|
data: entry
|
|
88
89
|
});
|
package/dist/vite/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-mdx",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.5",
|
|
4
4
|
"description": "The built-in source for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"author": "Fuma Nama",
|
|
12
12
|
"repository": "github:fuma-nama/fumadocs",
|
|
13
13
|
"bin": {
|
|
14
|
-
"fumadocs-mdx": "./
|
|
14
|
+
"fumadocs-mdx": "./bin.js"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"vite": "^8.0.12",
|
|
81
81
|
"webpack": "^5.106.2",
|
|
82
82
|
"@fumadocs/vite": "0.0.1",
|
|
83
|
-
"fumadocs-core": "16.8.
|
|
83
|
+
"fumadocs-core": "16.8.11",
|
|
84
84
|
"tsconfig": "0.0.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|