@tinacms/mdx 1.5.0 → 1.5.2
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 +19 -18
- package/dist/index.js +19 -18
- package/dist/index.mjs +19 -18
- package/package.json +6 -6
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;
|
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;
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/mdx",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
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": "1.6.
|
|
59
|
+
"@tinacms/schema-tools": "1.6.8"
|
|
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": "1.3.
|
|
83
|
+
"@tinacms/scripts": "1.3.1"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"types": "tsc",
|