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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createMdxLoader,
|
|
3
|
+
resolvedConfig
|
|
4
|
+
} from "../chunk-5XJM5RPV.js";
|
|
5
|
+
import {
|
|
6
|
+
findConfigFile
|
|
7
|
+
} from "../chunk-2HKRTQYP.js";
|
|
8
|
+
import "../chunk-QQWCBFFE.js";
|
|
9
|
+
import "../chunk-SVTXMVLQ.js";
|
|
10
|
+
import {
|
|
11
|
+
buildConfig
|
|
12
|
+
} from "../chunk-QVZ7JH4H.js";
|
|
13
|
+
import "../chunk-VWJKRQZR.js";
|
|
14
|
+
|
|
15
|
+
// src/bun/index.ts
|
|
16
|
+
import { parse } from "querystring";
|
|
17
|
+
function createMdxPlugin(options = {}) {
|
|
18
|
+
const { configPath = findConfigFile() } = options;
|
|
19
|
+
async function getMdxLoader() {
|
|
20
|
+
const out = buildConfig(await import(configPath));
|
|
21
|
+
return createMdxLoader(resolvedConfig(out));
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
name: "bun-plugin-fumadocs-mdx",
|
|
25
|
+
setup(build) {
|
|
26
|
+
const mdxLoader = getMdxLoader();
|
|
27
|
+
build.onLoad({ filter: /\.mdx(\?.+?)?$/ }, async (args) => {
|
|
28
|
+
const [filePath, query] = args.path.split("?", 2);
|
|
29
|
+
const content = await Bun.file(filePath).text();
|
|
30
|
+
const result = await (await mdxLoader)({
|
|
31
|
+
source: content,
|
|
32
|
+
query: parse(query),
|
|
33
|
+
filePath,
|
|
34
|
+
development: false,
|
|
35
|
+
compiler: {
|
|
36
|
+
addDependency() {
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
return {
|
|
41
|
+
contents: result.code,
|
|
42
|
+
loader: "js"
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
createMdxPlugin
|
|
50
|
+
};
|
|
@@ -2,6 +2,44 @@ import {
|
|
|
2
2
|
buildConfig
|
|
3
3
|
} from "./chunk-QVZ7JH4H.js";
|
|
4
4
|
|
|
5
|
+
// src/utils/validation.ts
|
|
6
|
+
import picocolors from "picocolors";
|
|
7
|
+
var ValidationError = class extends Error {
|
|
8
|
+
constructor(message, issues) {
|
|
9
|
+
super(
|
|
10
|
+
`${message}:
|
|
11
|
+
${issues.map((issue) => ` ${issue.path}: ${issue.message}`).join("\n")}`
|
|
12
|
+
);
|
|
13
|
+
this.title = message;
|
|
14
|
+
this.issues = issues;
|
|
15
|
+
}
|
|
16
|
+
toStringFormatted() {
|
|
17
|
+
return [
|
|
18
|
+
picocolors.bold(`[MDX] ${this.title}:`),
|
|
19
|
+
...this.issues.map(
|
|
20
|
+
(issue) => picocolors.redBright(
|
|
21
|
+
`- ${picocolors.bold(issue.path?.join(".") ?? "*")}: ${issue.message}`
|
|
22
|
+
)
|
|
23
|
+
)
|
|
24
|
+
].join("\n");
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
async function validate(schema, data, context, errorMessage) {
|
|
28
|
+
if (typeof schema === "function" && !("~standard" in schema)) {
|
|
29
|
+
schema = schema(context);
|
|
30
|
+
}
|
|
31
|
+
if ("~standard" in schema) {
|
|
32
|
+
const result = await schema["~standard"].validate(
|
|
33
|
+
data
|
|
34
|
+
);
|
|
35
|
+
if (result.issues) {
|
|
36
|
+
throw new ValidationError(errorMessage, result.issues);
|
|
37
|
+
}
|
|
38
|
+
return result.value;
|
|
39
|
+
}
|
|
40
|
+
return data;
|
|
41
|
+
}
|
|
42
|
+
|
|
5
43
|
// src/utils/config.ts
|
|
6
44
|
import * as fs from "fs/promises";
|
|
7
45
|
import * as path from "path";
|
|
@@ -83,7 +121,33 @@ async function getConfigHash(configPath) {
|
|
|
83
121
|
throw new Error("Cannot find config file");
|
|
84
122
|
}
|
|
85
123
|
|
|
124
|
+
// src/utils/git-timestamp.ts
|
|
125
|
+
import path2 from "path";
|
|
126
|
+
import { x } from "tinyexec";
|
|
127
|
+
var cache2 = /* @__PURE__ */ new Map();
|
|
128
|
+
async function getGitTimestamp(file) {
|
|
129
|
+
const cached = cache2.get(file);
|
|
130
|
+
if (cached) return cached;
|
|
131
|
+
try {
|
|
132
|
+
const out = await x(
|
|
133
|
+
"git",
|
|
134
|
+
["log", "-1", '--pretty="%ai"', path2.relative(process.cwd(), file)],
|
|
135
|
+
{
|
|
136
|
+
throwOnError: true
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
const time = new Date(out.stdout);
|
|
140
|
+
cache2.set(file, time);
|
|
141
|
+
return time;
|
|
142
|
+
} catch {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
86
147
|
export {
|
|
148
|
+
ValidationError,
|
|
149
|
+
validate,
|
|
150
|
+
getGitTimestamp,
|
|
87
151
|
findConfigFile,
|
|
88
152
|
loadConfig,
|
|
89
153
|
getConfigHash
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// src/runtime/vite/browser.ts
|
|
2
|
+
import { createElement, lazy } from "react";
|
|
3
|
+
|
|
4
|
+
// src/runtime/vite/base.ts
|
|
5
|
+
function fromConfigBase() {
|
|
6
|
+
function normalize(entries, base) {
|
|
7
|
+
const out = {};
|
|
8
|
+
for (const k in entries) {
|
|
9
|
+
const mappedK = k.startsWith("./") ? k.slice(2) : k;
|
|
10
|
+
if (base) Object.assign(entries[k], { base });
|
|
11
|
+
out[mappedK] = entries[k];
|
|
12
|
+
}
|
|
13
|
+
return out;
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
doc(_, base, glob) {
|
|
17
|
+
return normalize(glob, base);
|
|
18
|
+
},
|
|
19
|
+
meta(_, base, glob) {
|
|
20
|
+
return normalize(glob, base);
|
|
21
|
+
},
|
|
22
|
+
docLazy(_, base, head, body) {
|
|
23
|
+
return {
|
|
24
|
+
base,
|
|
25
|
+
head: normalize(head),
|
|
26
|
+
body: normalize(body)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// src/runtime/vite/browser.ts
|
|
33
|
+
var loaderStore = /* @__PURE__ */ new Map();
|
|
34
|
+
function createClientLoader(files, options) {
|
|
35
|
+
const { id = "", component } = options;
|
|
36
|
+
let renderer;
|
|
37
|
+
const store = loaderStore.get(id) ?? {
|
|
38
|
+
preloaded: /* @__PURE__ */ new Map()
|
|
39
|
+
};
|
|
40
|
+
loaderStore.set(id, store);
|
|
41
|
+
function getRenderer() {
|
|
42
|
+
if (renderer) return renderer;
|
|
43
|
+
renderer = {};
|
|
44
|
+
for (const k in files) {
|
|
45
|
+
const OnDemand = lazy(async () => {
|
|
46
|
+
const loaded = await files[k]();
|
|
47
|
+
return { default: (props) => component(loaded, props) };
|
|
48
|
+
});
|
|
49
|
+
renderer[k] = (props) => {
|
|
50
|
+
const cached = store.preloaded.get(k);
|
|
51
|
+
if (!cached) return createElement(OnDemand, props);
|
|
52
|
+
return component(cached, props);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
return renderer;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
async preload(path) {
|
|
59
|
+
const loaded = await files[path]();
|
|
60
|
+
store.preloaded.set(path, loaded);
|
|
61
|
+
return loaded;
|
|
62
|
+
},
|
|
63
|
+
getRenderer,
|
|
64
|
+
getComponent(path) {
|
|
65
|
+
return getRenderer()[path];
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function toClientRenderer(files, component) {
|
|
70
|
+
return createClientLoader(files, { component }).getRenderer();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export {
|
|
74
|
+
fromConfigBase,
|
|
75
|
+
createClientLoader,
|
|
76
|
+
toClientRenderer
|
|
77
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getConfigHash,
|
|
3
|
+
getGitTimestamp,
|
|
4
|
+
loadConfig,
|
|
5
|
+
validate
|
|
6
|
+
} from "./chunk-2HKRTQYP.js";
|
|
7
|
+
import {
|
|
8
|
+
buildMDX
|
|
9
|
+
} from "./chunk-QQWCBFFE.js";
|
|
10
|
+
import {
|
|
11
|
+
fumaMatter
|
|
12
|
+
} from "./chunk-VWJKRQZR.js";
|
|
13
|
+
|
|
14
|
+
// src/utils/count-lines.ts
|
|
15
|
+
function countLines(s) {
|
|
16
|
+
let num = 0;
|
|
17
|
+
for (const c of s) {
|
|
18
|
+
if (c === "\n") num++;
|
|
19
|
+
}
|
|
20
|
+
return num;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// src/loaders/mdx.ts
|
|
24
|
+
import { z } from "zod";
|
|
25
|
+
import fs from "fs/promises";
|
|
26
|
+
import path from "path";
|
|
27
|
+
import { createHash } from "crypto";
|
|
28
|
+
var querySchema = z.object({
|
|
29
|
+
only: z.literal(["frontmatter", "all"]).default("all"),
|
|
30
|
+
collection: z.string().optional(),
|
|
31
|
+
hash: z.string().describe(
|
|
32
|
+
"the hash of config, used for revalidation on Turbopack/Webpack."
|
|
33
|
+
).optional()
|
|
34
|
+
}).loose();
|
|
35
|
+
var cacheEntry = z.object({
|
|
36
|
+
code: z.string(),
|
|
37
|
+
map: z.any().optional(),
|
|
38
|
+
hash: z.string().optional()
|
|
39
|
+
});
|
|
40
|
+
function createMdxLoader(configLoader) {
|
|
41
|
+
return async ({
|
|
42
|
+
source: value,
|
|
43
|
+
development: isDevelopment,
|
|
44
|
+
query,
|
|
45
|
+
compiler,
|
|
46
|
+
filePath
|
|
47
|
+
}) => {
|
|
48
|
+
const matter = fumaMatter(value);
|
|
49
|
+
const parsed = querySchema.parse(query);
|
|
50
|
+
const loaded = await configLoader.getConfig(parsed.hash);
|
|
51
|
+
const cacheDir = isDevelopment ? void 0 : loaded.global.experimentalBuildCache;
|
|
52
|
+
const cacheKey = `${parsed.hash}_${parsed.collection ?? "global"}_${generateCacheHash(filePath)}`;
|
|
53
|
+
if (cacheDir) {
|
|
54
|
+
const cached = await fs.readFile(path.join(cacheDir, cacheKey)).then((content) => cacheEntry.parse(JSON.parse(content.toString()))).catch(() => null);
|
|
55
|
+
if (cached && cached.hash === generateCacheHash(value)) return cached;
|
|
56
|
+
}
|
|
57
|
+
const collection = parsed.collection ? loaded.collections.get(parsed.collection) : void 0;
|
|
58
|
+
let schema;
|
|
59
|
+
let mdxOptions;
|
|
60
|
+
switch (collection?.type) {
|
|
61
|
+
case "doc":
|
|
62
|
+
mdxOptions = collection.mdxOptions;
|
|
63
|
+
schema = collection.schema;
|
|
64
|
+
break;
|
|
65
|
+
case "docs":
|
|
66
|
+
mdxOptions = collection.docs.mdxOptions;
|
|
67
|
+
schema = collection.docs.schema;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
if (schema) {
|
|
71
|
+
matter.data = await validate(
|
|
72
|
+
schema,
|
|
73
|
+
matter.data,
|
|
74
|
+
{
|
|
75
|
+
source: value,
|
|
76
|
+
path: filePath
|
|
77
|
+
},
|
|
78
|
+
`invalid frontmatter in ${filePath}`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
if (parsed.only === "frontmatter") {
|
|
82
|
+
return {
|
|
83
|
+
code: `export const frontmatter = ${JSON.stringify(matter.data)}`,
|
|
84
|
+
map: null
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
const data = {};
|
|
88
|
+
if (loaded.global.lastModifiedTime === "git") {
|
|
89
|
+
data.lastModified = (await getGitTimestamp(filePath))?.getTime();
|
|
90
|
+
}
|
|
91
|
+
const lineOffset = isDevelopment ? countLines(matter.matter) : 0;
|
|
92
|
+
const compiled = await buildMDX(
|
|
93
|
+
`${parsed.hash ?? ""}:${parsed.collection ?? "global"}`,
|
|
94
|
+
"\n".repeat(lineOffset) + matter.content,
|
|
95
|
+
{
|
|
96
|
+
development: isDevelopment,
|
|
97
|
+
...mdxOptions ?? await loaded.getDefaultMDXOptions(),
|
|
98
|
+
data,
|
|
99
|
+
filePath,
|
|
100
|
+
frontmatter: matter.data,
|
|
101
|
+
_compiler: compiler
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
const out = {
|
|
105
|
+
code: String(compiled.value),
|
|
106
|
+
map: compiled.map
|
|
107
|
+
};
|
|
108
|
+
if (cacheDir) {
|
|
109
|
+
await fs.mkdir(cacheDir, { recursive: true });
|
|
110
|
+
await fs.writeFile(
|
|
111
|
+
path.join(cacheDir, cacheKey),
|
|
112
|
+
JSON.stringify({
|
|
113
|
+
...out,
|
|
114
|
+
hash: generateCacheHash(value)
|
|
115
|
+
})
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
return out;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function generateCacheHash(input) {
|
|
122
|
+
return createHash("md5").update(input).digest("hex");
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// src/loaders/config-loader.ts
|
|
126
|
+
function resolvedConfig(loaded) {
|
|
127
|
+
return {
|
|
128
|
+
getConfig() {
|
|
129
|
+
return loaded;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function dynamicConfig(configPath, outDir) {
|
|
134
|
+
return {
|
|
135
|
+
async getConfig(hash) {
|
|
136
|
+
return loadConfig(
|
|
137
|
+
configPath,
|
|
138
|
+
outDir,
|
|
139
|
+
hash ?? await getConfigHash(configPath)
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export {
|
|
146
|
+
createMdxLoader,
|
|
147
|
+
resolvedConfig,
|
|
148
|
+
dynamicConfig
|
|
149
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ValidationError
|
|
3
|
+
} from "./chunk-2HKRTQYP.js";
|
|
4
|
+
|
|
5
|
+
// src/loaders/adapter.ts
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
import fs from "fs/promises";
|
|
8
|
+
import { parse } from "querystring";
|
|
9
|
+
import path from "path";
|
|
10
|
+
function toNode(loader, filterByPath) {
|
|
11
|
+
return async (url, _context, nextLoad) => {
|
|
12
|
+
if (!url.startsWith("file:///")) return nextLoad(url);
|
|
13
|
+
const parsedUrl = new URL(url);
|
|
14
|
+
const filePath = fileURLToPath(parsedUrl);
|
|
15
|
+
if (filterByPath(filePath)) {
|
|
16
|
+
const source = (await fs.readFile(filePath)).toString();
|
|
17
|
+
const result = await loader({
|
|
18
|
+
filePath,
|
|
19
|
+
query: Object.fromEntries(parsedUrl.searchParams.entries()),
|
|
20
|
+
source,
|
|
21
|
+
development: false,
|
|
22
|
+
compiler: {
|
|
23
|
+
addDependency() {
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return {
|
|
28
|
+
source: result.code,
|
|
29
|
+
format: "module",
|
|
30
|
+
shortCircuit: true
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return nextLoad(url);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function toVite(loader) {
|
|
37
|
+
return async function(file, query, value) {
|
|
38
|
+
const result = await loader({
|
|
39
|
+
filePath: file,
|
|
40
|
+
query: parse(query),
|
|
41
|
+
source: value,
|
|
42
|
+
development: this.environment.mode === "dev",
|
|
43
|
+
compiler: {
|
|
44
|
+
addDependency: (file2) => {
|
|
45
|
+
this.addWatchFile(file2);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
code: result.code,
|
|
51
|
+
map: result.map
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function toWebpack(loader) {
|
|
56
|
+
return async function(source, callback) {
|
|
57
|
+
try {
|
|
58
|
+
const result = await loader({
|
|
59
|
+
filePath: this.resourcePath,
|
|
60
|
+
query: parse(this.resourceQuery),
|
|
61
|
+
source,
|
|
62
|
+
development: this.mode === "development",
|
|
63
|
+
compiler: this
|
|
64
|
+
});
|
|
65
|
+
callback(void 0, result.code, result.map);
|
|
66
|
+
} catch (error) {
|
|
67
|
+
if (error instanceof ValidationError) {
|
|
68
|
+
return callback(new Error(error.toStringFormatted()));
|
|
69
|
+
}
|
|
70
|
+
if (!(error instanceof Error)) throw error;
|
|
71
|
+
const fpath = path.relative(this.context, this.resourcePath);
|
|
72
|
+
error.message = `${fpath}:${error.name}: ${error.message}`;
|
|
73
|
+
callback(error);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
toNode,
|
|
80
|
+
toVite,
|
|
81
|
+
toWebpack
|
|
82
|
+
};
|
package/dist/config/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AnyCollection, B as BaseCollection, C as CollectionSchema, D as DefaultMDXOptions, a as DocCollection, b as DocsCollection, G as GlobalConfig, M as MetaCollection, d as defineCollections, e as defineConfig, c as defineDocs, f as frontmatterSchema, g as getDefaultMDXOptions, m as metaSchema } from '../define-
|
|
1
|
+
export { A as AnyCollection, B as BaseCollection, C as CollectionSchema, D as DefaultMDXOptions, a as DocCollection, b as DocsCollection, G as GlobalConfig, M as MetaCollection, d as defineCollections, e as defineConfig, c as defineDocs, f as frontmatterSchema, g as getDefaultMDXOptions, m as metaSchema } from '../define-BH4bnHQl.cjs';
|
|
2
2
|
import { Processor, Transformer } from 'unified';
|
|
3
3
|
import { Root } from 'mdast';
|
|
4
4
|
import '@standard-schema/spec';
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AnyCollection, B as BaseCollection, C as CollectionSchema, D as DefaultMDXOptions, a as DocCollection, b as DocsCollection, G as GlobalConfig, M as MetaCollection, d as defineCollections, e as defineConfig, c as defineDocs, f as frontmatterSchema, g as getDefaultMDXOptions, m as metaSchema } from '../define-
|
|
1
|
+
export { A as AnyCollection, B as BaseCollection, C as CollectionSchema, D as DefaultMDXOptions, a as DocCollection, b as DocsCollection, G as GlobalConfig, M as MetaCollection, d as defineCollections, e as defineConfig, c as defineDocs, f as frontmatterSchema, g as getDefaultMDXOptions, m as metaSchema } from '../define-BH4bnHQl.js';
|
|
2
2
|
import { Processor, Transformer } from 'unified';
|
|
3
3
|
import { Root } from 'mdast';
|
|
4
4
|
import '@standard-schema/spec';
|
package/dist/config/zod-3.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod/v3';
|
|
2
|
-
export { A as AnyCollection, B as BaseCollection, C as CollectionSchema, D as DefaultMDXOptions, a as DocCollection, b as DocsCollection, G as GlobalConfig, M as MetaCollection, d as defineCollections, e as defineConfig, c as defineDocs, g as getDefaultMDXOptions } from '../define-
|
|
2
|
+
export { A as AnyCollection, B as BaseCollection, C as CollectionSchema, D as DefaultMDXOptions, a as DocCollection, b as DocsCollection, G as GlobalConfig, M as MetaCollection, d as defineCollections, e as defineConfig, c as defineDocs, g as getDefaultMDXOptions } from '../define-BH4bnHQl.cjs';
|
|
3
3
|
export { Params, remarkInclude } from './index.cjs';
|
|
4
4
|
import '@standard-schema/spec';
|
|
5
5
|
import 'fumadocs-core/mdx-plugins';
|
package/dist/config/zod-3.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod/v3';
|
|
2
|
-
export { A as AnyCollection, B as BaseCollection, C as CollectionSchema, D as DefaultMDXOptions, a as DocCollection, b as DocsCollection, G as GlobalConfig, M as MetaCollection, d as defineCollections, e as defineConfig, c as defineDocs, g as getDefaultMDXOptions } from '../define-
|
|
2
|
+
export { A as AnyCollection, B as BaseCollection, C as CollectionSchema, D as DefaultMDXOptions, a as DocCollection, b as DocsCollection, G as GlobalConfig, M as MetaCollection, d as defineCollections, e as defineConfig, c as defineDocs, g as getDefaultMDXOptions } from '../define-BH4bnHQl.js';
|
|
3
3
|
export { Params, remarkInclude } from './index.js';
|
|
4
4
|
import '@standard-schema/spec';
|
|
5
5
|
import 'fumadocs-core/mdx-plugins';
|
|
@@ -92,6 +92,12 @@ interface GlobalConfig {
|
|
|
92
92
|
* @defaultValue 'none'
|
|
93
93
|
*/
|
|
94
94
|
lastModifiedTime?: 'git' | 'none';
|
|
95
|
+
/**
|
|
96
|
+
* specify a directory to access & store cache (disabled during development mode).
|
|
97
|
+
*
|
|
98
|
+
* The cache will never be updated, delete the cache folder to clean.
|
|
99
|
+
*/
|
|
100
|
+
experimentalBuildCache?: string;
|
|
95
101
|
}
|
|
96
102
|
declare function defineCollections<Schema extends StandardSchemaV1 = StandardSchemaV1, Async extends boolean = false>(options: DocCollection<Schema, Async>): DocCollection<Schema, Async>;
|
|
97
103
|
declare function defineCollections<Schema extends StandardSchemaV1 = StandardSchemaV1>(options: MetaCollection<Schema>): MetaCollection<Schema>;
|
|
@@ -92,6 +92,12 @@ interface GlobalConfig {
|
|
|
92
92
|
* @defaultValue 'none'
|
|
93
93
|
*/
|
|
94
94
|
lastModifiedTime?: 'git' | 'none';
|
|
95
|
+
/**
|
|
96
|
+
* specify a directory to access & store cache (disabled during development mode).
|
|
97
|
+
*
|
|
98
|
+
* The cache will never be updated, delete the cache folder to clean.
|
|
99
|
+
*/
|
|
100
|
+
experimentalBuildCache?: string;
|
|
95
101
|
}
|
|
96
102
|
declare function defineCollections<Schema extends StandardSchemaV1 = StandardSchemaV1, Async extends boolean = false>(options: DocCollection<Schema, Async>): DocCollection<Schema, Async>;
|
|
97
103
|
declare function defineCollections<Schema extends StandardSchemaV1 = StandardSchemaV1>(options: MetaCollection<Schema>): MetaCollection<Schema>;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PageData, MetaData, Source, VirtualFile } from 'fumadocs-core/source';
|
|
2
|
-
import { R as Runtime, B as BaseCollectionEntry } from './types-
|
|
2
|
+
import { R as Runtime, B as BaseCollectionEntry } from './types-DT83Ijs6.cjs';
|
|
3
3
|
import '@standard-schema/spec';
|
|
4
|
-
import './define-
|
|
4
|
+
import './define-BH4bnHQl.cjs';
|
|
5
5
|
import 'fumadocs-core/mdx-plugins';
|
|
6
6
|
import '@mdx-js/mdx';
|
|
7
7
|
import 'unified';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PageData, MetaData, Source, VirtualFile } from 'fumadocs-core/source';
|
|
2
|
-
import { R as Runtime, B as BaseCollectionEntry } from './types-
|
|
2
|
+
import { R as Runtime, B as BaseCollectionEntry } from './types-DN9KrG7R.js';
|
|
3
3
|
import '@standard-schema/spec';
|
|
4
|
-
import './define-
|
|
4
|
+
import './define-BH4bnHQl.js';
|
|
5
5
|
import 'fumadocs-core/mdx-plugins';
|
|
6
6
|
import '@mdx-js/mdx';
|
|
7
7
|
import 'unified';
|