@tinacms/mdx 1.8.3 → 2.0.1
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 → index.browser.js} +30 -11
- package/dist/index.js +167 -157
- package/package.json +9 -9
- package/dist/index.mjs +0 -50948
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -28,12 +27,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
27
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
28
|
mod
|
|
30
29
|
));
|
|
31
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
30
|
|
|
33
31
|
// ../../../node_modules/.pnpm/is-buffer@2.0.5/node_modules/is-buffer/index.js
|
|
34
32
|
var require_is_buffer = __commonJS({
|
|
35
|
-
"../../../node_modules/.pnpm/is-buffer@2.0.5/node_modules/is-buffer/index.js"(
|
|
36
|
-
|
|
33
|
+
"../../../node_modules/.pnpm/is-buffer@2.0.5/node_modules/is-buffer/index.js"(exports, module) {
|
|
34
|
+
module.exports = function isBuffer2(obj) {
|
|
37
35
|
return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
|
|
38
36
|
};
|
|
39
37
|
}
|
|
@@ -41,7 +39,7 @@ var require_is_buffer = __commonJS({
|
|
|
41
39
|
|
|
42
40
|
// ../../../node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js
|
|
43
41
|
var require_extend = __commonJS({
|
|
44
|
-
"../../../node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js"(
|
|
42
|
+
"../../../node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js"(exports, module) {
|
|
45
43
|
"use strict";
|
|
46
44
|
var hasOwn3 = Object.prototype.hasOwnProperty;
|
|
47
45
|
var toStr = Object.prototype.toString;
|
|
@@ -89,7 +87,7 @@ var require_extend = __commonJS({
|
|
|
89
87
|
}
|
|
90
88
|
return obj[name2];
|
|
91
89
|
};
|
|
92
|
-
|
|
90
|
+
module.exports = function extend4() {
|
|
93
91
|
var options, name2, src, copy, copyIsArray, clone;
|
|
94
92
|
var target = arguments[0];
|
|
95
93
|
var i = 1;
|
|
@@ -132,8 +130,8 @@ var require_extend = __commonJS({
|
|
|
132
130
|
|
|
133
131
|
// ../../../node_modules/.pnpm/acorn-jsx@5.3.2_acorn@8.14.0/node_modules/acorn-jsx/xhtml.js
|
|
134
132
|
var require_xhtml = __commonJS({
|
|
135
|
-
"../../../node_modules/.pnpm/acorn-jsx@5.3.2_acorn@8.14.0/node_modules/acorn-jsx/xhtml.js"(
|
|
136
|
-
|
|
133
|
+
"../../../node_modules/.pnpm/acorn-jsx@5.3.2_acorn@8.14.0/node_modules/acorn-jsx/xhtml.js"(exports, module) {
|
|
134
|
+
module.exports = {
|
|
137
135
|
quot: '"',
|
|
138
136
|
amp: "&",
|
|
139
137
|
apos: "'",
|
|
@@ -393,10 +391,10 @@ var require_xhtml = __commonJS({
|
|
|
393
391
|
|
|
394
392
|
// ../../../node_modules/.pnpm/acorn@8.14.0/node_modules/acorn/dist/acorn.js
|
|
395
393
|
var require_acorn = __commonJS({
|
|
396
|
-
"../../../node_modules/.pnpm/acorn@8.14.0/node_modules/acorn/dist/acorn.js"(
|
|
394
|
+
"../../../node_modules/.pnpm/acorn@8.14.0/node_modules/acorn/dist/acorn.js"(exports, module) {
|
|
397
395
|
(function(global2, factory) {
|
|
398
|
-
typeof
|
|
399
|
-
})(
|
|
396
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.acorn = {}));
|
|
397
|
+
})(exports, function(exports2) {
|
|
400
398
|
"use strict";
|
|
401
399
|
var astralIdentifierCodes3 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
402
400
|
var astralIdentifierStartCodes3 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
|
|
@@ -1059,12 +1057,12 @@ var require_acorn = __commonJS({
|
|
|
1059
1057
|
};
|
|
1060
1058
|
var pp$83 = Parser5.prototype;
|
|
1061
1059
|
pp$83.parseTopLevel = function(node2) {
|
|
1062
|
-
var
|
|
1060
|
+
var exports3 = /* @__PURE__ */ Object.create(null);
|
|
1063
1061
|
if (!node2.body) {
|
|
1064
1062
|
node2.body = [];
|
|
1065
1063
|
}
|
|
1066
1064
|
while (this.type !== types$13.eof) {
|
|
1067
|
-
var stmt = this.parseStatement(null, true,
|
|
1065
|
+
var stmt = this.parseStatement(null, true, exports3);
|
|
1068
1066
|
node2.body.push(stmt);
|
|
1069
1067
|
}
|
|
1070
1068
|
if (this.inModule) {
|
|
@@ -1119,7 +1117,7 @@ var require_acorn = __commonJS({
|
|
|
1119
1117
|
var next = this.pos + skip[0].length, after;
|
|
1120
1118
|
return !lineBreak3.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar3(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
|
|
1121
1119
|
};
|
|
1122
|
-
pp$83.parseStatement = function(context, topLevel,
|
|
1120
|
+
pp$83.parseStatement = function(context, topLevel, exports3) {
|
|
1123
1121
|
var starttype = this.type, node2 = this.startNode(), kind;
|
|
1124
1122
|
if (this.isLet(context)) {
|
|
1125
1123
|
starttype = types$13._var;
|
|
@@ -1188,7 +1186,7 @@ var require_acorn = __commonJS({
|
|
|
1188
1186
|
this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
|
|
1189
1187
|
}
|
|
1190
1188
|
}
|
|
1191
|
-
return starttype === types$13._import ? this.parseImport(node2) : this.parseExport(node2,
|
|
1189
|
+
return starttype === types$13._import ? this.parseImport(node2) : this.parseExport(node2, exports3);
|
|
1192
1190
|
// If the statement does not start with a statement keyword or a
|
|
1193
1191
|
// brace, it's an ExpressionStatement or LabeledStatement. We
|
|
1194
1192
|
// simply start parsing an expression, and afterwards, if the
|
|
@@ -1831,11 +1829,11 @@ var require_acorn = __commonJS({
|
|
|
1831
1829
|
var key = node2.key;
|
|
1832
1830
|
return !computed && (key.type === "Identifier" && key.name === name2 || key.type === "Literal" && key.value === name2);
|
|
1833
1831
|
}
|
|
1834
|
-
pp$83.parseExportAllDeclaration = function(node2,
|
|
1832
|
+
pp$83.parseExportAllDeclaration = function(node2, exports3) {
|
|
1835
1833
|
if (this.options.ecmaVersion >= 11) {
|
|
1836
1834
|
if (this.eatContextual("as")) {
|
|
1837
1835
|
node2.exported = this.parseModuleExportName();
|
|
1838
|
-
this.checkExport(
|
|
1836
|
+
this.checkExport(exports3, node2.exported, this.lastTokStart);
|
|
1839
1837
|
} else {
|
|
1840
1838
|
node2.exported = null;
|
|
1841
1839
|
}
|
|
@@ -1851,28 +1849,28 @@ var require_acorn = __commonJS({
|
|
|
1851
1849
|
this.semicolon();
|
|
1852
1850
|
return this.finishNode(node2, "ExportAllDeclaration");
|
|
1853
1851
|
};
|
|
1854
|
-
pp$83.parseExport = function(node2,
|
|
1852
|
+
pp$83.parseExport = function(node2, exports3) {
|
|
1855
1853
|
this.next();
|
|
1856
1854
|
if (this.eat(types$13.star)) {
|
|
1857
|
-
return this.parseExportAllDeclaration(node2,
|
|
1855
|
+
return this.parseExportAllDeclaration(node2, exports3);
|
|
1858
1856
|
}
|
|
1859
1857
|
if (this.eat(types$13._default)) {
|
|
1860
|
-
this.checkExport(
|
|
1858
|
+
this.checkExport(exports3, "default", this.lastTokStart);
|
|
1861
1859
|
node2.declaration = this.parseExportDefaultDeclaration();
|
|
1862
1860
|
return this.finishNode(node2, "ExportDefaultDeclaration");
|
|
1863
1861
|
}
|
|
1864
1862
|
if (this.shouldParseExportStatement()) {
|
|
1865
1863
|
node2.declaration = this.parseExportDeclaration(node2);
|
|
1866
1864
|
if (node2.declaration.type === "VariableDeclaration") {
|
|
1867
|
-
this.checkVariableExport(
|
|
1865
|
+
this.checkVariableExport(exports3, node2.declaration.declarations);
|
|
1868
1866
|
} else {
|
|
1869
|
-
this.checkExport(
|
|
1867
|
+
this.checkExport(exports3, node2.declaration.id, node2.declaration.id.start);
|
|
1870
1868
|
}
|
|
1871
1869
|
node2.specifiers = [];
|
|
1872
1870
|
node2.source = null;
|
|
1873
1871
|
} else {
|
|
1874
1872
|
node2.declaration = null;
|
|
1875
|
-
node2.specifiers = this.parseExportSpecifiers(
|
|
1873
|
+
node2.specifiers = this.parseExportSpecifiers(exports3);
|
|
1876
1874
|
if (this.eatContextual("from")) {
|
|
1877
1875
|
if (this.type !== types$13.string) {
|
|
1878
1876
|
this.unexpected();
|
|
@@ -1917,66 +1915,66 @@ var require_acorn = __commonJS({
|
|
|
1917
1915
|
return declaration;
|
|
1918
1916
|
}
|
|
1919
1917
|
};
|
|
1920
|
-
pp$83.checkExport = function(
|
|
1921
|
-
if (!
|
|
1918
|
+
pp$83.checkExport = function(exports3, name2, pos) {
|
|
1919
|
+
if (!exports3) {
|
|
1922
1920
|
return;
|
|
1923
1921
|
}
|
|
1924
1922
|
if (typeof name2 !== "string") {
|
|
1925
1923
|
name2 = name2.type === "Identifier" ? name2.name : name2.value;
|
|
1926
1924
|
}
|
|
1927
|
-
if (hasOwn3(
|
|
1925
|
+
if (hasOwn3(exports3, name2)) {
|
|
1928
1926
|
this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'");
|
|
1929
1927
|
}
|
|
1930
|
-
|
|
1928
|
+
exports3[name2] = true;
|
|
1931
1929
|
};
|
|
1932
|
-
pp$83.checkPatternExport = function(
|
|
1930
|
+
pp$83.checkPatternExport = function(exports3, pat) {
|
|
1933
1931
|
var type = pat.type;
|
|
1934
1932
|
if (type === "Identifier") {
|
|
1935
|
-
this.checkExport(
|
|
1933
|
+
this.checkExport(exports3, pat, pat.start);
|
|
1936
1934
|
} else if (type === "ObjectPattern") {
|
|
1937
1935
|
for (var i2 = 0, list4 = pat.properties; i2 < list4.length; i2 += 1) {
|
|
1938
1936
|
var prop = list4[i2];
|
|
1939
|
-
this.checkPatternExport(
|
|
1937
|
+
this.checkPatternExport(exports3, prop);
|
|
1940
1938
|
}
|
|
1941
1939
|
} else if (type === "ArrayPattern") {
|
|
1942
1940
|
for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
|
|
1943
1941
|
var elt = list$1[i$1];
|
|
1944
1942
|
if (elt) {
|
|
1945
|
-
this.checkPatternExport(
|
|
1943
|
+
this.checkPatternExport(exports3, elt);
|
|
1946
1944
|
}
|
|
1947
1945
|
}
|
|
1948
1946
|
} else if (type === "Property") {
|
|
1949
|
-
this.checkPatternExport(
|
|
1947
|
+
this.checkPatternExport(exports3, pat.value);
|
|
1950
1948
|
} else if (type === "AssignmentPattern") {
|
|
1951
|
-
this.checkPatternExport(
|
|
1949
|
+
this.checkPatternExport(exports3, pat.left);
|
|
1952
1950
|
} else if (type === "RestElement") {
|
|
1953
|
-
this.checkPatternExport(
|
|
1951
|
+
this.checkPatternExport(exports3, pat.argument);
|
|
1954
1952
|
}
|
|
1955
1953
|
};
|
|
1956
|
-
pp$83.checkVariableExport = function(
|
|
1957
|
-
if (!
|
|
1954
|
+
pp$83.checkVariableExport = function(exports3, decls) {
|
|
1955
|
+
if (!exports3) {
|
|
1958
1956
|
return;
|
|
1959
1957
|
}
|
|
1960
1958
|
for (var i2 = 0, list4 = decls; i2 < list4.length; i2 += 1) {
|
|
1961
1959
|
var decl = list4[i2];
|
|
1962
|
-
this.checkPatternExport(
|
|
1960
|
+
this.checkPatternExport(exports3, decl.id);
|
|
1963
1961
|
}
|
|
1964
1962
|
};
|
|
1965
1963
|
pp$83.shouldParseExportStatement = function() {
|
|
1966
1964
|
return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
|
|
1967
1965
|
};
|
|
1968
|
-
pp$83.parseExportSpecifier = function(
|
|
1966
|
+
pp$83.parseExportSpecifier = function(exports3) {
|
|
1969
1967
|
var node2 = this.startNode();
|
|
1970
1968
|
node2.local = this.parseModuleExportName();
|
|
1971
1969
|
node2.exported = this.eatContextual("as") ? this.parseModuleExportName() : node2.local;
|
|
1972
1970
|
this.checkExport(
|
|
1973
|
-
|
|
1971
|
+
exports3,
|
|
1974
1972
|
node2.exported,
|
|
1975
1973
|
node2.exported.start
|
|
1976
1974
|
);
|
|
1977
1975
|
return this.finishNode(node2, "ExportSpecifier");
|
|
1978
1976
|
};
|
|
1979
|
-
pp$83.parseExportSpecifiers = function(
|
|
1977
|
+
pp$83.parseExportSpecifiers = function(exports3) {
|
|
1980
1978
|
var nodes = [], first = true;
|
|
1981
1979
|
this.expect(types$13.braceL);
|
|
1982
1980
|
while (!this.eat(types$13.braceR)) {
|
|
@@ -1988,7 +1986,7 @@ var require_acorn = __commonJS({
|
|
|
1988
1986
|
} else {
|
|
1989
1987
|
first = false;
|
|
1990
1988
|
}
|
|
1991
|
-
nodes.push(this.parseExportSpecifier(
|
|
1989
|
+
nodes.push(this.parseExportSpecifier(exports3));
|
|
1992
1990
|
}
|
|
1993
1991
|
return nodes;
|
|
1994
1992
|
};
|
|
@@ -5911,35 +5909,35 @@ var require_acorn = __commonJS({
|
|
|
5911
5909
|
function tokenizer4(input, options) {
|
|
5912
5910
|
return Parser5.tokenizer(input, options);
|
|
5913
5911
|
}
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5912
|
+
exports2.Node = Node5;
|
|
5913
|
+
exports2.Parser = Parser5;
|
|
5914
|
+
exports2.Position = Position5;
|
|
5915
|
+
exports2.SourceLocation = SourceLocation5;
|
|
5916
|
+
exports2.TokContext = TokContext5;
|
|
5917
|
+
exports2.Token = Token5;
|
|
5918
|
+
exports2.TokenType = TokenType5;
|
|
5919
|
+
exports2.defaultOptions = defaultOptions3;
|
|
5920
|
+
exports2.getLineInfo = getLineInfo3;
|
|
5921
|
+
exports2.isIdentifierChar = isIdentifierChar3;
|
|
5922
|
+
exports2.isIdentifierStart = isIdentifierStart3;
|
|
5923
|
+
exports2.isNewLine = isNewLine3;
|
|
5924
|
+
exports2.keywordTypes = keywords3;
|
|
5925
|
+
exports2.lineBreak = lineBreak3;
|
|
5926
|
+
exports2.lineBreakG = lineBreakG3;
|
|
5927
|
+
exports2.nonASCIIwhitespace = nonASCIIwhitespace3;
|
|
5928
|
+
exports2.parse = parse7;
|
|
5929
|
+
exports2.parseExpressionAt = parseExpressionAt4;
|
|
5930
|
+
exports2.tokContexts = types4;
|
|
5931
|
+
exports2.tokTypes = types$13;
|
|
5932
|
+
exports2.tokenizer = tokenizer4;
|
|
5933
|
+
exports2.version = version3;
|
|
5936
5934
|
});
|
|
5937
5935
|
}
|
|
5938
5936
|
});
|
|
5939
5937
|
|
|
5940
5938
|
// ../../../node_modules/.pnpm/acorn-jsx@5.3.2_acorn@8.14.0/node_modules/acorn-jsx/index.js
|
|
5941
5939
|
var require_acorn_jsx = __commonJS({
|
|
5942
|
-
"../../../node_modules/.pnpm/acorn-jsx@5.3.2_acorn@8.14.0/node_modules/acorn-jsx/index.js"(
|
|
5940
|
+
"../../../node_modules/.pnpm/acorn-jsx@5.3.2_acorn@8.14.0/node_modules/acorn-jsx/index.js"(exports, module) {
|
|
5943
5941
|
"use strict";
|
|
5944
5942
|
var XHTMLEntities = require_xhtml();
|
|
5945
5943
|
var hexNumber = /^[\da-fA-F]+$/;
|
|
@@ -5995,7 +5993,7 @@ var require_acorn_jsx = __commonJS({
|
|
|
5995
5993
|
if (object.type === "JSXMemberExpression")
|
|
5996
5994
|
return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
|
|
5997
5995
|
}
|
|
5998
|
-
|
|
5996
|
+
module.exports = function(options) {
|
|
5999
5997
|
options = options || {};
|
|
6000
5998
|
return function(Parser5) {
|
|
6001
5999
|
return plugin({
|
|
@@ -6004,7 +6002,7 @@ var require_acorn_jsx = __commonJS({
|
|
|
6004
6002
|
}, Parser5);
|
|
6005
6003
|
};
|
|
6006
6004
|
};
|
|
6007
|
-
Object.defineProperty(
|
|
6005
|
+
Object.defineProperty(module.exports, "tokTypes", {
|
|
6008
6006
|
get: function get_tokTypes() {
|
|
6009
6007
|
return getJsxTokens(require_acorn()).tokTypes;
|
|
6010
6008
|
},
|
|
@@ -6360,14 +6358,6 @@ var require_acorn_jsx = __commonJS({
|
|
|
6360
6358
|
}
|
|
6361
6359
|
});
|
|
6362
6360
|
|
|
6363
|
-
// src/index.ts
|
|
6364
|
-
var index_exports = {};
|
|
6365
|
-
__export(index_exports, {
|
|
6366
|
-
parseMDX: () => parseMDX,
|
|
6367
|
-
serializeMDX: () => serializeMDX
|
|
6368
|
-
});
|
|
6369
|
-
module.exports = __toCommonJS(index_exports);
|
|
6370
|
-
|
|
6371
6361
|
// ../../../node_modules/.pnpm/mdast-util-to-string@3.2.0/node_modules/mdast-util-to-string/lib/index.js
|
|
6372
6362
|
var emptyOptions = {};
|
|
6373
6363
|
function toString(value, options) {
|
|
@@ -16440,13 +16430,13 @@ VFileMessage.prototype.ruleId = null;
|
|
|
16440
16430
|
VFileMessage.prototype.position = null;
|
|
16441
16431
|
|
|
16442
16432
|
// ../../../node_modules/.pnpm/vfile@5.3.7/node_modules/vfile/lib/minpath.js
|
|
16443
|
-
|
|
16433
|
+
import { default as default2 } from "path";
|
|
16444
16434
|
|
|
16445
16435
|
// ../../../node_modules/.pnpm/vfile@5.3.7/node_modules/vfile/lib/minproc.js
|
|
16446
|
-
|
|
16436
|
+
import { default as default3 } from "process";
|
|
16447
16437
|
|
|
16448
16438
|
// ../../../node_modules/.pnpm/vfile@5.3.7/node_modules/vfile/lib/minurl.js
|
|
16449
|
-
|
|
16439
|
+
import { fileURLToPath } from "url";
|
|
16450
16440
|
|
|
16451
16441
|
// ../../../node_modules/.pnpm/vfile@5.3.7/node_modules/vfile/lib/minurl.shared.js
|
|
16452
16442
|
function isUrl(fileUrlOrPath) {
|
|
@@ -16494,7 +16484,7 @@ var VFile = class {
|
|
|
16494
16484
|
this.data = {};
|
|
16495
16485
|
this.messages = [];
|
|
16496
16486
|
this.history = [];
|
|
16497
|
-
this.cwd =
|
|
16487
|
+
this.cwd = default3.cwd();
|
|
16498
16488
|
this.value;
|
|
16499
16489
|
this.stored;
|
|
16500
16490
|
this.result;
|
|
@@ -16532,7 +16522,7 @@ var VFile = class {
|
|
|
16532
16522
|
*/
|
|
16533
16523
|
set path(path2) {
|
|
16534
16524
|
if (isUrl(path2)) {
|
|
16535
|
-
path2 =
|
|
16525
|
+
path2 = fileURLToPath(path2);
|
|
16536
16526
|
}
|
|
16537
16527
|
assertNonEmpty(path2, "path");
|
|
16538
16528
|
if (this.path !== path2) {
|
|
@@ -16543,7 +16533,7 @@ var VFile = class {
|
|
|
16543
16533
|
* Get the parent path (example: `'~'`).
|
|
16544
16534
|
*/
|
|
16545
16535
|
get dirname() {
|
|
16546
|
-
return typeof this.path === "string" ?
|
|
16536
|
+
return typeof this.path === "string" ? default2.dirname(this.path) : void 0;
|
|
16547
16537
|
}
|
|
16548
16538
|
/**
|
|
16549
16539
|
* Set the parent path (example: `'~'`).
|
|
@@ -16552,13 +16542,13 @@ var VFile = class {
|
|
|
16552
16542
|
*/
|
|
16553
16543
|
set dirname(dirname) {
|
|
16554
16544
|
assertPath(this.basename, "dirname");
|
|
16555
|
-
this.path =
|
|
16545
|
+
this.path = default2.join(dirname || "", this.basename);
|
|
16556
16546
|
}
|
|
16557
16547
|
/**
|
|
16558
16548
|
* Get the basename (including extname) (example: `'index.min.js'`).
|
|
16559
16549
|
*/
|
|
16560
16550
|
get basename() {
|
|
16561
|
-
return typeof this.path === "string" ?
|
|
16551
|
+
return typeof this.path === "string" ? default2.basename(this.path) : void 0;
|
|
16562
16552
|
}
|
|
16563
16553
|
/**
|
|
16564
16554
|
* Set basename (including extname) (`'index.min.js'`).
|
|
@@ -16570,13 +16560,13 @@ var VFile = class {
|
|
|
16570
16560
|
set basename(basename) {
|
|
16571
16561
|
assertNonEmpty(basename, "basename");
|
|
16572
16562
|
assertPart(basename, "basename");
|
|
16573
|
-
this.path =
|
|
16563
|
+
this.path = default2.join(this.dirname || "", basename);
|
|
16574
16564
|
}
|
|
16575
16565
|
/**
|
|
16576
16566
|
* Get the extname (including dot) (example: `'.js'`).
|
|
16577
16567
|
*/
|
|
16578
16568
|
get extname() {
|
|
16579
|
-
return typeof this.path === "string" ?
|
|
16569
|
+
return typeof this.path === "string" ? default2.extname(this.path) : void 0;
|
|
16580
16570
|
}
|
|
16581
16571
|
/**
|
|
16582
16572
|
* Set the extname (including dot) (example: `'.js'`).
|
|
@@ -16596,13 +16586,13 @@ var VFile = class {
|
|
|
16596
16586
|
throw new Error("`extname` cannot contain multiple dots");
|
|
16597
16587
|
}
|
|
16598
16588
|
}
|
|
16599
|
-
this.path =
|
|
16589
|
+
this.path = default2.join(this.dirname, this.stem + (extname || ""));
|
|
16600
16590
|
}
|
|
16601
16591
|
/**
|
|
16602
16592
|
* Get the stem (basename w/o extname) (example: `'index.min'`).
|
|
16603
16593
|
*/
|
|
16604
16594
|
get stem() {
|
|
16605
|
-
return typeof this.path === "string" ?
|
|
16595
|
+
return typeof this.path === "string" ? default2.basename(this.path, this.extname) : void 0;
|
|
16606
16596
|
}
|
|
16607
16597
|
/**
|
|
16608
16598
|
* Set the stem (basename w/o extname) (example: `'index.min'`).
|
|
@@ -16614,7 +16604,7 @@ var VFile = class {
|
|
|
16614
16604
|
set stem(stem) {
|
|
16615
16605
|
assertNonEmpty(stem, "stem");
|
|
16616
16606
|
assertPart(stem, "stem");
|
|
16617
|
-
this.path =
|
|
16607
|
+
this.path = default2.join(this.dirname || "", stem + (this.extname || ""));
|
|
16618
16608
|
}
|
|
16619
16609
|
/**
|
|
16620
16610
|
* Serialize the file.
|
|
@@ -16702,9 +16692,9 @@ var VFile = class {
|
|
|
16702
16692
|
}
|
|
16703
16693
|
};
|
|
16704
16694
|
function assertPart(part, name2) {
|
|
16705
|
-
if (part && part.includes(
|
|
16695
|
+
if (part && part.includes(default2.sep)) {
|
|
16706
16696
|
throw new Error(
|
|
16707
|
-
"`" + name2 + "` cannot be a path: did not expect `" +
|
|
16697
|
+
"`" + name2 + "` cannot be a path: did not expect `" + default2.sep + "`"
|
|
16708
16698
|
);
|
|
16709
16699
|
}
|
|
16710
16700
|
}
|
|
@@ -18843,12 +18833,12 @@ pp$9.isSimpleAssignTarget = function(expr) {
|
|
|
18843
18833
|
};
|
|
18844
18834
|
var pp$8 = Parser.prototype;
|
|
18845
18835
|
pp$8.parseTopLevel = function(node2) {
|
|
18846
|
-
var
|
|
18836
|
+
var exports = /* @__PURE__ */ Object.create(null);
|
|
18847
18837
|
if (!node2.body) {
|
|
18848
18838
|
node2.body = [];
|
|
18849
18839
|
}
|
|
18850
18840
|
while (this.type !== types$1.eof) {
|
|
18851
|
-
var stmt = this.parseStatement(null, true,
|
|
18841
|
+
var stmt = this.parseStatement(null, true, exports);
|
|
18852
18842
|
node2.body.push(stmt);
|
|
18853
18843
|
}
|
|
18854
18844
|
if (this.inModule) {
|
|
@@ -18904,7 +18894,7 @@ pp$8.isAsyncFunction = function() {
|
|
|
18904
18894
|
var next = this.pos + skip[0].length, after;
|
|
18905
18895
|
return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
|
|
18906
18896
|
};
|
|
18907
|
-
pp$8.parseStatement = function(context, topLevel,
|
|
18897
|
+
pp$8.parseStatement = function(context, topLevel, exports) {
|
|
18908
18898
|
var starttype = this.type, node2 = this.startNode(), kind;
|
|
18909
18899
|
if (this.isLet(context)) {
|
|
18910
18900
|
starttype = types$1._var;
|
|
@@ -18973,7 +18963,7 @@ pp$8.parseStatement = function(context, topLevel, exports2) {
|
|
|
18973
18963
|
this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
|
|
18974
18964
|
}
|
|
18975
18965
|
}
|
|
18976
|
-
return starttype === types$1._import ? this.parseImport(node2) : this.parseExport(node2,
|
|
18966
|
+
return starttype === types$1._import ? this.parseImport(node2) : this.parseExport(node2, exports);
|
|
18977
18967
|
// If the statement does not start with a statement keyword or a
|
|
18978
18968
|
// brace, it's an ExpressionStatement or LabeledStatement. We
|
|
18979
18969
|
// simply start parsing an expression, and afterwards, if the
|
|
@@ -19618,11 +19608,11 @@ function checkKeyName(node2, name2) {
|
|
|
19618
19608
|
var key = node2.key;
|
|
19619
19609
|
return !computed && (key.type === "Identifier" && key.name === name2 || key.type === "Literal" && key.value === name2);
|
|
19620
19610
|
}
|
|
19621
|
-
pp$8.parseExportAllDeclaration = function(node2,
|
|
19611
|
+
pp$8.parseExportAllDeclaration = function(node2, exports) {
|
|
19622
19612
|
if (this.options.ecmaVersion >= 11) {
|
|
19623
19613
|
if (this.eatContextual("as")) {
|
|
19624
19614
|
node2.exported = this.parseModuleExportName();
|
|
19625
|
-
this.checkExport(
|
|
19615
|
+
this.checkExport(exports, node2.exported, this.lastTokStart);
|
|
19626
19616
|
} else {
|
|
19627
19617
|
node2.exported = null;
|
|
19628
19618
|
}
|
|
@@ -19638,28 +19628,28 @@ pp$8.parseExportAllDeclaration = function(node2, exports2) {
|
|
|
19638
19628
|
this.semicolon();
|
|
19639
19629
|
return this.finishNode(node2, "ExportAllDeclaration");
|
|
19640
19630
|
};
|
|
19641
|
-
pp$8.parseExport = function(node2,
|
|
19631
|
+
pp$8.parseExport = function(node2, exports) {
|
|
19642
19632
|
this.next();
|
|
19643
19633
|
if (this.eat(types$1.star)) {
|
|
19644
|
-
return this.parseExportAllDeclaration(node2,
|
|
19634
|
+
return this.parseExportAllDeclaration(node2, exports);
|
|
19645
19635
|
}
|
|
19646
19636
|
if (this.eat(types$1._default)) {
|
|
19647
|
-
this.checkExport(
|
|
19637
|
+
this.checkExport(exports, "default", this.lastTokStart);
|
|
19648
19638
|
node2.declaration = this.parseExportDefaultDeclaration();
|
|
19649
19639
|
return this.finishNode(node2, "ExportDefaultDeclaration");
|
|
19650
19640
|
}
|
|
19651
19641
|
if (this.shouldParseExportStatement()) {
|
|
19652
19642
|
node2.declaration = this.parseExportDeclaration(node2);
|
|
19653
19643
|
if (node2.declaration.type === "VariableDeclaration") {
|
|
19654
|
-
this.checkVariableExport(
|
|
19644
|
+
this.checkVariableExport(exports, node2.declaration.declarations);
|
|
19655
19645
|
} else {
|
|
19656
|
-
this.checkExport(
|
|
19646
|
+
this.checkExport(exports, node2.declaration.id, node2.declaration.id.start);
|
|
19657
19647
|
}
|
|
19658
19648
|
node2.specifiers = [];
|
|
19659
19649
|
node2.source = null;
|
|
19660
19650
|
} else {
|
|
19661
19651
|
node2.declaration = null;
|
|
19662
|
-
node2.specifiers = this.parseExportSpecifiers(
|
|
19652
|
+
node2.specifiers = this.parseExportSpecifiers(exports);
|
|
19663
19653
|
if (this.eatContextual("from")) {
|
|
19664
19654
|
if (this.type !== types$1.string) {
|
|
19665
19655
|
this.unexpected();
|
|
@@ -19704,66 +19694,66 @@ pp$8.parseExportDefaultDeclaration = function() {
|
|
|
19704
19694
|
return declaration;
|
|
19705
19695
|
}
|
|
19706
19696
|
};
|
|
19707
|
-
pp$8.checkExport = function(
|
|
19708
|
-
if (!
|
|
19697
|
+
pp$8.checkExport = function(exports, name2, pos) {
|
|
19698
|
+
if (!exports) {
|
|
19709
19699
|
return;
|
|
19710
19700
|
}
|
|
19711
19701
|
if (typeof name2 !== "string") {
|
|
19712
19702
|
name2 = name2.type === "Identifier" ? name2.name : name2.value;
|
|
19713
19703
|
}
|
|
19714
|
-
if (hasOwn(
|
|
19704
|
+
if (hasOwn(exports, name2)) {
|
|
19715
19705
|
this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'");
|
|
19716
19706
|
}
|
|
19717
|
-
|
|
19707
|
+
exports[name2] = true;
|
|
19718
19708
|
};
|
|
19719
|
-
pp$8.checkPatternExport = function(
|
|
19709
|
+
pp$8.checkPatternExport = function(exports, pat) {
|
|
19720
19710
|
var type = pat.type;
|
|
19721
19711
|
if (type === "Identifier") {
|
|
19722
|
-
this.checkExport(
|
|
19712
|
+
this.checkExport(exports, pat, pat.start);
|
|
19723
19713
|
} else if (type === "ObjectPattern") {
|
|
19724
19714
|
for (var i = 0, list3 = pat.properties; i < list3.length; i += 1) {
|
|
19725
19715
|
var prop = list3[i];
|
|
19726
|
-
this.checkPatternExport(
|
|
19716
|
+
this.checkPatternExport(exports, prop);
|
|
19727
19717
|
}
|
|
19728
19718
|
} else if (type === "ArrayPattern") {
|
|
19729
19719
|
for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
|
|
19730
19720
|
var elt = list$1[i$1];
|
|
19731
19721
|
if (elt) {
|
|
19732
|
-
this.checkPatternExport(
|
|
19722
|
+
this.checkPatternExport(exports, elt);
|
|
19733
19723
|
}
|
|
19734
19724
|
}
|
|
19735
19725
|
} else if (type === "Property") {
|
|
19736
|
-
this.checkPatternExport(
|
|
19726
|
+
this.checkPatternExport(exports, pat.value);
|
|
19737
19727
|
} else if (type === "AssignmentPattern") {
|
|
19738
|
-
this.checkPatternExport(
|
|
19728
|
+
this.checkPatternExport(exports, pat.left);
|
|
19739
19729
|
} else if (type === "RestElement") {
|
|
19740
|
-
this.checkPatternExport(
|
|
19730
|
+
this.checkPatternExport(exports, pat.argument);
|
|
19741
19731
|
}
|
|
19742
19732
|
};
|
|
19743
|
-
pp$8.checkVariableExport = function(
|
|
19744
|
-
if (!
|
|
19733
|
+
pp$8.checkVariableExport = function(exports, decls) {
|
|
19734
|
+
if (!exports) {
|
|
19745
19735
|
return;
|
|
19746
19736
|
}
|
|
19747
19737
|
for (var i = 0, list3 = decls; i < list3.length; i += 1) {
|
|
19748
19738
|
var decl = list3[i];
|
|
19749
|
-
this.checkPatternExport(
|
|
19739
|
+
this.checkPatternExport(exports, decl.id);
|
|
19750
19740
|
}
|
|
19751
19741
|
};
|
|
19752
19742
|
pp$8.shouldParseExportStatement = function() {
|
|
19753
19743
|
return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
|
|
19754
19744
|
};
|
|
19755
|
-
pp$8.parseExportSpecifier = function(
|
|
19745
|
+
pp$8.parseExportSpecifier = function(exports) {
|
|
19756
19746
|
var node2 = this.startNode();
|
|
19757
19747
|
node2.local = this.parseModuleExportName();
|
|
19758
19748
|
node2.exported = this.eatContextual("as") ? this.parseModuleExportName() : node2.local;
|
|
19759
19749
|
this.checkExport(
|
|
19760
|
-
|
|
19750
|
+
exports,
|
|
19761
19751
|
node2.exported,
|
|
19762
19752
|
node2.exported.start
|
|
19763
19753
|
);
|
|
19764
19754
|
return this.finishNode(node2, "ExportSpecifier");
|
|
19765
19755
|
};
|
|
19766
|
-
pp$8.parseExportSpecifiers = function(
|
|
19756
|
+
pp$8.parseExportSpecifiers = function(exports) {
|
|
19767
19757
|
var nodes = [], first = true;
|
|
19768
19758
|
this.expect(types$1.braceL);
|
|
19769
19759
|
while (!this.eat(types$1.braceR)) {
|
|
@@ -19775,7 +19765,7 @@ pp$8.parseExportSpecifiers = function(exports2) {
|
|
|
19775
19765
|
} else {
|
|
19776
19766
|
first = false;
|
|
19777
19767
|
}
|
|
19778
|
-
nodes.push(this.parseExportSpecifier(
|
|
19768
|
+
nodes.push(this.parseExportSpecifier(exports));
|
|
19779
19769
|
}
|
|
19780
19770
|
return nodes;
|
|
19781
19771
|
};
|
|
@@ -43046,12 +43036,17 @@ var eat2 = (c, field, imageCallback) => {
|
|
|
43046
43036
|
const marks = getMarks(first);
|
|
43047
43037
|
if (marks.length === 0) {
|
|
43048
43038
|
if (first.linkifyTextNode) {
|
|
43039
|
+
const f = first;
|
|
43049
43040
|
return [
|
|
43050
|
-
first.linkifyTextNode(text5(
|
|
43041
|
+
first.linkifyTextNode(text5({ text: f.text })),
|
|
43051
43042
|
...eat2(content3.slice(1), field, imageCallback)
|
|
43052
43043
|
];
|
|
43053
43044
|
} else {
|
|
43054
|
-
|
|
43045
|
+
const f = first;
|
|
43046
|
+
return [
|
|
43047
|
+
text5({ text: f.text }),
|
|
43048
|
+
...eat2(content3.slice(1), field, imageCallback)
|
|
43049
|
+
];
|
|
43055
43050
|
}
|
|
43056
43051
|
}
|
|
43057
43052
|
let nonMatchingSiblingIndex = 0;
|
|
@@ -43087,17 +43082,23 @@ var eat2 = (c, field, imageCallback) => {
|
|
|
43087
43082
|
}
|
|
43088
43083
|
});
|
|
43089
43084
|
if (!markToProcess) {
|
|
43090
|
-
|
|
43085
|
+
const f = first;
|
|
43086
|
+
return [
|
|
43087
|
+
text5({ text: f.text }),
|
|
43088
|
+
...eat2(content3.slice(1), field, imageCallback)
|
|
43089
|
+
];
|
|
43091
43090
|
}
|
|
43092
43091
|
if (markToProcess === "inlineCode") {
|
|
43093
43092
|
if (nonMatchingSiblingIndex) {
|
|
43094
43093
|
throw new Error("Marks inside inline code are not supported");
|
|
43095
43094
|
}
|
|
43095
|
+
const f = first;
|
|
43096
43096
|
const node2 = {
|
|
43097
43097
|
type: markToProcess,
|
|
43098
|
-
value:
|
|
43098
|
+
value: f.text
|
|
43099
43099
|
};
|
|
43100
43100
|
return [
|
|
43101
|
+
// @ts-ignore
|
|
43101
43102
|
first.linkifyTextNode?.(node2) ?? node2,
|
|
43102
43103
|
...eat2(content3.slice(nonMatchingSiblingIndex + 1), field, imageCallback)
|
|
43103
43104
|
];
|
|
@@ -43843,13 +43844,17 @@ var eat3 = (c, field, imageCallback) => {
|
|
|
43843
43844
|
}
|
|
43844
43845
|
const marks = getMarks(first);
|
|
43845
43846
|
if (marks.length === 0) {
|
|
43847
|
+
const f = first;
|
|
43846
43848
|
if (first.linkifyTextNode) {
|
|
43847
43849
|
return [
|
|
43848
|
-
first.linkifyTextNode(text6(
|
|
43850
|
+
first.linkifyTextNode(text6({ text: f.text })),
|
|
43849
43851
|
...eat3(content3.slice(1), field, imageCallback)
|
|
43850
43852
|
];
|
|
43851
43853
|
} else {
|
|
43852
|
-
return [
|
|
43854
|
+
return [
|
|
43855
|
+
text6({ text: f.text }),
|
|
43856
|
+
...eat3(content3.slice(1), field, imageCallback)
|
|
43857
|
+
];
|
|
43853
43858
|
}
|
|
43854
43859
|
}
|
|
43855
43860
|
let nonMatchingSiblingIndex = 0;
|
|
@@ -43885,17 +43890,23 @@ var eat3 = (c, field, imageCallback) => {
|
|
|
43885
43890
|
}
|
|
43886
43891
|
});
|
|
43887
43892
|
if (!markToProcess) {
|
|
43888
|
-
|
|
43893
|
+
const f = first;
|
|
43894
|
+
return [
|
|
43895
|
+
text6({ text: f.text }),
|
|
43896
|
+
...eat3(content3.slice(1), field, imageCallback)
|
|
43897
|
+
];
|
|
43889
43898
|
}
|
|
43890
43899
|
if (markToProcess === "inlineCode") {
|
|
43900
|
+
const f = first;
|
|
43891
43901
|
if (nonMatchingSiblingIndex) {
|
|
43892
43902
|
throw new Error(`Marks inside inline code are not supported`);
|
|
43893
43903
|
}
|
|
43894
43904
|
const node2 = {
|
|
43895
43905
|
type: markToProcess,
|
|
43896
|
-
value:
|
|
43906
|
+
value: f.text
|
|
43897
43907
|
};
|
|
43898
43908
|
return [
|
|
43909
|
+
// @ts-ignore
|
|
43899
43910
|
first.linkifyTextNode?.(node2) ?? node2,
|
|
43900
43911
|
...eat3(content3.slice(nonMatchingSiblingIndex + 1), field, imageCallback)
|
|
43901
43912
|
];
|
|
@@ -45573,12 +45584,12 @@ pp$92.isSimpleAssignTarget = function(expr) {
|
|
|
45573
45584
|
};
|
|
45574
45585
|
var pp$82 = Parser3.prototype;
|
|
45575
45586
|
pp$82.parseTopLevel = function(node2) {
|
|
45576
|
-
var
|
|
45587
|
+
var exports = /* @__PURE__ */ Object.create(null);
|
|
45577
45588
|
if (!node2.body) {
|
|
45578
45589
|
node2.body = [];
|
|
45579
45590
|
}
|
|
45580
45591
|
while (this.type !== types$12.eof) {
|
|
45581
|
-
var stmt = this.parseStatement(null, true,
|
|
45592
|
+
var stmt = this.parseStatement(null, true, exports);
|
|
45582
45593
|
node2.body.push(stmt);
|
|
45583
45594
|
}
|
|
45584
45595
|
if (this.inModule) {
|
|
@@ -45634,7 +45645,7 @@ pp$82.isAsyncFunction = function() {
|
|
|
45634
45645
|
var next = this.pos + skip[0].length, after;
|
|
45635
45646
|
return !lineBreak2.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar2(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
|
|
45636
45647
|
};
|
|
45637
|
-
pp$82.parseStatement = function(context, topLevel,
|
|
45648
|
+
pp$82.parseStatement = function(context, topLevel, exports) {
|
|
45638
45649
|
var starttype = this.type, node2 = this.startNode(), kind;
|
|
45639
45650
|
if (this.isLet(context)) {
|
|
45640
45651
|
starttype = types$12._var;
|
|
@@ -45703,7 +45714,7 @@ pp$82.parseStatement = function(context, topLevel, exports2) {
|
|
|
45703
45714
|
this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
|
|
45704
45715
|
}
|
|
45705
45716
|
}
|
|
45706
|
-
return starttype === types$12._import ? this.parseImport(node2) : this.parseExport(node2,
|
|
45717
|
+
return starttype === types$12._import ? this.parseImport(node2) : this.parseExport(node2, exports);
|
|
45707
45718
|
// If the statement does not start with a statement keyword or a
|
|
45708
45719
|
// brace, it's an ExpressionStatement or LabeledStatement. We
|
|
45709
45720
|
// simply start parsing an expression, and afterwards, if the
|
|
@@ -46336,13 +46347,13 @@ function checkKeyName2(node2, name2) {
|
|
|
46336
46347
|
var key = node2.key;
|
|
46337
46348
|
return !computed && (key.type === "Identifier" && key.name === name2 || key.type === "Literal" && key.value === name2);
|
|
46338
46349
|
}
|
|
46339
|
-
pp$82.parseExport = function(node2,
|
|
46350
|
+
pp$82.parseExport = function(node2, exports) {
|
|
46340
46351
|
this.next();
|
|
46341
46352
|
if (this.eat(types$12.star)) {
|
|
46342
46353
|
if (this.options.ecmaVersion >= 11) {
|
|
46343
46354
|
if (this.eatContextual("as")) {
|
|
46344
46355
|
node2.exported = this.parseModuleExportName();
|
|
46345
|
-
this.checkExport(
|
|
46356
|
+
this.checkExport(exports, node2.exported, this.lastTokStart);
|
|
46346
46357
|
} else {
|
|
46347
46358
|
node2.exported = null;
|
|
46348
46359
|
}
|
|
@@ -46356,7 +46367,7 @@ pp$82.parseExport = function(node2, exports2) {
|
|
|
46356
46367
|
return this.finishNode(node2, "ExportAllDeclaration");
|
|
46357
46368
|
}
|
|
46358
46369
|
if (this.eat(types$12._default)) {
|
|
46359
|
-
this.checkExport(
|
|
46370
|
+
this.checkExport(exports, "default", this.lastTokStart);
|
|
46360
46371
|
var isAsync;
|
|
46361
46372
|
if (this.type === types$12._function || (isAsync = this.isAsyncFunction())) {
|
|
46362
46373
|
var fNode = this.startNode();
|
|
@@ -46377,15 +46388,15 @@ pp$82.parseExport = function(node2, exports2) {
|
|
|
46377
46388
|
if (this.shouldParseExportStatement()) {
|
|
46378
46389
|
node2.declaration = this.parseStatement(null);
|
|
46379
46390
|
if (node2.declaration.type === "VariableDeclaration") {
|
|
46380
|
-
this.checkVariableExport(
|
|
46391
|
+
this.checkVariableExport(exports, node2.declaration.declarations);
|
|
46381
46392
|
} else {
|
|
46382
|
-
this.checkExport(
|
|
46393
|
+
this.checkExport(exports, node2.declaration.id, node2.declaration.id.start);
|
|
46383
46394
|
}
|
|
46384
46395
|
node2.specifiers = [];
|
|
46385
46396
|
node2.source = null;
|
|
46386
46397
|
} else {
|
|
46387
46398
|
node2.declaration = null;
|
|
46388
|
-
node2.specifiers = this.parseExportSpecifiers(
|
|
46399
|
+
node2.specifiers = this.parseExportSpecifiers(exports);
|
|
46389
46400
|
if (this.eatContextual("from")) {
|
|
46390
46401
|
if (this.type !== types$12.string) {
|
|
46391
46402
|
this.unexpected();
|
|
@@ -46406,57 +46417,57 @@ pp$82.parseExport = function(node2, exports2) {
|
|
|
46406
46417
|
}
|
|
46407
46418
|
return this.finishNode(node2, "ExportNamedDeclaration");
|
|
46408
46419
|
};
|
|
46409
|
-
pp$82.checkExport = function(
|
|
46410
|
-
if (!
|
|
46420
|
+
pp$82.checkExport = function(exports, name2, pos) {
|
|
46421
|
+
if (!exports) {
|
|
46411
46422
|
return;
|
|
46412
46423
|
}
|
|
46413
46424
|
if (typeof name2 !== "string") {
|
|
46414
46425
|
name2 = name2.type === "Identifier" ? name2.name : name2.value;
|
|
46415
46426
|
}
|
|
46416
|
-
if (hasOwn2(
|
|
46427
|
+
if (hasOwn2(exports, name2)) {
|
|
46417
46428
|
this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'");
|
|
46418
46429
|
}
|
|
46419
|
-
|
|
46430
|
+
exports[name2] = true;
|
|
46420
46431
|
};
|
|
46421
|
-
pp$82.checkPatternExport = function(
|
|
46432
|
+
pp$82.checkPatternExport = function(exports, pat) {
|
|
46422
46433
|
var type = pat.type;
|
|
46423
46434
|
if (type === "Identifier") {
|
|
46424
|
-
this.checkExport(
|
|
46435
|
+
this.checkExport(exports, pat, pat.start);
|
|
46425
46436
|
} else if (type === "ObjectPattern") {
|
|
46426
46437
|
for (var i = 0, list3 = pat.properties; i < list3.length; i += 1) {
|
|
46427
46438
|
var prop = list3[i];
|
|
46428
|
-
this.checkPatternExport(
|
|
46439
|
+
this.checkPatternExport(exports, prop);
|
|
46429
46440
|
}
|
|
46430
46441
|
} else if (type === "ArrayPattern") {
|
|
46431
46442
|
for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
|
|
46432
46443
|
var elt = list$1[i$1];
|
|
46433
46444
|
if (elt) {
|
|
46434
|
-
this.checkPatternExport(
|
|
46445
|
+
this.checkPatternExport(exports, elt);
|
|
46435
46446
|
}
|
|
46436
46447
|
}
|
|
46437
46448
|
} else if (type === "Property") {
|
|
46438
|
-
this.checkPatternExport(
|
|
46449
|
+
this.checkPatternExport(exports, pat.value);
|
|
46439
46450
|
} else if (type === "AssignmentPattern") {
|
|
46440
|
-
this.checkPatternExport(
|
|
46451
|
+
this.checkPatternExport(exports, pat.left);
|
|
46441
46452
|
} else if (type === "RestElement") {
|
|
46442
|
-
this.checkPatternExport(
|
|
46453
|
+
this.checkPatternExport(exports, pat.argument);
|
|
46443
46454
|
} else if (type === "ParenthesizedExpression") {
|
|
46444
|
-
this.checkPatternExport(
|
|
46455
|
+
this.checkPatternExport(exports, pat.expression);
|
|
46445
46456
|
}
|
|
46446
46457
|
};
|
|
46447
|
-
pp$82.checkVariableExport = function(
|
|
46448
|
-
if (!
|
|
46458
|
+
pp$82.checkVariableExport = function(exports, decls) {
|
|
46459
|
+
if (!exports) {
|
|
46449
46460
|
return;
|
|
46450
46461
|
}
|
|
46451
46462
|
for (var i = 0, list3 = decls; i < list3.length; i += 1) {
|
|
46452
46463
|
var decl = list3[i];
|
|
46453
|
-
this.checkPatternExport(
|
|
46464
|
+
this.checkPatternExport(exports, decl.id);
|
|
46454
46465
|
}
|
|
46455
46466
|
};
|
|
46456
46467
|
pp$82.shouldParseExportStatement = function() {
|
|
46457
46468
|
return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
|
|
46458
46469
|
};
|
|
46459
|
-
pp$82.parseExportSpecifiers = function(
|
|
46470
|
+
pp$82.parseExportSpecifiers = function(exports) {
|
|
46460
46471
|
var nodes = [], first = true;
|
|
46461
46472
|
this.expect(types$12.braceL);
|
|
46462
46473
|
while (!this.eat(types$12.braceR)) {
|
|
@@ -46472,7 +46483,7 @@ pp$82.parseExportSpecifiers = function(exports2) {
|
|
|
46472
46483
|
node2.local = this.parseModuleExportName();
|
|
46473
46484
|
node2.exported = this.eatContextual("as") ? this.parseModuleExportName() : node2.local;
|
|
46474
46485
|
this.checkExport(
|
|
46475
|
-
|
|
46486
|
+
exports,
|
|
46476
46487
|
node2.exported,
|
|
46477
46488
|
node2.exported.start
|
|
46478
46489
|
);
|
|
@@ -50940,11 +50951,10 @@ var replaceAll = (string3, target, value) => {
|
|
|
50940
50951
|
const regex = new RegExp(target, "g");
|
|
50941
50952
|
return string3.valueOf().replace(regex, value);
|
|
50942
50953
|
};
|
|
50943
|
-
|
|
50944
|
-
0 && (module.exports = {
|
|
50954
|
+
export {
|
|
50945
50955
|
parseMDX,
|
|
50946
50956
|
serializeMDX
|
|
50947
|
-
}
|
|
50957
|
+
};
|
|
50948
50958
|
/*! Bundled license information:
|
|
50949
50959
|
|
|
50950
50960
|
is-buffer/index.js:
|