fumadocs-mdx 12.0.3 → 13.0.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 (80) hide show
  1. package/dist/bin.cjs +1116 -359
  2. package/dist/bin.js +4 -4
  3. package/dist/build-mdx-CCNr86q6.d.ts +53 -0
  4. package/dist/build-mdx-D-r3_eQL.d.cts +53 -0
  5. package/dist/bun/index.cjs +196 -52
  6. package/dist/bun/index.d.cts +8 -3
  7. package/dist/bun/index.d.ts +8 -3
  8. package/dist/bun/index.js +19 -10
  9. package/dist/{chunk-QAUWMR5D.js → chunk-3J3WL7WN.js} +23 -5
  10. package/dist/{chunk-6Y5JDZHD.js → chunk-CXA4JO4Z.js} +1 -21
  11. package/dist/chunk-EELYB2XC.js +207 -0
  12. package/dist/{chunk-46UPKP5R.js → chunk-II3H5ZVZ.js} +5 -5
  13. package/dist/{chunk-LGYVNESJ.js → chunk-JVZFH6ND.js} +6 -22
  14. package/dist/{chunk-LMG6UWCL.js → chunk-K5ZLPEIQ.js} +56 -16
  15. package/dist/{chunk-OMAMTKDE.js → chunk-KILFIBVW.js} +3 -12
  16. package/dist/chunk-NVRDCY6Z.js +30 -0
  17. package/dist/{chunk-RMDXSZYE.js → chunk-XQ5O7IPO.js} +31 -24
  18. package/dist/chunk-XZY2AWJI.js +81 -0
  19. package/dist/{chunk-VXEBLM4X.js → chunk-YVCR6FUH.js} +1 -1
  20. package/dist/config/index.cjs +56 -16
  21. package/dist/config/index.d.cts +2 -1
  22. package/dist/config/index.d.ts +2 -1
  23. package/dist/config/index.js +1 -1
  24. package/dist/{define-DJbJduHy.d.ts → core-B6j6Fxse.d.cts} +89 -2
  25. package/dist/{define-DJbJduHy.d.cts → core-B6j6Fxse.d.ts} +89 -2
  26. package/dist/index.cjs +0 -109
  27. package/dist/index.d.cts +75 -9
  28. package/dist/index.d.ts +75 -9
  29. package/dist/index.js +0 -11
  30. package/dist/{load-UUXLUBHL.js → load-MNG3CLET.js} +1 -3
  31. package/dist/next/index.cjs +298 -234
  32. package/dist/next/index.d.cts +2 -11
  33. package/dist/next/index.d.ts +2 -11
  34. package/dist/next/index.js +177 -141
  35. package/dist/node/loader.cjs +228 -85
  36. package/dist/node/loader.js +19 -9
  37. package/dist/plugins/json-schema.cjs +162 -0
  38. package/dist/plugins/json-schema.d.cts +24 -0
  39. package/dist/plugins/json-schema.d.ts +24 -0
  40. package/dist/plugins/json-schema.js +78 -0
  41. package/dist/runtime/next/async.cjs +108 -70
  42. package/dist/runtime/next/async.d.cts +9 -6
  43. package/dist/runtime/next/async.d.ts +9 -6
  44. package/dist/runtime/next/async.js +8 -18
  45. package/dist/runtime/next/index.cjs +25 -14
  46. package/dist/runtime/next/index.d.cts +11 -8
  47. package/dist/runtime/next/index.d.ts +11 -8
  48. package/dist/runtime/next/index.js +2 -2
  49. package/dist/runtime/vite/browser.cjs +7 -3
  50. package/dist/runtime/vite/browser.d.cts +56 -7
  51. package/dist/runtime/vite/browser.d.ts +56 -7
  52. package/dist/runtime/vite/browser.js +2 -1
  53. package/dist/runtime/vite/server.cjs +40 -34
  54. package/dist/runtime/vite/server.d.cts +13 -10
  55. package/dist/runtime/vite/server.d.ts +13 -10
  56. package/dist/runtime/vite/server.js +8 -23
  57. package/dist/{types-TeHjsmja.d.ts → types-AGzTfBmf.d.ts} +3 -10
  58. package/dist/{types-BRx1QsIJ.d.cts → types-DKGMoay5.d.cts} +3 -10
  59. package/dist/vite/index.cjs +443 -249
  60. package/dist/vite/index.d.cts +23 -10
  61. package/dist/vite/index.d.ts +23 -10
  62. package/dist/vite/index.js +213 -36
  63. package/dist/{loader-mdx.cjs → webpack/index.cjs} +268 -82
  64. package/dist/{loader-mdx.d.ts → webpack/index.d.cts} +1 -0
  65. package/dist/{loader-mdx.d.cts → webpack/index.d.ts} +1 -0
  66. package/dist/webpack/index.js +44 -0
  67. package/loader-mdx.cjs +1 -1
  68. package/package.json +30 -16
  69. package/dist/browser-BupUnhpC.d.ts +0 -98
  70. package/dist/browser-R0x9IPaQ.d.cts +0 -98
  71. package/dist/chunk-ADR6R7HM.js +0 -29
  72. package/dist/chunk-IQAEAI4P.js +0 -66
  73. package/dist/chunk-XMFLD5J6.js +0 -30
  74. package/dist/chunk-ZLCSVXCD.js +0 -10
  75. package/dist/chunk-ZX7TM4AR.js +0 -127
  76. package/dist/loader-mdx.js +0 -25
  77. package/dist/postinstall-SCSXM4IM.js +0 -10
  78. package/dist/shared-CfiiRctw.d.ts +0 -70
  79. package/dist/shared-fFqiuWJC.d.cts +0 -70
  80. package/dist/watcher-HGOH3APP.js +0 -22
