@atlaskit/editor-core 187.8.3 → 187.8.10

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 (275) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/create-editor/ReactEditorViewInternal.js +4 -5
  3. package/dist/cjs/index.js +0 -6
  4. package/dist/cjs/plugins/annotation/commands/transform.js +2 -2
  5. package/dist/cjs/plugins/base/pm-plugins/newline-preserve-marks.js +1 -1
  6. package/dist/cjs/plugins/block-type/commands/block-type.js +2 -2
  7. package/dist/cjs/plugins/block-type/pm-plugins/keymap.js +4 -4
  8. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +2 -2
  9. package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +5 -5
  10. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +2 -2
  11. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -2
  12. package/dist/cjs/plugins/layout/pm-plugins/main.js +1 -1
  13. package/dist/cjs/plugins/list/actions/conversions.js +5 -5
  14. package/dist/cjs/plugins/list/actions/indent-list-items-selected.js +11 -11
  15. package/dist/cjs/plugins/list/actions/join-list-items-forward.js +6 -6
  16. package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +6 -7
  17. package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +3 -4
  18. package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +3 -4
  19. package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js +2 -2
  20. package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.js +2 -2
  21. package/dist/cjs/plugins/list/actions/merge-lists.js +3 -3
  22. package/dist/cjs/plugins/list/actions/outdent-list-items-selected.js +11 -11
  23. package/dist/cjs/plugins/list/actions/wrap-and-join-lists.js +2 -2
  24. package/dist/cjs/plugins/list/commands/indent-list.js +6 -7
  25. package/dist/cjs/plugins/list/commands/index.js +8 -10
  26. package/dist/cjs/plugins/list/commands/join-list-item-forward.js +5 -5
  27. package/dist/cjs/plugins/list/commands/listBackspace.js +13 -14
  28. package/dist/cjs/plugins/list/commands/outdent-list.js +4 -3
  29. package/dist/cjs/plugins/list/pm-plugins/main.js +5 -6
  30. package/dist/cjs/plugins/list/utils/analytics.js +1 -35
  31. package/dist/cjs/plugins/list/utils/indentation.js +2 -20
  32. package/dist/cjs/plugins/list/utils/node.js +2 -106
  33. package/dist/cjs/plugins/list/utils/selection.js +3 -54
  34. package/dist/cjs/plugins/tasks-and-decisions/commands.js +2 -2
  35. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/keymaps.js +17 -18
  36. package/dist/cjs/plugins/text-color/commands/toggle-color.js +2 -2
  37. package/dist/cjs/plugins/text-formatting/commands/text-formatting.js +9 -9
  38. package/dist/cjs/plugins/text-formatting/commands/transform-to-code.js +2 -2
  39. package/dist/cjs/plugins/text-formatting/pm-plugins/clear-formatting.js +2 -5
  40. package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +2 -2
  41. package/dist/cjs/plugins/text-formatting/pm-plugins/main.js +2 -1
  42. package/dist/cjs/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +2 -2
  43. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +2 -3
  44. package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +2 -1
  45. package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +2 -2
  46. package/dist/cjs/ui/Appearance/Comment/Comment.js +5 -6
  47. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +2 -2
  48. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
  49. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +5 -5
  50. package/dist/cjs/ui/Dropdown/index.js +1 -2
  51. package/dist/cjs/ui/styles.js +3 -5
  52. package/dist/cjs/utils/commands.js +3 -222
  53. package/dist/cjs/utils/document.js +1 -26
  54. package/dist/cjs/utils/index.js +0 -19
  55. package/dist/cjs/version-wrapper.js +1 -1
  56. package/dist/cjs/version.json +1 -1
  57. package/dist/es2019/create-editor/ReactEditorViewInternal.js +3 -6
  58. package/dist/es2019/index.js +1 -1
  59. package/dist/es2019/plugins/annotation/commands/transform.js +1 -1
  60. package/dist/es2019/plugins/base/pm-plugins/newline-preserve-marks.js +1 -1
  61. package/dist/es2019/plugins/block-type/commands/block-type.js +1 -1
  62. package/dist/es2019/plugins/block-type/pm-plugins/keymap.js +1 -1
  63. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +1 -1
  64. package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +1 -1
  65. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +3 -5
  66. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -1
  67. package/dist/es2019/plugins/layout/pm-plugins/main.js +1 -1
  68. package/dist/es2019/plugins/list/actions/conversions.js +2 -2
  69. package/dist/es2019/plugins/list/actions/indent-list-items-selected.js +2 -2
  70. package/dist/es2019/plugins/list/actions/join-list-items-forward.js +1 -1
  71. package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +1 -2
  72. package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +2 -2
  73. package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +2 -2
  74. package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js +1 -1
  75. package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.js +1 -1
  76. package/dist/es2019/plugins/list/actions/merge-lists.js +1 -1
  77. package/dist/es2019/plugins/list/actions/outdent-list-items-selected.js +3 -3
  78. package/dist/es2019/plugins/list/actions/wrap-and-join-lists.js +1 -1
  79. package/dist/es2019/plugins/list/commands/indent-list.js +3 -4
  80. package/dist/es2019/plugins/list/commands/index.js +4 -5
  81. package/dist/es2019/plugins/list/commands/join-list-item-forward.js +1 -1
  82. package/dist/es2019/plugins/list/commands/listBackspace.js +1 -2
  83. package/dist/es2019/plugins/list/commands/outdent-list.js +3 -2
  84. package/dist/es2019/plugins/list/pm-plugins/main.js +1 -1
  85. package/dist/es2019/plugins/list/utils/analytics.js +0 -36
  86. package/dist/es2019/plugins/list/utils/indentation.js +0 -18
  87. package/dist/es2019/plugins/list/utils/node.js +3 -89
  88. package/dist/es2019/plugins/list/utils/selection.js +1 -52
  89. package/dist/es2019/plugins/tasks-and-decisions/commands.js +1 -1
  90. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/keymaps.js +1 -2
  91. package/dist/es2019/plugins/text-color/commands/toggle-color.js +1 -1
  92. package/dist/es2019/plugins/text-formatting/commands/text-formatting.js +1 -1
  93. package/dist/es2019/plugins/text-formatting/commands/transform-to-code.js +1 -1
  94. package/dist/es2019/plugins/text-formatting/pm-plugins/clear-formatting.js +2 -2
  95. package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
  96. package/dist/es2019/plugins/text-formatting/pm-plugins/main.js +2 -1
  97. package/dist/es2019/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +1 -1
  98. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +1 -2
  99. package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +2 -1
  100. package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +1 -1
  101. package/dist/es2019/ui/Appearance/Comment/Comment.js +6 -5
  102. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +3 -2
  103. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -3
  104. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -2
  105. package/dist/es2019/ui/Dropdown/index.js +1 -2
  106. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +1 -0
  107. package/dist/es2019/ui/styles.js +0 -5
  108. package/dist/es2019/utils/commands.js +2 -214
  109. package/dist/es2019/utils/document.js +1 -26
  110. package/dist/es2019/utils/index.js +1 -13
  111. package/dist/es2019/version-wrapper.js +1 -1
  112. package/dist/es2019/version.json +1 -1
  113. package/dist/esm/create-editor/ReactEditorViewInternal.js +3 -6
  114. package/dist/esm/index.js +1 -1
  115. package/dist/esm/plugins/annotation/commands/transform.js +1 -1
  116. package/dist/esm/plugins/base/pm-plugins/newline-preserve-marks.js +1 -1
  117. package/dist/esm/plugins/block-type/commands/block-type.js +1 -1
  118. package/dist/esm/plugins/block-type/pm-plugins/keymap.js +1 -1
  119. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +1 -1
  120. package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +1 -1
  121. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +3 -5
  122. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -1
  123. package/dist/esm/plugins/layout/pm-plugins/main.js +1 -1
  124. package/dist/esm/plugins/list/actions/conversions.js +2 -2
  125. package/dist/esm/plugins/list/actions/indent-list-items-selected.js +2 -2
  126. package/dist/esm/plugins/list/actions/join-list-items-forward.js +1 -1
  127. package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +1 -2
  128. package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +2 -2
  129. package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +2 -2
  130. package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js +1 -1
  131. package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.js +1 -1
  132. package/dist/esm/plugins/list/actions/merge-lists.js +1 -1
  133. package/dist/esm/plugins/list/actions/outdent-list-items-selected.js +3 -3
  134. package/dist/esm/plugins/list/actions/wrap-and-join-lists.js +1 -1
  135. package/dist/esm/plugins/list/commands/indent-list.js +3 -4
  136. package/dist/esm/plugins/list/commands/index.js +4 -5
  137. package/dist/esm/plugins/list/commands/join-list-item-forward.js +1 -1
  138. package/dist/esm/plugins/list/commands/listBackspace.js +1 -2
  139. package/dist/esm/plugins/list/commands/outdent-list.js +3 -2
  140. package/dist/esm/plugins/list/pm-plugins/main.js +1 -1
  141. package/dist/esm/plugins/list/utils/analytics.js +0 -32
  142. package/dist/esm/plugins/list/utils/indentation.js +0 -17
  143. package/dist/esm/plugins/list/utils/node.js +3 -81
  144. package/dist/esm/plugins/list/utils/selection.js +3 -51
  145. package/dist/esm/plugins/tasks-and-decisions/commands.js +1 -1
  146. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/keymaps.js +1 -2
  147. package/dist/esm/plugins/text-color/commands/toggle-color.js +1 -1
  148. package/dist/esm/plugins/text-formatting/commands/text-formatting.js +1 -1
  149. package/dist/esm/plugins/text-formatting/commands/transform-to-code.js +1 -1
  150. package/dist/esm/plugins/text-formatting/pm-plugins/clear-formatting.js +2 -2
  151. package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
  152. package/dist/esm/plugins/text-formatting/pm-plugins/main.js +2 -1
  153. package/dist/esm/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +1 -1
  154. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +1 -2
  155. package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +2 -1
  156. package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +1 -1
  157. package/dist/esm/ui/Appearance/Comment/Comment.js +4 -5
  158. package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -2
  159. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -3
  160. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -2
  161. package/dist/esm/ui/Dropdown/index.js +1 -2
  162. package/dist/esm/ui/ElementBrowser/InsertMenu.js +1 -0
  163. package/dist/esm/ui/styles.js +2 -3
  164. package/dist/esm/utils/commands.js +2 -211
  165. package/dist/esm/utils/document.js +1 -26
  166. package/dist/esm/utils/index.js +1 -13
  167. package/dist/esm/version-wrapper.js +1 -1
  168. package/dist/esm/version.json +1 -1
  169. package/dist/types/create-editor/ReactEditorViewInternal.d.ts +0 -1
  170. package/dist/types/index.d.ts +1 -1
  171. package/dist/types/plugins/block-type/commands/block-type.d.ts +1 -2
  172. package/dist/types/plugins/code-block/ide-ux/quote-handling.d.ts +1 -1
  173. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.d.ts +1 -1
  174. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +1 -1
  175. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/item.d.ts +1 -1
  176. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/sort-items.d.ts +1 -1
  177. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +1 -1
  178. package/dist/types/plugins/list/actions/join-list-items-forward.d.ts +1 -1
  179. package/dist/types/plugins/list/commands/indent-list.d.ts +2 -1
  180. package/dist/types/plugins/list/commands/index.d.ts +2 -1
  181. package/dist/types/plugins/list/commands/join-list-item-forward.d.ts +1 -1
  182. package/dist/types/plugins/list/commands/listBackspace.d.ts +1 -1
  183. package/dist/types/plugins/list/commands/outdent-list.d.ts +2 -1
  184. package/dist/types/plugins/list/utils/analytics.d.ts +2 -4
  185. package/dist/types/plugins/list/utils/indentation.d.ts +0 -5
  186. package/dist/types/plugins/list/utils/node.d.ts +2 -17
  187. package/dist/types/plugins/list/utils/selection.d.ts +1 -12
  188. package/dist/types/plugins/text-color/commands/toggle-color.d.ts +1 -1
  189. package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +2 -2
  190. package/dist/types/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +1 -1
  191. package/dist/types/types/editor-appearance-component.d.ts +4 -4
  192. package/dist/types/types/editor-instance.d.ts +1 -1
  193. package/dist/types/types/editor-props.d.ts +5 -8
  194. package/dist/types/ui/Appearance/Comment/Comment.d.ts +2 -2
  195. package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +1 -2
  196. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  197. package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
  198. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  199. package/dist/types/ui/ElementBrowser/InsertMenu.d.ts +1 -1
  200. package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
  201. package/dist/types/ui/ElementBrowser/types.d.ts +1 -1
  202. package/dist/types/ui/styles.d.ts +0 -1
  203. package/dist/types/utils/commands.d.ts +3 -42
  204. package/dist/types/utils/document.d.ts +0 -4
  205. package/dist/types/utils/index.d.ts +1 -5
  206. package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +0 -1
  207. package/dist/types-ts4.5/index.d.ts +1 -1
  208. package/dist/types-ts4.5/plugins/block-type/commands/block-type.d.ts +1 -2
  209. package/dist/types-ts4.5/plugins/code-block/ide-ux/quote-handling.d.ts +1 -1
  210. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.d.ts +1 -1
  211. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +1 -1
  212. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/item.d.ts +1 -1
  213. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/sort-items.d.ts +1 -1
  214. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +1 -1
  215. package/dist/types-ts4.5/plugins/list/actions/join-list-items-forward.d.ts +1 -1
  216. package/dist/types-ts4.5/plugins/list/commands/indent-list.d.ts +2 -1
  217. package/dist/types-ts4.5/plugins/list/commands/index.d.ts +2 -1
  218. package/dist/types-ts4.5/plugins/list/commands/join-list-item-forward.d.ts +1 -1
  219. package/dist/types-ts4.5/plugins/list/commands/listBackspace.d.ts +1 -1
  220. package/dist/types-ts4.5/plugins/list/commands/outdent-list.d.ts +2 -1
  221. package/dist/types-ts4.5/plugins/list/utils/analytics.d.ts +2 -4
  222. package/dist/types-ts4.5/plugins/list/utils/indentation.d.ts +0 -5
  223. package/dist/types-ts4.5/plugins/list/utils/node.d.ts +2 -17
  224. package/dist/types-ts4.5/plugins/list/utils/selection.d.ts +1 -12
  225. package/dist/types-ts4.5/plugins/text-color/commands/toggle-color.d.ts +1 -1
  226. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +2 -2
  227. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +1 -1
  228. package/dist/types-ts4.5/types/editor-appearance-component.d.ts +4 -4
  229. package/dist/types-ts4.5/types/editor-instance.d.ts +1 -1
  230. package/dist/types-ts4.5/types/editor-props.d.ts +5 -8
  231. package/dist/types-ts4.5/ui/Appearance/Comment/Comment.d.ts +2 -2
  232. package/dist/types-ts4.5/ui/Appearance/Comment/Toolbar.d.ts +1 -2
  233. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  234. package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +1 -1
  235. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
  236. package/dist/types-ts4.5/ui/ElementBrowser/InsertMenu.d.ts +1 -1
  237. package/dist/types-ts4.5/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
  238. package/dist/types-ts4.5/ui/ElementBrowser/types.d.ts +1 -1
  239. package/dist/types-ts4.5/ui/styles.d.ts +0 -1
  240. package/dist/types-ts4.5/utils/commands.d.ts +3 -48
  241. package/dist/types-ts4.5/utils/document.d.ts +0 -4
  242. package/dist/types-ts4.5/utils/index.d.ts +1 -5
  243. package/package.json +3 -3
  244. package/report.api.md +2 -13
  245. package/tmp/api-report-tmp.d.ts +2 -10
  246. package/dist/cjs/plugins/list/utils/replace-content.js +0 -24
  247. package/dist/cjs/ui/Appearance/FullPage/messages.js +0 -25
  248. package/dist/cjs/ui/DropdownMenu/index.js +0 -31
  249. package/dist/cjs/ui/DropdownMenu/types.js +0 -5
  250. package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +0 -218
  251. package/dist/cjs/utils/prosemirror/autojoin.js +0 -68
  252. package/dist/es2019/plugins/list/utils/replace-content.js +0 -18
  253. package/dist/es2019/ui/Appearance/FullPage/messages.js +0 -18
  254. package/dist/es2019/ui/DropdownMenu/index.js +0 -18
  255. package/dist/es2019/ui/DropdownMenu/types.js +0 -1
  256. package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +0 -205
  257. package/dist/es2019/utils/prosemirror/autojoin.js +0 -57
  258. package/dist/esm/plugins/list/utils/replace-content.js +0 -17
  259. package/dist/esm/ui/Appearance/FullPage/messages.js +0 -18
  260. package/dist/esm/ui/DropdownMenu/index.js +0 -20
  261. package/dist/esm/ui/DropdownMenu/types.js +0 -1
  262. package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +0 -205
  263. package/dist/esm/utils/prosemirror/autojoin.js +0 -63
  264. package/dist/types/plugins/list/utils/replace-content.d.ts +0 -8
  265. package/dist/types/ui/Appearance/FullPage/messages.d.ts +0 -18
  266. package/dist/types/ui/DropdownMenu/index.d.ts +0 -3
  267. package/dist/types/ui/DropdownMenu/types.d.ts +0 -1
  268. package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +0 -31
  269. package/dist/types/utils/prosemirror/autojoin.d.ts +0 -13
  270. package/dist/types-ts4.5/plugins/list/utils/replace-content.d.ts +0 -8
  271. package/dist/types-ts4.5/ui/Appearance/FullPage/messages.d.ts +0 -18
  272. package/dist/types-ts4.5/ui/DropdownMenu/index.d.ts +0 -3
  273. package/dist/types-ts4.5/ui/DropdownMenu/types.d.ts +0 -1
  274. package/dist/types-ts4.5/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +0 -31
  275. package/dist/types-ts4.5/utils/prosemirror/autojoin.d.ts +0 -13
