fumadocs-mdx 14.0.0 → 14.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 (67) hide show
  1. package/dist/bin.cjs +270 -201
  2. package/dist/bun/index.cjs +63 -28
  3. package/dist/bun/index.d.cts +7 -1
  4. package/dist/bun/index.d.ts +7 -1
  5. package/dist/bun/index.js +6 -5
  6. package/dist/{chunk-5YXP7JLN.js → chunk-5OBUOALK.js} +8 -5
  7. package/dist/{chunk-XHJCLBZ4.js → chunk-7UKSZSPY.js} +87 -162
  8. package/dist/{chunk-7L2KNF6B.js → chunk-BEBCWQC7.js} +51 -7
  9. package/dist/{chunk-5UMZCWKV.js → chunk-IQGEFL2B.js} +1 -1
  10. package/dist/{chunk-SRSRFOVI.js → chunk-K6HCOGOX.js} +3 -3
  11. package/dist/{chunk-OXSRIWQW.js → chunk-MTTISKQJ.js} +3 -2
  12. package/dist/chunk-WBIHDYMN.js +126 -0
  13. package/dist/config/index.d.cts +6 -1
  14. package/dist/config/index.d.ts +6 -1
  15. package/dist/{index-D7JdSMpp.d.cts → core-B9ZoS6sA.d.ts} +73 -4
  16. package/dist/{index-D7JdSMpp.d.ts → core-DTuP23zu.d.cts} +73 -4
  17. package/dist/{index-BlVBvy-z.d.ts → index-BD8Woo4m.d.cts} +1 -1
  18. package/dist/{index-P2NNUkHn.d.cts → index-CNOvhtOn.d.ts} +1 -1
  19. package/dist/index.d.cts +56 -3
  20. package/dist/index.d.ts +56 -3
  21. package/dist/{load-from-file-I3ALLIVB.js → load-from-file-5HUQN36V.js} +1 -1
  22. package/dist/next/index.cjs +260 -192
  23. package/dist/next/index.d.cts +7 -2
  24. package/dist/next/index.d.ts +7 -2
  25. package/dist/next/index.js +10 -8
  26. package/dist/node/loader.cjs +72 -37
  27. package/dist/node/loader.js +3 -3
  28. package/dist/plugins/index-file.cjs +69 -45
  29. package/dist/plugins/index-file.d.cts +7 -22
  30. package/dist/plugins/index-file.d.ts +7 -22
  31. package/dist/plugins/index-file.js +2 -2
  32. package/dist/plugins/json-schema.d.cts +7 -1
  33. package/dist/plugins/json-schema.d.ts +7 -1
  34. package/dist/plugins/last-modified.cjs +41 -6
  35. package/dist/plugins/last-modified.d.cts +11 -1
  36. package/dist/plugins/last-modified.d.ts +11 -1
  37. package/dist/plugins/last-modified.js +34 -4
  38. package/dist/runtime/browser.cjs +7 -8
  39. package/dist/runtime/browser.d.cts +22 -19
  40. package/dist/runtime/browser.d.ts +22 -19
  41. package/dist/runtime/browser.js +5 -6
  42. package/dist/runtime/dynamic.cjs +81 -43
  43. package/dist/runtime/dynamic.d.cts +12 -12
  44. package/dist/runtime/dynamic.d.ts +12 -12
  45. package/dist/runtime/dynamic.js +9 -8
  46. package/dist/runtime/server.cjs +9 -6
  47. package/dist/runtime/server.d.cts +10 -157
  48. package/dist/runtime/server.d.ts +10 -157
  49. package/dist/runtime/server.js +3 -3
  50. package/dist/runtime/types.cjs +18 -0
  51. package/dist/runtime/types.d.cts +61 -0
  52. package/dist/runtime/types.d.ts +61 -0
  53. package/dist/runtime/types.js +0 -0
  54. package/dist/vite/index.cjs +257 -190
  55. package/dist/vite/index.d.cts +7 -2
  56. package/dist/vite/index.d.ts +7 -2
  57. package/dist/vite/index.js +7 -6
  58. package/dist/webpack/mdx.cjs +60 -25
  59. package/dist/webpack/mdx.d.cts +8 -2
  60. package/dist/webpack/mdx.d.ts +8 -2
  61. package/dist/webpack/mdx.js +4 -4
  62. package/dist/webpack/meta.cjs +60 -25
  63. package/dist/webpack/meta.d.cts +8 -2
  64. package/dist/webpack/meta.d.ts +8 -2
  65. package/dist/webpack/meta.js +4 -4
  66. package/package.json +2 -2
  67. package/dist/chunk-PKI7ZDA5.js +0 -29
