@atlaskit/editor-core 176.0.3 → 177.0.0

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 (449) hide show
  1. package/.eslintrc.js +2 -2
  2. package/CHANGELOG.md +108 -0
  3. package/dist/cjs/create-editor/ReactEditorView.js +3 -1
  4. package/dist/cjs/create-editor/create-plugins-list.js +9 -6
  5. package/dist/cjs/create-editor/messages.js +17 -0
  6. package/dist/cjs/i18n/en.js +2 -2
  7. package/dist/cjs/i18n/en_GB.js +2 -2
  8. package/dist/cjs/i18n/en_ZZ.js +2 -2
  9. package/dist/cjs/i18n/index.js +4 -4
  10. package/dist/cjs/i18n/languages.js +9 -4
  11. package/dist/cjs/labs/next/presets/mobile.js +2 -2
  12. package/dist/cjs/labs/next/presets/preset.js +38 -6
  13. package/dist/cjs/plugins/annotation/nodeviews/index.js +1 -0
  14. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +6 -1
  15. package/dist/cjs/plugins/breakout/ui/LayoutButton.js +5 -1
  16. package/dist/cjs/plugins/card/pm-plugins/doc.js +18 -29
  17. package/dist/cjs/plugins/card/pm-plugins/main.js +7 -21
  18. package/dist/cjs/plugins/card/toolbar.js +24 -8
  19. package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +9 -5
  20. package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +19 -53
  21. package/dist/cjs/plugins/card/utils.js +17 -3
  22. package/dist/cjs/plugins/collab-edit/actions.js +3 -3
  23. package/dist/cjs/plugins/copy-button/toolbar.js +5 -3
  24. package/dist/cjs/plugins/date/index.js +1 -7
  25. package/dist/cjs/plugins/date/ui/DatePicker/index.js +1 -2
  26. package/dist/cjs/plugins/emoji/index.js +7 -14
  27. package/dist/cjs/plugins/expand/pm-plugins/main.js +4 -1
  28. package/dist/cjs/plugins/expand/toolbar.js +1 -0
  29. package/dist/cjs/plugins/extension/commands.js +17 -2
  30. package/dist/cjs/plugins/extension/pm-plugins/main.js +10 -0
  31. package/dist/cjs/plugins/extension/toolbar.js +49 -7
  32. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +11 -11
  33. package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -2
  34. package/dist/cjs/plugins/floating-toolbar/index.js +16 -4
  35. package/dist/cjs/plugins/floating-toolbar/ui/CheckboxModal.js +99 -0
  36. package/dist/cjs/plugins/floating-toolbar/ui/ConfirmationModal.js +10 -30
  37. package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +16 -4
  38. package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +108 -55
  39. package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -2
  40. package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +29 -108
  41. package/dist/cjs/plugins/floating-toolbar/ui/SimpleModal.js +51 -0
  42. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +27 -47
  43. package/dist/cjs/plugins/floating-toolbar/ui/messages.js +13 -3
  44. package/dist/cjs/plugins/floating-toolbar/utils.js +4 -19
  45. package/dist/cjs/plugins/help-dialog/index.js +3 -2
  46. package/dist/cjs/plugins/hyperlink/Toolbar.js +20 -1
  47. package/dist/cjs/plugins/hyperlink/ui/EditorLinkPicker/index.js +6 -3
  48. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +5 -10
  49. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
  50. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -1
  51. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
  52. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -1
  53. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -0
  54. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/item.js +26 -12
  55. package/dist/cjs/plugins/layout/toolbar.js +1 -0
  56. package/dist/cjs/plugins/list/actions/outdent-list-items-selected.js +34 -4
  57. package/dist/cjs/plugins/list/commands/outdent-list.js +1 -1
  58. package/dist/cjs/plugins/list/index.js +6 -2
  59. package/dist/cjs/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +13 -2
  60. package/dist/cjs/plugins/list/pm-plugins/input-rules/index.js +5 -2
  61. package/dist/cjs/plugins/list/pm-plugins/main.js +32 -10
  62. package/dist/cjs/plugins/media/index.js +35 -0
  63. package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +7 -6
  64. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +3 -1
  65. package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +70 -64
  66. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +3 -1
  67. package/dist/cjs/plugins/media/pm-plugins/main.js +6 -0
  68. package/dist/cjs/plugins/media/toolbar/index.js +3 -0
  69. package/dist/cjs/plugins/media/utils/media-single.js +19 -3
  70. package/dist/cjs/plugins/panel/toolbar.js +1 -0
  71. package/dist/cjs/plugins/panel/utils.js +1 -1
  72. package/dist/cjs/plugins/paste/index.js +2 -1
  73. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +19 -3
  74. package/dist/cjs/plugins/paste/pm-plugins/main.js +1 -1
  75. package/dist/cjs/plugins/paste/util/index.js +2 -2
  76. package/dist/cjs/plugins/placeholder/index.js +24 -47
  77. package/dist/cjs/plugins/placeholder/styles.js +2 -4
  78. package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +7 -3
  79. package/dist/cjs/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -0
  80. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +10 -5
  81. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +5 -1
  82. package/dist/cjs/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +5 -1
  83. package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +16 -6
  84. package/dist/cjs/plugins/type-ahead/index.js +2 -8
  85. package/dist/cjs/plugins/type-ahead/messages.js +44 -4
  86. package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +0 -1
  87. package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +17 -1
  88. package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +9 -4
  89. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +8 -5
  90. package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +2 -1
  91. package/dist/cjs/plugins/type-ahead/utils.js +44 -2
  92. package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +6 -2
  93. package/dist/cjs/ui/Alignment/AlignmentButton/index.js +4 -1
  94. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -1
  95. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
  96. package/dist/cjs/ui/CollapsedEditor/index.js +4 -2
  97. package/dist/cjs/ui/ColorPickerButton/index.js +2 -1
  98. package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +3 -4
  99. package/dist/cjs/ui/ConfigPanel/FormContent.js +2 -1
  100. package/dist/cjs/ui/ContentStyles/index.js +1 -1
  101. package/dist/cjs/ui/LinkSearch/ToolbarComponents.js +3 -1
  102. package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +55 -33
  103. package/dist/cjs/utils/commands.js +25 -13
  104. package/dist/cjs/utils/input-rules.js +26 -2
  105. package/dist/cjs/version-wrapper.js +1 -1
  106. package/dist/cjs/version.json +1 -1
  107. package/dist/es2019/create-editor/ReactEditorView.js +2 -1
  108. package/dist/es2019/create-editor/create-plugins-list.js +9 -6
  109. package/dist/es2019/create-editor/messages.js +8 -0
  110. package/dist/es2019/i18n/en.js +2 -2
  111. package/dist/es2019/i18n/en_GB.js +2 -2
  112. package/dist/es2019/i18n/en_ZZ.js +2 -2
  113. package/dist/es2019/i18n/index.js +4 -4
  114. package/dist/es2019/i18n/languages.js +9 -4
  115. package/dist/es2019/labs/next/presets/mobile.js +2 -2
  116. package/dist/es2019/labs/next/presets/preset.js +28 -7
  117. package/dist/es2019/plugins/annotation/nodeviews/index.js +1 -0
  118. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +5 -1
  119. package/dist/es2019/plugins/breakout/ui/LayoutButton.js +4 -1
  120. package/dist/es2019/plugins/card/pm-plugins/doc.js +10 -19
  121. package/dist/es2019/plugins/card/pm-plugins/main.js +4 -19
  122. package/dist/es2019/plugins/card/toolbar.js +19 -2
  123. package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +8 -6
  124. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +7 -36
  125. package/dist/es2019/plugins/card/utils.js +15 -2
  126. package/dist/es2019/plugins/collab-edit/actions.js +3 -3
  127. package/dist/es2019/plugins/copy-button/toolbar.js +5 -3
  128. package/dist/es2019/plugins/date/index.js +0 -7
  129. package/dist/es2019/plugins/date/ui/DatePicker/index.js +1 -2
  130. package/dist/es2019/plugins/emoji/index.js +7 -13
  131. package/dist/es2019/plugins/expand/pm-plugins/main.js +3 -3
  132. package/dist/es2019/plugins/expand/toolbar.js +1 -0
  133. package/dist/es2019/plugins/extension/commands.js +10 -1
  134. package/dist/es2019/plugins/extension/pm-plugins/main.js +10 -0
  135. package/dist/es2019/plugins/extension/toolbar.js +43 -8
  136. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +11 -11
  137. package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -3
  138. package/dist/es2019/plugins/floating-toolbar/index.js +15 -5
  139. package/dist/es2019/plugins/floating-toolbar/ui/CheckboxModal.js +70 -0
  140. package/dist/es2019/plugins/floating-toolbar/ui/ConfirmationModal.js +8 -27
  141. package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +17 -4
  142. package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +96 -50
  143. package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -1
  144. package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +29 -76
  145. package/dist/es2019/plugins/floating-toolbar/ui/SimpleModal.js +32 -0
  146. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +26 -46
  147. package/dist/es2019/plugins/floating-toolbar/ui/messages.js +14 -4
  148. package/dist/es2019/plugins/floating-toolbar/utils.js +4 -17
  149. package/dist/es2019/plugins/help-dialog/index.js +2 -2
  150. package/dist/es2019/plugins/hyperlink/Toolbar.js +18 -2
  151. package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/index.js +9 -2
  152. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +5 -9
  153. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
  154. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -1
  155. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
  156. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -1
  157. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -0
  158. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/item.js +25 -12
  159. package/dist/es2019/plugins/layout/toolbar.js +1 -0
  160. package/dist/es2019/plugins/list/actions/outdent-list-items-selected.js +24 -4
  161. package/dist/es2019/plugins/list/commands/outdent-list.js +1 -1
  162. package/dist/es2019/plugins/list/index.js +7 -3
  163. package/dist/es2019/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +13 -2
  164. package/dist/es2019/plugins/list/pm-plugins/input-rules/index.js +5 -2
  165. package/dist/es2019/plugins/list/pm-plugins/main.js +31 -11
  166. package/dist/es2019/plugins/media/index.js +38 -0
  167. package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +6 -5
  168. package/dist/es2019/plugins/media/nodeviews/mediaInline.js +3 -1
  169. package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +2 -2
  170. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +3 -1
  171. package/dist/es2019/plugins/media/pm-plugins/main.js +7 -0
  172. package/dist/es2019/plugins/media/toolbar/index.js +3 -0
  173. package/dist/es2019/plugins/media/utils/media-single.js +20 -3
  174. package/dist/es2019/plugins/panel/toolbar.js +1 -0
  175. package/dist/es2019/plugins/panel/utils.js +1 -1
  176. package/dist/es2019/plugins/paste/index.js +2 -1
  177. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +15 -2
  178. package/dist/es2019/plugins/paste/pm-plugins/main.js +1 -1
  179. package/dist/es2019/plugins/paste/util/index.js +2 -2
  180. package/dist/es2019/plugins/placeholder/index.js +21 -47
  181. package/dist/es2019/plugins/placeholder/styles.js +1 -19
  182. package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +6 -3
  183. package/dist/es2019/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -0
  184. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +8 -7
  185. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +4 -1
  186. package/dist/es2019/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +18 -12
  187. package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +16 -7
  188. package/dist/es2019/plugins/type-ahead/index.js +2 -2
  189. package/dist/es2019/plugins/type-ahead/messages.js +44 -4
  190. package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +0 -1
  191. package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +17 -1
  192. package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +10 -5
  193. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +8 -5
  194. package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +2 -1
  195. package/dist/es2019/plugins/type-ahead/utils.js +38 -0
  196. package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +6 -3
  197. package/dist/es2019/ui/Alignment/AlignmentButton/index.js +4 -2
  198. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -2
  199. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
  200. package/dist/es2019/ui/CollapsedEditor/index.js +3 -2
  201. package/dist/es2019/ui/ColorPickerButton/index.js +2 -1
  202. package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +4 -5
  203. package/dist/es2019/ui/ConfigPanel/FormContent.js +3 -3
  204. package/dist/es2019/ui/ContentStyles/index.js +7 -2
  205. package/dist/es2019/ui/LinkSearch/ToolbarComponents.js +1 -0
  206. package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +56 -34
  207. package/dist/es2019/utils/commands.js +26 -14
  208. package/dist/es2019/utils/input-rules.js +22 -1
  209. package/dist/es2019/version-wrapper.js +1 -1
  210. package/dist/es2019/version.json +1 -1
  211. package/dist/esm/create-editor/ReactEditorView.js +2 -1
  212. package/dist/esm/create-editor/create-plugins-list.js +9 -6
  213. package/dist/esm/create-editor/messages.js +8 -0
  214. package/dist/esm/i18n/en.js +2 -2
  215. package/dist/esm/i18n/en_GB.js +2 -2
  216. package/dist/esm/i18n/en_ZZ.js +2 -2
  217. package/dist/esm/i18n/index.js +4 -4
  218. package/dist/esm/i18n/languages.js +9 -4
  219. package/dist/esm/labs/next/presets/mobile.js +2 -2
  220. package/dist/esm/labs/next/presets/preset.js +36 -6
  221. package/dist/esm/plugins/annotation/nodeviews/index.js +1 -0
  222. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +5 -1
  223. package/dist/esm/plugins/breakout/ui/LayoutButton.js +4 -1
  224. package/dist/esm/plugins/card/pm-plugins/doc.js +10 -20
  225. package/dist/esm/plugins/card/pm-plugins/main.js +4 -17
  226. package/dist/esm/plugins/card/toolbar.js +24 -8
  227. package/dist/esm/plugins/card/ui/EditLinkToolbar.js +8 -6
  228. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +9 -39
  229. package/dist/esm/plugins/card/utils.js +15 -2
  230. package/dist/esm/plugins/collab-edit/actions.js +3 -3
  231. package/dist/esm/plugins/copy-button/toolbar.js +5 -3
  232. package/dist/esm/plugins/date/index.js +1 -6
  233. package/dist/esm/plugins/date/ui/DatePicker/index.js +1 -2
  234. package/dist/esm/plugins/emoji/index.js +7 -13
  235. package/dist/esm/plugins/expand/pm-plugins/main.js +3 -3
  236. package/dist/esm/plugins/expand/toolbar.js +1 -0
  237. package/dist/esm/plugins/extension/commands.js +12 -1
  238. package/dist/esm/plugins/extension/pm-plugins/main.js +10 -0
  239. package/dist/esm/plugins/extension/toolbar.js +50 -8
  240. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +11 -11
  241. package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -3
  242. package/dist/esm/plugins/floating-toolbar/index.js +16 -4
  243. package/dist/esm/plugins/floating-toolbar/ui/CheckboxModal.js +75 -0
  244. package/dist/esm/plugins/floating-toolbar/ui/ConfirmationModal.js +11 -25
  245. package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +17 -4
  246. package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +100 -47
  247. package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -1
  248. package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +29 -108
  249. package/dist/esm/plugins/floating-toolbar/ui/SimpleModal.js +30 -0
  250. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +27 -47
  251. package/dist/esm/plugins/floating-toolbar/ui/messages.js +13 -3
  252. package/dist/esm/plugins/floating-toolbar/utils.js +4 -17
  253. package/dist/esm/plugins/help-dialog/index.js +3 -2
  254. package/dist/esm/plugins/hyperlink/Toolbar.js +20 -2
  255. package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/index.js +10 -3
  256. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +5 -10
  257. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
  258. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -1
  259. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
  260. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -1
  261. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -0
  262. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/item.js +25 -12
  263. package/dist/esm/plugins/layout/toolbar.js +1 -0
  264. package/dist/esm/plugins/list/actions/outdent-list-items-selected.js +30 -4
  265. package/dist/esm/plugins/list/commands/outdent-list.js +1 -1
  266. package/dist/esm/plugins/list/index.js +7 -3
  267. package/dist/esm/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +13 -2
  268. package/dist/esm/plugins/list/pm-plugins/input-rules/index.js +5 -2
  269. package/dist/esm/plugins/list/pm-plugins/main.js +31 -11
  270. package/dist/esm/plugins/media/index.js +33 -0
  271. package/dist/esm/plugins/media/nodeviews/mediaGroup.js +7 -6
  272. package/dist/esm/plugins/media/nodeviews/mediaInline.js +3 -1
  273. package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +70 -64
  274. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +3 -1
  275. package/dist/esm/plugins/media/pm-plugins/main.js +7 -0
  276. package/dist/esm/plugins/media/toolbar/index.js +3 -0
  277. package/dist/esm/plugins/media/utils/media-single.js +18 -3
  278. package/dist/esm/plugins/panel/toolbar.js +1 -0
  279. package/dist/esm/plugins/panel/utils.js +1 -1
  280. package/dist/esm/plugins/paste/index.js +2 -1
  281. package/dist/esm/plugins/paste/pm-plugins/analytics.js +15 -2
  282. package/dist/esm/plugins/paste/pm-plugins/main.js +1 -1
  283. package/dist/esm/plugins/paste/util/index.js +2 -2
  284. package/dist/esm/plugins/placeholder/index.js +23 -45
  285. package/dist/esm/plugins/placeholder/styles.js +1 -2
  286. package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +6 -3
  287. package/dist/esm/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -0
  288. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +9 -5
  289. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +4 -1
  290. package/dist/esm/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +5 -1
  291. package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +16 -7
  292. package/dist/esm/plugins/type-ahead/index.js +2 -2
  293. package/dist/esm/plugins/type-ahead/messages.js +44 -4
  294. package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +0 -1
  295. package/dist/esm/plugins/type-ahead/ui/InputQuery.js +17 -1
  296. package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +10 -5
  297. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +8 -5
  298. package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +2 -1
  299. package/dist/esm/plugins/type-ahead/utils.js +38 -0
  300. package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +6 -3
  301. package/dist/esm/ui/Alignment/AlignmentButton/index.js +4 -2
  302. package/dist/esm/ui/Appearance/Comment/Toolbar.js +2 -2
  303. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
  304. package/dist/esm/ui/CollapsedEditor/index.js +3 -2
  305. package/dist/esm/ui/ColorPickerButton/index.js +2 -1
  306. package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +4 -5
  307. package/dist/esm/ui/ConfigPanel/FormContent.js +3 -3
  308. package/dist/esm/ui/ContentStyles/index.js +1 -1
  309. package/dist/esm/ui/LinkSearch/ToolbarComponents.js +1 -0
  310. package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +56 -34
  311. package/dist/esm/utils/commands.js +25 -13
  312. package/dist/esm/utils/input-rules.js +23 -1
  313. package/dist/esm/version-wrapper.js +1 -1
  314. package/dist/esm/version.json +1 -1
  315. package/dist/types/create-editor/messages.d.ts +7 -0
  316. package/dist/types/i18n/index.d.ts +4 -4
  317. package/dist/types/i18n/languages.d.ts +8 -3
  318. package/dist/types/labs/next/presets/cxhtml.d.ts +1 -1
  319. package/dist/types/labs/next/presets/default.d.ts +2 -2
  320. package/dist/types/labs/next/presets/mobile.d.ts +1 -1
  321. package/dist/types/labs/next/presets/preset.d.ts +10 -6
  322. package/dist/types/plugins/alignment/index.d.ts +2 -2
  323. package/dist/types/plugins/analytics/plugin.d.ts +2 -2
  324. package/dist/types/plugins/annotation/index.d.ts +2 -2
  325. package/dist/types/plugins/avatar-group/index.d.ts +4 -3
  326. package/dist/types/plugins/base/index.d.ts +2 -2
  327. package/dist/types/plugins/before-primaryToolbar/index.d.ts +4 -3
  328. package/dist/types/plugins/block-type/index.d.ts +2 -2
  329. package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +1 -1
  330. package/dist/types/plugins/breakout/index.d.ts +2 -2
  331. package/dist/types/plugins/caption/index.d.ts +2 -2
  332. package/dist/types/plugins/card/index.d.ts +2 -2
  333. package/dist/types/plugins/card/pm-plugins/doc.d.ts +4 -4
  334. package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -1
  335. package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +1 -1
  336. package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +5 -5
  337. package/dist/types/plugins/card/utils.d.ts +2 -1
  338. package/dist/types/plugins/clear-marks-on-change-to-empty-document/index.d.ts +2 -2
  339. package/dist/types/plugins/clipboard/index.d.ts +2 -2
  340. package/dist/types/plugins/code-bidi-warning/index.d.ts +4 -3
  341. package/dist/types/plugins/code-block/index.d.ts +2 -2
  342. package/dist/types/plugins/collab-edit/actions.d.ts +1 -1
  343. package/dist/types/plugins/collab-edit/index.d.ts +2 -2
  344. package/dist/types/plugins/context-panel/index.d.ts +2 -2
  345. package/dist/types/plugins/copy-button/index.d.ts +2 -2
  346. package/dist/types/plugins/custom-autoformat/index.d.ts +2 -2
  347. package/dist/types/plugins/data-consumer/index.d.ts +2 -2
  348. package/dist/types/plugins/date/index.d.ts +2 -2
  349. package/dist/types/plugins/date/ui/DatePicker/index.d.ts +0 -1
  350. package/dist/types/plugins/editor-disabled/index.d.ts +2 -2
  351. package/dist/types/plugins/emoji/index.d.ts +2 -2
  352. package/dist/types/plugins/emoji/types.d.ts +2 -1
  353. package/dist/types/plugins/expand/index.d.ts +2 -2
  354. package/dist/types/plugins/expand/pm-plugins/main.d.ts +1 -0
  355. package/dist/types/plugins/extension/commands.d.ts +2 -0
  356. package/dist/types/plugins/extension/index.d.ts +2 -2
  357. package/dist/types/plugins/extension/toolbar.d.ts +10 -0
  358. package/dist/types/plugins/fake-text-cursor/index.d.ts +2 -2
  359. package/dist/types/plugins/feature-flags-context/index.d.ts +2 -2
  360. package/dist/types/plugins/feedback-dialog/index.d.ts +3 -2
  361. package/dist/types/plugins/find-replace/index.d.ts +4 -3
  362. package/dist/types/plugins/floating-toolbar/index.d.ts +2 -2
  363. package/dist/types/plugins/floating-toolbar/ui/CheckboxModal.d.ts +4 -0
  364. package/dist/types/plugins/floating-toolbar/ui/ConfirmationModal.d.ts +1 -8
  365. package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +3 -0
  366. package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +4 -0
  367. package/dist/types/plugins/floating-toolbar/ui/SimpleModal.d.ts +4 -0
  368. package/dist/types/plugins/floating-toolbar/ui/messages.d.ts +10 -0
  369. package/dist/types/plugins/floating-toolbar/ui/types.d.ts +1 -1
  370. package/dist/types/plugins/floating-toolbar/utils.d.ts +2 -3
  371. package/dist/types/plugins/fragment/index.d.ts +2 -2
  372. package/dist/types/plugins/grid/index.d.ts +2 -2
  373. package/dist/types/plugins/help-dialog/index.d.ts +2 -3
  374. package/dist/types/plugins/history/index.d.ts +2 -2
  375. package/dist/types/plugins/hyperlink/index.d.ts +2 -2
  376. package/dist/types/plugins/hyperlink/ui/EditorLinkPicker/index.d.ts +7 -2
  377. package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +2 -1
  378. package/dist/types/plugins/image-upload/index.d.ts +2 -2
  379. package/dist/types/plugins/indentation/index.d.ts +2 -2
  380. package/dist/types/plugins/insert-block/index.d.ts +2 -2
  381. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -0
  382. package/dist/types/plugins/jira-issue/index.d.ts +2 -2
  383. package/dist/types/plugins/layout/index.d.ts +2 -2
  384. package/dist/types/plugins/list/actions/outdent-list-items-selected.d.ts +2 -2
  385. package/dist/types/plugins/list/index.d.ts +3 -2
  386. package/dist/types/plugins/list/pm-plugins/input-rules/create-list-input-rule.d.ts +3 -1
  387. package/dist/types/plugins/list/pm-plugins/main.d.ts +2 -2
  388. package/dist/types/plugins/list/types.d.ts +2 -0
  389. package/dist/types/plugins/macro/index.d.ts +2 -2
  390. package/dist/types/plugins/max-content-size/index.d.ts +2 -2
  391. package/dist/types/plugins/media/index.d.ts +2 -2
  392. package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +2 -1
  393. package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -0
  394. package/dist/types/plugins/media/pm-plugins/types.d.ts +1 -0
  395. package/dist/types/plugins/mentions/index.d.ts +2 -2
  396. package/dist/types/plugins/mobile-dimensions/index.d.ts +2 -2
  397. package/dist/types/plugins/mobile-selection/mobile-selection-plugin.d.ts +2 -2
  398. package/dist/types/plugins/panel/index.d.ts +2 -2
  399. package/dist/types/plugins/paste/index.d.ts +3 -2
  400. package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +1 -0
  401. package/dist/types/plugins/placeholder/index.d.ts +4 -4
  402. package/dist/types/plugins/placeholder/styles.d.ts +0 -1
  403. package/dist/types/plugins/placeholder-text/index.d.ts +2 -2
  404. package/dist/types/plugins/quick-insert/index.d.ts +2 -2
  405. package/dist/types/plugins/rule/index.d.ts +2 -2
  406. package/dist/types/plugins/save-on-enter/index.d.ts +3 -2
  407. package/dist/types/plugins/scroll-into-view/index.d.ts +2 -2
  408. package/dist/types/plugins/selection/index.d.ts +2 -2
  409. package/dist/types/plugins/status/index.d.ts +2 -2
  410. package/dist/types/plugins/submit-editor/index.d.ts +4 -2
  411. package/dist/types/plugins/tasks-and-decisions/index.d.ts +2 -2
  412. package/dist/types/plugins/text-color/index.d.ts +3 -2
  413. package/dist/types/plugins/text-formatting/index.d.ts +2 -2
  414. package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +4 -3
  415. package/dist/types/plugins/type-ahead/index.d.ts +2 -2
  416. package/dist/types/plugins/type-ahead/messages.d.ts +41 -1
  417. package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +3 -1
  418. package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +1 -0
  419. package/dist/types/plugins/type-ahead/utils.d.ts +7 -1
  420. package/dist/types/plugins/undo-redo/index.d.ts +2 -2
  421. package/dist/types/plugins/unsupported-content/index.d.ts +2 -2
  422. package/dist/types/plugins/view-update-subscription/index.d.ts +2 -2
  423. package/dist/types/plugins/width/index.d.ts +2 -2
  424. package/dist/types/test-utils.d.ts +2 -1
  425. package/dist/types/types/editor-plugin.d.ts +1 -1
  426. package/dist/types/types/editor-props.d.ts +0 -2
  427. package/dist/types/types/index.d.ts +1 -1
  428. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -3
  429. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  430. package/dist/types/ui/ConfigPanel/Fields/Fieldset.d.ts +2 -1
  431. package/dist/types/ui/ConfigPanel/FormContent.d.ts +2 -23
  432. package/dist/types/ui/ConfigPanel/types.d.ts +22 -0
  433. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  434. package/dist/types/ui/LinkSearch/ToolbarComponents.d.ts +1 -0
  435. package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +4 -1
  436. package/package.json +23 -23
  437. package/report.api.md +25 -16
  438. package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +0 -181
  439. package/dist/cjs/plugins/card/ui/link-toolbar-icon-dropdown-options.js +0 -66
  440. package/dist/cjs/plugins/emoji/ui/EmojiContextProvider/index.js +0 -61
  441. package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +0 -151
  442. package/dist/es2019/plugins/card/ui/link-toolbar-icon-dropdown-options.js +0 -51
  443. package/dist/es2019/plugins/emoji/ui/EmojiContextProvider/index.js +0 -21
  444. package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +0 -161
  445. package/dist/esm/plugins/card/ui/link-toolbar-icon-dropdown-options.js +0 -51
  446. package/dist/esm/plugins/emoji/ui/EmojiContextProvider/index.js +0 -46
  447. package/dist/types/plugins/card/ui/LinkToolbarIconDropdown.d.ts +0 -25
  448. package/dist/types/plugins/card/ui/link-toolbar-icon-dropdown-options.d.ts +0 -5
  449. package/dist/types/plugins/emoji/ui/EmojiContextProvider/index.d.ts +0 -13
