fumadocs-mdx 13.0.8 → 14.0.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.
Files changed (104) hide show
  1. package/dist/bin.cjs +924 -901
  2. package/dist/bin.js +3 -3
  3. package/dist/build-mdx-6UAK5FF5.js +8 -0
  4. package/dist/bun/index.cjs +578 -471
  5. package/dist/bun/index.d.cts +3 -2
  6. package/dist/bun/index.d.ts +3 -2
  7. package/dist/bun/index.js +12 -12
  8. package/dist/chunk-4JSFLXXT.js +8 -0
  9. package/dist/chunk-5UMZCWKV.js +17 -0
  10. package/dist/chunk-5YXP7JLN.js +138 -0
  11. package/dist/{chunk-2E2JCOSO.js → chunk-6NISOLQ6.js} +16 -44
  12. package/dist/chunk-7L2KNF6B.js +180 -0
  13. package/dist/chunk-E5DJTSIM.js +86 -0
  14. package/dist/{chunk-K5ZLPEIQ.js → chunk-FBLMK4RS.js} +9 -6
  15. package/dist/{chunk-QXHN25N3.js → chunk-OXSRIWQW.js} +7 -8
  16. package/dist/chunk-PKI7ZDA5.js +29 -0
  17. package/dist/{chunk-3J3WL7WN.js → chunk-SLY7WXTX.js} +71 -58
  18. package/dist/{chunk-5FTSWCB4.js → chunk-SRSRFOVI.js} +8 -10
  19. package/dist/chunk-TYJDYTKH.js +85 -0
  20. package/dist/chunk-XHJCLBZ4.js +406 -0
  21. package/dist/{chunk-2HXTGJBI.js → chunk-ZY6UZ7NH.js} +22 -19
  22. package/dist/config/index.cjs +79 -71
  23. package/dist/config/index.d.cts +2 -1
  24. package/dist/config/index.d.ts +2 -1
  25. package/dist/config/index.js +5 -5
  26. package/dist/index-BlVBvy-z.d.ts +8 -0
  27. package/dist/{core-DB7TdlyC.d.cts → index-D7JdSMpp.d.cts} +99 -61
  28. package/dist/{core-DB7TdlyC.d.ts → index-D7JdSMpp.d.ts} +99 -61
  29. package/dist/index-P2NNUkHn.d.cts +8 -0
  30. package/dist/index.d.cts +3 -74
  31. package/dist/index.d.ts +3 -74
  32. package/dist/load-from-file-I3ALLIVB.js +8 -0
  33. package/dist/next/index.cjs +698 -476
  34. package/dist/next/index.d.cts +11 -1
  35. package/dist/next/index.d.ts +11 -1
  36. package/dist/next/index.js +78 -281
  37. package/dist/node/loader.cjs +704 -602
  38. package/dist/node/loader.js +10 -11
  39. package/dist/plugins/index-file.cjs +471 -0
  40. package/dist/plugins/index-file.d.cts +29 -0
  41. package/dist/plugins/index-file.d.ts +29 -0
  42. package/dist/plugins/index-file.js +8 -0
  43. package/dist/plugins/json-schema.d.cts +3 -2
  44. package/dist/plugins/json-schema.d.ts +3 -2
  45. package/dist/plugins/last-modified.cjs +75 -0
  46. package/dist/plugins/last-modified.d.cts +27 -0
  47. package/dist/plugins/last-modified.d.ts +27 -0
  48. package/dist/plugins/last-modified.js +44 -0
  49. package/dist/runtime/{vite/browser.cjs → browser.cjs} +40 -53
  50. package/dist/runtime/browser.d.cts +50 -0
  51. package/dist/runtime/browser.d.ts +50 -0
  52. package/dist/runtime/browser.js +68 -0
  53. package/dist/runtime/dynamic.cjs +985 -0
  54. package/dist/runtime/dynamic.d.cts +27 -0
  55. package/dist/runtime/dynamic.d.ts +27 -0
  56. package/dist/runtime/dynamic.js +78 -0
  57. package/dist/runtime/server.cjs +173 -0
  58. package/dist/runtime/server.d.cts +161 -0
  59. package/dist/runtime/server.d.ts +161 -0
  60. package/dist/runtime/server.js +8 -0
  61. package/dist/vite/index.cjs +934 -638
  62. package/dist/vite/index.d.cts +12 -22
  63. package/dist/vite/index.d.ts +12 -22
  64. package/dist/vite/index.js +30 -221
  65. package/dist/webpack/mdx.cjs +613 -515
  66. package/dist/webpack/mdx.d.cts +9 -1
  67. package/dist/webpack/mdx.d.ts +9 -1
  68. package/dist/webpack/mdx.js +12 -17
  69. package/dist/webpack/meta.cjs +327 -233
  70. package/dist/webpack/meta.d.cts +9 -1
  71. package/dist/webpack/meta.d.ts +9 -1
  72. package/dist/webpack/meta.js +13 -15
  73. package/package.json +15 -32
  74. package/dist/build-mdx-BjXOmv0b.d.cts +0 -53
  75. package/dist/build-mdx-CY5UldCO.d.ts +0 -53
  76. package/dist/chunk-2AQRQXSO.js +0 -119
  77. package/dist/chunk-CXA4JO4Z.js +0 -45
  78. package/dist/chunk-DMJ6I4C3.js +0 -76
  79. package/dist/chunk-FSZMKRVH.js +0 -80
  80. package/dist/chunk-II3H5ZVZ.js +0 -77
  81. package/dist/chunk-KILFIBVW.js +0 -75
  82. package/dist/chunk-NVRDCY6Z.js +0 -30
  83. package/dist/chunk-VUEZTR2H.js +0 -26
  84. package/dist/index-D7s7kCc2.d.cts +0 -7
  85. package/dist/index-D7s7kCc2.d.ts +0 -7
  86. package/dist/load-from-file-AVYOFOI7.js +0 -7
  87. package/dist/preset-ZMP6U62C.js +0 -6
  88. package/dist/runtime/next/async.cjs +0 -760
  89. package/dist/runtime/next/async.d.cts +0 -19
  90. package/dist/runtime/next/async.d.ts +0 -19
  91. package/dist/runtime/next/async.js +0 -86
  92. package/dist/runtime/next/index.cjs +0 -136
  93. package/dist/runtime/next/index.d.cts +0 -33
  94. package/dist/runtime/next/index.d.ts +0 -33
  95. package/dist/runtime/next/index.js +0 -11
  96. package/dist/runtime/vite/browser.d.cts +0 -59
  97. package/dist/runtime/vite/browser.d.ts +0 -59
  98. package/dist/runtime/vite/browser.js +0 -11
  99. package/dist/runtime/vite/server.cjs +0 -243
  100. package/dist/runtime/vite/server.d.cts +0 -30
  101. package/dist/runtime/vite/server.d.ts +0 -30
  102. package/dist/runtime/vite/server.js +0 -111
  103. package/dist/types-Bnh9n7mj.d.cts +0 -45
  104. package/dist/types-ey1AZqrg.d.ts +0 -45