@@ -1,17 +0,0 @@
1
- import { ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
2
- export var moveTargetIntoList = function moveTargetIntoList(_ref) {
3
- var _$target$nodeAfter;
4
- var insertPosition = _ref.insertPosition,
5
- $target = _ref.$target;
6
- // take the text content of the paragraph and insert after the paragraph up until before the the cut
7
- var from = insertPosition;
8
- var to = $target.pos + (((_$target$nodeAfter = $target.nodeAfter) === null || _$target$nodeAfter === void 0 ? void 0 : _$target$nodeAfter.nodeSize) || 0); //$cut.pos + $cut.nodeAfter.nodeSize;
9
- var gapFrom = $target.posAtIndex(0, $target.depth + 1); // start pos of the child
10
- var gapTo = $target.doc.resolve(gapFrom).end(); // end pos of the paragraph
11
-
12
- if (gapTo - gapFrom === 0) {
13
- return new ReplaceStep(from, to, $target.doc.slice(insertPosition, $target.pos));
14
- }
15
- var step = new ReplaceAroundStep(from, to, gapFrom, gapTo, $target.doc.slice(insertPosition, $target.pos), 0, true);
16
- return step;
17
- };
@@ -1,18 +0,0 @@
1
- import { defineMessages } from 'react-intl-next';
2
- export default defineMessages({
3
- toolbarLabel: {
4
- id: 'fabric.editor.toolbarLabel',
5
- defaultMessage: 'Editor toolbar',
6
- description: 'Label for the ARIA region landmark'
7
- },
8
- pageActionsLabel: {
9
- id: 'fabric.editor.pageActionsLabel',
10
- defaultMessage: 'Page actions',
11
- description: 'Label for the ARIA region landmark'
12
- },
13
- editableContentLabel: {
14
- id: 'fabric.editor.editableContentLabel',
15
- defaultMessage: 'Editable content',
16
- description: 'Label for the ARIA region landmark'
17
- }
18
- });
@@ -1,20 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
3
- import _extends from "@babel/runtime/helpers/extends";
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
- import { DropdownMenu as DropdownComponent } from '@atlaskit/editor-common/ui-menu';
7
- import React, { useContext } from 'react';
8
- import { KeyDownHandlerContext } from '../ToolbarArrowKeyNavigationProvider';
9
- var DropdownMenu = /*#__PURE__*/React.memo(function (_ref) {
10
- var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
11
- var keyDownHandlerContext = useContext(KeyDownHandlerContext);
12
- //This context is to handle the tab, Arrow Right/Left key events for dropdown.
13
- //Default context has the void callbacks for above key events
14
- return /*#__PURE__*/React.createElement(DropdownComponent, _extends({
15
- arrowKeyNavigationProviderOptions: _objectSpread(_objectSpread({}, props.arrowKeyNavigationProviderOptions), {}, {
16
- keyDownHandlerContext: keyDownHandlerContext
17
- })
18
- }, props));
19
- });
20
- export default DropdownMenu;
@@ -1 +0,0 @@
1
- export {};
@@ -1,205 +0,0 @@
1
- /** @jsx jsx */
2
- /* eslint-disable no-console */
3
- import { jsx } from '@emotion/react';
4
- import { centeredToolbarContainer } from '../styles';
5
- import React, { useCallback, useLayoutEffect, useRef } from 'react';
6
- import { EDIT_AREA_ID } from '../../create-editor/ReactEditorViewInternal';
7
- import messages from '../Appearance/FullPage/messages';
8
- /*
9
- ** The context is used to handle the keydown events of submenus.
10
- ** Because the keyboard navigation is explicitly managed for main toolbar items
11
- ** Few key presses such as Tab,Arrow Right/Left need ot be handled here via context
12
- */
13
- export var KeyDownHandlerContext = /*#__PURE__*/React.createContext({
14
- handleArrowLeft: function handleArrowLeft() {},
15
- handleArrowRight: function handleArrowRight() {},
16
- handleTab: function handleTab() {}
17
- });
18
-
19
- /**
20
- * This component is a wrapper of main toolbar which listens to keydown events of children
21
- * and handles left/right arrow key navigation for all focusable elements
22
- * @param
23
- * @returns
24
- */
25
- export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigationProvider(_ref) {
26
- var children = _ref.children,
27
- editorView = _ref.editorView,
28
- childComponentSelector = _ref.childComponentSelector,
29
- handleEscape = _ref.handleEscape,
30
- disableArrowKeyNavigation = _ref.disableArrowKeyNavigation,
31
- isShortcutToFocusToolbar = _ref.isShortcutToFocusToolbar,
32
- editorAppearance = _ref.editorAppearance,
33
- useStickyToolbar = _ref.useStickyToolbar,
34
- intl = _ref.intl;
35
- var wrapperRef = useRef(null);
36
- var selectedItemIndex = useRef(0);
37
- var incrementIndex = useCallback(function (list) {
38
- var index = 0;
39
- if (document.activeElement) {
40
- index = list.indexOf(document.activeElement);
41
- index = (index + 1) % list.length;
42
- }
43
- selectedItemIndex.current = index;
44
- }, []);
45
- var decrementIndex = useCallback(function (list) {
46
- var index = 0;
47
- if (document.activeElement) {
48
- index = list.indexOf(document.activeElement);
49
- index = (list.length + index - 1) % list.length;
50
- }
51
- selectedItemIndex.current = index;
52
- }, []);
53
- var handleArrowRight = function handleArrowRight() {
54
- var _filteredFocusableEle;
55
- var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
56
- incrementIndex(filteredFocusableElements);
57
- (_filteredFocusableEle = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle === void 0 ? void 0 : _filteredFocusableEle.focus();
58
- };
59
- var handleArrowLeft = function handleArrowLeft() {
60
- var _filteredFocusableEle2;
61
- var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
62
- decrementIndex(filteredFocusableElements);
63
- (_filteredFocusableEle2 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle2 === void 0 ? void 0 : _filteredFocusableEle2.focus();
64
- };
65
- var handleTab = function handleTab() {
66
- var _filteredFocusableEle3;
67
- var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
68
- (_filteredFocusableEle3 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle3 === void 0 ? void 0 : _filteredFocusableEle3.focus();
69
- };
70
- var handleTabLocal = function handleTabLocal() {
71
- var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
72
- filteredFocusableElements.forEach(function (element) {
73
- element.setAttribute('tabindex', '-1');
74
- });
75
- filteredFocusableElements[selectedItemIndex.current].setAttribute('tabindex', '0');
76
- };
77
- var focusAndScrollToElement = function focusAndScrollToElement(element) {
78
- var scrollToElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
79
- if (scrollToElement) {
80
- element === null || element === void 0 ? void 0 : element.scrollIntoView({
81
- behavior: 'smooth',
82
- block: 'center',
83
- inline: 'nearest'
84
- });
85
- }
86
- element.focus();
87
- };
88
- var submenuKeydownHandleContext = {
89
- handleArrowLeft: handleArrowLeft,
90
- handleArrowRight: handleArrowRight,
91
- handleTab: handleTab
92
- };
93
- useLayoutEffect(function () {
94
- if (!wrapperRef.current || disableArrowKeyNavigation) {
95
- return;
96
- }
97
- var element = wrapperRef.current;
98
-
99
- /**
100
- * To handle the key events on the list
101
- * @param event
102
- */
103
- var handleKeyDown = function handleKeyDown(event) {
104
- var _document$querySelect, _document$querySelect2, _wrapperRef$current;
105
- //To trap the focus inside the horizontal toolbar for left and right arrow keys
106
- var targetElement = event.target;
107
-
108
- //To filter out the events outside the child component
109
- if (!targetElement.closest("".concat(childComponentSelector))) {
110
- return;
111
- }
112
-
113
- //The key events are from child components such as dropdown menus / popups are ignored
114
- if ((_document$querySelect = document.querySelector('[data-role="droplistContent"], [data-test-id="color-picker-menu"], [data-emoji-picker-container="true"]')) !== null && _document$querySelect !== void 0 && _document$querySelect.contains(targetElement) || (_document$querySelect2 = document.querySelector('[data-test-id="color-picker-menu"]')) !== null && _document$querySelect2 !== void 0 && _document$querySelect2.contains(targetElement) || event.key === 'ArrowUp' || event.key === 'ArrowDown' || disableArrowKeyNavigation) {
115
- return;
116
- }
117
- var menuWrapper = document.querySelector('.menu-key-handler-wrapper');
118
- if (menuWrapper) {
119
- // if menu wrapper exists, then a menu is open and arrow keys will be handled by MenuArrowKeyNavigationProvider
120
- return;
121
- }
122
- var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
123
- if (!filteredFocusableElements || (filteredFocusableElements === null || filteredFocusableElements === void 0 ? void 0 : filteredFocusableElements.length) === 0) {
124
- return;
125
- }
126
-
127
- //This is kind of hack to reset the current focused toolbar item
128
- //to handle some use cases such as Tab in/out of main toolbar
129
- if (!((_wrapperRef$current = wrapperRef.current) !== null && _wrapperRef$current !== void 0 && _wrapperRef$current.contains(targetElement))) {
130
- selectedItemIndex.current = -1;
131
- } else {
132
- selectedItemIndex.current = filteredFocusableElements.indexOf(targetElement) > -1 ? filteredFocusableElements.indexOf(targetElement) : selectedItemIndex.current;
133
- }
134
-
135
- //do not scroll to focused element for sticky toolbar when navigating with arrows to avoid unnesessary scroll jump
136
- var allowScrollToElement = !(editorAppearance === 'comment' && !!useStickyToolbar);
137
- switch (event.key) {
138
- case 'ArrowRight':
139
- incrementIndex(filteredFocusableElements);
140
- focusAndScrollToElement(filteredFocusableElements[selectedItemIndex.current], allowScrollToElement);
141
- event.preventDefault();
142
- break;
143
- case 'ArrowLeft':
144
- decrementIndex(filteredFocusableElements);
145
- focusAndScrollToElement(filteredFocusableElements[selectedItemIndex.current], allowScrollToElement);
146
- event.preventDefault();
147
- break;
148
- case 'Tab':
149
- handleTabLocal();
150
- break;
151
- case 'Escape':
152
- handleEscape(event);
153
- break;
154
- default:
155
- }
156
- };
157
- var globalKeyDownHandler = function globalKeyDownHandler(event) {
158
- //To focus the first element in the toolbar
159
- if (isShortcutToFocusToolbar(event)) {
160
- var _filteredFocusableEle4, _filteredFocusableEle5;
161
- var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
162
- (_filteredFocusableEle4 = filteredFocusableElements[0]) === null || _filteredFocusableEle4 === void 0 ? void 0 : _filteredFocusableEle4.focus();
163
- (_filteredFocusableEle5 = filteredFocusableElements[0]) === null || _filteredFocusableEle5 === void 0 ? void 0 : _filteredFocusableEle5.scrollIntoView({
164
- behavior: 'smooth',
165
- block: 'center',
166
- inline: 'nearest'
167
- });
168
- }
169
- };
170
- element === null || element === void 0 ? void 0 : element.addEventListener('keydown', handleKeyDown);
171
- var editorViewDom = editorView === null || editorView === void 0 ? void 0 : editorView.dom;
172
- if (isShortcutToFocusToolbar) {
173
- editorViewDom === null || editorViewDom === void 0 ? void 0 : editorViewDom.addEventListener('keydown', globalKeyDownHandler);
174
- }
175
- return function () {
176
- element === null || element === void 0 ? void 0 : element.removeEventListener('keydown', handleKeyDown);
177
- if (isShortcutToFocusToolbar) {
178
- editorViewDom === null || editorViewDom === void 0 ? void 0 : editorViewDom.removeEventListener('keydown', globalKeyDownHandler);
179
- }
180
- };
181
- }, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar]);
182
- return jsx("div", {
183
- css: editorAppearance === 'comment' && centeredToolbarContainer,
184
- className: "custom-key-handler-wrapper",
185
- ref: wrapperRef,
186
- role: "toolbar",
187
- "aria-label": intl.formatMessage(messages.toolbarLabel),
188
- "aria-controls": EDIT_AREA_ID
189
- }, jsx(KeyDownHandlerContext.Provider, {
190
- value: submenuKeydownHandleContext
191
- }, children));
192
- };
193
- function getFocusableElements(rootNode) {
194
- if (!rootNode) {
195
- return [];
196
- }
197
- var focusableModalElements = rootNode.querySelectorAll('a[href], button:not([disabled]), textarea, input, select, div[tabindex="-1"], div[tabindex="0"]') || [];
198
- return Array.from(focusableModalElements);
199
- }
200
- function getFilteredFocusableElements(rootNode) {
201
- //The focusable elements from child components such as dropdown menus / popups are ignored
202
- return getFocusableElements(rootNode).filter(function (elm) {
203
- return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('.scroll-buttons');
204
- });
205
- }
@@ -1,63 +0,0 @@
1
- import { canJoin } from '@atlaskit/editor-prosemirror/transform';
2
-
3
- /**
4
- * Checks whether two adjacent nodes can be joined. If so, the document
5
- * will be updated to join those nodes. If not, the original transaction
6
- * remains untouched.
7
- *
8
- * Nodes are considered joinable if the `isJoinable` predicate returns true or,
9
- * if an array of strings was passed, if their node type name is in that array.
10
- *
11
- * Adapted from https://github.com/ProseMirror/prosemirror-commands/blob/master/src/commands.js#L597-L610
12
- */
13
- export function autoJoinTr(tr, isJoinable) {
14
- if (Array.isArray(isJoinable)) {
15
- var types = isJoinable;
16
- isJoinable = function isJoinable(node) {
17
- return types.indexOf(node.type.name) > -1;
18
- };
19
- }
20
- var ranges = [];
21
- for (var i = 0; i < tr.mapping.maps.length; i++) {
22
- var map = tr.mapping.maps[i];
23
- for (var j = 0; j < ranges.length; j++) {
24
- ranges[j] = map.map(ranges[j]);
25
- }
26
- map.forEach(function (_s, _e, from, to) {
27
- return ranges.push(from, to);
28
- });
29
- }
30
-
31
- // Figure out which joinable points exist inside those ranges,
32
- // by checking all node boundaries in their parent nodes.
33
- var joinable = [];
34
- for (var _i = 0; _i < ranges.length; _i += 2) {
35
- var from = ranges[_i];
36
- var to = ranges[_i + 1];
37
- var $from = tr.doc.resolve(from);
38
- var depth = $from.sharedDepth(to);
39
- var parent = $from.node(depth);
40
- for (var index = $from.indexAfter(depth), pos = $from.after(depth + 1); pos <= to; ++index) {
41
- var _after = parent.maybeChild(index);
42
- if (!_after) {
43
- break;
44
- }
45
- if (index && joinable.indexOf(pos) === -1) {
46
- var _before = parent.child(index - 1);
47
- if (_before.type === _after.type && isJoinable(_before, _after)) {
48
- joinable.push(pos);
49
- }
50
- }
51
- pos += _after.nodeSize;
52
- }
53
- }
54
- // Join the joinable points
55
- joinable.sort(function (a, b) {
56
- return a - b;
57
- });
58
- for (var _i2 = joinable.length - 1; _i2 >= 0; _i2--) {
59
- if (canJoin(tr.doc, joinable[_i2])) {
60
- tr.join(joinable[_i2]);
61
- }
62
- }
63
- }
@@ -1,8 +0,0 @@
1
- import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import type { Step } from '@atlaskit/editor-prosemirror/transform';
3
- type Params = {
4
- insertPosition: number;
5
- $target: ResolvedPos;
6
- };
7
- export declare const moveTargetIntoList: ({ insertPosition, $target, }: Params) => Step;
8
- export {};
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- toolbarLabel: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- pageActionsLabel: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- editableContentLabel: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- };
18
- export default _default;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const DropdownMenu: React.FC<any>;
3
- export default DropdownMenu;
@@ -1 +0,0 @@
1
- export type { MenuItem } from '@atlaskit/editor-common/ui-menu';
@@ -1,31 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import type { EditorAppearance } from '../../types';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { ReactNode } from 'react';
6
- import React from 'react';
7
- import type { UseStickyToolbarType } from '../../types/editor-props';
8
- import type { IntlShape } from 'react-intl-next/src/types';
9
- export interface KeyDownHandlerContext {
10
- handleArrowLeft: () => void;
11
- handleArrowRight: () => void;
12
- handleTab: () => void;
13
- }
14
- export declare const KeyDownHandlerContext: React.Context<KeyDownHandlerContext>;
15
- /**
16
- * This component is a wrapper of main toolbar which listens to keydown events of children
17
- * and handles left/right arrow key navigation for all focusable elements
18
- * @param
19
- * @returns
20
- */
21
- export declare const ToolbarArrowKeyNavigationProvider: ({ children, editorView, childComponentSelector, handleEscape, disableArrowKeyNavigation, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar, intl, }: {
22
- children: ReactNode;
23
- editorView?: EditorView | undefined;
24
- childComponentSelector: string;
25
- handleEscape?: ((event: KeyboardEvent) => void) | undefined;
26
- disableArrowKeyNavigation?: boolean | undefined;
27
- isShortcutToFocusToolbar?: ((event: KeyboardEvent) => boolean) | undefined;
28
- editorAppearance?: EditorAppearance | undefined;
29
- useStickyToolbar?: UseStickyToolbarType | undefined;
30
- intl: IntlShape;
31
- }) => jsx.JSX.Element;
@@ -1,13 +0,0 @@
1
- import type { Node } from '@atlaskit/editor-prosemirror/model';
2
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
- /**
4
- * Checks whether two adjacent nodes can be joined. If so, the document
5
- * will be updated to join those nodes. If not, the original transaction
6
- * remains untouched.
7
- *
8
- * Nodes are considered joinable if the `isJoinable` predicate returns true or,
9
- * if an array of strings was passed, if their node type name is in that array.
10
- *
11
- * Adapted from https://github.com/ProseMirror/prosemirror-commands/blob/master/src/commands.js#L597-L610
12
- */
13
- export declare function autoJoinTr(tr: Transaction, isJoinable: ((before: Node, after: Node) => boolean) | string[]): void;
@@ -1,8 +0,0 @@
1
- import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import type { Step } from '@atlaskit/editor-prosemirror/transform';
3
- type Params = {
4
- insertPosition: number;
5
- $target: ResolvedPos;
6
- };
7
- export declare const moveTargetIntoList: ({ insertPosition, $target, }: Params) => Step;
8
- export {};
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- toolbarLabel: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- pageActionsLabel: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- editableContentLabel: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- };
18
- export default _default;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const DropdownMenu: React.FC<any>;
3
- export default DropdownMenu;
@@ -1 +0,0 @@
1
- export type { MenuItem } from '@atlaskit/editor-common/ui-menu';
@@ -1,31 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import type { EditorAppearance } from '../../types';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { ReactNode } from 'react';
6
- import React from 'react';
7
- import type { UseStickyToolbarType } from '../../types/editor-props';
8
- import type { IntlShape } from 'react-intl-next/src/types';
9
- export interface KeyDownHandlerContext {
10
- handleArrowLeft: () => void;
11
- handleArrowRight: () => void;
12
- handleTab: () => void;
13
- }
14
- export declare const KeyDownHandlerContext: React.Context<KeyDownHandlerContext>;
15
- /**
16
- * This component is a wrapper of main toolbar which listens to keydown events of children
17
- * and handles left/right arrow key navigation for all focusable elements
18
- * @param
19
- * @returns
20
- */
21
- export declare const ToolbarArrowKeyNavigationProvider: ({ children, editorView, childComponentSelector, handleEscape, disableArrowKeyNavigation, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar, intl, }: {
22
- children: ReactNode;
23
- editorView?: EditorView | undefined;
24
- childComponentSelector: string;
25
- handleEscape?: ((event: KeyboardEvent) => void) | undefined;
26
- disableArrowKeyNavigation?: boolean | undefined;
27
- isShortcutToFocusToolbar?: ((event: KeyboardEvent) => boolean) | undefined;
28
- editorAppearance?: EditorAppearance | undefined;
29
- useStickyToolbar?: UseStickyToolbarType | undefined;
30
- intl: IntlShape;
31
- }) => jsx.JSX.Element;
@@ -1,13 +0,0 @@
1
- import type { Node } from '@atlaskit/editor-prosemirror/model';
2
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
- /**
4
- * Checks whether two adjacent nodes can be joined. If so, the document
5
- * will be updated to join those nodes. If not, the original transaction
6
- * remains untouched.
7
- *
8
- * Nodes are considered joinable if the `isJoinable` predicate returns true or,
9
- * if an array of strings was passed, if their node type name is in that array.
10
- *
11
- * Adapted from https://github.com/ProseMirror/prosemirror-commands/blob/master/src/commands.js#L597-L610
12
- */
13
- export declare function autoJoinTr(tr: Transaction, isJoinable: ((before: Node, after: Node) => boolean) | string[]): void;