fumadocs-mdx 11.7.4 → 11.8.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/{chunk-OWZSTKKX.js → chunk-6Y5JDZHD.js} +8 -1
- package/dist/chunk-7JFPDRW7.js +42 -0
- package/dist/chunk-GBMFGEC7.js +57 -0
- package/dist/{chunk-ZOWJF3OH.js → chunk-GX3THK2Q.js} +25 -20
- package/dist/{chunk-2CSSQTP6.js → chunk-GYWPPGFD.js} +9 -1
- package/dist/{chunk-PQCNPAD3.js → chunk-IGXZS2W6.js} +10 -7
- package/dist/chunk-UCY7OBZG.js +12 -0
- package/dist/{chunk-KVWX6THC.js → chunk-VWJKRQZR.js} +2 -2
- package/dist/{chunk-JFNBRKRV.js → chunk-XVL4ZQFK.js} +12 -6
- package/dist/{chunk-4CGSOZUZ.js → chunk-XZR5QXVY.js} +32 -2
- package/dist/config/index.cjs +21 -11
- package/dist/config/index.d.cts +2 -2
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +9 -37
- package/dist/config/zod-3.cjs +371 -0
- package/dist/config/zod-3.d.cts +53 -0
- package/dist/config/zod-3.d.ts +53 -0
- package/dist/config/zod-3.js +40 -0
- package/dist/{define-E6TRBwBQ.d.cts → define-DnJzAZrj.d.cts} +3 -2
- package/dist/{define-E6TRBwBQ.d.ts → define-DnJzAZrj.d.ts} +3 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/loader-mdx.cjs +83 -50
- package/dist/loader-mdx.js +10 -10
- package/dist/{mdx-options-UDV5WEFU.js → mdx-options-3NB74EMB.js} +1 -1
- package/dist/next/index.cjs +63 -29
- package/dist/next/index.js +7 -9
- package/dist/runtime/async.cjs +167 -128
- package/dist/runtime/async.d.cts +3 -3
- package/dist/runtime/async.d.ts +3 -3
- package/dist/runtime/async.js +30 -46
- package/dist/runtime/vite.cjs +49 -41
- package/dist/runtime/vite.d.cts +26 -18
- package/dist/runtime/vite.d.ts +26 -18
- package/dist/runtime/vite.js +49 -41
- package/dist/{types-Lh_-Uuix.d.cts → types-B2ozVm_9.d.ts} +11 -5
- package/dist/{types-DiL328cG.d.ts → types-BukvTPdG.d.cts} +11 -5
- package/dist/vite/index.cjs +125 -99
- package/dist/vite/index.d.cts +6 -1
- package/dist/vite/index.d.ts +6 -1
- package/dist/vite/index.js +54 -38
- package/package.json +17 -12
- package/dist/chunk-2K55VKP6.js +0 -49
- package/dist/chunk-VUEZTR2H.js +0 -26
package/dist/chunk-2K55VKP6.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
remarkInclude
|
|
3
|
-
} from "./chunk-PQCNPAD3.js";
|
|
4
|
-
|
|
5
|
-
// src/utils/build-mdx.ts
|
|
6
|
-
import { createProcessor } from "@mdx-js/mdx";
|
|
7
|
-
var cache = /* @__PURE__ */ new Map();
|
|
8
|
-
async function buildMDX(cacheKey, source, options) {
|
|
9
|
-
const { filePath, frontmatter, data, _compiler, ...rest } = options;
|
|
10
|
-
let format = options.format;
|
|
11
|
-
if (filePath) {
|
|
12
|
-
format ??= filePath.endsWith(".mdx") ? "mdx" : "md";
|
|
13
|
-
}
|
|
14
|
-
format ??= "mdx";
|
|
15
|
-
const key = `${cacheKey}:${format}`;
|
|
16
|
-
let cached = cache.get(key);
|
|
17
|
-
if (!cached) {
|
|
18
|
-
cached = createProcessor({
|
|
19
|
-
outputFormat: "program",
|
|
20
|
-
...rest,
|
|
21
|
-
remarkPlugins: [remarkInclude, ...rest.remarkPlugins ?? []],
|
|
22
|
-
format
|
|
23
|
-
});
|
|
24
|
-
cache.set(key, cached);
|
|
25
|
-
}
|
|
26
|
-
return cached.process({
|
|
27
|
-
value: source,
|
|
28
|
-
path: filePath,
|
|
29
|
-
data: {
|
|
30
|
-
...data,
|
|
31
|
-
frontmatter,
|
|
32
|
-
_compiler
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// src/utils/count-lines.ts
|
|
38
|
-
function countLines(s) {
|
|
39
|
-
let num = 0;
|
|
40
|
-
for (const c of s) {
|
|
41
|
-
if (c === "\n") num++;
|
|
42
|
-
}
|
|
43
|
-
return num;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export {
|
|
47
|
-
buildMDX,
|
|
48
|
-
countLines
|
|
49
|
-
};
|
package/dist/chunk-VUEZTR2H.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// src/utils/git-timestamp.ts
|
|
2
|
-
import path from "path";
|
|
3
|
-
import { x } from "tinyexec";
|
|
4
|
-
var cache = /* @__PURE__ */ new Map();
|
|
5
|
-
async function getGitTimestamp(file) {
|
|
6
|
-
const cached = cache.get(file);
|
|
7
|
-
if (cached) return cached;
|
|
8
|
-
try {
|
|
9
|
-
const out = await x(
|
|
10
|
-
"git",
|
|
11
|
-
["log", "-1", '--pretty="%ai"', path.relative(process.cwd(), file)],
|
|
12
|
-
{
|
|
13
|
-
throwOnError: true
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
const time = new Date(out.stdout);
|
|
17
|
-
cache.set(file, time);
|
|
18
|
-
return time;
|
|
19
|
-
} catch {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export {
|
|
25
|
-
getGitTimestamp
|
|
26
|
-
};
|