@tinacms/mdx 0.0.0-74014ed-20241010053411 → 0.0.0-772b413-20241118042751
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
|
@@ -21712,10 +21712,14 @@ function peekDelete() {
|
|
|
21712
21712
|
return "~";
|
|
21713
21713
|
}
|
|
21714
21714
|
|
|
21715
|
-
// ../../../node_modules/.pnpm/markdown-table@3.0.
|
|
21716
|
-
function
|
|
21717
|
-
|
|
21718
|
-
|
|
21715
|
+
// ../../../node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.js
|
|
21716
|
+
function defaultStringLength(value) {
|
|
21717
|
+
return value.length;
|
|
21718
|
+
}
|
|
21719
|
+
function markdownTable(table, options) {
|
|
21720
|
+
const settings = options || {};
|
|
21721
|
+
const align = (settings.align || []).concat();
|
|
21722
|
+
const stringLength = settings.stringLength || defaultStringLength;
|
|
21719
21723
|
const alignments = [];
|
|
21720
21724
|
const cellMatrix = [];
|
|
21721
21725
|
const sizeMatrix = [];
|
|
@@ -21731,7 +21735,7 @@ function markdownTable(table, options = {}) {
|
|
|
21731
21735
|
}
|
|
21732
21736
|
while (++columnIndex2 < table[rowIndex].length) {
|
|
21733
21737
|
const cell = serialize(table[rowIndex][columnIndex2]);
|
|
21734
|
-
if (
|
|
21738
|
+
if (settings.alignDelimiters !== false) {
|
|
21735
21739
|
const size = stringLength(cell);
|
|
21736
21740
|
sizes2[columnIndex2] = size;
|
|
21737
21741
|
if (longestCellByColumn[columnIndex2] === void 0 || size > longestCellByColumn[columnIndex2]) {
|
|
@@ -21769,12 +21773,12 @@ function markdownTable(table, options = {}) {
|
|
|
21769
21773
|
} else if (code3 === 114) {
|
|
21770
21774
|
after = ":";
|
|
21771
21775
|
}
|
|
21772
|
-
let size =
|
|
21776
|
+
let size = settings.alignDelimiters === false ? 1 : Math.max(
|
|
21773
21777
|
1,
|
|
21774
21778
|
longestCellByColumn[columnIndex] - before.length - after.length
|
|
21775
21779
|
);
|
|
21776
21780
|
const cell = before + "-".repeat(size) + after;
|
|
21777
|
-
if (
|
|
21781
|
+
if (settings.alignDelimiters !== false) {
|
|
21778
21782
|
size = before.length + size + after.length;
|
|
21779
21783
|
if (size > longestCellByColumn[columnIndex]) {
|
|
21780
21784
|
longestCellByColumn[columnIndex] = size;
|
|
@@ -21796,7 +21800,7 @@ function markdownTable(table, options = {}) {
|
|
|
21796
21800
|
const cell = row2[columnIndex] || "";
|
|
21797
21801
|
let before = "";
|
|
21798
21802
|
let after = "";
|
|
21799
|
-
if (
|
|
21803
|
+
if (settings.alignDelimiters !== false) {
|
|
21800
21804
|
const size = longestCellByColumn[columnIndex] - (sizes2[columnIndex] || 0);
|
|
21801
21805
|
const code3 = alignments[columnIndex];
|
|
21802
21806
|
if (code3 === 114) {
|
|
@@ -21813,28 +21817,28 @@ function markdownTable(table, options = {}) {
|
|
|
21813
21817
|
after = " ".repeat(size);
|
|
21814
21818
|
}
|
|
21815
21819
|
}
|
|
21816
|
-
if (
|
|
21820
|
+
if (settings.delimiterStart !== false && !columnIndex) {
|
|
21817
21821
|
line2.push("|");
|
|
21818
21822
|
}
|
|
21819
|
-
if (
|
|
21823
|
+
if (settings.padding !== false && !(settings.alignDelimiters === false && cell === "") && (settings.delimiterStart !== false || columnIndex)) {
|
|
21820
21824
|
line2.push(" ");
|
|
21821
21825
|
}
|
|
21822
|
-
if (
|
|
21826
|
+
if (settings.alignDelimiters !== false) {
|
|
21823
21827
|
line2.push(before);
|
|
21824
21828
|
}
|
|
21825
21829
|
line2.push(cell);
|
|
21826
|
-
if (
|
|
21830
|
+
if (settings.alignDelimiters !== false) {
|
|
21827
21831
|
line2.push(after);
|
|
21828
21832
|
}
|
|
21829
|
-
if (
|
|
21833
|
+
if (settings.padding !== false) {
|
|
21830
21834
|
line2.push(" ");
|
|
21831
21835
|
}
|
|
21832
|
-
if (
|
|
21836
|
+
if (settings.delimiterEnd !== false || columnIndex !== mostCellsPerRow - 1) {
|
|
21833
21837
|
line2.push("|");
|
|
21834
21838
|
}
|
|
21835
21839
|
}
|
|
21836
21840
|
lines2.push(
|
|
21837
|
-
|
|
21841
|
+
settings.delimiterEnd === false ? line2.join("").replace(/ +$/, "") : line2.join("")
|
|
21838
21842
|
);
|
|
21839
21843
|
}
|
|
21840
21844
|
return lines2.join("\n");
|
|
@@ -21842,9 +21846,6 @@ function markdownTable(table, options = {}) {
|
|
|
21842
21846
|
function serialize(value) {
|
|
21843
21847
|
return value === null || value === void 0 ? "" : String(value);
|
|
21844
21848
|
}
|
|
21845
|
-
function defaultStringLength(value) {
|
|
21846
|
-
return value.length;
|
|
21847
|
-
}
|
|
21848
21849
|
function toAlignment(value) {
|
|
21849
21850
|
const code3 = typeof value === "string" ? value.codePointAt(0) : 0;
|
|
21850
21851
|
return code3 === 67 || code3 === 99 ? 99 : code3 === 76 || code3 === 108 ? 108 : code3 === 82 || code3 === 114 ? 114 : 0;
|
|
@@ -38861,6 +38862,12 @@ var blockElement = (content3, field, imageCallback) => {
|
|
|
38861
38862
|
type: "paragraph",
|
|
38862
38863
|
children: eat2(content3.children, field, imageCallback)
|
|
38863
38864
|
};
|
|
38865
|
+
case "mermaid":
|
|
38866
|
+
return {
|
|
38867
|
+
type: "code",
|
|
38868
|
+
lang: "mermaid",
|
|
38869
|
+
value: content3.value
|
|
38870
|
+
};
|
|
38864
38871
|
case "code_block":
|
|
38865
38872
|
return {
|
|
38866
38873
|
type: "code",
|
|
@@ -39552,6 +39559,12 @@ var blockElement2 = (content3, field, imageCallback) => {
|
|
|
39552
39559
|
type: "paragraph",
|
|
39553
39560
|
children: eat3(content3.children, field, imageCallback)
|
|
39554
39561
|
};
|
|
39562
|
+
case "mermaid":
|
|
39563
|
+
return {
|
|
39564
|
+
type: "code",
|
|
39565
|
+
lang: "mermaid",
|
|
39566
|
+
value: content3.value
|
|
39567
|
+
};
|
|
39555
39568
|
case "code_block":
|
|
39556
39569
|
return {
|
|
39557
39570
|
type: "code",
|
|
@@ -42126,7 +42139,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
42126
42139
|
case "heading":
|
|
42127
42140
|
return heading2(content4);
|
|
42128
42141
|
case "code":
|
|
42129
|
-
return
|
|
42142
|
+
return parseCode(content4);
|
|
42130
42143
|
case "paragraph":
|
|
42131
42144
|
return paragraph2(content4);
|
|
42132
42145
|
case "mdxJsxFlowElement":
|
|
@@ -42273,6 +42286,19 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
42273
42286
|
);
|
|
42274
42287
|
}
|
|
42275
42288
|
};
|
|
42289
|
+
const parseCode = (content4) => {
|
|
42290
|
+
if (content4.lang === "mermaid") {
|
|
42291
|
+
return mermaid(content4);
|
|
42292
|
+
}
|
|
42293
|
+
return code3(content4);
|
|
42294
|
+
};
|
|
42295
|
+
const mermaid = (content4) => {
|
|
42296
|
+
return {
|
|
42297
|
+
type: "mermaid",
|
|
42298
|
+
value: content4.value,
|
|
42299
|
+
children: [{ type: "text", text: "" }]
|
|
42300
|
+
};
|
|
42301
|
+
};
|
|
42276
42302
|
const code3 = (content4) => {
|
|
42277
42303
|
const extra = {};
|
|
42278
42304
|
if (content4.lang)
|
package/dist/index.js
CHANGED
|
@@ -23589,10 +23589,14 @@ function peekDelete() {
|
|
|
23589
23589
|
return "~";
|
|
23590
23590
|
}
|
|
23591
23591
|
|
|
23592
|
-
// ../../../node_modules/.pnpm/markdown-table@3.0.
|
|
23593
|
-
function
|
|
23594
|
-
|
|
23595
|
-
|
|
23592
|
+
// ../../../node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.js
|
|
23593
|
+
function defaultStringLength(value) {
|
|
23594
|
+
return value.length;
|
|
23595
|
+
}
|
|
23596
|
+
function markdownTable(table, options) {
|
|
23597
|
+
const settings = options || {};
|
|
23598
|
+
const align = (settings.align || []).concat();
|
|
23599
|
+
const stringLength = settings.stringLength || defaultStringLength;
|
|
23596
23600
|
const alignments = [];
|
|
23597
23601
|
const cellMatrix = [];
|
|
23598
23602
|
const sizeMatrix = [];
|
|
@@ -23608,7 +23612,7 @@ function markdownTable(table, options = {}) {
|
|
|
23608
23612
|
}
|
|
23609
23613
|
while (++columnIndex2 < table[rowIndex].length) {
|
|
23610
23614
|
const cell = serialize(table[rowIndex][columnIndex2]);
|
|
23611
|
-
if (
|
|
23615
|
+
if (settings.alignDelimiters !== false) {
|
|
23612
23616
|
const size = stringLength(cell);
|
|
23613
23617
|
sizes2[columnIndex2] = size;
|
|
23614
23618
|
if (longestCellByColumn[columnIndex2] === void 0 || size > longestCellByColumn[columnIndex2]) {
|
|
@@ -23646,12 +23650,12 @@ function markdownTable(table, options = {}) {
|
|
|
23646
23650
|
} else if (code3 === 114) {
|
|
23647
23651
|
after = ":";
|
|
23648
23652
|
}
|
|
23649
|
-
let size =
|
|
23653
|
+
let size = settings.alignDelimiters === false ? 1 : Math.max(
|
|
23650
23654
|
1,
|
|
23651
23655
|
longestCellByColumn[columnIndex] - before.length - after.length
|
|
23652
23656
|
);
|
|
23653
23657
|
const cell = before + "-".repeat(size) + after;
|
|
23654
|
-
if (
|
|
23658
|
+
if (settings.alignDelimiters !== false) {
|
|
23655
23659
|
size = before.length + size + after.length;
|
|
23656
23660
|
if (size > longestCellByColumn[columnIndex]) {
|
|
23657
23661
|
longestCellByColumn[columnIndex] = size;
|
|
@@ -23673,7 +23677,7 @@ function markdownTable(table, options = {}) {
|
|
|
23673
23677
|
const cell = row2[columnIndex] || "";
|
|
23674
23678
|
let before = "";
|
|
23675
23679
|
let after = "";
|
|
23676
|
-
if (
|
|
23680
|
+
if (settings.alignDelimiters !== false) {
|
|
23677
23681
|
const size = longestCellByColumn[columnIndex] - (sizes2[columnIndex] || 0);
|
|
23678
23682
|
const code3 = alignments[columnIndex];
|
|
23679
23683
|
if (code3 === 114) {
|
|
@@ -23690,28 +23694,28 @@ function markdownTable(table, options = {}) {
|
|
|
23690
23694
|
after = " ".repeat(size);
|
|
23691
23695
|
}
|
|
23692
23696
|
}
|
|
23693
|
-
if (
|
|
23697
|
+
if (settings.delimiterStart !== false && !columnIndex) {
|
|
23694
23698
|
line2.push("|");
|
|
23695
23699
|
}
|
|
23696
|
-
if (
|
|
23700
|
+
if (settings.padding !== false && !(settings.alignDelimiters === false && cell === "") && (settings.delimiterStart !== false || columnIndex)) {
|
|
23697
23701
|
line2.push(" ");
|
|
23698
23702
|
}
|
|
23699
|
-
if (
|
|
23703
|
+
if (settings.alignDelimiters !== false) {
|
|
23700
23704
|
line2.push(before);
|
|
23701
23705
|
}
|
|
23702
23706
|
line2.push(cell);
|
|
23703
|
-
if (
|
|
23707
|
+
if (settings.alignDelimiters !== false) {
|
|
23704
23708
|
line2.push(after);
|
|
23705
23709
|
}
|
|
23706
|
-
if (
|
|
23710
|
+
if (settings.padding !== false) {
|
|
23707
23711
|
line2.push(" ");
|
|
23708
23712
|
}
|
|
23709
|
-
if (
|
|
23713
|
+
if (settings.delimiterEnd !== false || columnIndex !== mostCellsPerRow - 1) {
|
|
23710
23714
|
line2.push("|");
|
|
23711
23715
|
}
|
|
23712
23716
|
}
|
|
23713
23717
|
lines2.push(
|
|
23714
|
-
|
|
23718
|
+
settings.delimiterEnd === false ? line2.join("").replace(/ +$/, "") : line2.join("")
|
|
23715
23719
|
);
|
|
23716
23720
|
}
|
|
23717
23721
|
return lines2.join("\n");
|
|
@@ -23719,9 +23723,6 @@ function markdownTable(table, options = {}) {
|
|
|
23719
23723
|
function serialize(value) {
|
|
23720
23724
|
return value === null || value === void 0 ? "" : String(value);
|
|
23721
23725
|
}
|
|
23722
|
-
function defaultStringLength(value) {
|
|
23723
|
-
return value.length;
|
|
23724
|
-
}
|
|
23725
23726
|
function toAlignment(value) {
|
|
23726
23727
|
const code3 = typeof value === "string" ? value.codePointAt(0) : 0;
|
|
23727
23728
|
return code3 === 67 || code3 === 99 ? 99 : code3 === 76 || code3 === 108 ? 108 : code3 === 82 || code3 === 114 ? 114 : 0;
|
|
@@ -40750,6 +40751,12 @@ var blockElement = (content3, field, imageCallback) => {
|
|
|
40750
40751
|
type: "paragraph",
|
|
40751
40752
|
children: eat2(content3.children, field, imageCallback)
|
|
40752
40753
|
};
|
|
40754
|
+
case "mermaid":
|
|
40755
|
+
return {
|
|
40756
|
+
type: "code",
|
|
40757
|
+
lang: "mermaid",
|
|
40758
|
+
value: content3.value
|
|
40759
|
+
};
|
|
40753
40760
|
case "code_block":
|
|
40754
40761
|
return {
|
|
40755
40762
|
type: "code",
|
|
@@ -41448,6 +41455,12 @@ var blockElement2 = (content3, field, imageCallback) => {
|
|
|
41448
41455
|
type: "paragraph",
|
|
41449
41456
|
children: eat3(content3.children, field, imageCallback)
|
|
41450
41457
|
};
|
|
41458
|
+
case "mermaid":
|
|
41459
|
+
return {
|
|
41460
|
+
type: "code",
|
|
41461
|
+
lang: "mermaid",
|
|
41462
|
+
value: content3.value
|
|
41463
|
+
};
|
|
41451
41464
|
case "code_block":
|
|
41452
41465
|
return {
|
|
41453
41466
|
type: "code",
|
|
@@ -44031,7 +44044,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
44031
44044
|
case "heading":
|
|
44032
44045
|
return heading2(content4);
|
|
44033
44046
|
case "code":
|
|
44034
|
-
return
|
|
44047
|
+
return parseCode(content4);
|
|
44035
44048
|
case "paragraph":
|
|
44036
44049
|
return paragraph2(content4);
|
|
44037
44050
|
case "mdxJsxFlowElement":
|
|
@@ -44178,6 +44191,19 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
44178
44191
|
);
|
|
44179
44192
|
}
|
|
44180
44193
|
};
|
|
44194
|
+
const parseCode = (content4) => {
|
|
44195
|
+
if (content4.lang === "mermaid") {
|
|
44196
|
+
return mermaid(content4);
|
|
44197
|
+
}
|
|
44198
|
+
return code3(content4);
|
|
44199
|
+
};
|
|
44200
|
+
const mermaid = (content4) => {
|
|
44201
|
+
return {
|
|
44202
|
+
type: "mermaid",
|
|
44203
|
+
value: content4.value,
|
|
44204
|
+
children: [{ type: "text", text: "" }]
|
|
44205
|
+
};
|
|
44206
|
+
};
|
|
44181
44207
|
const code3 = (content4) => {
|
|
44182
44208
|
const extra = {};
|
|
44183
44209
|
if (content4.lang)
|
package/dist/index.mjs
CHANGED
|
@@ -23584,10 +23584,14 @@ function peekDelete() {
|
|
|
23584
23584
|
return "~";
|
|
23585
23585
|
}
|
|
23586
23586
|
|
|
23587
|
-
// ../../../node_modules/.pnpm/markdown-table@3.0.
|
|
23588
|
-
function
|
|
23589
|
-
|
|
23590
|
-
|
|
23587
|
+
// ../../../node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.js
|
|
23588
|
+
function defaultStringLength(value) {
|
|
23589
|
+
return value.length;
|
|
23590
|
+
}
|
|
23591
|
+
function markdownTable(table, options) {
|
|
23592
|
+
const settings = options || {};
|
|
23593
|
+
const align = (settings.align || []).concat();
|
|
23594
|
+
const stringLength = settings.stringLength || defaultStringLength;
|
|
23591
23595
|
const alignments = [];
|
|
23592
23596
|
const cellMatrix = [];
|
|
23593
23597
|
const sizeMatrix = [];
|
|
@@ -23603,7 +23607,7 @@ function markdownTable(table, options = {}) {
|
|
|
23603
23607
|
}
|
|
23604
23608
|
while (++columnIndex2 < table[rowIndex].length) {
|
|
23605
23609
|
const cell = serialize(table[rowIndex][columnIndex2]);
|
|
23606
|
-
if (
|
|
23610
|
+
if (settings.alignDelimiters !== false) {
|
|
23607
23611
|
const size = stringLength(cell);
|
|
23608
23612
|
sizes2[columnIndex2] = size;
|
|
23609
23613
|
if (longestCellByColumn[columnIndex2] === void 0 || size > longestCellByColumn[columnIndex2]) {
|
|
@@ -23641,12 +23645,12 @@ function markdownTable(table, options = {}) {
|
|
|
23641
23645
|
} else if (code3 === 114) {
|
|
23642
23646
|
after = ":";
|
|
23643
23647
|
}
|
|
23644
|
-
let size =
|
|
23648
|
+
let size = settings.alignDelimiters === false ? 1 : Math.max(
|
|
23645
23649
|
1,
|
|
23646
23650
|
longestCellByColumn[columnIndex] - before.length - after.length
|
|
23647
23651
|
);
|
|
23648
23652
|
const cell = before + "-".repeat(size) + after;
|
|
23649
|
-
if (
|
|
23653
|
+
if (settings.alignDelimiters !== false) {
|
|
23650
23654
|
size = before.length + size + after.length;
|
|
23651
23655
|
if (size > longestCellByColumn[columnIndex]) {
|
|
23652
23656
|
longestCellByColumn[columnIndex] = size;
|
|
@@ -23668,7 +23672,7 @@ function markdownTable(table, options = {}) {
|
|
|
23668
23672
|
const cell = row2[columnIndex] || "";
|
|
23669
23673
|
let before = "";
|
|
23670
23674
|
let after = "";
|
|
23671
|
-
if (
|
|
23675
|
+
if (settings.alignDelimiters !== false) {
|
|
23672
23676
|
const size = longestCellByColumn[columnIndex] - (sizes2[columnIndex] || 0);
|
|
23673
23677
|
const code3 = alignments[columnIndex];
|
|
23674
23678
|
if (code3 === 114) {
|
|
@@ -23685,28 +23689,28 @@ function markdownTable(table, options = {}) {
|
|
|
23685
23689
|
after = " ".repeat(size);
|
|
23686
23690
|
}
|
|
23687
23691
|
}
|
|
23688
|
-
if (
|
|
23692
|
+
if (settings.delimiterStart !== false && !columnIndex) {
|
|
23689
23693
|
line2.push("|");
|
|
23690
23694
|
}
|
|
23691
|
-
if (
|
|
23695
|
+
if (settings.padding !== false && !(settings.alignDelimiters === false && cell === "") && (settings.delimiterStart !== false || columnIndex)) {
|
|
23692
23696
|
line2.push(" ");
|
|
23693
23697
|
}
|
|
23694
|
-
if (
|
|
23698
|
+
if (settings.alignDelimiters !== false) {
|
|
23695
23699
|
line2.push(before);
|
|
23696
23700
|
}
|
|
23697
23701
|
line2.push(cell);
|
|
23698
|
-
if (
|
|
23702
|
+
if (settings.alignDelimiters !== false) {
|
|
23699
23703
|
line2.push(after);
|
|
23700
23704
|
}
|
|
23701
|
-
if (
|
|
23705
|
+
if (settings.padding !== false) {
|
|
23702
23706
|
line2.push(" ");
|
|
23703
23707
|
}
|
|
23704
|
-
if (
|
|
23708
|
+
if (settings.delimiterEnd !== false || columnIndex !== mostCellsPerRow - 1) {
|
|
23705
23709
|
line2.push("|");
|
|
23706
23710
|
}
|
|
23707
23711
|
}
|
|
23708
23712
|
lines2.push(
|
|
23709
|
-
|
|
23713
|
+
settings.delimiterEnd === false ? line2.join("").replace(/ +$/, "") : line2.join("")
|
|
23710
23714
|
);
|
|
23711
23715
|
}
|
|
23712
23716
|
return lines2.join("\n");
|
|
@@ -23714,9 +23718,6 @@ function markdownTable(table, options = {}) {
|
|
|
23714
23718
|
function serialize(value) {
|
|
23715
23719
|
return value === null || value === void 0 ? "" : String(value);
|
|
23716
23720
|
}
|
|
23717
|
-
function defaultStringLength(value) {
|
|
23718
|
-
return value.length;
|
|
23719
|
-
}
|
|
23720
23721
|
function toAlignment(value) {
|
|
23721
23722
|
const code3 = typeof value === "string" ? value.codePointAt(0) : 0;
|
|
23722
23723
|
return code3 === 67 || code3 === 99 ? 99 : code3 === 76 || code3 === 108 ? 108 : code3 === 82 || code3 === 114 ? 114 : 0;
|
|
@@ -40733,6 +40734,12 @@ var blockElement = (content3, field, imageCallback) => {
|
|
|
40733
40734
|
type: "paragraph",
|
|
40734
40735
|
children: eat2(content3.children, field, imageCallback)
|
|
40735
40736
|
};
|
|
40737
|
+
case "mermaid":
|
|
40738
|
+
return {
|
|
40739
|
+
type: "code",
|
|
40740
|
+
lang: "mermaid",
|
|
40741
|
+
value: content3.value
|
|
40742
|
+
};
|
|
40736
40743
|
case "code_block":
|
|
40737
40744
|
return {
|
|
40738
40745
|
type: "code",
|
|
@@ -41424,6 +41431,12 @@ var blockElement2 = (content3, field, imageCallback) => {
|
|
|
41424
41431
|
type: "paragraph",
|
|
41425
41432
|
children: eat3(content3.children, field, imageCallback)
|
|
41426
41433
|
};
|
|
41434
|
+
case "mermaid":
|
|
41435
|
+
return {
|
|
41436
|
+
type: "code",
|
|
41437
|
+
lang: "mermaid",
|
|
41438
|
+
value: content3.value
|
|
41439
|
+
};
|
|
41427
41440
|
case "code_block":
|
|
41428
41441
|
return {
|
|
41429
41442
|
type: "code",
|
|
@@ -43998,7 +44011,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
43998
44011
|
case "heading":
|
|
43999
44012
|
return heading2(content4);
|
|
44000
44013
|
case "code":
|
|
44001
|
-
return
|
|
44014
|
+
return parseCode(content4);
|
|
44002
44015
|
case "paragraph":
|
|
44003
44016
|
return paragraph2(content4);
|
|
44004
44017
|
case "mdxJsxFlowElement":
|
|
@@ -44145,6 +44158,19 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
44145
44158
|
);
|
|
44146
44159
|
}
|
|
44147
44160
|
};
|
|
44161
|
+
const parseCode = (content4) => {
|
|
44162
|
+
if (content4.lang === "mermaid") {
|
|
44163
|
+
return mermaid(content4);
|
|
44164
|
+
}
|
|
44165
|
+
return code3(content4);
|
|
44166
|
+
};
|
|
44167
|
+
const mermaid = (content4) => {
|
|
44168
|
+
return {
|
|
44169
|
+
type: "mermaid",
|
|
44170
|
+
value: content4.value,
|
|
44171
|
+
children: [{ type: "text", text: "" }]
|
|
44172
|
+
};
|
|
44173
|
+
};
|
|
44148
44174
|
const code3 = (content4) => {
|
|
44149
44175
|
const extra = {};
|
|
44150
44176
|
if (content4.lang)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/parse/plate.d.ts
CHANGED
|
@@ -140,10 +140,18 @@ export type TableElement = {
|
|
|
140
140
|
children: TableRowElement[];
|
|
141
141
|
props: Record<string, unknown>;
|
|
142
142
|
};
|
|
143
|
+
/**
|
|
144
|
+
* @group MermaidElement
|
|
145
|
+
*/
|
|
146
|
+
export type MermaidElement = {
|
|
147
|
+
type: 'mermaid';
|
|
148
|
+
value: string;
|
|
149
|
+
children: [EmptyTextElement];
|
|
150
|
+
};
|
|
143
151
|
/**
|
|
144
152
|
* @group BlockElement
|
|
145
153
|
*/
|
|
146
|
-
export type BlockElement = BlockquoteElement | CodeBlockElement | HeadingElement | HrElement | HTMLElement | ImageElement | InvalidMarkdownElement | ListItemElement | MdxBlockElement | ParagraphElement | OrderedListElement | UnorderedListElement | TableCellElement | TableRowElement | TableElement;
|
|
154
|
+
export type BlockElement = BlockquoteElement | CodeBlockElement | HeadingElement | HrElement | HTMLElement | ImageElement | InvalidMarkdownElement | ListItemElement | MdxBlockElement | ParagraphElement | MermaidElement | OrderedListElement | UnorderedListElement | TableCellElement | TableRowElement | TableElement;
|
|
147
155
|
/**
|
|
148
156
|
* @group InlineElement
|
|
149
157
|
*/
|
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-772b413-20241118042751",
|
|
4
4
|
"typings": "dist/index.d.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"browser": "dist/index.browser.mjs",
|
|
@@ -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": "
|
|
59
|
+
"@tinacms/schema-tools": "0.0.0-772b413-20241118042751"
|
|
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.9.0",
|
|
73
73
|
"@types/prettier": "^2.7.3",
|
|
74
74
|
"@types/unist": "^2.0.11",
|
|
75
75
|
"c8": "^7.14.0",
|
|
@@ -77,10 +77,10 @@
|
|
|
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.6.
|
|
80
|
+
"typescript": "^5.6.3",
|
|
81
81
|
"vite": "^4.5.5",
|
|
82
82
|
"vitest": "^0.32.4",
|
|
83
|
-
"@tinacms/scripts": "0.0.0-
|
|
83
|
+
"@tinacms/scripts": "0.0.0-772b413-20241118042751"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"types": "tsc",
|