@docusaurus/mdx-loader 3.0.0-beta.0 → 3.0.0-rc.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.
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js +20 -11
- package/lib/loader.js.map +1 -1
- package/lib/processor.d.ts +13 -2
- package/lib/processor.d.ts.map +1 -1
- package/lib/processor.js +27 -16
- package/lib/processor.js.map +1 -1
- package/lib/remark/admonitions/index.d.ts.map +1 -1
- package/lib/remark/admonitions/index.js +5 -10
- package/lib/remark/admonitions/index.js.map +1 -1
- package/lib/remark/contentTitle/index.d.ts +15 -0
- package/lib/remark/contentTitle/index.d.ts.map +1 -0
- package/lib/remark/contentTitle/index.js +38 -0
- package/lib/remark/contentTitle/index.js.map +1 -0
- package/lib/remark/details/index.d.ts.map +1 -1
- package/lib/remark/details/index.js +3 -4
- package/lib/remark/details/index.js.map +1 -1
- package/lib/remark/head/index.d.ts.map +1 -1
- package/lib/remark/head/index.js +3 -4
- package/lib/remark/head/index.js.map +1 -1
- package/lib/remark/headings/index.d.ts.map +1 -1
- package/lib/remark/headings/index.js +2 -3
- package/lib/remark/headings/index.js.map +1 -1
- package/lib/remark/mdx1Compat/codeCompatPlugin.d.ts.map +1 -1
- package/lib/remark/mdx1Compat/codeCompatPlugin.js +4 -9
- package/lib/remark/mdx1Compat/codeCompatPlugin.js.map +1 -1
- package/lib/remark/mermaid/index.d.ts.map +1 -1
- package/lib/remark/mermaid/index.js +5 -5
- package/lib/remark/mermaid/index.js.map +1 -1
- package/lib/remark/toc/index.d.ts.map +1 -1
- package/lib/remark/toc/index.js +2 -2
- package/lib/remark/toc/index.js.map +1 -1
- package/lib/remark/transformImage/index.d.ts.map +1 -1
- package/lib/remark/transformImage/index.js +8 -7
- package/lib/remark/transformImage/index.js.map +1 -1
- package/lib/remark/transformLinks/index.d.ts.map +1 -1
- package/lib/remark/transformLinks/index.js +8 -7
- package/lib/remark/transformLinks/index.js.map +1 -1
- package/lib/remark/unusedDirectives/index.d.ts +4 -0
- package/lib/remark/unusedDirectives/index.d.ts.map +1 -0
- package/lib/remark/unusedDirectives/index.js +117 -0
- package/lib/remark/unusedDirectives/index.js.map +1 -0
- package/lib/remark/utils/index.d.ts +10 -3
- package/lib/remark/utils/index.d.ts.map +1 -1
- package/lib/remark/utils/index.js +19 -1
- package/lib/remark/utils/index.js.map +1 -1
- package/package.json +26 -25
- package/src/loader.ts +29 -17
- package/src/processor.ts +36 -18
- package/src/remark/admonitions/index.ts +3 -1
- package/src/remark/contentTitle/index.ts +55 -0
- package/src/remark/details/index.ts +2 -2
- package/src/remark/head/index.ts +2 -2
- package/src/remark/headings/index.ts +1 -1
- package/src/remark/mdx1Compat/codeCompatPlugin.ts +6 -8
- package/src/remark/mermaid/index.ts +7 -4
- package/src/remark/toc/index.ts +11 -5
- package/src/remark/transformImage/index.ts +9 -10
- package/src/remark/transformLinks/index.ts +9 -10
- package/src/remark/unusedDirectives/index.ts +167 -0
- package/src/remark/utils/index.ts +23 -2
- package/src/types.d.mts +34 -0
package/src/types.d.mts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type {WebpackCompilerName} from '@docusaurus/utils';
|
|
9
|
+
|
|
10
|
+
declare module 'vfile' {
|
|
11
|
+
/*
|
|
12
|
+
This map registers the type of the data key of a VFile (TypeScript type).
|
|
13
|
+
This type can be augmented to register custom data types.
|
|
14
|
+
See https://github.com/vfile/vfile#datamap
|
|
15
|
+
*/
|
|
16
|
+
interface DataMap {
|
|
17
|
+
frontMatter: {[key: string]: unknown};
|
|
18
|
+
compilerName: WebpackCompilerName;
|
|
19
|
+
contentTitle?: string;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare module 'unist' {
|
|
24
|
+
interface Data {
|
|
25
|
+
hName?: string;
|
|
26
|
+
hProperties?: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare module 'mdast' {
|
|
31
|
+
interface HeadingData {
|
|
32
|
+
id?: string;
|
|
33
|
+
}
|
|
34
|
+
}
|