@contember/react-slate-editor-base 2.1.0-alpha.30 → 2.1.0-alpha.36

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 (932) hide show
  1. package/package.json +15 -15
  2. package/src/components/RichTextEditor.tsx +1 -2
  3. package/src/components/triggers/EditorGenericTrigger.tsx +0 -1
  4. package/src/editor/createEditor.ts +0 -1
  5. package/src/editor/createEditorWithEssentials.tsx +23 -16
  6. package/src/editor/methods/addMarks.ts +1 -1
  7. package/src/editor/methods/closest.ts +1 -1
  8. package/src/editor/methods/closestBlockEntry.ts +1 -1
  9. package/src/editor/methods/hasMarks.ts +6 -4
  10. package/src/editor/methods/removeMarks.ts +1 -1
  11. package/src/editor/methods/toLatestFormat.ts +3 -5
  12. package/src/internal/hooks/useRichTextFieldNodes.ts +10 -11
  13. package/src/internal/utils/EditorPasteUtils.ts +3 -3
  14. package/src/plugins/attributes/alignment/alignButton.ts +1 -4
  15. package/src/plugins/behaviour/paste/HtmlDeserializer.ts +11 -16
  16. package/src/plugins/behaviour/paste/createMarkHtmlDeserializer.ts +5 -1
  17. package/src/plugins/behaviour/paste/withPaste.ts +0 -1
  18. package/src/plugins/element/anchors/AnchorElement.ts +1 -2
  19. package/src/plugins/element/anchors/AnchorHtmlDeserializer.ts +1 -1
  20. package/src/plugins/element/headings/HeadingElement.ts +0 -1
  21. package/src/plugins/element/headings/withHeadings.ts +1 -10
  22. package/src/plugins/element/horizonalRules/HorizontalRuleElement.ts +4 -2
  23. package/src/plugins/element/horizonalRules/withHorizontalRules.ts +1 -2
  24. package/src/plugins/element/lists/ListElement.ts +2 -1
  25. package/src/plugins/element/lists/ListHtmlDeserializer.ts +3 -1
  26. package/src/plugins/element/lists/ListItemElement.ts +1 -2
  27. package/src/plugins/element/lists/UnorderedListElement.ts +3 -1
  28. package/src/plugins/element/lists/transforms/indentListItem.ts +3 -12
  29. package/src/plugins/element/lists/withLists.ts +7 -16
  30. package/src/plugins/element/paragraphs/ParagraphElement.ts +2 -2
  31. package/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.ts +7 -4
  32. package/src/plugins/element/paragraphs/withParagraphs.ts +1 -2
  33. package/src/plugins/element/scrollTargets/ScrollTargetElement.ts +6 -5
  34. package/src/plugins/element/tables/TableCellElement.ts +1 -2
  35. package/src/plugins/element/tables/TableElement.ts +13 -2
  36. package/src/plugins/element/tables/TableModifications.ts +2 -9
  37. package/src/plugins/element/tables/TableRowElement.ts +2 -2
  38. package/src/plugins/element/tables/withTables.ts +20 -20
  39. package/src/plugins/text/bold/withBold.ts +0 -1
  40. package/src/plugins/text/code/withCode.ts +0 -1
  41. package/src/plugins/text/highlight/withHighlight.ts +0 -1
  42. package/src/plugins/text/italic/withItalic.ts +0 -1
  43. package/src/plugins/text/strikeThrough/withStrikeThrough.ts +0 -1
  44. package/src/plugins/text/underline/withUnderline.ts +0 -1
  45. package/src/slate-types.ts +16 -12
  46. package/src/types/htmlDeserializer.ts +2 -2
  47. package/src/types/plugins.ts +0 -2
  48. package/dist/development/index.cjs +0 -139
  49. package/dist/development/index.cjs.map +0 -1
  50. package/dist/development/index.js +0 -136
  51. package/dist/development/index.js.map +0 -1
  52. package/dist/development/src/components/RichTextEditor.cjs +0 -105
  53. package/dist/development/src/components/RichTextEditor.cjs.map +0 -1
  54. package/dist/development/src/components/RichTextEditor.js +0 -105
  55. package/dist/development/src/components/RichTextEditor.js.map +0 -1
  56. package/dist/development/src/components/triggers/EditorElementTrigger.cjs +0 -20
  57. package/dist/development/src/components/triggers/EditorElementTrigger.cjs.map +0 -1
  58. package/dist/development/src/components/triggers/EditorElementTrigger.js +0 -20
  59. package/dist/development/src/components/triggers/EditorElementTrigger.js.map +0 -1
  60. package/dist/development/src/components/triggers/EditorGenericTrigger.cjs +0 -24
  61. package/dist/development/src/components/triggers/EditorGenericTrigger.cjs.map +0 -1
  62. package/dist/development/src/components/triggers/EditorGenericTrigger.js +0 -24
  63. package/dist/development/src/components/triggers/EditorGenericTrigger.js.map +0 -1
  64. package/dist/development/src/components/triggers/EditorMarkTrigger.cjs +0 -20
  65. package/dist/development/src/components/triggers/EditorMarkTrigger.cjs.map +0 -1
  66. package/dist/development/src/components/triggers/EditorMarkTrigger.js +0 -20
  67. package/dist/development/src/components/triggers/EditorMarkTrigger.js.map +0 -1
  68. package/dist/development/src/components/triggers/EditorWrapNodeTrigger.cjs +0 -32
  69. package/dist/development/src/components/triggers/EditorWrapNodeTrigger.cjs.map +0 -1
  70. package/dist/development/src/components/triggers/EditorWrapNodeTrigger.js +0 -32
  71. package/dist/development/src/components/triggers/EditorWrapNodeTrigger.js.map +0 -1
  72. package/dist/development/src/editor/createEditor.cjs +0 -35
  73. package/dist/development/src/editor/createEditor.cjs.map +0 -1
  74. package/dist/development/src/editor/createEditor.js +0 -35
  75. package/dist/development/src/editor/createEditor.js.map +0 -1
  76. package/dist/development/src/editor/createEditorWithEssentials.cjs +0 -227
  77. package/dist/development/src/editor/createEditorWithEssentials.cjs.map +0 -1
  78. package/dist/development/src/editor/createEditorWithEssentials.js +0 -211
  79. package/dist/development/src/editor/createEditorWithEssentials.js.map +0 -1
  80. package/dist/development/src/editor/index.cjs +0 -44
  81. package/dist/development/src/editor/index.cjs.map +0 -1
  82. package/dist/development/src/editor/index.js +0 -44
  83. package/dist/development/src/editor/index.js.map +0 -1
  84. package/dist/development/src/editor/methods/addMarks.cjs +0 -12
  85. package/dist/development/src/editor/methods/addMarks.cjs.map +0 -1
  86. package/dist/development/src/editor/methods/addMarks.js +0 -12
  87. package/dist/development/src/editor/methods/addMarks.js.map +0 -1
  88. package/dist/development/src/editor/methods/canToggleMark.cjs +0 -7
  89. package/dist/development/src/editor/methods/canToggleMark.cjs.map +0 -1
  90. package/dist/development/src/editor/methods/canToggleMark.js +0 -7
  91. package/dist/development/src/editor/methods/canToggleMark.js.map +0 -1
  92. package/dist/development/src/editor/methods/closest.cjs +0 -18
  93. package/dist/development/src/editor/methods/closest.cjs.map +0 -1
  94. package/dist/development/src/editor/methods/closest.js +0 -18
  95. package/dist/development/src/editor/methods/closest.js.map +0 -1
  96. package/dist/development/src/editor/methods/closestBlockEntry.cjs +0 -10
  97. package/dist/development/src/editor/methods/closestBlockEntry.cjs.map +0 -1
  98. package/dist/development/src/editor/methods/closestBlockEntry.js +0 -10
  99. package/dist/development/src/editor/methods/closestBlockEntry.js.map +0 -1
  100. package/dist/development/src/editor/methods/closestViableBlockContainerEntry.cjs +0 -9
  101. package/dist/development/src/editor/methods/closestViableBlockContainerEntry.cjs.map +0 -1
  102. package/dist/development/src/editor/methods/closestViableBlockContainerEntry.js +0 -9
  103. package/dist/development/src/editor/methods/closestViableBlockContainerEntry.js.map +0 -1
  104. package/dist/development/src/editor/methods/ejectElement.cjs +0 -15
  105. package/dist/development/src/editor/methods/ejectElement.cjs.map +0 -1
  106. package/dist/development/src/editor/methods/ejectElement.js +0 -15
  107. package/dist/development/src/editor/methods/ejectElement.js.map +0 -1
  108. package/dist/development/src/editor/methods/elementToSpecifics.cjs +0 -8
  109. package/dist/development/src/editor/methods/elementToSpecifics.cjs.map +0 -1
  110. package/dist/development/src/editor/methods/elementToSpecifics.js +0 -8
  111. package/dist/development/src/editor/methods/elementToSpecifics.js.map +0 -1
  112. package/dist/development/src/editor/methods/getElementDataAttributes.cjs +0 -13
  113. package/dist/development/src/editor/methods/getElementDataAttributes.cjs.map +0 -1
  114. package/dist/development/src/editor/methods/getElementDataAttributes.js +0 -13
  115. package/dist/development/src/editor/methods/getElementDataAttributes.js.map +0 -1
  116. package/dist/development/src/editor/methods/getPreviousSibling.cjs +0 -13
  117. package/dist/development/src/editor/methods/getPreviousSibling.cjs.map +0 -1
  118. package/dist/development/src/editor/methods/getPreviousSibling.js +0 -13
  119. package/dist/development/src/editor/methods/getPreviousSibling.js.map +0 -1
  120. package/dist/development/src/editor/methods/hasMarks.cjs +0 -23
  121. package/dist/development/src/editor/methods/hasMarks.cjs.map +0 -1
  122. package/dist/development/src/editor/methods/hasMarks.js +0 -23
  123. package/dist/development/src/editor/methods/hasMarks.js.map +0 -1
  124. package/dist/development/src/editor/methods/hasParentOfType.cjs +0 -15
  125. package/dist/development/src/editor/methods/hasParentOfType.cjs.map +0 -1
  126. package/dist/development/src/editor/methods/hasParentOfType.js +0 -15
  127. package/dist/development/src/editor/methods/hasParentOfType.js.map +0 -1
  128. package/dist/development/src/editor/methods/isElementType.cjs +0 -24
  129. package/dist/development/src/editor/methods/isElementType.cjs.map +0 -1
  130. package/dist/development/src/editor/methods/isElementType.js +0 -24
  131. package/dist/development/src/editor/methods/isElementType.js.map +0 -1
  132. package/dist/development/src/editor/methods/permissivelyDeserializeNodes.cjs +0 -22
  133. package/dist/development/src/editor/methods/permissivelyDeserializeNodes.cjs.map +0 -1
  134. package/dist/development/src/editor/methods/permissivelyDeserializeNodes.js +0 -22
  135. package/dist/development/src/editor/methods/permissivelyDeserializeNodes.js.map +0 -1
  136. package/dist/development/src/editor/methods/removeMarks.cjs +0 -12
  137. package/dist/development/src/editor/methods/removeMarks.cjs.map +0 -1
  138. package/dist/development/src/editor/methods/removeMarks.js +0 -12
  139. package/dist/development/src/editor/methods/removeMarks.js.map +0 -1
  140. package/dist/development/src/editor/methods/serializeNodes.cjs +0 -15
  141. package/dist/development/src/editor/methods/serializeNodes.cjs.map +0 -1
  142. package/dist/development/src/editor/methods/serializeNodes.js +0 -15
  143. package/dist/development/src/editor/methods/serializeNodes.js.map +0 -1
  144. package/dist/development/src/editor/methods/strictlyDeserializeNodes.cjs +0 -14
  145. package/dist/development/src/editor/methods/strictlyDeserializeNodes.cjs.map +0 -1
  146. package/dist/development/src/editor/methods/strictlyDeserializeNodes.js +0 -14
  147. package/dist/development/src/editor/methods/strictlyDeserializeNodes.js.map +0 -1
  148. package/dist/development/src/editor/methods/textToSpecifics.cjs +0 -8
  149. package/dist/development/src/editor/methods/textToSpecifics.cjs.map +0 -1
  150. package/dist/development/src/editor/methods/textToSpecifics.js +0 -8
  151. package/dist/development/src/editor/methods/textToSpecifics.js.map +0 -1
  152. package/dist/development/src/editor/methods/toLatestFormat.cjs +0 -34
  153. package/dist/development/src/editor/methods/toLatestFormat.cjs.map +0 -1
  154. package/dist/development/src/editor/methods/toLatestFormat.js +0 -34
  155. package/dist/development/src/editor/methods/toLatestFormat.js.map +0 -1
  156. package/dist/development/src/editor/methods/topLevelNodes.cjs +0 -12
  157. package/dist/development/src/editor/methods/topLevelNodes.cjs.map +0 -1
  158. package/dist/development/src/editor/methods/topLevelNodes.js +0 -12
  159. package/dist/development/src/editor/methods/topLevelNodes.js.map +0 -1
  160. package/dist/development/src/internal/components/DefaultElement.cjs +0 -11
  161. package/dist/development/src/internal/components/DefaultElement.cjs.map +0 -1
  162. package/dist/development/src/internal/components/DefaultElement.js +0 -11
  163. package/dist/development/src/internal/components/DefaultElement.js.map +0 -1
  164. package/dist/development/src/internal/hooks/useRichTextFieldNodes.cjs +0 -28
  165. package/dist/development/src/internal/hooks/useRichTextFieldNodes.cjs.map +0 -1
  166. package/dist/development/src/internal/hooks/useRichTextFieldNodes.js +0 -28
  167. package/dist/development/src/internal/hooks/useRichTextFieldNodes.js.map +0 -1
  168. package/dist/development/src/internal/utils/EditorPasteUtils.cjs +0 -47
  169. package/dist/development/src/internal/utils/EditorPasteUtils.cjs.map +0 -1
  170. package/dist/development/src/internal/utils/EditorPasteUtils.js +0 -47
  171. package/dist/development/src/internal/utils/EditorPasteUtils.js.map +0 -1
  172. package/dist/development/src/internal/utils/parseUrl.cjs +0 -14
  173. package/dist/development/src/internal/utils/parseUrl.cjs.map +0 -1
  174. package/dist/development/src/internal/utils/parseUrl.js +0 -14
  175. package/dist/development/src/internal/utils/parseUrl.js.map +0 -1
  176. package/dist/development/src/plugins/attributes/alignment/alignButton.cjs +0 -21
  177. package/dist/development/src/plugins/attributes/alignment/alignButton.cjs.map +0 -1
  178. package/dist/development/src/plugins/attributes/alignment/alignButton.js +0 -21
  179. package/dist/development/src/plugins/attributes/alignment/alignButton.js.map +0 -1
  180. package/dist/development/src/plugins/behaviour/paste/HtmlDeserializer.cjs +0 -138
  181. package/dist/development/src/plugins/behaviour/paste/HtmlDeserializer.cjs.map +0 -1
  182. package/dist/development/src/plugins/behaviour/paste/HtmlDeserializer.js +0 -138
  183. package/dist/development/src/plugins/behaviour/paste/HtmlDeserializer.js.map +0 -1
  184. package/dist/development/src/plugins/behaviour/paste/createMarkHtmlDeserializer.cjs +0 -15
  185. package/dist/development/src/plugins/behaviour/paste/createMarkHtmlDeserializer.cjs.map +0 -1
  186. package/dist/development/src/plugins/behaviour/paste/createMarkHtmlDeserializer.js +0 -15
  187. package/dist/development/src/plugins/behaviour/paste/createMarkHtmlDeserializer.js.map +0 -1
  188. package/dist/development/src/plugins/behaviour/paste/withPaste.cjs +0 -24
  189. package/dist/development/src/plugins/behaviour/paste/withPaste.cjs.map +0 -1
  190. package/dist/development/src/plugins/behaviour/paste/withPaste.js +0 -24
  191. package/dist/development/src/plugins/behaviour/paste/withPaste.js.map +0 -1
  192. package/dist/development/src/plugins/element/anchors/AnchorElement.cjs +0 -44
  193. package/dist/development/src/plugins/element/anchors/AnchorElement.cjs.map +0 -1
  194. package/dist/development/src/plugins/element/anchors/AnchorElement.js +0 -44
  195. package/dist/development/src/plugins/element/anchors/AnchorElement.js.map +0 -1
  196. package/dist/development/src/plugins/element/anchors/AnchorHtmlDeserializer.cjs +0 -19
  197. package/dist/development/src/plugins/element/anchors/AnchorHtmlDeserializer.cjs.map +0 -1
  198. package/dist/development/src/plugins/element/anchors/AnchorHtmlDeserializer.js +0 -19
  199. package/dist/development/src/plugins/element/anchors/AnchorHtmlDeserializer.js.map +0 -1
  200. package/dist/development/src/plugins/element/anchors/AnchorModifications.cjs +0 -29
  201. package/dist/development/src/plugins/element/anchors/AnchorModifications.cjs.map +0 -1
  202. package/dist/development/src/plugins/element/anchors/AnchorModifications.js +0 -29
  203. package/dist/development/src/plugins/element/anchors/AnchorModifications.js.map +0 -1
  204. package/dist/development/src/plugins/element/anchors/withAnchors.cjs +0 -21
  205. package/dist/development/src/plugins/element/anchors/withAnchors.cjs.map +0 -1
  206. package/dist/development/src/plugins/element/anchors/withAnchors.js +0 -21
  207. package/dist/development/src/plugins/element/anchors/withAnchors.js.map +0 -1
  208. package/dist/development/src/plugins/element/headings/HeadingElement.cjs +0 -41
  209. package/dist/development/src/plugins/element/headings/HeadingElement.cjs.map +0 -1
  210. package/dist/development/src/plugins/element/headings/HeadingElement.js +0 -41
  211. package/dist/development/src/plugins/element/headings/HeadingElement.js.map +0 -1
  212. package/dist/development/src/plugins/element/headings/HeadingHtmlDeserializer.cjs +0 -22
  213. package/dist/development/src/plugins/element/headings/HeadingHtmlDeserializer.cjs.map +0 -1
  214. package/dist/development/src/plugins/element/headings/HeadingHtmlDeserializer.js +0 -22
  215. package/dist/development/src/plugins/element/headings/HeadingHtmlDeserializer.js.map +0 -1
  216. package/dist/development/src/plugins/element/headings/withHeadings.cjs +0 -70
  217. package/dist/development/src/plugins/element/headings/withHeadings.cjs.map +0 -1
  218. package/dist/development/src/plugins/element/headings/withHeadings.js +0 -70
  219. package/dist/development/src/plugins/element/headings/withHeadings.js.map +0 -1
  220. package/dist/development/src/plugins/element/horizonalRules/HorizontalRuleElement.cjs +0 -41
  221. package/dist/development/src/plugins/element/horizonalRules/HorizontalRuleElement.cjs.map +0 -1
  222. package/dist/development/src/plugins/element/horizonalRules/HorizontalRuleElement.js +0 -41
  223. package/dist/development/src/plugins/element/horizonalRules/HorizontalRuleElement.js.map +0 -1
  224. package/dist/development/src/plugins/element/horizonalRules/withHorizontalRules.cjs +0 -75
  225. package/dist/development/src/plugins/element/horizonalRules/withHorizontalRules.cjs.map +0 -1
  226. package/dist/development/src/plugins/element/horizonalRules/withHorizontalRules.js +0 -75
  227. package/dist/development/src/plugins/element/horizonalRules/withHorizontalRules.js.map +0 -1
  228. package/dist/development/src/plugins/element/lists/ListElement.cjs +0 -26
  229. package/dist/development/src/plugins/element/lists/ListElement.cjs.map +0 -1
  230. package/dist/development/src/plugins/element/lists/ListElement.js +0 -26
  231. package/dist/development/src/plugins/element/lists/ListElement.js.map +0 -1
  232. package/dist/development/src/plugins/element/lists/ListHtmlDeserializer.cjs +0 -98
  233. package/dist/development/src/plugins/element/lists/ListHtmlDeserializer.cjs.map +0 -1
  234. package/dist/development/src/plugins/element/lists/ListHtmlDeserializer.js +0 -98
  235. package/dist/development/src/plugins/element/lists/ListHtmlDeserializer.js.map +0 -1
  236. package/dist/development/src/plugins/element/lists/ListItemElement.cjs +0 -53
  237. package/dist/development/src/plugins/element/lists/ListItemElement.cjs.map +0 -1
  238. package/dist/development/src/plugins/element/lists/ListItemElement.js +0 -53
  239. package/dist/development/src/plugins/element/lists/ListItemElement.js.map +0 -1
  240. package/dist/development/src/plugins/element/lists/OrderedListElement.cjs +0 -25
  241. package/dist/development/src/plugins/element/lists/OrderedListElement.cjs.map +0 -1
  242. package/dist/development/src/plugins/element/lists/OrderedListElement.js +0 -25
  243. package/dist/development/src/plugins/element/lists/OrderedListElement.js.map +0 -1
  244. package/dist/development/src/plugins/element/lists/UnorderedListElement.cjs +0 -25
  245. package/dist/development/src/plugins/element/lists/UnorderedListElement.cjs.map +0 -1
  246. package/dist/development/src/plugins/element/lists/UnorderedListElement.js +0 -25
  247. package/dist/development/src/plugins/element/lists/UnorderedListElement.js.map +0 -1
  248. package/dist/development/src/plugins/element/lists/transforms/dedentListItem.cjs +0 -57
  249. package/dist/development/src/plugins/element/lists/transforms/dedentListItem.cjs.map +0 -1
  250. package/dist/development/src/plugins/element/lists/transforms/dedentListItem.js +0 -57
  251. package/dist/development/src/plugins/element/lists/transforms/dedentListItem.js.map +0 -1
  252. package/dist/development/src/plugins/element/lists/transforms/indentListItem.cjs +0 -57
  253. package/dist/development/src/plugins/element/lists/transforms/indentListItem.cjs.map +0 -1
  254. package/dist/development/src/plugins/element/lists/transforms/indentListItem.js +0 -57
  255. package/dist/development/src/plugins/element/lists/transforms/indentListItem.js.map +0 -1
  256. package/dist/development/src/plugins/element/lists/transforms/normalizeListElement.cjs +0 -22
  257. package/dist/development/src/plugins/element/lists/transforms/normalizeListElement.cjs.map +0 -1
  258. package/dist/development/src/plugins/element/lists/transforms/normalizeListElement.js +0 -22
  259. package/dist/development/src/plugins/element/lists/transforms/normalizeListElement.js.map +0 -1
  260. package/dist/development/src/plugins/element/lists/transforms/toggleListElement.cjs +0 -93
  261. package/dist/development/src/plugins/element/lists/transforms/toggleListElement.cjs.map +0 -1
  262. package/dist/development/src/plugins/element/lists/transforms/toggleListElement.js +0 -93
  263. package/dist/development/src/plugins/element/lists/transforms/toggleListElement.js.map +0 -1
  264. package/dist/development/src/plugins/element/lists/withLists.cjs +0 -153
  265. package/dist/development/src/plugins/element/lists/withLists.cjs.map +0 -1
  266. package/dist/development/src/plugins/element/lists/withLists.js +0 -153
  267. package/dist/development/src/plugins/element/lists/withLists.js.map +0 -1
  268. package/dist/development/src/plugins/element/paragraphs/ParagraphElement.cjs +0 -49
  269. package/dist/development/src/plugins/element/paragraphs/ParagraphElement.cjs.map +0 -1
  270. package/dist/development/src/plugins/element/paragraphs/ParagraphElement.js +0 -49
  271. package/dist/development/src/plugins/element/paragraphs/ParagraphElement.js.map +0 -1
  272. package/dist/development/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.cjs +0 -11
  273. package/dist/development/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.cjs.map +0 -1
  274. package/dist/development/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.js +0 -11
  275. package/dist/development/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.js.map +0 -1
  276. package/dist/development/src/plugins/element/paragraphs/withParagraphs.cjs +0 -58
  277. package/dist/development/src/plugins/element/paragraphs/withParagraphs.cjs.map +0 -1
  278. package/dist/development/src/plugins/element/paragraphs/withParagraphs.js +0 -58
  279. package/dist/development/src/plugins/element/paragraphs/withParagraphs.js.map +0 -1
  280. package/dist/development/src/plugins/element/scrollTargets/ScrollTargetElement.cjs +0 -51
  281. package/dist/development/src/plugins/element/scrollTargets/ScrollTargetElement.cjs.map +0 -1
  282. package/dist/development/src/plugins/element/scrollTargets/ScrollTargetElement.js +0 -51
  283. package/dist/development/src/plugins/element/scrollTargets/ScrollTargetElement.js.map +0 -1
  284. package/dist/development/src/plugins/element/scrollTargets/withScrollTargets.cjs +0 -9
  285. package/dist/development/src/plugins/element/scrollTargets/withScrollTargets.cjs.map +0 -1
  286. package/dist/development/src/plugins/element/scrollTargets/withScrollTargets.js +0 -9
  287. package/dist/development/src/plugins/element/scrollTargets/withScrollTargets.js.map +0 -1
  288. package/dist/development/src/plugins/element/tables/TableCellElement.cjs +0 -39
  289. package/dist/development/src/plugins/element/tables/TableCellElement.cjs.map +0 -1
  290. package/dist/development/src/plugins/element/tables/TableCellElement.js +0 -39
  291. package/dist/development/src/plugins/element/tables/TableCellElement.js.map +0 -1
  292. package/dist/development/src/plugins/element/tables/TableElement.cjs +0 -114
  293. package/dist/development/src/plugins/element/tables/TableElement.cjs.map +0 -1
  294. package/dist/development/src/plugins/element/tables/TableElement.js +0 -114
  295. package/dist/development/src/plugins/element/tables/TableElement.js.map +0 -1
  296. package/dist/development/src/plugins/element/tables/TableElementSelection.cjs +0 -20
  297. package/dist/development/src/plugins/element/tables/TableElementSelection.cjs.map +0 -1
  298. package/dist/development/src/plugins/element/tables/TableElementSelection.js +0 -20
  299. package/dist/development/src/plugins/element/tables/TableElementSelection.js.map +0 -1
  300. package/dist/development/src/plugins/element/tables/TableHtmlDeserializer.cjs +0 -36
  301. package/dist/development/src/plugins/element/tables/TableHtmlDeserializer.cjs.map +0 -1
  302. package/dist/development/src/plugins/element/tables/TableHtmlDeserializer.js +0 -36
  303. package/dist/development/src/plugins/element/tables/TableHtmlDeserializer.js.map +0 -1
  304. package/dist/development/src/plugins/element/tables/TableModifications.cjs +0 -134
  305. package/dist/development/src/plugins/element/tables/TableModifications.cjs.map +0 -1
  306. package/dist/development/src/plugins/element/tables/TableModifications.js +0 -134
  307. package/dist/development/src/plugins/element/tables/TableModifications.js.map +0 -1
  308. package/dist/development/src/plugins/element/tables/TableRowElement.cjs +0 -43
  309. package/dist/development/src/plugins/element/tables/TableRowElement.cjs.map +0 -1
  310. package/dist/development/src/plugins/element/tables/TableRowElement.js +0 -43
  311. package/dist/development/src/plugins/element/tables/TableRowElement.js.map +0 -1
  312. package/dist/development/src/plugins/element/tables/gaugeTableColumnCount.cjs +0 -25
  313. package/dist/development/src/plugins/element/tables/gaugeTableColumnCount.cjs.map +0 -1
  314. package/dist/development/src/plugins/element/tables/gaugeTableColumnCount.js +0 -25
  315. package/dist/development/src/plugins/element/tables/gaugeTableColumnCount.js.map +0 -1
  316. package/dist/development/src/plugins/element/tables/withTables.cjs +0 -283
  317. package/dist/development/src/plugins/element/tables/withTables.cjs.map +0 -1
  318. package/dist/development/src/plugins/element/tables/withTables.js +0 -283
  319. package/dist/development/src/plugins/element/tables/withTables.js.map +0 -1
  320. package/dist/development/src/plugins/text/bold/boldMark.cjs +0 -13
  321. package/dist/development/src/plugins/text/bold/boldMark.cjs.map +0 -1
  322. package/dist/development/src/plugins/text/bold/boldMark.js +0 -13
  323. package/dist/development/src/plugins/text/bold/boldMark.js.map +0 -1
  324. package/dist/development/src/plugins/text/bold/withBold.cjs +0 -16
  325. package/dist/development/src/plugins/text/bold/withBold.cjs.map +0 -1
  326. package/dist/development/src/plugins/text/bold/withBold.js +0 -16
  327. package/dist/development/src/plugins/text/bold/withBold.js.map +0 -1
  328. package/dist/development/src/plugins/text/code/codeMark.cjs +0 -13
  329. package/dist/development/src/plugins/text/code/codeMark.cjs.map +0 -1
  330. package/dist/development/src/plugins/text/code/codeMark.js +0 -13
  331. package/dist/development/src/plugins/text/code/codeMark.js.map +0 -1
  332. package/dist/development/src/plugins/text/code/withCode.cjs +0 -9
  333. package/dist/development/src/plugins/text/code/withCode.cjs.map +0 -1
  334. package/dist/development/src/plugins/text/code/withCode.js +0 -9
  335. package/dist/development/src/plugins/text/code/withCode.js.map +0 -1
  336. package/dist/development/src/plugins/text/highlight/highlightMark.cjs +0 -13
  337. package/dist/development/src/plugins/text/highlight/highlightMark.cjs.map +0 -1
  338. package/dist/development/src/plugins/text/highlight/highlightMark.js +0 -13
  339. package/dist/development/src/plugins/text/highlight/highlightMark.js.map +0 -1
  340. package/dist/development/src/plugins/text/highlight/withHighlight.cjs +0 -9
  341. package/dist/development/src/plugins/text/highlight/withHighlight.cjs.map +0 -1
  342. package/dist/development/src/plugins/text/highlight/withHighlight.js +0 -9
  343. package/dist/development/src/plugins/text/highlight/withHighlight.js.map +0 -1
  344. package/dist/development/src/plugins/text/italic/italicMark.cjs +0 -13
  345. package/dist/development/src/plugins/text/italic/italicMark.cjs.map +0 -1
  346. package/dist/development/src/plugins/text/italic/italicMark.js +0 -13
  347. package/dist/development/src/plugins/text/italic/italicMark.js.map +0 -1
  348. package/dist/development/src/plugins/text/italic/withItalic.cjs +0 -16
  349. package/dist/development/src/plugins/text/italic/withItalic.cjs.map +0 -1
  350. package/dist/development/src/plugins/text/italic/withItalic.js +0 -16
  351. package/dist/development/src/plugins/text/italic/withItalic.js.map +0 -1
  352. package/dist/development/src/plugins/text/newline/withNewline.cjs +0 -15
  353. package/dist/development/src/plugins/text/newline/withNewline.cjs.map +0 -1
  354. package/dist/development/src/plugins/text/newline/withNewline.js +0 -15
  355. package/dist/development/src/plugins/text/newline/withNewline.js.map +0 -1
  356. package/dist/development/src/plugins/text/strikeThrough/strikeThroughMark.cjs +0 -13
  357. package/dist/development/src/plugins/text/strikeThrough/strikeThroughMark.cjs.map +0 -1
  358. package/dist/development/src/plugins/text/strikeThrough/strikeThroughMark.js +0 -13
  359. package/dist/development/src/plugins/text/strikeThrough/strikeThroughMark.js.map +0 -1
  360. package/dist/development/src/plugins/text/strikeThrough/withStrikeThrough.cjs +0 -17
  361. package/dist/development/src/plugins/text/strikeThrough/withStrikeThrough.cjs.map +0 -1
  362. package/dist/development/src/plugins/text/strikeThrough/withStrikeThrough.js +0 -17
  363. package/dist/development/src/plugins/text/strikeThrough/withStrikeThrough.js.map +0 -1
  364. package/dist/development/src/plugins/text/underline/underlineMark.cjs +0 -13
  365. package/dist/development/src/plugins/text/underline/underlineMark.cjs.map +0 -1
  366. package/dist/development/src/plugins/text/underline/underlineMark.js +0 -13
  367. package/dist/development/src/plugins/text/underline/underlineMark.js.map +0 -1
  368. package/dist/development/src/plugins/text/underline/withUnderline.cjs +0 -17
  369. package/dist/development/src/plugins/text/underline/withUnderline.cjs.map +0 -1
  370. package/dist/development/src/plugins/text/underline/withUnderline.js +0 -17
  371. package/dist/development/src/plugins/text/underline/withUnderline.js.map +0 -1
  372. package/dist/development/src/slate-reexport.cjs +0 -10
  373. package/dist/development/src/slate-reexport.cjs.map +0 -1
  374. package/dist/development/src/slate-reexport.js +0 -8
  375. package/dist/development/src/slate-reexport.js.map +0 -1
  376. package/dist/production/index.cjs +0 -139
  377. package/dist/production/index.cjs.map +0 -1
  378. package/dist/production/index.js +0 -136
  379. package/dist/production/index.js.map +0 -1
  380. package/dist/production/src/components/RichTextEditor.cjs +0 -93
  381. package/dist/production/src/components/RichTextEditor.cjs.map +0 -1
  382. package/dist/production/src/components/RichTextEditor.js +0 -93
  383. package/dist/production/src/components/RichTextEditor.js.map +0 -1
  384. package/dist/production/src/components/triggers/EditorElementTrigger.cjs +0 -16
  385. package/dist/production/src/components/triggers/EditorElementTrigger.cjs.map +0 -1
  386. package/dist/production/src/components/triggers/EditorElementTrigger.js +0 -16
  387. package/dist/production/src/components/triggers/EditorElementTrigger.js.map +0 -1
  388. package/dist/production/src/components/triggers/EditorGenericTrigger.cjs +0 -20
  389. package/dist/production/src/components/triggers/EditorGenericTrigger.cjs.map +0 -1
  390. package/dist/production/src/components/triggers/EditorGenericTrigger.js +0 -20
  391. package/dist/production/src/components/triggers/EditorGenericTrigger.js.map +0 -1
  392. package/dist/production/src/components/triggers/EditorMarkTrigger.cjs +0 -16
  393. package/dist/production/src/components/triggers/EditorMarkTrigger.cjs.map +0 -1
  394. package/dist/production/src/components/triggers/EditorMarkTrigger.js +0 -16
  395. package/dist/production/src/components/triggers/EditorMarkTrigger.js.map +0 -1
  396. package/dist/production/src/components/triggers/EditorWrapNodeTrigger.cjs +0 -28
  397. package/dist/production/src/components/triggers/EditorWrapNodeTrigger.cjs.map +0 -1
  398. package/dist/production/src/components/triggers/EditorWrapNodeTrigger.js +0 -28
  399. package/dist/production/src/components/triggers/EditorWrapNodeTrigger.js.map +0 -1
  400. package/dist/production/src/editor/createEditor.cjs +0 -35
  401. package/dist/production/src/editor/createEditor.cjs.map +0 -1
  402. package/dist/production/src/editor/createEditor.js +0 -35
  403. package/dist/production/src/editor/createEditor.js.map +0 -1
  404. package/dist/production/src/editor/createEditorWithEssentials.cjs +0 -227
  405. package/dist/production/src/editor/createEditorWithEssentials.cjs.map +0 -1
  406. package/dist/production/src/editor/createEditorWithEssentials.js +0 -211
  407. package/dist/production/src/editor/createEditorWithEssentials.js.map +0 -1
  408. package/dist/production/src/editor/index.cjs +0 -44
  409. package/dist/production/src/editor/index.cjs.map +0 -1
  410. package/dist/production/src/editor/index.js +0 -44
  411. package/dist/production/src/editor/index.js.map +0 -1
  412. package/dist/production/src/editor/methods/addMarks.cjs +0 -12
  413. package/dist/production/src/editor/methods/addMarks.cjs.map +0 -1
  414. package/dist/production/src/editor/methods/addMarks.js +0 -12
  415. package/dist/production/src/editor/methods/addMarks.js.map +0 -1
  416. package/dist/production/src/editor/methods/canToggleMark.cjs +0 -7
  417. package/dist/production/src/editor/methods/canToggleMark.cjs.map +0 -1
  418. package/dist/production/src/editor/methods/canToggleMark.js +0 -7
  419. package/dist/production/src/editor/methods/canToggleMark.js.map +0 -1
  420. package/dist/production/src/editor/methods/closest.cjs +0 -18
  421. package/dist/production/src/editor/methods/closest.cjs.map +0 -1
  422. package/dist/production/src/editor/methods/closest.js +0 -18
  423. package/dist/production/src/editor/methods/closest.js.map +0 -1
  424. package/dist/production/src/editor/methods/closestBlockEntry.cjs +0 -10
  425. package/dist/production/src/editor/methods/closestBlockEntry.cjs.map +0 -1
  426. package/dist/production/src/editor/methods/closestBlockEntry.js +0 -10
  427. package/dist/production/src/editor/methods/closestBlockEntry.js.map +0 -1
  428. package/dist/production/src/editor/methods/closestViableBlockContainerEntry.cjs +0 -9
  429. package/dist/production/src/editor/methods/closestViableBlockContainerEntry.cjs.map +0 -1
  430. package/dist/production/src/editor/methods/closestViableBlockContainerEntry.js +0 -9
  431. package/dist/production/src/editor/methods/closestViableBlockContainerEntry.js.map +0 -1
  432. package/dist/production/src/editor/methods/ejectElement.cjs +0 -15
  433. package/dist/production/src/editor/methods/ejectElement.cjs.map +0 -1
  434. package/dist/production/src/editor/methods/ejectElement.js +0 -15
  435. package/dist/production/src/editor/methods/ejectElement.js.map +0 -1
  436. package/dist/production/src/editor/methods/elementToSpecifics.cjs +0 -8
  437. package/dist/production/src/editor/methods/elementToSpecifics.cjs.map +0 -1
  438. package/dist/production/src/editor/methods/elementToSpecifics.js +0 -8
  439. package/dist/production/src/editor/methods/elementToSpecifics.js.map +0 -1
  440. package/dist/production/src/editor/methods/getElementDataAttributes.cjs +0 -13
  441. package/dist/production/src/editor/methods/getElementDataAttributes.cjs.map +0 -1
  442. package/dist/production/src/editor/methods/getElementDataAttributes.js +0 -13
  443. package/dist/production/src/editor/methods/getElementDataAttributes.js.map +0 -1
  444. package/dist/production/src/editor/methods/getPreviousSibling.cjs +0 -13
  445. package/dist/production/src/editor/methods/getPreviousSibling.cjs.map +0 -1
  446. package/dist/production/src/editor/methods/getPreviousSibling.js +0 -13
  447. package/dist/production/src/editor/methods/getPreviousSibling.js.map +0 -1
  448. package/dist/production/src/editor/methods/hasMarks.cjs +0 -23
  449. package/dist/production/src/editor/methods/hasMarks.cjs.map +0 -1
  450. package/dist/production/src/editor/methods/hasMarks.js +0 -23
  451. package/dist/production/src/editor/methods/hasMarks.js.map +0 -1
  452. package/dist/production/src/editor/methods/hasParentOfType.cjs +0 -15
  453. package/dist/production/src/editor/methods/hasParentOfType.cjs.map +0 -1
  454. package/dist/production/src/editor/methods/hasParentOfType.js +0 -15
  455. package/dist/production/src/editor/methods/hasParentOfType.js.map +0 -1
  456. package/dist/production/src/editor/methods/isElementType.cjs +0 -24
  457. package/dist/production/src/editor/methods/isElementType.cjs.map +0 -1
  458. package/dist/production/src/editor/methods/isElementType.js +0 -24
  459. package/dist/production/src/editor/methods/isElementType.js.map +0 -1
  460. package/dist/production/src/editor/methods/permissivelyDeserializeNodes.cjs +0 -22
  461. package/dist/production/src/editor/methods/permissivelyDeserializeNodes.cjs.map +0 -1
  462. package/dist/production/src/editor/methods/permissivelyDeserializeNodes.js +0 -22
  463. package/dist/production/src/editor/methods/permissivelyDeserializeNodes.js.map +0 -1
  464. package/dist/production/src/editor/methods/removeMarks.cjs +0 -12
  465. package/dist/production/src/editor/methods/removeMarks.cjs.map +0 -1
  466. package/dist/production/src/editor/methods/removeMarks.js +0 -12
  467. package/dist/production/src/editor/methods/removeMarks.js.map +0 -1
  468. package/dist/production/src/editor/methods/serializeNodes.cjs +0 -15
  469. package/dist/production/src/editor/methods/serializeNodes.cjs.map +0 -1
  470. package/dist/production/src/editor/methods/serializeNodes.js +0 -15
  471. package/dist/production/src/editor/methods/serializeNodes.js.map +0 -1
  472. package/dist/production/src/editor/methods/strictlyDeserializeNodes.cjs +0 -14
  473. package/dist/production/src/editor/methods/strictlyDeserializeNodes.cjs.map +0 -1
  474. package/dist/production/src/editor/methods/strictlyDeserializeNodes.js +0 -14
  475. package/dist/production/src/editor/methods/strictlyDeserializeNodes.js.map +0 -1
  476. package/dist/production/src/editor/methods/textToSpecifics.cjs +0 -8
  477. package/dist/production/src/editor/methods/textToSpecifics.cjs.map +0 -1
  478. package/dist/production/src/editor/methods/textToSpecifics.js +0 -8
  479. package/dist/production/src/editor/methods/textToSpecifics.js.map +0 -1
  480. package/dist/production/src/editor/methods/toLatestFormat.cjs +0 -34
  481. package/dist/production/src/editor/methods/toLatestFormat.cjs.map +0 -1
  482. package/dist/production/src/editor/methods/toLatestFormat.js +0 -34
  483. package/dist/production/src/editor/methods/toLatestFormat.js.map +0 -1
  484. package/dist/production/src/editor/methods/topLevelNodes.cjs +0 -12
  485. package/dist/production/src/editor/methods/topLevelNodes.cjs.map +0 -1
  486. package/dist/production/src/editor/methods/topLevelNodes.js +0 -12
  487. package/dist/production/src/editor/methods/topLevelNodes.js.map +0 -1
  488. package/dist/production/src/internal/components/DefaultElement.cjs +0 -11
  489. package/dist/production/src/internal/components/DefaultElement.cjs.map +0 -1
  490. package/dist/production/src/internal/components/DefaultElement.js +0 -11
  491. package/dist/production/src/internal/components/DefaultElement.js.map +0 -1
  492. package/dist/production/src/internal/hooks/useRichTextFieldNodes.cjs +0 -28
  493. package/dist/production/src/internal/hooks/useRichTextFieldNodes.cjs.map +0 -1
  494. package/dist/production/src/internal/hooks/useRichTextFieldNodes.js +0 -28
  495. package/dist/production/src/internal/hooks/useRichTextFieldNodes.js.map +0 -1
  496. package/dist/production/src/internal/utils/EditorPasteUtils.cjs +0 -47
  497. package/dist/production/src/internal/utils/EditorPasteUtils.cjs.map +0 -1
  498. package/dist/production/src/internal/utils/EditorPasteUtils.js +0 -47
  499. package/dist/production/src/internal/utils/EditorPasteUtils.js.map +0 -1
  500. package/dist/production/src/internal/utils/parseUrl.cjs +0 -14
  501. package/dist/production/src/internal/utils/parseUrl.cjs.map +0 -1
  502. package/dist/production/src/internal/utils/parseUrl.js +0 -14
  503. package/dist/production/src/internal/utils/parseUrl.js.map +0 -1
  504. package/dist/production/src/plugins/attributes/alignment/alignButton.cjs +0 -21
  505. package/dist/production/src/plugins/attributes/alignment/alignButton.cjs.map +0 -1
  506. package/dist/production/src/plugins/attributes/alignment/alignButton.js +0 -21
  507. package/dist/production/src/plugins/attributes/alignment/alignButton.js.map +0 -1
  508. package/dist/production/src/plugins/behaviour/paste/HtmlDeserializer.cjs +0 -138
  509. package/dist/production/src/plugins/behaviour/paste/HtmlDeserializer.cjs.map +0 -1
  510. package/dist/production/src/plugins/behaviour/paste/HtmlDeserializer.js +0 -138
  511. package/dist/production/src/plugins/behaviour/paste/HtmlDeserializer.js.map +0 -1
  512. package/dist/production/src/plugins/behaviour/paste/createMarkHtmlDeserializer.cjs +0 -15
  513. package/dist/production/src/plugins/behaviour/paste/createMarkHtmlDeserializer.cjs.map +0 -1
  514. package/dist/production/src/plugins/behaviour/paste/createMarkHtmlDeserializer.js +0 -15
  515. package/dist/production/src/plugins/behaviour/paste/createMarkHtmlDeserializer.js.map +0 -1
  516. package/dist/production/src/plugins/behaviour/paste/withPaste.cjs +0 -24
  517. package/dist/production/src/plugins/behaviour/paste/withPaste.cjs.map +0 -1
  518. package/dist/production/src/plugins/behaviour/paste/withPaste.js +0 -24
  519. package/dist/production/src/plugins/behaviour/paste/withPaste.js.map +0 -1
  520. package/dist/production/src/plugins/element/anchors/AnchorElement.cjs +0 -44
  521. package/dist/production/src/plugins/element/anchors/AnchorElement.cjs.map +0 -1
  522. package/dist/production/src/plugins/element/anchors/AnchorElement.js +0 -44
  523. package/dist/production/src/plugins/element/anchors/AnchorElement.js.map +0 -1
  524. package/dist/production/src/plugins/element/anchors/AnchorHtmlDeserializer.cjs +0 -19
  525. package/dist/production/src/plugins/element/anchors/AnchorHtmlDeserializer.cjs.map +0 -1
  526. package/dist/production/src/plugins/element/anchors/AnchorHtmlDeserializer.js +0 -19
  527. package/dist/production/src/plugins/element/anchors/AnchorHtmlDeserializer.js.map +0 -1
  528. package/dist/production/src/plugins/element/anchors/AnchorModifications.cjs +0 -29
  529. package/dist/production/src/plugins/element/anchors/AnchorModifications.cjs.map +0 -1
  530. package/dist/production/src/plugins/element/anchors/AnchorModifications.js +0 -29
  531. package/dist/production/src/plugins/element/anchors/AnchorModifications.js.map +0 -1
  532. package/dist/production/src/plugins/element/anchors/withAnchors.cjs +0 -21
  533. package/dist/production/src/plugins/element/anchors/withAnchors.cjs.map +0 -1
  534. package/dist/production/src/plugins/element/anchors/withAnchors.js +0 -21
  535. package/dist/production/src/plugins/element/anchors/withAnchors.js.map +0 -1
  536. package/dist/production/src/plugins/element/headings/HeadingElement.cjs +0 -41
  537. package/dist/production/src/plugins/element/headings/HeadingElement.cjs.map +0 -1
  538. package/dist/production/src/plugins/element/headings/HeadingElement.js +0 -41
  539. package/dist/production/src/plugins/element/headings/HeadingElement.js.map +0 -1
  540. package/dist/production/src/plugins/element/headings/HeadingHtmlDeserializer.cjs +0 -22
  541. package/dist/production/src/plugins/element/headings/HeadingHtmlDeserializer.cjs.map +0 -1
  542. package/dist/production/src/plugins/element/headings/HeadingHtmlDeserializer.js +0 -22
  543. package/dist/production/src/plugins/element/headings/HeadingHtmlDeserializer.js.map +0 -1
  544. package/dist/production/src/plugins/element/headings/withHeadings.cjs +0 -70
  545. package/dist/production/src/plugins/element/headings/withHeadings.cjs.map +0 -1
  546. package/dist/production/src/plugins/element/headings/withHeadings.js +0 -70
  547. package/dist/production/src/plugins/element/headings/withHeadings.js.map +0 -1
  548. package/dist/production/src/plugins/element/horizonalRules/HorizontalRuleElement.cjs +0 -41
  549. package/dist/production/src/plugins/element/horizonalRules/HorizontalRuleElement.cjs.map +0 -1
  550. package/dist/production/src/plugins/element/horizonalRules/HorizontalRuleElement.js +0 -41
  551. package/dist/production/src/plugins/element/horizonalRules/HorizontalRuleElement.js.map +0 -1
  552. package/dist/production/src/plugins/element/horizonalRules/withHorizontalRules.cjs +0 -75
  553. package/dist/production/src/plugins/element/horizonalRules/withHorizontalRules.cjs.map +0 -1
  554. package/dist/production/src/plugins/element/horizonalRules/withHorizontalRules.js +0 -75
  555. package/dist/production/src/plugins/element/horizonalRules/withHorizontalRules.js.map +0 -1
  556. package/dist/production/src/plugins/element/lists/ListElement.cjs +0 -26
  557. package/dist/production/src/plugins/element/lists/ListElement.cjs.map +0 -1
  558. package/dist/production/src/plugins/element/lists/ListElement.js +0 -26
  559. package/dist/production/src/plugins/element/lists/ListElement.js.map +0 -1
  560. package/dist/production/src/plugins/element/lists/ListHtmlDeserializer.cjs +0 -98
  561. package/dist/production/src/plugins/element/lists/ListHtmlDeserializer.cjs.map +0 -1
  562. package/dist/production/src/plugins/element/lists/ListHtmlDeserializer.js +0 -98
  563. package/dist/production/src/plugins/element/lists/ListHtmlDeserializer.js.map +0 -1
  564. package/dist/production/src/plugins/element/lists/ListItemElement.cjs +0 -53
  565. package/dist/production/src/plugins/element/lists/ListItemElement.cjs.map +0 -1
  566. package/dist/production/src/plugins/element/lists/ListItemElement.js +0 -53
  567. package/dist/production/src/plugins/element/lists/ListItemElement.js.map +0 -1
  568. package/dist/production/src/plugins/element/lists/OrderedListElement.cjs +0 -25
  569. package/dist/production/src/plugins/element/lists/OrderedListElement.cjs.map +0 -1
  570. package/dist/production/src/plugins/element/lists/OrderedListElement.js +0 -25
  571. package/dist/production/src/plugins/element/lists/OrderedListElement.js.map +0 -1
  572. package/dist/production/src/plugins/element/lists/UnorderedListElement.cjs +0 -25
  573. package/dist/production/src/plugins/element/lists/UnorderedListElement.cjs.map +0 -1
  574. package/dist/production/src/plugins/element/lists/UnorderedListElement.js +0 -25
  575. package/dist/production/src/plugins/element/lists/UnorderedListElement.js.map +0 -1
  576. package/dist/production/src/plugins/element/lists/transforms/dedentListItem.cjs +0 -57
  577. package/dist/production/src/plugins/element/lists/transforms/dedentListItem.cjs.map +0 -1
  578. package/dist/production/src/plugins/element/lists/transforms/dedentListItem.js +0 -57
  579. package/dist/production/src/plugins/element/lists/transforms/dedentListItem.js.map +0 -1
  580. package/dist/production/src/plugins/element/lists/transforms/indentListItem.cjs +0 -57
  581. package/dist/production/src/plugins/element/lists/transforms/indentListItem.cjs.map +0 -1
  582. package/dist/production/src/plugins/element/lists/transforms/indentListItem.js +0 -57
  583. package/dist/production/src/plugins/element/lists/transforms/indentListItem.js.map +0 -1
  584. package/dist/production/src/plugins/element/lists/transforms/normalizeListElement.cjs +0 -22
  585. package/dist/production/src/plugins/element/lists/transforms/normalizeListElement.cjs.map +0 -1
  586. package/dist/production/src/plugins/element/lists/transforms/normalizeListElement.js +0 -22
  587. package/dist/production/src/plugins/element/lists/transforms/normalizeListElement.js.map +0 -1
  588. package/dist/production/src/plugins/element/lists/transforms/toggleListElement.cjs +0 -93
  589. package/dist/production/src/plugins/element/lists/transforms/toggleListElement.cjs.map +0 -1
  590. package/dist/production/src/plugins/element/lists/transforms/toggleListElement.js +0 -93
  591. package/dist/production/src/plugins/element/lists/transforms/toggleListElement.js.map +0 -1
  592. package/dist/production/src/plugins/element/lists/withLists.cjs +0 -153
  593. package/dist/production/src/plugins/element/lists/withLists.cjs.map +0 -1
  594. package/dist/production/src/plugins/element/lists/withLists.js +0 -153
  595. package/dist/production/src/plugins/element/lists/withLists.js.map +0 -1
  596. package/dist/production/src/plugins/element/paragraphs/ParagraphElement.cjs +0 -49
  597. package/dist/production/src/plugins/element/paragraphs/ParagraphElement.cjs.map +0 -1
  598. package/dist/production/src/plugins/element/paragraphs/ParagraphElement.js +0 -49
  599. package/dist/production/src/plugins/element/paragraphs/ParagraphElement.js.map +0 -1
  600. package/dist/production/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.cjs +0 -11
  601. package/dist/production/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.cjs.map +0 -1
  602. package/dist/production/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.js +0 -11
  603. package/dist/production/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.js.map +0 -1
  604. package/dist/production/src/plugins/element/paragraphs/withParagraphs.cjs +0 -58
  605. package/dist/production/src/plugins/element/paragraphs/withParagraphs.cjs.map +0 -1
  606. package/dist/production/src/plugins/element/paragraphs/withParagraphs.js +0 -58
  607. package/dist/production/src/plugins/element/paragraphs/withParagraphs.js.map +0 -1
  608. package/dist/production/src/plugins/element/scrollTargets/ScrollTargetElement.cjs +0 -51
  609. package/dist/production/src/plugins/element/scrollTargets/ScrollTargetElement.cjs.map +0 -1
  610. package/dist/production/src/plugins/element/scrollTargets/ScrollTargetElement.js +0 -51
  611. package/dist/production/src/plugins/element/scrollTargets/ScrollTargetElement.js.map +0 -1
  612. package/dist/production/src/plugins/element/scrollTargets/withScrollTargets.cjs +0 -9
  613. package/dist/production/src/plugins/element/scrollTargets/withScrollTargets.cjs.map +0 -1
  614. package/dist/production/src/plugins/element/scrollTargets/withScrollTargets.js +0 -9
  615. package/dist/production/src/plugins/element/scrollTargets/withScrollTargets.js.map +0 -1
  616. package/dist/production/src/plugins/element/tables/TableCellElement.cjs +0 -39
  617. package/dist/production/src/plugins/element/tables/TableCellElement.cjs.map +0 -1
  618. package/dist/production/src/plugins/element/tables/TableCellElement.js +0 -39
  619. package/dist/production/src/plugins/element/tables/TableCellElement.js.map +0 -1
  620. package/dist/production/src/plugins/element/tables/TableElement.cjs +0 -114
  621. package/dist/production/src/plugins/element/tables/TableElement.cjs.map +0 -1
  622. package/dist/production/src/plugins/element/tables/TableElement.js +0 -114
  623. package/dist/production/src/plugins/element/tables/TableElement.js.map +0 -1
  624. package/dist/production/src/plugins/element/tables/TableElementSelection.cjs +0 -20
  625. package/dist/production/src/plugins/element/tables/TableElementSelection.cjs.map +0 -1
  626. package/dist/production/src/plugins/element/tables/TableElementSelection.js +0 -20
  627. package/dist/production/src/plugins/element/tables/TableElementSelection.js.map +0 -1
  628. package/dist/production/src/plugins/element/tables/TableHtmlDeserializer.cjs +0 -36
  629. package/dist/production/src/plugins/element/tables/TableHtmlDeserializer.cjs.map +0 -1
  630. package/dist/production/src/plugins/element/tables/TableHtmlDeserializer.js +0 -36
  631. package/dist/production/src/plugins/element/tables/TableHtmlDeserializer.js.map +0 -1
  632. package/dist/production/src/plugins/element/tables/TableModifications.cjs +0 -134
  633. package/dist/production/src/plugins/element/tables/TableModifications.cjs.map +0 -1
  634. package/dist/production/src/plugins/element/tables/TableModifications.js +0 -134
  635. package/dist/production/src/plugins/element/tables/TableModifications.js.map +0 -1
  636. package/dist/production/src/plugins/element/tables/TableRowElement.cjs +0 -43
  637. package/dist/production/src/plugins/element/tables/TableRowElement.cjs.map +0 -1
  638. package/dist/production/src/plugins/element/tables/TableRowElement.js +0 -43
  639. package/dist/production/src/plugins/element/tables/TableRowElement.js.map +0 -1
  640. package/dist/production/src/plugins/element/tables/gaugeTableColumnCount.cjs +0 -25
  641. package/dist/production/src/plugins/element/tables/gaugeTableColumnCount.cjs.map +0 -1
  642. package/dist/production/src/plugins/element/tables/gaugeTableColumnCount.js +0 -25
  643. package/dist/production/src/plugins/element/tables/gaugeTableColumnCount.js.map +0 -1
  644. package/dist/production/src/plugins/element/tables/withTables.cjs +0 -283
  645. package/dist/production/src/plugins/element/tables/withTables.cjs.map +0 -1
  646. package/dist/production/src/plugins/element/tables/withTables.js +0 -283
  647. package/dist/production/src/plugins/element/tables/withTables.js.map +0 -1
  648. package/dist/production/src/plugins/text/bold/boldMark.cjs +0 -13
  649. package/dist/production/src/plugins/text/bold/boldMark.cjs.map +0 -1
  650. package/dist/production/src/plugins/text/bold/boldMark.js +0 -13
  651. package/dist/production/src/plugins/text/bold/boldMark.js.map +0 -1
  652. package/dist/production/src/plugins/text/bold/withBold.cjs +0 -16
  653. package/dist/production/src/plugins/text/bold/withBold.cjs.map +0 -1
  654. package/dist/production/src/plugins/text/bold/withBold.js +0 -16
  655. package/dist/production/src/plugins/text/bold/withBold.js.map +0 -1
  656. package/dist/production/src/plugins/text/code/codeMark.cjs +0 -13
  657. package/dist/production/src/plugins/text/code/codeMark.cjs.map +0 -1
  658. package/dist/production/src/plugins/text/code/codeMark.js +0 -13
  659. package/dist/production/src/plugins/text/code/codeMark.js.map +0 -1
  660. package/dist/production/src/plugins/text/code/withCode.cjs +0 -9
  661. package/dist/production/src/plugins/text/code/withCode.cjs.map +0 -1
  662. package/dist/production/src/plugins/text/code/withCode.js +0 -9
  663. package/dist/production/src/plugins/text/code/withCode.js.map +0 -1
  664. package/dist/production/src/plugins/text/highlight/highlightMark.cjs +0 -13
  665. package/dist/production/src/plugins/text/highlight/highlightMark.cjs.map +0 -1
  666. package/dist/production/src/plugins/text/highlight/highlightMark.js +0 -13
  667. package/dist/production/src/plugins/text/highlight/highlightMark.js.map +0 -1
  668. package/dist/production/src/plugins/text/highlight/withHighlight.cjs +0 -9
  669. package/dist/production/src/plugins/text/highlight/withHighlight.cjs.map +0 -1
  670. package/dist/production/src/plugins/text/highlight/withHighlight.js +0 -9
  671. package/dist/production/src/plugins/text/highlight/withHighlight.js.map +0 -1
  672. package/dist/production/src/plugins/text/italic/italicMark.cjs +0 -13
  673. package/dist/production/src/plugins/text/italic/italicMark.cjs.map +0 -1
  674. package/dist/production/src/plugins/text/italic/italicMark.js +0 -13
  675. package/dist/production/src/plugins/text/italic/italicMark.js.map +0 -1
  676. package/dist/production/src/plugins/text/italic/withItalic.cjs +0 -16
  677. package/dist/production/src/plugins/text/italic/withItalic.cjs.map +0 -1
  678. package/dist/production/src/plugins/text/italic/withItalic.js +0 -16
  679. package/dist/production/src/plugins/text/italic/withItalic.js.map +0 -1
  680. package/dist/production/src/plugins/text/newline/withNewline.cjs +0 -15
  681. package/dist/production/src/plugins/text/newline/withNewline.cjs.map +0 -1
  682. package/dist/production/src/plugins/text/newline/withNewline.js +0 -15
  683. package/dist/production/src/plugins/text/newline/withNewline.js.map +0 -1
  684. package/dist/production/src/plugins/text/strikeThrough/strikeThroughMark.cjs +0 -13
  685. package/dist/production/src/plugins/text/strikeThrough/strikeThroughMark.cjs.map +0 -1
  686. package/dist/production/src/plugins/text/strikeThrough/strikeThroughMark.js +0 -13
  687. package/dist/production/src/plugins/text/strikeThrough/strikeThroughMark.js.map +0 -1
  688. package/dist/production/src/plugins/text/strikeThrough/withStrikeThrough.cjs +0 -17
  689. package/dist/production/src/plugins/text/strikeThrough/withStrikeThrough.cjs.map +0 -1
  690. package/dist/production/src/plugins/text/strikeThrough/withStrikeThrough.js +0 -17
  691. package/dist/production/src/plugins/text/strikeThrough/withStrikeThrough.js.map +0 -1
  692. package/dist/production/src/plugins/text/underline/underlineMark.cjs +0 -13
  693. package/dist/production/src/plugins/text/underline/underlineMark.cjs.map +0 -1
  694. package/dist/production/src/plugins/text/underline/underlineMark.js +0 -13
  695. package/dist/production/src/plugins/text/underline/underlineMark.js.map +0 -1
  696. package/dist/production/src/plugins/text/underline/withUnderline.cjs +0 -17
  697. package/dist/production/src/plugins/text/underline/withUnderline.cjs.map +0 -1
  698. package/dist/production/src/plugins/text/underline/withUnderline.js +0 -17
  699. package/dist/production/src/plugins/text/underline/withUnderline.js.map +0 -1
  700. package/dist/production/src/slate-reexport.cjs +0 -10
  701. package/dist/production/src/slate-reexport.cjs.map +0 -1
  702. package/dist/production/src/slate-reexport.js +0 -8
  703. package/dist/production/src/slate-reexport.js.map +0 -1
  704. package/dist/types/components/RichTextEditor.d.ts +0 -13
  705. package/dist/types/components/RichTextEditor.d.ts.map +0 -1
  706. package/dist/types/components/index.d.ts +0 -3
  707. package/dist/types/components/index.d.ts.map +0 -1
  708. package/dist/types/components/triggers/EditorElementTrigger.d.ts +0 -8
  709. package/dist/types/components/triggers/EditorElementTrigger.d.ts.map +0 -1
  710. package/dist/types/components/triggers/EditorGenericTrigger.d.ts +0 -16
  711. package/dist/types/components/triggers/EditorGenericTrigger.d.ts.map +0 -1
  712. package/dist/types/components/triggers/EditorMarkTrigger.d.ts +0 -7
  713. package/dist/types/components/triggers/EditorMarkTrigger.d.ts.map +0 -1
  714. package/dist/types/components/triggers/EditorWrapNodeTrigger.d.ts +0 -11
  715. package/dist/types/components/triggers/EditorWrapNodeTrigger.d.ts.map +0 -1
  716. package/dist/types/components/triggers/index.d.ts +0 -5
  717. package/dist/types/components/triggers/index.d.ts.map +0 -1
  718. package/dist/types/editor/createEditor.d.ts +0 -24
  719. package/dist/types/editor/createEditor.d.ts.map +0 -1
  720. package/dist/types/editor/createEditorWithEssentials.d.ts +0 -5
  721. package/dist/types/editor/createEditorWithEssentials.d.ts.map +0 -1
  722. package/dist/types/editor/index.d.ts +0 -35
  723. package/dist/types/editor/index.d.ts.map +0 -1
  724. package/dist/types/editor/methods/addMarks.d.ts +0 -4
  725. package/dist/types/editor/methods/addMarks.d.ts.map +0 -1
  726. package/dist/types/editor/methods/canToggleMark.d.ts +0 -3
  727. package/dist/types/editor/methods/canToggleMark.d.ts.map +0 -1
  728. package/dist/types/editor/methods/closest.d.ts +0 -6
  729. package/dist/types/editor/methods/closest.d.ts.map +0 -1
  730. package/dist/types/editor/methods/closestBlockEntry.d.ts +0 -6
  731. package/dist/types/editor/methods/closestBlockEntry.d.ts.map +0 -1
  732. package/dist/types/editor/methods/closestViableBlockContainerEntry.d.ts +0 -6
  733. package/dist/types/editor/methods/closestViableBlockContainerEntry.d.ts.map +0 -1
  734. package/dist/types/editor/methods/ejectElement.d.ts +0 -3
  735. package/dist/types/editor/methods/ejectElement.d.ts.map +0 -1
  736. package/dist/types/editor/methods/elementToSpecifics.d.ts +0 -3
  737. package/dist/types/editor/methods/elementToSpecifics.d.ts.map +0 -1
  738. package/dist/types/editor/methods/getElementDataAttributes.d.ts +0 -7
  739. package/dist/types/editor/methods/getElementDataAttributes.d.ts.map +0 -1
  740. package/dist/types/editor/methods/getPreviousSibling.d.ts +0 -3
  741. package/dist/types/editor/methods/getPreviousSibling.d.ts.map +0 -1
  742. package/dist/types/editor/methods/hasMarks.d.ts +0 -7
  743. package/dist/types/editor/methods/hasMarks.d.ts.map +0 -1
  744. package/dist/types/editor/methods/hasParentOfType.d.ts +0 -3
  745. package/dist/types/editor/methods/hasParentOfType.d.ts.map +0 -1
  746. package/dist/types/editor/methods/index.d.ts +0 -20
  747. package/dist/types/editor/methods/index.d.ts.map +0 -1
  748. package/dist/types/editor/methods/isElementType.d.ts +0 -3
  749. package/dist/types/editor/methods/isElementType.d.ts.map +0 -1
  750. package/dist/types/editor/methods/permissivelyDeserializeNodes.d.ts +0 -3
  751. package/dist/types/editor/methods/permissivelyDeserializeNodes.d.ts.map +0 -1
  752. package/dist/types/editor/methods/removeMarks.d.ts +0 -4
  753. package/dist/types/editor/methods/removeMarks.d.ts.map +0 -1
  754. package/dist/types/editor/methods/serializeNodes.d.ts +0 -3
  755. package/dist/types/editor/methods/serializeNodes.d.ts.map +0 -1
  756. package/dist/types/editor/methods/strictlyDeserializeNodes.d.ts +0 -3
  757. package/dist/types/editor/methods/strictlyDeserializeNodes.d.ts.map +0 -1
  758. package/dist/types/editor/methods/textToSpecifics.d.ts +0 -4
  759. package/dist/types/editor/methods/textToSpecifics.d.ts.map +0 -1
  760. package/dist/types/editor/methods/toLatestFormat.d.ts +0 -4
  761. package/dist/types/editor/methods/toLatestFormat.d.ts.map +0 -1
  762. package/dist/types/editor/methods/topLevelNodes.d.ts +0 -3
  763. package/dist/types/editor/methods/topLevelNodes.d.ts.map +0 -1
  764. package/dist/types/index.d.ts +0 -7
  765. package/dist/types/index.d.ts.map +0 -1
  766. package/dist/types/internal/components/DefaultElement.d.ts +0 -6
  767. package/dist/types/internal/components/DefaultElement.d.ts.map +0 -1
  768. package/dist/types/internal/hooks/useRichTextFieldNodes.d.ts +0 -9
  769. package/dist/types/internal/hooks/useRichTextFieldNodes.d.ts.map +0 -1
  770. package/dist/types/internal/utils/EditorPasteUtils.d.ts +0 -7
  771. package/dist/types/internal/utils/EditorPasteUtils.d.ts.map +0 -1
  772. package/dist/types/internal/utils/index.d.ts +0 -3
  773. package/dist/types/internal/utils/index.d.ts.map +0 -1
  774. package/dist/types/internal/utils/parseIframeSrc.d.ts +0 -2
  775. package/dist/types/internal/utils/parseIframeSrc.d.ts.map +0 -1
  776. package/dist/types/internal/utils/parseUrl.d.ts +0 -2
  777. package/dist/types/internal/utils/parseUrl.d.ts.map +0 -1
  778. package/dist/types/plugins/attributes/alignment/alignButton.d.ts +0 -14
  779. package/dist/types/plugins/attributes/alignment/alignButton.d.ts.map +0 -1
  780. package/dist/types/plugins/attributes/alignment/index.d.ts +0 -2
  781. package/dist/types/plugins/attributes/alignment/index.d.ts.map +0 -1
  782. package/dist/types/plugins/attributes/index.d.ts +0 -2
  783. package/dist/types/plugins/attributes/index.d.ts.map +0 -1
  784. package/dist/types/plugins/behaviour/index.d.ts +0 -2
  785. package/dist/types/plugins/behaviour/index.d.ts.map +0 -1
  786. package/dist/types/plugins/behaviour/paste/HtmlDeserializer.d.ts +0 -34
  787. package/dist/types/plugins/behaviour/paste/HtmlDeserializer.d.ts.map +0 -1
  788. package/dist/types/plugins/behaviour/paste/createMarkHtmlDeserializer.d.ts +0 -3
  789. package/dist/types/plugins/behaviour/paste/createMarkHtmlDeserializer.d.ts.map +0 -1
  790. package/dist/types/plugins/behaviour/paste/index.d.ts +0 -3
  791. package/dist/types/plugins/behaviour/paste/index.d.ts.map +0 -1
  792. package/dist/types/plugins/behaviour/paste/withPaste.d.ts +0 -3
  793. package/dist/types/plugins/behaviour/paste/withPaste.d.ts.map +0 -1
  794. package/dist/types/plugins/element/anchors/AnchorElement.d.ts +0 -14
  795. package/dist/types/plugins/element/anchors/AnchorElement.d.ts.map +0 -1
  796. package/dist/types/plugins/element/anchors/AnchorHtmlDeserializer.d.ts +0 -3
  797. package/dist/types/plugins/element/anchors/AnchorHtmlDeserializer.d.ts.map +0 -1
  798. package/dist/types/plugins/element/anchors/AnchorModifications.d.ts +0 -6
  799. package/dist/types/plugins/element/anchors/AnchorModifications.d.ts.map +0 -1
  800. package/dist/types/plugins/element/anchors/index.d.ts +0 -4
  801. package/dist/types/plugins/element/anchors/index.d.ts.map +0 -1
  802. package/dist/types/plugins/element/anchors/withAnchors.d.ts +0 -7
  803. package/dist/types/plugins/element/anchors/withAnchors.d.ts.map +0 -1
  804. package/dist/types/plugins/element/headings/HeadingElement.d.ts +0 -17
  805. package/dist/types/plugins/element/headings/HeadingElement.d.ts.map +0 -1
  806. package/dist/types/plugins/element/headings/HeadingHtmlDeserializer.d.ts +0 -3
  807. package/dist/types/plugins/element/headings/HeadingHtmlDeserializer.d.ts.map +0 -1
  808. package/dist/types/plugins/element/headings/index.d.ts +0 -4
  809. package/dist/types/plugins/element/headings/index.d.ts.map +0 -1
  810. package/dist/types/plugins/element/headings/withHeadings.d.ts +0 -7
  811. package/dist/types/plugins/element/headings/withHeadings.d.ts.map +0 -1
  812. package/dist/types/plugins/element/horizonalRules/HorizontalRuleElement.d.ts +0 -13
  813. package/dist/types/plugins/element/horizonalRules/HorizontalRuleElement.d.ts.map +0 -1
  814. package/dist/types/plugins/element/horizonalRules/index.d.ts +0 -3
  815. package/dist/types/plugins/element/horizonalRules/index.d.ts.map +0 -1
  816. package/dist/types/plugins/element/horizonalRules/withHorizontalRules.d.ts +0 -7
  817. package/dist/types/plugins/element/horizonalRules/withHorizontalRules.d.ts.map +0 -1
  818. package/dist/types/plugins/element/index.d.ts +0 -8
  819. package/dist/types/plugins/element/index.d.ts.map +0 -1
  820. package/dist/types/plugins/element/lists/ListElement.d.ts +0 -6
  821. package/dist/types/plugins/element/lists/ListElement.d.ts.map +0 -1
  822. package/dist/types/plugins/element/lists/ListHtmlDeserializer.d.ts +0 -10
  823. package/dist/types/plugins/element/lists/ListHtmlDeserializer.d.ts.map +0 -1
  824. package/dist/types/plugins/element/lists/ListItemElement.d.ts +0 -12
  825. package/dist/types/plugins/element/lists/ListItemElement.d.ts.map +0 -1
  826. package/dist/types/plugins/element/lists/OrderedListElement.d.ts +0 -12
  827. package/dist/types/plugins/element/lists/OrderedListElement.d.ts.map +0 -1
  828. package/dist/types/plugins/element/lists/UnorderedListElement.d.ts +0 -12
  829. package/dist/types/plugins/element/lists/UnorderedListElement.d.ts.map +0 -1
  830. package/dist/types/plugins/element/lists/index.d.ts +0 -6
  831. package/dist/types/plugins/element/lists/index.d.ts.map +0 -1
  832. package/dist/types/plugins/element/lists/transforms/dedentListItem.d.ts +0 -4
  833. package/dist/types/plugins/element/lists/transforms/dedentListItem.d.ts.map +0 -1
  834. package/dist/types/plugins/element/lists/transforms/indentListItem.d.ts +0 -4
  835. package/dist/types/plugins/element/lists/transforms/indentListItem.d.ts.map +0 -1
  836. package/dist/types/plugins/element/lists/transforms/index.d.ts +0 -5
  837. package/dist/types/plugins/element/lists/transforms/index.d.ts.map +0 -1
  838. package/dist/types/plugins/element/lists/transforms/normalizeListElement.d.ts +0 -7
  839. package/dist/types/plugins/element/lists/transforms/normalizeListElement.d.ts.map +0 -1
  840. package/dist/types/plugins/element/lists/transforms/toggleListElement.d.ts +0 -5
  841. package/dist/types/plugins/element/lists/transforms/toggleListElement.d.ts.map +0 -1
  842. package/dist/types/plugins/element/lists/withLists.d.ts +0 -11
  843. package/dist/types/plugins/element/lists/withLists.d.ts.map +0 -1
  844. package/dist/types/plugins/element/paragraphs/ParagraphElement.d.ts +0 -15
  845. package/dist/types/plugins/element/paragraphs/ParagraphElement.d.ts.map +0 -1
  846. package/dist/types/plugins/element/paragraphs/ParagraphHtmlDeserializer.d.ts +0 -3
  847. package/dist/types/plugins/element/paragraphs/ParagraphHtmlDeserializer.d.ts.map +0 -1
  848. package/dist/types/plugins/element/paragraphs/index.d.ts +0 -4
  849. package/dist/types/plugins/element/paragraphs/index.d.ts.map +0 -1
  850. package/dist/types/plugins/element/paragraphs/withParagraphs.d.ts +0 -7
  851. package/dist/types/plugins/element/paragraphs/withParagraphs.d.ts.map +0 -1
  852. package/dist/types/plugins/element/scrollTargets/ScrollTargetElement.d.ts +0 -14
  853. package/dist/types/plugins/element/scrollTargets/ScrollTargetElement.d.ts.map +0 -1
  854. package/dist/types/plugins/element/scrollTargets/index.d.ts +0 -3
  855. package/dist/types/plugins/element/scrollTargets/index.d.ts.map +0 -1
  856. package/dist/types/plugins/element/scrollTargets/withScrollTargets.d.ts +0 -7
  857. package/dist/types/plugins/element/scrollTargets/withScrollTargets.d.ts.map +0 -1
  858. package/dist/types/plugins/element/tables/TableCellElement.d.ts +0 -20
  859. package/dist/types/plugins/element/tables/TableCellElement.d.ts.map +0 -1
  860. package/dist/types/plugins/element/tables/TableElement.d.ts +0 -26
  861. package/dist/types/plugins/element/tables/TableElement.d.ts.map +0 -1
  862. package/dist/types/plugins/element/tables/TableElementSelection.d.ts +0 -6
  863. package/dist/types/plugins/element/tables/TableElementSelection.d.ts.map +0 -1
  864. package/dist/types/plugins/element/tables/TableHtmlDeserializer.d.ts +0 -3
  865. package/dist/types/plugins/element/tables/TableHtmlDeserializer.d.ts.map +0 -1
  866. package/dist/types/plugins/element/tables/TableModifications.d.ts +0 -14
  867. package/dist/types/plugins/element/tables/TableModifications.d.ts.map +0 -1
  868. package/dist/types/plugins/element/tables/TableRowElement.d.ts +0 -22
  869. package/dist/types/plugins/element/tables/TableRowElement.d.ts.map +0 -1
  870. package/dist/types/plugins/element/tables/gaugeTableColumnCount.d.ts +0 -3
  871. package/dist/types/plugins/element/tables/gaugeTableColumnCount.d.ts.map +0 -1
  872. package/dist/types/plugins/element/tables/index.d.ts +0 -6
  873. package/dist/types/plugins/element/tables/index.d.ts.map +0 -1
  874. package/dist/types/plugins/element/tables/withTables.d.ts +0 -11
  875. package/dist/types/plugins/element/tables/withTables.d.ts.map +0 -1
  876. package/dist/types/plugins/index.d.ts +0 -5
  877. package/dist/types/plugins/index.d.ts.map +0 -1
  878. package/dist/types/plugins/text/bold/boldMark.d.ts +0 -4
  879. package/dist/types/plugins/text/bold/boldMark.d.ts.map +0 -1
  880. package/dist/types/plugins/text/bold/index.d.ts +0 -3
  881. package/dist/types/plugins/text/bold/index.d.ts.map +0 -1
  882. package/dist/types/plugins/text/bold/withBold.d.ts +0 -3
  883. package/dist/types/plugins/text/bold/withBold.d.ts.map +0 -1
  884. package/dist/types/plugins/text/code/codeMark.d.ts +0 -4
  885. package/dist/types/plugins/text/code/codeMark.d.ts.map +0 -1
  886. package/dist/types/plugins/text/code/index.d.ts +0 -3
  887. package/dist/types/plugins/text/code/index.d.ts.map +0 -1
  888. package/dist/types/plugins/text/code/withCode.d.ts +0 -3
  889. package/dist/types/plugins/text/code/withCode.d.ts.map +0 -1
  890. package/dist/types/plugins/text/highlight/highlightMark.d.ts +0 -4
  891. package/dist/types/plugins/text/highlight/highlightMark.d.ts.map +0 -1
  892. package/dist/types/plugins/text/highlight/index.d.ts +0 -3
  893. package/dist/types/plugins/text/highlight/index.d.ts.map +0 -1
  894. package/dist/types/plugins/text/highlight/withHighlight.d.ts +0 -3
  895. package/dist/types/plugins/text/highlight/withHighlight.d.ts.map +0 -1
  896. package/dist/types/plugins/text/index.d.ts +0 -8
  897. package/dist/types/plugins/text/index.d.ts.map +0 -1
  898. package/dist/types/plugins/text/italic/index.d.ts +0 -3
  899. package/dist/types/plugins/text/italic/index.d.ts.map +0 -1
  900. package/dist/types/plugins/text/italic/italicMark.d.ts +0 -4
  901. package/dist/types/plugins/text/italic/italicMark.d.ts.map +0 -1
  902. package/dist/types/plugins/text/italic/withItalic.d.ts +0 -3
  903. package/dist/types/plugins/text/italic/withItalic.d.ts.map +0 -1
  904. package/dist/types/plugins/text/newline/index.d.ts +0 -2
  905. package/dist/types/plugins/text/newline/index.d.ts.map +0 -1
  906. package/dist/types/plugins/text/newline/withNewline.d.ts +0 -3
  907. package/dist/types/plugins/text/newline/withNewline.d.ts.map +0 -1
  908. package/dist/types/plugins/text/strikeThrough/index.d.ts +0 -3
  909. package/dist/types/plugins/text/strikeThrough/index.d.ts.map +0 -1
  910. package/dist/types/plugins/text/strikeThrough/strikeThroughMark.d.ts +0 -4
  911. package/dist/types/plugins/text/strikeThrough/strikeThroughMark.d.ts.map +0 -1
  912. package/dist/types/plugins/text/strikeThrough/withStrikeThrough.d.ts +0 -3
  913. package/dist/types/plugins/text/strikeThrough/withStrikeThrough.d.ts.map +0 -1
  914. package/dist/types/plugins/text/underline/index.d.ts +0 -3
  915. package/dist/types/plugins/text/underline/index.d.ts.map +0 -1
  916. package/dist/types/plugins/text/underline/underlineMark.d.ts +0 -4
  917. package/dist/types/plugins/text/underline/underlineMark.d.ts.map +0 -1
  918. package/dist/types/plugins/text/underline/withUnderline.d.ts +0 -3
  919. package/dist/types/plugins/text/underline/withUnderline.d.ts.map +0 -1
  920. package/dist/types/slate-reexport.d.ts +0 -3
  921. package/dist/types/slate-reexport.d.ts.map +0 -1
  922. package/dist/types/slate-types.d.ts +0 -31
  923. package/dist/types/slate-types.d.ts.map +0 -1
  924. package/dist/types/tsconfig.tsbuildinfo +0 -1
  925. package/dist/types/types/editor.d.ts +0 -43
  926. package/dist/types/types/editor.d.ts.map +0 -1
  927. package/dist/types/types/htmlDeserializer.d.ts +0 -38
  928. package/dist/types/types/htmlDeserializer.d.ts.map +0 -1
  929. package/dist/types/types/index.d.ts +0 -4
  930. package/dist/types/types/index.d.ts.map +0 -1
  931. package/dist/types/types/plugins.d.ts +0 -58
  932. package/dist/types/types/plugins.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"withTables.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/tables/withTables.ts"],"sourcesContent":["import { Editor, Element, Node as SlateNode, NodeEntry, Path as SlatePath, Point, Range as SlateRange, Text, Transforms } from 'slate'\nimport { ContemberEditor } from '../../../editor'\nimport { isTableCellElement, TableCellElement, tableCellElementPlugin } from './TableCellElement'\nimport { getTableElementColumnCount, getTableElementRowCount, isTableElement, TableElement, tableElementPlugin } from './TableElement'\nimport { getTableCellCoordinates, selectTableCellContents } from './TableElementSelection'\nimport { tableHTMLDeserializer } from './TableHtmlDeserializer'\nimport { TableModifications } from './TableModifications'\nimport { isTableRowElement, TableRowElement, tableRowElementPlugin } from './TableRowElement'\nimport { ElementRenderer } from '../../../types'\n\nexport const withTables = ({ renderTable, renderTableCell, renderTableRow }: {\n\trenderTable: ElementRenderer<TableElement>\n\trenderTableCell: ElementRenderer<TableCellElement>\n\trenderTableRow: ElementRenderer<TableRowElement>\n}) => <E extends Editor>(editor: E): E => {\n\tconst {\n\t\tdeleteForward,\n\t\tdeleteBackward,\n\t\tdeleteFragment,\n\t\tinsertBreak,\n\t\tonKeyDown,\n\t} = editor\n\n\teditor.registerElement(tableElementPlugin({ render: renderTable }))\n\teditor.registerElement(tableCellElementPlugin({ render: renderTableCell }))\n\teditor.registerElement(tableRowElementPlugin({ render: renderTableRow }))\n\n\teditor.htmlDeserializer.registerPlugin(tableHTMLDeserializer)\n\n\tObject.assign<Editor, Partial<Editor>>(editor, {\n\t\tinsertBreak: () => {\n\t\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor)\n\t\t\tif (closestBlockEntry && isTableCellElement(closestBlockEntry[0])) {\n\t\t\t\tconst selection = editor.selection\n\t\t\t\tconst [, closestBlockPath] = closestBlockEntry\n\t\t\t\tconst [cellStart, cellEnd] = Editor.edges(editor, closestBlockPath)\n\n\t\t\t\tif (!selection) {\n\t\t\t\t\treturn insertBreak()\n\t\t\t\t}\n\n\t\t\t\treturn Editor.withoutNormalizing(editor, () => {\n\t\t\t\t\tTransforms.wrapNodes(editor, editor.createDefaultElement([]), {\n\t\t\t\t\t\tat: {\n\t\t\t\t\t\t\tanchor: cellStart,\n\t\t\t\t\t\t\tfocus: cellEnd,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmatch: node => Text.isText(node) || (Element.isElement(node) && editor.isInline(node)),\n\t\t\t\t\t})\n\n\t\t\t\t\tconst relative = SlatePath.relative(selection.focus.path, closestBlockPath)\n\t\t\t\t\tTransforms.splitNodes(editor, {\n\t\t\t\t\t\t// The zero should be the newly created default element.\n\t\t\t\t\t\tat: {\n\t\t\t\t\t\t\tpath: [...closestBlockPath, 0, ...relative],\n\t\t\t\t\t\t\toffset: selection.focus.offset,\n\t\t\t\t\t\t},\n\t\t\t\t\t\talways: true,\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}\n\t\t\tinsertBreak()\n\t\t},\n\t\tdeleteBackward: unit => {\n\t\t\tconst selection = editor.selection\n\t\t\tif (selection && SlateRange.isCollapsed(selection)) {\n\t\t\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor)\n\t\t\t\tif (\n\t\t\t\t\tclosestBlockEntry &&\n\t\t\t\t\tisTableCellElement(closestBlockEntry[0]) &&\n\t\t\t\t\tPoint.equals(selection.focus, Editor.start(editor, closestBlockEntry[1]))\n\t\t\t\t) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\tdeleteBackward(unit)\n\t\t},\n\t\tdeleteForward: unit => {\n\t\t\tconst selection = editor.selection\n\t\t\tif (selection && SlateRange.isCollapsed(selection)) {\n\t\t\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor)\n\t\t\t\tif (\n\t\t\t\t\tclosestBlockEntry &&\n\t\t\t\t\tisTableCellElement(closestBlockEntry[0]) &&\n\t\t\t\t\tPoint.equals(selection.focus, Editor.end(editor, closestBlockEntry[1]))\n\t\t\t\t) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\tdeleteForward(unit)\n\t\t},\n\t\tdeleteFragment: () => {\n\t\t\tconst selection = editor.selection\n\t\t\tif (!selection || SlateRange.isCollapsed(selection)) {\n\t\t\t\treturn deleteFragment()\n\t\t\t}\n\t\t\tconst lowestCommonAncestorPath = SlatePath.common(selection.anchor.path, selection.focus.path)\n\t\t\tconst [lowestCommonAncestor] = Editor.node(editor, lowestCommonAncestorPath)\n\n\t\t\tif (isTableElement(lowestCommonAncestor) || isTableRowElement(lowestCommonAncestor)) {\n\t\t\t\treturn // TODO nope for now\n\t\t\t}\n\t\t\tdeleteFragment()\n\t\t},\n\t\tonKeyDown: event => {\n\t\t\tconst selection = editor.selection\n\t\t\tif (\n\t\t\t\t!selection ||\n\t\t\t\t!(\n\t\t\t\t\tevent.key === 'Tab' ||\n\t\t\t\t\tevent.key === 'ArrowUp' ||\n\t\t\t\t\tevent.key === 'ArrowRight' ||\n\t\t\t\t\tevent.key === 'ArrowDown' ||\n\t\t\t\t\tevent.key === 'ArrowLeft' ||\n\t\t\t\t\tevent.key === 'Enter' ||\n\t\t\t\t\tevent.key === 'Backspace'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn onKeyDown(event)\n\t\t\t}\n\t\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor, { at: selection })\n\n\t\t\tif (!closestBlockEntry) {\n\t\t\t\treturn onKeyDown(event)\n\t\t\t}\n\t\t\tlet cellElement: TableCellElement\n\t\t\tlet cellPath: SlatePath\n\n\t\t\tif (!isTableCellElement(closestBlockEntry[0])) {\n\t\t\t\tconst parent = SlateNode.parent(editor, closestBlockEntry[1])\n\t\t\t\tif (Element.isElement(closestBlockEntry[0]) && editor.isDefaultElement(closestBlockEntry[0]) && isTableCellElement(parent)) {\n\t\t\t\t\tcellElement = parent\n\t\t\t\t\tcellPath = SlatePath.parent(closestBlockEntry[1])\n\t\t\t\t} else {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t[cellElement, cellPath] = closestBlockEntry\n\t\t\t}\n\t\t\tif (cellPath.length < 3) {\n\t\t\t\treturn onKeyDown(event)\n\t\t\t}\n\t\t\tconst [rowIndex, columnIndex] = getTableCellCoordinates(editor, cellElement)\n\t\t\tconst tablePath = cellPath.slice(0, -2)\n\t\t\tconst tableElement = SlateNode.get(editor, tablePath) as TableElement\n\t\t\tconst rowCount = getTableElementRowCount(tableElement)\n\t\t\tconst columnCount = getTableElementColumnCount(tableElement)\n\n\t\t\tif (rowCount === 0 || columnCount === 0) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst moveSelectionBeforeTable = () => {\n\t\t\t\tconst pointBeforeTable = Editor.before(editor, tablePath)\n\t\t\t\tif (!pointBeforeTable) {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t\tevent.preventDefault()\n\t\t\t\treturn Transforms.select(editor, pointBeforeTable)\n\t\t\t}\n\t\t\tconst moveSelectionAfterTable = () => {\n\t\t\t\tconst pointAfterTable = Editor.after(editor, tablePath)\n\t\t\t\tif (!pointAfterTable) {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t\tevent.preventDefault()\n\t\t\t\treturn Transforms.select(editor, pointAfterTable)\n\t\t\t}\n\n\t\t\tif (event.key === 'Tab') {\n\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\t// Moving backwards\n\t\t\t\t\tif (columnIndex > 0) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn selectTableCellContents(editor, tablePath, rowIndex, columnIndex - 1)\n\t\t\t\t\t} else if (columnIndex === 0) {\n\t\t\t\t\t\tif (rowIndex > 0) {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\treturn selectTableCellContents(editor, tablePath, rowIndex - 1, columnCount - 1)\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Moving forwards\n\t\t\t\t\tif (columnIndex < columnCount - 1) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn selectTableCellContents(editor, tablePath, rowIndex, columnIndex + 1)\n\t\t\t\t\t} else if (columnIndex === columnCount - 1) {\n\t\t\t\t\t\t// We're at the right edge of the table\n\t\t\t\t\t\tif (rowIndex < rowCount - 1) {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\treturn selectTableCellContents(editor, tablePath, rowIndex + 1, 0)\n\t\t\t\t\t\t} else if (rowIndex === rowCount - 1) {\n\t\t\t\t\t\t\treturn moveSelectionAfterTable()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (event.key === 'ArrowLeft') {\n\t\t\t\tif (!SlateRange.isCollapsed(selection)) {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t\tif (Point.equals(selection.focus, Editor.start(editor, cellPath))) {\n\t\t\t\t\tif (columnIndex > 0) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn Transforms.select(editor, Editor.end(editor, [...tablePath, rowIndex, columnIndex - 1]))\n\t\t\t\t\t} else if (columnIndex === 0) {\n\t\t\t\t\t\tif (rowIndex > 0) {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\treturn Transforms.select(editor, Editor.end(editor, [...tablePath, rowIndex - 1, columnCount - 1]))\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (event.key === 'ArrowRight') {\n\t\t\t\tif (!SlateRange.isCollapsed(selection)) {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t\tif (Point.equals(selection.focus, Editor.end(editor, cellPath))) {\n\t\t\t\t\tif (columnIndex < columnCount - 1) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn Transforms.select(editor, Editor.start(editor, [...tablePath, rowIndex, columnIndex + 1]))\n\t\t\t\t\t} else if (columnIndex === columnCount - 1) {\n\t\t\t\t\t\tif (rowIndex < rowCount - 1) {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\treturn Transforms.select(editor, Editor.start(editor, [...tablePath, rowIndex + 1, 0]))\n\t\t\t\t\t\t} else if (rowIndex === rowCount - 1) {\n\t\t\t\t\t\t\treturn moveSelectionAfterTable()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n\t\t\t\tconst withinDefault = editor.isDefaultElement(closestBlockEntry[0])\n\t\t\t\tif (withinDefault) {\n\t\t\t\t\tconst relative = SlatePath.relative(closestBlockEntry[1], cellPath)\n\t\t\t\t\tconst defaultIndex = relative[0]\n\t\t\t\t\tif (\n\t\t\t\t\t\t(event.key === 'ArrowUp' && defaultIndex !== 0) ||\n\t\t\t\t\t\t(event.key === 'ArrowDown' && defaultIndex !== cellElement.children.length - 1)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (event.key === 'ArrowUp') {\n\t\t\t\t\tif (rowIndex > 0) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\tconst rowAboveEndPoint = Editor.end(editor, [...tablePath, rowIndex - 1, columnIndex])\n\n\t\t\t\t\t\tif (!SlateRange.isCollapsed(selection)) {\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowAboveEndPoint)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst minOffset = Math.min(selection.focus.offset, rowAboveEndPoint.offset)\n\t\t\t\t\t\treturn Transforms.select(editor, {\n\t\t\t\t\t\t\tpath: rowAboveEndPoint.path,\n\t\t\t\t\t\t\toffset: minOffset,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t} else if (event.key === 'ArrowDown') {\n\t\t\t\t\tif (rowIndex < rowCount - 1) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\tconst rowBelowStatPoint = Editor.start(editor, [...tablePath, rowIndex + 1, columnIndex])\n\n\t\t\t\t\t\tif (!SlateRange.isCollapsed(selection)) {\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowBelowStatPoint)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst [rowBelowStatPointNode] = Editor.node(editor, rowBelowStatPoint) as NodeEntry<Text>\n\n\t\t\t\t\t\treturn Transforms.select(editor, {\n\t\t\t\t\t\t\tpath: rowBelowStatPoint.path,\n\t\t\t\t\t\t\toffset: Math.min(selection.focus.offset, rowBelowStatPointNode.text.length),\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\treturn moveSelectionAfterTable()\n\t\t\t\t}\n\t\t\t} else if (event.ctrlKey || event.metaKey) {\n\t\t\t\tif (event.key === 'Backspace') {\n\t\t\t\t\tevent.preventDefault()\n\n\t\t\t\t\tif (event.altKey) {\n\t\t\t\t\t\tTableModifications.deleteTableColumn(editor, tableElement, columnIndex)\n\n\t\t\t\t\t\tif (columnCount > 1) {\n\t\t\t\t\t\t\tconst columnBefore = Editor.start(editor, [...tablePath, rowIndex, Math.max(0, columnIndex - 1)])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, columnBefore)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTableModifications.deleteTableRow(editor, tableElement, rowIndex)\n\n\t\t\t\t\t\tif (rowCount > 1) {\n\t\t\t\t\t\t\tconst rowAbove = Editor.start(editor, [...tablePath, Math.max(0, rowIndex - 1), columnIndex])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowAbove)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'Enter') {\n\t\t\t\t\tevent.preventDefault()\n\n\t\t\t\t\tif (event.altKey) {\n\t\t\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\t\t\tTableModifications.addTableColumn(editor, tableElement, columnIndex)\n\t\t\t\t\t\t\tconst columnBefore = Editor.start(editor, [...tablePath, rowIndex, Math.max(0, columnIndex)])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, columnBefore)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tTableModifications.addTableColumn(editor, tableElement, columnIndex + 1)\n\t\t\t\t\t\t\tconst columnAfter = Editor.start(editor, [...tablePath, rowIndex, columnIndex + 1])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, columnAfter)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\t\t\tTableModifications.addTableRow(editor, tableElement, rowIndex)\n\t\t\t\t\t\t\tconst rowAbove = Editor.start(editor, [...tablePath, Math.max(0, rowIndex), columnIndex])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowAbove)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tTableModifications.addTableRow(editor, tableElement, rowIndex + 1)\n\t\t\t\t\t\t\tconst rowBelowStat = Editor.start(editor, [...tablePath, rowIndex + 1, columnIndex])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowBelowStat)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tonKeyDown(event)\n\t\t},\n\n\t})\n\n\treturn editor\n}\n"],"names":["tableElementPlugin","tableCellElementPlugin","tableRowElementPlugin","tableHTMLDeserializer","ContemberEditor","isTableCellElement","Editor","Transforms","Text","Element","SlatePath","SlateRange","Point","isTableElement","isTableRowElement","SlateNode","getTableCellCoordinates","getTableElementRowCount","getTableElementColumnCount","selectTableCellContents","TableModifications"],"mappings":";;;;;;;;;;AAUa,MAAA,aAAa,CAAC,EAAE,aAAa,iBAAiB,eAAe,MAIpE,CAAmB,WAAiB;AACnC,QAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACG;AAEJ,SAAO,gBAAgBA,aAAmB,mBAAA,EAAE,QAAQ,YAAa,CAAA,CAAC;AAClE,SAAO,gBAAgBC,iBAAuB,uBAAA,EAAE,QAAQ,gBAAiB,CAAA,CAAC;AAC1E,SAAO,gBAAgBC,gBAAsB,sBAAA,EAAE,QAAQ,eAAgB,CAAA,CAAC;AAEjE,SAAA,iBAAiB,eAAeC,2CAAqB;AAE5D,SAAO,OAAgC,QAAQ;AAAA,IAC9C,aAAa,MAAM;AACZ,YAAA,oBAAoBC,MAAAA,gBAAgB,kBAAkB,MAAM;AAClE,UAAI,qBAAqBC,iBAAA,mBAAmB,kBAAkB,CAAC,CAAC,GAAG;AAClE,cAAM,YAAY,OAAO;AACnB,cAAA,CAAA,EAAG,gBAAgB,IAAI;AAC7B,cAAM,CAAC,WAAW,OAAO,IAAIC,MAAO,OAAA,MAAM,QAAQ,gBAAgB;AAElE,YAAI,CAAC,WAAW;AACf,iBAAO,YAAY;AAAA,QAAA;AAGb,eAAAA,MAAA,OAAO,mBAAmB,QAAQ,MAAM;AAC9CC,gBAAA,WAAW,UAAU,QAAQ,OAAO,qBAAqB,CAAE,CAAA,GAAG;AAAA,YAC7D,IAA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AS;AACjC,gBAAM,eAAe;AAErB,cAAI,MAAM,QAAQ;AACjB,gBAAI,MAAM,UAAU;AACAa,iCAAAA,mBAAA,eAAe,QAAQ,cAAc,WAAW;AACnE,oBAAM,eAAed,MAAA,OAAO,MAAM,QAAQ,CAAC,GAAG,WAAW,UAAU,KAAK,IAAI,GAAG,WAAW,CAAC,CAAC;AAErF,qBAAAC,iBAAW,OAAO,QAAQ,YAAY;AAAA,YAAA,OACvC;AACNa,iCAAAA,mBAAmB,eAAe,QAAQ,cAAc,cAAc,CAAC;AACjE,oBAAA,cAAcd,aAAO,MAAM,QAAQ,CAAC,GAAG,WAAW,UAAU,cAAc,CAAC,CAAC;AAE3E,qBAAAC,iBAAW,OAAO,QAAQ,WAAW;AAAA,YAAA;AAAA,UAC7C,OACM;AACN,gBAAI,MAAM,UAAU;AACAa,iCAAAA,mBAAA,YAAY,QAAQ,cAAc,QAAQ;AAC7D,oBAAM,WAAWd,MAAA,OAAO,MAAM,QAAQ,CAAC,GAAG,WAAW,KAAK,IAAI,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEjF,qBAAAC,iBAAW,OAAO,QAAQ,QAAQ;AAAA,YAAA,OACnC;AACNa,iCAAAA,mBAAmB,YAAY,QAAQ,cAAc,WAAW,CAAC;AAC3D,oBAAA,eAAed,aAAO,MAAM,QAAQ,CAAC,GAAG,WAAW,WAAW,GAAG,WAAW,CAAC;AAE5E,qBAAAC,iBAAW,OAAO,QAAQ,YAAY;AAAA,YAAA;AAAA,UAC9C;AAAA,QACD;AAAA,MACD;AAED,gBAAU,KAAK;AAAA,IAAA;AAAA,EAChB,CAEA;AAEM,SAAA;AACR;;"}
