@readme/markdown 6.66.0-beta.6 → 6.66.0-beta.7

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.
@@ -5,13 +5,13 @@ const React = require('react');
5
5
  * To get around hast/html sanitation, we pass custom components through using
6
6
  * className's. Then this Div component, can render the associated component
7
7
  * instead. This used to be done with a custom `React.createElement`, but for
8
- * mdx@v1.5, I don't see a way to customize that.
8
+ * mdx@v1.6, I don't see a way to customize that.
9
9
  */
10
10
 
11
- const Div = ({ components, ...props }) => {
11
+ const Div = ({ components, theme, ...props }) => {
12
12
  if (Object.keys(components).includes(props.className)) {
13
13
  const Component = components[props.className];
14
- return <Component {...props} />;
14
+ return <Component theme={theme} {...props} />;
15
15
  }
16
16
 
17
17
  // eslint-disable-next-line react/jsx-props-no-spreading
@@ -22,6 +22,7 @@ Div.propTypes = {
22
22
  children: PropTypes.oneOf(PropTypes.arrayOf(PropTypes.any), PropTypes.object),
23
23
  className: PropTypes.string,
24
24
  components: PropTypes.object,
25
+ theme: PropTypes.string.isRequired,
25
26
  };
26
27
 
27
28
  module.exports =
package/dist/main.js CHANGED
@@ -7750,7 +7750,7 @@ module.exports.CodeTabs = CodeTabs;
7750
7750
 
7751
7751
  var _extends = __webpack_require__(434);
7752
7752
  var _objectWithoutProperties = __webpack_require__(215);
7753
- var _excluded = ["components"];
7753
+ var _excluded = ["components", "theme"];
7754
7754
  var PropTypes = __webpack_require__(5697);
7755
7755
  var React = __webpack_require__(3634);
7756
7756
 
@@ -7758,15 +7758,18 @@ var React = __webpack_require__(3634);
7758
7758
  * To get around hast/html sanitation, we pass custom components through using
7759
7759
  * className's. Then this Div component, can render the associated component
7760
7760
  * instead. This used to be done with a custom `React.createElement`, but for
7761
- * mdx@v1.5, I don't see a way to customize that.
7761
+ * mdx@v1.6, I don't see a way to customize that.
7762
7762
  */
7763
7763
 
7764
7764
  var Div = function Div(_ref) {
7765
7765
  var components = _ref.components,
7766
+ theme = _ref.theme,
7766
7767
  props = _objectWithoutProperties(_ref, _excluded);
7767
7768
  if (Object.keys(components).includes(props.className)) {
7768
7769
  var Component = components[props.className];
7769
- return /*#__PURE__*/React.createElement(Component, props);
7770
+ return /*#__PURE__*/React.createElement(Component, _extends({
7771
+ theme: theme
7772
+ }, props));
7770
7773
  }
7771
7774
 
7772
7775
  // eslint-disable-next-line react/jsx-props-no-spreading
@@ -7775,7 +7778,8 @@ var Div = function Div(_ref) {
7775
7778
  Div.propTypes = {
7776
7779
  children: PropTypes.oneOf(PropTypes.arrayOf(PropTypes.any), PropTypes.object),
7777
7780
  className: PropTypes.string,
7778
- components: PropTypes.object
7781
+ components: PropTypes.object,
7782
+ theme: PropTypes.string.isRequired
7779
7783
  };
7780
7784
  module.exports = function (components, _ref2) {
7781
7785
  var theme = _ref2.theme;
package/dist/main.node.js CHANGED
@@ -7750,7 +7750,7 @@ module.exports.CodeTabs = CodeTabs;
7750
7750
 
7751
7751
  var _extends = __webpack_require__(434);
7752
7752
  var _objectWithoutProperties = __webpack_require__(215);
7753
- var _excluded = ["components"];
7753
+ var _excluded = ["components", "theme"];
7754
7754
  var PropTypes = __webpack_require__(5697);
7755
7755
  var React = __webpack_require__(3634);
7756
7756
 
@@ -7758,15 +7758,18 @@ var React = __webpack_require__(3634);
7758
7758
  * To get around hast/html sanitation, we pass custom components through using
7759
7759
  * className's. Then this Div component, can render the associated component
7760
7760
  * instead. This used to be done with a custom `React.createElement`, but for
7761
- * mdx@v1.5, I don't see a way to customize that.
7761
+ * mdx@v1.6, I don't see a way to customize that.
7762
7762
  */
7763
7763
 
7764
7764
  var Div = function Div(_ref) {
7765
7765
  var components = _ref.components,
7766
+ theme = _ref.theme,
7766
7767
  props = _objectWithoutProperties(_ref, _excluded);
7767
7768
  if (Object.keys(components).includes(props.className)) {
7768
7769
  var Component = components[props.className];
7769
- return /*#__PURE__*/React.createElement(Component, props);
7770
+ return /*#__PURE__*/React.createElement(Component, _extends({
7771
+ theme: theme
7772
+ }, props));
7770
7773
  }
7771
7774
 
7772
7775
  // eslint-disable-next-line react/jsx-props-no-spreading
@@ -7775,7 +7778,8 @@ var Div = function Div(_ref) {
7775
7778
  Div.propTypes = {
7776
7779
  children: PropTypes.oneOf(PropTypes.arrayOf(PropTypes.any), PropTypes.object),
7777
7780
  className: PropTypes.string,
7778
- components: PropTypes.object
7781
+ components: PropTypes.object,
7782
+ theme: PropTypes.string.isRequired
7779
7783
  };
7780
7784
  module.exports = function (components, _ref2) {
7781
7785
  var theme = _ref2.theme;
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.66.0-beta.6",
5
+ "version": "6.66.0-beta.7",
6
6
  "main": "dist/main.node.js",
7
7
  "browser": "dist/main.js",
8
8
  "files": [