@modusoperandi/licit 1.0.5 → 1.0.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.
Files changed (236) hide show
  1. package/BlockquoteInsertNewLineCommand.js +10 -11
  2. package/BlockquoteInsertNewLineCommand.js.flow +1 -2
  3. package/BlockquoteNodeSpec.js +2 -3
  4. package/BlockquoteNodeSpec.js.flow +1 -2
  5. package/BlockquoteToggleCommand.js +9 -9
  6. package/BookmarkNodeSpec.js +1 -1
  7. package/CodeBlockCommand.js +10 -10
  8. package/CodeBlockCommand.js.flow +1 -1
  9. package/ContentPlaceholderPlugin.js +17 -17
  10. package/ContentPlaceholderPlugin.js.flow +10 -12
  11. package/CursorPlaceholderPlugin.js +8 -8
  12. package/DocLayoutCommand.js +10 -12
  13. package/DocLayoutCommand.js.flow +1 -3
  14. package/EditorKeyMap.js +0 -1
  15. package/EditorKeyMap.js.flow +0 -2
  16. package/EditorMarks.js +1 -1
  17. package/EditorNodes.js +1 -2
  18. package/EditorNodes.js.flow +0 -1
  19. package/EditorPageLayoutPlugin.js +8 -8
  20. package/FontTypeMarkSpec.js +1 -1
  21. package/FontTypeMarkSpec.js.flow +1 -1
  22. package/HTMLMutator.js +4 -4
  23. package/HeadingNodeSpec.js +2 -12
  24. package/HeadingNodeSpec.js.flow +4 -14
  25. package/HistoryRedoCommand.js +9 -9
  26. package/HistoryUndoCommand.js +9 -9
  27. package/HorizontalRuleCommand.js +9 -9
  28. package/ImageUploadPlaceholderPlugin.js +13 -15
  29. package/ImageUploadPlaceholderPlugin.js.flow +5 -7
  30. package/LinkMarkSpec.js +6 -1
  31. package/LinkMarkSpec.js.flow +5 -0
  32. package/LinkSetURLCommand.js +126 -55
  33. package/LinkSetURLCommand.js.flow +61 -37
  34. package/LinkTooltipPlugin.js +119 -30
  35. package/LinkTooltipPlugin.js.flow +91 -20
  36. package/ListItemInsertNewLineCommand.js +10 -11
  37. package/ListItemInsertNewLineCommand.js.flow +1 -2
  38. package/ListItemMergeCommand.js +16 -15
  39. package/ListItemMergeCommand.js.flow +3 -4
  40. package/ListSplitCommand.js +9 -9
  41. package/ListToggleCommand.js +9 -9
  42. package/MarksClearCommand.js +9 -9
  43. package/MathEditCommand.js +10 -11
  44. package/MathEditCommand.js.flow +1 -2
  45. package/OrderedListNodeSpec.js +1 -1
  46. package/ParagraphNodeSpec.js +11 -2
  47. package/ParagraphNodeSpec.js.flow +9 -2
  48. package/ParagraphSpacingCommand.js +13 -14
  49. package/ParagraphSpacingCommand.js.flow +4 -9
  50. package/PrintCommand.js +9 -9
  51. package/SelectionPlaceholderPlugin.js +8 -8
  52. package/SpacerMarkSpec.js +1 -1
  53. package/StyleView.js +3 -4
  54. package/StyleView.js.flow +0 -1
  55. package/TableBackgroundColorCommand.js +12 -14
  56. package/TableBackgroundColorCommand.js.flow +2 -5
  57. package/TableBorderColorCommand.js +12 -14
  58. package/TableBorderColorCommand.js.flow +2 -7
  59. package/TableCellColorCommand.js +10 -11
  60. package/TableCellColorCommand.js.flow +1 -2
  61. package/TableCellMenuPlugin.js +16 -15
  62. package/TableCellMenuPlugin.js.flow +5 -7
  63. package/TableInsertCommand.js +11 -13
  64. package/TableInsertCommand.js.flow +2 -4
  65. package/TableMergeCellsCommand.js +13 -12
  66. package/TableMergeCellsCommand.js.flow +4 -3
  67. package/TableNodesSpecs.js +4 -2
  68. package/TableNodesSpecs.js.flow +4 -2
  69. package/TableResizePlugin.js +17 -16
  70. package/TableResizePlugin.js.flow +1 -1
  71. package/TextInsertTabSpaceCommand.js +9 -9
  72. package/Types.js +1 -0
  73. package/Types.js.flow +2 -5
  74. package/WebFontLoader.js +4 -4
  75. package/bom.xml +17623 -24512
  76. package/buildEditorPlugins.js +4 -4
  77. package/buildInputRules.js +8 -4
  78. package/buildInputRules.js.flow +8 -4
  79. package/client/CollabConnector.js +9 -9
  80. package/client/EditorConnection.js +8 -6
  81. package/client/EditorConnection.js.flow +3 -2
  82. package/client/Licit.js +22 -58
  83. package/client/Licit.js.flow +12 -44
  84. package/client/Licit.test.js +49 -39
  85. package/client/Licit.test.js.flow +40 -34
  86. package/client/Reporter.js +3 -3
  87. package/client/SimpleConnector.js +4 -4
  88. package/client/http.js +0 -6
  89. package/client/http.js.flow +0 -8
  90. package/client/throttle.js +8 -2
  91. package/client/throttle.js.flow +2 -2
  92. package/convertFromDOMElement.js +2 -4
  93. package/convertFromDOMElement.js.flow +2 -5
  94. package/convertFromHTML.js +2 -3
  95. package/convertFromHTML.js.flow +2 -4
  96. package/convertFromJSON.js +1 -2
  97. package/convertFromJSON.js.flow +1 -2
  98. package/convertToCSSPTValue.js +6 -10
  99. package/convertToCSSPTValue.js.flow +8 -11
  100. package/createCommand.js +9 -9
  101. package/createEditorKeyMap.js +1 -1
  102. package/createEmptyEditorState.js +2 -3
  103. package/createEmptyEditorState.js.flow +2 -4
  104. package/createTableResizingPlugin.js +6 -6
  105. package/createTableResizingPlugin.js.flow +1 -1
  106. package/findActiveMark.js +1 -1
  107. package/findActiveMark.js.flow +1 -1
  108. package/insertTable.js +0 -3
  109. package/insertTable.js.flow +0 -2
  110. package/joinDown.js +1 -3
  111. package/joinDown.js.flow +1 -3
  112. package/joinUp.js +1 -3
  113. package/joinUp.js.flow +1 -3
  114. package/lookUpElement.js +2 -1
  115. package/lookUpElement.js.flow +1 -1
  116. package/normalizeHTML.js +3 -1
  117. package/normalizeHTML.js.flow +3 -1
  118. package/package.json +21 -16
  119. package/patchAnchorElements.js +1 -1
  120. package/patchAnchorElements.js.flow +1 -1
  121. package/patchBreakElements.js +3 -2
  122. package/patchBreakElements.js.flow +2 -2
  123. package/patchElementInlineStyles.js +1 -1
  124. package/patchElementInlineStyles.js.flow +1 -1
  125. package/patchListElements.js +4 -4
  126. package/patchListElements.js.flow +5 -5
  127. package/patchMathElements.js +5 -7
  128. package/patchMathElements.js.flow +2 -4
  129. package/patchStyleElements.js +1 -1
  130. package/patchStyleElements.js.flow +7 -6
  131. package/patchTableElements.js +2 -3
  132. package/patchTableElements.js.flow +2 -3
  133. package/sanitizeURL.js +1 -1
  134. package/sanitizeURL.js.flow +1 -1
  135. package/splitListItem.js +2 -2
  136. package/splitListItem.js.flow +1 -1
  137. package/toggleBlockquote.js +4 -5
  138. package/toggleBlockquote.js.flow +5 -12
  139. package/toggleCodeBlock.js +6 -6
  140. package/toggleCodeBlock.js.flow +10 -10
  141. package/ui/AlertInfo.js +9 -9
  142. package/ui/BookmarkNodeView.js +13 -12
  143. package/ui/CommandButton.js +9 -9
  144. package/ui/CommandMenu.js +12 -12
  145. package/ui/CommandMenu.js.flow +1 -1
  146. package/ui/CommandMenuButton.js +11 -12
  147. package/ui/CommandMenuButton.js.flow +2 -3
  148. package/ui/CustomEditorView.js +13 -12
  149. package/ui/CustomEditorView.js.flow +1 -0
  150. package/ui/CustomMenu.js +8 -8
  151. package/ui/CustomMenuItem.js +10 -10
  152. package/ui/CustomNodeView.js +27 -16
  153. package/ui/CustomNodeView.js.flow +16 -9
  154. package/ui/CustomRadioButton.js +13 -15
  155. package/ui/CustomRadioButton.js.flow +2 -3
  156. package/ui/DocLayoutEditor.js +10 -11
  157. package/ui/DocLayoutEditor.js.flow +1 -2
  158. package/ui/Editor.js +16 -13
  159. package/ui/Editor.js.flow +7 -8
  160. package/ui/EditorFrameset.js +9 -9
  161. package/ui/EditorToolbar.js +24 -29
  162. package/ui/EditorToolbar.js.flow +22 -41
  163. package/ui/EditorToolbarConfig.js +5 -5
  164. package/ui/EditorToolbarConfig.js.flow +1 -1
  165. package/ui/FontSizeCommandMenuButton.js +10 -10
  166. package/ui/FontSizeCommandMenuButton.js.flow +1 -1
  167. package/ui/FontTypeCommandMenuButton.js +11 -12
  168. package/ui/FontTypeCommandMenuButton.js.flow +4 -5
  169. package/ui/Frag.js +8 -8
  170. package/ui/Icon.js +12 -12
  171. package/ui/ImageInlineEditor.js +9 -9
  172. package/ui/LinkTooltip.js +62 -27
  173. package/ui/LinkTooltip.js.flow +55 -22
  174. package/ui/LinkURLEditor.js +152 -34
  175. package/ui/LinkURLEditor.js.flow +177 -51
  176. package/ui/ListItemNodeView.js +4 -4
  177. package/ui/ListTypeButton.js +11 -14
  178. package/ui/ListTypeButton.js.flow +2 -5
  179. package/ui/ListTypeCommandButton.js +10 -10
  180. package/ui/ListTypeCommandButton.js.flow +1 -1
  181. package/ui/ListTypeMenu.js +11 -11
  182. package/ui/ListTypeMenu.js.flow +1 -1
  183. package/ui/LoadingIndicator.js +8 -8
  184. package/ui/MathEditor.js +10 -14
  185. package/ui/MathEditor.js.flow +1 -7
  186. package/ui/MathInlineEditor.js +13 -13
  187. package/ui/MathInlineEditor.js.flow +3 -4
  188. package/ui/MathNodeView.js +16 -15
  189. package/ui/MathNodeView.js.flow +10 -20
  190. package/ui/PasteMenu.js +11 -14
  191. package/ui/PasteMenu.js.flow +0 -4
  192. package/ui/ResizeObserver.js +1 -1
  193. package/ui/ResizeObserver.js.flow +1 -1
  194. package/ui/RichTextEditor.js +9 -9
  195. package/ui/SelectionObserver.js +6 -6
  196. package/ui/SelectionObserver.js.flow +2 -2
  197. package/ui/TableCellMenu.js +9 -9
  198. package/ui/TableGridSizeEditor.js +11 -12
  199. package/ui/TableGridSizeEditor.js.flow +6 -3
  200. package/ui/TableNodeView.js +15 -13
  201. package/ui/TableNodeView.js.flow +3 -3
  202. package/ui/bindScrollHandler.js +2 -1
  203. package/ui/bindScrollHandler.js.flow +1 -1
  204. package/ui/canUseCSSFont.js +5 -4
  205. package/ui/canUseCSSFont.js.flow +4 -5
  206. package/ui/czi-editor.css +1 -4
  207. package/ui/czi-form.css +102 -8
  208. package/ui/czi-image-view.css +1 -5
  209. package/ui/czi-link-tooltip.css +41 -0
  210. package/ui/czi-list.css +0 -4
  211. package/ui/czi-loading-indicator.css +1 -46
  212. package/ui/czi-table-cell-menu.css +3 -1
  213. package/ui/findActiveFontSize.js +2 -1
  214. package/ui/findActiveFontSize.js.flow +1 -4
  215. package/ui/findActiveFontType.js +4 -3
  216. package/ui/findActiveFontType.js.flow +3 -6
  217. package/ui/handleEditorDrop.js +1 -1
  218. package/ui/handleEditorDrop.js.flow +1 -1
  219. package/ui/handleEditorKeyDown.js +1 -1
  220. package/ui/handleEditorKeyDown.js.flow +1 -1
  221. package/ui/handleEditorPaste.js +1 -1
  222. package/ui/handleEditorPaste.js.flow +1 -1
  223. package/ui/injectStyleSheet.js +2 -2
  224. package/ui/injectStyleSheet.js.flow +2 -4
  225. package/ui/isElementFullyVisible.js +1 -10
  226. package/ui/isElementFullyVisible.js.flow +1 -13
  227. package/ui/mathquill-editor/MathQuillEditor.js +12 -13
  228. package/ui/mathquill-editor/MathQuillEditor.js.flow +0 -1
  229. package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +9 -9
  230. package/ui/mathquill-editor/mathquill-import-kludge.js +1 -8
  231. package/ui/mathquill-editor/mathquill-import-kludge.js.flow +0 -7
  232. package/ui/renderLaTeXAsHTML.js +3 -3
  233. package/ui/resolveImage.js +4 -5
  234. package/ui/resolveImage.js.flow +3 -5
  235. package/ui/toCSSLineSpacing.js +2 -3
  236. package/ui/toCSSLineSpacing.js.flow +2 -4