@@ -1,283 +0,0 @@
1
- import { Editor, Transforms, Text, Element, Path, Range, Point, Node } from "slate";
2
- import { ContemberEditor } from "../../../editor/index.js";
3
- import { tableCellElementPlugin, isTableCellElement } from "./TableCellElement.js";
4
- import { tableElementPlugin, isTableElement, getTableElementRowCount, getTableElementColumnCount } from "./TableElement.js";
5
- import { getTableCellCoordinates, selectTableCellContents } from "./TableElementSelection.js";
6
- import { tableHTMLDeserializer } from "./TableHtmlDeserializer.js";
7
- import { TableModifications } from "./TableModifications.js";
8
- import { tableRowElementPlugin, isTableRowElement } from "./TableRowElement.js";
9
- const withTables = ({ renderTable, renderTableCell, renderTableRow }) => (editor) => {
10
- const {
11
- deleteForward,
12
- deleteBackward,
13
- deleteFragment,
14
- insertBreak,
15
- onKeyDown
16
- } = editor;
17
- editor.registerElement(tableElementPlugin({ render: renderTable }));
18
- editor.registerElement(tableCellElementPlugin({ render: renderTableCell }));
19
- editor.registerElement(tableRowElementPlugin({ render: renderTableRow }));
20
- editor.htmlDeserializer.registerPlugin(tableHTMLDeserializer);
21
- Object.assign(editor, {
22
- insertBreak: () => {
23
- const closestBlockEntry = ContemberEditor.closestBlockEntry(editor);
24
- if (closestBlockEntry && isTableCellElement(closestBlockEntry[0])) {
25
- const selection = editor.selection;
26
- const [, closestBlockPath] = closestBlockEntry;
27
- const [cellStart, cellEnd] = Editor.edges(editor, closestBlockPath);
28
- if (!selection) {
29
- return insertBreak();
30
- }
31
- return Editor.withoutNormalizing(editor, () => {
32
- Transforms.wrapNodes(editor, editor.createDefaultElement([]), {
33
- at: {
34
- anchor: cellStart,
35
- focus: cellEnd
36
- },
37
- match: (node) => Text.isText(node) || Element.isElement(node) && editor.isInline(node)
38
- });
39
- const relative = Path.relative(selection.focus.path, closestBlockPath);
40
- Transforms.splitNodes(editor, {
41
- // The zero should be the newly created default element.
42
- at: {
43
- path: [...closestBlockPath, 0, ...relative],
44
- offset: selection.focus.offset
45
- },
46
- always: true
47
- });
48
- });
49
- }
50
- insertBreak();
51
- },
52
- deleteBackward: (unit) => {
53
- const selection = editor.selection;
54
- if (selection && Range.isCollapsed(selection)) {
55
- const closestBlockEntry = ContemberEditor.closestBlockEntry(editor);
56
- if (closestBlockEntry && isTableCellElement(closestBlockEntry[0]) && Point.equals(selection.focus, Editor.start(editor, closestBlockEntry[1]))) {
57
- return;
58
- }
59
- }
60
- deleteBackward(unit);
61
- },
62
- deleteForward: (unit) => {
63
- const selection = editor.selection;
64
- if (selection && Range.isCollapsed(selection)) {
65
- const closestBlockEntry = ContemberEditor.closestBlockEntry(editor);
66
- if (closestBlockEntry && isTableCellElement(closestBlockEntry[0]) && Point.equals(selection.focus, Editor.end(editor, closestBlockEntry[1]))) {
67
- return;
68
- }
69
- }
70
- deleteForward(unit);
71
- },
72
- deleteFragment: () => {
73
- const selection = editor.selection;
74
- if (!selection || Range.isCollapsed(selection)) {
75
- return deleteFragment();
76
- }
77
- const lowestCommonAncestorPath = Path.common(selection.anchor.path, selection.focus.path);
78
- const [lowestCommonAncestor] = Editor.node(editor, lowestCommonAncestorPath);
79
- if (isTableElement(lowestCommonAncestor) || isTableRowElement(lowestCommonAncestor)) {
80
- return;
81
- }
82
- deleteFragment();
83
- },
84
- onKeyDown: (event) => {
85
- const selection = editor.selection;
86
- if (!selection || !(event.key === "Tab" || event.key === "ArrowUp" || event.key === "ArrowRight" || event.key === "ArrowDown" || event.key === "ArrowLeft" || event.key === "Enter" || event.key === "Backspace")) {
87
- return onKeyDown(event);
88
- }
89
- const closestBlockEntry = ContemberEditor.closestBlockEntry(editor, { at: selection });
90
- if (!closestBlockEntry) {
91
- return onKeyDown(event);
92
- }
93
- let cellElement;
94
- let cellPath;
95
- if (!isTableCellElement(closestBlockEntry[0])) {
96
- const parent = Node.parent(editor, closestBlockEntry[1]);
97
- if (Element.isElement(closestBlockEntry[0]) && editor.isDefaultElement(closestBlockEntry[0]) && isTableCellElement(parent)) {
98
- cellElement = parent;
99
- cellPath = Path.parent(closestBlockEntry[1]);
100
- } else {
101
- return onKeyDown(event);
102
- }
103
- } else {
104
- [cellElement, cellPath] = closestBlockEntry;
105
- }
106
- if (cellPath.length < 3) {
107
- return onKeyDown(event);
108
- }
109
- const [rowIndex, columnIndex] = getTableCellCoordinates(editor, cellElement);
110
- const tablePath = cellPath.slice(0, -2);
111
- const tableElement = Node.get(editor, tablePath);
112
- const rowCount = getTableElementRowCount(tableElement);
113
- const columnCount = getTableElementColumnCount(tableElement);
114
- if (rowCount === 0 || columnCount === 0) {
115
- return;
116
- }
117
- const moveSelectionBeforeTable = () => {
118
- const pointBeforeTable = Editor.before(editor, tablePath);
119
- if (!pointBeforeTable) {
120
- return onKeyDown(event);
121
- }
122
- event.preventDefault();
123
- return Transforms.select(editor, pointBeforeTable);
124
- };
125
- const moveSelectionAfterTable = () => {
126
- const pointAfterTable = Editor.after(editor, tablePath);
127
- if (!pointAfterTable) {
128
- return onKeyDown(event);
129
- }
130
- event.preventDefault();
131
- return Transforms.select(editor, pointAfterTable);
132
- };
133
- if (event.key === "Tab") {
134
- if (event.shiftKey) {
135
- if (columnIndex > 0) {
136
- event.preventDefault();
137
- return selectTableCellContents(editor, tablePath, rowIndex, columnIndex - 1);
138
- } else if (columnIndex === 0) {
139
- if (rowIndex > 0) {
140
- event.preventDefault();
141
- return selectTableCellContents(editor, tablePath, rowIndex - 1, columnCount - 1);
142
- }
143
- return moveSelectionBeforeTable();
144
- }
145
- } else {
146
- if (columnIndex < columnCount - 1) {
147
- event.preventDefault();
148
- return selectTableCellContents(editor, tablePath, rowIndex, columnIndex + 1);
149
- } else if (columnIndex === columnCount - 1) {
150
- if (rowIndex < rowCount - 1) {
151
- event.preventDefault();
152
- return selectTableCellContents(editor, tablePath, rowIndex + 1, 0);
153
- } else if (rowIndex === rowCount - 1) {
154
- return moveSelectionAfterTable();
155
- }
156
- }
157
- }
158
- }
159
- if (event.key === "ArrowLeft") {
160
- if (!Range.isCollapsed(selection)) {
161
- return onKeyDown(event);
162
- }
163
- if (Point.equals(selection.focus, Editor.start(editor, cellPath))) {
164
- if (columnIndex > 0) {
165
- event.preventDefault();
166
- return Transforms.select(editor, Editor.end(editor, [...tablePath, rowIndex, columnIndex - 1]));
167
- } else if (columnIndex === 0) {
168
- if (rowIndex > 0) {
169
- event.preventDefault();
170
- return Transforms.select(editor, Editor.end(editor, [...tablePath, rowIndex - 1, columnCount - 1]));
171
- }
172
- return moveSelectionBeforeTable();
173
- }
174
- }
175
- } else if (event.key === "ArrowRight") {
176
- if (!Range.isCollapsed(selection)) {
177
- return onKeyDown(event);
178
- }
179
- if (Point.equals(selection.focus, Editor.end(editor, cellPath))) {
180
- if (columnIndex < columnCount - 1) {
181
- event.preventDefault();
182
- return Transforms.select(editor, Editor.start(editor, [...tablePath, rowIndex, columnIndex + 1]));
183
- } else if (columnIndex === columnCount - 1) {
184
- if (rowIndex < rowCount - 1) {
185
- event.preventDefault();
186
- return Transforms.select(editor, Editor.start(editor, [...tablePath, rowIndex + 1, 0]));
187
- } else if (rowIndex === rowCount - 1) {
188
- return moveSelectionAfterTable();
189
- }
190
- }
191
- }
192
- } else if (event.key === "ArrowUp" || event.key === "ArrowDown") {
193
- const withinDefault = editor.isDefaultElement(closestBlockEntry[0]);
194
- if (withinDefault) {
195
- const relative = Path.relative(closestBlockEntry[1], cellPath);
196
- const defaultIndex = relative[0];
197
- if (event.key === "ArrowUp" && defaultIndex !== 0 || event.key === "ArrowDown" && defaultIndex !== cellElement.children.length - 1) {
198
- return onKeyDown(event);
199
- }
200
- }
201
- if (event.key === "ArrowUp") {
202
- if (rowIndex > 0) {
203
- event.preventDefault();
204
- const rowAboveEndPoint = Editor.end(editor, [...tablePath, rowIndex - 1, columnIndex]);
205
- if (!Range.isCollapsed(selection)) {
206
- return Transforms.select(editor, rowAboveEndPoint);
207
- }
208
- const minOffset = Math.min(selection.focus.offset, rowAboveEndPoint.offset);
209
- return Transforms.select(editor, {
210
- path: rowAboveEndPoint.path,
211
- offset: minOffset
212
- });
213
- }
214
- return moveSelectionBeforeTable();
215
- } else if (event.key === "ArrowDown") {
216
- if (rowIndex < rowCount - 1) {
217
- event.preventDefault();
218
- const rowBelowStatPoint = Editor.start(editor, [...tablePath, rowIndex + 1, columnIndex]);
219
- if (!Range.isCollapsed(selection)) {
220
- return Transforms.select(editor, rowBelowStatPoint);
221
- }
222
- const [rowBelowStatPointNode] = Editor.node(editor, rowBelowStatPoint);
223
- return Transforms.select(editor, {
224
- path: rowBelowStatPoint.path,
225
- offset: Math.min(selection.focus.offset, rowBelowStatPointNode.text.length)
226
- });
227
- }
228
- return moveSelectionAfterTable();
229
- }
230
- } else if (event.ctrlKey || event.metaKey) {
231
- if (event.key === "Backspace") {
232
- event.preventDefault();
233
- if (event.altKey) {
234
- TableModifications.deleteTableColumn(editor, tableElement, columnIndex);
235
- if (columnCount > 1) {
236
- const columnBefore = Editor.start(editor, [...tablePath, rowIndex, Math.max(0, columnIndex - 1)]);
237
- return Transforms.select(editor, columnBefore);
238
- } else {
239
- return moveSelectionBeforeTable();
240
- }
241
- } else {
242
- TableModifications.deleteTableRow(editor, tableElement, rowIndex);
243
- if (rowCount > 1) {
244
- const rowAbove = Editor.start(editor, [...tablePath, Math.max(0, rowIndex - 1), columnIndex]);
245
- return Transforms.select(editor, rowAbove);
246
- } else {
247
- return moveSelectionBeforeTable();
248
- }
249
- }
250
- } else if (event.key === "Enter") {
251
- event.preventDefault();
252
- if (event.altKey) {
253
- if (event.shiftKey) {
254
- TableModifications.addTableColumn(editor, tableElement, columnIndex);
255
- const columnBefore = Editor.start(editor, [...tablePath, rowIndex, Math.max(0, columnIndex)]);
256
- return Transforms.select(editor, columnBefore);
257
- } else {
258
- TableModifications.addTableColumn(editor, tableElement, columnIndex + 1);
259
- const columnAfter = Editor.start(editor, [...tablePath, rowIndex, columnIndex + 1]);
260
- return Transforms.select(editor, columnAfter);
261
- }
262
- } else {
263
- if (event.shiftKey) {
264
- TableModifications.addTableRow(editor, tableElement, rowIndex);
265
- const rowAbove = Editor.start(editor, [...tablePath, Math.max(0, rowIndex), columnIndex]);
266
- return Transforms.select(editor, rowAbove);
267
- } else {
268
- TableModifications.addTableRow(editor, tableElement, rowIndex + 1);
269
- const rowBelowStat = Editor.start(editor, [...tablePath, rowIndex + 1, columnIndex]);
270
- return Transforms.select(editor, rowBelowStat);
271
- }
272
- }
273
- }
274
- }
275
- onKeyDown(event);
276
- }
277
- });
278
- return editor;
279
- };
280
- export {
281
- withTables
282
- };
283
- //# sourceMappingURL=withTables.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withTables.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/tables/withTables.ts"],"sourcesContent":["import { Editor, Element, Node as SlateNode, NodeEntry, Path as SlatePath, Point, Range as SlateRange, Text, Transforms } from 'slate'\nimport { ContemberEditor } from '../../../editor'\nimport { isTableCellElement, TableCellElement, tableCellElementPlugin } from './TableCellElement'\nimport { getTableElementColumnCount, getTableElementRowCount, isTableElement, TableElement, tableElementPlugin } from './TableElement'\nimport { getTableCellCoordinates, selectTableCellContents } from './TableElementSelection'\nimport { tableHTMLDeserializer } from './TableHtmlDeserializer'\nimport { TableModifications } from './TableModifications'\nimport { isTableRowElement, TableRowElement, tableRowElementPlugin } from './TableRowElement'\nimport { ElementRenderer } from '../../../types'\n\nexport const withTables = ({ renderTable, renderTableCell, renderTableRow }: {\n\trenderTable: ElementRenderer<TableElement>\n\trenderTableCell: ElementRenderer<TableCellElement>\n\trenderTableRow: ElementRenderer<TableRowElement>\n}) => <E extends Editor>(editor: E): E => {\n\tconst {\n\t\tdeleteForward,\n\t\tdeleteBackward,\n\t\tdeleteFragment,\n\t\tinsertBreak,\n\t\tonKeyDown,\n\t} = editor\n\n\teditor.registerElement(tableElementPlugin({ render: renderTable }))\n\teditor.registerElement(tableCellElementPlugin({ render: renderTableCell }))\n\teditor.registerElement(tableRowElementPlugin({ render: renderTableRow }))\n\n\teditor.htmlDeserializer.registerPlugin(tableHTMLDeserializer)\n\n\tObject.assign<Editor, Partial<Editor>>(editor, {\n\t\tinsertBreak: () => {\n\t\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor)\n\t\t\tif (closestBlockEntry && isTableCellElement(closestBlockEntry[0])) {\n\t\t\t\tconst selection = editor.selection\n\t\t\t\tconst [, closestBlockPath] = closestBlockEntry\n\t\t\t\tconst [cellStart, cellEnd] = Editor.edges(editor, closestBlockPath)\n\n\t\t\t\tif (!selection) {\n\t\t\t\t\treturn insertBreak()\n\t\t\t\t}\n\n\t\t\t\treturn Editor.withoutNormalizing(editor, () => {\n\t\t\t\t\tTransforms.wrapNodes(editor, editor.createDefaultElement([]), {\n\t\t\t\t\t\tat: {\n\t\t\t\t\t\t\tanchor: cellStart,\n\t\t\t\t\t\t\tfocus: cellEnd,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmatch: node => Text.isText(node) || (Element.isElement(node) && editor.isInline(node)),\n\t\t\t\t\t})\n\n\t\t\t\t\tconst relative = SlatePath.relative(selection.focus.path, closestBlockPath)\n\t\t\t\t\tTransforms.splitNodes(editor, {\n\t\t\t\t\t\t// The zero should be the newly created default element.\n\t\t\t\t\t\tat: {\n\t\t\t\t\t\t\tpath: [...closestBlockPath, 0, ...relative],\n\t\t\t\t\t\t\toffset: selection.focus.offset,\n\t\t\t\t\t\t},\n\t\t\t\t\t\talways: true,\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}\n\t\t\tinsertBreak()\n\t\t},\n\t\tdeleteBackward: unit => {\n\t\t\tconst selection = editor.selection\n\t\t\tif (selection && SlateRange.isCollapsed(selection)) {\n\t\t\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor)\n\t\t\t\tif (\n\t\t\t\t\tclosestBlockEntry &&\n\t\t\t\t\tisTableCellElement(closestBlockEntry[0]) &&\n\t\t\t\t\tPoint.equals(selection.focus, Editor.start(editor, closestBlockEntry[1]))\n\t\t\t\t) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\tdeleteBackward(unit)\n\t\t},\n\t\tdeleteForward: unit => {\n\t\t\tconst selection = editor.selection\n\t\t\tif (selection && SlateRange.isCollapsed(selection)) {\n\t\t\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor)\n\t\t\t\tif (\n\t\t\t\t\tclosestBlockEntry &&\n\t\t\t\t\tisTableCellElement(closestBlockEntry[0]) &&\n\t\t\t\t\tPoint.equals(selection.focus, Editor.end(editor, closestBlockEntry[1]))\n\t\t\t\t) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\tdeleteForward(unit)\n\t\t},\n\t\tdeleteFragment: () => {\n\t\t\tconst selection = editor.selection\n\t\t\tif (!selection || SlateRange.isCollapsed(selection)) {\n\t\t\t\treturn deleteFragment()\n\t\t\t}\n\t\t\tconst lowestCommonAncestorPath = SlatePath.common(selection.anchor.path, selection.focus.path)\n\t\t\tconst [lowestCommonAncestor] = Editor.node(editor, lowestCommonAncestorPath)\n\n\t\t\tif (isTableElement(lowestCommonAncestor) || isTableRowElement(lowestCommonAncestor)) {\n\t\t\t\treturn // TODO nope for now\n\t\t\t}\n\t\t\tdeleteFragment()\n\t\t},\n\t\tonKeyDown: event => {\n\t\t\tconst selection = editor.selection\n\t\t\tif (\n\t\t\t\t!selection ||\n\t\t\t\t!(\n\t\t\t\t\tevent.key === 'Tab' ||\n\t\t\t\t\tevent.key === 'ArrowUp' ||\n\t\t\t\t\tevent.key === 'ArrowRight' ||\n\t\t\t\t\tevent.key === 'ArrowDown' ||\n\t\t\t\t\tevent.key === 'ArrowLeft' ||\n\t\t\t\t\tevent.key === 'Enter' ||\n\t\t\t\t\tevent.key === 'Backspace'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn onKeyDown(event)\n\t\t\t}\n\t\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor, { at: selection })\n\n\t\t\tif (!closestBlockEntry) {\n\t\t\t\treturn onKeyDown(event)\n\t\t\t}\n\t\t\tlet cellElement: TableCellElement\n\t\t\tlet cellPath: SlatePath\n\n\t\t\tif (!isTableCellElement(closestBlockEntry[0])) {\n\t\t\t\tconst parent = SlateNode.parent(editor, closestBlockEntry[1])\n\t\t\t\tif (Element.isElement(closestBlockEntry[0]) && editor.isDefaultElement(closestBlockEntry[0]) && isTableCellElement(parent)) {\n\t\t\t\t\tcellElement = parent\n\t\t\t\t\tcellPath = SlatePath.parent(closestBlockEntry[1])\n\t\t\t\t} else {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t[cellElement, cellPath] = closestBlockEntry\n\t\t\t}\n\t\t\tif (cellPath.length < 3) {\n\t\t\t\treturn onKeyDown(event)\n\t\t\t}\n\t\t\tconst [rowIndex, columnIndex] = getTableCellCoordinates(editor, cellElement)\n\t\t\tconst tablePath = cellPath.slice(0, -2)\n\t\t\tconst tableElement = SlateNode.get(editor, tablePath) as TableElement\n\t\t\tconst rowCount = getTableElementRowCount(tableElement)\n\t\t\tconst columnCount = getTableElementColumnCount(tableElement)\n\n\t\t\tif (rowCount === 0 || columnCount === 0) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst moveSelectionBeforeTable = () => {\n\t\t\t\tconst pointBeforeTable = Editor.before(editor, tablePath)\n\t\t\t\tif (!pointBeforeTable) {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t\tevent.preventDefault()\n\t\t\t\treturn Transforms.select(editor, pointBeforeTable)\n\t\t\t}\n\t\t\tconst moveSelectionAfterTable = () => {\n\t\t\t\tconst pointAfterTable = Editor.after(editor, tablePath)\n\t\t\t\tif (!pointAfterTable) {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t\tevent.preventDefault()\n\t\t\t\treturn Transforms.select(editor, pointAfterTable)\n\t\t\t}\n\n\t\t\tif (event.key === 'Tab') {\n\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\t// Moving backwards\n\t\t\t\t\tif (columnIndex > 0) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn selectTableCellContents(editor, tablePath, rowIndex, columnIndex - 1)\n\t\t\t\t\t} else if (columnIndex === 0) {\n\t\t\t\t\t\tif (rowIndex > 0) {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\treturn selectTableCellContents(editor, tablePath, rowIndex - 1, columnCount - 1)\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Moving forwards\n\t\t\t\t\tif (columnIndex < columnCount - 1) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn selectTableCellContents(editor, tablePath, rowIndex, columnIndex + 1)\n\t\t\t\t\t} else if (columnIndex === columnCount - 1) {\n\t\t\t\t\t\t// We're at the right edge of the table\n\t\t\t\t\t\tif (rowIndex < rowCount - 1) {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\treturn selectTableCellContents(editor, tablePath, rowIndex + 1, 0)\n\t\t\t\t\t\t} else if (rowIndex === rowCount - 1) {\n\t\t\t\t\t\t\treturn moveSelectionAfterTable()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (event.key === 'ArrowLeft') {\n\t\t\t\tif (!SlateRange.isCollapsed(selection)) {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t\tif (Point.equals(selection.focus, Editor.start(editor, cellPath))) {\n\t\t\t\t\tif (columnIndex > 0) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn Transforms.select(editor, Editor.end(editor, [...tablePath, rowIndex, columnIndex - 1]))\n\t\t\t\t\t} else if (columnIndex === 0) {\n\t\t\t\t\t\tif (rowIndex > 0) {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\treturn Transforms.select(editor, Editor.end(editor, [...tablePath, rowIndex - 1, columnCount - 1]))\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (event.key === 'ArrowRight') {\n\t\t\t\tif (!SlateRange.isCollapsed(selection)) {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t\tif (Point.equals(selection.focus, Editor.end(editor, cellPath))) {\n\t\t\t\t\tif (columnIndex < columnCount - 1) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn Transforms.select(editor, Editor.start(editor, [...tablePath, rowIndex, columnIndex + 1]))\n\t\t\t\t\t} else if (columnIndex === columnCount - 1) {\n\t\t\t\t\t\tif (rowIndex < rowCount - 1) {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\treturn Transforms.select(editor, Editor.start(editor, [...tablePath, rowIndex + 1, 0]))\n\t\t\t\t\t\t} else if (rowIndex === rowCount - 1) {\n\t\t\t\t\t\t\treturn moveSelectionAfterTable()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n\t\t\t\tconst withinDefault = editor.isDefaultElement(closestBlockEntry[0])\n\t\t\t\tif (withinDefault) {\n\t\t\t\t\tconst relative = SlatePath.relative(closestBlockEntry[1], cellPath)\n\t\t\t\t\tconst defaultIndex = relative[0]\n\t\t\t\t\tif (\n\t\t\t\t\t\t(event.key === 'ArrowUp' && defaultIndex !== 0) ||\n\t\t\t\t\t\t(event.key === 'ArrowDown' && defaultIndex !== cellElement.children.length - 1)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (event.key === 'ArrowUp') {\n\t\t\t\t\tif (rowIndex > 0) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\tconst rowAboveEndPoint = Editor.end(editor, [...tablePath, rowIndex - 1, columnIndex])\n\n\t\t\t\t\t\tif (!SlateRange.isCollapsed(selection)) {\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowAboveEndPoint)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst minOffset = Math.min(selection.focus.offset, rowAboveEndPoint.offset)\n\t\t\t\t\t\treturn Transforms.select(editor, {\n\t\t\t\t\t\t\tpath: rowAboveEndPoint.path,\n\t\t\t\t\t\t\toffset: minOffset,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t} else if (event.key === 'ArrowDown') {\n\t\t\t\t\tif (rowIndex < rowCount - 1) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\tconst rowBelowStatPoint = Editor.start(editor, [...tablePath, rowIndex + 1, columnIndex])\n\n\t\t\t\t\t\tif (!SlateRange.isCollapsed(selection)) {\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowBelowStatPoint)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst [rowBelowStatPointNode] = Editor.node(editor, rowBelowStatPoint) as NodeEntry<Text>\n\n\t\t\t\t\t\treturn Transforms.select(editor, {\n\t\t\t\t\t\t\tpath: rowBelowStatPoint.path,\n\t\t\t\t\t\t\toffset: Math.min(selection.focus.offset, rowBelowStatPointNode.text.length),\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\treturn moveSelectionAfterTable()\n\t\t\t\t}\n\t\t\t} else if (event.ctrlKey || event.metaKey) {\n\t\t\t\tif (event.key === 'Backspace') {\n\t\t\t\t\tevent.preventDefault()\n\n\t\t\t\t\tif (event.altKey) {\n\t\t\t\t\t\tTableModifications.deleteTableColumn(editor, tableElement, columnIndex)\n\n\t\t\t\t\t\tif (columnCount > 1) {\n\t\t\t\t\t\t\tconst columnBefore = Editor.start(editor, [...tablePath, rowIndex, Math.max(0, columnIndex - 1)])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, columnBefore)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTableModifications.deleteTableRow(editor, tableElement, rowIndex)\n\n\t\t\t\t\t\tif (rowCount > 1) {\n\t\t\t\t\t\t\tconst rowAbove = Editor.start(editor, [...tablePath, Math.max(0, rowIndex - 1), columnIndex])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowAbove)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'Enter') {\n\t\t\t\t\tevent.preventDefault()\n\n\t\t\t\t\tif (event.altKey) {\n\t\t\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\t\t\tTableModifications.addTableColumn(editor, tableElement, columnIndex)\n\t\t\t\t\t\t\tconst columnBefore = Editor.start(editor, [...tablePath, rowIndex, Math.max(0, columnIndex)])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, columnBefore)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tTableModifications.addTableColumn(editor, tableElement, columnIndex + 1)\n\t\t\t\t\t\t\tconst columnAfter = Editor.start(editor, [...tablePath, rowIndex, columnIndex + 1])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, columnAfter)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\t\t\tTableModifications.addTableRow(editor, tableElement, rowIndex)\n\t\t\t\t\t\t\tconst rowAbove = Editor.start(editor, [...tablePath, Math.max(0, rowIndex), columnIndex])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowAbove)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tTableModifications.addTableRow(editor, tableElement, rowIndex + 1)\n\t\t\t\t\t\t\tconst rowBelowStat = Editor.start(editor, [...tablePath, rowIndex + 1, columnIndex])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowBelowStat)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tonKeyDown(event)\n\t\t},\n\n\t})\n\n\treturn editor\n}\n"],"names":["SlatePath","SlateRange","SlateNode"],"mappings":";;;;;;;;AAUa,MAAA,aAAa,CA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;AAAA,YAAA;AAAA,UAC9C;AAAA,QACD;AAAA,MACD;AAED,gBAAU,KAAK;AAAA,IAAA;AAAA,EAChB,CAEA;AAEM,SAAA;AACR;"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const isHotkey = require("is-hotkey");
5
- const boldMark = "isBold";
6
- const boldMarkPlugin = {
7
- type: boldMark,
8
- isHotKey: isHotkey.isHotkey("mod+b"),
9
- render: ({ children }) => React.createElement("b", void 0, children)
10
- };
11
- exports.boldMark = boldMark;
12
- exports.boldMarkPlugin = boldMarkPlugin;
13
- //# sourceMappingURL=boldMark.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"boldMark.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/bold/boldMark.ts"],"sourcesContent":["import { createElement } from 'react'\nimport { isHotkey } from 'is-hotkey'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const boldMark = 'isBold'\n\nexport const boldMarkPlugin: EditorMarkPlugin = {\n\ttype: boldMark,\n\tisHotKey: isHotkey('mod+b'),\n\trender: ({ children }) => createElement('b', undefined, children),\n}\n"],"names":["isHotkey","createElement"],"mappings":";;;;AAIO,MAAM,WAAW;AAEjB,MAAM,iBAAmC;AAAA,EAC/C,MAAM;AAAA,EACN,UAAUA,kBAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAeC,MAAc,cAAA,KAAK,QAAW,QAAQ;AACjE;;;"}
@@ -1,13 +0,0 @@
1
- import { createElement } from "react";
2
- import { isHotkey } from "is-hotkey";
3
- const boldMark = "isBold";
4
- const boldMarkPlugin = {
5
- type: boldMark,
6
- isHotKey: isHotkey("mod+b"),
7
- render: ({ children }) => createElement("b", void 0, children)
8
- };
9
- export {
10
- boldMark,
11
- boldMarkPlugin
12
- };
13
- //# sourceMappingURL=boldMark.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"boldMark.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/bold/boldMark.ts"],"sourcesContent":["import { createElement } from 'react'\nimport { isHotkey } from 'is-hotkey'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const boldMark = 'isBold'\n\nexport const boldMarkPlugin: EditorMarkPlugin = {\n\ttype: boldMark,\n\tisHotKey: isHotkey('mod+b'),\n\trender: ({ children }) => createElement('b', undefined, children),\n}\n"],"names":[],"mappings":";;AAIO,MAAM,WAAW;AAEjB,MAAM,iBAAmC;AAAA,EAC/C,MAAM;AAAA,EACN,UAAU,SAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAe,cAAc,KAAK,QAAW,QAAQ;AACjE;"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const boldMark = require("./boldMark.cjs");
4
- const createMarkHtmlDeserializer = require("../../behaviour/paste/createMarkHtmlDeserializer.cjs");
5
- const withBold = () => (editor) => {
6
- editor.registerMark(boldMark.boldMarkPlugin);
7
- editor.htmlDeserializer.registerPlugin(
8
- createMarkHtmlDeserializer.createMarkHtmlDeserializer(
9
- boldMark.boldMark,
10
- (el) => el.nodeName === "STRONG" || el.nodeName === "B" && !el.id.startsWith("docs-internal-guid"),
11
- (el) => ["italic", "oblique"].includes(el.style.fontWeight)
12
- )
13
- );
14
- };
15
- exports.withBold = withBold;
16
- //# sourceMappingURL=withBold.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withBold.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/bold/withBold.ts"],"sourcesContent":["import { boldMark, boldMarkPlugin } from './boldMark'\nimport { EditorPlugin } from '../../../types'\nimport { createMarkHtmlDeserializer } from '../../behaviour'\n\n\nexport const withBold = (): EditorPlugin => editor => {\n\teditor.registerMark(boldMarkPlugin)\n\teditor.htmlDeserializer.registerPlugin(\n\t\tcreateMarkHtmlDeserializer(\n\t\t\tboldMark,\n\t\t\tel => el.nodeName === 'STRONG' || (el.nodeName === 'B' && !el.id.startsWith('docs-internal-guid')),\n\t\t\tel => ['italic', 'oblique'].includes(el.style.fontWeight),\n\t\t),\n\t)\n}\n"],"names":["boldMarkPlugin","createMarkHtmlDeserializer","boldMark"],"mappings":";;;;AAKa,MAAA,WAAW,MAAoB,CAAU,WAAA;AACrD,SAAO,aAAaA,uBAAc;AAClC,SAAO,iBAAiB;AAAA,IACvBC,2BAAA;AAAA,MACCC,SAAA;AAAA,MACA,CAAA,OAAM,GAAG,aAAa,YAAa,GAAG,aAAa,OAAO,CAAC,GAAG,GAAG,WAAW,oBAAoB;AAAA,MAChG,CAAA,OAAM,CAAC,UAAU,SAAS,EAAE,SAAS,GAAG,MAAM,UAAU;AAAA,IAAA;AAAA,EAE1D;AACD;;"}
@@ -1,16 +0,0 @@
1
- import { boldMarkPlugin, boldMark } from "./boldMark.js";
2
- import { createMarkHtmlDeserializer } from "../../behaviour/paste/createMarkHtmlDeserializer.js";
3
- const withBold = () => (editor) => {
4
- editor.registerMark(boldMarkPlugin);
5
- editor.htmlDeserializer.registerPlugin(
6
- createMarkHtmlDeserializer(
7
- boldMark,
8
- (el) => el.nodeName === "STRONG" || el.nodeName === "B" && !el.id.startsWith("docs-internal-guid"),
9
- (el) => ["italic", "oblique"].includes(el.style.fontWeight)
10
- )
11
- );
12
- };
13
- export {
14
- withBold
15
- };
16
- //# sourceMappingURL=withBold.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withBold.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/bold/withBold.ts"],"sourcesContent":["import { boldMark, boldMarkPlugin } from './boldMark'\nimport { EditorPlugin } from '../../../types'\nimport { createMarkHtmlDeserializer } from '../../behaviour'\n\n\nexport const withBold = (): EditorPlugin => editor => {\n\teditor.registerMark(boldMarkPlugin)\n\teditor.htmlDeserializer.registerPlugin(\n\t\tcreateMarkHtmlDeserializer(\n\t\t\tboldMark,\n\t\t\tel => el.nodeName === 'STRONG' || (el.nodeName === 'B' && !el.id.startsWith('docs-internal-guid')),\n\t\t\tel => ['italic', 'oblique'].includes(el.style.fontWeight),\n\t\t),\n\t)\n}\n"],"names":[],"mappings":";;AAKa,MAAA,WAAW,MAAoB,CAAU,WAAA;AACrD,SAAO,aAAa,cAAc;AAClC,SAAO,iBAAiB;AAAA,IACvB;AAAA,MACC;AAAA,MACA,CAAA,OAAM,GAAG,aAAa,YAAa,GAAG,aAAa,OAAO,CAAC,GAAG,GAAG,WAAW,oBAAoB;AAAA,MAChG,CAAA,OAAM,CAAC,UAAU,SAAS,EAAE,SAAS,GAAG,MAAM,UAAU;AAAA,IAAA;AAAA,EAE1D;AACD;"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const isHotkey = require("is-hotkey");
4
- const React = require("react");
5
- const codeMark = "isCode";
6
- const codeMarkPlugin = {
7
- type: codeMark,
8
- isHotKey: isHotkey.isHotkey("mod+`"),
9
- render: ({ children }) => React.createElement("code", void 0, children)
10
- };
11
- exports.codeMark = codeMark;
12
- exports.codeMarkPlugin = codeMarkPlugin;
13
- //# sourceMappingURL=codeMark.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codeMark.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/code/codeMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const codeMark = 'isCode'\n\nexport const codeMarkPlugin: EditorMarkPlugin = {\n\ttype: codeMark,\n\tisHotKey: isHotkey('mod+`'),\n\trender: ({ children }) => createElement('code', undefined, children),\n}\n"],"names":["isHotkey","createElement"],"mappings":";;;;AAIO,MAAM,WAAW;AAEjB,MAAM,iBAAmC;AAAA,EAC/C,MAAM;AAAA,EACN,UAAUA,kBAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAeC,MAAc,cAAA,QAAQ,QAAW,QAAQ;AACpE;;;"}
@@ -1,13 +0,0 @@
1
- import { isHotkey } from "is-hotkey";
2
- import { createElement } from "react";
3
- const codeMark = "isCode";
4
- const codeMarkPlugin = {
5
- type: codeMark,
6
- isHotKey: isHotkey("mod+`"),
7
- render: ({ children }) => createElement("code", void 0, children)
8
- };
9
- export {
10
- codeMark,
11
- codeMarkPlugin
12
- };
13
- //# sourceMappingURL=codeMark.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codeMark.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/code/codeMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const codeMark = 'isCode'\n\nexport const codeMarkPlugin: EditorMarkPlugin = {\n\ttype: codeMark,\n\tisHotKey: isHotkey('mod+`'),\n\trender: ({ children }) => createElement('code', undefined, children),\n}\n"],"names":[],"mappings":";;AAIO,MAAM,WAAW;AAEjB,MAAM,iBAAmC;AAAA,EAC/C,MAAM;AAAA,EACN,UAAU,SAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAe,cAAc,QAAQ,QAAW,QAAQ;AACpE;"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const codeMark = require("./codeMark.cjs");
4
- const withCode = () => (editor) => {
5
- editor.registerMark(codeMark.codeMarkPlugin);
6
- return editor;
7
- };
8
- exports.withCode = withCode;
9
- //# sourceMappingURL=withCode.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withCode.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/code/withCode.ts"],"sourcesContent":["import { Editor as SlateEditor } from 'slate'\nimport { codeMarkPlugin } from './codeMark'\nimport { EditorPlugin } from '../../../types'\n\n\nexport const withCode = (): EditorPlugin => editor => {\n\teditor.registerMark(codeMarkPlugin)\n\n\treturn editor\n}\n"],"names":["codeMarkPlugin"],"mappings":";;;AAKa,MAAA,WAAW,MAAoB,CAAU,WAAA;AACrD,SAAO,aAAaA,uBAAc;AAE3B,SAAA;AACR;;"}
@@ -1,9 +0,0 @@
1
- import { codeMarkPlugin } from "./codeMark.js";
2
- const withCode = () => (editor) => {
3
- editor.registerMark(codeMarkPlugin);
4
- return editor;
5
- };
6
- export {
7
- withCode
8
- };
9
- //# sourceMappingURL=withCode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withCode.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/code/withCode.ts"],"sourcesContent":["import { Editor as SlateEditor } from 'slate'\nimport { codeMarkPlugin } from './codeMark'\nimport { EditorPlugin } from '../../../types'\n\n\nexport const withCode = (): EditorPlugin => editor => {\n\teditor.registerMark(codeMarkPlugin)\n\n\treturn editor\n}\n"],"names":[],"mappings":";AAKa,MAAA,WAAW,MAAoB,CAAU,WAAA;AACrD,SAAO,aAAa,cAAc;AAE3B,SAAA;AACR;"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const isHotkey = require("is-hotkey");
4
- const React = require("react");
5
- const highlightMark = "isHighlighted";
6
- const highlightMarkPlugin = {
7
- type: highlightMark,
8
- isHotKey: isHotkey.isHotkey("mod+e"),
9
- render: ({ children }) => React.createElement("em", void 0, children)
10
- };
11
- exports.highlightMark = highlightMark;
12
- exports.highlightMarkPlugin = highlightMarkPlugin;
13
- //# sourceMappingURL=highlightMark.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"highlightMark.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/highlight/highlightMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const highlightMark = 'isHighlighted'\n\nexport const highlightMarkPlugin: EditorMarkPlugin = {\n\ttype: highlightMark,\n\tisHotKey: isHotkey('mod+e'),\n\trender: ({ children }) => createElement('em', undefined, children),\n}\n"],"names":["isHotkey","createElement"],"mappings":";;;;AAIO,MAAM,gBAAgB;AAEtB,MAAM,sBAAwC;AAAA,EACpD,MAAM;AAAA,EACN,UAAUA,kBAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAeC,MAAc,cAAA,MAAM,QAAW,QAAQ;AAClE;;;"}
@@ -1,13 +0,0 @@
1
- import { isHotkey } from "is-hotkey";
2
- import { createElement } from "react";
3
- const highlightMark = "isHighlighted";
4
- const highlightMarkPlugin = {
5
- type: highlightMark,
6
- isHotKey: isHotkey("mod+e"),
7
- render: ({ children }) => createElement("em", void 0, children)
8
- };
9
- export {
10
- highlightMark,
11
- highlightMarkPlugin
12
- };
13
- //# sourceMappingURL=highlightMark.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"highlightMark.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/highlight/highlightMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const highlightMark = 'isHighlighted'\n\nexport const highlightMarkPlugin: EditorMarkPlugin = {\n\ttype: highlightMark,\n\tisHotKey: isHotkey('mod+e'),\n\trender: ({ children }) => createElement('em', undefined, children),\n}\n"],"names":[],"mappings":";;AAIO,MAAM,gBAAgB;AAEtB,MAAM,sBAAwC;AAAA,EACpD,MAAM;AAAA,EACN,UAAU,SAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAe,cAAc,MAAM,QAAW,QAAQ;AAClE;"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const highlightMark = require("./highlightMark.cjs");
4
- const withHighlight = () => (editor) => {
5
- editor.registerMark(highlightMark.highlightMarkPlugin);
6
- return editor;
7
- };
8
- exports.withHighlight = withHighlight;
9
- //# sourceMappingURL=withHighlight.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withHighlight.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/highlight/withHighlight.ts"],"sourcesContent":["import { Editor as SlateEditor } from 'slate'\nimport { highlightMarkPlugin } from './highlightMark'\nimport { EditorPlugin } from '../../../types'\n\n\nexport const withHighlight = (): EditorPlugin => editor => {\n\teditor.registerMark(highlightMarkPlugin)\n\n\treturn editor\n}\n"],"names":["highlightMarkPlugin"],"mappings":";;;AAKa,MAAA,gBAAgB,MAAoB,CAAU,WAAA;AAC1D,SAAO,aAAaA,iCAAmB;AAEhC,SAAA;AACR;;"}
@@ -1,9 +0,0 @@
1
- import { highlightMarkPlugin } from "./highlightMark.js";
2
- const withHighlight = () => (editor) => {
3
- editor.registerMark(highlightMarkPlugin);
4
- return editor;
5
- };
6
- export {
7
- withHighlight
8
- };
9
- //# sourceMappingURL=withHighlight.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withHighlight.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/highlight/withHighlight.ts"],"sourcesContent":["import { Editor as SlateEditor } from 'slate'\nimport { highlightMarkPlugin } from './highlightMark'\nimport { EditorPlugin } from '../../../types'\n\n\nexport const withHighlight = (): EditorPlugin => editor => {\n\teditor.registerMark(highlightMarkPlugin)\n\n\treturn editor\n}\n"],"names":[],"mappings":";AAKa,MAAA,gBAAgB,MAAoB,CAAU,WAAA;AAC1D,SAAO,aAAa,mBAAmB;AAEhC,SAAA;AACR;"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const isHotkey = require("is-hotkey");
4
- const React = require("react");
5
- const italicMark = "isItalic";
6
- const italicMarkPlugin = {
7
- type: italicMark,
8
- isHotKey: isHotkey.isHotkey("mod+i"),
9
- render: ({ children }) => React.createElement("i", void 0, children)
10
- };
11
- exports.italicMark = italicMark;
12
- exports.italicMarkPlugin = italicMarkPlugin;
13
- //# sourceMappingURL=italicMark.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"italicMark.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/text/italic/italicMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const italicMark = 'isItalic'\n\nexport const italicMarkPlugin: EditorMarkPlugin = {\n\ttype: italicMark,\n\tisHotKey: isHotkey('mod+i'),\n\trender: ({ children }) => createElement('i', undefined, children),\n}\n"],"names":["isHotkey","createElement"],"mappings":";;;;AAIO,MAAM,aAAa;AAEnB,MAAM,mBAAqC;AAAA,EACjD,MAAM;AAAA,EACN,UAAUA,kBAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAeC,MAAc,cAAA,KAAK,QAAW,QAAQ;AACjE;;;"}