@readme/markdown 6.75.0-beta.23 → 6.75.0-beta.25
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/main.js +52 -6
- package/dist/main.node.js +52 -6
- package/package.json +3 -2
package/dist/main.js
CHANGED
|
@@ -59503,6 +59503,42 @@ var index_assign = (undefined && undefined.__assign) || function () {
|
|
|
59503
59503
|
};
|
|
59504
59504
|
return index_assign.apply(this, arguments);
|
|
59505
59505
|
};
|
|
59506
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
59507
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
59508
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
59509
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
59510
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
59511
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
59512
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
59513
|
+
});
|
|
59514
|
+
};
|
|
59515
|
+
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
59516
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
59517
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
59518
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
59519
|
+
function step(op) {
|
|
59520
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
59521
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
59522
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
59523
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59524
|
+
switch (op[0]) {
|
|
59525
|
+
case 0: case 1: t = op; break;
|
|
59526
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
59527
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
59528
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
59529
|
+
default:
|
|
59530
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
59531
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
59532
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
59533
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
59534
|
+
if (t[2]) _.ops.pop();
|
|
59535
|
+
_.trys.pop(); continue;
|
|
59536
|
+
}
|
|
59537
|
+
op = body.call(thisArg, _);
|
|
59538
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
59539
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59540
|
+
}
|
|
59541
|
+
};
|
|
59506
59542
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
59507
59543
|
var t = {};
|
|
59508
59544
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -59526,6 +59562,7 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
59526
59562
|
|
|
59527
59563
|
__webpack_require__(2787);
|
|
59528
59564
|
|
|
59565
|
+
|
|
59529
59566
|
var unimplemented = browser_default()('mdx:unimplemented');
|
|
59530
59567
|
|
|
59531
59568
|
var utils = {
|
|
@@ -59548,15 +59585,24 @@ var reactProcessor = function (opts) {
|
|
|
59548
59585
|
};
|
|
59549
59586
|
var index_compile = function (text, opts) {
|
|
59550
59587
|
if (opts === void 0) { opts = {}; }
|
|
59551
|
-
return String(compileSync(text, index_assign({ outputFormat: 'function-body', providerImportSource: '#', remarkPlugins: [callouts] }, opts)));
|
|
59588
|
+
return String(compileSync(text, index_assign({ outputFormat: 'function-body', providerImportSource: '#', remarkPlugins: [callouts] }, opts))).replace(/await import\(_resolveDynamicMdxSpecifier\('react'\)\)/, 'arguments[0].imports.React');
|
|
59552
59589
|
};
|
|
59553
59590
|
var index_run = function (code, _opts) {
|
|
59554
59591
|
if (_opts === void 0) { _opts = {}; }
|
|
59555
|
-
|
|
59556
|
-
|
|
59557
|
-
|
|
59558
|
-
|
|
59559
|
-
|
|
59592
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
59593
|
+
var Fragment, components, opts, file;
|
|
59594
|
+
return __generator(this, function (_a) {
|
|
59595
|
+
switch (_a.label) {
|
|
59596
|
+
case 0:
|
|
59597
|
+
Fragment = jsx_runtime.Fragment;
|
|
59598
|
+
components = _opts.components, opts = __rest(_opts, ["components"]);
|
|
59599
|
+
return [4 /*yield*/, run(code, index_assign(index_assign(index_assign({}, jsx_runtime_namespaceObject), { Fragment: Fragment, baseUrl: "file:///home/runner/work/markdown/markdown/index.tsx", imports: { React: (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default()) }, useMDXComponents: makeUseMDXComponents(components) }), opts))];
|
|
59600
|
+
case 1:
|
|
59601
|
+
file = _a.sent();
|
|
59602
|
+
return [2 /*return*/, (file === null || file === void 0 ? void 0 : file.default) || (function () { return null; })];
|
|
59603
|
+
}
|
|
59604
|
+
});
|
|
59605
|
+
});
|
|
59560
59606
|
};
|
|
59561
59607
|
var reactTOC = function (text, opts) {
|
|
59562
59608
|
if (opts === void 0) { opts = {}; }
|
package/dist/main.node.js
CHANGED
|
@@ -61019,6 +61019,42 @@ var index_assign = (undefined && undefined.__assign) || function () {
|
|
|
61019
61019
|
};
|
|
61020
61020
|
return index_assign.apply(this, arguments);
|
|
61021
61021
|
};
|
|
61022
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
61023
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
61024
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
61025
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
61026
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
61027
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
61028
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
61029
|
+
});
|
|
61030
|
+
};
|
|
61031
|
+
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
61032
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
61033
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
61034
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
61035
|
+
function step(op) {
|
|
61036
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
61037
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
61038
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
61039
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
61040
|
+
switch (op[0]) {
|
|
61041
|
+
case 0: case 1: t = op; break;
|
|
61042
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
61043
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
61044
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
61045
|
+
default:
|
|
61046
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
61047
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
61048
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
61049
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
61050
|
+
if (t[2]) _.ops.pop();
|
|
61051
|
+
_.trys.pop(); continue;
|
|
61052
|
+
}
|
|
61053
|
+
op = body.call(thisArg, _);
|
|
61054
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
61055
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
61056
|
+
}
|
|
61057
|
+
};
|
|
61022
61058
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
61023
61059
|
var t = {};
|
|
61024
61060
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -61042,6 +61078,7 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
61042
61078
|
|
|
61043
61079
|
__webpack_require__(787);
|
|
61044
61080
|
|
|
61081
|
+
|
|
61045
61082
|
var unimplemented = src_default()('mdx:unimplemented');
|
|
61046
61083
|
|
|
61047
61084
|
var utils = {
|
|
@@ -61064,15 +61101,24 @@ var reactProcessor = function (opts) {
|
|
|
61064
61101
|
};
|
|
61065
61102
|
var index_compile = function (text, opts) {
|
|
61066
61103
|
if (opts === void 0) { opts = {}; }
|
|
61067
|
-
return String(compileSync(text, index_assign({ outputFormat: 'function-body', providerImportSource: '#', remarkPlugins: [callouts] }, opts)));
|
|
61104
|
+
return String(compileSync(text, index_assign({ outputFormat: 'function-body', providerImportSource: '#', remarkPlugins: [callouts] }, opts))).replace(/await import\(_resolveDynamicMdxSpecifier\('react'\)\)/, 'arguments[0].imports.React');
|
|
61068
61105
|
};
|
|
61069
61106
|
var index_run = function (code, _opts) {
|
|
61070
61107
|
if (_opts === void 0) { _opts = {}; }
|
|
61071
|
-
|
|
61072
|
-
|
|
61073
|
-
|
|
61074
|
-
|
|
61075
|
-
|
|
61108
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
61109
|
+
var Fragment, components, opts, file;
|
|
61110
|
+
return __generator(this, function (_a) {
|
|
61111
|
+
switch (_a.label) {
|
|
61112
|
+
case 0:
|
|
61113
|
+
Fragment = jsx_runtime.Fragment;
|
|
61114
|
+
components = _opts.components, opts = __rest(_opts, ["components"]);
|
|
61115
|
+
return [4 /*yield*/, run(code, index_assign(index_assign(index_assign({}, jsx_runtime_namespaceObject), { Fragment: Fragment, baseUrl: "file:///home/runner/work/markdown/markdown/index.tsx", imports: { React: react }, useMDXComponents: makeUseMDXComponents(components) }), opts))];
|
|
61116
|
+
case 1:
|
|
61117
|
+
file = _a.sent();
|
|
61118
|
+
return [2 /*return*/, (file === null || file === void 0 ? void 0 : file.default) || (function () { return null; })];
|
|
61119
|
+
}
|
|
61120
|
+
});
|
|
61121
|
+
});
|
|
61076
61122
|
};
|
|
61077
61123
|
var reactTOC = function (text, opts) {
|
|
61078
61124
|
if (opts === void 0) { opts = {}; }
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@readme/markdown",
|
|
3
3
|
"description": "ReadMe's React-based Markdown parser",
|
|
4
4
|
"author": "Rafe Goldberg <rafe@readme.io>",
|
|
5
|
-
"version": "6.75.0-beta.
|
|
5
|
+
"version": "6.75.0-beta.25",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"browser": "dist/main.js",
|
|
@@ -71,8 +71,9 @@
|
|
|
71
71
|
"@readme/eslint-config": "^14.0.0",
|
|
72
72
|
"@semantic-release/changelog": "^6.0.3",
|
|
73
73
|
"@semantic-release/git": "^10.0.1",
|
|
74
|
-
"@testing-library/jest-dom": "^
|
|
74
|
+
"@testing-library/jest-dom": "^6.4.2",
|
|
75
75
|
"@testing-library/react": "^12.1.2",
|
|
76
|
+
"@testing-library/user-event": "^14.5.2",
|
|
76
77
|
"@types/mdast": "^4.0.3",
|
|
77
78
|
"@types/mdx": "^2.0.12",
|
|
78
79
|
"babel-jest": "^29.5.0",
|