fumadocs-mdx 11.9.1 → 11.10.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.
Files changed (52) hide show
  1. package/dist/bin.cjs +1063 -0
  2. package/dist/bin.d.cts +1 -0
  3. package/dist/bin.d.ts +1 -0
  4. package/dist/bin.js +16 -0
  5. package/dist/{browser-CyU2Yl7A.d.cts → browser-B2G8uAF2.d.cts} +1 -1
  6. package/dist/{browser-DEsQvNRx.d.ts → browser-DrH7tKRi.d.ts} +1 -1
  7. package/dist/bun/index.cjs +669 -0
  8. package/dist/bun/index.d.cts +8 -0
  9. package/dist/bun/index.d.ts +8 -0
  10. package/dist/bun/index.js +53 -0
  11. package/dist/chunk-6Y5JDZHD.js +65 -0
  12. package/dist/chunk-CNKI574E.js +82 -0
  13. package/dist/{chunk-GX3THK2Q.js → chunk-IQAEAI4P.js} +25 -25
  14. package/dist/chunk-QJCCVMBJ.js +151 -0
  15. package/dist/{chunk-NUDEC6C5.js → chunk-UOOPSLFY.js} +1 -1
  16. package/dist/{chunk-COQ4VMK2.js → chunk-XXSKWWMB.js} +28 -61
  17. package/dist/config/index.d.cts +1 -1
  18. package/dist/config/index.d.ts +1 -1
  19. package/dist/config/zod-3.d.cts +1 -1
  20. package/dist/config/zod-3.d.ts +1 -1
  21. package/dist/{define-DnJzAZrj.d.cts → define-BH4bnHQl.d.cts} +6 -0
  22. package/dist/{define-DnJzAZrj.d.ts → define-BH4bnHQl.d.ts} +6 -0
  23. package/dist/loader-mdx.cjs +345 -265
  24. package/dist/loader-mdx.js +12 -80
  25. package/dist/next/index.cjs +15 -130
  26. package/dist/next/index.js +15 -33
  27. package/dist/node/loader.cjs +748 -0
  28. package/dist/node/loader.d.cts +5 -0
  29. package/dist/node/loader.d.ts +5 -0
  30. package/dist/node/loader.js +24 -0
  31. package/dist/postinstall-XV4WSHZP.js +9 -0
  32. package/dist/runtime/{async.cjs → next/async.cjs} +4 -4
  33. package/dist/runtime/{async.d.cts → next/async.d.cts} +3 -3
  34. package/dist/runtime/{async.d.ts → next/async.d.ts} +3 -3
  35. package/dist/runtime/{async.js → next/async.js} +6 -6
  36. package/dist/{index.cjs → runtime/next/index.cjs} +4 -6
  37. package/dist/{index.d.cts → runtime/next/index.d.cts} +3 -3
  38. package/dist/{index.d.ts → runtime/next/index.d.ts} +3 -3
  39. package/dist/{index.js → runtime/next/index.js} +1 -1
  40. package/dist/runtime/vite/browser.d.cts +2 -2
  41. package/dist/runtime/vite/browser.d.ts +2 -2
  42. package/dist/runtime/vite/server.d.cts +3 -3
  43. package/dist/runtime/vite/server.d.ts +3 -3
  44. package/dist/{types-WSHJKA8L.d.ts → types-DN9KrG7R.d.ts} +1 -1
  45. package/dist/{types-BmVgoqsr.d.cts → types-DT83Ijs6.d.cts} +1 -1
  46. package/dist/vite/index.cjs +440 -276
  47. package/dist/vite/index.d.cts +4 -1
  48. package/dist/vite/index.d.ts +4 -1
  49. package/dist/vite/index.js +19 -81
  50. package/package.json +24 -17
  51. package/bin.js +0 -5
  52. package/dist/chunk-UCY7OBZG.js +0 -12
