fumadocs-mdx 11.6.2 → 11.6.4

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.
@@ -1,7 +1,7 @@
1
1
  // src/mdx-plugins/remark-include.ts
2
2
  import { visit } from "unist-util-visit";
3
- import * as path from "node:path";
4
- import * as fs from "node:fs/promises";
3
+ import * as path from "path";
4
+ import * as fs from "fs/promises";
5
5
  import matter from "gray-matter";
6
6
  function flattenNode(node) {
7
7
  if ("children" in node)
@@ -1,5 +1,5 @@
1
1
  // src/runtime/index.ts
2
- import fs from "node:fs";
2
+ import fs from "fs";
3
3
  var _runtime = {
4
4
  doc(files) {
5
5
  return files.map((file) => {
@@ -82,7 +82,10 @@ function getDefaultMDXOptions({
82
82
  ],
83
83
  remarkImageOptions !== false && [plugins.remarkImage, remarkImageOptions],
84
84
  // Fumadocs 14 compatibility
85
- "remarkCodeTab" in plugins && remarkCodeTabOptions !== false && plugins.remarkCodeTab,
85
+ "remarkCodeTab" in plugins && remarkCodeTabOptions !== false && [
86
+ plugins.remarkCodeTab,
87
+ remarkCodeTabOptions
88
+ ],
86
89
  ...v,
87
90
  remarkStructureOptions !== false && [
88
91
  plugins.remarkStructure,
@@ -3,9 +3,9 @@ import {
3
3
  } from "./chunk-DRVUBK5B.js";
4
4
 
5
5
  // src/utils/config.ts
6
- import * as fs from "node:fs/promises";
7
- import * as path from "node:path";
8
- import { pathToFileURL } from "node:url";
6
+ import * as fs from "fs/promises";
7
+ import * as path from "path";
8
+ import { pathToFileURL } from "url";
9
9
  function findConfigFile() {
10
10
  return path.resolve("source.config.ts");
11
11
  }
@@ -86,7 +86,7 @@ function defineDocs(options) {
86
86
  // @ts-expect-error -- internal type inferring
87
87
  meta: defineCollections({
88
88
  type: "meta",
89
- files: ["**/meta.{json,yaml}"],
89
+ files: ["**/*.{json,yaml}"],
90
90
  dir,
91
91
  schema: metaSchema,
92
92
  ...options?.meta
@@ -181,7 +181,10 @@ function getDefaultMDXOptions({
181
181
  ],
182
182
  remarkImageOptions !== false && [plugins.remarkImage, remarkImageOptions],
183
183
  // Fumadocs 14 compatibility
184
- "remarkCodeTab" in plugins && remarkCodeTabOptions !== false && plugins.remarkCodeTab,
184
+ "remarkCodeTab" in plugins && remarkCodeTabOptions !== false && [
185
+ plugins.remarkCodeTab,
186
+ remarkCodeTabOptions
187
+ ],
185
188
  ...v,
186
189
  remarkStructureOptions !== false && [
187
190
  plugins.remarkStructure,
@@ -1,4 +1,4 @@
1
- export { a as BaseCollection, B as BaseCollectionEntry, C as CollectionSchema, h as DefaultMDXOptions, D as DocCollection, c as DocsCollection, F as FileInfo, G as GlobalConfig, M as MarkdownProps, b as MetaCollection, d as defineCollections, g as defineConfig, e as defineDocs, f as frontmatterSchema, i as getDefaultMDXOptions, m as metaSchema } from '../define-Cbpc-b73.cjs';
1
+ export { a as BaseCollection, B as BaseCollectionEntry, C as CollectionSchema, h as DefaultMDXOptions, D as DocCollection, c as DocsCollection, F as FileInfo, G as GlobalConfig, M as MarkdownProps, b as MetaCollection, d as defineCollections, g as defineConfig, e as defineDocs, f as frontmatterSchema, i as getDefaultMDXOptions, m as metaSchema } from '../define-uoePrCQ_.cjs';
2
2
  import { Processor, Transformer } from 'unified';
3
3
  import { Root } from 'mdast';
4
4
  import '@mdx-js/mdx';
@@ -1,4 +1,4 @@
1
- export { a as BaseCollection, B as BaseCollectionEntry, C as CollectionSchema, h as DefaultMDXOptions, D as DocCollection, c as DocsCollection, F as FileInfo, G as GlobalConfig, M as MarkdownProps, b as MetaCollection, d as defineCollections, g as defineConfig, e as defineDocs, f as frontmatterSchema, i as getDefaultMDXOptions, m as metaSchema } from '../define-Cbpc-b73.js';
1
+ export { a as BaseCollection, B as BaseCollectionEntry, C as CollectionSchema, h as DefaultMDXOptions, D as DocCollection, c as DocsCollection, F as FileInfo, G as GlobalConfig, M as MarkdownProps, b as MetaCollection, d as defineCollections, g as defineConfig, e as defineDocs, f as frontmatterSchema, i as getDefaultMDXOptions, m as metaSchema } from '../define-uoePrCQ_.js';
2
2
  import { Processor, Transformer } from 'unified';
3
3
  import { Root } from 'mdast';
4
4
  import '@mdx-js/mdx';
@@ -4,10 +4,10 @@ import {
4
4
  } from "../chunk-2ZOW45YZ.js";
5
5
  import {
6
6
  remarkInclude
7
- } from "../chunk-MK7EXW7O.js";
7
+ } from "../chunk-3UUEUK4M.js";
8
8
  import {
9
9
  getDefaultMDXOptions
10
- } from "../chunk-IOENRFUX.js";
10
+ } from "../chunk-7UCWBLFI.js";
11
11
 
12
12
  // src/config/define.ts
13
13
  function defineCollections(options) {
@@ -35,7 +35,7 @@ function defineDocs(options) {
35
35
  // @ts-expect-error -- internal type inferring
36
36
  meta: defineCollections({
37
37
  type: "meta",
38
- files: ["**/meta.{json,yaml}"],
38
+ files: ["**/*.{json,yaml}"],
39
39
  dir,
40
40
  schema: metaSchema,
41
41
  ...options?.meta
@@ -19,7 +19,7 @@ type DefaultMDXOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | '
19
19
  remarkStructureOptions?: plugins.StructureOptions | false;
20
20
  remarkHeadingOptions?: plugins.RemarkHeadingOptions;
21
21
  remarkImageOptions?: plugins.RemarkImageOptions | false;
22
- remarkCodeTabOptions?: false;
22
+ remarkCodeTabOptions?: plugins.RemarkCodeTabOptions | false;
23
23
  rehypeCodeOptions?: plugins.RehypeCodeOptions | false;
24
24
  };
25
25
  declare function getDefaultMDXOptions({ valueToExport, rehypeCodeOptions, remarkImageOptions, remarkHeadingOptions, remarkStructureOptions, remarkCodeTabOptions, ...mdxOptions }: DefaultMDXOptions): ProcessorOptions;
@@ -19,7 +19,7 @@ type DefaultMDXOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | '
19
19
  remarkStructureOptions?: plugins.StructureOptions | false;
20
20
  remarkHeadingOptions?: plugins.RemarkHeadingOptions;
21
21
  remarkImageOptions?: plugins.RemarkImageOptions | false;
22
- remarkCodeTabOptions?: false;
22
+ remarkCodeTabOptions?: plugins.RemarkCodeTabOptions | false;
23
23
  rehypeCodeOptions?: plugins.RehypeCodeOptions | false;
24
24
  };
25
25
  declare function getDefaultMDXOptions({ valueToExport, rehypeCodeOptions, remarkImageOptions, remarkHeadingOptions, remarkStructureOptions, remarkCodeTabOptions, ...mdxOptions }: DefaultMDXOptions): ProcessorOptions;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { PageData, MetaData, Source, VirtualFile } from 'fumadocs-core/source';
2
- import { B as BaseCollectionEntry } from './define-Cbpc-b73.cjs';
3
- import { R as Runtime } from './types-CY4MX9if.cjs';
2
+ import { B as BaseCollectionEntry } from './define-uoePrCQ_.cjs';
3
+ import { R as Runtime } from './types-Cph8Ml_K.cjs';
4
4
  import '@mdx-js/mdx';
5
5
  import 'mdx/types';
6
6
  import 'fumadocs-core/mdx-plugins';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { PageData, MetaData, Source, VirtualFile } from 'fumadocs-core/source';
2
- import { B as BaseCollectionEntry } from './define-Cbpc-b73.js';
3
- import { R as Runtime } from './types-DeEXKgfl.js';
2
+ import { B as BaseCollectionEntry } from './define-uoePrCQ_.js';
3
+ import { R as Runtime } from './types-BvEsyMKj.js';
4
4
  import '@mdx-js/mdx';
5
5
  import 'mdx/types';
6
6
  import 'fumadocs-core/mdx-plugins';
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  _runtime,
3
3
  createMDXSource,
4
4
  resolveFiles
5
- } from "./chunk-4LSNX4UE.js";
5
+ } from "./chunk-7SSA5RCV.js";
6
6
  export {
7
7
  _runtime,
8
8
  createMDXSource,
@@ -121,7 +121,10 @@ function getDefaultMDXOptions({
121
121
  ],
122
122
  remarkImageOptions !== false && [plugins.remarkImage, remarkImageOptions],
123
123
  // Fumadocs 14 compatibility
124
- "remarkCodeTab" in plugins && remarkCodeTabOptions !== false && plugins.remarkCodeTab,
124
+ "remarkCodeTab" in plugins && remarkCodeTabOptions !== false && [
125
+ plugins.remarkCodeTab,
126
+ remarkCodeTabOptions
127
+ ],
125
128
  ...v,
126
129
  remarkStructureOptions !== false && [
127
130
  plugins.remarkStructure,
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  getConfigHash,
3
3
  loadConfig
4
- } from "./chunk-HFLDWPJA.js";
4
+ } from "./chunk-LC4HO353.js";
5
5
  import {
6
6
  validate
7
7
  } from "./chunk-2ZOW45YZ.js";
8
8
  import {
9
9
  remarkInclude
10
- } from "./chunk-MK7EXW7O.js";
10
+ } from "./chunk-3UUEUK4M.js";
11
11
  import "./chunk-DRVUBK5B.js";
12
12
 
13
13
  // src/loader-mdx.ts
14
- import * as path2 from "node:path";
15
- import { parse } from "node:querystring";
14
+ import * as path2 from "path";
15
+ import { parse } from "querystring";
16
16
  import grayMatter from "gray-matter";
17
17
 
18
18
  // src/utils/build-mdx.ts
@@ -49,8 +49,8 @@ async function buildMDX(cacheKey, source, options = {}) {
49
49
  }
50
50
 
51
51
  // src/utils/git-timestamp.ts
52
- import path from "node:path";
53
- import fs from "node:fs";
52
+ import path from "path";
53
+ import fs from "fs";
54
54
  import { spawn } from "cross-spawn";
55
55
  var cache2 = /* @__PURE__ */ new Map();
56
56
  function getGitTimestamp(file) {
@@ -104,7 +104,7 @@ async function loader(source, callback) {
104
104
  }
105
105
  let mdxOptions = collection?.mdxOptions;
106
106
  if (!mdxOptions) {
107
- const { getDefaultMDXOptions } = await import("./mdx-options-CAU273O3.js");
107
+ const { getDefaultMDXOptions } = await import("./mdx-options-7J2A6BUA.js");
108
108
  config._mdx_loader ??= {};
109
109
  const extendedOptions = config.global?.mdxOptions;
110
110
  config._mdx_loader.cachedProcessorOptions ??= typeof extendedOptions === "function" ? getDefaultMDXOptions(await extendedOptions()) : getDefaultMDXOptions(extendedOptions ?? {});
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDefaultMDXOptions
3
- } from "./chunk-IOENRFUX.js";
3
+ } from "./chunk-7UCWBLFI.js";
4
4
  export {
5
5
  getDefaultMDXOptions
6
6
  };
@@ -2,7 +2,7 @@ import {
2
2
  findConfigFile,
3
3
  getConfigHash,
4
4
  loadConfig
5
- } from "../chunk-HFLDWPJA.js";
5
+ } from "../chunk-LC4HO353.js";
6
6
  import {
7
7
  ValidationError,
8
8
  validate
@@ -10,19 +10,19 @@ import {
10
10
  import "../chunk-DRVUBK5B.js";
11
11
 
12
12
  // src/next/create.ts
13
- import path3 from "node:path";
13
+ import path3 from "path";
14
14
 
15
15
  // src/map/index.ts
16
- import * as path2 from "node:path";
17
- import * as fs2 from "node:fs/promises";
16
+ import * as path2 from "path";
17
+ import * as fs2 from "fs/promises";
18
18
 
19
19
  // src/map/generate.ts
20
- import * as path from "node:path";
21
- import * as fs from "node:fs/promises";
20
+ import * as path from "path";
21
+ import * as fs from "fs/promises";
22
22
  import fg from "fast-glob";
23
23
 
24
24
  // src/utils/get-type-from-path.ts
25
- import { extname } from "node:path";
25
+ import { extname } from "path";
26
26
  var docTypes = [".mdx", ".md"];
27
27
  var metaTypes = [".json", ".yaml"];
28
28
  function getTypeFromPath(path5) {
@@ -338,8 +338,8 @@ function createMDX({
338
338
  }
339
339
 
340
340
  // src/postinstall.ts
341
- import * as path4 from "node:path";
342
- import * as fs3 from "node:fs/promises";
341
+ import * as path4 from "path";
342
+ import * as fs3 from "fs/promises";
343
343
  async function postInstall(configPath = findConfigFile()) {
344
344
  const jsOut = path4.resolve(".source/index.ts");
345
345
  const hash = await getConfigHash(configPath);
@@ -1,5 +1,5 @@
1
- import { L as LoadedConfig, a as RuntimeAsync } from '../types-CY4MX9if.cjs';
2
- import '../define-Cbpc-b73.cjs';
1
+ import { L as LoadedConfig, a as RuntimeAsync } from '../types-Cph8Ml_K.cjs';
2
+ import '../define-uoePrCQ_.cjs';
3
3
  import '@mdx-js/mdx';
4
4
  import 'mdx/types';
5
5
  import 'fumadocs-core/mdx-plugins';
@@ -1,5 +1,5 @@
1
- import { L as LoadedConfig, a as RuntimeAsync } from '../types-DeEXKgfl.js';
2
- import '../define-Cbpc-b73.js';
1
+ import { L as LoadedConfig, a as RuntimeAsync } from '../types-BvEsyMKj.js';
2
+ import '../define-uoePrCQ_.js';
3
3
  import '@mdx-js/mdx';
4
4
  import 'mdx/types';
5
5
  import 'fumadocs-core/mdx-plugins';
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  _runtime,
3
3
  createMDXSource
4
- } from "../chunk-4LSNX4UE.js";
4
+ } from "../chunk-7SSA5RCV.js";
5
5
  import {
6
6
  remarkInclude
7
- } from "../chunk-MK7EXW7O.js";
7
+ } from "../chunk-3UUEUK4M.js";
8
8
  import {
9
9
  buildConfig
10
10
  } from "../chunk-DRVUBK5B.js";
@@ -1,4 +1,4 @@
1
- import { D as DocCollection, b as MetaCollection, c as DocsCollection, G as GlobalConfig, F as FileInfo, M as MarkdownProps, B as BaseCollectionEntry } from './define-Cbpc-b73.js';
1
+ import { D as DocCollection, b as MetaCollection, c as DocsCollection, G as GlobalConfig, F as FileInfo, M as MarkdownProps, B as BaseCollectionEntry } from './define-uoePrCQ_.js';
2
2
  import { StandardSchemaV1 } from '@standard-schema/spec';
3
3
  import { Source, PageData, MetaData } from 'fumadocs-core/source';
4
4
  import { ProcessorOptions } from '@mdx-js/mdx';
@@ -1,4 +1,4 @@
1
- import { D as DocCollection, b as MetaCollection, c as DocsCollection, G as GlobalConfig, F as FileInfo, M as MarkdownProps, B as BaseCollectionEntry } from './define-Cbpc-b73.cjs';
1
+ import { D as DocCollection, b as MetaCollection, c as DocsCollection, G as GlobalConfig, F as FileInfo, M as MarkdownProps, B as BaseCollectionEntry } from './define-uoePrCQ_.cjs';
2
2
  import { StandardSchemaV1 } from '@standard-schema/spec';
3
3
  import { Source, PageData, MetaData } from 'fumadocs-core/source';
4
4
  import { ProcessorOptions } from '@mdx-js/mdx';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-mdx",
3
- "version": "11.6.2",
3
+ "version": "11.6.4",
4
4
  "description": "The built-in source for Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -46,31 +46,31 @@
46
46
  "@standard-schema/spec": "^1.0.0",
47
47
  "chokidar": "^4.0.3",
48
48
  "cross-spawn": "^7.0.6",
49
- "esbuild": "^0.25.3",
50
- "estree-util-value-to-estree": "^3.3.3",
49
+ "esbuild": "^0.25.4",
50
+ "estree-util-value-to-estree": "^3.4.0",
51
51
  "fast-glob": "^3.3.3",
52
52
  "gray-matter": "^4.0.3",
53
53
  "js-yaml": "^4.1.0",
54
54
  "lru-cache": "^11.1.0",
55
55
  "picocolors": "^1.1.1",
56
56
  "unist-util-visit": "^5.0.0",
57
- "zod": "^3.24.3"
57
+ "zod": "^3.24.4"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/cross-spawn": "^6.0.6",
61
61
  "@types/js-yaml": "^4.0.9",
62
62
  "@types/mdast": "^4.0.3",
63
63
  "@types/mdx": "^2.0.13",
64
- "@types/react": "^19.1.2",
64
+ "@types/react": "^19.1.4",
65
65
  "mdast-util-mdx-jsx": "^3.2.0",
66
- "next": "^15.3.1",
66
+ "next": "^15.3.2",
67
67
  "unified": "^11.0.5",
68
68
  "vfile": "^6.0.3",
69
- "webpack": "^5.99.7",
70
- "@fumadocs/mdx-remote": "1.3.0",
69
+ "webpack": "^5.99.8",
70
+ "@fumadocs/mdx-remote": "1.3.1",
71
71
  "eslint-config-custom": "0.0.0",
72
- "fumadocs-core": "15.2.13",
73
- "tsconfig": "0.0.0"
72
+ "tsconfig": "0.0.0",
73
+ "fumadocs-core": "15.3.3"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@fumadocs/mdx-remote": "^1.2.0",