@tinacms/mdx 1.6.3 → 1.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.
@@ -0,0 +1,2 @@
1
+ import { RichTextField } from '@tinacms/schema-tools';
2
+ export declare const field: RichTextField;
@@ -0,0 +1 @@
1
+ export {};
@@ -2,3 +2,4 @@ export declare function removePosition(tree: any): any;
2
2
  export declare const print: (tree: object) => string;
3
3
  export declare const nodePath: (dir: string) => string;
4
4
  export declare const mdPath: (dir: string) => string;
5
+ export declare const jsonPath: (dir: string) => string;
@@ -3,9 +3,9 @@
3
3
 
4
4
 
5
5
  */
6
- import { RichTextParseError } from './remarkToPlate';
7
6
  import type { RichTextType } from '@tinacms/schema-tools';
8
7
  import type * as Plate from './plate';
8
+ import { RichTextParseError } from './remarkToPlate';
9
9
  /**
10
10
  * ### Convert the MDXAST into an API-friendly format
11
11
  *
@@ -1,7 +1,7 @@
1
1
  import type { RichTextField } from '@tinacms/schema-tools';
2
+ import type * as Md from 'mdast';
2
3
  import type { MdxJsxAttribute } from 'mdast-util-mdx-jsx';
3
4
  import * as Plate from '../parse/plate';
4
- import type * as Md from 'mdast';
5
5
  export declare const stringifyPropsInline: (element: Plate.MdxInlineElement, field: RichTextField, imageCallback: (url: string) => string) => {
6
6
  attributes: MdxJsxAttribute[];
7
7
  children: Md.PhrasingContent[];
@@ -1,11 +1,6 @@
1
- /**
2
-
3
-
4
-
5
- */
6
- import { MdxJsxTextElement, MdxJsxFlowElement } from 'mdast-util-mdx-jsx';
7
1
  import type { RichTextType } from '@tinacms/schema-tools';
8
2
  import type * as Md from 'mdast';
3
+ import { MdxJsxFlowElement, MdxJsxTextElement } from 'mdast-util-mdx-jsx';
9
4
  import type * as Plate from '../parse/plate';
10
5
  declare module 'mdast' {
11
6
  interface StaticPhrasingContentMap {
@@ -21,7 +16,7 @@ declare module 'mdast' {
21
16
  mdxJsxFlowElement: MdxJsxFlowElement;
22
17
  }
23
18
  }
24
- export declare const stringifyMDX: (value: Plate.RootElement, field: RichTextType, imageCallback: (url: string) => string) => string | undefined;
19
+ export declare const serializeMDX: (value: Plate.RootElement, field: RichTextType, imageCallback: (url: string) => string) => string | Plate.RootElement | undefined;
25
20
  export type Pattern = {
26
21
  start: string;
27
22
  end: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/mdx",
3
- "version": "1.6.3",
3
+ "version": "1.7.0",
4
4
  "typings": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "browser": "dist/index.browser.mjs",
@@ -56,7 +56,7 @@
56
56
  "unist-util-visit": "4.1.2",
57
57
  "uvu": "0.5.6",
58
58
  "vfile-message": "3.1.4",
59
- "@tinacms/schema-tools": "1.7.4"
59
+ "@tinacms/schema-tools": "1.8.0"
60
60
  },
61
61
  "publishConfig": {
62
62
  "registry": "https://registry.npmjs.org"