@@ -0,0 +1,5 @@
1
+ import * as module from 'module';
2
+
3
+ declare const load: module.LoadHook;
4
+
5
+ export { load };
@@ -0,0 +1,5 @@
1
+ import * as module from 'module';
2
+
3
+ declare const load: module.LoadHook;
4
+
5
+ export { load };
@@ -0,0 +1,24 @@
1
+ import {
2
+ toNode
3
+ } from "../chunk-CNKI574E.js";
4
+ import {
5
+ createMdxLoader,
6
+ dynamicConfig
7
+ } from "../chunk-QJCCVMBJ.js";
8
+ import "../chunk-QQWCBFFE.js";
9
+ import "../chunk-SVTXMVLQ.js";
10
+ import "../chunk-IQAEAI4P.js";
11
+ import {
12
+ findConfigFile
13
+ } from "../chunk-766EAFX6.js";
14
+ import "../chunk-QVZ7JH4H.js";
15
+ import "../chunk-VWJKRQZR.js";
16
+
17
+ // src/node/loader.ts
18
+ var load = toNode(
19
+ createMdxLoader(dynamicConfig(findConfigFile(), ".source")),
20
+ (filePath) => filePath.endsWith(".md") || filePath.endsWith(".mdx")
21
+ );
22
+ export {
23
+ load
24
+ };
@@ -0,0 +1,9 @@
1
+ import {
2
+ postInstall
3
+ } from "./chunk-XXSKWWMB.js";
4
+ import "./chunk-6Y5JDZHD.js";
5
+ import "./chunk-766EAFX6.js";
6
+ import "./chunk-QVZ7JH4H.js";
7
+ export {
8
+ postInstall
9
+ };
@@ -197,7 +197,7 @@ var init_mdx_options = __esm({
197
197
  }
198
198
  });
199
199
 
200
- // src/runtime/async.ts
200
+ // src/runtime/next/async.ts
201
201
  var async_exports = {};
202
202
  __export(async_exports, {
203
203
  _runtimeAsync: () => _runtimeAsync,
@@ -205,7 +205,7 @@ __export(async_exports, {
205
205
  });
206
206
  module.exports = __toCommonJS(async_exports);
207
207
 
208
- // src/runtime/index.ts
208
+ // src/runtime/next/index.ts
209
209
  var import_node_fs = __toESM(require("fs"), 1);
210
210
  var cache = /* @__PURE__ */ new Map();
211
211
  var _runtime = {
@@ -463,7 +463,7 @@ async function buildMDX(cacheKey, source, options) {
463
463
  });
464
464
  }
465
465
 
466
- // src/runtime/async.ts
466
+ // src/runtime/next/async.ts
467
467
  var import_client = require("@fumadocs/mdx-remote/client");
468
468
  var import_node_url = require("url");
469
469
 
@@ -517,7 +517,7 @@ function buildConfig(config) {
517
517
  };
518
518
  }
519
519
 
520
- // src/runtime/async.ts
520
+ // src/runtime/next/async.ts
521
521
  async function getOptions(config, collection) {
522
522
  const col = config.collections.get(collection);
523
523
  if (col?.type === "doc" && col.mdxOptions) return col.mdxOptions;
@@ -1,12 +1,12 @@
1
- import { L as LoadedConfig, a as RuntimeAsync } from '../types-BmVgoqsr.cjs';
1
+ import { L as LoadedConfig, a as RuntimeAsync } from '../../types-DT83Ijs6.cjs';
2
2
  import '@standard-schema/spec';
3
3
  import 'fumadocs-core/source';
4
- import '../define-DnJzAZrj.cjs';
4
+ import '../../define-BH4bnHQl.cjs';
5
5
  import 'fumadocs-core/mdx-plugins';
6
6
  import '@mdx-js/mdx';
7
7
  import 'unified';
8
8
  import 'zod';
9
- import '../build-mdx-DnC1jKvn.cjs';
9
+ import '../../build-mdx-DnC1jKvn.cjs';
10
10
  import 'fumadocs-core/server';
11
11
  import 'react';
12
12
  import 'mdx/types';
@@ -1,12 +1,12 @@
1
- import { L as LoadedConfig, a as RuntimeAsync } from '../types-WSHJKA8L.js';
1
+ import { L as LoadedConfig, a as RuntimeAsync } from '../../types-DN9KrG7R.js';
2
2
  import '@standard-schema/spec';
3
3
  import 'fumadocs-core/source';
4
- import '../define-DnJzAZrj.js';
4
+ import '../../define-BH4bnHQl.js';
5
5
  import 'fumadocs-core/mdx-plugins';
6
6
  import '@mdx-js/mdx';
7
7
  import 'unified';
8
8
  import 'zod';
9
- import '../build-mdx-DnC1jKvn.js';
9
+ import '../../build-mdx-DnC1jKvn.js';
10
10
  import 'fumadocs-core/server';
11
11
  import 'react';
12
12
  import 'mdx/types';
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  _runtime,
3
3
  createMDXSource
4
- } from "../chunk-NUDEC6C5.js";
4
+ } from "../../chunk-UOOPSLFY.js";
5
5
  import {
6
6
  buildMDX
7
- } from "../chunk-QQWCBFFE.js";
8
- import "../chunk-SVTXMVLQ.js";
7
+ } from "../../chunk-QQWCBFFE.js";
8
+ import "../../chunk-SVTXMVLQ.js";
9
9
  import {
10
10
  buildConfig
11
- } from "../chunk-QVZ7JH4H.js";
12
- import "../chunk-VWJKRQZR.js";
11
+ } from "../../chunk-QVZ7JH4H.js";
12
+ import "../../chunk-VWJKRQZR.js";
13
13
 
