@readme/markdown 13.6.2 → 13.7.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.
@@ -1,5 +1,7 @@
1
1
  import type { Blockquote, Heading, Root } from 'mdast';
2
2
  import type { Callout } from 'types';
3
3
  export declare const wrapHeading: (node: Blockquote | Callout) => Heading;
4
- declare const calloutTransformer: () => (tree: Root) => void;
4
+ declare const calloutTransformer: ({ isMdxish }?: {
5
+ isMdxish?: boolean;
6
+ }) => (tree: Root) => void;
5
7
  export default calloutTransformer;
@@ -13,7 +13,9 @@ import validateMCPIntro from './validate-mcpintro';
13
13
  import variablesTransformer from './variables';
14
14
  export { compatabilityTransfomer, divTransformer, injectComponents, mdxToHast, mdxishTables, mermaidTransformer, readmeComponentsTransformer, readmeToMdx, tablesToJsx, tailwindTransformer, handleMissingComponents, validateMCPIntro, variablesTransformer, };
15
15
  export declare const defaultTransforms: {
16
- calloutTransformer: () => (tree: import("mdast").Root) => void;
16
+ calloutTransformer: ({ isMdxish }?: {
17
+ isMdxish?: boolean;
18
+ }) => (tree: import("mdast").Root) => void;
17
19
  codeTabsTransformer: ({ copyButtons }?: {
18
20
  copyButtons?: boolean;
19
21
  }) => (tree: import("mdast").Node) => import("mdast").Node;
@@ -23,12 +25,18 @@ export declare const defaultTransforms: {
23
25
  }) => (tree: import("mdast").Node) => import("mdast").Node;
24
26
  gemojiTransformer: () => (tree: import("mdast").Root) => import("mdast").Root;
25
27
  };
26
- export declare const mdxishTransformers: ((() => (tree: import("mdast").Root) => void) | (({ copyButtons }?: {
28
+ export declare const mdxishTransformers: ((({ copyButtons }?: {
27
29
  copyButtons?: boolean;
28
30
  }) => (tree: import("mdast").Node) => import("mdast").Node) | (({ isMdxish }?: {
29
31
  isMdxish?: boolean;
30
- }) => (tree: import("mdast").Node) => import("mdast").Node))[];
31
- declare const _default: ((() => (tree: import("mdast").Root) => void) | (({ copyButtons }?: {
32
+ }) => (tree: import("mdast").Node) => import("mdast").Node) | ((({ isMdxish }?: {
33
+ isMdxish?: boolean;
34
+ }) => (tree: import("mdast").Root) => void) | {
35
+ isMdxish: boolean;
36
+ })[])[];
37
+ declare const _default: ((({ isMdxish }?: {
38
+ isMdxish?: boolean;
39
+ }) => (tree: import("mdast").Root) => void) | (({ copyButtons }?: {
32
40
  copyButtons?: boolean;
33
41
  }) => (tree: import("mdast").Node) => import("mdast").Node) | (() => (tree: import("mdast").Node) => void) | (() => (tree: import("mdast").Root) => import("mdast").Root) | (({ isMdxish }?: {
34
42
  isMdxish?: boolean;
@@ -7,7 +7,8 @@ import type { Plugin } from 'unified';
7
7
  * - JSX component elements (Image, Callout, Embed, Recipe) into their corresponding MDAST types
8
8
  * - Magic block image nodes (type: 'image') into image-block
9
9
  * - Magic block embed nodes (type: 'embed') into embed-block
10
- * - Figure nodes containing images (from magic blocks with captions) - transforms the inner image
10
+ * - Figure nodes (magic blocks with captions) into flat image-block with caption string
11
+ * - Normalizes all image-block attrs (border, align, sizing, caption) to a consistent shape
11
12
  *
12
13
  * This is controlled by the `newEditorTypes` flag to maintain backwards compatibility.
13
14
  */
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": "13.6.2",
5
+ "version": "13.7.0",
6
6
  "main": "dist/main.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "browser": "dist/main.js",
@@ -43,6 +43,7 @@
43
43
  "lodash.escape": "^4.0.1",
44
44
  "lodash.kebabcase": "^4.1.1",
45
45
  "mdast-util-find-and-replace": "^3.0.1",
46
+ "mdast-util-gfm": "^3.1.0",
46
47
  "mdast-util-gfm-strikethrough": "^2.0.0",
47
48
  "mdast-util-mdx-expression": "2.0.0",
48
49
  "mdast-util-phrasing": "^4.1.0",