@@ -14,12 +14,13 @@ import { jsx } from '@emotion/react';
14
14
  import { injectIntl } from 'react-intl-next';
15
15
  import UndoIcon from '@atlaskit/icon/glyph/undo';
16
16
  import RedoIcon from '@atlaskit/icon/glyph/redo';
17
- import { undo as undoKeymap, redo as redoKeymap, ToolTipContent } from '../../../../keymaps';
17
+ import { undo as undoKeymap, redo as redoKeymap, ToolTipContent, tooltip } from '../../../../keymaps';
18
18
  import { buttonGroupStyle, separatorStyles } from '../../../../ui/styles';
19
19
  import ToolbarButton, { TOOLBAR_BUTTON } from '../../../../ui/ToolbarButton';
20
20
  import { messages } from '../../messages';
21
21
  import { createTypeAheadTools } from '../../../type-ahead/api';
22
22
  import { undoFromToolbar, redoFromToolbar } from '../../commands';
23
+ import { getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
23
24
 
24
25
  var closeTypeAheadAndRunCommand = function closeTypeAheadAndRunCommand(editorView) {
25
26
  return function (command) {
@@ -90,7 +91,8 @@ export var ToolbarUndoRedo = /*#__PURE__*/function (_PureComponent) {
90
91
  spacing: isReducedSpacing ? 'none' : 'default',
91
92
  onClick: handleUndo,
92
93
  disabled: !canUndo || disabled,
93
- "aria-label": labelUndo,
94
+ "aria-label": tooltip(undoKeymap, labelUndo),
95
+ "aria-keyshortcuts": getAriaKeyshortcuts(undoKeymap),
94
96
  title: jsx(ToolTipContent, {
95
97
  description: labelUndo,
96
98
  keymap: undoKeymap
@@ -112,7 +114,8 @@ export var ToolbarUndoRedo = /*#__PURE__*/function (_PureComponent) {
112
114
  label: ""
113
115
  }),
114
116
  testId: "ak-editor-toolbar-button-redo",
115
- "aria-label": labelRedo
117
+ "aria-label": tooltip(redoKeymap, labelRedo),
118
+ "aria-keyshortcuts": getAriaKeyshortcuts(redoKeymap)
116
119
  }), jsx("span", {
117
120
  css: separatorStyles
118
121
  }));
@@ -13,7 +13,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
13
13
  import React from 'react';
14
14
  import { PureComponent } from 'react';
15
15
  import ToolbarButton from '../../ToolbarButton';
16
- import { ToolTipContent } from '../../../keymaps';
16
+ import { ToolTipContent, tooltip } from '../../../keymaps';
17
+ import { getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
17
18
 
18
19
  var AlignmentButton = /*#__PURE__*/function (_PureComponent) {
19
20
  _inherits(AlignmentButton, _PureComponent);
@@ -57,8 +58,9 @@ var AlignmentButton = /*#__PURE__*/function (_PureComponent) {
57
58
  description: label,
58
59
  keymap: shortcut
59
60
  }),
60
- "aria-label": label,
61
+ "aria-label": shortcut ? tooltip(shortcut, label) : label,
61
62
  "aria-pressed": isSelected,
63
+ "aria-keyshortcuts": getAriaKeyshortcuts(shortcut),
62
64
  onClick: this.onClick,
63
65
  iconBefore: content
64
66
  });
@@ -9,10 +9,10 @@ import { css, jsx } from '@emotion/react';
9
9
  import { gridSize } from '@atlaskit/theme/constants';
10
10
  import { N30 } from '@atlaskit/theme/colors';
11
11
  import { token } from '@atlaskit/tokens';
12
- import { akEditorToolbarKeylineHeight, akEditorGridLineZIndex, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
12
+ import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
13
13
  export var TableControlsPadding = 20;
14
14
  var mainToolbarWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding: ", "px ", "px 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"])), gridSize(), gridSize(), token('elevation.surface', 'white'), TableControlsPadding);
15
- 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: ", "px;\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"])), gridSize(), akEditorGridLineZIndex + akEditorMenuZIndex, akEditorToolbarKeylineHeight, token('color.border', N30));
15
+ 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: ", "px;\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"])), gridSize(), akEditorMenuZIndex, akEditorToolbarKeylineHeight, token('color.border', N30));
16
16
 
17
17
  var StickyToolbar = function StickyToolbar(props) {
18
18
  var _useState = useState(0),
@@ -78,7 +78,8 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
78
78
 
79
79
  var contextPanelWidth = _ref.width;
80
80
  return jsx(ToolbarArrowKeyNavigationProvider, {
81
- editorView: props.editorView
81
+ editorView: props.editorView,
82
+ childComponentSelector: "[data-testid='ak-editor-main-toolbar']"
82
83
  }, jsx("div", {
83
84
  css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.twoLineEditorToolbar)),
84
85
  "data-testid": "ak-editor-main-toolbar"
@@ -10,6 +10,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
10
10
 
11
11
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
12
 
13
+ import { IntlProviderIfMissingWrapper } from '@atlaskit/editor-common/ui';
13
14
  import React from 'react';
14
15
  import Editor from '../../editor';
15
16
  import EditorWithActions from '../../labs/EditorWithActions';
@@ -72,10 +73,10 @@ var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
72
73
  }
73
74
 
74
75
  if (!this.props.isExpanded) {
75
- return /*#__PURE__*/React.createElement(ChromeCollapsed, {
76
+ return /*#__PURE__*/React.createElement(IntlProviderIfMissingWrapper, null, /*#__PURE__*/React.createElement(ChromeCollapsed, {
76
77
  onFocus: this.props.onFocus,
77
78
  text: this.props.placeholder
78
- });
79
+ }));
79
80
  }
80
81
 
81
82
  return /*#__PURE__*/React.cloneElement(child, {
@@ -92,7 +92,8 @@ var ColorPickerButton = function ColorPickerButton(props) {
92
92
  zIndex: props.setDisableParentScroll ? 600 : undefined,
93
93
  ariaLabel: "Color picker popup"
94
94
  }, jsx("div", {
95
- css: colorPickerWrapper
95
+ css: colorPickerWrapper,
96
+ "data-test-id": "color-picker-menu"
96
97
  }, jsx(ColorPaletteWithListeners, {
97
98
  palette: props.colorPalette,
98
99
  cols: props.cols,
@@ -27,9 +27,7 @@ import SectionMessage from '@atlaskit/section-message';
27
27
  import Button from '@atlaskit/button/custom-theme-button';
28
28
  import Select from '@atlaskit/select';
29
29
  import AddCircleIcon from '@atlaskit/icon/glyph/add-circle';
30
- import { messages } from '../messages'; // eslint-disable-next-line import/no-cycle
31
-
32
- import FormContent from '../FormContent';
30
+ import { messages } from '../messages';
33
31
  import { getNameFromDuplicateField, isDuplicateField } from '../utils';
34
32
  import { gridSize } from '@atlaskit/theme/constants';
35
33
  import { N40A } from '@atlaskit/theme/colors';
@@ -267,7 +265,8 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
267
265
  extensionManifest = _this$props.extensionManifest,
268
266
  onFieldChange = _this$props.onFieldChange,
269
267
  firstVisibleFieldName = _this$props.firstVisibleFieldName,
270
- error = _this$props.error;
268
+ error = _this$props.error,
269
+ FormComponent = _this$props.formComponent;
271
270
  var label = field.label,
272
271
  options = field.options;
273
272
  var _this$state3 = this.state,
@@ -277,7 +276,7 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
277
276
  var children = this.renderActions();
278
277
  return jsx(Fragment, null, error && jsx(FieldsetError, {
279
278
  message: error
280
- }), jsx("div", null, options.showTitle && jsx("h5", null, label), jsx(FormContent, {
279
+ }), jsx("div", null, options.showTitle && jsx("h5", null, label), jsx(FormComponent, {
281
280
  fields: selectedFields,
282
281
  parentName: name,
283
282
  extensionManifest: extensionManifest,
@@ -11,8 +11,7 @@ import Boolean from './Fields/Boolean';
11
11
  import CustomSelect from './Fields/CustomSelect';
12
12
  import Date from './Fields/Date';
13
13
  import DateRange from './Fields/DateRange';
14
- import Enum from './Fields/Enum'; // eslint-disable-next-line import/no-cycle
15
-
14
+ import Enum from './Fields/Enum';
16
15
  import Fieldset from './Fields/Fieldset';
17
16
  import Number from './Fields/Number';
18
17
  import String from './Fields/String';
@@ -125,7 +124,8 @@ export function FieldComponent(_ref) {
125
124
  onFieldChange: onFieldChange,
126
125
  extensionManifest: extensionManifest,
127
126
  parameters: defaultValue || {},
128
- error: error
127
+ error: error,
128
+ formComponent: FormContent
129
129
  });
130
130
 
131
131
  case 'user':
@@ -40,7 +40,7 @@ import { useFeatureFlags } from '../../plugins/feature-flags-context';
40
40
  import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
41
41
 
42
42
  var contentStyles = function contentStyles(props) {
43
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap,\n .pm-table-cell-content-wrap div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
43
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
44
44
  theme: props.theme
45
45
  }), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, token('color.border.focused', '#8cf'), placeholderTextStyles, placeholderStyles, codeBlockStyles(props), blocktypeStyles(props), textFormattingStyles(props), textColorStyles, listsStyles, ruleStyles(props), mediaStyles, layoutStyles, telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(props), fakeCursorStyles, mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(props), findReplaceStyles, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, ClassNames.FLOATING_TOOLBAR_COMPONENT);
46
46
  };
@@ -6,6 +6,7 @@ import { css } from '@emotion/react';
6
6
  export var RECENT_SEARCH_WIDTH_IN_PX = 420;
7
7
  export var RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX = 360;
8
8
  export var RECENT_SEARCH_HEIGHT_IN_PX = 360;
9
+ export var LINKPICKER_HEIGHT_IN_PX = 570;
9
10
  export var inputWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n line-height: 0;\n padding: 5px 0;\n align-items: center;\n"])));
10
11
  export var container = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n overflow: auto;\n padding: 0;\n\n width: ", "px;\n line-height: initial;\n"])), RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX);
11
12
  export var containerWithProvider = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: ", "px;\n"])), RECENT_SEARCH_WIDTH_IN_PX);
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-console */
2
- import React, { useLayoutEffect, useRef } from 'react';
2
+ import React, { useCallback, useLayoutEffect, useRef } from 'react';
3
3
 
4
4
  /*
5
5
  ** The context is used to handle the keydown events of submenus.
@@ -20,32 +20,33 @@ export var KeyDownHandlerContext = /*#__PURE__*/React.createContext({
20
20
 
21
21
  export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigationProvider(_ref) {
22
22
  var children = _ref.children,
23
- editorView = _ref.editorView;
23
+ editorView = _ref.editorView,
24
+ childComponentSelector = _ref.childComponentSelector,
25
+ handleEscape = _ref.handleEscape,
26
+ disableArrowKeyNavigation = _ref.disableArrowKeyNavigation;
24
27
  var wrapperRef = useRef(null);
25
- var currentSelectedItemIndex = useRef(0);
26
-
27
- var incrementIndex = function incrementIndex(list) {
28
- if (currentSelectedItemIndex.current === list.length - 1) {
29
- currentSelectedItemIndex.current = 0;
28
+ var selectedItemIndex = useRef(0);
29
+ var incrementIndex = useCallback(function (list) {
30
+ if (selectedItemIndex.current === list.length - 1) {
31
+ selectedItemIndex.current = 0;
30
32
  } else {
31
- currentSelectedItemIndex.current = currentSelectedItemIndex.current + 1;
33
+ selectedItemIndex.current = selectedItemIndex.current + 1;
32
34
  }
33
- };
34
-
35
- var decrementIndex = function decrementIndex(list) {
36
- if (currentSelectedItemIndex.current === 0) {
37
- currentSelectedItemIndex.current = list.length - 1;
35
+ }, []);
36
+ var decrementIndex = useCallback(function (list) {
37
+ if (selectedItemIndex.current === 0) {
38
+ selectedItemIndex.current = list.length - 1;
38
39
  } else {
39
- currentSelectedItemIndex.current = currentSelectedItemIndex.current - 1;
40
+ selectedItemIndex.current = selectedItemIndex.current - 1;
40
41
  }
41
- };
42
+ }, []);
42
43
 
43
44
  var handleArrowRight = function handleArrowRight() {
44
45
  var _filteredFocusableEle;
45
46
 
46
47
  var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
47
48
  incrementIndex(filteredFocusableElements);
48
- (_filteredFocusableEle = filteredFocusableElements[currentSelectedItemIndex.current]) === null || _filteredFocusableEle === void 0 ? void 0 : _filteredFocusableEle.focus();
49
+ (_filteredFocusableEle = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle === void 0 ? void 0 : _filteredFocusableEle.focus();
49
50
  };
50
51
 
51
52
  var handleArrowLeft = function handleArrowLeft() {
@@ -53,14 +54,23 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
53
54
 
54
55
  var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
55
56
  decrementIndex(filteredFocusableElements);
56
- (_filteredFocusableEle2 = filteredFocusableElements[currentSelectedItemIndex.current]) === null || _filteredFocusableEle2 === void 0 ? void 0 : _filteredFocusableEle2.focus();
57
+ (_filteredFocusableEle2 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle2 === void 0 ? void 0 : _filteredFocusableEle2.focus();
57
58
  };
58
59
 
59
60
  var handleTab = function handleTab() {
60
61
  var _filteredFocusableEle3;
61
62
 
62
63
  var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
63
- (_filteredFocusableEle3 = filteredFocusableElements[currentSelectedItemIndex.current]) === null || _filteredFocusableEle3 === void 0 ? void 0 : _filteredFocusableEle3.focus();
64
+ (_filteredFocusableEle3 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle3 === void 0 ? void 0 : _filteredFocusableEle3.focus();
65
+ };
66
+
67
+ var focusAndScrollToElement = function focusAndScrollToElement(element) {
68
+ element === null || element === void 0 ? void 0 : element.scrollIntoView({
69
+ behavior: 'smooth',
70
+ block: 'center',
71
+ inline: 'nearest'
72
+ });
73
+ element.focus();
64
74
  };
65
75
 
66
76
  var submenuKeydownHandleContext = {
@@ -69,7 +79,7 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
69
79
  handleTab: handleTab
70
80
  };
71
81
  useLayoutEffect(function () {
72
- if (!wrapperRef.current) {
82
+ if (!wrapperRef.current || disableArrowKeyNavigation) {
73
83
  return;
74
84
  }
75
85
 
@@ -80,17 +90,17 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
80
90
  */
81
91
 
82
92
  var handleKeyDown = function handleKeyDown(event) {
83
- var _document$querySelect, _wrapperRef$current, _filteredFocusableEle4;
93
+ var _document$querySelect, _document$querySelect2, _wrapperRef$current;
84
94
 
85
- //To trap the focus inside the horizontal main toolbar for left and right arrow keys
86
- var targetElement = event.target; //To filter out the events outside the main toolbar
95
+ //To trap the focus inside the horizontal toolbar for left and right arrow keys
96
+ var targetElement = event.target; //To filter out the events outside the child component
87
97
 
88
- if (!targetElement.closest("[data-testid='ak-editor-main-toolbar']")) {
98
+ if (!targetElement.closest("".concat(childComponentSelector))) {
89
99
  return;
90
100
  } //The key events are from child components such as dropdown menus / popups are ignored
91
101
 
92
102
 
93
- if ((_document$querySelect = document.querySelector('[data-role="droplistContent"], [data-test-id="color-picker-menu"], [data-emoji-picker-container="true"]')) !== null && _document$querySelect !== void 0 && _document$querySelect.contains(targetElement) || event.key === 'ArrowUp' || event.key === 'ArrowDown') {
103
+ if ((_document$querySelect = document.querySelector('[data-role="droplistContent"], [data-test-id="color-picker-menu"], [data-emoji-picker-container="true"]')) !== null && _document$querySelect !== void 0 && _document$querySelect.contains(targetElement) || (_document$querySelect2 = document.querySelector('[data-test-id="color-picker-menu"]')) !== null && _document$querySelect2 !== void 0 && _document$querySelect2.contains(targetElement) || event.key === 'ArrowUp' || event.key === 'ArrowDown' || disableArrowKeyNavigation) {
94
104
  return;
95
105
  }
96
106
 
@@ -103,25 +113,37 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
103
113
 
104
114
 
105
115
  if (!((_wrapperRef$current = wrapperRef.current) !== null && _wrapperRef$current !== void 0 && _wrapperRef$current.contains(targetElement))) {
106
- currentSelectedItemIndex.current = -1;
116
+ selectedItemIndex.current = -1;
107
117
  } else {
108
- currentSelectedItemIndex.current = filteredFocusableElements.indexOf(targetElement) > -1 ? filteredFocusableElements.indexOf(targetElement) : currentSelectedItemIndex.current;
118
+ selectedItemIndex.current = filteredFocusableElements.indexOf(targetElement) > -1 ? filteredFocusableElements.indexOf(targetElement) : selectedItemIndex.current;
109
119
  }
110
120
 
111
- if (event.key === 'ArrowRight') {
112
- incrementIndex(filteredFocusableElements);
113
- } else if (event.key === 'ArrowLeft') {
114
- decrementIndex(filteredFocusableElements);
115
- }
121
+ switch (event.key) {
122
+ case 'ArrowRight':
123
+ incrementIndex(filteredFocusableElements);
124
+ focusAndScrollToElement(filteredFocusableElements[selectedItemIndex.current]);
125
+ event.preventDefault();
126
+ break;
127
+
128
+ case 'ArrowLeft':
129
+ decrementIndex(filteredFocusableElements);
130
+ focusAndScrollToElement(filteredFocusableElements[selectedItemIndex.current]);
131
+ event.preventDefault();
132
+ break;
116
133
 
117
- (_filteredFocusableEle4 = filteredFocusableElements[currentSelectedItemIndex.current]) === null || _filteredFocusableEle4 === void 0 ? void 0 : _filteredFocusableEle4.focus();
134
+ case 'Escape':
135
+ handleEscape(event);
136
+ break;
137
+
138
+ default:
139
+ }
118
140
  };
119
141
 
120
142
  element === null || element === void 0 ? void 0 : element.addEventListener('keydown', handleKeyDown);
121
143
  return function () {
122
144
  element === null || element === void 0 ? void 0 : element.removeEventListener('keydown', handleKeyDown);
123
145
  };
124
- }, [currentSelectedItemIndex, wrapperRef, editorView]);
146
+ }, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex]);
125
147
  return /*#__PURE__*/React.createElement("div", {
126
148
  className: "custom-key-handler-wrapper",
127
149
  ref: wrapperRef
@@ -142,6 +164,6 @@ function getFocusableElements(rootNode) {
142
164
  function getFilteredFocusableElements(rootNode) {
143
165
  //The focusable elements from child components such as dropdown menus / popups are ignored
144
166
  return getFocusableElements(rootNode).filter(function (elm) {
145
- return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]');
167
+ return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('.scroll-buttons');
146
168
  });
147
169
  }
@@ -114,12 +114,27 @@ var applyMarkOnRange = function applyMarkOnRange(from, to, removeMark, mark, tr)
114
114
  return tr;
115
115
  };
116
116
 
117
+ var entireSelectionContainsMark = function entireSelectionContainsMark(mark, doc, fromPos, toPos) {
118
+ var onlyContainsMark = true;
119
+ doc.nodesBetween(fromPos, toPos, function (node) {
120
+ // Skip recursion once we've found text which doesn't include the mark
121
+ if (!onlyContainsMark) {
122
+ return false;
123
+ }
124
+
125
+ if (node.isText) {
126
+ onlyContainsMark && (onlyContainsMark = mark.isInSet(node.marks));
127
+ }
128
+ });
129
+ return onlyContainsMark;
130
+ };
131
+
117
132
  var toggleMarkInRange = function toggleMarkInRange(mark) {
118
133
  return function (state, dispatch) {
119
134
  var tr = state.tr;
120
135
 
121
136
  if (state.selection instanceof CellSelection) {
122
- var markInRange = false;
137
+ var removeMark = true;
123
138
  var cells = [];
124
139
  state.selection.forEachCell(function (cell, cellPos) {
125
140
  cells.push({
@@ -128,30 +143,27 @@ var toggleMarkInRange = function toggleMarkInRange(mark) {
128
143
  });
129
144
  var from = cellPos;
130
145
  var to = cellPos + cell.nodeSize;
131
-
132
- if (!markInRange) {
133
- markInRange = state.doc.rangeHasMark(from, to, mark);
134
- }
146
+ removeMark && (removeMark = entireSelectionContainsMark(mark, state.doc, from, to));
135
147
  });
136
148
 
137
149
  for (var i = cells.length - 1; i >= 0; i--) {
138
150
  var cell = cells[i];
139
151
  var from = cell.pos;
140
152
  var to = from + cell.node.nodeSize;
141
- applyMarkOnRange(from, to, markInRange, mark, tr);
153
+ applyMarkOnRange(from, to, removeMark, mark, tr);
142
154
  }
143
155
  } else {
144
156
  var _state$selection3 = state.selection,
145
157
  $from = _state$selection3.$from,
146
- $to = _state$selection3.$to; // The type for `rangeHasMark` only accepts a `MarkType` as a third param,
147
- // Yet the internals use a method that exists on both MarkType and Mark (one checks attributes the other doesnt)
148
- // For example, with our subsup mark: We use the same mark with different attributes to convert
149
- // different formatting but when using `MarkType.isInSet(marks)` it returns true for both.
150
- // Calling `Mark.isInSet(marks)` compares attributes as well.
158
+ $to = _state$selection3.$to; // We decide to remove the mark only if the entire selection contains the mark
159
+ // Examples with *bold* text
160
+ // Scenario 1: Selection contains both bold and non-bold text -> bold entire selection
161
+ // Scenario 2: Selection contains only bold text -> un-bold entire selection
162
+ // Scenario 3: Selection contains no bold text -> bold entire selection
151
163
 
152
- var _markInRange = state.doc.rangeHasMark($from.pos, $to.pos, mark);
164
+ var _removeMark = entireSelectionContainsMark(mark, state.doc, $from.pos, $to.pos);
153
165
 
154
- applyMarkOnRange($from.pos, $to.pos, _markInRange, mark, tr);
166
+ applyMarkOnRange($from.pos, $to.pos, _removeMark, mark, tr);
155
167
  }
156
168
 
157
169
  if (tr.docChanged) {
@@ -4,12 +4,14 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
4
4
 
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
6
 
7
- import { closeHistory } from 'prosemirror-history';
8
7
  import { TextSelection } from 'prosemirror-state';
9
8
  import { canJoin, findWrapping } from 'prosemirror-transform';
10
9
  import { GapCursorSelection } from '@atlaskit/editor-common/selection';
11
10
  import { createInputRulePlugin } from '@atlaskit/prosemirror-input-rules';
12
11
  import { addAnalytics } from '../plugins/analytics';
12
+ import { closeHistory } from 'prosemirror-history';
13
+ import { findParentNodeOfTypeClosestToPos } from 'prosemirror-utils';
14
+ import { getFeatureFlags } from '../plugins/feature-flags-context';
13
15
  export var ruleWithAnalytics = function ruleWithAnalytics(getPayload) {
14
16
  return function (originalRule) {
15
17
  var onHandlerApply = function onHandlerApply(state, tr, matchResult) {
@@ -128,6 +130,26 @@ export var createWrappingJoinRule = function createWrappingJoinRule(_ref3) {
128
130
  }
129
131
 
130
132
  tr.wrap(range, wrapping);
133
+ var featureFlags = getFeatureFlags(state);
134
+
135
+ if (featureFlags !== null && featureFlags !== void 0 && featureFlags.restartNumberedLists && nodeType === state.schema.nodes.orderedList) {
136
+ // if an orderedList node would be inserted by the input rule match, and
137
+ // that orderedList node is being added directly before another orderedList
138
+ // node, then join those nodes
139
+ var $end = tr.doc.resolve(tr.mapping.map(end));
140
+
141
+ var _node = findParentNodeOfTypeClosestToPos($end, nodeType);
142
+
143
+ if (_node) {
144
+ var nodeEnd = _node.pos + _node.node.nodeSize;
145
+ var after = tr.doc.resolve(nodeEnd).nodeAfter;
146
+
147
+ if (after && after.type === nodeType && canJoin(tr.doc, nodeEnd) && (!joinPredicate || joinPredicate(match, after))) {
148
+ tr.join(nodeEnd);
149
+ }
150
+ }
151
+ }
152
+
131
153
  var before = tr.doc.resolve(fixedStart - 1).nodeBefore;
132
154
 
133
155
  if (before && before.type === nodeType && canJoin(tr.doc, fixedStart - 1) && (!joinPredicate || joinPredicate(match, before))) {
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "176.0.3";
2
+ export var version = "177.0.0";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "176.0.3",
3
+ "version": "177.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,7 @@
1
+ export declare const editorMessages: {
2
+ editorAssistiveLabel: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ };
@@ -1,13 +1,15 @@
1
1
  /**
2
2
  * NOTE:
3
3
  *
4
- * This file is automatically generated by i18n-tools.
5
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
4
+ * ED-16073:
5
+ * This was manually updated since the original `@atlaskit/i18n-tools` has been deprecated
6
6
  */
7
7
  export { default as zh } from './zh';
8
8
  export { default as zh_TW } from './zh_TW';
9
9
  export { default as cs } from './cs';
10
10
  export { default as da } from './da';
11
+ export { default as en } from './en';
12
+ export { default as en_GB } from './en_GB';
11
13
  export { default as nl } from './nl';
12
14
  export { default as et } from './et';
13
15
  export { default as fi } from './fi';
@@ -29,7 +31,5 @@ export { default as th } from './th';
29
31
  export { default as tr } from './tr';
30
32
  export { default as uk } from './uk';
31
33
  export { default as vi } from './vi';
32
- export { default as en } from './en';
33
- export { default as en_GB } from './en_GB';
34
34
  export { default as is } from './is';
35
35
  export { default as ro } from './ro';
@@ -1,8 +1,9 @@
1
1
  declare const _default: {
2
2
  zh: string;
3
+ zh_TW: string;
3
4
  cs: string;
4
- da: string;
5
5
  nl: string;
6
+ da: string;
6
7
  en: string;
7
8
  en_GB: string;
8
9
  et: string;
@@ -23,11 +24,15 @@ declare const _default: {
23
24
  sk: string;
24
25
  es: string;
25
26
  sv: string;
27
+ th: string;
28
+ tr: string;
29
+ uk: string;
30
+ vi: string;
26
31
  };
27
32
  /**
28
33
  * NOTE:
29
34
  *
30
- * This file is automatically generated by i18n-tools.
31
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
35
+ * ED-16073:
36
+ * This was manually updated since the original `@atlaskit/i18n-tools` has been deprecated
32
37
  */
33
38
  export default _default;
@@ -8,5 +8,5 @@ export declare type EditorPresetCXHTMLProps = {
8
8
  mentionProvider?: Promise<MentionProvider>;
9
9
  mediaProvider?: Promise<MediaProvider>;
10
10
  } & EditorPresetProps;
11
- export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeholder, featureFlags, }: EditorPresetCXHTMLProps): import("./preset").Preset<import("@atlaskit/editor-common/types").EditorPlugin>[];
11
+ export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeholder, featureFlags, }: EditorPresetCXHTMLProps): import("./preset").Preset<import("@atlaskit/editor-common/types").EditorPlugin, []>[];
12
12
  export declare function EditorPresetCXHTML(props: EditorPresetCXHTMLProps): JSX.Element;
@@ -39,7 +39,7 @@ export declare type DefaultPresetPluginOptions = {
39
39
  * Note: The order that presets are added determines
40
40
  * their placement in the editor toolbar
41
41
  */
42
- export declare function createDefaultPreset(options: EditorPresetProps & DefaultPresetPluginOptions): Preset<EditorPlugin>;
43
- export declare function useDefaultPreset(props: EditorPresetProps & DefaultPresetPluginOptions): Preset<EditorPlugin>[];
42
+ export declare function createDefaultPreset(options: EditorPresetProps & DefaultPresetPluginOptions): Preset<EditorPlugin, []>;
43
+ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPresetPluginOptions): Preset<EditorPlugin, []>[];
44
44
  export declare function EditorPresetDefault(props: EditorPresetDefaultProps & EditorPresetProps & DefaultPresetPluginOptions): JSX.Element;
45
45
  export {};
@@ -11,7 +11,7 @@ declare type EditorPresetMobileProps = {
11
11
  allowMediaSingle?: boolean;
12
12
  };
13
13
  } & EditorPresetProps;
14
- export declare function useMobilePreset({ media, placeholder, maxContentSize, createAnalyticsEvent, featureFlags, }: EditorPresetMobileProps & EditorPresetProps): import("./preset").Preset<import("@atlaskit/editor-common/types").EditorPlugin>[];
14
+ export declare function useMobilePreset({ media, placeholder, maxContentSize, createAnalyticsEvent, featureFlags, }: EditorPresetMobileProps & EditorPresetProps): import("./preset").Preset<import("@atlaskit/editor-common/types").EditorPlugin, []>[];
15
15
  export declare type MobilePresetProps = EditorPresetMobileProps & EditorPresetProps;
16
16
  export declare function EditorPresetMobile(props: MobilePresetProps): JSX.Element;
17
17
  export {};
@@ -1,11 +1,13 @@
1
+ import type { AllBuilderPlugins, AllNextEditorPlugins, SafePresetCheck } from '@atlaskit/editor-common/types';
2
+ import { Builder } from '@atlaskit/editor-common/utils';
1
3
  export declare class Preset<T extends {
2
4
  name: string;
3
- }> {
4
- private plugins;
5
- constructor();
6
- add<PluginFactory>(plugin: PluginConfig<PluginFactory, T>): this;
7
- has(plugin: () => T): boolean;
8
- getEditorPlugins(excludes?: Set<string>): T[];
5
+ }, StackPlugins extends AllBuilderPlugins[] = []> implements Builder<T, StackPlugins> {
6
+ data: [...StackPlugins];
7
+ constructor(...more: [...StackPlugins]);
8
+ add<NewPlugin extends AllBuilderPlugins>(nextOrTuple: SafePresetCheck<NewPlugin, StackPlugins>): Preset<T, [...[NewPlugin], ...StackPlugins]>;
9
+ has(plugin: AllBuilderPlugins): boolean;
10
+ getEditorPlugins(excludes?: Set<string>): AllNextEditorPlugins[];
9
11
  private processEditorPlugins;
10
12
  private removeExcludedPlugins;
11
13
  }
@@ -17,6 +19,8 @@ export declare type PluginsPreset = Array<PluginConfig<any, any>>;
17
19
  * – () => EditorPlugin
18
20
  * – (options: any) => EditorPlugin
19
21
  * – (options?: any) => EditorPlugin
22
+ * (In the future, a preset may contain NextEditorPluginWithDependencies)
23
+ * – (props.externalPlugins) => (options?: any) => EditorPlugin
20
24
  *
21
25
  * Usage:
22
26
  * – preset.add(plugin)
@@ -1,5 +1,5 @@
1
- import { EditorPlugin } from '../../types';
1
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
2
  import { AlignmentPluginState } from './pm-plugins/types';
3
3
  export declare const defaultConfig: AlignmentPluginState;
4
- declare const alignmentPlugin: () => EditorPlugin;
4
+ declare const alignmentPlugin: NextEditorPlugin<'alignment', never>;
5
5
  export default alignmentPlugin;