@@ -1,21 +1,20 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
5
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
6
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
7
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
7
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
10
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
11
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  import nullthrows from 'nullthrows';
16
16
  import { Fragment, Schema } from 'prosemirror-model';
17
- import { EditorState } from 'prosemirror-state';
18
- import { TextSelection } from 'prosemirror-state';
17
+ import { EditorState, TextSelection } from 'prosemirror-state';
19
18
  import { Transform } from 'prosemirror-transform';
20
19
  import { findParentNodeOfType } from 'prosemirror-utils';
21
20
  import { EditorView } from 'prosemirror-view';
@@ -121,10 +120,12 @@ function mergeListItemDown(tr, schema) {
121
120
  var nextContent;
122
121
  switch (nextNode.type) {
123
122
  case listItem:
124
- // List item should only have one child (paragraph).
125
- var paragraphNode = nullthrows(nextNode.firstChild);
126
- nextContent = Fragment.from(paragraphNode.content);
127
- break;
123
+ {
124
+ // List item should only have one child (paragraph).
125
+ var paragraphNode = nullthrows(nextNode.firstChild);
126
+ nextContent = Fragment.from(paragraphNode.content);
127
+ break;
128
+ }
128
129
  case schema.nodes[HEADING]:
129
130
  case schema.nodes[PARAGRAPH]:
130
131
  // Will bring in the content of the next block.
@@ -2,8 +2,7 @@
2
2
 
3
3
  import nullthrows from 'nullthrows';
4
4
  import { Fragment, Schema } from 'prosemirror-model';
5
- import { EditorState } from 'prosemirror-state';
6
- import { TextSelection } from 'prosemirror-state';
5
+ import { EditorState, TextSelection } from 'prosemirror-state';
7
6
  import { Transform } from 'prosemirror-transform';
8
7
  import { findParentNodeOfType } from 'prosemirror-utils';
9
8
  import { EditorView } from 'prosemirror-view';
@@ -109,12 +108,12 @@ function mergeListItemDown(tr: Transform, schema: Schema): Transform {
109
108
  let nextContent;
110
109
 
111
110
  switch (nextNode.type) {
112
- case listItem:
111
+ case listItem: {
113
112
  // List item should only have one child (paragraph).
114
113
  const paragraphNode = nullthrows(nextNode.firstChild);
115
114
  nextContent = Fragment.from(paragraphNode.content);
116
115
  break;
117
-
116
+ }
118
117
  case schema.nodes[HEADING]:
119
118
  case schema.nodes[PARAGRAPH]:
120
119
  // Will bring in the content of the next block.
@@ -1,15 +1,15 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
5
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
6
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
7
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
7
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
10
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
11
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  import { Schema } from 'prosemirror-model';
@@ -1,15 +1,15 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
5
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
6
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
7
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
7
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
10
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
11
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  import { EditorState } from 'prosemirror-state';
@@ -1,15 +1,15 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
5
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
6
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
7
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
7
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
10
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
11
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  import { EditorState, AllSelection, TextSelection } from 'prosemirror-state';
@@ -1,20 +1,19 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
5
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
6
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
7
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
7
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
10
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
11
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  import { Fragment, Schema } from 'prosemirror-model';
16
- import { EditorState } from 'prosemirror-state';
17
- import { TextSelection } from 'prosemirror-state';
16
+ import { EditorState, TextSelection } from 'prosemirror-state';
18
17
  import { Transform } from 'prosemirror-transform';
19
18
  import { EditorView } from 'prosemirror-view';
20
19
  // eslint-disable-next-line no-unused-vars
@@ -1,8 +1,7 @@
1
1
  // @flow
2
2
 
3
3
  import { Fragment, Schema } from 'prosemirror-model';
4
- import { EditorState } from 'prosemirror-state';
5
- import { TextSelection } from 'prosemirror-state';
4
+ import { EditorState, TextSelection } from 'prosemirror-state';
6
5
  import { Transform } from 'prosemirror-transform';
7
6
  import { EditorView } from 'prosemirror-view';
8
7
  // eslint-disable-next-line no-unused-vars
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import { Node } from 'prosemirror-model';
@@ -40,6 +40,9 @@ var ParagraphNodeSpec = {
40
40
  // TODO: Add UI to let user edit / clear padding.
41
41
  paddingTop: {
42
42
  "default": null
43
+ },
44
+ innerLink: {
45
+ "default": null
43
46
  }
44
47
  },
45
48
  content: 'inline*',
@@ -66,13 +69,15 @@ function getAttrs(dom) {
66
69
  indent = indent || MIN_INDENT_LEVEL;
67
70
  var lineSpacing = lineHeight ? toCSSLineSpacing(lineHeight) : null;
68
71
  var id = dom.getAttribute('id') || '';
72
+ var innerLink = dom.getAttribute('innerLink') || '';
69
73
  return {
70
74
  align: align,
71
75
  indent: indent,
72
76
  lineSpacing: lineSpacing,
73
77
  paddingTop: paddingTop,
74
78
  paddingBottom: paddingBottom,
75
- id: id
79
+ id: id,
80
+ innerLink: innerLink
76
81
  };
77
82
  }
78
83
  function getStyle(attrs) {
@@ -102,7 +107,8 @@ function getStyleEx(align, lineSpacing, paddingTop, paddingBottom) {
102
107
  function toDOM(node) {
103
108
  var _node$attrs = node.attrs,
104
109
  indent = _node$attrs.indent,
105
- id = _node$attrs.id;
110
+ id = _node$attrs.id,
111
+ innerLink = _node$attrs.innerLink;
106
112
  var attrs = {};
107
113
  var _getStyle = getStyle(node.attrs),
108
114
  style = _getStyle.style;
@@ -113,6 +119,9 @@ function toDOM(node) {
113
119
  if (id) {
114
120
  attrs.id = id;
115
121
  }
122
+ if (innerLink) {
123
+ attrs.innerLink = innerLink;
124
+ }
116
125
  return ['p', attrs, 0];
117
126
  }
118
127
  export var toParagraphDOM = toDOM;
@@ -48,6 +48,9 @@ const ParagraphNodeSpec: NodeSpec = {
48
48
  paddingTop: {
49
49
  default: null,
50
50
  },
51
+ innerLink: {
52
+ default: null,
53
+ },
51
54
  },
52
55
  content: 'inline*',
53
56
  group: 'block',
@@ -83,6 +86,7 @@ function getAttrs(dom: HTMLElement): Object {
83
86
  const lineSpacing = lineHeight ? toCSSLineSpacing(lineHeight) : null;
84
87
 
85
88
  const id = dom.getAttribute('id') || '';
89
+ const innerLink = dom.getAttribute('innerLink') || '';
86
90
  return {
87
91
  align,
88
92
  indent,
@@ -90,6 +94,7 @@ function getAttrs(dom: HTMLElement): Object {
90
94
  paddingTop,
91
95
  paddingBottom,
92
96
  id,
97
+ innerLink,
93
98
  };
94
99
  }
95
100
 
@@ -128,7 +133,7 @@ function getStyleEx(align, lineSpacing, paddingTop, paddingBottom) {
128
133
  }
129
134
 
130
135
  function toDOM(node: Node): Array<any> {
131
- const { indent, id } = node.attrs;
136
+ const { indent, id, innerLink } = node.attrs;
132
137
  const attrs = {};
133
138
  const { style } = getStyle(node.attrs);
134
139
 
@@ -140,7 +145,9 @@ function toDOM(node: Node): Array<any> {
140
145
  if (id) {
141
146
  attrs.id = id;
142
147
  }
143
-
148
+ if (innerLink) {
149
+ attrs.innerLink = innerLink;
150
+ }
144
151
  return ['p', attrs, 0];
145
152
  }
146
153
 
@@ -1,23 +1,22 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
5
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
6
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
7
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
7
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
9
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
10
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
11
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
12
12
  function ownKeys(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; }
13
13
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
16
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
17
17
  import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
18
- import { AllSelection, TextSelection } from 'prosemirror-state';
18
+ import { AllSelection, TextSelection, EditorState } from 'prosemirror-state';
19
19
  import { BLOCKQUOTE, HEADING, LIST_ITEM, PARAGRAPH } from './NodeNames';
20
- import { EditorState } from 'prosemirror-state';
21
20
  import { EditorView } from 'prosemirror-view';
22
21
  import { Schema } from 'prosemirror-model';
23
22
  import { Transform } from 'prosemirror-transform';
@@ -54,7 +53,7 @@ export function setParagraphSpacing(tr, schema, paragraphSpacing, isAfter) {
54
53
  nodeType: nodeType
55
54
  });
56
55
  }
57
- return nodeType === listItem ? true : false;
56
+ return nodeType === listItem;
58
57
  }
59
58
  return true;
60
59
  });
@@ -68,11 +67,11 @@ export function setParagraphSpacing(tr, schema, paragraphSpacing, isAfter) {
68
67
  var attrs = node.attrs;
69
68
  if (isAfter) {
70
69
  attrs = _objectSpread(_objectSpread({}, attrs), {}, {
71
- paragraphSpacingAfter: paragraphSpacingValue ? paragraphSpacingValue : null
70
+ paragraphSpacingAfter: paragraphSpacingValue || null
72
71
  });
73
72
  } else {
74
73
  attrs = _objectSpread(_objectSpread({}, attrs), {}, {
75
- paragraphSpacingBefore: paragraphSpacingValue ? paragraphSpacingValue : null
74
+ paragraphSpacingBefore: paragraphSpacingValue || null
76
75
  });
77
76
  }
78
77
  tr = tr.setNodeMarkup(pos, nodeType, attrs, node.marks);
@@ -1,9 +1,8 @@
1
1
  // @flow
2
2
 
3
3
  import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
4
- import { AllSelection, TextSelection } from 'prosemirror-state';
4
+ import { AllSelection, TextSelection, EditorState } from 'prosemirror-state';
5
5
  import { BLOCKQUOTE, HEADING, LIST_ITEM, PARAGRAPH } from './NodeNames';
6
- import { EditorState } from 'prosemirror-state';
7
6
  import { EditorView } from 'prosemirror-view';
8
7
  import { Schema } from 'prosemirror-model';
9
8
  import { Transform } from 'prosemirror-transform';
@@ -55,7 +54,7 @@ export function setParagraphSpacing(
55
54
  nodeType,
56
55
  });
57
56
  }
58
- return nodeType === listItem ? true : false;
57
+ return nodeType === listItem;
59
58
  }
60
59
  return true;
61
60
  });