14
- // src/runtime/async.ts
14
+ // src/runtime/next/async.ts
15
15
  import { executeMdx } from "@fumadocs/mdx-remote/client";
16
16
  import { pathToFileURL } from "url";
17
17
  async function getOptions(config, collection) {
@@ -27,16 +27,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
- // src/index.ts
31
- var index_exports = {};
32
- __export(index_exports, {
30
+ // src/runtime/next/index.ts
31
+ var next_exports = {};
32
+ __export(next_exports, {
33
33
  _runtime: () => _runtime,
34
34
  createMDXSource: () => createMDXSource,
35
35
  resolveFiles: () => resolveFiles
36
36
  });
37
- module.exports = __toCommonJS(index_exports);
38
-
39
- // src/runtime/index.ts
37
+ module.exports = __toCommonJS(next_exports);
40
38
  var import_node_fs = __toESM(require("fs"), 1);
41
39
  var cache = /* @__PURE__ */ new Map();
42
40
  var _runtime = {
@@ -1,12 +1,12 @@
1
1
  import { PageData, MetaData, Source, VirtualFile } from 'fumadocs-core/source';
2
- import { R as Runtime, B as BaseCollectionEntry } from './types-BmVgoqsr.cjs';
2
+ import { R as Runtime, B as BaseCollectionEntry } from '../../types-DT83Ijs6.cjs';
3
3
  import '@standard-schema/spec';
4
- import './define-DnJzAZrj.cjs';
4
+ import '../../define-BH4bnHQl.cjs';
5
5
  import 'fumadocs-core/mdx-plugins';
6
6
  import '@mdx-js/mdx';
7
7
  import 'unified';
8
8
  import 'zod';
9
- import './build-mdx-DnC1jKvn.cjs';
9
+ import '../../build-mdx-DnC1jKvn.cjs';
10
10
  import 'fumadocs-core/server';
11
11
  import 'react';
12
12
  import 'mdx/types';
@@ -1,12 +1,12 @@
1
1
  import { PageData, MetaData, Source, VirtualFile } from 'fumadocs-core/source';
2
- import { R as Runtime, B as BaseCollectionEntry } from './types-WSHJKA8L.js';
2
+ import { R as Runtime, B as BaseCollectionEntry } from '../../types-DN9KrG7R.js';
3
3
  import '@standard-schema/spec';
4
- import './define-DnJzAZrj.js';
4
+ import '../../define-BH4bnHQl.js';
5
5
  import 'fumadocs-core/mdx-plugins';
6
6
  import '@mdx-js/mdx';
7
7
  import 'unified';
8
8
  import 'zod';
9
- import './build-mdx-DnC1jKvn.js';
9
+ import '../../build-mdx-DnC1jKvn.js';
10
10
  import 'fumadocs-core/server';
11
11
  import 'react';
12
12
  import 'mdx/types';
@@ -2,7 +2,7 @@ import {
2
2
  _runtime,
3
3
  createMDXSource,
4
4
  resolveFiles
5
- } from "./chunk-NUDEC6C5.js";
5
+ } from "../../chunk-UOOPSLFY.js";
6
6
  export {
7
7
  _runtime,
8
8
  createMDXSource,
@@ -1,11 +1,11 @@
1
- export { a as ClientLoader, b as ClientLoaderOptions, c as createClientLoader, f as fromConfig, t as toClientRenderer } from '../../browser-CyU2Yl7A.cjs';
1
+ export { a as ClientLoader, b as ClientLoaderOptions, c as createClientLoader, f as fromConfig, t as toClientRenderer } from '../../browser-B2G8uAF2.cjs';
2
2
  import 'react';
3
3
  import '../../build-mdx-DnC1jKvn.cjs';
4
4
  import '@mdx-js/mdx';
5
5
  import 'fumadocs-core/mdx-plugins';
6
6
  import 'fumadocs-core/server';
7
7
  import 'mdx/types';
8
- import '../../define-DnJzAZrj.cjs';
8
+ import '../../define-BH4bnHQl.cjs';
9
9
  import '@standard-schema/spec';
10
10
  import 'unified';
11
11
  import 'zod';
@@ -1,11 +1,11 @@
1
- export { a as ClientLoader, b as ClientLoaderOptions, c as createClientLoader, f as fromConfig, t as toClientRenderer } from '../../browser-DEsQvNRx.js';
1
+ export { a as ClientLoader, b as ClientLoaderOptions, c as createClientLoader, f as fromConfig, t as toClientRenderer } from '../../browser-DrH7tKRi.js';
2
2
  import 'react';
3
3
  import '../../build-mdx-DnC1jKvn.js';
4
4
  import '@mdx-js/mdx';
5
5
  import 'fumadocs-core/mdx-plugins';
6
6
  import 'fumadocs-core/server';
7
7
  import 'mdx/types';
8
- import '../../define-DnJzAZrj.js';
8
+ import '../../define-BH4bnHQl.js';
9
9
  import '@standard-schema/spec';
10
10
  import 'unified';
11
11
  import 'zod';
@@ -1,10 +1,10 @@
1
- import { B as BaseCreate, D as DocMap, M as MetaMap, L as LazyDocMap, C as CompiledMDXFile } from '../../browser-CyU2Yl7A.cjs';
2
- export { a as ClientLoader, b as ClientLoaderOptions, c as createClientLoader, t as toClientRenderer } from '../../browser-CyU2Yl7A.cjs';
1
+ import { B as BaseCreate, D as DocMap, M as MetaMap, L as LazyDocMap, C as CompiledMDXFile } from '../../browser-B2G8uAF2.cjs';
2
+ export { a as ClientLoader, b as ClientLoaderOptions, c as createClientLoader, t as toClientRenderer } from '../../browser-B2G8uAF2.cjs';
3
3
  import { PageData, MetaData, Source } from 'fumadocs-core/source';
4
4
  import { C as CompiledMDXProperties } from '../../build-mdx-DnC1jKvn.cjs';
5
5
  import { FC } from 'react';
6
6
  import { MDXProps } from 'mdx/types';
7
- import '../../define-DnJzAZrj.cjs';
7
+ import '../../define-BH4bnHQl.cjs';
8
8
  import '@standard-schema/spec';
9
9
  import 'fumadocs-core/mdx-plugins';
10
10
  import '@mdx-js/mdx';
@@ -1,10 +1,10 @@
1
- import { B as BaseCreate, D as DocMap, M as MetaMap, L as LazyDocMap, C as CompiledMDXFile } from '../../browser-DEsQvNRx.js';
2
- export { a as ClientLoader, b as ClientLoaderOptions, c as createClientLoader, t as toClientRenderer } from '../../browser-DEsQvNRx.js';
1
+ import { B as BaseCreate, D as DocMap, M as MetaMap, L as LazyDocMap, C as CompiledMDXFile } from '../../browser-DrH7tKRi.js';
2
+ export { a as ClientLoader, b as ClientLoaderOptions, c as createClientLoader, t as toClientRenderer } from '../../browser-DrH7tKRi.js';
3
3
  import { PageData, MetaData, Source } from 'fumadocs-core/source';
4
4
  import { C as CompiledMDXProperties } from '../../build-mdx-DnC1jKvn.js';
5
5
  import { FC } from 'react';
6
6
  import { MDXProps } from 'mdx/types';
7
- import '../../define-DnJzAZrj.js';
7
+ import '../../define-BH4bnHQl.js';
8
8
  import '@standard-schema/spec';
9
9
  import 'fumadocs-core/mdx-plugins';
10
10
  import '@mdx-js/mdx';
@@ -1,6 +1,6 @@
1
1
  import { StandardSchemaV1 } from '@standard-schema/spec';
2
2
  import { Source, PageData, MetaData } from 'fumadocs-core/source';
3
- import { a as DocCollection, M as MetaCollection, b as DocsCollection, G as GlobalConfig } from './define-DnJzAZrj.js';
3
+ import { a as DocCollection, M as MetaCollection, b as DocsCollection, G as GlobalConfig } from './define-BH4bnHQl.js';
4
4
  import { ProcessorOptions } from '@mdx-js/mdx';
5
5
  import { C as CompiledMDXProperties } from './build-mdx-DnC1jKvn.js';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { StandardSchemaV1 } from '@standard-schema/spec';
2
2
  import { Source, PageData, MetaData } from 'fumadocs-core/source';
3
- import { a as DocCollection, M as MetaCollection, b as DocsCollection, G as GlobalConfig } from './define-DnJzAZrj.cjs';
3
+ import { a as DocCollection, M as MetaCollection, b as DocsCollection, G as GlobalConfig } from './define-BH4bnHQl.cjs';
4
4
  import { ProcessorOptions } from '@mdx-js/mdx';
5
5
  import { C as CompiledMDXProperties } from './build-mdx-DnC1jKvn.cjs';
6
6