@readme/markdown 12.1.0 → 12.2.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.
- package/dist/lib/stripComments.d.ts +2 -1
- package/dist/main.js +149 -13
- package/dist/main.node.js +149 -13
- package/dist/main.node.js.map +1 -1
- package/dist/processor/plugin/toc.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomComponents, HastHeading, IndexableElements, RMDXModule, TocList } from '../../types';
|
|
1
|
+
import type { CustomComponents, HastHeading, IndexableElements, RMDXModule, TocList, Variables } from '../../types';
|
|
2
2
|
import type { Root } from 'hast';
|
|
3
3
|
import type { Transformer } from 'unified';
|
|
4
4
|
interface Options {
|
|
@@ -10,6 +10,6 @@ interface Options {
|
|
|
10
10
|
export declare function extractToc(tree: Root, components?: CustomComponents): HastHeading[];
|
|
11
11
|
/** A rehype plugin to generate a flat list of top-level headings or jsx flow elements. */
|
|
12
12
|
export declare const rehypeToc: ({ components }: Options) => Transformer<Root, Root>;
|
|
13
|
-
export declare const tocToHast: (headings?: HastHeading[]) => TocList;
|
|
14
|
-
export declare const tocHastToMdx: (toc: IndexableElements[] | undefined, components: Record<string, RMDXModule["toc"]
|
|
13
|
+
export declare const tocToHast: (headings?: HastHeading[], variables?: Variables) => TocList;
|
|
14
|
+
export declare const tocHastToMdx: (toc: IndexableElements[] | undefined, components: Record<string, RMDXModule["toc"]>, variables?: Variables) => string;
|
|
15
15
|
export {};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@readme/markdown",
|
|
3
3
|
"description": "ReadMe's React-based Markdown parser",
|
|
4
4
|
"author": "Rafe Goldberg <rafe@readme.io>",
|
|
5
|
-
"version": "12.
|
|
5
|
+
"version": "12.2.0",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"browser": "dist/main.js",
|