@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
@@ -5,22 +5,21 @@ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
5
5
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
6
6
  import * as baseCommand from '@atlaskit/editor-prosemirror/commands';
7
7
  import { findPositionOfNodeBefore, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
8
- import { hasVisibleContent } from '../../../utils/document';
9
- import { findCutBefore, isEmptySelectionAtStart, isFirstChildOfParent } from '../../../utils/commands';
10
- import { filterCommands as filter } from '@atlaskit/editor-common/utils';
8
+ import { filterCommand as filter, hasVisibleContent, isEmptySelectionAtStart } from '@atlaskit/editor-common/utils';
9
+ import { isFirstChildOfParent, findCutBefore } from '../../../utils/commands';
11
10
  import { sanitiseMarksInSelection } from '../../../utils';
11
+ import { getCommonListAnalyticsAttributes } from '@atlaskit/editor-common/lists';
12
12
  import { liftFollowingList, liftTextSelectionList, liftNodeSelectionList } from '../transforms';
13
13
  import { GapCursorSelection } from '../../selection/gap-cursor-selection';
14
14
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
15
15
  import { isInsideListItem, canJoinToPreviousListItem, selectionContainsList } from '../utils/selection';
16
- import { getCommonListAnalyticsAttributes } from '../utils/analytics';
17
16
  import { listBackspace } from './listBackspace';
18
17
  import { joinListItemForward } from './join-list-item-forward';
19
18
  import { convertListType } from '../actions/conversions';
20
19
  import { wrapInListAndJoin } from '../actions/wrap-and-join-lists';
21
20
  import { outdentList } from './outdent-list';
22
21
  import { indentList } from './indent-list';
23
- import { moveTargetIntoList } from '../utils/replace-content';
22
+ import { moveTargetIntoList } from '@atlaskit/editor-common/lists';
24
23
  export { outdentList, indentList };
25
24
  export var enterKeyCommand = function enterKeyCommand(editorAnalyticsAPI) {
26
25
  return function (featureFlags) {
@@ -1,5 +1,5 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import { isEmptySelectionAtEnd, walkNextNode } from '../../../utils/commands';
2
+ import { isEmptySelectionAtEnd, walkNextNode } from '@atlaskit/editor-common/utils';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, DELETE_DIRECTION } from '@atlaskit/editor-common/analytics';
4
4
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
5
5
  import { calcJoinListScenario } from '../actions/join-list-items-forward';
@@ -1,9 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  var _BACKSPACE_COMMANDS;
3
- import { insertContentDeleteRange, isEmptySelectionAtStart, walkPrevNode } from '../../../utils/commands';
3
+ import { insertContentDeleteRange, isEmptySelectionAtStart, walkPrevNode, isListNode, isParagraphNode } from '@atlaskit/editor-common/utils';
4
4
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, DELETE_DIRECTION, LIST_TEXT_SCENARIOS } from '@atlaskit/editor-common/analytics';
5
5
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
6
- import { isListNode, isParagraphNode } from '@atlaskit/editor-common/utils';
7
6
  import { isPosInsideList, isPosInsideParagraph } from '../utils/selection';
8
7
  //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
9
8
  //Case for two adjacent list items of the same indentation
@@ -1,11 +1,12 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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; }
4
+ import { getCommonListAnalyticsAttributes } from '@atlaskit/editor-common/lists';
4
5
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, OUTDENT_SCENARIOS } from '@atlaskit/editor-common/analytics';
5
6
  import { isInsideListItem, isInsideTableCell } from '../utils/selection';
6
- import { isBulletList } from '../utils/node';
7
+ import { isBulletList } from '@atlaskit/editor-common/utils';
7
8
  import { findFirstParentListNode } from '../utils/find';
8
- import { getCommonListAnalyticsAttributes, getRestartListsAttributes } from '../utils/analytics';
9
+ import { getRestartListsAttributes } from '../utils/analytics';
9
10
  import { outdentListItemsSelected as outdentListAction } from '../actions/outdent-list-items-selected';
10
11
  import { closeHistory } from '@atlaskit/editor-prosemirror/history';
