@tinacms/mdx 0.0.0-995c297-20250604070945 → 0.0.0-9b751ce-20251121051639
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/index.browser.mjs +32126 -32223
- package/dist/index.d.ts +2 -7
- package/dist/index.js +28315 -28412
- package/dist/index.mjs +28444 -28541
- package/dist/next/tests/slatejson/field.d.ts +2 -0
- package/dist/next/tests/slatejson/index.test.d.ts +1 -0
- package/dist/next/tests/util.d.ts +1 -0
- package/dist/parse/index.d.ts +3 -3
- package/dist/parse/remarkToPlate.d.ts +3 -3
- package/dist/stringify/acorn.d.ts +1 -1
- package/dist/stringify/index.d.ts +2 -7
- package/package.json +3 -5
|
@@ -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;
|
package/dist/parse/index.d.ts
CHANGED
|
@@ -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
|
*
|
|
@@ -57,8 +57,8 @@ import type * as Plate from './plate';
|
|
|
57
57
|
*/
|
|
58
58
|
export declare const markdownToAst: (value: string, field: RichTextType) => import("mdast").Root;
|
|
59
59
|
export declare const mdxToAst: (value: string) => import("mdast").Root;
|
|
60
|
-
export declare const MDX_PARSE_ERROR_MSG = "TinaCMS supports a stricter version of markdown and a subset of MDX. https://tina.io/docs/
|
|
61
|
-
export declare const MDX_PARSE_ERROR_MSG_HTML = "TinaCMS supports a stricter version of markdown and a subset of MDX. <a href=\"https://tina.io/docs/
|
|
60
|
+
export declare const MDX_PARSE_ERROR_MSG = "TinaCMS supports a stricter version of markdown and a subset of MDX. https://tina.io/docs/r/what-is-markdown";
|
|
61
|
+
export declare const MDX_PARSE_ERROR_MSG_HTML = "TinaCMS supports a stricter version of markdown and a subset of MDX. <a href=\"https://tina.io/docs/r/what-is-markdown\" target=\"_blank\" rel=\"noopener noreferrer\">Learn More</a>";
|
|
62
62
|
export declare const parseMDX: (value: string, field: RichTextType, imageCallback: (s: string) => string) => Plate.RootElement;
|
|
63
63
|
export declare const invalidMarkdown: (e: RichTextParseError, value: string) => Plate.RootElement;
|
|
64
64
|
export declare const replaceAll: (string: string, target: string, value: string) => string;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
*/
|
|
6
|
-
import type * as Md from 'mdast';
|
|
7
|
-
import type * as Plate from './plate';
|
|
8
6
|
import type { RichTextType } from '@tinacms/schema-tools';
|
|
9
|
-
import type
|
|
7
|
+
import type * as Md from 'mdast';
|
|
10
8
|
import type { ContainerDirective } from 'mdast-util-directive';
|
|
9
|
+
import type { MdxJsxFlowElement, MdxJsxTextElement } from 'mdast-util-mdx-jsx';
|
|
10
|
+
import type * as Plate from './plate';
|
|
11
11
|
export type { Position, PositionItem } from './plate';
|
|
12
12
|
declare module 'mdast' {
|
|
13
13
|
interface StaticPhrasingContentMap {
|
|
@@ -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
|
|
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": "0.0.0-
|
|
3
|
+
"version": "0.0.0-9b751ce-20251121051639",
|
|
4
4
|
"typings": "dist/index.d.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"browser": "dist/index.browser.mjs",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"acorn": "8.8.2",
|
|
31
31
|
"ccount": "2.0.1",
|
|
32
32
|
"estree-util-is-identifier-name": "2.1.0",
|
|
33
|
-
"lodash.flatten": "4.4.0",
|
|
34
33
|
"mdast-util-compact": "4.1.1",
|
|
35
34
|
"mdast-util-directive": "2.2.4",
|
|
36
35
|
"mdast-util-from-markdown": "1.3.0",
|
|
@@ -56,7 +55,7 @@
|
|
|
56
55
|
"unist-util-visit": "4.1.2",
|
|
57
56
|
"uvu": "0.5.6",
|
|
58
57
|
"vfile-message": "3.1.4",
|
|
59
|
-
"@tinacms/schema-tools": "0.0.0-
|
|
58
|
+
"@tinacms/schema-tools": "0.0.0-9b751ce-20251121051639"
|
|
60
59
|
},
|
|
61
60
|
"publishConfig": {
|
|
62
61
|
"registry": "https://registry.npmjs.org"
|
|
@@ -67,7 +66,6 @@
|
|
|
67
66
|
},
|
|
68
67
|
"devDependencies": {
|
|
69
68
|
"@types/estree": "1.0.0",
|
|
70
|
-
"@types/lodash.flatten": "^4.4.9",
|
|
71
69
|
"@types/mdast": "^3.0.15",
|
|
72
70
|
"@types/node": "^22.13.1",
|
|
73
71
|
"@types/prettier": "^2.7.3",
|
|
@@ -80,7 +78,7 @@
|
|
|
80
78
|
"typescript": "^5.7.3",
|
|
81
79
|
"vite": "^4.5.9",
|
|
82
80
|
"vitest": "^0.32.4",
|
|
83
|
-
"@tinacms/scripts": "0.0.0-
|
|
81
|
+
"@tinacms/scripts": "0.0.0-9b751ce-20251121051639"
|
|
84
82
|
},
|
|
85
83
|
"scripts": {
|
|
86
84
|
"types": "tsc",
|