@@ -70,16 +69,12 @@ export function setParagraphSpacing(
70
69
  if (isAfter) {
71
70
  attrs = {
72
71
  ...attrs,
73
- paragraphSpacingAfter: paragraphSpacingValue
74
- ? paragraphSpacingValue
75
- : null,
72
+ paragraphSpacingAfter: paragraphSpacingValue || null,
76
73
  };
77
74
  } else {
78
75
  attrs = {
79
76
  ...attrs,
80
- paragraphSpacingBefore: paragraphSpacingValue
81
- ? paragraphSpacingValue
82
- : null,
77
+ paragraphSpacingBefore: paragraphSpacingValue || null,
83
78
  };
84
79
  }
85
80
  tr = tr.setNodeMarkup(pos, nodeType, attrs, node.marks);
package/PrintCommand.js CHANGED
@@ -1,15 +1,15 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
5
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
6
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
7
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
7
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
10
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
11
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  import { EditorState } from 'prosemirror-state';
@@ -1,16 +1,16 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
3
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
4
4
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
5
5
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
7
7
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
9
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
8
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
9
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
12
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
13
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
11
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
12
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
13
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
14
14
  import { EditorState, Plugin, PluginKey } from 'prosemirror-state';
15
15
  import { Transform } from 'prosemirror-transform';
16
16
  import { Decoration, DecorationSet } from 'prosemirror-view';
package/SpacerMarkSpec.js CHANGED
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import { Node } from 'prosemirror-model';
package/StyleView.js CHANGED
@@ -1,7 +1,7 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  // temp view for custom style have to check this view is needed?
@@ -18,7 +18,6 @@ export var StyleView = /*#__PURE__*/function () {
18
18
  value: function update(view, lastState) {
19
19
  if (view.readOnly) {
20
20
  this.destroy();
21
- return;
22
21
  }
23
22
  }
24
23
  }, {
package/StyleView.js.flow CHANGED
@@ -11,7 +11,6 @@ export class StyleView {
11
11
  update(view: EditorView, lastState: EditorState): void {
12
12
  if (view.readOnly) {
13
13
  this.destroy();
14
- return;
15
14
  }
16
15
  }
17
16