@readme/markdown 13.2.0 → 13.3.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/mdast-util/legacy-variable/index.d.ts +2 -0
- package/dist/lib/mdxish.d.ts +2 -1
- package/dist/lib/micromark/legacy-variable/index.d.ts +4 -0
- package/dist/lib/micromark/legacy-variable/syntax.d.ts +10 -0
- package/dist/lib/plain.d.ts +6 -0
- package/dist/main.js +466 -185
- package/dist/main.node.js +466 -185
- package/dist/main.node.js.map +1 -1
- package/dist/processor/transform/mdxish/heading-slugs.d.ts +8 -0
- package/dist/processor/transform/mdxish/variables-code.d.ts +14 -0
- package/package.json +3 -2
package/dist/lib/mdxish.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomComponents } from '../types';
|
|
1
|
+
import type { CustomComponents, Variables } from '../types';
|
|
2
2
|
import type { Root } from 'hast';
|
|
3
3
|
import type { Root as MdastRoot } from 'mdast';
|
|
4
4
|
import { type JSXContext } from '../processor/transform/mdxish/preprocess-jsx-expressions';
|
|
@@ -17,6 +17,7 @@ export interface MdxishOpts {
|
|
|
17
17
|
*/
|
|
18
18
|
safeMode?: boolean;
|
|
19
19
|
useTailwind?: boolean;
|
|
20
|
+
variables?: Variables;
|
|
20
21
|
}
|
|
21
22
|
export declare function mdxishAstProcessor(mdContent: string, opts?: MdxishOpts): {
|
|
22
23
|
processor: import("unified").Processor<MdastRoot, import("unist").Node, import("unist").Node, undefined, undefined>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Extension } from 'micromark-util-types';
|
|
2
|
+
declare module 'micromark-util-types' {
|
|
3
|
+
interface TokenTypeMap {
|
|
4
|
+
legacyVariable: 'legacyVariable';
|
|
5
|
+
legacyVariableMarkerEnd: 'legacyVariableMarkerEnd';
|
|
6
|
+
legacyVariableMarkerStart: 'legacyVariableMarkerStart';
|
|
7
|
+
legacyVariableValue: 'legacyVariableValue';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare function legacyVariable(): Extension;
|
package/dist/lib/plain.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { Nodes } from 'hast';
|
|
2
2
|
interface Options {
|
|
3
|
+
/**
|
|
4
|
+
* When true, outputs variables using `{user.key}` syntax instead of resolving
|
|
5
|
+
* to values or bare key names. Used by search indexing so the frontend can
|
|
6
|
+
* interpolate variables at display time.
|
|
7
|
+
*/
|
|
8
|
+
preserveVariableSyntax?: boolean;
|
|
3
9
|
variables?: Record<string, string>;
|
|
4
10
|
}
|
|
5
11
|
declare const plain: (node: Nodes, opts?: Options) => string | number | true | (string | number)[];
|