@bigbinary/neeto-site-blocks 1.8.10 → 1.8.11

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.cjs.js CHANGED
@@ -4992,6 +4992,10 @@ var isLinkHighlighted = function isLinkHighlighted(to, currentPath) {
4992
4992
  if (!(to && currentPath)) return false;
4993
4993
  return currentPath.pathName === to && isEmpty(currentPath.hash) || currentPath.hash === to;
4994
4994
  };
4995
+ var isEditorContent = function isEditorContent(content) {
4996
+ var checkForHTMLTags = /<(p|h[1-5])>.*?<\/\1>/;
4997
+ return checkForHTMLTags.test(content);
4998
+ };
4995
4999
 
4996
5000
  function ownKeys$l(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4997
5001
  function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$l(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -15905,7 +15909,7 @@ function Interweave(props) {
15905
15909
 
15906
15910
  var StyledInterweave = styled__default["default"](Interweave)(function (_ref) {
15907
15911
  var fontSize = _ref.fontSize;
15908
- return "\n h1 {\n font-size: ".concat(fontSize ? "calc(".concat(FIXED_H1_SIZE, " + ").concat(fontSize, ")") : FIXED_H1_SIZE, ";\n font-weight: inherit;\n }\n\n h2 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H2_SIZE, " + ").concat(fontSize, ")") : FIXED_H2_SIZE, ";\n font-weight: inherit;\n }\n\n h3 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H3_SIZE, " + ").concat(fontSize, ")") : FIXED_H3_SIZE, ";\n font-weight: inherit;\n }\n\n h4 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H4_SIZE, " + ").concat(fontSize, ")") : FIXED_H4_SIZE, ";\n font-weight: inherit;\n }\n\n h5 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H5_SIZE, " + ").concat(fontSize, ")") : FIXED_H5_SIZE, ";\n font-weight: inherit;\n }\n");
15912
+ return "\n font-size: ".concat(fontSize || "inherit", ";\n font-weight: inherit;\n\n h1 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H1_SIZE, " + ").concat(fontSize, ")") : FIXED_H1_SIZE, ";\n font-weight: inherit;\n }\n\n h2 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H2_SIZE, " + ").concat(fontSize, ")") : FIXED_H2_SIZE, ";\n font-weight: inherit;\n }\n\n h3 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H3_SIZE, " + ").concat(fontSize, ")") : FIXED_H3_SIZE, ";\n font-weight: inherit;\n }\n\n h4 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H4_SIZE, " + ").concat(fontSize, ")") : FIXED_H4_SIZE, ";\n font-weight: inherit;\n }\n\n h5 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H5_SIZE, " + ").concat(fontSize, ")") : FIXED_H5_SIZE, ";\n font-weight: inherit;\n }\n\n p {\n font-size: inherit;\n font-weight: inherit;\n }\n");
15909
15913
  });
15910
15914
 
15911
15915
  var _templateObject;
@@ -16404,7 +16408,7 @@ var Typography = function Typography(_ref) {
16404
16408
  className: "neeto-editor-content",
16405
16409
  content: children,
16406
16410
  fontSize: style.fontSize,
16407
- tagName: "p"
16411
+ tagName: isEditorContent(children) ? "div" : "p"
16408
16412
  }));
16409
16413
  };
16410
16414
  Typography.displayName = "Typography";