fumadocs-mdx 11.6.9 → 11.6.11

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.
@@ -15,7 +15,7 @@ var frontmatterSchema = z.object({
15
15
  icon: z.string().optional(),
16
16
  full: z.boolean().optional(),
17
17
  // Fumadocs OpenAPI generated
18
- _openapi: z.object({}).passthrough().optional()
18
+ _openapi: z.looseObject({}).optional()
19
19
  });
20
20
  var ValidationError = class extends Error {
21
21
  constructor(message, issues) {
@@ -62,6 +62,7 @@ function getDefaultMDXOptions({
62
62
  remarkHeadingOptions,
63
63
  remarkStructureOptions,
64
64
  remarkCodeTabOptions,
65
+ remarkNpmOptions,
65
66
  ...mdxOptions
66
67
  }) {
67
68
  const mdxExports = [
@@ -81,11 +82,11 @@ function getDefaultMDXOptions({
81
82
  }
82
83
  ],
83
84
  remarkImageOptions !== false && [plugins.remarkImage, remarkImageOptions],
84
- // Fumadocs 14 compatibility
85
85
  "remarkCodeTab" in plugins && remarkCodeTabOptions !== false && [
86
86
  plugins.remarkCodeTab,
87
87
  remarkCodeTabOptions
88
88
  ],
89
+ "remarkNpm" in plugins && remarkNpmOptions !== false && [plugins.remarkNpm, remarkNpmOptions],
89
90
  ...v,
90
91
  remarkStructureOptions !== false && [
91
92
  plugins.remarkStructure,
@@ -57,7 +57,7 @@ var frontmatterSchema = import_zod.z.object({
57
57
  icon: import_zod.z.string().optional(),
58
58
  full: import_zod.z.boolean().optional(),
59
59
  // Fumadocs OpenAPI generated
60
- _openapi: import_zod.z.object({}).passthrough().optional()
60
+ _openapi: import_zod.z.looseObject({}).optional()
61
61
  });
62
62
 
63
63
  // src/config/define.ts
@@ -161,6 +161,7 @@ function getDefaultMDXOptions({
161
161
  remarkHeadingOptions,
162
162
  remarkStructureOptions,
163
163
  remarkCodeTabOptions,
164
+ remarkNpmOptions,
164
165
  ...mdxOptions
165
166
  }) {
166
167
  const mdxExports = [
@@ -180,11 +181,11 @@ function getDefaultMDXOptions({
180
181
  }
181
182
  ],
182
183
  remarkImageOptions !== false && [plugins.remarkImage, remarkImageOptions],
183
- // Fumadocs 14 compatibility
184
184
  "remarkCodeTab" in plugins && remarkCodeTabOptions !== false && [
185
185
  plugins.remarkCodeTab,
186
186
  remarkCodeTabOptions
187
187
  ],
188
+ "remarkNpm" in plugins && remarkNpmOptions !== false && [plugins.remarkNpm, remarkNpmOptions],
188
189
  ...v,
189
190
  remarkStructureOptions !== false && [
190
191
  plugins.remarkStructure,
@@ -1,4 +1,4 @@
1
- export { a as BaseCollection, B as BaseCollectionEntry, C as CollectionSchema, D as DefaultMDXOptions, c as DocCollection, d as DocsCollection, F as FileInfo, G as GlobalConfig, M as MarkdownProps, b as MetaCollection, e as defineCollections, h as defineConfig, g as defineDocs, f as frontmatterSchema, l as loadDefaultOptions, m as metaSchema } from '../types-CDl6YYjj.cjs';
1
+ export { a as BaseCollection, B as BaseCollectionEntry, C as CollectionSchema, D as DefaultMDXOptions, c as DocCollection, d as DocsCollection, F as FileInfo, G as GlobalConfig, M as MarkdownProps, b as MetaCollection, e as defineCollections, h as defineConfig, g as defineDocs, f as frontmatterSchema, l as loadDefaultOptions, m as metaSchema } from '../types-DVeuYiq5.cjs';
2
2
  import { Processor, Transformer } from 'unified';
3
3
  import { Root } from 'mdast';
4
4
  import 'mdx/types';
@@ -1,4 +1,4 @@
1
- export { a as BaseCollection, B as BaseCollectionEntry, C as CollectionSchema, D as DefaultMDXOptions, c as DocCollection, d as DocsCollection, F as FileInfo, G as GlobalConfig, M as MarkdownProps, b as MetaCollection, e as defineCollections, h as defineConfig, g as defineDocs, f as frontmatterSchema, l as loadDefaultOptions, m as metaSchema } from '../types-CDl6YYjj.js';
1
+ export { a as BaseCollection, B as BaseCollectionEntry, C as CollectionSchema, D as DefaultMDXOptions, c as DocCollection, d as DocsCollection, F as FileInfo, G as GlobalConfig, M as MarkdownProps, b as MetaCollection, e as defineCollections, h as defineConfig, g as defineDocs, f as frontmatterSchema, l as loadDefaultOptions, m as metaSchema } from '../types-DVeuYiq5.js';
2
2
  import { Processor, Transformer } from 'unified';
3
3
  import { Root } from 'mdast';
4
4
  import 'mdx/types';
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  frontmatterSchema,
3
3
  metaSchema
4
- } from "../chunk-OTM6WYMS.js";
4
+ } from "../chunk-22SBT5SQ.js";
5
5
  import {
6
6
  loadDefaultOptions
7
- } from "../chunk-YRT4TZBA.js";
7
+ } from "../chunk-64MMPGML.js";
8
8
  import {
9
9
  remarkInclude
10
10
  } from "../chunk-AVMO2SRO.js";
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 './types-CDl6YYjj.cjs';
3
- import { R as Runtime } from './types-DZW0R4_d.cjs';
2
+ import { B as BaseCollectionEntry } from './types-DVeuYiq5.cjs';
3
+ import { R as Runtime } from './types-BcUhOIxN.cjs';
4
4
  import 'mdx/types';
5
5
  import 'fumadocs-core/mdx-plugins';
6
6
  import 'fumadocs-core/server';
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 './types-CDl6YYjj.js';
3
- import { R as Runtime } from './types-DVyGNyFh.js';
2
+ import { B as BaseCollectionEntry } from './types-DVeuYiq5.js';
3
+ import { R as Runtime } from './types-HIdjlLo0.js';
4
4
  import 'mdx/types';
5
5
  import 'fumadocs-core/mdx-plugins';
6
6
  import 'fumadocs-core/server';
@@ -290,7 +290,7 @@ var frontmatterSchema = import_zod.z.object({
290
290
  icon: import_zod.z.string().optional(),
291
291
  full: import_zod.z.boolean().optional(),
292
292
  // Fumadocs OpenAPI generated
293
- _openapi: import_zod.z.object({}).passthrough().optional()
293
+ _openapi: import_zod.z.looseObject({}).optional()
294
294
  });
295
295
  var ValidationError = class extends Error {
296
296
  constructor(message, issues) {
@@ -401,6 +401,7 @@ function getDefaultMDXOptions({
401
401
  remarkHeadingOptions,
402
402
  remarkStructureOptions,
403
403
  remarkCodeTabOptions,
404
+ remarkNpmOptions,
404
405
  ...mdxOptions
405
406
  }) {
406
407
  const mdxExports = [
@@ -420,11 +421,11 @@ function getDefaultMDXOptions({
420
421
  }
421
422
  ],
422
423
  remarkImageOptions !== false && [plugins.remarkImage, remarkImageOptions],
423
- // Fumadocs 14 compatibility
424
424
  "remarkCodeTab" in plugins && remarkCodeTabOptions !== false && [
425
425
  plugins.remarkCodeTab,
426
426
  remarkCodeTabOptions
427
427
  ],
428
+ "remarkNpm" in plugins && remarkNpmOptions !== false && [plugins.remarkNpm, remarkNpmOptions],
428
429
  ...v,
429
430
  remarkStructureOptions !== false && [
430
431
  plugins.remarkStructure,
@@ -6,16 +6,16 @@ import {
6
6
  import {
7
7
  ValidationError,
8
8
  validate
9
- } from "./chunk-OTM6WYMS.js";
9
+ } from "./chunk-22SBT5SQ.js";
10
10
  import {
11
11
  buildMDX,
12
12
  countLines
13
13
  } from "./chunk-6PDS7MUA.js";
14
+ import "./chunk-DRVUBK5B.js";
14
15
  import {
15
16
  loadDefaultOptions
16
- } from "./chunk-YRT4TZBA.js";
17
+ } from "./chunk-64MMPGML.js";
17
18
  import "./chunk-AVMO2SRO.js";
18
- import "./chunk-DRVUBK5B.js";
19
19
  import {
20
20
  fumaMatter
21
21
  } from "./chunk-KVWX6THC.js";
@@ -196,7 +196,7 @@ var frontmatterSchema = import_zod.z.object({
196
196
  icon: import_zod.z.string().optional(),
197
197
  full: import_zod.z.boolean().optional(),
198
198
  // Fumadocs OpenAPI generated
199
- _openapi: import_zod.z.object({}).passthrough().optional()
199
+ _openapi: import_zod.z.looseObject({}).optional()
200
200
  });
201
201
  var ValidationError = class extends Error {
202
202
  constructor(message, issues) {
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  ValidationError,
9
9
  validate
10
- } from "../chunk-OTM6WYMS.js";
10
+ } from "../chunk-22SBT5SQ.js";
11
11
  import "../chunk-DRVUBK5B.js";
12
12
  import {
13
13
  fumaMatter
@@ -1,5 +1,5 @@
1
- import { a as RuntimeAsync } from '../types-DZW0R4_d.cjs';
2
- import { L as LoadedConfig } from '../types-CDl6YYjj.cjs';
1
+ import { a as RuntimeAsync } from '../types-BcUhOIxN.cjs';
2
+ import { L as LoadedConfig } from '../types-DVeuYiq5.cjs';
3
3
  import '@standard-schema/spec';
4
4
  import 'fumadocs-core/source';
5
5
  import 'mdx/types';
@@ -1,5 +1,5 @@
1
- import { a as RuntimeAsync } from '../types-DVyGNyFh.js';
2
- import { L as LoadedConfig } from '../types-CDl6YYjj.js';
1
+ import { a as RuntimeAsync } from '../types-HIdjlLo0.js';
2
+ import { L as LoadedConfig } from '../types-DVeuYiq5.js';
3
3
  import '@standard-schema/spec';
4
4
  import 'fumadocs-core/source';
5
5
  import 'mdx/types';
@@ -2,12 +2,12 @@ import {
2
2
  _runtime,
3
3
  createMDXSource
4
4
  } from "../chunk-NUDEC6C5.js";
5
- import {
6
- remarkInclude
7
- } from "../chunk-AVMO2SRO.js";
8
5
  import {
9
6
  buildConfig
10
7
  } from "../chunk-DRVUBK5B.js";
8
+ import {
9
+ remarkInclude
10
+ } from "../chunk-AVMO2SRO.js";
11
11
  import "../chunk-KVWX6THC.js";
12
12
 
13
13
  // src/runtime/async.ts
@@ -1,4 +1,4 @@
1
- import { F as FileInfo, M as MarkdownProps, B as BaseCollectionEntry, L as LoadedConfig } from './types-CDl6YYjj.cjs';
1
+ import { F as FileInfo, M as MarkdownProps, B as BaseCollectionEntry, L as LoadedConfig } from './types-DVeuYiq5.cjs';
2
2
  import { StandardSchemaV1 } from '@standard-schema/spec';
3
3
  import { Source, PageData, MetaData } from 'fumadocs-core/source';
4
4
 
@@ -39,45 +39,19 @@ declare module 'vfile' {
39
39
 
40
40
  declare const metaSchema: z.ZodObject<{
41
41
  title: z.ZodOptional<z.ZodString>;
42
- pages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
42
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
43
43
  description: z.ZodOptional<z.ZodString>;
44
44
  root: z.ZodOptional<z.ZodBoolean>;
45
45
  defaultOpen: z.ZodOptional<z.ZodBoolean>;
46
46
  icon: z.ZodOptional<z.ZodString>;
47
- }, "strip", z.ZodTypeAny, {
48
- root?: boolean | undefined;
49
- title?: string | undefined;
50
- pages?: string[] | undefined;
51
- description?: string | undefined;
52
- defaultOpen?: boolean | undefined;
53
- icon?: string | undefined;
54
- }, {
55
- root?: boolean | undefined;
56
- title?: string | undefined;
57
- pages?: string[] | undefined;
58
- description?: string | undefined;
59
- defaultOpen?: boolean | undefined;
60
- icon?: string | undefined;
61
- }>;
47
+ }, z.core.$strip>;
62
48
  declare const frontmatterSchema: z.ZodObject<{
63
49
  title: z.ZodString;
64
50
  description: z.ZodOptional<z.ZodString>;
65
51
  icon: z.ZodOptional<z.ZodString>;
66
52
  full: z.ZodOptional<z.ZodBoolean>;
67
- _openapi: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
68
- }, "strip", z.ZodTypeAny, {
69
- title: string;
70
- description?: string | undefined;
71
- icon?: string | undefined;
72
- full?: boolean | undefined;
73
- _openapi?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
74
- }, {
75
- title: string;
76
- description?: string | undefined;
77
- icon?: string | undefined;
78
- full?: boolean | undefined;
79
- _openapi?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
80
- }>;
53
+ _openapi: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
54
+ }, z.core.$strip>;
81
55
 
82
56
  type CollectionSchema<Schema extends StandardSchemaV1, Context> = Schema | ((ctx: Context) => Schema);
83
57
  interface BaseCollection {
@@ -177,6 +151,7 @@ type DefaultMDXOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | '
177
151
  remarkHeadingOptions?: plugins.RemarkHeadingOptions;
178
152
  remarkImageOptions?: plugins.RemarkImageOptions | false;
179
153
  remarkCodeTabOptions?: plugins.RemarkCodeTabOptions | false;
154
+ remarkNpmOptions?: plugins.RemarkNpmOptions | false;
180
155
  rehypeCodeOptions?: plugins.RehypeCodeOptions | false;
181
156
  };
182
157
  declare function loadDefaultOptions(config: LoadedConfig): Promise<ProcessorOptions>;
@@ -39,45 +39,19 @@ declare module 'vfile' {
39
39
 
40
40
  declare const metaSchema: z.ZodObject<{
41
41
  title: z.ZodOptional<z.ZodString>;
42
- pages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
42
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
43
43
  description: z.ZodOptional<z.ZodString>;
44
44
  root: z.ZodOptional<z.ZodBoolean>;
45
45
  defaultOpen: z.ZodOptional<z.ZodBoolean>;
46
46
  icon: z.ZodOptional<z.ZodString>;
47
- }, "strip", z.ZodTypeAny, {
48
- root?: boolean | undefined;
49
- title?: string | undefined;
50
- pages?: string[] | undefined;
51
- description?: string | undefined;
52
- defaultOpen?: boolean | undefined;
53
- icon?: string | undefined;
54
- }, {
55
- root?: boolean | undefined;
56
- title?: string | undefined;
57
- pages?: string[] | undefined;
58
- description?: string | undefined;
59
- defaultOpen?: boolean | undefined;
60
- icon?: string | undefined;
61
- }>;
47
+ }, z.core.$strip>;
62
48
  declare const frontmatterSchema: z.ZodObject<{
63
49
  title: z.ZodString;
64
50
  description: z.ZodOptional<z.ZodString>;
65
51
  icon: z.ZodOptional<z.ZodString>;
66
52
  full: z.ZodOptional<z.ZodBoolean>;
67
- _openapi: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
68
- }, "strip", z.ZodTypeAny, {
69
- title: string;
70
- description?: string | undefined;
71
- icon?: string | undefined;
72
- full?: boolean | undefined;
73
- _openapi?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
74
- }, {
75
- title: string;
76
- description?: string | undefined;
77
- icon?: string | undefined;
78
- full?: boolean | undefined;
79
- _openapi?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
80
- }>;
53
+ _openapi: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
54
+ }, z.core.$strip>;
81
55
 
82
56
  type CollectionSchema<Schema extends StandardSchemaV1, Context> = Schema | ((ctx: Context) => Schema);
83
57
  interface BaseCollection {
@@ -177,6 +151,7 @@ type DefaultMDXOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | '
177
151
  remarkHeadingOptions?: plugins.RemarkHeadingOptions;
178
152
  remarkImageOptions?: plugins.RemarkImageOptions | false;
179
153
  remarkCodeTabOptions?: plugins.RemarkCodeTabOptions | false;
154
+ remarkNpmOptions?: plugins.RemarkNpmOptions | false;
180
155
  rehypeCodeOptions?: plugins.RehypeCodeOptions | false;
181
156
  };
182
157
  declare function loadDefaultOptions(config: LoadedConfig): Promise<ProcessorOptions>;
@@ -1,4 +1,4 @@
1
- import { F as FileInfo, M as MarkdownProps, B as BaseCollectionEntry, L as LoadedConfig } from './types-CDl6YYjj.js';
1
+ import { F as FileInfo, M as MarkdownProps, B as BaseCollectionEntry, L as LoadedConfig } from './types-DVeuYiq5.js';
2
2
  import { StandardSchemaV1 } from '@standard-schema/spec';
3
3
  import { Source, PageData, MetaData } from 'fumadocs-core/source';
4
4
 
@@ -272,6 +272,7 @@ function getDefaultMDXOptions({
272
272
  remarkHeadingOptions,
273
273
  remarkStructureOptions,
274
274
  remarkCodeTabOptions,
275
+ remarkNpmOptions,
275
276
  ...mdxOptions
276
277
  }) {
277
278
  const mdxExports = [
@@ -291,11 +292,11 @@ function getDefaultMDXOptions({
291
292
  }
292
293
  ],
293
294
  remarkImageOptions !== false && [plugins.remarkImage, remarkImageOptions],
294
- // Fumadocs 14 compatibility
295
295
  "remarkCodeTab" in plugins && remarkCodeTabOptions !== false && [
296
296
  plugins.remarkCodeTab,
297
297
  remarkCodeTabOptions
298
298
  ],
299
+ "remarkNpm" in plugins && remarkNpmOptions !== false && [plugins.remarkNpm, remarkNpmOptions],
299
300
  ...v,
300
301
  remarkStructureOptions !== false && [
301
302
  plugins.remarkStructure,
@@ -2,13 +2,13 @@ import {
2
2
  buildMDX,
3
3
  countLines
4
4
  } from "../chunk-6PDS7MUA.js";
5
- import {
6
- loadDefaultOptions
7
- } from "../chunk-YRT4TZBA.js";
8
- import "../chunk-AVMO2SRO.js";
9
5
  import {
10
6
  buildConfig
11
7
  } from "../chunk-DRVUBK5B.js";
8
+ import {
9
+ loadDefaultOptions
10
+ } from "../chunk-64MMPGML.js";
11
+ import "../chunk-AVMO2SRO.js";
12
12
  import {
13
13
  fumaMatter
14
14
  } from "../chunk-KVWX6THC.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-mdx",
3
- "version": "11.6.9",
3
+ "version": "11.6.11",
4
4
  "description": "The built-in source for Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -50,7 +50,7 @@
50
50
  "@mdx-js/mdx": "^3.1.0",
51
51
  "@standard-schema/spec": "^1.0.0",
52
52
  "chokidar": "^4.0.3",
53
- "esbuild": "^0.25.5",
53
+ "esbuild": "^0.25.6",
54
54
  "estree-util-value-to-estree": "^3.4.0",
55
55
  "js-yaml": "^4.1.0",
56
56
  "lru-cache": "^11.1.0",
@@ -58,7 +58,7 @@
58
58
  "tinyexec": "^1.0.1",
59
59
  "tinyglobby": "^0.2.14",
60
60
  "unist-util-visit": "^5.0.0",
61
- "zod": "^3.25.63"
61
+ "zod": "^4.0.5"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@types/js-yaml": "^4.0.9",
@@ -66,14 +66,14 @@
66
66
  "@types/mdx": "^2.0.13",
67
67
  "@types/react": "^19.1.8",
68
68
  "mdast-util-mdx-jsx": "^3.2.0",
69
- "next": "^15.3.3",
69
+ "next": "^15.3.5",
70
70
  "unified": "^11.0.5",
71
71
  "vfile": "^6.0.3",
72
- "vite": "^6.3.5",
73
- "webpack": "^5.99.9",
74
- "@fumadocs/mdx-remote": "1.3.3",
72
+ "vite": "^7.0.4",
73
+ "webpack": "^5.100.0",
74
+ "@fumadocs/mdx-remote": "1.3.4",
75
75
  "eslint-config-custom": "0.0.0",
76
- "fumadocs-core": "15.5.3",
76
+ "fumadocs-core": "15.6.3",
77
77
  "tsconfig": "0.0.0"
78
78
  },
79
79
  "peerDependencies": {