@readme/markdown 15.3.0 → 15.5.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/components/Accordion/index.tsx +5 -1
- package/components/Tabs/index.tsx +9 -1
- package/components/TailwindStyle/index.tsx +5 -2
- package/dist/components/TailwindStyle/index.d.ts +3 -1
- package/dist/hooks/useRestartAnimatedImages/index.d.ts +14 -0
- package/dist/lib/utils/mdxish/mdxish-expression.d.ts +7 -0
- package/dist/lib/utils/mdxish/mdxish-get-component-name.d.ts +2 -0
- package/dist/main.js +243 -221
- package/dist/main.node.js +243 -221
- package/dist/main.node.js.map +1 -1
- package/dist/processor/compile/list-item.d.ts +2 -2
- package/dist/processor/compile/table-cell-block-markers.d.ts +11 -0
- package/dist/processor/compile/text.d.ts +3 -2
- package/dist/processor/transform/mdxish/evaluate-expressions.d.ts +11 -5
- package/dist/render-fixture.node.js +243 -221
- package/dist/render-fixture.node.js.map +1 -1
- package/dist/utils/tailwind-compiler.d.ts +13 -1
- package/package.json +1 -1
- package/dist/processor/transform/mdxish/components/self-closing-blocks.d.ts +0 -21
- package/dist/processor/transform/mdxish/components/snake-case-components.d.ts +0 -28
- package/dist/processor/transform/mdxish/restore-snake-case-component-name.d.ts +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ListItem, Parents } from 'mdast';
|
|
2
2
|
import type { Info, State } from 'mdast-util-to-markdown';
|
|
3
3
|
/**
|
|
4
4
|
* List-item serializer intended for checklist items
|
|
@@ -8,5 +8,5 @@ import type { Info, State } from 'mdast-util-to-markdown';
|
|
|
8
8
|
* with their checkbox intact (for example, `- [ ]`) instead of dropping it
|
|
9
9
|
* We can add more adjustments if needed
|
|
10
10
|
*/
|
|
11
|
-
declare const listItem: (node: ListItem, parent
|
|
11
|
+
declare const listItem: (node: ListItem, parent: Parents | undefined, state: State, info: Info) => string;
|
|
12
12
|
export default listItem;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Parents, Text } from 'mdast';
|
|
2
|
+
import type { Info, State } from 'mdast-util-to-markdown';
|
|
3
|
+
/**
|
|
4
|
+
* Re-escapes a leading block marker (`-`, `+`, `#`, `>`) at the start of a table cell, or
|
|
5
|
+
* after a `<br />` within one.
|
|
6
|
+
*
|
|
7
|
+
* A cell is serialized mid-line, so the `atBreak` patterns that escape these characters
|
|
8
|
+
* never fire and an author's `| \- one |` round trips to `| - one |` (RM-17203). Cells are
|
|
9
|
+
* serialized as `containerPhrasing(cell, { before: '|' })`, so `|` marks the cell start.
|
|
10
|
+
*/
|
|
11
|
+
export declare const escapeCellStartBlockMarker: (serialized: string, node: Text, parent: Parents | undefined, state: State, info: Info) => string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Parents, Text } from 'mdast';
|
|
2
2
|
import type { Info, State } from 'mdast-util-to-markdown';
|
|
3
|
-
declare const text: (node: Text, parent: Parents | undefined, state: State, info: Info) => string;
|
|
4
|
-
|
|
3
|
+
export declare const text: (node: Text, parent: Parents | undefined, state: State, info: Info) => string;
|
|
4
|
+
declare const mdxishText: (node: Text, parent: Parents | undefined, state: State, info: Info) => string;
|
|
5
|
+
export default mdxishText;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import type { CustomComponents, Variables } from '../../../types';
|
|
1
2
|
import type { Root } from 'mdast';
|
|
2
3
|
import type { Plugin } from 'unified';
|
|
4
|
+
interface Options {
|
|
5
|
+
components?: CustomComponents;
|
|
6
|
+
variables?: Variables;
|
|
7
|
+
}
|
|
3
8
|
/**
|
|
4
9
|
* AST transformer to evaluate MDX expressions.
|
|
5
10
|
* Replaces mdxFlowExpression and mdxTextExpression nodes with their evaluated values.
|
|
6
|
-
* Self-contained expressions resolve directly (e.g. `{1+1}`); expressions that
|
|
7
|
-
*
|
|
8
|
-
* earlier `export const/function` (collected onto
|
|
9
|
-
* Anything else falls through to the error branch and is kept as
|
|
11
|
+
* Self-contained expressions resolve directly (e.g. `{1+1}`); expressions that reference
|
|
12
|
+
* identifiers can resolve if those identifiers are a custom component, the `user` variables
|
|
13
|
+
* object, or were introduced by an earlier `export const/function` (collected onto
|
|
14
|
+
* `file.data.mdxishScope`). Anything else falls through to the error branch and is kept as
|
|
15
|
+
* literal `{...}` text.
|
|
10
16
|
*/
|
|
11
|
-
declare const evaluateExpressions: Plugin<[], Root>;
|
|
17
|
+
declare const evaluateExpressions: Plugin<[Options?], Root>;
|
|
12
18
|
export default evaluateExpressions;
|