@tinacms/mdx 0.0.0-a1ff961-20250623024558 → 0.0.0-a30bc52-20251201062201

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.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"(exports2, module2) {
36
- module2.exports = function isBuffer2(obj) {
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"(exports2, module2) {
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
- module2.exports = function extend4() {
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"(exports2, module2) {
136
- module2.exports = {
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"(exports2, module2) {
394
+ "../../../node_modules/.pnpm/acorn@8.14.0/node_modules/acorn/dist/acorn.js"(exports, module) {
397
395
  (function(global2, factory) {
398
- typeof exports2 === "object" && typeof module2 !== "undefined" ? factory(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.acorn = {}));
399
- })(exports2, function(exports3) {
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 exports4 = /* @__PURE__ */ Object.create(null);
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, exports4);
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, exports4) {
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, exports4);
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, exports4) {
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(exports4, node2.exported, this.lastTokStart);
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, exports4) {
1852
+ pp$83.parseExport = function(node2, exports3) {
1855
1853
  this.next();
1856
1854
  if (this.eat(types$13.star)) {
1857
- return this.parseExportAllDeclaration(node2, exports4);
1855
+ return this.parseExportAllDeclaration(node2, exports3);
1858
1856
  }
1859
1857
  if (this.eat(types$13._default)) {
1860
- this.checkExport(exports4, "default", this.lastTokStart);
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(exports4, node2.declaration.declarations);
1865
+ this.checkVariableExport(exports3, node2.declaration.declarations);
1868
1866
  } else {
1869
- this.checkExport(exports4, node2.declaration.id, node2.declaration.id.start);
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(exports4);
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(exports4, name2, pos) {
1921
- if (!exports4) {
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(exports4, name2)) {
1925
+ if (hasOwn3(exports3, name2)) {
1928
1926
  this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'");
1929
1927
  }
1930
- exports4[name2] = true;
1928
+ exports3[name2] = true;
1931
1929
  };
1932
- pp$83.checkPatternExport = function(exports4, pat) {
1930
+ pp$83.checkPatternExport = function(exports3, pat) {
1933
1931
  var type = pat.type;
1934
1932
  if (type === "Identifier") {
1935
- this.checkExport(exports4, pat, pat.start);
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(exports4, prop);
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(exports4, elt);
1943
+ this.checkPatternExport(exports3, elt);
1946
1944
  }
1947
1945
  }
1948
1946
  } else if (type === "Property") {
1949
- this.checkPatternExport(exports4, pat.value);
1947
+ this.checkPatternExport(exports3, pat.value);
1950
1948
  } else if (type === "AssignmentPattern") {
1951
- this.checkPatternExport(exports4, pat.left);
1949
+ this.checkPatternExport(exports3, pat.left);
1952
1950
  } else if (type === "RestElement") {
1953
- this.checkPatternExport(exports4, pat.argument);
1951
+ this.checkPatternExport(exports3, pat.argument);
1954
1952
  }
1955
1953
  };
1956
- pp$83.checkVariableExport = function(exports4, decls) {
1957
- if (!exports4) {
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(exports4, decl.id);
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(exports4) {
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
- exports4,
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(exports4) {
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(exports4));
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
- exports3.Node = Node5;
5915
- exports3.Parser = Parser5;
5916
- exports3.Position = Position5;
5917
- exports3.SourceLocation = SourceLocation5;
5918
- exports3.TokContext = TokContext5;
5919
- exports3.Token = Token5;
5920
- exports3.TokenType = TokenType5;
5921
- exports3.defaultOptions = defaultOptions3;
5922
- exports3.getLineInfo = getLineInfo3;
5923
- exports3.isIdentifierChar = isIdentifierChar3;
5924
- exports3.isIdentifierStart = isIdentifierStart3;
5925
- exports3.isNewLine = isNewLine3;
5926
- exports3.keywordTypes = keywords3;
5927
- exports3.lineBreak = lineBreak3;
5928
- exports3.lineBreakG = lineBreakG3;
5929
- exports3.nonASCIIwhitespace = nonASCIIwhitespace3;
5930
- exports3.parse = parse7;
5931
- exports3.parseExpressionAt = parseExpressionAt4;
5932
- exports3.tokContexts = types4;
5933
- exports3.tokTypes = types$13;
5934
- exports3.tokenizer = tokenizer4;
5935
- exports3.version = version3;
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"(exports2, module2) {
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
- module2.exports = function(options) {
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(module2.exports, "tokTypes", {
6005
+ Object.defineProperty(module.exports, "tokTypes", {
6008
6006
  get: function get_tokTypes() {
6009
6007
  return getJsxTokens(require_acorn()).tokTypes;
6010
6008
  },
@@ -6360,90 +6358,6 @@ var require_acorn_jsx = __commonJS({
6360
6358
  }
6361
6359
  });
6362
6360
 
6363
- // ../../../node_modules/.pnpm/lodash.flatten@4.4.0/node_modules/lodash.flatten/index.js
6364
- var require_lodash = __commonJS({
6365
- "../../../node_modules/.pnpm/lodash.flatten@4.4.0/node_modules/lodash.flatten/index.js"(exports2, module2) {
6366
- var MAX_SAFE_INTEGER = 9007199254740991;
6367
- var argsTag = "[object Arguments]";
6368
- var funcTag = "[object Function]";
6369
- var genTag = "[object GeneratorFunction]";
6370
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
6371
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
6372
- var root2 = freeGlobal || freeSelf || Function("return this")();
6373
- function arrayPush(array, values2) {
6374
- var index2 = -1, length = values2.length, offset3 = array.length;
6375
- while (++index2 < length) {
6376
- array[offset3 + index2] = values2[index2];
6377
- }
6378
- return array;
6379
- }
6380
- var objectProto = Object.prototype;
6381
- var hasOwnProperty4 = objectProto.hasOwnProperty;
6382
- var objectToString = objectProto.toString;
6383
- var Symbol2 = root2.Symbol;
6384
- var propertyIsEnumerable = objectProto.propertyIsEnumerable;
6385
- var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0;
6386
- function baseFlatten(array, depth, predicate, isStrict, result) {
6387
- var index2 = -1, length = array.length;
6388
- predicate || (predicate = isFlattenable);
6389
- result || (result = []);
6390
- while (++index2 < length) {
6391
- var value = array[index2];
6392
- if (depth > 0 && predicate(value)) {
6393
- if (depth > 1) {
6394
- baseFlatten(value, depth - 1, predicate, isStrict, result);
6395
- } else {
6396
- arrayPush(result, value);
6397
- }
6398
- } else if (!isStrict) {
6399
- result[result.length] = value;
6400
- }
6401
- }
6402
- return result;
6403
- }
6404
- function isFlattenable(value) {
6405
- return isArray3(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
6406
- }
6407
- function flatten2(array) {
6408
- var length = array ? array.length : 0;
6409
- return length ? baseFlatten(array, 1) : [];
6410
- }
6411
- function isArguments(value) {
6412
- return isArrayLikeObject(value) && hasOwnProperty4.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
6413
- }
6414
- var isArray3 = Array.isArray;
6415
- function isArrayLike(value) {
6416
- return value != null && isLength(value.length) && !isFunction(value);
6417
- }
6418
- function isArrayLikeObject(value) {
6419
- return isObjectLike(value) && isArrayLike(value);
6420
- }
6421
- function isFunction(value) {
6422
- var tag = isObject2(value) ? objectToString.call(value) : "";
6423
- return tag == funcTag || tag == genTag;
6424
- }
6425
- function isLength(value) {
6426
- return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
6427
- }
6428
- function isObject2(value) {
6429
- var type = typeof value;
6430
- return !!value && (type == "object" || type == "function");
6431
- }
6432
- function isObjectLike(value) {
6433
- return !!value && typeof value == "object";
6434
- }
6435
- module2.exports = flatten2;
6436
- }
6437
- });
6438
-
6439
- // src/index.ts
6440
- var index_exports = {};
6441
- __export(index_exports, {
6442
- parseMDX: () => parseMDX,
6443
- serializeMDX: () => serializeMDX
6444
- });
6445
- module.exports = __toCommonJS(index_exports);
6446
-
6447
6361
  // ../../../node_modules/.pnpm/mdast-util-to-string@3.2.0/node_modules/mdast-util-to-string/lib/index.js
6448
6362
  var emptyOptions = {};
6449
6363
  function toString(value, options) {
@@ -16516,13 +16430,13 @@ VFileMessage.prototype.ruleId = null;
16516
16430
  VFileMessage.prototype.position = null;
16517
16431
 
16518
16432
  // ../../../node_modules/.pnpm/vfile@5.3.7/node_modules/vfile/lib/minpath.js
16519
- var import_path = __toESM(require("path"), 1);
16433
+ import { default as default2 } from "path";
16520
16434
 
16521
16435
  // ../../../node_modules/.pnpm/vfile@5.3.7/node_modules/vfile/lib/minproc.js
16522
- var import_process = __toESM(require("process"), 1);
16436
+ import { default as default3 } from "process";
16523
16437
 
16524
16438
  // ../../../node_modules/.pnpm/vfile@5.3.7/node_modules/vfile/lib/minurl.js
16525
- var import_url = require("url");
16439
+ import { fileURLToPath } from "url";
16526
16440
 
16527
16441
  // ../../../node_modules/.pnpm/vfile@5.3.7/node_modules/vfile/lib/minurl.shared.js
16528
16442
  function isUrl(fileUrlOrPath) {
@@ -16570,7 +16484,7 @@ var VFile = class {
16570
16484
  this.data = {};
16571
16485
  this.messages = [];
16572
16486
  this.history = [];
16573
- this.cwd = import_process.default.cwd();
16487
+ this.cwd = default3.cwd();
16574
16488
  this.value;
16575
16489
  this.stored;
16576
16490
  this.result;
@@ -16608,7 +16522,7 @@ var VFile = class {
16608
16522
  */
16609
16523
  set path(path2) {
16610
16524
  if (isUrl(path2)) {
16611
- path2 = (0, import_url.fileURLToPath)(path2);
16525
+ path2 = fileURLToPath(path2);
16612
16526
  }
16613
16527
  assertNonEmpty(path2, "path");
16614
16528
  if (this.path !== path2) {
@@ -16619,7 +16533,7 @@ var VFile = class {
16619
16533
  * Get the parent path (example: `'~'`).
16620
16534
  */
16621
16535
  get dirname() {
16622
- return typeof this.path === "string" ? import_path.default.dirname(this.path) : void 0;
16536
+ return typeof this.path === "string" ? default2.dirname(this.path) : void 0;
16623
16537
  }
16624
16538
  /**
16625
16539
  * Set the parent path (example: `'~'`).
@@ -16628,13 +16542,13 @@ var VFile = class {
16628
16542
  */
16629
16543
  set dirname(dirname) {
16630
16544
  assertPath(this.basename, "dirname");
16631
- this.path = import_path.default.join(dirname || "", this.basename);
16545
+ this.path = default2.join(dirname || "", this.basename);
16632
16546
  }
16633
16547
  /**
16634
16548
  * Get the basename (including extname) (example: `'index.min.js'`).
16635
16549
  */
16636
16550
  get basename() {
16637
- return typeof this.path === "string" ? import_path.default.basename(this.path) : void 0;
16551
+ return typeof this.path === "string" ? default2.basename(this.path) : void 0;
16638
16552
  }
16639
16553
  /**
16640
16554
  * Set basename (including extname) (`'index.min.js'`).
@@ -16646,13 +16560,13 @@ var VFile = class {
16646
16560
  set basename(basename) {
16647
16561
  assertNonEmpty(basename, "basename");
16648
16562
  assertPart(basename, "basename");
16649
- this.path = import_path.default.join(this.dirname || "", basename);
16563
+ this.path = default2.join(this.dirname || "", basename);
16650
16564
  }
16651
16565
  /**
16652
16566
  * Get the extname (including dot) (example: `'.js'`).
16653
16567
  */
16654
16568
  get extname() {
16655
- return typeof this.path === "string" ? import_path.default.extname(this.path) : void 0;
16569
+ return typeof this.path === "string" ? default2.extname(this.path) : void 0;
16656
16570
  }
16657
16571
  /**
16658
16572
  * Set the extname (including dot) (example: `'.js'`).
@@ -16672,13 +16586,13 @@ var VFile = class {
16672
16586
  throw new Error("`extname` cannot contain multiple dots");
16673
16587
  }
16674
16588
  }
16675
- this.path = import_path.default.join(this.dirname, this.stem + (extname || ""));
16589
+ this.path = default2.join(this.dirname, this.stem + (extname || ""));
16676
16590
  }
16677
16591
  /**
16678
16592
  * Get the stem (basename w/o extname) (example: `'index.min'`).
16679
16593
  */
16680
16594
  get stem() {
16681
- return typeof this.path === "string" ? import_path.default.basename(this.path, this.extname) : void 0;
16595
+ return typeof this.path === "string" ? default2.basename(this.path, this.extname) : void 0;
16682
16596
  }
16683
16597
  /**
16684
16598
  * Set the stem (basename w/o extname) (example: `'index.min'`).
@@ -16690,7 +16604,7 @@ var VFile = class {
16690
16604
  set stem(stem) {
16691
16605
  assertNonEmpty(stem, "stem");
16692
16606
  assertPart(stem, "stem");
16693
- this.path = import_path.default.join(this.dirname || "", stem + (this.extname || ""));
16607
+ this.path = default2.join(this.dirname || "", stem + (this.extname || ""));
16694
16608
  }
16695
16609
  /**
16696
16610
  * Serialize the file.
@@ -16778,9 +16692,9 @@ var VFile = class {
16778
16692
  }
16779
16693
  };
16780
16694
  function assertPart(part, name2) {
16781
- if (part && part.includes(import_path.default.sep)) {
16695
+ if (part && part.includes(default2.sep)) {
16782
16696
  throw new Error(
16783
- "`" + name2 + "` cannot be a path: did not expect `" + import_path.default.sep + "`"
16697
+ "`" + name2 + "` cannot be a path: did not expect `" + default2.sep + "`"
16784
16698
  );
16785
16699
  }
16786
16700
  }
@@ -18919,12 +18833,12 @@ pp$9.isSimpleAssignTarget = function(expr) {
18919
18833
  };
18920
18834
  var pp$8 = Parser.prototype;
18921
18835
  pp$8.parseTopLevel = function(node2) {
18922
- var exports2 = /* @__PURE__ */ Object.create(null);
18836
+ var exports = /* @__PURE__ */ Object.create(null);
18923
18837
  if (!node2.body) {
18924
18838
  node2.body = [];
18925
18839
  }
18926
18840
  while (this.type !== types$1.eof) {
18927
- var stmt = this.parseStatement(null, true, exports2);
18841
+ var stmt = this.parseStatement(null, true, exports);
18928
18842
  node2.body.push(stmt);
18929
18843
  }
18930
18844
  if (this.inModule) {
@@ -18980,7 +18894,7 @@ pp$8.isAsyncFunction = function() {
18980
18894
  var next = this.pos + skip[0].length, after;
18981
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));
18982
18896
  };
18983
- pp$8.parseStatement = function(context, topLevel, exports2) {
18897
+ pp$8.parseStatement = function(context, topLevel, exports) {
18984
18898
  var starttype = this.type, node2 = this.startNode(), kind;
18985
18899
  if (this.isLet(context)) {
18986
18900
  starttype = types$1._var;
@@ -19049,7 +18963,7 @@ pp$8.parseStatement = function(context, topLevel, exports2) {
19049
18963
  this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
19050
18964
  }
19051
18965
  }
19052
- return starttype === types$1._import ? this.parseImport(node2) : this.parseExport(node2, exports2);
18966
+ return starttype === types$1._import ? this.parseImport(node2) : this.parseExport(node2, exports);
19053
18967
  // If the statement does not start with a statement keyword or a
19054
18968
  // brace, it's an ExpressionStatement or LabeledStatement. We
19055
18969
  // simply start parsing an expression, and afterwards, if the
@@ -19694,11 +19608,11 @@ function checkKeyName(node2, name2) {
19694
19608
  var key = node2.key;
19695
19609
  return !computed && (key.type === "Identifier" && key.name === name2 || key.type === "Literal" && key.value === name2);
19696
19610
  }
19697
- pp$8.parseExportAllDeclaration = function(node2, exports2) {
19611
+ pp$8.parseExportAllDeclaration = function(node2, exports) {
19698
19612
  if (this.options.ecmaVersion >= 11) {
19699
19613
  if (this.eatContextual("as")) {
19700
19614
  node2.exported = this.parseModuleExportName();
19701
- this.checkExport(exports2, node2.exported, this.lastTokStart);
19615
+ this.checkExport(exports, node2.exported, this.lastTokStart);
19702
19616
  } else {
19703
19617
  node2.exported = null;
19704
19618
  }
@@ -19714,28 +19628,28 @@ pp$8.parseExportAllDeclaration = function(node2, exports2) {
19714
19628
  this.semicolon();
19715
19629
  return this.finishNode(node2, "ExportAllDeclaration");
19716
19630
  };
19717
- pp$8.parseExport = function(node2, exports2) {
19631
+ pp$8.parseExport = function(node2, exports) {
19718
19632
  this.next();
19719
19633
  if (this.eat(types$1.star)) {
19720
- return this.parseExportAllDeclaration(node2, exports2);
19634
+ return this.parseExportAllDeclaration(node2, exports);
19721
19635
  }
19722
19636
  if (this.eat(types$1._default)) {
19723
- this.checkExport(exports2, "default", this.lastTokStart);
19637
+ this.checkExport(exports, "default", this.lastTokStart);
19724
19638
  node2.declaration = this.parseExportDefaultDeclaration();
19725
19639
  return this.finishNode(node2, "ExportDefaultDeclaration");
19726
19640
  }
19727
19641
  if (this.shouldParseExportStatement()) {
19728
19642
  node2.declaration = this.parseExportDeclaration(node2);
19729
19643
  if (node2.declaration.type === "VariableDeclaration") {
19730
- this.checkVariableExport(exports2, node2.declaration.declarations);
19644
+ this.checkVariableExport(exports, node2.declaration.declarations);
19731
19645
  } else {
19732
- this.checkExport(exports2, node2.declaration.id, node2.declaration.id.start);
19646
+ this.checkExport(exports, node2.declaration.id, node2.declaration.id.start);
19733
19647
  }
19734
19648
  node2.specifiers = [];
19735
19649
  node2.source = null;
19736
19650
  } else {
19737
19651
  node2.declaration = null;
19738
- node2.specifiers = this.parseExportSpecifiers(exports2);
19652
+ node2.specifiers = this.parseExportSpecifiers(exports);
19739
19653
  if (this.eatContextual("from")) {
19740
19654
  if (this.type !== types$1.string) {
19741
19655
  this.unexpected();
@@ -19780,66 +19694,66 @@ pp$8.parseExportDefaultDeclaration = function() {
19780
19694
  return declaration;
19781
19695
  }
19782
19696
  };
19783
- pp$8.checkExport = function(exports2, name2, pos) {
19784
- if (!exports2) {
19697
+ pp$8.checkExport = function(exports, name2, pos) {
19698
+ if (!exports) {
19785
19699
  return;
19786
19700
  }
19787
19701
  if (typeof name2 !== "string") {
19788
19702
  name2 = name2.type === "Identifier" ? name2.name : name2.value;
19789
19703
  }
19790
- if (hasOwn(exports2, name2)) {
19704
+ if (hasOwn(exports, name2)) {
19791
19705
  this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'");
19792
19706
  }
19793
- exports2[name2] = true;
19707
+ exports[name2] = true;
19794
19708
  };
19795
- pp$8.checkPatternExport = function(exports2, pat) {
19709
+ pp$8.checkPatternExport = function(exports, pat) {
19796
19710
  var type = pat.type;
19797
19711
  if (type === "Identifier") {
19798
- this.checkExport(exports2, pat, pat.start);
19712
+ this.checkExport(exports, pat, pat.start);
19799
19713
  } else if (type === "ObjectPattern") {
19800
19714
  for (var i = 0, list3 = pat.properties; i < list3.length; i += 1) {
19801
19715
  var prop = list3[i];
19802
- this.checkPatternExport(exports2, prop);
19716
+ this.checkPatternExport(exports, prop);
19803
19717
  }
19804
19718
  } else if (type === "ArrayPattern") {
19805
19719
  for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
19806
19720
  var elt = list$1[i$1];
19807
19721
  if (elt) {
19808
- this.checkPatternExport(exports2, elt);
19722
+ this.checkPatternExport(exports, elt);
19809
19723
  }
19810
19724
  }
19811
19725
  } else if (type === "Property") {
19812
- this.checkPatternExport(exports2, pat.value);
19726
+ this.checkPatternExport(exports, pat.value);
19813
19727
  } else if (type === "AssignmentPattern") {
19814
- this.checkPatternExport(exports2, pat.left);
19728
+ this.checkPatternExport(exports, pat.left);
19815
19729
  } else if (type === "RestElement") {
19816
- this.checkPatternExport(exports2, pat.argument);
19730
+ this.checkPatternExport(exports, pat.argument);
19817
19731
  }
19818
19732
  };
19819
- pp$8.checkVariableExport = function(exports2, decls) {
19820
- if (!exports2) {
19733
+ pp$8.checkVariableExport = function(exports, decls) {
19734
+ if (!exports) {
19821
19735
  return;
19822
19736
  }
19823
19737
  for (var i = 0, list3 = decls; i < list3.length; i += 1) {
19824
19738
  var decl = list3[i];
19825
- this.checkPatternExport(exports2, decl.id);
19739
+ this.checkPatternExport(exports, decl.id);
19826
19740
  }
19827
19741
  };
19828
19742
  pp$8.shouldParseExportStatement = function() {
19829
19743
  return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
19830
19744
  };
19831
- pp$8.parseExportSpecifier = function(exports2) {
19745
+ pp$8.parseExportSpecifier = function(exports) {
19832
19746
  var node2 = this.startNode();
19833
19747
  node2.local = this.parseModuleExportName();
19834
19748
  node2.exported = this.eatContextual("as") ? this.parseModuleExportName() : node2.local;
19835
19749
  this.checkExport(
19836
- exports2,
19750
+ exports,
19837
19751
  node2.exported,
19838
19752
  node2.exported.start
19839
19753
  );
19840
19754
  return this.finishNode(node2, "ExportSpecifier");
19841
19755
  };
19842
- pp$8.parseExportSpecifiers = function(exports2) {
19756
+ pp$8.parseExportSpecifiers = function(exports) {
19843
19757
  var nodes = [], first = true;
19844
19758
  this.expect(types$1.braceL);
19845
19759
  while (!this.eat(types$1.braceR)) {
@@ -19851,7 +19765,7 @@ pp$8.parseExportSpecifiers = function(exports2) {
19851
19765
  } else {
19852
19766
  first = false;
19853
19767
  }
19854
- nodes.push(this.parseExportSpecifier(exports2));
19768
+ nodes.push(this.parseExportSpecifier(exports));
19855
19769
  }
19856
19770
  return nodes;
19857
19771
  };
@@ -42706,7 +42620,7 @@ var Ty = Rg();
42706
42620
  var stringifyPropsInline = (element, field, imageCallback) => {
42707
42621
  return stringifyProps(element, field, true, imageCallback);
42708
42622
  };
42709
- function stringifyProps(element, parentField, flatten2, imageCallback) {
42623
+ function stringifyProps(element, parentField, flatten, imageCallback) {
42710
42624
  const attributes2 = [];
42711
42625
  const children = [];
42712
42626
  let template;
@@ -42847,7 +42761,7 @@ function stringifyProps(element, parentField, flatten2, imageCallback) {
42847
42761
  name: name2,
42848
42762
  value: {
42849
42763
  type: "mdxJsxAttributeValueExpression",
42850
- value: stringifyObj(result, flatten2)
42764
+ value: stringifyObj(result, flatten)
42851
42765
  }
42852
42766
  });
42853
42767
  break;
@@ -42860,7 +42774,7 @@ function stringifyProps(element, parentField, flatten2, imageCallback) {
42860
42774
  if (field.list) {
42861
42775
  throw new Error(`Rich-text list is not supported`);
42862
42776
  } else {
42863
- const joiner = flatten2 ? " " : "\n";
42777
+ const joiner = flatten ? " " : "\n";
42864
42778
  let val = "";
42865
42779
  if (isPlainObject2(value) && Object.keys(value).length === 0) {
42866
42780
  return;
@@ -42882,7 +42796,7 @@ function stringifyProps(element, parentField, flatten2, imageCallback) {
42882
42796
  val = stringValue.trim().split("\n").map((str) => ` ${str.trim()}`).join(joiner);
42883
42797
  }
42884
42798
  }
42885
- if (flatten2) {
42799
+ if (flatten) {
42886
42800
  attributes2.push({
42887
42801
  type: "mdxJsxAttribute",
42888
42802
  name: name2,
@@ -42929,7 +42843,7 @@ ${val}
42929
42843
  }
42930
42844
  return { attributes: attributes2, children, useDirective, directiveType };
42931
42845
  }
42932
- function stringifyObj(obj, flatten2) {
42846
+ function stringifyObj(obj, flatten) {
42933
42847
  if (typeof obj === "object" && obj !== null) {
42934
42848
  const dummyFunc = `const dummyFunc = `;
42935
42849
  const res = Ty.format(`${dummyFunc}${JSON.stringify(obj)}`, {
@@ -42938,7 +42852,7 @@ function stringifyObj(obj, flatten2) {
42938
42852
  semi: false,
42939
42853
  plugins: [mc]
42940
42854
  }).trim().replace(dummyFunc, "");
42941
- return flatten2 ? res.replaceAll("\n", "").replaceAll(" ", " ") : res;
42855
+ return flatten ? res.replaceAll("\n", "").replaceAll(" ", " ") : res;
42942
42856
  } else {
42943
42857
  throw new Error(
42944
42858
  `stringifyObj must be passed an object or an array of objects, received ${typeof obj}`
@@ -43122,12 +43036,17 @@ var eat2 = (c, field, imageCallback) => {
43122
43036
  const marks = getMarks(first);
43123
43037
  if (marks.length === 0) {
43124
43038
  if (first.linkifyTextNode) {
43039
+ const f = first;
43125
43040
  return [
43126
- first.linkifyTextNode(text5(first)),
43041
+ first.linkifyTextNode(text5({ text: f.text })),
43127
43042
  ...eat2(content3.slice(1), field, imageCallback)
43128
43043
  ];
43129
43044
  } else {
43130
- return [text5(first), ...eat2(content3.slice(1), field, imageCallback)];
43045
+ const f = first;
43046
+ return [
43047
+ text5({ text: f.text }),
43048
+ ...eat2(content3.slice(1), field, imageCallback)
43049
+ ];
43131
43050
  }
43132
43051
  }
43133
43052
  let nonMatchingSiblingIndex = 0;
@@ -43163,17 +43082,23 @@ var eat2 = (c, field, imageCallback) => {
43163
43082
  }
43164
43083
  });
43165
43084
  if (!markToProcess) {
43166
- return [text5(first), ...eat2(content3.slice(1), field, imageCallback)];
43085
+ const f = first;
43086
+ return [
43087
+ text5({ text: f.text }),
43088
+ ...eat2(content3.slice(1), field, imageCallback)
43089
+ ];
43167
43090
  }
43168
43091
  if (markToProcess === "inlineCode") {
43169
43092
  if (nonMatchingSiblingIndex) {
43170
43093
  throw new Error("Marks inside inline code are not supported");
43171
43094
  }
43095
+ const f = first;
43172
43096
  const node2 = {
43173
43097
  type: markToProcess,
43174
- value: first.text
43098
+ value: f.text
43175
43099
  };
43176
43100
  return [
43101
+ // @ts-ignore
43177
43102
  first.linkifyTextNode?.(node2) ?? node2,
43178
43103
  ...eat2(content3.slice(nonMatchingSiblingIndex + 1), field, imageCallback)
43179
43104
  ];
@@ -43563,7 +43488,7 @@ var getMarks = (content3) => {
43563
43488
  var stringifyPropsInline2 = (element, field, imageCallback) => {
43564
43489
  return stringifyProps2(element, field, true, imageCallback);
43565
43490
  };
43566
- function stringifyProps2(element, parentField, flatten2, imageCallback) {
43491
+ function stringifyProps2(element, parentField, flatten, imageCallback) {
43567
43492
  const attributes2 = [];
43568
43493
  const children = [];
43569
43494
  let template;
@@ -43699,7 +43624,7 @@ function stringifyProps2(element, parentField, flatten2, imageCallback) {
43699
43624
  name: name2,
43700
43625
  value: {
43701
43626
  type: "mdxJsxAttributeValueExpression",
43702
- value: stringifyObj2(value, flatten2)
43627
+ value: stringifyObj2(value, flatten)
43703
43628
  }
43704
43629
  });
43705
43630
  break;
@@ -43712,7 +43637,7 @@ function stringifyProps2(element, parentField, flatten2, imageCallback) {
43712
43637
  if (field.list) {
43713
43638
  throw new Error(`Rich-text list is not supported`);
43714
43639
  } else {
43715
- const joiner = flatten2 ? " " : "\n";
43640
+ const joiner = flatten ? " " : "\n";
43716
43641
  let val = "";
43717
43642
  assertShape2(
43718
43643
  value,
@@ -43731,7 +43656,7 @@ function stringifyProps2(element, parentField, flatten2, imageCallback) {
43731
43656
  val = stringValue.trim().split("\n").map((str) => ` ${str.trim()}`).join(joiner);
43732
43657
  }
43733
43658
  }
43734
- if (flatten2) {
43659
+ if (flatten) {
43735
43660
  attributes2.push({
43736
43661
  type: "mdxJsxAttribute",
43737
43662
  name: name2,
@@ -43778,7 +43703,7 @@ ${val}
43778
43703
  }
43779
43704
  return { attributes: attributes2, children, useDirective, directiveType };
43780
43705
  }
43781
- function stringifyObj2(obj, flatten2) {
43706
+ function stringifyObj2(obj, flatten) {
43782
43707
  if (typeof obj === "object" && obj !== null) {
43783
43708
  const dummyFunc = `const dummyFunc = `;
43784
43709
  const res = Ty.format(`${dummyFunc}${JSON.stringify(obj)}`, {
@@ -43787,7 +43712,7 @@ function stringifyObj2(obj, flatten2) {
43787
43712
  semi: false,
43788
43713
  plugins: [mc]
43789
43714
  }).trim().replace(dummyFunc, "");
43790
- return flatten2 ? res.replaceAll("\n", "").replaceAll(" ", " ") : res;
43715
+ return flatten ? res.replaceAll("\n", "").replaceAll(" ", " ") : res;
43791
43716
  } else {
43792
43717
  throw new Error(
43793
43718
  `stringifyObj must be passed an object or an array of objects, received ${typeof obj}`
@@ -43919,13 +43844,17 @@ var eat3 = (c, field, imageCallback) => {
43919
43844
  }
43920
43845
  const marks = getMarks(first);
43921
43846
  if (marks.length === 0) {
43847
+ const f = first;
43922
43848
  if (first.linkifyTextNode) {
43923
43849
  return [
43924
- first.linkifyTextNode(text6(first)),
43850
+ first.linkifyTextNode(text6({ text: f.text })),
43925
43851
  ...eat3(content3.slice(1), field, imageCallback)
43926
43852
  ];
43927
43853
  } else {
43928
- return [text6(first), ...eat3(content3.slice(1), field, imageCallback)];
43854
+ return [
43855
+ text6({ text: f.text }),
43856
+ ...eat3(content3.slice(1), field, imageCallback)
43857
+ ];
43929
43858
  }
43930
43859
  }
43931
43860
  let nonMatchingSiblingIndex = 0;
@@ -43961,17 +43890,23 @@ var eat3 = (c, field, imageCallback) => {
43961
43890
  }
43962
43891
  });
43963
43892
  if (!markToProcess) {
43964
- return [text6(first), ...eat3(content3.slice(1), field, imageCallback)];
43893
+ const f = first;
43894
+ return [
43895
+ text6({ text: f.text }),
43896
+ ...eat3(content3.slice(1), field, imageCallback)
43897
+ ];
43965
43898
  }
43966
43899
  if (markToProcess === "inlineCode") {
43900
+ const f = first;
43967
43901
  if (nonMatchingSiblingIndex) {
43968
43902
  throw new Error(`Marks inside inline code are not supported`);
43969
43903
  }
43970
43904
  const node2 = {
43971
43905
  type: markToProcess,
43972
- value: first.text
43906
+ value: f.text
43973
43907
  };
43974
43908
  return [
43909
+ // @ts-ignore
43975
43910
  first.linkifyTextNode?.(node2) ?? node2,
43976
43911
  ...eat3(content3.slice(nonMatchingSiblingIndex + 1), field, imageCallback)
43977
43912
  ];
@@ -45649,12 +45584,12 @@ pp$92.isSimpleAssignTarget = function(expr) {
45649
45584
  };
45650
45585
  var pp$82 = Parser3.prototype;
45651
45586
  pp$82.parseTopLevel = function(node2) {
45652
- var exports2 = /* @__PURE__ */ Object.create(null);
45587
+ var exports = /* @__PURE__ */ Object.create(null);
45653
45588
  if (!node2.body) {
45654
45589
  node2.body = [];
45655
45590
  }
45656
45591
  while (this.type !== types$12.eof) {
45657
- var stmt = this.parseStatement(null, true, exports2);
45592
+ var stmt = this.parseStatement(null, true, exports);
45658
45593
  node2.body.push(stmt);
45659
45594
  }
45660
45595
  if (this.inModule) {
@@ -45710,7 +45645,7 @@ pp$82.isAsyncFunction = function() {
45710
45645
  var next = this.pos + skip[0].length, after;
45711
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));
45712
45647
  };
45713
- pp$82.parseStatement = function(context, topLevel, exports2) {
45648
+ pp$82.parseStatement = function(context, topLevel, exports) {
45714
45649
  var starttype = this.type, node2 = this.startNode(), kind;
45715
45650
  if (this.isLet(context)) {
45716
45651
  starttype = types$12._var;
@@ -45779,7 +45714,7 @@ pp$82.parseStatement = function(context, topLevel, exports2) {
45779
45714
  this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
45780
45715
  }
45781
45716
  }
45782
- return starttype === types$12._import ? this.parseImport(node2) : this.parseExport(node2, exports2);
45717
+ return starttype === types$12._import ? this.parseImport(node2) : this.parseExport(node2, exports);
45783
45718
  // If the statement does not start with a statement keyword or a
45784
45719
  // brace, it's an ExpressionStatement or LabeledStatement. We
45785
45720
  // simply start parsing an expression, and afterwards, if the
@@ -46412,13 +46347,13 @@ function checkKeyName2(node2, name2) {
46412
46347
  var key = node2.key;
46413
46348
  return !computed && (key.type === "Identifier" && key.name === name2 || key.type === "Literal" && key.value === name2);
46414
46349
  }
46415
- pp$82.parseExport = function(node2, exports2) {
46350
+ pp$82.parseExport = function(node2, exports) {
46416
46351
  this.next();
46417
46352
  if (this.eat(types$12.star)) {
46418
46353
  if (this.options.ecmaVersion >= 11) {
46419
46354
  if (this.eatContextual("as")) {
46420
46355
  node2.exported = this.parseModuleExportName();
46421
- this.checkExport(exports2, node2.exported, this.lastTokStart);
46356
+ this.checkExport(exports, node2.exported, this.lastTokStart);
46422
46357
  } else {
46423
46358
  node2.exported = null;
46424
46359
  }
@@ -46432,7 +46367,7 @@ pp$82.parseExport = function(node2, exports2) {
46432
46367
  return this.finishNode(node2, "ExportAllDeclaration");
46433
46368
  }
46434
46369
  if (this.eat(types$12._default)) {
46435
- this.checkExport(exports2, "default", this.lastTokStart);
46370
+ this.checkExport(exports, "default", this.lastTokStart);
46436
46371
  var isAsync;
46437
46372
  if (this.type === types$12._function || (isAsync = this.isAsyncFunction())) {
46438
46373
  var fNode = this.startNode();
@@ -46453,15 +46388,15 @@ pp$82.parseExport = function(node2, exports2) {
46453
46388
  if (this.shouldParseExportStatement()) {
46454
46389
  node2.declaration = this.parseStatement(null);
46455
46390
  if (node2.declaration.type === "VariableDeclaration") {
46456
- this.checkVariableExport(exports2, node2.declaration.declarations);
46391
+ this.checkVariableExport(exports, node2.declaration.declarations);
46457
46392
  } else {
46458
- this.checkExport(exports2, node2.declaration.id, node2.declaration.id.start);
46393
+ this.checkExport(exports, node2.declaration.id, node2.declaration.id.start);
46459
46394
  }
46460
46395
  node2.specifiers = [];
46461
46396
  node2.source = null;
46462
46397
  } else {
46463
46398
  node2.declaration = null;
46464
- node2.specifiers = this.parseExportSpecifiers(exports2);
46399
+ node2.specifiers = this.parseExportSpecifiers(exports);
46465
46400
  if (this.eatContextual("from")) {
46466
46401
  if (this.type !== types$12.string) {
46467
46402
  this.unexpected();
@@ -46482,57 +46417,57 @@ pp$82.parseExport = function(node2, exports2) {
46482
46417
  }
46483
46418
  return this.finishNode(node2, "ExportNamedDeclaration");
46484
46419
  };
46485
- pp$82.checkExport = function(exports2, name2, pos) {
46486
- if (!exports2) {
46420
+ pp$82.checkExport = function(exports, name2, pos) {
46421
+ if (!exports) {
46487
46422
  return;
46488
46423
  }
46489
46424
  if (typeof name2 !== "string") {
46490
46425
  name2 = name2.type === "Identifier" ? name2.name : name2.value;
46491
46426
  }
46492
- if (hasOwn2(exports2, name2)) {
46427
+ if (hasOwn2(exports, name2)) {
46493
46428
  this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'");
46494
46429
  }
46495
- exports2[name2] = true;
46430
+ exports[name2] = true;
46496
46431
  };
46497
- pp$82.checkPatternExport = function(exports2, pat) {
46432
+ pp$82.checkPatternExport = function(exports, pat) {
46498
46433
  var type = pat.type;
46499
46434
  if (type === "Identifier") {
46500
- this.checkExport(exports2, pat, pat.start);
46435
+ this.checkExport(exports, pat, pat.start);
46501
46436
  } else if (type === "ObjectPattern") {
46502
46437
  for (var i = 0, list3 = pat.properties; i < list3.length; i += 1) {
46503
46438
  var prop = list3[i];
46504
- this.checkPatternExport(exports2, prop);
46439
+ this.checkPatternExport(exports, prop);
46505
46440
  }
46506
46441
  } else if (type === "ArrayPattern") {
46507
46442
  for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
46508
46443
  var elt = list$1[i$1];
46509
46444
  if (elt) {
46510
- this.checkPatternExport(exports2, elt);
46445
+ this.checkPatternExport(exports, elt);
46511
46446
  }
46512
46447
  }
46513
46448
  } else if (type === "Property") {
46514
- this.checkPatternExport(exports2, pat.value);
46449
+ this.checkPatternExport(exports, pat.value);
46515
46450
  } else if (type === "AssignmentPattern") {
46516
- this.checkPatternExport(exports2, pat.left);
46451
+ this.checkPatternExport(exports, pat.left);
46517
46452
  } else if (type === "RestElement") {
46518
- this.checkPatternExport(exports2, pat.argument);
46453
+ this.checkPatternExport(exports, pat.argument);
46519
46454
  } else if (type === "ParenthesizedExpression") {
46520
- this.checkPatternExport(exports2, pat.expression);
46455
+ this.checkPatternExport(exports, pat.expression);
46521
46456
  }
46522
46457
  };
46523
- pp$82.checkVariableExport = function(exports2, decls) {
46524
- if (!exports2) {
46458
+ pp$82.checkVariableExport = function(exports, decls) {
46459
+ if (!exports) {
46525
46460
  return;
46526
46461
  }
46527
46462
  for (var i = 0, list3 = decls; i < list3.length; i += 1) {
46528
46463
  var decl = list3[i];
46529
- this.checkPatternExport(exports2, decl.id);
46464
+ this.checkPatternExport(exports, decl.id);
46530
46465
  }
46531
46466
  };
46532
46467
  pp$82.shouldParseExportStatement = function() {
46533
46468
  return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
46534
46469
  };
46535
- pp$82.parseExportSpecifiers = function(exports2) {
46470
+ pp$82.parseExportSpecifiers = function(exports) {
46536
46471
  var nodes = [], first = true;
46537
46472
  this.expect(types$12.braceL);
46538
46473
  while (!this.eat(types$12.braceR)) {
@@ -46548,7 +46483,7 @@ pp$82.parseExportSpecifiers = function(exports2) {
46548
46483
  node2.local = this.parseModuleExportName();
46549
46484
  node2.exported = this.eatContextual("as") ? this.parseModuleExportName() : node2.local;
46550
46485
  this.checkExport(
46551
- exports2,
46486
+ exports,
46552
46487
  node2.exported,
46553
46488
  node2.exported.start
46554
46489
  );
@@ -50037,9 +49972,6 @@ function compact(tree) {
50037
49972
  return tree;
50038
49973
  }
50039
49974
 
50040
- // src/parse/remarkToPlate.ts
50041
- var import_lodash = __toESM(require_lodash());
50042
-
50043
49975
  // src/parse/acorn.ts
50044
49976
  var extractAttributes = (attributes2, fields, imageCallback) => {
50045
49977
  const properties = {};
@@ -50436,11 +50368,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
50436
50368
  children: [
50437
50369
  {
50438
50370
  type: "p",
50439
- children: (0, import_lodash.default)(
50440
- tableCell.children.map(
50441
- (child) => phrasingContent(child)
50442
- )
50443
- )
50371
+ children: tableCell.children.map((child) => phrasingContent(child)).flat()
50444
50372
  }
50445
50373
  ]
50446
50374
  };
@@ -50483,9 +50411,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
50483
50411
  children: [
50484
50412
  {
50485
50413
  type: "lic",
50486
- children: (0, import_lodash.default)(
50487
- content4.children.map((child) => unwrapBlockContent(child))
50488
- )
50414
+ children: content4.children.map((child) => unwrapBlockContent(child)).flat()
50489
50415
  }
50490
50416
  ]
50491
50417
  };
@@ -50549,9 +50475,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
50549
50475
  case "paragraph":
50550
50476
  return {
50551
50477
  type: "lic",
50552
- children: (0, import_lodash.default)(
50553
- child.children.map((child2) => phrasingContent(child2))
50554
- )
50478
+ children: child.children.map((child2) => phrasingContent(child2)).flat()
50555
50479
  };
50556
50480
  case "blockquote": {
50557
50481
  return {
@@ -50614,7 +50538,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
50614
50538
  const unwrapBlockContent = (content4) => {
50615
50539
  const flattenPhrasingContent = (children) => {
50616
50540
  const children2 = children.map((child) => phrasingContent(child));
50617
- return (0, import_lodash.default)(Array.isArray(children2) ? children2 : [children2]);
50541
+ return (Array.isArray(children2) ? children2 : [children2]).flat();
50618
50542
  };
50619
50543
  switch (content4.type) {
50620
50544
  case "heading":
@@ -50664,15 +50588,13 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
50664
50588
  type: "a",
50665
50589
  url: sanitizeUrl(content4.url),
50666
50590
  title: content4.title,
50667
- children: (0, import_lodash.default)(
50668
- content4.children.map((child) => staticPhrasingContent(child))
50669
- )
50591
+ children: content4.children.map((child) => staticPhrasingContent(child)).flat()
50670
50592
  };
50671
50593
  };
50672
50594
  const heading2 = (content4) => {
50673
50595
  return {
50674
50596
  type: ["h1", "h2", "h3", "h4", "h5", "h6"][content4.depth - 1],
50675
- children: (0, import_lodash.default)(content4.children.map(phrasingContent))
50597
+ children: content4.children.map(phrasingContent).flat()
50676
50598
  };
50677
50599
  };
50678
50600
  const staticPhrasingContent = (content4) => {
@@ -50745,11 +50667,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
50745
50667
  const accum = [];
50746
50668
  switch (node2.type) {
50747
50669
  case "emphasis": {
50748
- const children = (0, import_lodash.default)(
50749
- node2.children.map(
50750
- (child) => phrashingMark(child, [...marks, "italic"])
50751
- )
50752
- );
50670
+ const children = node2.children.map((child) => phrashingMark(child, [...marks, "italic"])).flat();
50753
50671
  children.forEach((child) => {
50754
50672
  accum.push(child);
50755
50673
  });
@@ -50767,20 +50685,14 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
50767
50685
  break;
50768
50686
  }
50769
50687
  case "delete": {
50770
- const children = (0, import_lodash.default)(
50771
- node2.children.map(
50772
- (child) => phrashingMark(child, [...marks, "strikethrough"])
50773
- )
50774
- );
50688
+ const children = node2.children.map((child) => phrashingMark(child, [...marks, "strikethrough"])).flat();
50775
50689
  children.forEach((child) => {
50776
50690
  accum.push(child);
50777
50691
  });
50778
50692
  break;
50779
50693
  }
50780
50694
  case "strong": {
50781
- const children = (0, import_lodash.default)(
50782
- node2.children.map((child) => phrashingMark(child, [...marks, "bold"]))
50783
- );
50695
+ const children = node2.children.map((child) => phrashingMark(child, [...marks, "bold"])).flat();
50784
50696
  children.forEach((child) => {
50785
50697
  accum.push(child);
50786
50698
  });
@@ -50791,9 +50703,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
50791
50703
  break;
50792
50704
  }
50793
50705
  case "link": {
50794
- const children = (0, import_lodash.default)(
50795
- node2.children.map((child) => phrashingMark(child, marks))
50796
- );
50706
+ const children = node2.children.map((child) => phrashingMark(child, marks)).flat();
50797
50707
  accum.push({
50798
50708
  type: "a",
50799
50709
  url: sanitizeUrl(node2.url),
@@ -50855,7 +50765,7 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
50855
50765
  };
50856
50766
  };
50857
50767
  const paragraph2 = (content4) => {
50858
- const children = (0, import_lodash.default)(content4.children.map(phrasingContent));
50768
+ const children = content4.children.map(phrasingContent).flat();
50859
50769
  if (children.length === 1) {
50860
50770
  if (children[0]) {
50861
50771
  if (children[0].type === "html_inline") {
@@ -50979,7 +50889,7 @@ function parseShortcode(preprocessedString, template) {
50979
50889
  var mdxToAst = (value) => {
50980
50890
  return remark().use(remarkMdx).use(remarkGfm).parse(value);
50981
50891
  };
50982
- var MDX_PARSE_ERROR_MSG = "TinaCMS supports a stricter version of markdown and a subset of MDX. https://tina.io/docs/editing/mdx/#differences-from-other-mdx-implementations";
50892
+ var MDX_PARSE_ERROR_MSG = "TinaCMS supports a stricter version of markdown and a subset of MDX. https://tina.io/docs/r/what-is-markdown";
50983
50893
  var parseMDX = (value, field, imageCallback) => {
50984
50894
  if (!value) {
50985
50895
  return { type: "root", children: [] };
@@ -51041,11 +50951,10 @@ var replaceAll = (string3, target, value) => {
51041
50951
  const regex = new RegExp(target, "g");
51042
50952
  return string3.valueOf().replace(regex, value);
51043
50953
  };
51044
- // Annotate the CommonJS export names for ESM import in node:
51045
- 0 && (module.exports = {
50954
+ export {
51046
50955
  parseMDX,
51047
50956
  serializeMDX
51048
- });
50957
+ };
51049
50958
  /*! Bundled license information:
51050
50959
 
51051
50960
  is-buffer/index.js: