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
@@ -1,70 +0,0 @@
1
- import { StructuredData } from 'fumadocs-core/mdx-plugins';
2
- import { TableOfContents } from 'fumadocs-core/server';
3
- import { FC } from 'react';
4
- import { MDXProps } from 'mdx/types';
5
- import { E as ExtractedReference } from './define-DJbJduHy.cjs';
6
-
7
- interface FileInfo {
8
- /**
9
- * virtualized path for Source API
10
- */
11
- path: string;
12
- /**
13
- * the file path in file system
14
- */
15
- fullPath: string;
16
- }
17
- interface DocData {
18
- /**
19
- * Compiled MDX content (as component)
20
- */
21
- body: FC<MDXProps>;
22
- /**
23
- * table of contents generated from content.
24
- */
25
- toc: TableOfContents;
26
- /**
27
- * structured data for document search indexing.
28
- */
29
- structuredData: StructuredData;
30
- /**
31
- * Raw exports from the compiled MDX file.
32
- */
33
- _exports: Record<string, unknown>;
34
- /**
35
- * Last modified date of document file, obtained from version control.
36
- *
37
- * Only available when `lastModifiedTime` is enabled on global config.
38
- */
39
- lastModified?: Date;
40
- /**
41
- * extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
42
- */
43
- extractedReferences?: ExtractedReference[];
44
- }
45
- interface DocMethods {
46
- /**
47
- * file info
48
- */
49
- info: FileInfo;
50
- /**
51
- * get document as text.
52
- *
53
- * - `type: raw` - read the original content from file system.
54
- * - `type: processed` - get the processed Markdown content, only available when `includeProcessedMarkdown` is enabled on collection config.
55
- */
56
- getText: (type: 'raw' | 'processed') => Promise<string>;
57
- }
58
- type MetaCollectionEntry<Data> = Data & {
59
- /**
60
- * file info
61
- */
62
- info: FileInfo;
63
- };
64
- type DocCollectionEntry<Frontmatter> = DocData & DocMethods & Frontmatter;
65
- type AsyncDocCollectionEntry<Frontmatter> = DocMethods & {
66
- load: () => Promise<DocData>;
67
- } & Frontmatter;
68
- declare function missingProcessedMarkdown(): never;
69
-
70
- export { type AsyncDocCollectionEntry as A, type DocCollectionEntry as D, type FileInfo as F, type MetaCollectionEntry as M, type DocData as a, type DocMethods as b, missingProcessedMarkdown as m };
@@ -1,22 +0,0 @@
1
- // src/next/map/watcher.ts
2
- import { FSWatcher } from "chokidar";
3
- function watcher(configPath, config, ignored) {
4
- const watcher2 = new FSWatcher({
5
- ignoreInitial: true,
6
- persistent: true,
7
- ignored
8
- });
9
- watcher2.add(configPath);
10
- for (const collection of config.collections.values()) {
11
- if (collection.type === "docs") {
12
- watcher2.add(collection.docs.dir);
13
- watcher2.add(collection.meta.dir);
14
- } else {
15
- watcher2.add(collection.dir);
16
- }
17
- }
18
- return watcher2;
19
- }
20
- export {
21
- watcher
22
- };