@readme/markdown 6.75.0-beta.13 → 6.75.0-beta.15
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/components/Callout/index.tsx +2 -2
- package/dist/main.js +7 -10
- package/dist/main.node.js +12 -15
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ interface Props extends React.PropsWithChildren<React.HTMLAttributes<HTMLQuoteEl
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const Callout = (props: Props) => {
|
|
11
|
-
const { attributes, theme, icon, heading } = props;
|
|
11
|
+
const { attributes, children, theme, icon, heading } = props;
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
// @ts-ignore
|
|
@@ -19,7 +19,7 @@ const Callout = (props: Props) => {
|
|
|
19
19
|
{heading}
|
|
20
20
|
</h3>
|
|
21
21
|
)}
|
|
22
|
-
{
|
|
22
|
+
{children}
|
|
23
23
|
</blockquote>
|
|
24
24
|
);
|
|
25
25
|
};
|
package/dist/main.js
CHANGED
|
@@ -14980,6 +14980,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14980
14980
|
// EXPORTS
|
|
14981
14981
|
__webpack_require__.d(__webpack_exports__, {
|
|
14982
14982
|
"Components": () => (/* reexport */ components_namespaceObject),
|
|
14983
|
+
"compile": () => (/* binding */ index_compile),
|
|
14983
14984
|
"default": () => (/* binding */ index_0),
|
|
14984
14985
|
"esast": () => (/* binding */ esast),
|
|
14985
14986
|
"hast": () => (/* binding */ hast),
|
|
@@ -14987,7 +14988,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
14987
14988
|
"mdast": () => (/* binding */ mdast),
|
|
14988
14989
|
"mdx": () => (/* binding */ index_mdx),
|
|
14989
14990
|
"plain": () => (/* binding */ plain),
|
|
14990
|
-
"react": () => (/* binding */ react),
|
|
14991
14991
|
"reactProcessor": () => (/* binding */ reactProcessor),
|
|
14992
14992
|
"reactTOC": () => (/* binding */ reactTOC),
|
|
14993
14993
|
"run": () => (/* binding */ index_run),
|
|
@@ -57940,14 +57940,14 @@ var __assign = (undefined && undefined.__assign) || function () {
|
|
|
57940
57940
|
};
|
|
57941
57941
|
|
|
57942
57942
|
var Callout = function (props) {
|
|
57943
|
-
var attributes = props.attributes, theme = props.theme, icon = props.icon, heading = props.heading;
|
|
57943
|
+
var attributes = props.attributes, children = props.children, theme = props.theme, icon = props.icon, heading = props.heading;
|
|
57944
57944
|
return (
|
|
57945
57945
|
// @ts-ignore
|
|
57946
57946
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("blockquote", __assign({}, attributes, { className: "callout callout_".concat(theme), theme: icon }),
|
|
57947
57947
|
heading && (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("h3", { className: "callout-heading".concat(heading ? '' : ' empty') },
|
|
57948
57948
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("span", { className: "callout-icon" }, icon),
|
|
57949
57949
|
heading)),
|
|
57950
|
-
|
|
57950
|
+
children));
|
|
57951
57951
|
};
|
|
57952
57952
|
Callout.sanitize = function (sanitizeSchema) {
|
|
57953
57953
|
sanitizeSchema.attributes['rdme-callout'] = ['icon', 'theme', 'heading'];
|
|
@@ -58670,19 +58670,16 @@ var calloutTransformer = function () {
|
|
|
58670
58670
|
var _a = startText.match(callouts_regex) || [], match = _a[0], icon = _a[1];
|
|
58671
58671
|
if (icon && match) {
|
|
58672
58672
|
var heading = startText.slice(match.length);
|
|
58673
|
-
|
|
58674
|
-
|
|
58673
|
+
node.children.shift();
|
|
58674
|
+
node.type = 'rdme-callout';
|
|
58675
|
+
node.data = {
|
|
58675
58676
|
hName: 'Callout',
|
|
58676
58677
|
hProperties: {
|
|
58677
58678
|
heading: heading,
|
|
58678
|
-
value: body,
|
|
58679
58679
|
icon: icon,
|
|
58680
58680
|
theme: themes[icon] || 'default',
|
|
58681
58681
|
},
|
|
58682
58682
|
};
|
|
58683
|
-
node.type = 'rdme-callout';
|
|
58684
|
-
node.data = data;
|
|
58685
|
-
node.children[0].children[0].value = startText.slice(match.length);
|
|
58686
58683
|
}
|
|
58687
58684
|
}
|
|
58688
58685
|
catch (e) {
|
|
@@ -58735,7 +58732,7 @@ var reactProcessor = function (opts) {
|
|
|
58735
58732
|
if (opts === void 0) { opts = {}; }
|
|
58736
58733
|
return core_createProcessor(index_assign({ remarkPlugins: [callouts] }, opts));
|
|
58737
58734
|
};
|
|
58738
|
-
var
|
|
58735
|
+
var index_compile = function (text, opts) {
|
|
58739
58736
|
if (opts === void 0) { opts = {}; }
|
|
58740
58737
|
try {
|
|
58741
58738
|
var code = compileSync(text, index_assign({ outputFormat: 'function-body', providerImportSource: '@mdx-js/react', remarkPlugins: [callouts] }, opts));
|
package/dist/main.node.js
CHANGED
|
@@ -14966,6 +14966,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14966
14966
|
// EXPORTS
|
|
14967
14967
|
__webpack_require__.d(__webpack_exports__, {
|
|
14968
14968
|
"Components": () => (/* reexport */ components_namespaceObject),
|
|
14969
|
+
"compile": () => (/* binding */ index_compile),
|
|
14969
14970
|
"default": () => (/* binding */ index_0),
|
|
14970
14971
|
"esast": () => (/* binding */ esast),
|
|
14971
14972
|
"hast": () => (/* binding */ hast),
|
|
@@ -14973,7 +14974,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
14973
14974
|
"mdast": () => (/* binding */ mdast),
|
|
14974
14975
|
"mdx": () => (/* binding */ index_mdx),
|
|
14975
14976
|
"plain": () => (/* binding */ plain),
|
|
14976
|
-
"react": () => (/* binding */ index_react),
|
|
14977
14977
|
"reactProcessor": () => (/* binding */ reactProcessor),
|
|
14978
14978
|
"reactTOC": () => (/* binding */ reactTOC),
|
|
14979
14979
|
"run": () => (/* binding */ index_run),
|
|
@@ -59526,7 +59526,7 @@ var dist_default = /*#__PURE__*/__webpack_require__.n(dist);
|
|
|
59526
59526
|
var Anchor = __webpack_require__(9);
|
|
59527
59527
|
var Anchor_default = /*#__PURE__*/__webpack_require__.n(Anchor);
|
|
59528
59528
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
59529
|
-
var
|
|
59529
|
+
var node_modules_react = __webpack_require__(294);
|
|
59530
59530
|
;// CONCATENATED MODULE: ./components/Callout/index.tsx
|
|
59531
59531
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
59532
59532
|
__assign = Object.assign || function(t) {
|
|
@@ -59541,14 +59541,14 @@ var __assign = (undefined && undefined.__assign) || function () {
|
|
|
59541
59541
|
};
|
|
59542
59542
|
|
|
59543
59543
|
var Callout = function (props) {
|
|
59544
|
-
var attributes = props.attributes, theme = props.theme, icon = props.icon, heading = props.heading;
|
|
59544
|
+
var attributes = props.attributes, children = props.children, theme = props.theme, icon = props.icon, heading = props.heading;
|
|
59545
59545
|
return (
|
|
59546
59546
|
// @ts-ignore
|
|
59547
|
-
|
|
59548
|
-
heading && (
|
|
59549
|
-
|
|
59547
|
+
node_modules_react.createElement("blockquote", __assign({}, attributes, { className: "callout callout_".concat(theme), theme: icon }),
|
|
59548
|
+
heading && (node_modules_react.createElement("h3", { className: "callout-heading".concat(heading ? '' : ' empty') },
|
|
59549
|
+
node_modules_react.createElement("span", { className: "callout-icon" }, icon),
|
|
59550
59550
|
heading)),
|
|
59551
|
-
|
|
59551
|
+
children));
|
|
59552
59552
|
};
|
|
59553
59553
|
Callout.sanitize = function (sanitizeSchema) {
|
|
59554
59554
|
sanitizeSchema.attributes['rdme-callout'] = ['icon', 'theme', 'heading'];
|
|
@@ -60203,19 +60203,16 @@ var calloutTransformer = function () {
|
|
|
60203
60203
|
var _a = startText.match(callouts_regex) || [], match = _a[0], icon = _a[1];
|
|
60204
60204
|
if (icon && match) {
|
|
60205
60205
|
var heading = startText.slice(match.length);
|
|
60206
|
-
|
|
60207
|
-
|
|
60206
|
+
node.children.shift();
|
|
60207
|
+
node.type = 'rdme-callout';
|
|
60208
|
+
node.data = {
|
|
60208
60209
|
hName: 'Callout',
|
|
60209
60210
|
hProperties: {
|
|
60210
60211
|
heading: heading,
|
|
60211
|
-
value: body,
|
|
60212
60212
|
icon: icon,
|
|
60213
60213
|
theme: themes[icon] || 'default',
|
|
60214
60214
|
},
|
|
60215
60215
|
};
|
|
60216
|
-
node.type = 'rdme-callout';
|
|
60217
|
-
node.data = data;
|
|
60218
|
-
node.children[0].children[0].value = startText.slice(match.length);
|
|
60219
60216
|
}
|
|
60220
60217
|
}
|
|
60221
60218
|
catch (e) {
|
|
@@ -60268,7 +60265,7 @@ var reactProcessor = function (opts) {
|
|
|
60268
60265
|
if (opts === void 0) { opts = {}; }
|
|
60269
60266
|
return core_createProcessor(index_assign({ remarkPlugins: [callouts] }, opts));
|
|
60270
60267
|
};
|
|
60271
|
-
var
|
|
60268
|
+
var index_compile = function (text, opts) {
|
|
60272
60269
|
if (opts === void 0) { opts = {}; }
|
|
60273
60270
|
try {
|
|
60274
60271
|
var code = compileSync(text, index_assign({ outputFormat: 'function-body', providerImportSource: '@mdx-js/react', remarkPlugins: [callouts] }, opts));
|
|
@@ -60321,7 +60318,7 @@ var plain = function (text, opts) {
|
|
|
60321
60318
|
if (opts === void 0) { opts = {}; }
|
|
60322
60319
|
unimplemented('plain export');
|
|
60323
60320
|
};
|
|
60324
|
-
/* harmony default export */ const index_0 = (
|
|
60321
|
+
/* harmony default export */ const index_0 = (react);
|
|
60325
60322
|
|
|
60326
60323
|
})();
|
|
60327
60324
|
|
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.15",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"browser": "dist/main.js",
|