11
12
  export var outdentList = function outdentList(editorAnalyticsAPI) {
@@ -6,7 +6,7 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
6
6
  import { DecorationSet, Decoration } from '@atlaskit/editor-prosemirror/view';
7
7
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
8
8
  import { isWrappingPossible } from '../utils/selection';
9
- import { isListNode } from '../utils/node';
9
+ import { isListNode } from '@atlaskit/editor-common/utils';
10
10
  import { pluginFactory } from '../../../utils/plugin-state-factory';
11
11
  import { setGapCursorSelection } from '../../../utils';
12
12
  import { Side } from '@atlaskit/editor-common/selection';
@@ -1,38 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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; }
4
- import { isListItemNode, isListNode } from '@atlaskit/editor-common/utils';
5
- import { getListItemAttributes } from './selection';
6
- export var getCommonListAnalyticsAttributes = function getCommonListAnalyticsAttributes(state) {
7
- var _state$selection = state.selection,
8
- $from = _state$selection.$from,
9
- $to = _state$selection.$to;
10
- var fromAttrs = getListItemAttributes($from);
11
- var 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 var countListItemsInSelection = function countListItemsInSelection(state) {
21
- var _state$selection2 = state.selection,
22
- from = _state$selection2.from,
23
- to = _state$selection2.to;
24
- if (from === to) {
25
- return 1;
26
- }
27
- var count = 0;
28
- var listSlice = state.doc.cut(from, to);
29
- listSlice.content.nodesBetween(0, listSlice.content.size, function (node, pos, parent, index) {
30
- if (parent && isListItemNode(parent) && !isListNode(node) && index === 0) {
31
- count++;
32
- }
33
- });
34
- return count;
35
- };
36
4
  export var RESTART_LISTS_ANALYTICS_KEY = 'restartListsAnalytics';
37
5
  export var getRestartListsAttributes = function getRestartListsAttributes(tr) {
38
6
  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,20 +13,4 @@ export var getListLiftTarget = function getListLiftTarget(resPos) {
14
13
  }
15
14
  }
16
15
  return target - 1;
17
- };
18
- export var hasValidListIndentationLevel = function hasValidListIndentationLevel(_ref) {
19
- var tr = _ref.tr,
20
- maxIndentation = _ref.maxIndentation;
21
- var initialIndentationLevel = numberNestedLists(tr.selection.$from);
22
- var currentIndentationLevel;
23
- var currentPos = tr.selection.$to.pos;
24
- do {
25
- var resolvedPos = tr.doc.resolve(currentPos);
26
- currentIndentationLevel = numberNestedLists(resolvedPos);
27
- if (currentIndentationLevel > maxIndentation) {
28
- return false;
29
- }
30
- currentPos++;
31
- } while (currentIndentationLevel >= initialIndentationLevel);
32
- return true;
33
16
  };
@@ -1,88 +1,10 @@
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
  var bulletList = node.type.schema.nodes.bulletList;
6
5
  if (!bulletList) {
7
6
  return false;
8
7
  }
9
8
  var listFragment = Fragment.from(bulletList.createAndFill());
10
9
  return !isListItemNode(node) && node.type.validContent(listFragment);
