@tinacms/mdx 0.0.0-d69e892-20241003042309 → 0.0.0-d7c5ec1-20250219020924
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 +3982 -3467
- package/dist/index.js +4067 -3549
- package/dist/index.mjs +3979 -3466
- package/dist/next/stringify/pre-processing.d.ts +0 -2
- package/dist/next/tests/markdown-basic-marks-strikethrough/field.d.ts +2 -0
- package/dist/next/tests/markdown-basic-marks-strikethrough/index.test.d.ts +1 -0
- package/dist/next/tests/markdown-mermaid/field.d.ts +2 -0
- package/dist/next/tests/markdown-mermaid/index.test.d.ts +1 -0
- package/dist/parse/plate.d.ts +32 -1
- package/dist/parse/remarkToPlate.d.ts +1 -0
- package/dist/parse/remarkToPlate.test.d.ts +1 -0
- package/dist/stringify/index.d.ts +1 -1
- package/package.json +11 -11
|
@@ -5,5 +5,3 @@ import type { RootElement } from '../../parse/plate';
|
|
|
5
5
|
export declare const preProcess: (tree: RootElement, field: RichTextField, imageCallback: (url: string) => string) => Md.Root;
|
|
6
6
|
export declare const rootElement: (content: Plate.RootElement, field: RichTextField, imageCallback: (url: string) => string) => Md.Root;
|
|
7
7
|
export declare const blockElement: (content: Plate.BlockElement, field: RichTextField, imageCallback: (url: string) => string) => Md.Content | null;
|
|
8
|
-
export type Marks = 'strong' | 'emphasis' | 'inlineCode';
|
|
9
|
-
export declare const getMarks: (content: Plate.InlineElement) => Marks[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/parse/plate.d.ts
CHANGED
|
@@ -121,7 +121,37 @@ export type ParagraphElement = {
|
|
|
121
121
|
/**
|
|
122
122
|
* @group BlockElement
|
|
123
123
|
*/
|
|
124
|
-
export type
|
|
124
|
+
export type TableCellElement = {
|
|
125
|
+
type: 'td';
|
|
126
|
+
children: ParagraphElement[];
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* @group BlockElement
|
|
130
|
+
*/
|
|
131
|
+
export type TableRowElement = {
|
|
132
|
+
type: 'tr';
|
|
133
|
+
children: TableCellElement[];
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* @group BlockElement
|
|
137
|
+
*/
|
|
138
|
+
export type TableElement = {
|
|
139
|
+
type: 'table';
|
|
140
|
+
children: TableRowElement[];
|
|
141
|
+
props: Record<string, unknown>;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* @group MermaidElement
|
|
145
|
+
*/
|
|
146
|
+
export type MermaidElement = {
|
|
147
|
+
type: 'mermaid';
|
|
148
|
+
value: string;
|
|
149
|
+
children: [EmptyTextElement];
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* @group BlockElement
|
|
153
|
+
*/
|
|
154
|
+
export type BlockElement = BlockquoteElement | CodeBlockElement | HeadingElement | HrElement | HTMLElement | ImageElement | InvalidMarkdownElement | ListItemElement | MdxBlockElement | ParagraphElement | MermaidElement | OrderedListElement | UnorderedListElement | TableCellElement | TableRowElement | TableElement;
|
|
125
155
|
/**
|
|
126
156
|
* @group InlineElement
|
|
127
157
|
*/
|
|
@@ -151,6 +181,7 @@ export type TextElement = {
|
|
|
151
181
|
bold?: boolean;
|
|
152
182
|
italic?: boolean;
|
|
153
183
|
code?: boolean;
|
|
184
|
+
strikethrough?: boolean;
|
|
154
185
|
};
|
|
155
186
|
/**
|
|
156
187
|
* @remarks
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -32,5 +32,5 @@ export type Pattern = {
|
|
|
32
32
|
export declare const toTinaMarkdown: (tree: Md.Root, field: RichTextType) => string;
|
|
33
33
|
export declare const rootElement: (content: Plate.RootElement, field: RichTextType, imageCallback: (url: string) => string) => Md.Root;
|
|
34
34
|
export declare const blockElement: (content: Plate.BlockElement, field: RichTextType, imageCallback: (url: string) => string) => Md.Content | null;
|
|
35
|
-
export type Marks = 'strong' | 'emphasis' | 'inlineCode';
|
|
35
|
+
export type Marks = 'strong' | 'emphasis' | 'inlineCode' | 'delete';
|
|
36
36
|
export declare const getMarks: (content: Plate.InlineElement) => Marks[];
|
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-d7c5ec1-20250219020924",
|
|
4
4
|
"typings": "dist/index.d.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"browser": "dist/index.browser.mjs",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
],
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
|
+
"browser": "./dist/index.browser.mjs",
|
|
14
15
|
"import": "./dist/index.mjs",
|
|
15
|
-
"require": "./dist/index.js"
|
|
16
|
-
"browser": "./dist/index.browser.mjs"
|
|
16
|
+
"require": "./dist/index.js"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"license": "Apache-2.0",
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"remark-gfm": "^2.0.0",
|
|
51
51
|
"remark-mdx": "2.3.0",
|
|
52
52
|
"stringify-entities": "4.0.3",
|
|
53
|
-
"typedoc": "^0.26.
|
|
53
|
+
"typedoc": "^0.26.11",
|
|
54
54
|
"unist-util-source": "4.0.2",
|
|
55
55
|
"unist-util-stringify-position": "3.0.3",
|
|
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": "0.0.0-
|
|
59
|
+
"@tinacms/schema-tools": "0.0.0-d7c5ec1-20250219020924"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"registry": "https://registry.npmjs.org"
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@types/estree": "1.0.0",
|
|
70
70
|
"@types/lodash.flatten": "^4.4.9",
|
|
71
71
|
"@types/mdast": "^3.0.15",
|
|
72
|
-
"@types/node": "^22.
|
|
72
|
+
"@types/node": "^22.13.1",
|
|
73
73
|
"@types/prettier": "^2.7.3",
|
|
74
74
|
"@types/unist": "^2.0.11",
|
|
75
75
|
"c8": "^7.14.0",
|
|
@@ -77,18 +77,18 @@
|
|
|
77
77
|
"jest-file-snapshot": "^0.5.0",
|
|
78
78
|
"ts-node": "^10.9.2",
|
|
79
79
|
"typedoc-plugin-markdown": "^3.17.1",
|
|
80
|
-
"typescript": "^5.
|
|
81
|
-
"vite": "^4.5.
|
|
80
|
+
"typescript": "^5.7.3",
|
|
81
|
+
"vite": "^4.5.9",
|
|
82
82
|
"vitest": "^0.32.4",
|
|
83
|
-
"@tinacms/scripts": "
|
|
83
|
+
"@tinacms/scripts": "0.0.0-d7c5ec1-20250219020924"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"types": "tsc",
|
|
87
87
|
"build": "tinacms-scripts build",
|
|
88
88
|
"docs": "typedoc --plugin typedoc-plugin-markdown src/parse/plate.ts --theme markdown && concat-md --decrease-title-levels --dir-name-as-title docs > spec.md",
|
|
89
89
|
"serve": "nodemon dist/server.js",
|
|
90
|
-
"test": "vitest",
|
|
90
|
+
"test": "vitest run",
|
|
91
91
|
"coverage": "vitest run --coverage",
|
|
92
|
-
"test-watch": "
|
|
92
|
+
"test-watch": "vitest"
|
|
93
93
|
}
|
|
94
94
|
}
|