fumadocs-mdx 15.0.0 → 15.0.2
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/{adapter-CYY_UTJ_.mjs → adapter-BketAUOZ.js} +2 -2
- package/dist/{bin.mjs → bin.js} +2 -3
- package/dist/{build-B3dze-Gy.mjs → build-DPafU2lu.js} +1 -1
- package/dist/{build-mdx-CzPhxxK5.mjs → build-mdx-DeW1GoVI.js} +2 -2
- package/dist/bun/{index.d.mts → index.d.ts} +1 -1
- package/dist/bun/{index.mjs → index.js} +5 -5
- package/dist/config/{index.d.mts → index.d.ts} +1 -1
- package/dist/config/{index.mjs → index.js} +2 -2
- package/dist/{core-xVRMIMfX.d.mts → core-BOs29Mj7.d.ts} +1 -1
- package/dist/{core-p4b5Z4gI.mjs → core-Wd5WdPN4.js} +1 -1
- package/dist/{index-file-CwcdorGV.mjs → index-file-CyGG-8n8.js} +5 -6
- package/dist/{index.d.mts → index.d.ts} +2 -2
- package/dist/index.js +0 -0
- package/dist/{load-from-file-BT-JZa0P.mjs → load-from-file--MfW8a2Z.js} +2 -2
- package/dist/{mdx-DBRSrYL3.mjs → mdx-swV6_ZR5.js} +2 -2
- package/dist/{meta-BB21ElqG.mjs → meta-B6guI74I.js} +1 -1
- package/dist/next/{index.d.mts → index.d.ts} +1 -1
- package/dist/next/{index.mjs → index.js} +4 -4
- package/dist/node/{_loader.d.mts → _loader.d.ts} +1 -1
- package/dist/node/{_loader.mjs → _loader.js} +4 -4
- package/dist/node/{index.d.mts → index.d.ts} +1 -1
- package/dist/node/{loader.mjs → loader.js} +4 -4
- package/dist/plugins/{index-file.d.mts → index-file.d.ts} +1 -1
- package/dist/plugins/index-file.js +2 -0
- package/dist/plugins/{json-schema.d.mts → json-schema.d.ts} +1 -1
- package/dist/plugins/{last-modified.d.mts → last-modified.d.ts} +1 -1
- package/dist/plugins/{last-modified.mjs → last-modified.js} +1 -1
- package/dist/runtime/{browser.d.mts → browser.d.ts} +3 -3
- package/dist/runtime/{dynamic.d.mts → dynamic.d.ts} +2 -2
- package/dist/runtime/{dynamic.mjs → dynamic.js} +4 -4
- package/dist/runtime/{server.d.mts → server.d.ts} +1 -1
- package/dist/runtime/{types.d.mts → types.d.ts} +1 -1
- package/dist/runtime/types.js +0 -0
- package/dist/vite/{index.d.mts → index.d.ts} +2 -2
- package/dist/vite/{index.mjs → index.js} +25 -25
- package/dist/webpack/{mdx.d.mts → mdx.d.ts} +1 -1
- package/dist/webpack/{mdx.mjs → mdx.js} +3 -3
- package/dist/webpack/{meta.d.mts → meta.d.ts} +1 -1
- package/dist/webpack/{meta.mjs → meta.js} +3 -3
- package/dist/{webpack-B40ig_De.mjs → webpack-CBlMzMlJ.js} +1 -1
- package/package.json +30 -30
- package/dist/index.mjs +0 -1
- package/dist/plugins/index-file.mjs +0 -2
- package/dist/runtime/types.mjs +0 -1
- /package/dist/{bin.d.mts → bin.d.ts} +0 -0
- /package/dist/{build-mdx-D96HeA9c.d.mts → build-mdx-YyRh-ZGV.d.ts} +0 -0
- /package/dist/{codegen-DWIpa-dn.mjs → codegen-B8EhLmbU.js} +0 -0
- /package/dist/{index-BbjEFpj3.d.mts → index-BIbaPT3v.d.ts} +0 -0
- /package/dist/{loaders-D1D2IY_F.mjs → loaders-ezSYYkT7.js} +0 -0
- /package/dist/node/{index.mjs → index.js} +0 -0
- /package/dist/node/{loader.d.mts → loader.d.ts} +0 -0
- /package/dist/plugins/{json-schema.mjs → json-schema.js} +0 -0
- /package/dist/{preset-D9gSxA4n.mjs → preset-B0H8HalE.js} +0 -0
- /package/dist/{remark-include-D7W3bva3.mjs → remark-include-VDoXZSBN.js} +0 -0
- /package/dist/{rolldown-runtime-wcPFST8Q.mjs → rolldown-runtime-CiIaOW0V.js} +0 -0
- /package/dist/runtime/{browser.mjs → browser.js} +0 -0
- /package/dist/runtime/{server.mjs → server.js} +0 -0
- /package/dist/{types-DzvjnGdV.d.mts → types-hAduruLB.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as ValidationError } from "./core-
|
|
2
|
-
import { t as loadConfig } from "./load-from-file
|
|
1
|
+
import { r as ValidationError } from "./core-Wd5WdPN4.js";
|
|
2
|
+
import { t as loadConfig } from "./load-from-file--MfW8a2Z.js";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
package/dist/{bin.mjs → bin.js}
RENAMED
|
@@ -4,13 +4,13 @@ import { existsSync } from "node:fs";
|
|
|
4
4
|
async function start() {
|
|
5
5
|
const [configPath, outDir] = process.argv.slice(2);
|
|
6
6
|
if (existsSync("next.config.js") || existsSync("next.config.mjs") || existsSync("next.config.mts") || existsSync("next.config.ts")) {
|
|
7
|
-
const { postInstall } = await import("./next/index.
|
|
7
|
+
const { postInstall } = await import("./next/index.js");
|
|
8
8
|
await postInstall({
|
|
9
9
|
configPath,
|
|
10
10
|
outDir
|
|
11
11
|
});
|
|
12
12
|
} else {
|
|
13
|
-
const { postInstall } = await import("./vite/index.
|
|
13
|
+
const { postInstall } = await import("./vite/index.js");
|
|
14
14
|
await postInstall({
|
|
15
15
|
configPath,
|
|
16
16
|
outDir
|
|
@@ -19,4 +19,3 @@ async function start() {
|
|
|
19
19
|
}
|
|
20
20
|
start();
|
|
21
21
|
//#endregion
|
|
22
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { n as flattenNode, t as remarkInclude } from "./remark-include-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
|
+
import { n as flattenNode, t as remarkInclude } from "./remark-include-VDoXZSBN.js";
|
|
3
3
|
import { visit } from "unist-util-visit";
|
|
4
4
|
import { VFile } from "vfile";
|
|
5
5
|
import { createProcessor } from "@mdx-js/mdx";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as createMdxLoader } from "../mdx-
|
|
2
|
-
import { t as buildConfig } from "../build-
|
|
3
|
-
import { n as createCore, t as _Defaults } from "../core-
|
|
4
|
-
import { a as createIntegratedConfigLoader, t as toBun } from "../adapter-
|
|
5
|
-
import { t as createMetaLoader } from "../meta-
|
|
1
|
+
import { t as createMdxLoader } from "../mdx-swV6_ZR5.js";
|
|
2
|
+
import { t as buildConfig } from "../build-DPafU2lu.js";
|
|
3
|
+
import { n as createCore, t as _Defaults } from "../core-Wd5WdPN4.js";
|
|
4
|
+
import { a as createIntegratedConfigLoader, t as toBun } from "../adapter-BketAUOZ.js";
|
|
5
|
+
import { t as createMetaLoader } from "../meta-B6guI74I.js";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
7
|
//#region src/bun/index.ts
|
|
8
8
|
function createMdxPlugin(options = {}) {
|
|
@@ -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-BOs29Mj7.js";
|
|
2
2
|
export { AnyCollection, BaseCollection, CollectionSchema, DefaultMDXOptions, DocCollection, DocsCollection, GlobalConfig, MDXPresetOptions, MetaCollection, PostprocessOptions, applyMdxPreset, defineCollections, defineConfig, defineDocs, frontmatterSchema, metaSchema, remarkInclude };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as applyMdxPreset } from "../preset-
|
|
2
|
-
import { t as remarkInclude } from "../remark-include-
|
|
1
|
+
import { t as applyMdxPreset } from "../preset-B0H8HalE.js";
|
|
2
|
+
import { t as remarkInclude } from "../remark-include-VDoXZSBN.js";
|
|
3
3
|
import { metaSchema as metaSchema$1, pageSchema } from "fumadocs-core/source/schema";
|
|
4
4
|
//#region src/config/define.ts
|
|
5
5
|
function defineCollections(options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MetaMethods, i as InternalTypeConfig, n as DocMethods, t as DocData } from "./types-
|
|
1
|
+
import { a as MetaMethods, i as InternalTypeConfig, n as DocMethods, t as DocData } from "./types-hAduruLB.js";
|
|
2
2
|
import * as _$zod from "zod";
|
|
3
3
|
import * as _$fumadocs_core_source_schema0 from "fumadocs-core/source/schema";
|
|
4
4
|
import { metaSchema, pageSchema } from "fumadocs-core/source/schema";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { n as ident, r as slash, t as createCodegen } from "./codegen-
|
|
1
|
+
import { n as ident, r as slash, t as createCodegen } from "./codegen-B8EhLmbU.js";
|
|
2
2
|
import { frontmatter } from "fumadocs-core/content/md/frontmatter";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
import { createHash } from "node:crypto";
|
|
5
6
|
import { glob } from "tinyglobby";
|
|
6
|
-
import path$1 from "path";
|
|
7
|
-
import { createHash } from "crypto";
|
|
8
7
|
//#region src/utils/fs-cache.ts
|
|
9
8
|
const map = /* @__PURE__ */ new Map();
|
|
10
9
|
function createFSCache() {
|
|
@@ -154,7 +153,7 @@ async function generateDynamicIndexFile(ctx) {
|
|
|
154
153
|
outDir
|
|
155
154
|
};
|
|
156
155
|
async function generateCollectionObjectEntry(collection, absolutePath) {
|
|
157
|
-
const fullPath = path
|
|
156
|
+
const fullPath = path.relative(process.cwd(), absolutePath);
|
|
158
157
|
const content = await indexFileCache.read(fullPath).catch(() => "");
|
|
159
158
|
const parsed = frontmatter(content);
|
|
160
159
|
const data = await core.transformFrontmatter({
|
|
@@ -167,7 +166,7 @@ async function generateDynamicIndexFile(ctx) {
|
|
|
167
166
|
for (const [k, v] of Object.entries({
|
|
168
167
|
info: {
|
|
169
168
|
fullPath,
|
|
170
|
-
path: path
|
|
169
|
+
path: path.relative(collection.dir, absolutePath)
|
|
171
170
|
},
|
|
172
171
|
data,
|
|
173
172
|
hash
|
|
@@ -223,7 +222,7 @@ async function generateBrowserIndexFile(ctx) {
|
|
|
223
222
|
codegen.lines.push("};", "export default browserCollections;");
|
|
224
223
|
}
|
|
225
224
|
function getBase(collection) {
|
|
226
|
-
return slash(path
|
|
225
|
+
return slash(path.relative(process.cwd(), collection.dir));
|
|
227
226
|
}
|
|
228
227
|
function generateDocCollectionFrontmatterGlob({ codegen, workspace }, collection, eager = false) {
|
|
229
228
|
return codegen.generateGlobImport(collection.patterns, {
|
|
@@ -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-
|
|
2
|
-
import { t as CompiledMDXProperties } from "./build-mdx-
|
|
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-BOs29Mj7.js";
|
|
2
|
+
import { t as CompiledMDXProperties } from "./build-mdx-YyRh-ZGV.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/index.js
ADDED
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { t as buildConfig } from "./build-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
|
+
import { t as buildConfig } from "./build-DPafU2lu.js";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
//#region src/config/load-from-file.ts
|
|
5
5
|
var load_from_file_exports = /* @__PURE__ */ __exportAll({ loadConfig: () => loadConfig });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as mdxLoaderGlob } from "./loaders-
|
|
1
|
+
import { t as mdxLoaderGlob } from "./loaders-ezSYYkT7.js";
|
|
2
2
|
import { frontmatter } from "fumadocs-core/content/md/frontmatter";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
@@ -58,7 +58,7 @@ function createMdxLoader({ getCore }) {
|
|
|
58
58
|
code: `export const frontmatter = ${JSON.stringify(matter.data)}`,
|
|
59
59
|
map: null
|
|
60
60
|
};
|
|
61
|
-
const { buildMDX } = await import("./build-mdx-
|
|
61
|
+
const { buildMDX } = await import("./build-mdx-DeW1GoVI.js").then((n) => n.n);
|
|
62
62
|
const compiled = await buildMDX(core, docCollection, {
|
|
63
63
|
isDevelopment,
|
|
64
64
|
source: "\n".repeat(countLines(matter.matter)) + matter.content,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as metaLoaderGlob, t as mdxLoaderGlob } from "../loaders-
|
|
2
|
-
import { n as createCore, t as _Defaults } from "../core-
|
|
3
|
-
import { t as loadConfig } from "../load-from-file
|
|
4
|
-
import { t as indexFile } from "../index-file-
|
|
1
|
+
import { n as metaLoaderGlob, t as mdxLoaderGlob } from "../loaders-ezSYYkT7.js";
|
|
2
|
+
import { n as createCore, t as _Defaults } from "../core-Wd5WdPN4.js";
|
|
3
|
+
import { t as loadConfig } from "../load-from-file--MfW8a2Z.js";
|
|
4
|
+
import { t as indexFile } from "../index-file-CyGG-8n8.js";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
//#region src/next/index.ts
|
|
7
7
|
const defaultPageExtensions = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createMdxLoader } from "../mdx-
|
|
2
|
-
import { n as createCore, t as _Defaults } from "../core-
|
|
3
|
-
import { n as toNode, o as createStandaloneConfigLoader } from "../adapter-
|
|
4
|
-
import { t as createMetaLoader } from "../meta-
|
|
1
|
+
import { t as createMdxLoader } from "../mdx-swV6_ZR5.js";
|
|
2
|
+
import { n as createCore, t as _Defaults } from "../core-Wd5WdPN4.js";
|
|
3
|
+
import { n as toNode, o as createStandaloneConfigLoader } from "../adapter-BketAUOZ.js";
|
|
4
|
+
import { t as createMetaLoader } from "../meta-B6guI74I.js";
|
|
5
5
|
//#region src/node/_loader.ts
|
|
6
6
|
let cachedLoaders;
|
|
7
7
|
const initialize = (options) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createMdxLoader } from "../mdx-
|
|
2
|
-
import { n as createCore, t as _Defaults } from "../core-
|
|
3
|
-
import { n as toNode, o as createStandaloneConfigLoader } from "../adapter-
|
|
4
|
-
import { t as createMetaLoader } from "../meta-
|
|
1
|
+
import { t as createMdxLoader } from "../mdx-swV6_ZR5.js";
|
|
2
|
+
import { n as createCore, t as _Defaults } from "../core-Wd5WdPN4.js";
|
|
3
|
+
import { n as toNode, o as createStandaloneConfigLoader } from "../adapter-BketAUOZ.js";
|
|
4
|
+
import { t as createMetaLoader } from "../meta-B6guI74I.js";
|
|
5
5
|
//#region src/node/loader.ts
|
|
6
6
|
const configLoader = createStandaloneConfigLoader({
|
|
7
7
|
core: createCore({
|
|
@@ -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-BOs29Mj7.js";
|
|
2
2
|
export { IndexFilePlugin, IndexFilePluginOptions, indexFile as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as DocCollection, j as DocsCollection } from "../core-
|
|
2
|
-
import { i as InternalTypeConfig } from "../types-
|
|
3
|
-
import { t as CompiledMDXProperties } from "../build-mdx-
|
|
1
|
+
import { A as DocCollection, j as DocsCollection } from "../core-BOs29Mj7.js";
|
|
2
|
+
import { i as InternalTypeConfig } from "../types-hAduruLB.js";
|
|
3
|
+
import { t as CompiledMDXProperties } from "../build-mdx-YyRh-ZGV.js";
|
|
4
4
|
import { FC, ReactNode } from "react";
|
|
5
5
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as DocCollection, g as AsyncDocsCollectionEntry, h as AsyncDocCollectionEntry, j as DocsCollection, r as CoreOptions, x as ServerOptions } from "../core-
|
|
2
|
-
import { i as InternalTypeConfig, r as FileInfo } from "../types-
|
|
1
|
+
import { A as DocCollection, g as AsyncDocsCollectionEntry, h as AsyncDocCollectionEntry, j as DocsCollection, r as CoreOptions, x as ServerOptions } from "../core-BOs29Mj7.js";
|
|
2
|
+
import { i as InternalTypeConfig, r as FileInfo } from "../types-hAduruLB.js";
|
|
3
3
|
import * as _$_standard_schema_spec0 from "@standard-schema/spec";
|
|
4
4
|
import * as _$fumadocs_core_source0 from "fumadocs-core/source";
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as buildConfig } from "../build-
|
|
2
|
-
import { n as createCore } from "../core-
|
|
3
|
-
import { t as buildMDX } from "../build-mdx-
|
|
4
|
-
import { server } from "./server.
|
|
1
|
+
import { t as buildConfig } from "../build-DPafU2lu.js";
|
|
2
|
+
import { n as createCore } from "../core-Wd5WdPN4.js";
|
|
3
|
+
import { t as buildMDX } from "../build-mdx-DeW1GoVI.js";
|
|
4
|
+
import { server } from "./server.js";
|
|
5
5
|
import { frontmatter } from "fumadocs-core/content/md/frontmatter";
|
|
6
6
|
import fs from "node:fs/promises";
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
@@ -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-BOs29Mj7.js";
|
|
2
2
|
export { AsyncDocCollectionEntry, AsyncDocsCollectionEntry, DocCollectionEntry, DocsCollectionEntry, MetaCollectionEntry, ServerCreate, ServerOptions, server, toFumadocsSource };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MetaMethods, i as InternalTypeConfig, n as DocMethods, r as FileInfo, t as DocData } from "../types-
|
|
1
|
+
import { a as MetaMethods, i as InternalTypeConfig, n as DocMethods, r as FileInfo, t as DocData } from "../types-hAduruLB.js";
|
|
2
2
|
export { DocData, DocMethods, FileInfo, InternalTypeConfig, MetaMethods };
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as IndexFilePluginOptions } from "../core-
|
|
1
|
+
import { p as IndexFilePluginOptions } from "../core-BOs29Mj7.js";
|
|
2
2
|
import { Plugin } from "vite";
|
|
3
3
|
|
|
4
4
|
//#region src/vite/index.d.ts
|
|
@@ -26,7 +26,7 @@ interface PluginOptions {
|
|
|
26
26
|
*/
|
|
27
27
|
outDir?: string;
|
|
28
28
|
}
|
|
29
|
-
declare function mdx(
|
|
29
|
+
declare function mdx(_config?: Record<string, unknown> | Promise<Record<string, unknown>>, pluginOptions?: PluginOptions): Promise<Plugin>;
|
|
30
30
|
declare function postInstall(pluginOptions?: PluginOptions): Promise<void>;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { PluginOptions, mdx as default, postInstall };
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
import { t as createMdxLoader } from "../mdx-
|
|
2
|
-
import { t as buildConfig } from "../build-
|
|
3
|
-
import { n as createCore, r as ValidationError, t as _Defaults } from "../core-
|
|
4
|
-
import { a as createIntegratedConfigLoader, r as toVite } from "../adapter-
|
|
5
|
-
import { t as createMetaLoader } from "../meta-
|
|
6
|
-
import { t as indexFile } from "../index-file-
|
|
7
|
-
import {
|
|
1
|
+
import { t as createMdxLoader } from "../mdx-swV6_ZR5.js";
|
|
2
|
+
import { t as buildConfig } from "../build-DPafU2lu.js";
|
|
3
|
+
import { n as createCore, r as ValidationError, t as _Defaults } from "../core-Wd5WdPN4.js";
|
|
4
|
+
import { a as createIntegratedConfigLoader, r as toVite } from "../adapter-BketAUOZ.js";
|
|
5
|
+
import { t as createMetaLoader } from "../meta-B6guI74I.js";
|
|
6
|
+
import { t as indexFile } from "../index-file-CyGG-8n8.js";
|
|
7
|
+
import { runnerImport } from "vite";
|
|
8
|
+
import { crawlFrameworkPkgs } from "vitefu";
|
|
8
9
|
//#region src/vite/index.ts
|
|
9
|
-
async function mdx(
|
|
10
|
+
async function mdx(_config, pluginOptions = {}) {
|
|
10
11
|
const options = applyDefaults(pluginOptions);
|
|
11
12
|
const core = createViteCore(options);
|
|
12
|
-
await
|
|
13
|
+
const config = await _config ?? (await runnerImport(options.configPath)).module;
|
|
14
|
+
await core.init({ config: buildConfig(config) });
|
|
13
15
|
const configLoader = createIntegratedConfigLoader(core);
|
|
14
16
|
const mdxLoader = toVite(createMdxLoader(configLoader));
|
|
15
17
|
const metaLoader = toVite(createMetaLoader(configLoader, { json: "json" }));
|
|
16
18
|
return {
|
|
17
19
|
name: "fumadocs-mdx",
|
|
18
20
|
enforce: "pre",
|
|
19
|
-
config(config) {
|
|
21
|
+
async config(config, { command }) {
|
|
20
22
|
if (!options.updateViteConfig) return config;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"fumadocs-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"@fumadocs/base-ui"
|
|
33
|
-
]
|
|
34
|
-
} });
|
|
23
|
+
const out = await crawlFrameworkPkgs({
|
|
24
|
+
root: process.cwd(),
|
|
25
|
+
isBuild: command === "build",
|
|
26
|
+
isFrameworkPkgByName(pkgName) {
|
|
27
|
+
if (pkgName.startsWith("@fumapress/") || pkgName.startsWith("@fumadocs/") || pkgName.startsWith("fumadocs-") || pkgName === "fumapress") return true;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return {
|
|
31
|
+
ssr: { noExternal: out.ssr.noExternal },
|
|
32
|
+
optimizeDeps: out.optimizeDeps
|
|
33
|
+
};
|
|
35
34
|
},
|
|
36
35
|
async buildStart() {
|
|
37
36
|
await core.emit({ write: true });
|
|
@@ -40,6 +39,7 @@ async function mdx(config, pluginOptions = {}) {
|
|
|
40
39
|
await core.initServer({ watcher: server.watcher });
|
|
41
40
|
},
|
|
42
41
|
async transform(value, id) {
|
|
42
|
+
if (id.includes("virtual:vite-rsc")) return null;
|
|
43
43
|
try {
|
|
44
44
|
if (metaLoader.filter(id)) return await metaLoader.transform.call(this, value, id);
|
|
45
45
|
if (mdxLoader.filter(id)) return await mdxLoader.transform.call(this, value, id);
|
|
@@ -51,7 +51,7 @@ async function mdx(config, pluginOptions = {}) {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
async function postInstall(pluginOptions = {}) {
|
|
54
|
-
const { loadConfig } = await import("../load-from-file
|
|
54
|
+
const { loadConfig } = await import("../load-from-file--MfW8a2Z.js").then((n) => n.n);
|
|
55
55
|
const core = createViteCore(applyDefaults(pluginOptions));
|
|
56
56
|
await core.init({ config: loadConfig(core, true) });
|
|
57
57
|
await core.emit({ write: true });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as createMdxLoader } from "../mdx-
|
|
2
|
-
import { i as toWebpack, o as createStandaloneConfigLoader } from "../adapter-
|
|
3
|
-
import { t as getCore } from "../webpack-
|
|
1
|
+
import { t as createMdxLoader } from "../mdx-swV6_ZR5.js";
|
|
2
|
+
import { i as toWebpack, o as createStandaloneConfigLoader } from "../adapter-BketAUOZ.js";
|
|
3
|
+
import { t as getCore } from "../webpack-CBlMzMlJ.js";
|
|
4
4
|
//#region src/webpack/mdx.ts
|
|
5
5
|
let instance;
|
|
6
6
|
const loader = function loader(source) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as toWebpack, o as createStandaloneConfigLoader } from "../adapter-
|
|
2
|
-
import { t as createMetaLoader } from "../meta-
|
|
3
|
-
import { t as getCore } from "../webpack-
|
|
1
|
+
import { i as toWebpack, o as createStandaloneConfigLoader } from "../adapter-BketAUOZ.js";
|
|
2
|
+
import { t as createMetaLoader } from "../meta-B6guI74I.js";
|
|
3
|
+
import { t as getCore } from "../webpack-CBlMzMlJ.js";
|
|
4
4
|
//#region src/webpack/meta.ts
|
|
5
5
|
let instance;
|
|
6
6
|
const loader = function(source) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-mdx",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.2",
|
|
4
4
|
"description": "The built-in source for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -11,31 +11,31 @@
|
|
|
11
11
|
"author": "Fuma Nama",
|
|
12
12
|
"repository": "github:fuma-nama/fumadocs",
|
|
13
13
|
"bin": {
|
|
14
|
-
"fumadocs-mdx": "./dist/bin.
|
|
14
|
+
"fumadocs-mdx": "./dist/bin.js"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"dist"
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
20
|
"exports": {
|
|
21
|
-
".": "./dist/index.
|
|
22
|
-
"./bin": "./dist/bin.
|
|
23
|
-
"./bun": "./dist/bun/index.
|
|
24
|
-
"./config": "./dist/config/index.
|
|
25
|
-
"./next": "./dist/next/index.
|
|
26
|
-
"./node": "./dist/node/index.
|
|
27
|
-
"./node/_loader": "./dist/node/_loader.
|
|
28
|
-
"./node/loader": "./dist/node/loader.
|
|
29
|
-
"./plugins/index-file": "./dist/plugins/index-file.
|
|
30
|
-
"./plugins/json-schema": "./dist/plugins/json-schema.
|
|
31
|
-
"./plugins/last-modified": "./dist/plugins/last-modified.
|
|
32
|
-
"./runtime/browser": "./dist/runtime/browser.
|
|
33
|
-
"./runtime/dynamic": "./dist/runtime/dynamic.
|
|
34
|
-
"./runtime/server": "./dist/runtime/server.
|
|
35
|
-
"./runtime/types": "./dist/runtime/types.
|
|
36
|
-
"./vite": "./dist/vite/index.
|
|
37
|
-
"./webpack/mdx": "./dist/webpack/mdx.
|
|
38
|
-
"./webpack/meta": "./dist/webpack/meta.
|
|
21
|
+
".": "./dist/index.js",
|
|
22
|
+
"./bin": "./dist/bin.js",
|
|
23
|
+
"./bun": "./dist/bun/index.js",
|
|
24
|
+
"./config": "./dist/config/index.js",
|
|
25
|
+
"./next": "./dist/next/index.js",
|
|
26
|
+
"./node": "./dist/node/index.js",
|
|
27
|
+
"./node/_loader": "./dist/node/_loader.js",
|
|
28
|
+
"./node/loader": "./dist/node/loader.js",
|
|
29
|
+
"./plugins/index-file": "./dist/plugins/index-file.js",
|
|
30
|
+
"./plugins/json-schema": "./dist/plugins/json-schema.js",
|
|
31
|
+
"./plugins/last-modified": "./dist/plugins/last-modified.js",
|
|
32
|
+
"./runtime/browser": "./dist/runtime/browser.js",
|
|
33
|
+
"./runtime/dynamic": "./dist/runtime/dynamic.js",
|
|
34
|
+
"./runtime/server": "./dist/runtime/server.js",
|
|
35
|
+
"./runtime/types": "./dist/runtime/types.js",
|
|
36
|
+
"./vite": "./dist/vite/index.js",
|
|
37
|
+
"./webpack/mdx": "./dist/webpack/mdx.js",
|
|
38
|
+
"./webpack/meta": "./dist/webpack/meta.js",
|
|
39
39
|
"./package.json": "./package.json"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"estree-util-value-to-estree": "^3.5.0",
|
|
50
50
|
"js-yaml": "^4.1.1",
|
|
51
51
|
"mdast-util-mdx": "^3.0.0",
|
|
52
|
-
"mdast-util-to-markdown": "^2.1.2",
|
|
53
52
|
"picocolors": "^1.1.1",
|
|
54
53
|
"picomatch": "^4.0.4",
|
|
55
54
|
"tinyexec": "^1.1.2",
|
|
@@ -58,28 +57,29 @@
|
|
|
58
57
|
"unist-util-remove-position": "^5.0.0",
|
|
59
58
|
"unist-util-visit": "^5.1.0",
|
|
60
59
|
"vfile": "^6.0.3",
|
|
61
|
-
"
|
|
60
|
+
"vitefu": "^1.1.3",
|
|
61
|
+
"zod": "^4.4.3"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@types/bun": "^1.3.13",
|
|
65
65
|
"@types/js-yaml": "^4.0.9",
|
|
66
66
|
"@types/mdast": "^4.0.4",
|
|
67
67
|
"@types/mdx": "^2.0.13",
|
|
68
|
-
"@types/node": "^25.6.
|
|
68
|
+
"@types/node": "^25.6.2",
|
|
69
69
|
"@types/picomatch": "^4.0.3",
|
|
70
70
|
"@types/react": "^19.2.14",
|
|
71
71
|
"mdast-util-directive": "^3.1.0",
|
|
72
|
-
"next": "16.2.
|
|
73
|
-
"react": "^19.2.
|
|
72
|
+
"next": "16.2.6",
|
|
73
|
+
"react": "^19.2.6",
|
|
74
74
|
"remark": "^15.0.1",
|
|
75
75
|
"remark-directive": "^4.0.0",
|
|
76
76
|
"remark-mdx": "^3.1.1",
|
|
77
|
-
"rolldown": "1.0.0
|
|
78
|
-
"tsdown": "0.
|
|
79
|
-
"vite": "^8.0.
|
|
77
|
+
"rolldown": "1.0.0",
|
|
78
|
+
"tsdown": "0.22.0",
|
|
79
|
+
"vite": "^8.0.11",
|
|
80
80
|
"webpack": "^5.106.2",
|
|
81
|
-
"
|
|
82
|
-
"
|
|
81
|
+
"tsconfig": "0.0.0",
|
|
82
|
+
"fumadocs-core": "16.8.9"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@types/mdast": "*",
|
package/dist/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/runtime/types.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|