@tinacms/mdx 1.8.3 → 2.0.0
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 +8 -8
- package/dist/index.mjs +0 -50948
|
@@ -4,7 +4,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
7
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
8
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
9
|
};
|
|
@@ -28,7 +27,6 @@ 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 __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
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({
|
|
@@ -41168,12 +41166,17 @@ var eat2 = (c, field, imageCallback) => {
|
|
|
41168
41166
|
const marks = getMarks(first);
|
|
41169
41167
|
if (marks.length === 0) {
|
|
41170
41168
|
if (first.linkifyTextNode) {
|
|
41169
|
+
const f = first;
|
|
41171
41170
|
return [
|
|
41172
|
-
first.linkifyTextNode(text5(
|
|
41171
|
+
first.linkifyTextNode(text5({ text: f.text })),
|
|
41173
41172
|
...eat2(content3.slice(1), field, imageCallback)
|
|
41174
41173
|
];
|
|
41175
41174
|
} else {
|
|
41176
|
-
|
|
41175
|
+
const f = first;
|
|
41176
|
+
return [
|
|
41177
|
+
text5({ text: f.text }),
|
|
41178
|
+
...eat2(content3.slice(1), field, imageCallback)
|
|
41179
|
+
];
|
|
41177
41180
|
}
|
|
41178
41181
|
}
|
|
41179
41182
|
let nonMatchingSiblingIndex = 0;
|
|
@@ -41209,17 +41212,23 @@ var eat2 = (c, field, imageCallback) => {
|
|
|
41209
41212
|
}
|
|
41210
41213
|
});
|
|
41211
41214
|
if (!markToProcess) {
|
|
41212
|
-
|
|
41215
|
+
const f = first;
|
|
41216
|
+
return [
|
|
41217
|
+
text5({ text: f.text }),
|
|
41218
|
+
...eat2(content3.slice(1), field, imageCallback)
|
|
41219
|
+
];
|
|
41213
41220
|
}
|
|
41214
41221
|
if (markToProcess === "inlineCode") {
|
|
41215
41222
|
if (nonMatchingSiblingIndex) {
|
|
41216
41223
|
throw new Error("Marks inside inline code are not supported");
|
|
41217
41224
|
}
|
|
41225
|
+
const f = first;
|
|
41218
41226
|
const node2 = {
|
|
41219
41227
|
type: markToProcess,
|
|
41220
|
-
value:
|
|
41228
|
+
value: f.text
|
|
41221
41229
|
};
|
|
41222
41230
|
return [
|
|
41231
|
+
// @ts-ignore
|
|
41223
41232
|
first.linkifyTextNode?.(node2) ?? node2,
|
|
41224
41233
|
...eat2(content3.slice(nonMatchingSiblingIndex + 1), field, imageCallback)
|
|
41225
41234
|
];
|
|
@@ -41965,13 +41974,17 @@ var eat3 = (c, field, imageCallback) => {
|
|
|
41965
41974
|
}
|
|
41966
41975
|
const marks = getMarks(first);
|
|
41967
41976
|
if (marks.length === 0) {
|
|
41977
|
+
const f = first;
|
|
41968
41978
|
if (first.linkifyTextNode) {
|
|
41969
41979
|
return [
|
|
41970
|
-
first.linkifyTextNode(text6(
|
|
41980
|
+
first.linkifyTextNode(text6({ text: f.text })),
|
|
41971
41981
|
...eat3(content3.slice(1), field, imageCallback)
|
|
41972
41982
|
];
|
|
41973
41983
|
} else {
|
|
41974
|
-
return [
|
|
41984
|
+
return [
|
|
41985
|
+
text6({ text: f.text }),
|
|
41986
|
+
...eat3(content3.slice(1), field, imageCallback)
|
|
41987
|
+
];
|
|
41975
41988
|
}
|
|
41976
41989
|
}
|
|
41977
41990
|
let nonMatchingSiblingIndex = 0;
|
|
@@ -42007,17 +42020,23 @@ var eat3 = (c, field, imageCallback) => {
|
|
|
42007
42020
|
}
|
|
42008
42021
|
});
|
|
42009
42022
|
if (!markToProcess) {
|
|
42010
|
-
|
|
42023
|
+
const f = first;
|
|
42024
|
+
return [
|
|
42025
|
+
text6({ text: f.text }),
|
|
42026
|
+
...eat3(content3.slice(1), field, imageCallback)
|
|
42027
|
+
];
|
|
42011
42028
|
}
|
|
42012
42029
|
if (markToProcess === "inlineCode") {
|
|
42030
|
+
const f = first;
|
|
42013
42031
|
if (nonMatchingSiblingIndex) {
|
|
42014
42032
|
throw new Error(`Marks inside inline code are not supported`);
|
|
42015
42033
|
}
|
|
42016
42034
|
const node2 = {
|
|
42017
42035
|
type: markToProcess,
|
|
42018
|
-
value:
|
|
42036
|
+
value: f.text
|
|
42019
42037
|
};
|
|
42020
42038
|
return [
|
|
42039
|
+
// @ts-ignore
|
|
42021
42040
|
first.linkifyTextNode?.(node2) ?? node2,
|
|
42022
42041
|
...eat3(content3.slice(nonMatchingSiblingIndex + 1), field, imageCallback)
|
|
42023
42042
|
];
|
|
@@ -48900,9 +48919,9 @@ var remarkToSlate = (root2, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
48900
48919
|
};
|
|
48901
48920
|
};
|
|
48902
48921
|
var RichTextParseError = class _RichTextParseError extends Error {
|
|
48922
|
+
position;
|
|
48903
48923
|
constructor(message, position2) {
|
|
48904
48924
|
super(message);
|
|
48905
|
-
__publicField(this, "position");
|
|
48906
48925
|
if (Error.captureStackTrace) {
|
|
48907
48926
|
Error.captureStackTrace(this, _RichTextParseError);
|
|
48908
48927
|
}
|