package/dist/index.d.cts CHANGED
@@ -1,79 +1,8 @@
1
- import { StructuredData } from 'fumadocs-core/mdx-plugins';
2
- import { TOCItemType } from 'fumadocs-core/toc';
3
- import { MDXContent } from 'mdx/types';
4
- import { E as ExtractedReference } from './core-DB7TdlyC.cjs';
5
- export { r as Core, C as CoreOptions, k as EmitEntry, o as EmitOptions, i as Plugin, l as PluginContext, n as PluginOption, S as ServerContext, q as createCore, p as findConfigFile } from './core-DB7TdlyC.cjs';
6
- import { Root } from 'mdast';
7
- import { C as CompiledMDXProperties } from './build-mdx-BjXOmv0b.cjs';
1
+ export { n as CompilationContext, r as Core, C as CoreOptions, k as EmitEntry, p as EmitOptions, E as ExtractedReference, j as Plugin, l as PluginContext, o as PluginOption, S as ServerContext, T as TransformOptions, _ as _Defaults, q as createCore } from './index-D7JdSMpp.cjs';
8
2
  import '@mdx-js/mdx';
9
3
  import '@standard-schema/spec';
10
4
  import 'unified';
5
+ import 'fumadocs-core/mdx-plugins';
11
6
  import 'zod';
12
7
  import 'chokidar';
