slate 0.138.1 → 0.138.2

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.es.js CHANGED
@@ -587,7 +587,7 @@ const Element = {
587
587
  };
588
588
 
589
589
  const _excluded$3 = ["text"],
590
- _excluded2$2 = ["children"];
590
+ _excluded2$3 = ["children"];
591
591
  function ownKeys$f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
592
592
  function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
593
593
  // eslint-disable-next-line no-redeclare
@@ -674,7 +674,7 @@ const Node = {
674
674
  const {
675
675
  children
676
676
  } = node,
677
- properties = _objectWithoutProperties(node, _excluded2$2);
677
+ properties = _objectWithoutProperties(node, _excluded2$3);
678
678
  return properties;
679
679
  }
680
680
  },
@@ -1795,9 +1795,17 @@ const Scrubber = {
1795
1795
  }
1796
1796
  };
1797
1797
 
1798
- const _excluded$2 = ["anchor", "focus", "merge"];
1798
+ const _excluded$2 = ["text"],
1799
+ _excluded2$2 = ["anchor", "focus", "merge"];
1799
1800
  function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1800
1801
  function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1802
+ const omitText = _ref => {
1803
+ let {
1804
+ text
1805
+ } = _ref,
1806
+ rest = _objectWithoutProperties(_ref, _excluded$2);
1807
+ return rest;
1808
+ };
1801
1809
  // eslint-disable-next-line no-redeclare
1802
1810
  const Text = {
1803
1811
  equals(text, another, options = {}) {
@@ -1805,8 +1813,8 @@ const Text = {
1805
1813
  loose = false,
1806
1814
  ignore = []
1807
1815
  } = options;
1808
- if (!loose && ignore.length === 0) {
1809
- return isDeepEqual(text, another);
1816
+ if (ignore.length === 0) {
1817
+ return loose ? isDeepEqual(omitText(text), omitText(another)) : isDeepEqual(text, another);
1810
1818
  }
1811
1819
  const comparable = node => Object.fromEntries(Object.entries(node).filter(([key]) => !(loose && key === 'text') && !ignore.includes(key)));
1812
1820
  return isDeepEqual(comparable(text), comparable(another));
@@ -1841,7 +1849,7 @@ const Text = {
1841
1849
  focus,
1842
1850
  merge: mergeDecoration
1843
1851
  } = dec,
1844
- rest = _objectWithoutProperties(dec, _excluded$2);
1852
+ rest = _objectWithoutProperties(dec, _excluded2$2);
1845
1853
  const [start, end] = Range.edges(dec);
1846
1854
  const next = [];
1847
1855
  let leafEnd = 0;