package/dist/index.d.ts CHANGED
@@ -1,13 +1,79 @@
1
- export { A as AsyncDocCollectionEntry, D as DocCollectionEntry, a as DocData, b as DocMethods, F as FileInfo, M as MetaCollectionEntry, m as missingProcessedMarkdown } from './shared-CfiiRctw.js';
2
- export { AnyCollectionEntry, _runtime, createMDXSource, resolveFiles } from './runtime/next/index.js';
3
- export { E as ExtractedReference } from './define-DJbJduHy.js';
4
- export { c as AsyncDocOut, A as AsyncRuntimeFile, D as DocOut, M as MetaOut, a as Runtime, R as RuntimeAsync, b as RuntimeFile } from './types-TeHjsmja.js';
5
- import 'fumadocs-core/mdx-plugins';
6
- import 'fumadocs-core/server';
7
- import 'react';
8
- import 'mdx/types';
9
- import 'fumadocs-core/source';
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-B6j6Fxse.js';
5
+ export { p as Core, C as CoreOptions, j as EmitEntry, n as EmitOptions, i as Plugin, k as PluginContext, l as PluginOption, S as ServerContext, o as createCore } from './core-B6j6Fxse.js';
6
+ import { Root } from 'mdast';
7
+ import { C as CompiledMDXProperties } from './build-mdx-CCNr86q6.js';
10
8
  import '@standard-schema/spec';
11
9
  import '@mdx-js/mdx';
12
10
  import 'unified';
13
11
  import 'zod';
12
+ 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 };
package/dist/index.js CHANGED
@@ -1,11 +0,0 @@
1
- import {
2
- _runtime,
3
- createMDXSource,
4
- resolveFiles
5
- } from "./chunk-OMAMTKDE.js";
6
- import "./chunk-ZLCSVXCD.js";
7
- export {
8
- _runtime,
9
- createMDXSource,
10
- resolveFiles
11
- };
@@ -1,9 +1,7 @@
1
1
  import {
2
- getConfigHash,
3
2
  loadConfig
4
- } from "./chunk-LGYVNESJ.js";
3
+ } from "./chunk-JVZFH6ND.js";
5
4
  import "./chunk-U4MQ44TS.js";
6
5
  export {
7
- getConfigHash,
8
6
  loadConfig
9
7
  };