@tinacms/mdx 0.0.0-c8b1d84-20241003015733 → 0.0.0-e0ddb8c-20241004065742
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
CHANGED
|
@@ -38861,6 +38861,12 @@ var blockElement = (content3, field, imageCallback) => {
|
|
|
38861
38861
|
type: "paragraph",
|
|
38862
38862
|
children: eat2(content3.children, field, imageCallback)
|
|
38863
38863
|
};
|
|
38864
|
+
case "mermaid":
|
|
38865
|
+
return {
|
|
38866
|
+
type: "code",
|
|
38867
|
+
lang: "mermaid",
|
|
38868
|
+
value: content3.value
|
|
38869
|
+
};
|
|
38864
38870
|
case "code_block":
|
|
38865
38871
|
return {
|
|
38866
38872
|
type: "code",
|
|
@@ -39188,6 +39194,7 @@ function stringifyProps2(element2, parentField, flatten2, imageCallback) {
|
|
|
39188
39194
|
if (field.list) {
|
|
39189
39195
|
throw new Error(`Rich-text list is not supported`);
|
|
39190
39196
|
} else {
|
|
39197
|
+
console.log("RICH-TEXT StringifyProps", value);
|
|
39191
39198
|
const joiner = flatten2 ? " " : "\n";
|
|
39192
39199
|
let val = "";
|
|
39193
39200
|
assertShape2(
|
|
@@ -42087,7 +42094,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
42087
42094
|
case "heading":
|
|
42088
42095
|
return heading2(content4);
|
|
42089
42096
|
case "code":
|
|
42090
|
-
return
|
|
42097
|
+
return parseCode(content4);
|
|
42091
42098
|
case "paragraph":
|
|
42092
42099
|
return paragraph2(content4);
|
|
42093
42100
|
case "mdxJsxFlowElement":
|
|
@@ -42234,6 +42241,19 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
42234
42241
|
);
|
|
42235
42242
|
}
|
|
42236
42243
|
};
|
|
42244
|
+
const parseCode = (content4) => {
|
|
42245
|
+
if (content4.lang === "mermaid") {
|
|
42246
|
+
return mermaid(content4);
|
|
42247
|
+
}
|
|
42248
|
+
return code3(content4);
|
|
42249
|
+
};
|
|
42250
|
+
const mermaid = (content4) => {
|
|
42251
|
+
return {
|
|
42252
|
+
type: "mermaid",
|
|
42253
|
+
value: content4.value,
|
|
42254
|
+
children: [{ type: "text", text: "" }]
|
|
42255
|
+
};
|
|
42256
|
+
};
|
|
42237
42257
|
const code3 = (content4) => {
|
|
42238
42258
|
const extra = {};
|
|
42239
42259
|
if (content4.lang)
|
package/dist/index.js
CHANGED
|
@@ -40750,6 +40750,12 @@ var blockElement = (content3, field, imageCallback) => {
|
|
|
40750
40750
|
type: "paragraph",
|
|
40751
40751
|
children: eat2(content3.children, field, imageCallback)
|
|
40752
40752
|
};
|
|
40753
|
+
case "mermaid":
|
|
40754
|
+
return {
|
|
40755
|
+
type: "code",
|
|
40756
|
+
lang: "mermaid",
|
|
40757
|
+
value: content3.value
|
|
40758
|
+
};
|
|
40753
40759
|
case "code_block":
|
|
40754
40760
|
return {
|
|
40755
40761
|
type: "code",
|
|
@@ -41081,6 +41087,7 @@ function stringifyProps2(element, parentField, flatten2, imageCallback) {
|
|
|
41081
41087
|
if (field.list) {
|
|
41082
41088
|
throw new Error(`Rich-text list is not supported`);
|
|
41083
41089
|
} else {
|
|
41090
|
+
console.log("RICH-TEXT StringifyProps", value);
|
|
41084
41091
|
const joiner = flatten2 ? " " : "\n";
|
|
41085
41092
|
let val = "";
|
|
41086
41093
|
assertShape2(
|
|
@@ -43990,7 +43997,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
43990
43997
|
case "heading":
|
|
43991
43998
|
return heading2(content4);
|
|
43992
43999
|
case "code":
|
|
43993
|
-
return
|
|
44000
|
+
return parseCode(content4);
|
|
43994
44001
|
case "paragraph":
|
|
43995
44002
|
return paragraph2(content4);
|
|
43996
44003
|
case "mdxJsxFlowElement":
|
|
@@ -44137,6 +44144,19 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
44137
44144
|
);
|
|
44138
44145
|
}
|
|
44139
44146
|
};
|
|
44147
|
+
const parseCode = (content4) => {
|
|
44148
|
+
if (content4.lang === "mermaid") {
|
|
44149
|
+
return mermaid(content4);
|
|
44150
|
+
}
|
|
44151
|
+
return code3(content4);
|
|
44152
|
+
};
|
|
44153
|
+
const mermaid = (content4) => {
|
|
44154
|
+
return {
|
|
44155
|
+
type: "mermaid",
|
|
44156
|
+
value: content4.value,
|
|
44157
|
+
children: [{ type: "text", text: "" }]
|
|
44158
|
+
};
|
|
44159
|
+
};
|
|
44140
44160
|
const code3 = (content4) => {
|
|
44141
44161
|
const extra = {};
|
|
44142
44162
|
if (content4.lang)
|
package/dist/index.mjs
CHANGED
|
@@ -40733,6 +40733,12 @@ var blockElement = (content3, field, imageCallback) => {
|
|
|
40733
40733
|
type: "paragraph",
|
|
40734
40734
|
children: eat2(content3.children, field, imageCallback)
|
|
40735
40735
|
};
|
|
40736
|
+
case "mermaid":
|
|
40737
|
+
return {
|
|
40738
|
+
type: "code",
|
|
40739
|
+
lang: "mermaid",
|
|
40740
|
+
value: content3.value
|
|
40741
|
+
};
|
|
40736
40742
|
case "code_block":
|
|
40737
40743
|
return {
|
|
40738
40744
|
type: "code",
|
|
@@ -41060,6 +41066,7 @@ function stringifyProps2(element, parentField, flatten2, imageCallback) {
|
|
|
41060
41066
|
if (field.list) {
|
|
41061
41067
|
throw new Error(`Rich-text list is not supported`);
|
|
41062
41068
|
} else {
|
|
41069
|
+
console.log("RICH-TEXT StringifyProps", value);
|
|
41063
41070
|
const joiner = flatten2 ? " " : "\n";
|
|
41064
41071
|
let val = "";
|
|
41065
41072
|
assertShape2(
|
|
@@ -43959,7 +43966,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
43959
43966
|
case "heading":
|
|
43960
43967
|
return heading2(content4);
|
|
43961
43968
|
case "code":
|
|
43962
|
-
return
|
|
43969
|
+
return parseCode(content4);
|
|
43963
43970
|
case "paragraph":
|
|
43964
43971
|
return paragraph2(content4);
|
|
43965
43972
|
case "mdxJsxFlowElement":
|
|
@@ -44106,6 +44113,19 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
44106
44113
|
);
|
|
44107
44114
|
}
|
|
44108
44115
|
};
|
|
44116
|
+
const parseCode = (content4) => {
|
|
44117
|
+
if (content4.lang === "mermaid") {
|
|
44118
|
+
return mermaid(content4);
|
|
44119
|
+
}
|
|
44120
|
+
return code3(content4);
|
|
44121
|
+
};
|
|
44122
|
+
const mermaid = (content4) => {
|
|
44123
|
+
return {
|
|
44124
|
+
type: "mermaid",
|
|
44125
|
+
value: content4.value,
|
|
44126
|
+
children: [{ type: "text", text: "" }]
|
|
44127
|
+
};
|
|
44128
|
+
};
|
|
44109
44129
|
const code3 = (content4) => {
|
|
44110
44130
|
const extra = {};
|
|
44111
44131
|
if (content4.lang)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/parse/plate.d.ts
CHANGED
|
@@ -118,10 +118,18 @@ export type ParagraphElement = {
|
|
|
118
118
|
type: 'p';
|
|
119
119
|
children: InlineElement[];
|
|
120
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* @group MermaidElement
|
|
123
|
+
*/
|
|
124
|
+
export type MermaidElement = {
|
|
125
|
+
type: 'mermaid';
|
|
126
|
+
value: string;
|
|
127
|
+
children: [EmptyTextElement];
|
|
128
|
+
};
|
|
121
129
|
/**
|
|
122
130
|
* @group BlockElement
|
|
123
131
|
*/
|
|
124
|
-
export type BlockElement = BlockquoteElement | CodeBlockElement | HeadingElement | HrElement | HTMLElement | ImageElement | InvalidMarkdownElement | ListItemElement | MdxBlockElement | ParagraphElement | OrderedListElement | UnorderedListElement;
|
|
132
|
+
export type BlockElement = BlockquoteElement | CodeBlockElement | HeadingElement | HrElement | HTMLElement | ImageElement | InvalidMarkdownElement | ListItemElement | MdxBlockElement | ParagraphElement | MermaidElement | OrderedListElement | UnorderedListElement;
|
|
125
133
|
/**
|
|
126
134
|
* @group InlineElement
|
|
127
135
|
*/
|
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-e0ddb8c-20241004065742",
|
|
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": "0.0.0-
|
|
59
|
+
"@tinacms/schema-tools": "0.0.0-e0ddb8c-20241004065742"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"registry": "https://registry.npmjs.org"
|