11
- }
12
- export var JoinDirection = /*#__PURE__*/function (JoinDirection) {
13
- JoinDirection[JoinDirection["LEFT"] = 1] = "LEFT";
14
- JoinDirection[JoinDirection["RIGHT"] = -1] = "RIGHT";
15
- return JoinDirection;
16
- }({});
17
- export var joinSiblingLists = function joinSiblingLists(_ref) {
18
- var tr = _ref.tr,
19
- direction = _ref.direction,
20
- forceListType = _ref.forceListType;
21
- var result = {
22
- orderedList: 0,
23
- bulletList: 0
24
- };
25
- var doc = tr.doc,
26
- _tr$selection = tr.selection,
27
- $from = _tr$selection.$from,
28
- $to = _tr$selection.$to,
29
- selection = tr.selection;
30
- var range = $from.blockRange($to, isListNodeValidContent);
31
- if (!range) {
32
- return result;
33
- }
34
- var rootListNode = doc.nodeAt(range.start);
35
- var from = isListNode(rootListNode) ? range.start : 0;
36
- var to = isListNode(rootListNode) ? range.end : tr.doc.content.size;
37
- var joins = [];
38
- doc.nodesBetween(from, to, function (node, pos, parent) {
39
- var resolvedPos = doc.resolve(pos);
40
- var nodeBefore = resolvedPos.nodeBefore,
41
- nodeAfter = resolvedPos.nodeAfter;
42
- if (!nodeBefore || !nodeAfter || !isListNode(nodeBefore) || !isListNode(nodeAfter)) {
43
- return;
44
- }
45
- var isNestedList = isListItemNode(parent);
46
- if (!isNestedList && nodeBefore.type !== nodeAfter.type && !forceListType) {
47
- return;
48
- }
49
- var index = resolvedPos.index();
50
- var positionPreviousNode = resolvedPos.posAtIndex(index - 1);
51
- var positionCurrentNode = resolvedPos.posAtIndex(index);
52
-
53
- // If the previous node is part of the selection, OR
54
- // If the previous node is not part of the selection and the previous node has the same list type that we’re converting to
55
- var joinBefore = positionPreviousNode >= from || nodeBefore.type === forceListType;
56
- if (forceListType) {
57
- if (joinBefore) {
58
- tr.setNodeMarkup(positionPreviousNode, forceListType);
59
- }
60
- tr.setNodeMarkup(positionCurrentNode, forceListType);
61
- }
62
- if (isNestedList && nodeBefore.type !== nodeAfter.type) {
63
- var nodeType = direction === JoinDirection.RIGHT ? nodeAfter.type : nodeBefore.type;
64
- tr.setNodeMarkup(positionPreviousNode, nodeType);
65
- }
66
- if (joinBefore) {
67
- joins.push(pos);
68
- }
69
- });
70
- if (selection.empty && rootListNode && isListNode(rootListNode)) {
71
- var resolvedPos = doc.resolve(range.start + rootListNode.nodeSize);
72
- var nodeBefore = resolvedPos.nodeBefore,
73
- nodeAfter = resolvedPos.nodeAfter;
74
- if (nodeBefore && nodeAfter && isListNode(nodeBefore) && isListNode(nodeAfter) && nodeAfter.type === nodeBefore.type) {
75
- joins.push(resolvedPos.pos);
76
- }
77
- }
78
- for (var i = joins.length - 1; i >= 0; i--) {
79
- var listNode = tr.doc.nodeAt(joins[i]);
80
- var listName = listNode === null || listNode === void 0 ? void 0 : listNode.type.name;
81
- if (listName && (listName === 'orderedList' || listName === 'bulletList')) {
82
- var amount = result[listName] || 0;
83
- result[listName] = amount + 1;
84
- }
85
- tr.join(joins[i]);
86
- }
87
- return result;
88
- };
10
+ }
@@ -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 var isPosInsideParagraph = function isPosInsideParagraph($pos) {
@@ -70,55 +69,8 @@ export var selectionContainsList = function selectionContainsList(tr) {
70
69
  });
71
70
  return foundListNode;
72
71
  };
