@readme/markdown 6.59.0 → 6.60.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/components/CodeTabs/index.jsx +3 -8
- package/dist/main.js +72 -48
- package/dist/main.node.js +72 -48
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ const PropTypes = require('prop-types');
|
|
|
3
3
|
const React = require('react');
|
|
4
4
|
|
|
5
5
|
const CodeTabs = props => {
|
|
6
|
-
const {
|
|
6
|
+
const { children, theme } = props;
|
|
7
7
|
|
|
8
8
|
function handleClick({ target }, index) {
|
|
9
9
|
const $wrap = target.parentElement.parentElement;
|
|
@@ -18,8 +18,7 @@ const CodeTabs = props => {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
|
|
22
|
-
<div {...attributes} className={`CodeTabs CodeTabs_initial theme-${theme}`}>
|
|
21
|
+
<div className={`CodeTabs CodeTabs_initial theme-${theme}`}>
|
|
23
22
|
<div className="CodeTabs-toolbar">
|
|
24
23
|
{children.map(({ props: pre }, i) => {
|
|
25
24
|
const { meta, lang } = pre.children[0].props;
|
|
@@ -37,18 +36,14 @@ const CodeTabs = props => {
|
|
|
37
36
|
};
|
|
38
37
|
|
|
39
38
|
CodeTabs.propTypes = {
|
|
40
|
-
attributes: PropTypes.shape({}),
|
|
41
39
|
children: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
42
40
|
theme: PropTypes.string,
|
|
43
41
|
};
|
|
44
42
|
|
|
45
|
-
CodeTabs.defaultProps = {
|
|
46
|
-
attributes: null,
|
|
47
|
-
};
|
|
48
|
-
|
|
49
43
|
function CreateCodeTabs({ theme }) {
|
|
50
44
|
// eslint-disable-next-line react/display-name
|
|
51
45
|
return props => <CodeTabs {...props} theme={theme} />;
|
|
52
46
|
}
|
|
53
47
|
|
|
54
48
|
module.exports = CreateCodeTabs;
|
|
49
|
+
module.exports.CodeTabs = CodeTabs;
|
package/dist/main.js
CHANGED
|
@@ -8229,8 +8229,7 @@ var _require = __webpack_require__(3752),
|
|
|
8229
8229
|
var PropTypes = __webpack_require__(5697);
|
|
8230
8230
|
var React = __webpack_require__(4466);
|
|
8231
8231
|
var CodeTabs = function CodeTabs(props) {
|
|
8232
|
-
var
|
|
8233
|
-
children = props.children,
|
|
8232
|
+
var children = props.children,
|
|
8234
8233
|
theme = props.theme;
|
|
8235
8234
|
function handleClick(_ref, index) {
|
|
8236
8235
|
var target = _ref.target;
|
|
@@ -8244,39 +8243,31 @@ var CodeTabs = function CodeTabs(props) {
|
|
|
8244
8243
|
codeblocks[index].classList.add('CodeTabs_active');
|
|
8245
8244
|
target.classList.add('CodeTabs_active');
|
|
8246
8245
|
}
|
|
8247
|
-
return (
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
8268
|
-
className: "CodeTabs-inner"
|
|
8269
|
-
}, children))
|
|
8270
|
-
);
|
|
8246
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8247
|
+
className: "CodeTabs CodeTabs_initial theme-".concat(theme)
|
|
8248
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8249
|
+
className: "CodeTabs-toolbar"
|
|
8250
|
+
}, children.map(function (_ref2, i) {
|
|
8251
|
+
var pre = _ref2.props;
|
|
8252
|
+
var _pre$children$0$props = pre.children[0].props,
|
|
8253
|
+
meta = _pre$children$0$props.meta,
|
|
8254
|
+
lang = _pre$children$0$props.lang;
|
|
8255
|
+
/* istanbul ignore next */
|
|
8256
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
8257
|
+
key: i,
|
|
8258
|
+
onClick: function onClick(e) {
|
|
8259
|
+
return handleClick(e, i);
|
|
8260
|
+
},
|
|
8261
|
+
type: "button"
|
|
8262
|
+
}, meta || "".concat(!lang ? 'Text' : uppercase(lang)));
|
|
8263
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
8264
|
+
className: "CodeTabs-inner"
|
|
8265
|
+
}, children));
|
|
8271
8266
|
};
|
|
8272
8267
|
CodeTabs.propTypes = {
|
|
8273
|
-
attributes: PropTypes.shape({}),
|
|
8274
8268
|
children: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
8275
8269
|
theme: PropTypes.string
|
|
8276
8270
|
};
|
|
8277
|
-
CodeTabs.defaultProps = {
|
|
8278
|
-
attributes: null
|
|
8279
|
-
};
|
|
8280
8271
|
function CreateCodeTabs(_ref3) {
|
|
8281
8272
|
var theme = _ref3.theme;
|
|
8282
8273
|
// eslint-disable-next-line react/display-name
|
|
@@ -8287,6 +8278,7 @@ function CreateCodeTabs(_ref3) {
|
|
|
8287
8278
|
};
|
|
8288
8279
|
}
|
|
8289
8280
|
module.exports = CreateCodeTabs;
|
|
8281
|
+
module.exports.CodeTabs = CodeTabs;
|
|
8290
8282
|
|
|
8291
8283
|
/***/ }),
|
|
8292
8284
|
|
|
@@ -9023,6 +9015,23 @@ module.exports = React.createContext([]);
|
|
|
9023
9015
|
|
|
9024
9016
|
/***/ }),
|
|
9025
9017
|
|
|
9018
|
+
/***/ 5894:
|
|
9019
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9020
|
+
|
|
9021
|
+
var React = __webpack_require__(4466);
|
|
9022
|
+
var _require = __webpack_require__(6553),
|
|
9023
|
+
CodeTabs = _require.CodeTabs;
|
|
9024
|
+
var createElement = function createElement(type, props) {
|
|
9025
|
+
var rdmdType = type === 'div' && (props === null || props === void 0 ? void 0 : props.className) === 'code-tabs' ? CodeTabs : type;
|
|
9026
|
+
for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
9027
|
+
children[_key - 2] = arguments[_key];
|
|
9028
|
+
}
|
|
9029
|
+
return React.createElement.apply(React, [rdmdType, props].concat(children));
|
|
9030
|
+
};
|
|
9031
|
+
module.exports = createElement;
|
|
9032
|
+
|
|
9033
|
+
/***/ }),
|
|
9034
|
+
|
|
9026
9035
|
/***/ 1264:
|
|
9027
9036
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9028
9037
|
|
|
@@ -24853,11 +24862,14 @@ var _require = __webpack_require__(7589),
|
|
|
24853
24862
|
imgSizeByWidth = _require.imgSizeByWidth;
|
|
24854
24863
|
var compileImage = function compileImage(image) {
|
|
24855
24864
|
var _ref = image.data.hProperties || {},
|
|
24865
|
+
align = _ref.align,
|
|
24856
24866
|
className = _ref.className,
|
|
24857
24867
|
width = _ref.width;
|
|
24858
|
-
var img = _objectSpread(_objectSpread({
|
|
24868
|
+
var img = _objectSpread(_objectSpread(_objectSpread({
|
|
24859
24869
|
image: [image.url, image.title, image.alt]
|
|
24860
|
-
},
|
|
24870
|
+
}, align && {
|
|
24871
|
+
align: align
|
|
24872
|
+
}), width && {
|
|
24861
24873
|
sizing: imgSizeByWidth[width]
|
|
24862
24874
|
}), className === 'border' && {
|
|
24863
24875
|
border: true
|
|
@@ -24943,9 +24955,10 @@ module.exports = function ImageCompiler() {
|
|
|
24943
24955
|
|
|
24944
24956
|
// Use magic block instead of markdown when there are certain defined properties we can't store in markdown
|
|
24945
24957
|
var _ref = ((_node$data2 = node.data) === null || _node$data2 === void 0 ? void 0 : _node$data2.hProperties) || {},
|
|
24958
|
+
align = _ref.align,
|
|
24946
24959
|
className = _ref.className,
|
|
24947
24960
|
width = _ref.width;
|
|
24948
|
-
var useMagicBlock = Boolean(width) || (className === null || className === void 0 ? void 0 : className.length);
|
|
24961
|
+
var useMagicBlock = Boolean(width) || (className === null || className === void 0 ? void 0 : className.length) || Boolean(align);
|
|
24949
24962
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
24950
24963
|
args[_key - 1] = arguments[_key];
|
|
24951
24964
|
}
|
|
@@ -25446,7 +25459,10 @@ function tokenizer(eat, value) {
|
|
|
25446
25459
|
type: 'code-tabs',
|
|
25447
25460
|
className: 'tabs',
|
|
25448
25461
|
data: {
|
|
25449
|
-
hName: '
|
|
25462
|
+
hName: 'div',
|
|
25463
|
+
hProperties: {
|
|
25464
|
+
className: ['code-tabs']
|
|
25465
|
+
}
|
|
25450
25466
|
},
|
|
25451
25467
|
children: kids
|
|
25452
25468
|
});
|
|
@@ -25840,7 +25856,9 @@ function tokenize(_ref) {
|
|
|
25840
25856
|
title: title,
|
|
25841
25857
|
alt: alt || ('caption' in img ? img.caption : ''),
|
|
25842
25858
|
data: {
|
|
25843
|
-
hProperties: _objectSpread({
|
|
25859
|
+
hProperties: _objectSpread(_objectSpread({}, img.align && {
|
|
25860
|
+
align: img.align
|
|
25861
|
+
}), {}, {
|
|
25844
25862
|
className: img.border ? 'border' : ''
|
|
25845
25863
|
}, img.sizing && {
|
|
25846
25864
|
width: imgWidthBySize[img.sizing]
|
|
@@ -26754,25 +26772,32 @@ const visit =
|
|
|
26754
26772
|
|
|
26755
26773
|
var singleCodeTabs = function singleCodeTabs() {
|
|
26756
26774
|
return function (tree) {
|
|
26757
|
-
|
|
26775
|
+
visit(tree, function (node, index, parent) {
|
|
26758
26776
|
if (node.type === 'code' && (node.lang || node.meta) && parent.type !== 'code-tabs') {
|
|
26759
|
-
node
|
|
26760
|
-
|
|
26761
|
-
|
|
26762
|
-
|
|
26763
|
-
|
|
26777
|
+
Object.assign(node, {
|
|
26778
|
+
className: 'tab-panel',
|
|
26779
|
+
data: {
|
|
26780
|
+
hName: 'code',
|
|
26781
|
+
hProperties: {
|
|
26782
|
+
meta: node.meta,
|
|
26783
|
+
lang: node.lang
|
|
26784
|
+
}
|
|
26764
26785
|
}
|
|
26765
|
-
};
|
|
26786
|
+
});
|
|
26766
26787
|
parent.children[index] = {
|
|
26767
26788
|
type: 'code-tabs',
|
|
26768
26789
|
className: 'tabs',
|
|
26769
26790
|
data: {
|
|
26770
|
-
hName: '
|
|
26791
|
+
hName: 'div',
|
|
26792
|
+
hProperties: {
|
|
26793
|
+
className: ['code-tabs']
|
|
26794
|
+
}
|
|
26771
26795
|
},
|
|
26772
26796
|
children: [node]
|
|
26773
26797
|
};
|
|
26774
26798
|
}
|
|
26775
26799
|
});
|
|
26800
|
+
return tree;
|
|
26776
26801
|
};
|
|
26777
26802
|
};
|
|
26778
26803
|
/* harmony default export */ const single_code_tabs = (singleCodeTabs);
|
|
@@ -26800,7 +26825,7 @@ var createSchema = function createSchema() {
|
|
|
26800
26825
|
}
|
|
26801
26826
|
schema.tagNames.push('rdme-pin');
|
|
26802
26827
|
schema.tagNames.push('rdme-embed');
|
|
26803
|
-
schema.attributes['rdme-embed'] = ['url', 'provider', 'html', 'title', 'href', 'iframe', 'width', 'height', 'image', 'favicon'];
|
|
26828
|
+
schema.attributes['rdme-embed'] = ['url', 'provider', 'html', 'title', 'href', 'iframe', 'width', 'height', 'image', 'favicon', 'align'];
|
|
26804
26829
|
schema.attributes.a = ['href', 'title', 'class', 'className', 'download'];
|
|
26805
26830
|
schema.tagNames.push('figure');
|
|
26806
26831
|
schema.tagNames.push('figcaption');
|
|
@@ -50514,6 +50539,7 @@ var Components = __webpack_require__(3354);
|
|
|
50514
50539
|
var _require3 = __webpack_require__(8447),
|
|
50515
50540
|
getHref = _require3.getHref;
|
|
50516
50541
|
var BaseUrlContext = __webpack_require__(6785);
|
|
50542
|
+
var createElement = __webpack_require__(5894);
|
|
50517
50543
|
var CustomParsers = Object.values(__webpack_require__(1593));
|
|
50518
50544
|
var customCompilers = Object.values(__webpack_require__(9647));
|
|
50519
50545
|
var registerCustomComponents = __webpack_require__(1264);
|
|
@@ -50656,10 +50682,8 @@ function reactProcessor() {
|
|
|
50656
50682
|
opts = _setup8[1];
|
|
50657
50683
|
var _opts3 = opts,
|
|
50658
50684
|
sanitize = _opts3.sanitize;
|
|
50659
|
-
return htmlProcessor(_objectSpread({
|
|
50660
|
-
|
|
50661
|
-
}, opts)).use(sectionAnchorId).use(rehypeReact, {
|
|
50662
|
-
createElement: React.createElement,
|
|
50685
|
+
return htmlProcessor(_objectSpread({}, opts)).use(sectionAnchorId).use(rehypeReact, {
|
|
50686
|
+
createElement: createElement,
|
|
50663
50687
|
Fragment: React.Fragment,
|
|
50664
50688
|
components: _objectSpread({
|
|
50665
50689
|
'code-tabs': CodeTabs(opts),
|
package/dist/main.node.js
CHANGED
|
@@ -8229,8 +8229,7 @@ var _require = __webpack_require__(6841),
|
|
|
8229
8229
|
var PropTypes = __webpack_require__(5697);
|
|
8230
8230
|
var React = __webpack_require__(4466);
|
|
8231
8231
|
var CodeTabs = function CodeTabs(props) {
|
|
8232
|
-
var
|
|
8233
|
-
children = props.children,
|
|
8232
|
+
var children = props.children,
|
|
8234
8233
|
theme = props.theme;
|
|
8235
8234
|
function handleClick(_ref, index) {
|
|
8236
8235
|
var target = _ref.target;
|
|
@@ -8244,39 +8243,31 @@ var CodeTabs = function CodeTabs(props) {
|
|
|
8244
8243
|
codeblocks[index].classList.add('CodeTabs_active');
|
|
8245
8244
|
target.classList.add('CodeTabs_active');
|
|
8246
8245
|
}
|
|
8247
|
-
return (
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
8268
|
-
className: "CodeTabs-inner"
|
|
8269
|
-
}, children))
|
|
8270
|
-
);
|
|
8246
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8247
|
+
className: "CodeTabs CodeTabs_initial theme-".concat(theme)
|
|
8248
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8249
|
+
className: "CodeTabs-toolbar"
|
|
8250
|
+
}, children.map(function (_ref2, i) {
|
|
8251
|
+
var pre = _ref2.props;
|
|
8252
|
+
var _pre$children$0$props = pre.children[0].props,
|
|
8253
|
+
meta = _pre$children$0$props.meta,
|
|
8254
|
+
lang = _pre$children$0$props.lang;
|
|
8255
|
+
/* istanbul ignore next */
|
|
8256
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
8257
|
+
key: i,
|
|
8258
|
+
onClick: function onClick(e) {
|
|
8259
|
+
return handleClick(e, i);
|
|
8260
|
+
},
|
|
8261
|
+
type: "button"
|
|
8262
|
+
}, meta || "".concat(!lang ? 'Text' : uppercase(lang)));
|
|
8263
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
8264
|
+
className: "CodeTabs-inner"
|
|
8265
|
+
}, children));
|
|
8271
8266
|
};
|
|
8272
8267
|
CodeTabs.propTypes = {
|
|
8273
|
-
attributes: PropTypes.shape({}),
|
|
8274
8268
|
children: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
8275
8269
|
theme: PropTypes.string
|
|
8276
8270
|
};
|
|
8277
|
-
CodeTabs.defaultProps = {
|
|
8278
|
-
attributes: null
|
|
8279
|
-
};
|
|
8280
8271
|
function CreateCodeTabs(_ref3) {
|
|
8281
8272
|
var theme = _ref3.theme;
|
|
8282
8273
|
// eslint-disable-next-line react/display-name
|
|
@@ -8287,6 +8278,7 @@ function CreateCodeTabs(_ref3) {
|
|
|
8287
8278
|
};
|
|
8288
8279
|
}
|
|
8289
8280
|
module.exports = CreateCodeTabs;
|
|
8281
|
+
module.exports.CodeTabs = CodeTabs;
|
|
8290
8282
|
|
|
8291
8283
|
/***/ }),
|
|
8292
8284
|
|
|
@@ -9023,6 +9015,23 @@ module.exports = React.createContext([]);
|
|
|
9023
9015
|
|
|
9024
9016
|
/***/ }),
|
|
9025
9017
|
|
|
9018
|
+
/***/ 5894:
|
|
9019
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9020
|
+
|
|
9021
|
+
var React = __webpack_require__(4466);
|
|
9022
|
+
var _require = __webpack_require__(6553),
|
|
9023
|
+
CodeTabs = _require.CodeTabs;
|
|
9024
|
+
var createElement = function createElement(type, props) {
|
|
9025
|
+
var rdmdType = type === 'div' && (props === null || props === void 0 ? void 0 : props.className) === 'code-tabs' ? CodeTabs : type;
|
|
9026
|
+
for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
9027
|
+
children[_key - 2] = arguments[_key];
|
|
9028
|
+
}
|
|
9029
|
+
return React.createElement.apply(React, [rdmdType, props].concat(children));
|
|
9030
|
+
};
|
|
9031
|
+
module.exports = createElement;
|
|
9032
|
+
|
|
9033
|
+
/***/ }),
|
|
9034
|
+
|
|
9026
9035
|
/***/ 1264:
|
|
9027
9036
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9028
9037
|
|
|
@@ -9654,11 +9663,14 @@ var _require = __webpack_require__(7589),
|
|
|
9654
9663
|
imgSizeByWidth = _require.imgSizeByWidth;
|
|
9655
9664
|
var compileImage = function compileImage(image) {
|
|
9656
9665
|
var _ref = image.data.hProperties || {},
|
|
9666
|
+
align = _ref.align,
|
|
9657
9667
|
className = _ref.className,
|
|
9658
9668
|
width = _ref.width;
|
|
9659
|
-
var img = _objectSpread(_objectSpread({
|
|
9669
|
+
var img = _objectSpread(_objectSpread(_objectSpread({
|
|
9660
9670
|
image: [image.url, image.title, image.alt]
|
|
9661
|
-
},
|
|
9671
|
+
}, align && {
|
|
9672
|
+
align: align
|
|
9673
|
+
}), width && {
|
|
9662
9674
|
sizing: imgSizeByWidth[width]
|
|
9663
9675
|
}), className === 'border' && {
|
|
9664
9676
|
border: true
|
|
@@ -9744,9 +9756,10 @@ module.exports = function ImageCompiler() {
|
|
|
9744
9756
|
|
|
9745
9757
|
// Use magic block instead of markdown when there are certain defined properties we can't store in markdown
|
|
9746
9758
|
var _ref = ((_node$data2 = node.data) === null || _node$data2 === void 0 ? void 0 : _node$data2.hProperties) || {},
|
|
9759
|
+
align = _ref.align,
|
|
9747
9760
|
className = _ref.className,
|
|
9748
9761
|
width = _ref.width;
|
|
9749
|
-
var useMagicBlock = Boolean(width) || (className === null || className === void 0 ? void 0 : className.length);
|
|
9762
|
+
var useMagicBlock = Boolean(width) || (className === null || className === void 0 ? void 0 : className.length) || Boolean(align);
|
|
9750
9763
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
9751
9764
|
args[_key - 1] = arguments[_key];
|
|
9752
9765
|
}
|
|
@@ -10226,7 +10239,10 @@ function tokenizer(eat, value) {
|
|
|
10226
10239
|
type: 'code-tabs',
|
|
10227
10240
|
className: 'tabs',
|
|
10228
10241
|
data: {
|
|
10229
|
-
hName: '
|
|
10242
|
+
hName: 'div',
|
|
10243
|
+
hProperties: {
|
|
10244
|
+
className: ['code-tabs']
|
|
10245
|
+
}
|
|
10230
10246
|
},
|
|
10231
10247
|
children: kids
|
|
10232
10248
|
});
|
|
@@ -10607,7 +10623,9 @@ function tokenize(_ref) {
|
|
|
10607
10623
|
title: title,
|
|
10608
10624
|
alt: alt || ('caption' in img ? img.caption : ''),
|
|
10609
10625
|
data: {
|
|
10610
|
-
hProperties: _objectSpread({
|
|
10626
|
+
hProperties: _objectSpread(_objectSpread({}, img.align && {
|
|
10627
|
+
align: img.align
|
|
10628
|
+
}), {}, {
|
|
10611
10629
|
className: img.border ? 'border' : ''
|
|
10612
10630
|
}, img.sizing && {
|
|
10613
10631
|
width: imgWidthBySize[img.sizing]
|
|
@@ -11521,25 +11539,32 @@ const visit =
|
|
|
11521
11539
|
|
|
11522
11540
|
var singleCodeTabs = function singleCodeTabs() {
|
|
11523
11541
|
return function (tree) {
|
|
11524
|
-
|
|
11542
|
+
visit(tree, function (node, index, parent) {
|
|
11525
11543
|
if (node.type === 'code' && (node.lang || node.meta) && parent.type !== 'code-tabs') {
|
|
11526
|
-
node
|
|
11527
|
-
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11544
|
+
Object.assign(node, {
|
|
11545
|
+
className: 'tab-panel',
|
|
11546
|
+
data: {
|
|
11547
|
+
hName: 'code',
|
|
11548
|
+
hProperties: {
|
|
11549
|
+
meta: node.meta,
|
|
11550
|
+
lang: node.lang
|
|
11551
|
+
}
|
|
11531
11552
|
}
|
|
11532
|
-
};
|
|
11553
|
+
});
|
|
11533
11554
|
parent.children[index] = {
|
|
11534
11555
|
type: 'code-tabs',
|
|
11535
11556
|
className: 'tabs',
|
|
11536
11557
|
data: {
|
|
11537
|
-
hName: '
|
|
11558
|
+
hName: 'div',
|
|
11559
|
+
hProperties: {
|
|
11560
|
+
className: ['code-tabs']
|
|
11561
|
+
}
|
|
11538
11562
|
},
|
|
11539
11563
|
children: [node]
|
|
11540
11564
|
};
|
|
11541
11565
|
}
|
|
11542
11566
|
});
|
|
11567
|
+
return tree;
|
|
11543
11568
|
};
|
|
11544
11569
|
};
|
|
11545
11570
|
/* harmony default export */ const single_code_tabs = (singleCodeTabs);
|
|
@@ -11567,7 +11592,7 @@ var createSchema = function createSchema() {
|
|
|
11567
11592
|
}
|
|
11568
11593
|
schema.tagNames.push('rdme-pin');
|
|
11569
11594
|
schema.tagNames.push('rdme-embed');
|
|
11570
|
-
schema.attributes['rdme-embed'] = ['url', 'provider', 'html', 'title', 'href', 'iframe', 'width', 'height', 'image', 'favicon'];
|
|
11595
|
+
schema.attributes['rdme-embed'] = ['url', 'provider', 'html', 'title', 'href', 'iframe', 'width', 'height', 'image', 'favicon', 'align'];
|
|
11571
11596
|
schema.attributes.a = ['href', 'title', 'class', 'className', 'download'];
|
|
11572
11597
|
schema.tagNames.push('figure');
|
|
11573
11598
|
schema.tagNames.push('figcaption');
|
|
@@ -34775,6 +34800,7 @@ var Components = __webpack_require__(3354);
|
|
|
34775
34800
|
var _require3 = __webpack_require__(8447),
|
|
34776
34801
|
getHref = _require3.getHref;
|
|
34777
34802
|
var BaseUrlContext = __webpack_require__(6785);
|
|
34803
|
+
var createElement = __webpack_require__(5894);
|
|
34778
34804
|
var CustomParsers = Object.values(__webpack_require__(8521));
|
|
34779
34805
|
var customCompilers = Object.values(__webpack_require__(9647));
|
|
34780
34806
|
var registerCustomComponents = __webpack_require__(1264);
|
|
@@ -34917,10 +34943,8 @@ function reactProcessor() {
|
|
|
34917
34943
|
opts = _setup8[1];
|
|
34918
34944
|
var _opts3 = opts,
|
|
34919
34945
|
sanitize = _opts3.sanitize;
|
|
34920
|
-
return htmlProcessor(_objectSpread({
|
|
34921
|
-
|
|
34922
|
-
}, opts)).use(sectionAnchorId).use(rehypeReact, {
|
|
34923
|
-
createElement: React.createElement,
|
|
34946
|
+
return htmlProcessor(_objectSpread({}, opts)).use(sectionAnchorId).use(rehypeReact, {
|
|
34947
|
+
createElement: createElement,
|
|
34924
34948
|
Fragment: React.Fragment,
|
|
34925
34949
|
components: _objectSpread({
|
|
34926
34950
|
'code-tabs': CodeTabs(opts),
|
package/package.json
CHANGED