@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,10 +1,10 @@
1
1
  import { Selection, TextSelection, NodeSelection } from '@atlaskit/editor-prosemirror/state';
2
2
  import { NodeRange, Slice, Fragment } from '@atlaskit/editor-prosemirror/model';
3
3
  import { liftTarget, ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
4
- import { getOrderFromOrderedListNode } from '@atlaskit/editor-common/utils';
5
- import { isListNode, isListItemNode, joinSiblingLists, JoinDirection } from '../utils/node';
4
+ import { getOrderFromOrderedListNode, isListNode, isListItemNode } from '@atlaskit/editor-common/utils';
5
+ import { joinSiblingLists, JoinDirection, normalizeListItemsSelection } from '@atlaskit/editor-common/lists';
6
6
  import { findFirstParentListItemNode, findRootParentListNode } from '../utils/find';
7
- import { normalizeListItemsSelection, createListNodeRange } from '../utils/selection';
7
+ import { createListNodeRange } from '../utils/selection';
8
8
  import { GapCursorSelection } from '../../selection/gap-cursor-selection';
9
9
  import { storeRestartListsAttributes, getRestartListsAttributes } from '../utils/analytics';
10
10
  import { OUTDENT_SCENARIOS } from '@atlaskit/editor-common/analytics';
@@ -1,6 +1,6 @@
1
1
  import { Fragment, Slice, NodeRange } from '@atlaskit/editor-prosemirror/model';
2
2
  import { ReplaceAroundStep, findWrapping, canSplit } from '@atlaskit/editor-prosemirror/transform';
3
- import { autoJoinTr } from '../../../utils/prosemirror/autojoin';
3
+ import { autoJoinTr } from '@atlaskit/editor-common/utils';
4
4
  import { GapCursorSelection } from '../../selection/gap-cursor-selection';
5
5
  import { isWrappingPossible } from '../utils/selection';
6
6
 
@@ -1,11 +1,10 @@
1
1
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import { hasValidListIndentationLevel } from '../utils/indentation';
2
+ import { hasValidListIndentationLevel, getListItemAttributes, getCommonListAnalyticsAttributes } from '@atlaskit/editor-common/lists';
3
3
  import { indentListItemsSelected as indentListAction } from '../actions/indent-list-items-selected';
4
- import { isBulletList } from '../utils/node';
4
+ import { isBulletList } from '@atlaskit/editor-common/utils';
5
5
  import { findFirstParentListNode } from '../utils/find';
6
6
  import { MAX_NESTED_LIST_INDENTATION } from '../types';
7
- import { isInsideListItem, isInsideTableCell, getListItemAttributes } from '../utils/selection';
8
- import { getCommonListAnalyticsAttributes } from '../utils/analytics';
7
+ import { isInsideListItem, isInsideTableCell } from '../utils/selection';
9
8
  import { closeHistory } from '@atlaskit/editor-prosemirror/history';
10
9
  export const indentList = editorAnalyticsAPI => (inputMethod = INPUT_METHOD.KEYBOARD) => {
11
10
  return function (state, dispatch) {
@@ -2,22 +2,21 @@ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
2
2
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import * as baseCommand from '@atlaskit/editor-prosemirror/commands';
4
4
  import { findPositionOfNodeBefore, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
5
- import { hasVisibleContent } from '../../../utils/document';
6
- import { findCutBefore, isEmptySelectionAtStart, isFirstChildOfParent } from '../../../utils/commands';
7
- import { filterCommands as filter } from '@atlaskit/editor-common/utils';
5
+ import { filterCommand as filter, hasVisibleContent, isEmptySelectionAtStart } from '@atlaskit/editor-common/utils';
6
+ import { isFirstChildOfParent, findCutBefore } from '../../../utils/commands';
8
7
  import { sanitiseMarksInSelection } from '../../../utils';
8
+ import { getCommonListAnalyticsAttributes } from '@atlaskit/editor-common/lists';
9
9
  import { liftFollowingList, liftTextSelectionList, liftNodeSelectionList } from '../transforms';
10
10
  import { GapCursorSelection } from '../../selection/gap-cursor-selection';
11
11
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
12
12
  import { isInsideListItem, canJoinToPreviousListItem, selectionContainsList } from '../utils/selection';
13
- import { getCommonListAnalyticsAttributes } from '../utils/analytics';
14
13
  import { listBackspace } from './listBackspace';
15
14
  import { joinListItemForward } from './join-list-item-forward';
16
15
  import { convertListType } from '../actions/conversions';
17
16
  import { wrapInListAndJoin } from '../actions/wrap-and-join-lists';
18
17
  import { outdentList } from './outdent-list';
19
18
  import { indentList } from './indent-list';
20
- import { moveTargetIntoList } from '../utils/replace-content';
19
+ import { moveTargetIntoList } from '@atlaskit/editor-common/lists';
21
20
  export { outdentList, indentList };
22
21
  export const enterKeyCommand = editorAnalyticsAPI => featureFlags => (state, dispatch) => {
23
22
  const {
@@ -1,4 +1,4 @@
1
- import { isEmptySelectionAtEnd, walkNextNode } from '../../../utils/commands';
1
+ import { isEmptySelectionAtEnd, walkNextNode } from '@atlaskit/editor-common/utils';
2
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, DELETE_DIRECTION } from '@atlaskit/editor-common/analytics';
3
3
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
4
4
  import { calcJoinListScenario } from '../actions/join-list-items-forward';
@@ -1,7 +1,6 @@
1
- import { insertContentDeleteRange, isEmptySelectionAtStart, walkPrevNode } from '../../../utils/commands';
1
+ import { insertContentDeleteRange, isEmptySelectionAtStart, walkPrevNode, isListNode, isParagraphNode } from '@atlaskit/editor-common/utils';
2
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, DELETE_DIRECTION, LIST_TEXT_SCENARIOS } from '@atlaskit/editor-common/analytics';
3
3
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
4
- import { isListNode, isParagraphNode } from '@atlaskit/editor-common/utils';
5
4
  import { isPosInsideList, isPosInsideParagraph } from '../utils/selection';
6
5
  //Cases below refer to the cases found in this document: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1146954996/List+Backspace+and+Delete+Behaviour
7
6
  //Case for two adjacent list items of the same indentation
@@ -1,8 +1,9 @@
1
+ import { getCommonListAnalyticsAttributes } from '@atlaskit/editor-common/lists';
1
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, OUTDENT_SCENARIOS } from '@atlaskit/editor-common/analytics';
2
3
  import { isInsideListItem, isInsideTableCell } from '../utils/selection';
3
- import { isBulletList } from '../utils/node';
4
+ import { isBulletList } from '@atlaskit/editor-common/utils';
4
5
  import { findFirstParentListNode } from '../utils/find';
5
- import { getCommonListAnalyticsAttributes, getRestartListsAttributes } from '../utils/analytics';
6
+ import { getRestartListsAttributes } from '../utils/analytics';
6
7
  import { outdentListItemsSelected as outdentListAction } from '../actions/outdent-list-items-selected';
7
8
  import { closeHistory } from '@atlaskit/editor-prosemirror/history';
8
9
  export const outdentList = editorAnalyticsAPI => (inputMethod = INPUT_METHOD.KEYBOARD, featureFlags) => {
@@ -3,7 +3,7 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
3
  import { DecorationSet, Decoration } from '@atlaskit/editor-prosemirror/view';
4
4
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
5
5
  import { isWrappingPossible } from '../utils/selection';
6
- import { isListNode } from '../utils/node';
6
+ import { isListNode } from '@atlaskit/editor-common/utils';
7
7
  import { pluginFactory } from '../../../utils/plugin-state-factory';
8
8
  import { setGapCursorSelection } from '../../../utils';
9
9
  import { Side } from '@atlaskit/editor-common/selection';
@@ -1,39 +1,3 @@
1
- import { isListItemNode, isListNode } from '@atlaskit/editor-common/utils';
2
- import { getListItemAttributes } from './selection';
3
- export const getCommonListAnalyticsAttributes = state => {
4
- const {
5
- selection: {
6
- $from,
7
- $to
8
- }
9
- } = state;
10
- const fromAttrs = getListItemAttributes($from);
11
- const toAttrs = getListItemAttributes($to);
12
- return {
13
- itemIndexAtSelectionStart: fromAttrs.itemIndex,
14
- itemIndexAtSelectionEnd: toAttrs.itemIndex,
15
- indentLevelAtSelectionStart: fromAttrs.indentLevel,
16
- indentLevelAtSelectionEnd: toAttrs.indentLevel,
17
- itemsInSelection: countListItemsInSelection(state)
18
- };
19
- };
20
- export const countListItemsInSelection = state => {
21
- const {
22
- from,
23
- to
24
- } = state.selection;
25
- if (from === to) {
26
- return 1;
27
- }
28
- let count = 0;
29
- const listSlice = state.doc.cut(from, to);
30
- listSlice.content.nodesBetween(0, listSlice.content.size, (node, pos, parent, index) => {
31
- if (parent && isListItemNode(parent) && !isListNode(node) && index === 0) {
32
- count++;
33
- }
34
- });
35
- return count;
36
- };
37
1
  export const RESTART_LISTS_ANALYTICS_KEY = 'restartListsAnalytics';
38
2
  export const getRestartListsAttributes = tr => {
39
3
  var _tr$getMeta;
@@ -1,4 +1,3 @@
1
- import { numberNestedLists } from './selection';
2
1
  import { isListItemNode, isListNode } from '@atlaskit/editor-common/utils';
3
2
 
4
3
  // This will return (depth - 1) for root list parent of a list.
@@ -14,21 +13,4 @@ export const getListLiftTarget = resPos => {
14
13
  }
15
14
  }
16
15
  return target - 1;
17
- };
18
- export const hasValidListIndentationLevel = ({
19
- tr,
20
- maxIndentation
21
- }) => {
22
- const initialIndentationLevel = numberNestedLists(tr.selection.$from);
23
- let currentIndentationLevel;
24
- let currentPos = tr.selection.$to.pos;
25
- do {
26
- const resolvedPos = tr.doc.resolve(currentPos);
27
- currentIndentationLevel = numberNestedLists(resolvedPos);
28
- if (currentIndentationLevel > maxIndentation) {
29
- return false;
30
- }
31
- currentPos++;
32
- } while (currentIndentationLevel >= initialIndentationLevel);
33
- return true;
34
16
  };
@@ -1,7 +1,6 @@
1
1
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
2
- export { isListNode, isListItemNode, isBulletList, isParagraphNode } from '@atlaskit/editor-common/utils';
3
- import { isListNode, isListItemNode } from '@atlaskit/editor-common/utils';
4
- function isListNodeValidContent(node) {
2
+ import { isListItemNode } from '@atlaskit/editor-common/utils';
3
+ export function isListNodeValidContent(node) {
5
4
  const {
6
5
  bulletList
7
6
  } = node.type.schema.nodes;
@@ -10,89 +9,4 @@ function isListNodeValidContent(node) {
10
9
  }
11
10
  const listFragment = Fragment.from(bulletList.createAndFill());
12
11
  return !isListItemNode(node) && node.type.validContent(listFragment);
13
- }
14
- export let JoinDirection = /*#__PURE__*/function (JoinDirection) {
15
- JoinDirection[JoinDirection["LEFT"] = 1] = "LEFT";
16
- JoinDirection[JoinDirection["RIGHT"] = -1] = "RIGHT";
17
- return JoinDirection;
18
- }({});
19
- export const joinSiblingLists = ({
20
- tr,
21
- direction,
22
- forceListType
23
- }) => {
24
- const result = {
25
- orderedList: 0,
26
- bulletList: 0
27
- };
28
- const {
29
- doc,
30
- selection: {
31
- $from,
32
- $to
33
- },
34
- selection
35
- } = tr;
36
- const range = $from.blockRange($to, isListNodeValidContent);
37
- if (!range) {
38
- return result;
39
- }
40
- const rootListNode = doc.nodeAt(range.start);
41
- const from = isListNode(rootListNode) ? range.start : 0;
42
- const to = isListNode(rootListNode) ? range.end : tr.doc.content.size;
43
- const joins = [];
44
- doc.nodesBetween(from, to, (node, pos, parent) => {
45
- const resolvedPos = doc.resolve(pos);
46
- const {
47
- nodeBefore,
48
- nodeAfter
49
- } = resolvedPos;
50
- if (!nodeBefore || !nodeAfter || !isListNode(nodeBefore) || !isListNode(nodeAfter)) {
51
- return;
52
- }
53
- const isNestedList = isListItemNode(parent);
54
- if (!isNestedList && nodeBefore.type !== nodeAfter.type && !forceListType) {
55
- return;
56
- }
57
- const index = resolvedPos.index();
58
- const positionPreviousNode = resolvedPos.posAtIndex(index - 1);
59
- const positionCurrentNode = resolvedPos.posAtIndex(index);
60
-
61
- // If the previous node is part of the selection, OR
62
- // If the previous node is not part of the selection and the previous node has the same list type that we’re converting to
63
- const joinBefore = positionPreviousNode >= from || nodeBefore.type === forceListType;
64
- if (forceListType) {
65
- if (joinBefore) {
66
- tr.setNodeMarkup(positionPreviousNode, forceListType);
67
- }
68
- tr.setNodeMarkup(positionCurrentNode, forceListType);
69
- }
70
- if (isNestedList && nodeBefore.type !== nodeAfter.type) {
71
- const nodeType = direction === JoinDirection.RIGHT ? nodeAfter.type : nodeBefore.type;
72
- tr.setNodeMarkup(positionPreviousNode, nodeType);
73
- }
74
- if (joinBefore) {
75
- joins.push(pos);
76
- }
77
- });
78
- if (selection.empty && rootListNode && isListNode(rootListNode)) {
79
- const resolvedPos = doc.resolve(range.start + rootListNode.nodeSize);
80
- const {
81
- nodeBefore,
82
- nodeAfter
83
- } = resolvedPos;
84
- if (nodeBefore && nodeAfter && isListNode(nodeBefore) && isListNode(nodeAfter) && nodeAfter.type === nodeBefore.type) {
85
- joins.push(resolvedPos.pos);
86
- }
87
- }
88
- for (let i = joins.length - 1; i >= 0; i--) {
89
- const listNode = tr.doc.nodeAt(joins[i]);
90
- const listName = listNode === null || listNode === void 0 ? void 0 : listNode.type.name;
91
- if (listName && (listName === 'orderedList' || listName === 'bulletList')) {
92
- const amount = result[listName] || 0;
93
- result[listName] = amount + 1;
94
- }
95
- tr.join(joins[i]);
96
- }
97
- return result;
98
- };
12
+ }
@@ -1,6 +1,5 @@
1
1
  import { findWrapping } from '@atlaskit/editor-prosemirror/transform';
2
- import { Selection, TextSelection, NodeSelection } from '@atlaskit/editor-prosemirror/state';
3
- import { findParentNodeClosestToPos, findParentNodeOfType, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
2
+ import { findParentNodeOfType, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
4
3
  import { GapCursorSelection } from '@atlaskit/editor-common/selection';
5
4
  import { isListItemNode, isListNode, isParagraphNode } from '@atlaskit/editor-common/utils';
6
5
  export const isPosInsideParagraph = $pos => {
@@ -82,56 +81,6 @@ export const selectionContainsList = tr => {
82
81
  });
83
82
  return foundListNode;
84
83
  };
85
- export const numberNestedLists = resolvedPos => {
86
- let count = 0;
87
- for (let i = resolvedPos.depth - 1; i > 0; i--) {
88
- const node = resolvedPos.node(i);
89
- if (isListNode(node)) {
90
- count += 1;
91
- }
92
- }
93
- return count;
94
- };
95
- export const getListItemAttributes = $pos => {
96
- const indentLevel = numberNestedLists($pos) - 1;
97
- const itemAtPos = findParentNodeClosestToPos($pos, isListItemNode);
98
-
99
- // Get the index of the current item relative to parent (parent is at item depth - 1)
100
- const itemIndex = $pos.index(itemAtPos ? itemAtPos.depth - 1 : undefined);
101
- return {
102
- indentLevel,
103
- itemIndex
104
- };
105
- };
106
- export const normalizeListItemsSelection = ({
107
- selection,
108
- doc
109
- }) => {
110
- if (selection.empty) {
111
- return selection;
112
- }
113
- const {
114
- $from,
115
- $to
116
- } = selection;
117
- if (selection instanceof NodeSelection) {
118
- const head = resolvePositionToStartOfListItem($from);
119
- return new TextSelection(head, head);
120
- }
121
- const head = resolvePositionToStartOfListItem($from);
122
- const anchor = resolvePositionToEndOfListItem($to);
123
- return new TextSelection(anchor, head);
124
- };
125
- const resolvePositionToStartOfListItem = $pos => {
126
- const fromRange = $pos.blockRange($pos, isListItemNode);
127
- const fromPosition = fromRange && $pos.textOffset === 0 && fromRange.end - 1 === $pos.pos ? Selection.near($pos.doc.resolve(fromRange.end + 1), 1).$from : $pos;
128
- return fromPosition;
129
- };
130
- const resolvePositionToEndOfListItem = $pos => {
131
- const toRange = $pos.blockRange($pos, isListItemNode);
132
- const toPosition = toRange && $pos.textOffset === 0 && toRange.start + 1 === $pos.pos ? Selection.near($pos.doc.resolve(toRange.start - 1), -1).$to : $pos;
133
- return toPosition;
134
- };
135
84
  export const createListNodeRange = ({
136
85
  selection
137
86
  }) => {
@@ -6,7 +6,7 @@ import { uuid } from '@atlaskit/adf-schema';
6
6
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, EVENT_TYPE, INPUT_METHOD, USER_CONTEXT } from '../analytics';
7
7
  import { GapCursorSelection } from '../selection/gap-cursor-selection';
8
8
  import { stateKey as taskDecisionStateKey } from './pm-plugins/plugin-key';
9
- import { autoJoinTr } from '../../utils/prosemirror/autojoin';
9
+ import { autoJoinTr } from '@atlaskit/editor-common/utils';
10
10
  const getContextData = (contextProvider = {}) => {
11
11
  const {
12
12
  objectId,
@@ -4,8 +4,7 @@ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
4
4
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { findParentNodeOfType, findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
6
6
  import { uuid } from '@atlaskit/adf-schema';
7
- import { isEmptySelectionAtStart, deleteEmptyParagraphAndMoveBlockUp, isEmptySelectionAtEnd } from '../../../utils/commands';
8
- import { filterCommands as filter } from '@atlaskit/editor-common/utils';
7
+ import { filterCommand as filter, isEmptySelectionAtStart, deleteEmptyParagraphAndMoveBlockUp, isEmptySelectionAtEnd } from '@atlaskit/editor-common/utils';
9
8
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, withAnalytics } from '../../analytics';
10
9
  import { insertTaskDecisionWithAnalytics } from '../commands';
11
10
  import { joinAtCut, liftSelection, wrapSelectionInTaskList } from './commands';
@@ -1,4 +1,4 @@
1
- import { toggleMark } from '../../../utils/commands';
1
+ import { toggleMark } from '@atlaskit/editor-common/mark';
2
2
  import { ACTIONS, pluginKey } from '../pm-plugins/main';
3
3
  import { getDisabledState } from '../utils/disabled';
4
4
  export const toggleColor = color => (state, dispatch) => {
@@ -1,5 +1,5 @@
1
1
  import { Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { applyMarkOnRange, toggleMark } from '../../../utils/commands';
2
+ import { applyMarkOnRange, toggleMark } from '@atlaskit/editor-common/mark';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { hasCode, markActive } from '../utils';
5
5
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
@@ -1,4 +1,4 @@
1
- import { filterChildrenBetween } from '../../../utils';
1
+ import { filterChildrenBetween } from '@atlaskit/editor-common/mark';
2
2
  const SMART_TO_ASCII = {
3
3
  '…': '...',
4
4
  '→': '->',
@@ -1,8 +1,8 @@
1
- import * as safePlugin from '@atlaskit/editor-common/safe-plugin';
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
3
  import { checkFormattingIsPresent } from '../utils';
4
4
  export const pluginKey = new PluginKey('clearFormattingPlugin');
5
- export const plugin = dispatch => new safePlugin.SafePlugin({
5
+ export const plugin = dispatch => new SafePlugin({
6
6
  state: {
7
7
  init(_config, state) {
8
8
  return {
@@ -1,7 +1,7 @@
1
1
  import { ruleWithAnalytics } from '../../../utils/input-rules';
2
2
  import { createRule, createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
- import { transformSmartCharsMentionsAndEmojis } from '../commands/transform-to-code';
4
+ import { transformSmartCharsMentionsAndEmojis } from '@atlaskit/editor-common/mark';
5
5
  var ValidAutoformatChars = /*#__PURE__*/function (ValidAutoformatChars) {
6
6
  ValidAutoformatChars["STRONG"] = "__";
7
7
  ValidAutoformatChars["STRIKE"] = "~~";
@@ -1,9 +1,10 @@
1
+ // TODO: Ideally this should use the custom toggleMark function from @atlaskit/editor-common so we also disable the options when selecting inline nodes but it disables the marks when the selection is empty at this point in time which is undesirable
2
+ // import { toggleMark } from '@atlaskit/editor-common/mark';
1
3
  import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
2
4
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
5
  import * as keymaps from '@atlaskit/editor-common/keymaps';
4
6
  import { shallowEqual } from '@atlaskit/editor-common/utils';
5
7
  import { createInlineCodeFromTextInputWithAnalytics } from '../commands/text-formatting';
6
- // eslint-disable-next-line no-duplicate-imports
7
8
  import * as commands from '../commands/text-formatting';
8
9
  import { anyMarkActive } from '../utils';
9
10
  import { pluginKey } from './plugin-key';
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useMemo, useState } from 'react';
2
2
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
3
- import DropdownMenu from '../../../../ui/DropdownMenu';
3
+ import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
4
4
  import { useMenuState } from './hooks/menu-state';
5
5
  import { MoreButton } from './more-button';
6
6
  export const FormattingTextDropdownMenu = /*#__PURE__*/React.memo(({
@@ -8,9 +8,8 @@ import { toolbarMessages } from '../toolbar-messages';
8
8
  import * as commands from '../../../commands/text-formatting';
9
9
  import { TOOLBAR_ACTION_SUBJECT_ID, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
10
10
  import { pluginKey as textFormattingPluginKey } from '../../../pm-plugins/plugin-key';
11
- import { toggleCode, toggleStrikethrough, toggleUnderline, tooltip, toggleBold, toggleItalic, toggleSubscript, toggleSuperscript, ToolTipContent } from '../../../../../keymaps';
11
+ import { toggleCode, toggleStrikethrough, toggleUnderline, tooltip, toggleBold, toggleItalic, toggleSubscript, toggleSuperscript, ToolTipContent, getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
12
12
  import { IconTypes } from '../types';
13
- import { getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
14
13
  const withToolbarInputMethod = func => func({
15
14
  inputMethod: INPUT_METHOD.TOOLBAR
16
15
  });
@@ -2,9 +2,10 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
2
  import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { shallowEqual } from '@atlaskit/editor-common/utils';
5
- import { getListItemAttributes, isInsideListItem } from '../../list/utils/selection';
5
+ import { isInsideListItem } from '../../list/utils/selection';
6
6
  import { getCurrentIndentLevel as getTaskListIndentLevel, getTaskItemIndex, isInsideTask } from '../../tasks-and-decisions/pm-plugins/helpers';
7
7
  import { isIndentationAllowed, MAX_INDENTATION_LEVEL } from '../../indentation/commands';
8
+ import { getListItemAttributes } from '@atlaskit/editor-common/lists';
8
9
  export const pluginKey = new PluginKey('indentationButtonsPlugin');
9
10
  function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndentation) {
10
11
  const state = {
@@ -5,7 +5,7 @@ import { useIntl } from 'react-intl-next';
5
5
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
6
6
  import BulletListIcon from '@atlaskit/icon/glyph/editor/bullet-list';
7
7
  import { toggleBulletList as toggleBulletListKeymap, toggleOrderedList as toggleOrderedListKeymap, indent as toggleIndentKeymap, outdent as toggleOutdentKeymap, tooltip } from '../../../keymaps';
8
- import DropdownMenu from '../../../ui/DropdownMenu';
8
+ import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
9
9
  import ToolbarButton from '../../../ui/ToolbarButton';
10
10
  import { expandIconWrapperStyle, shortcutStyle } from '../../../ui/styles';
11
11
  import { wrapperStyle, separatorStyles } from '@atlaskit/editor-common/styles';
@@ -22,15 +22,15 @@ import { injectIntl } from 'react-intl-next';
22
22
  import messages from '../../../messages';
23
23
  import { TableControlsPadding, MainToolbar, mainToolbarCustomComponentsSlotStyle } from './Toolbar';
24
24
  import { createEditorContentStyle } from '../../ContentStyles';
25
- import { ToolbarArrowKeyNavigationProvider } from '../../ToolbarArrowKeyNavigationProvider';
25
+ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
26
26
  const CommentEditorMargin = 14;
27
- const CommentEditorSmallerMargin = 8;
28
27
  const commentEditorStyle = css`
29
28
  display: flex;
30
29
  flex-direction: column;
31
30
 
32
31
  .less-margin .ProseMirror {
33
- margin: 12px ${CommentEditorSmallerMargin}px ${CommentEditorSmallerMargin}px;
32
+ margin: ${"var(--ds-space-150, 12px)"} ${"var(--ds-space-100, 8px)"}
33
+ ${"var(--ds-space-100, 8px)"};
34
34
  }
35
35
 
36
36
  min-width: 272px;
@@ -55,7 +55,8 @@ const ContentArea = createEditorContentStyle(css`
55
55
  /** Hack for Bitbucket to ensure entire editorView gets drop event; see ED-3294 **/
56
56
  /** Hack for table controls. Otherwise margin collapse and controls are misplaced. **/
57
57
  .ProseMirror {
58
- margin: 12px ${CommentEditorMargin}px ${CommentEditorMargin}px;
58
+ margin: ${"var(--ds-space-150, 12px)"} ${CommentEditorMargin}px
59
+ ${CommentEditorMargin}px;
59
60
  }
60
61
 
61
62
  .gridParent {
@@ -74,7 +75,7 @@ const secondaryToolbarStyle = css`
74
75
  justify-content: flex-end;
75
76
  align-items: center;
76
77
  display: flex;
77
- padding: 12px 1px;
78
+ padding: ${"var(--ds-space-150, 12px)"} 1px;
78
79
  `;
79
80
  class Editor extends React.Component {
80
81
  constructor(props) {
@@ -1,4 +1,5 @@
1
1
  /** @jsx jsx */
2
+
2
3
  import React, { useEffect, useState } from 'react';
3
4
  import { css, jsx } from '@emotion/react';
4
5
  import { N30 } from '@atlaskit/theme/colors';
@@ -12,7 +13,7 @@ const mainToolbarWrapperStyle = css`
12
13
  height: auto;
13
14
  background-color: ${"var(--ds-surface, white)"};
14
15
  box-shadow: none;
15
- padding-left: ${TableControlsPadding}px;
16
+ padding-left: ${"var(--ds-space-250, 20px)"};
16
17
 
17
18
  & > div {
18
19
  > :first-child:not(style),
@@ -106,7 +107,7 @@ export const mainToolbarCustomComponentsSlotStyle = css`
106
107
  justify-content: flex-end;
107
108
  align-items: center;
108
109
  flex-grow: 1;
109
- padding-right: ${TableControlsPadding}px;
110
+ padding-right: ${"var(--ds-space-250, 20px)"};
110
111
  > div {
111
112
  display: flex;
112
113
  flex-shrink: 0;
@@ -1,14 +1,13 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx, useTheme } from '@emotion/react';
3
- import { WidthConsumer } from '@atlaskit/editor-common/ui';
4
- import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
3
+ import { WidthConsumer, ContextPanelConsumer } from '@atlaskit/editor-common/ui';
5
4
  import React, { useImperativeHandle, useRef } from 'react';
6
5
  import { injectIntl } from 'react-intl-next';
7
6
  import { ClickAreaBlock } from '../../Addon';
8
7
  import ContextPanel from '../../ContextPanel';
9
8
  import PluginSlot from '../../PluginSlot';
10
9
  import { contentArea, editorContentAreaStyle, sidebarArea, ScrollContainer, editorContentGutterStyle, positionedOverEditorStyle } from './StyledComponents';
11
- import messages from './messages';
10
+ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
12
11
  export const CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
13
12
  const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
14
13
  const theme = useTheme();
@@ -9,8 +9,8 @@ import { BeforePrimaryToolbarWrapper } from '../../../plugins/before-primaryTool
9
9
  import Toolbar from '../../Toolbar';
10
10
  import { mainToolbarStyle, mainToolbarIconBeforeStyle, mainToolbarFirstChildStyle, mainToolbarSecondChildStyle, nonCustomToolbarWrapperStyle, customToolbarWrapperStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
11
11
  import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
12
- import messages from './messages';
13
- import { ToolbarArrowKeyNavigationProvider } from '../../ToolbarArrowKeyNavigationProvider';
12
+ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
13
+ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
14
14
  export const EditorToolbar = /*#__PURE__*/React.memo(props => {
15
15
  var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _props$featureFlags5, _props$featureFlags6;
16
16
  const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
@@ -1,7 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import { Dropdown as DropdownComponent } from '@atlaskit/editor-common/ui-menu';
2
+ import { Dropdown as DropdownComponent, KeyDownHandlerContext } from '@atlaskit/editor-common/ui-menu';
3
3
  import React, { useContext } from 'react';
4
- import { KeyDownHandlerContext } from '../ToolbarArrowKeyNavigationProvider';
5
4
  const Dropdown = /*#__PURE__*/React.memo(({
6
5
  ...props
7
6
  }) => {
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
+
3
4
  import { useCallback, useState } from 'react';
4
5
  import { css, jsx } from '@emotion/react';
5
6
  // AFP-2532 TODO: Fix automatic suppressions below
@@ -22,9 +22,4 @@ export const buttonContentReducedSpacingStyle = css`
22
22
  `;
23
23
  export const clickSelectWrapperStyle = css`
24
24
  user-select: all;
25
- `;
26
- export const centeredToolbarContainer = css`
27
- display: flex;
28
- width: 100%;
29
- align-items: center;
30
25
  `;