73
- export var numberNestedLists = function numberNestedLists(resolvedPos) {
74
- var count = 0;
75
- for (var i = resolvedPos.depth - 1; i > 0; i--) {
76
- var node = resolvedPos.node(i);
77
- if (isListNode(node)) {
78
- count += 1;
79
- }
80
- }
81
- return count;
82
- };
83
- export var getListItemAttributes = function getListItemAttributes($pos) {
84
- var indentLevel = numberNestedLists($pos) - 1;
85
- var itemAtPos = findParentNodeClosestToPos($pos, isListItemNode);
86
-
87
- // Get the index of the current item relative to parent (parent is at item depth - 1)
88
- var itemIndex = $pos.index(itemAtPos ? itemAtPos.depth - 1 : undefined);
89
- return {
90
- indentLevel: indentLevel,
91
- itemIndex: itemIndex
92
- };
93
- };
94
- export var normalizeListItemsSelection = function normalizeListItemsSelection(_ref) {
95
- var selection = _ref.selection,
96
- doc = _ref.doc;
97
- if (selection.empty) {
98
- return selection;
99
- }
100
- var $from = selection.$from,
101
- $to = selection.$to;
102
- if (selection instanceof NodeSelection) {
103
- var _head = resolvePositionToStartOfListItem($from);
104
- return new TextSelection(_head, _head);
105
- }
106
- var head = resolvePositionToStartOfListItem($from);
107
- var anchor = resolvePositionToEndOfListItem($to);
108
- return new TextSelection(anchor, head);
109
- };
110
- var resolvePositionToStartOfListItem = function resolvePositionToStartOfListItem($pos) {
111
- var fromRange = $pos.blockRange($pos, isListItemNode);
112
- var fromPosition = fromRange && $pos.textOffset === 0 && fromRange.end - 1 === $pos.pos ? Selection.near($pos.doc.resolve(fromRange.end + 1), 1).$from : $pos;
113
- return fromPosition;
114
- };
115
- var resolvePositionToEndOfListItem = function resolvePositionToEndOfListItem($pos) {
116
- var toRange = $pos.blockRange($pos, isListItemNode);
117
- var toPosition = toRange && $pos.textOffset === 0 && toRange.start + 1 === $pos.pos ? Selection.near($pos.doc.resolve(toRange.start - 1), -1).$to : $pos;
118
- return toPosition;
119
- };
120
- export var createListNodeRange = function createListNodeRange(_ref2) {
121
- var selection = _ref2.selection;
72
+ export var createListNodeRange = function createListNodeRange(_ref) {
73
+ var selection = _ref.selection;
122
74
  var $from = selection.$from,
123
75
  $to = selection.$to;
124
76
  var range = $from.blockRange($to, isListNode);
@@ -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
  var getContextData = function getContextData() {
11
11
  var contextProvider = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
12
12
  var objectId = contextProvider.objectId,
@@ -7,8 +7,7 @@ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
7
7
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
8
8
  import { findParentNodeOfType, findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
9
9
  import { uuid } from '@atlaskit/adf-schema';
10
- import { isEmptySelectionAtStart, deleteEmptyParagraphAndMoveBlockUp, isEmptySelectionAtEnd } from '../../../utils/commands';
11
- import { filterCommands as filter } from '@atlaskit/editor-common/utils';
10
+ import { filterCommand as filter, isEmptySelectionAtStart, deleteEmptyParagraphAndMoveBlockUp, isEmptySelectionAtEnd } from '@atlaskit/editor-common/utils';
12
11
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, withAnalytics } from '../../analytics';
13
12
  import { insertTaskDecisionWithAnalytics } from '../commands';
14
13
  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 var toggleColor = function toggleColor(color) {
@@ -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
  var SMART_TO_ASCII = {
3
3
  '…': '...',
4
4
  '→': '->',
@@ -1,9 +1,9 @@
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 var pluginKey = new PluginKey('clearFormattingPlugin');
5
5
  export var plugin = function plugin(dispatch) {
6
- return new safePlugin.SafePlugin({
6
+ return new SafePlugin({
7
7
  state: {
8
8
  init: function init(_config, state) {
9
9
  return {
@@ -13,7 +13,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
13
13
  import { ruleWithAnalytics } from '../../../utils/input-rules';
14
14
  import { createRule, createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
15
15
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
16
- import { transformSmartCharsMentionsAndEmojis } from '../commands/transform-to-code';
16
+ import { transformSmartCharsMentionsAndEmojis } from '@atlaskit/editor-common/mark';
17
17
  var ValidAutoformatChars = /*#__PURE__*/function (ValidAutoformatChars) {
18
18
  ValidAutoformatChars["STRONG"] = "__";
19
19
  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,7 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useCallback, useMemo, useState } from 'react';
3
3
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
4
- import DropdownMenu from '../../../../ui/DropdownMenu';
4
+ import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
5
5
  import { useMenuState } from './hooks/menu-state';
6
6
  import { MoreButton } from './more-button';
7
7
  export var FormattingTextDropdownMenu = /*#__PURE__*/React.memo(function (_ref) {
@@ -10,9 +10,8 @@ import { toolbarMessages } from '../toolbar-messages';
10
10
  import * as commands from '../../../commands/text-formatting';
11
11
  import { TOOLBAR_ACTION_SUBJECT_ID, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
12
12
  import { pluginKey as textFormattingPluginKey } from '../../../pm-plugins/plugin-key';
13
- import { toggleCode, toggleStrikethrough, toggleUnderline, tooltip, toggleBold, toggleItalic, toggleSubscript, toggleSuperscript, ToolTipContent } from '../../../../../keymaps';
13
+ import { toggleCode, toggleStrikethrough, toggleUnderline, tooltip, toggleBold, toggleItalic, toggleSubscript, toggleSuperscript, ToolTipContent, getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
14
14
  import { IconTypes } from '../types';
15
- import { getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
16
15
  var withToolbarInputMethod = function withToolbarInputMethod(func) {
17
16
  return func({
18
17
  inputMethod: INPUT_METHOD.TOOLBAR
@@ -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 var pluginKey = new PluginKey('indentationButtonsPlugin');
9
10
  function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndentation) {
10
11
  var state = {
@@ -6,7 +6,7 @@ import { useIntl } from 'react-intl-next';
6
6
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
7
7
  import BulletListIcon from '@atlaskit/icon/glyph/editor/bullet-list';
8
8
  import { toggleBulletList as toggleBulletListKeymap, toggleOrderedList as toggleOrderedListKeymap, indent as toggleIndentKeymap, outdent as toggleOutdentKeymap, tooltip } from '../../../keymaps';
9
- import DropdownMenu from '../../../ui/DropdownMenu';
9
+ import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
10
10
  import ToolbarButton from '../../../ui/ToolbarButton';
11
11
  import { expandIconWrapperStyle, shortcutStyle } from '../../../ui/styles';
12
12
  import { wrapperStyle, separatorStyles } from '@atlaskit/editor-common/styles';
@@ -32,13 +32,12 @@ import { injectIntl } from 'react-intl-next';
32
32
  import messages from '../../../messages';
33
33
  import { TableControlsPadding, MainToolbar, mainToolbarCustomComponentsSlotStyle } from './Toolbar';
34
34
  import { createEditorContentStyle } from '../../ContentStyles';
35
- import { ToolbarArrowKeyNavigationProvider } from '../../ToolbarArrowKeyNavigationProvider';
35
+ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
36
36
  var CommentEditorMargin = 14;
37
- var CommentEditorSmallerMargin = 8;
38
- var commentEditorStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Paragraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n\n height: auto;\n background-color: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: ", "px;\n\n max-width: inherit;\n word-wrap: break-word;\n"])), CommentEditorSmallerMargin, CommentEditorSmallerMargin, "var(--ds-background-input, white)", "var(--ds-border, ".concat(N40, ")"), borderRadius());
39
- var ContentArea = createEditorContentStyle(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-grow: 1;\n overflow-x: hidden;\n overflow-y: auto;\n line-height: 24px;\n\n /** Hack for Bitbucket to ensure entire editorView gets drop event; see ED-3294 **/\n /** Hack for table controls. Otherwise margin collapse and controls are misplaced. **/\n .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n .gridParent {\n margin-left: ", "px;\n margin-right: ", "px;\n width: calc(100% + ", "px);\n }\n\n padding: ", "px;\n\n ", ";\n"])), CommentEditorMargin, CommentEditorMargin, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, TableControlsPadding, tableCommentEditorStyles));
37
+ var commentEditorStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: ", " ", "\n ", ";\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Paragraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n\n height: auto;\n background-color: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: ", "px;\n\n max-width: inherit;\n word-wrap: break-word;\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-background-input, white)", "var(--ds-border, ".concat(N40, ")"), borderRadius());
38
+ var ContentArea = createEditorContentStyle(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-grow: 1;\n overflow-x: hidden;\n overflow-y: auto;\n line-height: 24px;\n\n /** Hack for Bitbucket to ensure entire editorView gets drop event; see ED-3294 **/\n /** Hack for table controls. Otherwise margin collapse and controls are misplaced. **/\n .ProseMirror {\n margin: ", " ", "px\n ", "px;\n }\n\n .gridParent {\n margin-left: ", "px;\n margin-right: ", "px;\n width: calc(100% + ", "px);\n }\n\n padding: ", "px;\n\n ", ";\n"])), "var(--ds-space-150, 12px)", CommentEditorMargin, CommentEditorMargin, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, TableControlsPadding, tableCommentEditorStyles));
40
39
  ContentArea.displayName = 'ContentArea';
41
- var secondaryToolbarStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n justify-content: flex-end;\n align-items: center;\n display: flex;\n padding: 12px 1px;\n"])));
40
+ var secondaryToolbarStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n justify-content: flex-end;\n align-items: center;\n display: flex;\n padding: ", " 1px;\n"])), "var(--ds-space-150, 12px)");
42
41
  var Editor = /*#__PURE__*/function (_React$Component) {
43
42
  _inherits(Editor, _React$Component);
44
43
  var _super = _createSuper(Editor);
@@ -3,12 +3,13 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
4
4
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
5
5
  /** @jsx jsx */
6
+
6
7
  import React, { useEffect, useState } from 'react';
7
8
  import { css, jsx } from '@emotion/react';
8
9
  import { N30 } from '@atlaskit/theme/colors';
9
10
  import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
10
11
  export var TableControlsPadding = 20;
11
- var mainToolbarWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding: ", " ", " 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", "px;\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", TableControlsPadding);
12
+ var mainToolbarWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding: ", " ", " 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", ";\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)");
12
13
  var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", ";\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), "var(--ds-space-100, 8px)", akEditorMenuZIndex, akEditorToolbarKeylineHeight, "var(--ds-border, ".concat(N30, ")"));
13
14
  var StickyToolbar = function StickyToolbar(props) {
14
15
  var _useState = useState(0),
@@ -75,4 +76,4 @@ export var MainToolbar = function MainToolbar(_ref) {
75
76
  }
76
77
  return jsx(FixedToolbar, null, children);
77
78
  };
78
- export var mainToolbarCustomComponentsSlotStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n padding-right: ", "px;\n > div {\n display: flex;\n flex-shrink: 0;\n }\n"])), TableControlsPadding);
79
+ export var mainToolbarCustomComponentsSlotStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n padding-right: ", ";\n > div {\n display: flex;\n flex-shrink: 0;\n }\n"])), "var(--ds-space-250, 20px)");
@@ -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 var CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
13
12
  var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
14
13
  var theme = useTheme();
@@ -10,8 +10,8 @@ import { BeforePrimaryToolbarWrapper } from '../../../plugins/before-primaryTool
10
10
  import Toolbar from '../../Toolbar';
11
11
  import { mainToolbarStyle, mainToolbarIconBeforeStyle, mainToolbarFirstChildStyle, mainToolbarSecondChildStyle, nonCustomToolbarWrapperStyle, customToolbarWrapperStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
12
12
  import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
13
- import messages from './messages';
14
- import { ToolbarArrowKeyNavigationProvider } from '../../ToolbarArrowKeyNavigationProvider';
13
+ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
14
+ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
15
15
  export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
16
16
  var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _props$featureFlags5, _props$featureFlags6;
17
17
  var _useState = useState(false),
@@ -3,9 +3,8 @@ import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructurin
3
3
  import _extends from "@babel/runtime/helpers/extends";
4
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
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 { Dropdown as DropdownComponent } from '@atlaskit/editor-common/ui-menu';
6
+ import { Dropdown as DropdownComponent, KeyDownHandlerContext } from '@atlaskit/editor-common/ui-menu';
7
7
  import React, { useContext } from 'react';
8
- import { KeyDownHandlerContext } from '../ToolbarArrowKeyNavigationProvider';
9
8
  var Dropdown = /*#__PURE__*/React.memo(function (_ref) {
10
9
  var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
11
10
  var keyDownHandlerContext = useContext(KeyDownHandlerContext);
@@ -5,6 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
5
  var _excluded = ["children"];
6
6
  var _templateObject, _templateObject2;
7
7
  /** @jsx jsx */
8
+
8
9
  import { useCallback, useState } from 'react';
9
10
  import { css, jsx } from '@emotion/react';
10
11
  // AFP-2532 TODO: Fix automatic suppressions below
@@ -1,5 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
3
  import { css } from '@emotion/react';
4
4
  export { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
5
5
  export { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
@@ -7,5 +7,4 @@ export var wrapperSmallStyle = css(_templateObject || (_templateObject = _tagged
7
7
  export var expandIconWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-left: -8px;\n"])));
8
8
  export var buttonContentStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n min-width: 80px;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n flex-direction: column;\n padding: ", ";\n"])), "var(--ds-space-075, 6px)");
9
9
  export var buttonContentReducedSpacingStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: ", ";\n"])), "var(--ds-space-100, 8px)");
10
- export var clickSelectWrapperStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n user-select: all;\n"])));
11
- export var centeredToolbarContainer = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n align-items: center;\n"])));
10
+ export var clickSelectWrapperStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n user-select: all;\n"])));