package/dist/index.d.ts CHANGED
@@ -1,8 +1,61 @@
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';
2
- import '@mdx-js/mdx';
1
+ export { p as CompilationContext, u as Core, i as CoreOptions, n as EmitEntry, s as EmitOptions, E as ExtractedReference, j as Plugin, o as PluginContext, q as PluginOption, r as ServerContext, T as TransformOptions, _ as _Defaults, t as createCore } from './core-B9ZoS6sA.js';
2
+ import { createProcessor } from '@mdx-js/mdx';
3
+ import { StructuredData } from 'fumadocs-core/mdx-plugins';
4
+ import { TOCItemType } from 'fumadocs-core/toc';
5
+ import { FC } from 'react';
6
+ import { MDXProps } from 'mdx/types';
3
7
  import '@standard-schema/spec';
4
8
  import 'unified';
5
- import 'fumadocs-core/mdx-plugins';
6
9
  import 'zod';
7
10
  import 'chokidar';
8
11
  import 'vfile';
12
+ import 'fumadocs-core/source';
13
+ import './runtime/types.js';
14
+ import 'fumadocs-core/mdx-plugins/remark-structure';
15
+ import 'mdast';
16
+
17
+ type Processor = ReturnType<typeof createProcessor>;
18
+ interface CompilerOptions {
19
+ addDependency: (file: string) => void;
20
+ }
21
+ interface CompiledMDXProperties<Frontmatter = Record<string, unknown>> {
22
+ frontmatter: Frontmatter;
23
+ structuredData: StructuredData;
24
+ toc: TOCItemType[];
25
+ default: FC<MDXProps>;
26
+ /**
27
+ * Enable from `postprocess` option.
28
+ */
29
+ _markdown?: string;
30
+ /**
31
+ * Enable from `postprocess` option.
32
+ */
33
+ _mdast?: string;
34
+ }
35
+ interface FumadocsDataMap {
36
+ /**
37
+ * [Fumadocs MDX] raw frontmatter, you can modify it
38
+ */
39
+ frontmatter?: Record<string, unknown>;
40
+ /**
41
+ * [Fumadocs MDX] additional ESM exports to write
42
+ */
43
+ 'mdx-export'?: {
44
+ name: string;
45
+ value: unknown;
46
+ }[];
47
+ /**
48
+ * [Fumadocs MDX] The compiler object from loader
49
+ */
50
+ _compiler?: CompilerOptions;
51
+ /**
52
+ * [Fumadocs MDX] get internal processor, do not use this on user land.
53
+ */
54
+ _getProcessor?: (format: 'md' | 'mdx') => Processor;
55
+ }
56
+ declare module 'vfile' {
57
+ interface DataMap extends FumadocsDataMap {
58
+ }
59
+ }
60
+
61
+ export type { CompiledMDXProperties };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadConfig
3
- } from "./chunk-OXSRIWQW.js";
3
+ } from "./chunk-MTTISKQJ.js";
4
4
  import "./chunk-ZY6UZ7NH.js";
5
5
  import "./chunk-E5DJTSIM.js";
6
6
  export {