@readme/markdown 15.5.1 → 15.6.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/constants.d.ts +2 -0
- package/dist/lib/utils/mdxish/mdxish-expression.d.ts +1 -1
- package/dist/main.js +456 -187
- package/dist/main.node.js +456 -187
- package/dist/main.node.js.map +1 -1
- package/dist/processor/transform/mdxish/images-to-jsx.d.ts +10 -0
- package/dist/processor/transform/mdxish/unwrap-pins.d.ts +9 -0
- package/dist/processor/transform/mdxish/variables-text.d.ts +11 -0
- package/dist/render-fixture.node.js +447 -187
- package/dist/render-fixture.node.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Transform } from 'mdast-util-from-markdown';
|
|
2
|
+
/**
|
|
3
|
+
* Serializes the three image shapes a parsed document carries. An image that picked up readme
|
|
4
|
+
* attributes has no markdown spelling left and goes out as `<Image>`, a plain one stays
|
|
5
|
+
* ``.
|
|
6
|
+
*
|
|
7
|
+
* Order matters: `figure` unwraps into the `image` its caption belongs to, so it runs first.
|
|
8
|
+
*/
|
|
9
|
+
declare const imagesToJsx: () => Transform;
|
|
10
|
+
export default imagesToJsx;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Transform } from 'mdast-util-from-markdown';
|
|
2
|
+
/**
|
|
3
|
+
* A `sidebar: true` magic block (e.g. `[block:code]`) parses into an `rdme-pin` wrapper via
|
|
4
|
+
* `wrapPinnedBlocks`, and remark-stringify throws on any node type without a handler. The mdxish
|
|
5
|
+
* dialect has no spelling for a pin, so the wrapper serializes as its content instead — the same
|
|
6
|
+
* (lossy) unwrap `readmeToMdx` has always done, trading the `sidebar` flag for not crashing.
|
|
7
|
+
*/
|
|
8
|
+
declare const unwrapPins: () => Transform;
|
|
9
|
+
export default unwrapPins;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
import type { Node } from 'mdast';
|
|
1
2
|
import type { Plugin } from 'unified';
|
|
3
|
+
/**
|
|
4
|
+
* The lone `{user.<field>}` reference an expression node holds, or `null` when the node isn't an
|
|
5
|
+
* expression or holds anything else (`{1 + 1}`, a CSS-looking body, two references in one brace).
|
|
6
|
+
* Exported so promotion gates can tell a variable reference apart from an expression that must
|
|
7
|
+
* stay literal.
|
|
8
|
+
*/
|
|
9
|
+
export declare function soleUserVariableExpression(node: Node): {
|
|
10
|
+
name: string;
|
|
11
|
+
wrapped: string;
|
|
12
|
+
} | null;
|
|
2
13
|
declare const variablesTextTransformer: Plugin;
|
|
3
14
|
export default variablesTextTransformer;
|