13
- import 'react';
14
-
15
- interface FileInfo {
16
- /**
17
- * virtualized path for Source API
18
- */
19
- path: string;
20
- /**
21
- * the file path in file system
22
- */
23
- fullPath: string;
24
- }
25
- interface DocData {
26
- /**
27
- * Compiled MDX content (as component)
28
- */
29
- body: MDXContent;
30
- /**
31
- * table of contents generated from content.
32
- */
33
- toc: TOCItemType[];
34
- /**
35
- * structured data for document search indexing.
36
- */
37
- structuredData: StructuredData;
38
- /**
39
- * Raw exports from the compiled MDX file.
40
- */
41
- _exports: Record<string, unknown>;
42
- /**
43
- * Last modified date of document file, obtained from version control.
44
- *
45
- * Only available when `lastModifiedTime` is enabled on global config.
46
- */
47
- lastModified?: Date;
48
- /**
49
- * extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
50
- */
51
- extractedReferences?: ExtractedReference[];
52
- }
53
- interface DocMethods {
54
- /**
55
- * file info
56
- */
57
- info: FileInfo;
58
- /**
59
- * get document as text.
60
- *
61
- * - `type: raw` - read the original content from file system.
62
- * - `type: processed` - get the processed Markdown content, only available when `includeProcessedMarkdown` is enabled on collection config.
63
- */
64
- getText: (type: 'raw' | 'processed') => Promise<string>;
65
- getMDAST: () => Promise<Root>;
66
- }
67
- type MetaCollectionEntry<Data> = Data & {
68
- /**
69
- * file info
70
- */
71
- info: FileInfo;
72
- };
73
- type DocCollectionEntry<Frontmatter> = DocData & DocMethods & Frontmatter;
74
- type AsyncDocCollectionEntry<Frontmatter> = DocMethods & {
75
- load: () => Promise<DocData>;
76
- } & Frontmatter;
77
- declare function createDocMethods(info: FileInfo, load: () => Promise<CompiledMDXProperties<any>>): DocMethods;
78
-
79
- export { type AsyncDocCollectionEntry, type DocCollectionEntry, type DocData, type DocMethods, ExtractedReference, type FileInfo, type MetaCollectionEntry, createDocMethods };
8
+ import 'vfile';
package/dist/index.d.ts CHANGED
@@ -1,79 +1,8 @@
1
- import { StructuredData } from 'fumadocs-core/mdx-plugins';
2
- import { TOCItemType } from 'fumadocs-core/toc';
3
- import { MDXContent } from 'mdx/types';
4
- import { E as ExtractedReference } from './core-DB7TdlyC.js';
5
- export { r as Core, C as CoreOptions, k as EmitEntry, o as EmitOptions, i as Plugin, l as PluginContext, n as PluginOption, S as ServerContext, q as createCore, p as findConfigFile } from './core-DB7TdlyC.js';
6
- import { Root } from 'mdast';
7
- import { C as CompiledMDXProperties } from './build-mdx-CY5UldCO.js';
1
+ export { n as CompilationContext, r as Core, C as CoreOptions, k as EmitEntry, p as EmitOptions, E as ExtractedReference, j as Plugin, l as PluginContext, o as PluginOption, S as ServerContext, T as TransformOptions, _ as _Defaults, q as createCore } from './index-D7JdSMpp.js';
8
2
  import '@mdx-js/mdx';
9
3
  import '@standard-schema/spec';
10
4
  import 'unified';
5
+ import 'fumadocs-core/mdx-plugins';
11
6
  import 'zod';
12
7
  import 'chokidar';
13
- import 'react';
14
-
15
- interface FileInfo {
16
- /**
17
- * virtualized path for Source API
18
- */
19
- path: string;
20
- /**
21
- * the file path in file system
22
- */
23
- fullPath: string;
24
- }
25
- interface DocData {
26
- /**
27
- * Compiled MDX content (as component)
28
- */
29
- body: MDXContent;
30
- /**
31
- * table of contents generated from content.
32
- */
33
- toc: TOCItemType[];
34
- /**
35
- * structured data for document search indexing.
36
- */
37
- structuredData: StructuredData;
38
- /**
39
- * Raw exports from the compiled MDX file.
40
- */
41
- _exports: Record<string, unknown>;
42
- /**
43
- * Last modified date of document file, obtained from version control.
44
- *
45
- * Only available when `lastModifiedTime` is enabled on global config.
46
- */
47
- lastModified?: Date;
48
- /**
49
- * extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
50
- */
51
- extractedReferences?: ExtractedReference[];
52
- }
53
- interface DocMethods {
54
- /**
55
- * file info
56
- */
57
- info: FileInfo;
58
- /**
59
- * get document as text.
60
- *
61
- * - `type: raw` - read the original content from file system.
62
- * - `type: processed` - get the processed Markdown content, only available when `includeProcessedMarkdown` is enabled on collection config.
63
- */
64
- getText: (type: 'raw' | 'processed') => Promise<string>;
65
- getMDAST: () => Promise<Root>;
66
- }
67
- type MetaCollectionEntry<Data> = Data & {
68
- /**
69
- * file info
70
- */
71
- info: FileInfo;
72
- };
73
- type DocCollectionEntry<Frontmatter> = DocData & DocMethods & Frontmatter;
74
- type AsyncDocCollectionEntry<Frontmatter> = DocMethods & {
75
- load: () => Promise<DocData>;
76
- } & Frontmatter;
77
- declare function createDocMethods(info: FileInfo, load: () => Promise<CompiledMDXProperties<any>>): DocMethods;
78
-
79
- export { type AsyncDocCollectionEntry, type DocCollectionEntry, type DocData, type DocMethods, ExtractedReference, type FileInfo, type MetaCollectionEntry, createDocMethods };
8
+ import 'vfile';
@@ -0,0 +1,8 @@
1
+ import {
2
+ loadConfig
3
+ } from "./chunk-OXSRIWQW.js";
4
+ import "./chunk-ZY6UZ7NH.js";
5
+ import "./chunk-E5DJTSIM.js";
6
+ export {
7
+ loadConfig
8
+ };