@atlaskit/editor-core 163.0.0 → 164.0.2

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 (608) hide show
  1. package/.eslintrc.js +20 -0
  2. package/CHANGELOG.md +86 -0
  3. package/dist/cjs/editor.js +22 -14
  4. package/dist/cjs/i18n/cs.js +1 -1
  5. package/dist/cjs/i18n/de.js +3 -3
  6. package/dist/cjs/i18n/en.js +277 -131
  7. package/dist/cjs/i18n/en_GB.js +278 -132
  8. package/dist/cjs/i18n/es.js +1 -1
  9. package/dist/cjs/i18n/hu.js +2 -2
  10. package/dist/cjs/i18n/ko.js +2 -2
  11. package/dist/cjs/i18n/nb.js +1 -1
  12. package/dist/cjs/i18n/pl.js +24 -0
  13. package/dist/cjs/i18n/th.js +2 -2
  14. package/dist/cjs/i18n/tr.js +2 -2
  15. package/dist/cjs/i18n/vi.js +1 -1
  16. package/dist/cjs/i18n/zh.js +3 -0
  17. package/dist/cjs/index.js +12 -0
  18. package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +1 -1
  19. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  20. package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +16 -23
  21. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +13 -8
  22. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +14 -6
  23. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +6 -8
  24. package/dist/cjs/plugins/card/nodeviews/inlineCard.js +16 -42
  25. package/dist/cjs/plugins/card/pm-plugins/main.js +18 -16
  26. package/dist/cjs/plugins/card/ui/LinkToolbarButtonGroup.js +27 -30
  27. package/dist/cjs/plugins/code-block/pm-plugins/keymaps.js +1 -1
  28. package/dist/cjs/plugins/emoji/ui/Emoji/index.js +5 -4
  29. package/dist/cjs/plugins/extension/nodeviews/extension.js +5 -0
  30. package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +7 -3
  31. package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +15 -19
  32. package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +14 -15
  33. package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +16 -11
  34. package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +14 -13
  35. package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +16 -13
  36. package/dist/cjs/plugins/floating-toolbar/ui/Input.js +5 -2
  37. package/dist/cjs/plugins/floating-toolbar/ui/Separator.js +4 -5
  38. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +28 -22
  39. package/dist/cjs/plugins/grid/index.js +2 -2
  40. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +22 -18
  41. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +12 -5
  42. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +23 -21
  43. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/item.js +9 -4
  44. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/styles.js +4 -5
  45. package/dist/cjs/plugins/list/actions/wrap-and-join-lists.js +3 -73
  46. package/dist/cjs/plugins/list/ui/ToolbarLists/index.js +34 -18
  47. package/dist/cjs/plugins/media/commands/helpers.js +45 -25
  48. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +13 -17
  49. package/dist/cjs/plugins/media/nodeviews/styles.js +14 -16
  50. package/dist/cjs/plugins/media/picker-facade.js +6 -69
  51. package/dist/cjs/plugins/media/pm-plugins/main.js +14 -56
  52. package/dist/cjs/plugins/media/toolbar/linking-toolbar-appearance.js +15 -11
  53. package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +5 -7
  54. package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +9 -8
  55. package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +28 -17
  56. package/dist/cjs/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -3
  57. package/dist/cjs/plugins/media/ui/MediaPicker/index.js +1 -1
  58. package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +22 -9
  59. package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +15 -27
  60. package/dist/cjs/plugins/panel/actions.js +2 -2
  61. package/dist/cjs/plugins/panel/nodeviews/panel.js +2 -2
  62. package/dist/cjs/plugins/panel/pm-plugins/main.js +4 -4
  63. package/dist/cjs/plugins/panel/styles.js +2 -2
  64. package/dist/cjs/plugins/panel/toolbar.js +3 -3
  65. package/dist/cjs/plugins/panel/utils.js +4 -4
  66. package/dist/cjs/plugins/paste/handlers.js +6 -3
  67. package/dist/cjs/plugins/paste/pm-plugins/main.js +45 -85
  68. package/dist/cjs/plugins/status/nodeviews/status.js +10 -13
  69. package/dist/cjs/plugins/status/ui/statusPicker.js +6 -5
  70. package/dist/cjs/plugins/table/commands/insert.js +0 -6
  71. package/dist/cjs/plugins/table/pm-plugins/main.js +67 -0
  72. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +18 -16
  73. package/dist/cjs/plugins/table/ui/common-styles.js +5 -12
  74. package/dist/cjs/plugins/table/utils/paste.js +10 -2
  75. package/dist/cjs/plugins/tasks-and-decisions/commands.js +44 -14
  76. package/dist/cjs/plugins/tasks-and-decisions/index.js +17 -18
  77. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/input-rules.js +20 -16
  78. package/dist/cjs/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -1
  79. package/dist/cjs/plugins/tasks-and-decisions/ui/ToolbarTask/index.js +1 -1
  80. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +21 -9
  81. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/styles.js +9 -22
  82. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +7 -8
  83. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +8 -4
  84. package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +14 -8
  85. package/dist/cjs/plugins/text-formatting/ui/Toolbar/more-button.js +7 -2
  86. package/dist/cjs/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +6 -3
  87. package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +11 -4
  88. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +26 -22
  89. package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +7 -6
  90. package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +14 -10
  91. package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +5 -5
  92. package/dist/cjs/ui/Addon/ClickAreaInline/index.js +4 -5
  93. package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +12 -11
  94. package/dist/cjs/ui/Addon/Dropdown/index.js +5 -1
  95. package/dist/cjs/ui/Addon/Dropdown/styles.js +4 -5
  96. package/dist/cjs/ui/Addon/DropdownItem/index.js +5 -5
  97. package/dist/cjs/ui/Addon/DropdownItem/styles.js +4 -5
  98. package/dist/cjs/ui/Alignment/index.js +9 -15
  99. package/dist/cjs/ui/Alignment/styles.js +4 -5
  100. package/dist/cjs/ui/Appearance/Chromeless.js +11 -15
  101. package/dist/cjs/ui/Appearance/Comment/Comment.js +29 -34
  102. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +14 -23
  103. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +6 -3
  104. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +30 -19
  105. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +21 -15
  106. package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +34 -46
  107. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +44 -49
  108. package/dist/cjs/ui/AppearanceComponents/Mobile.js +12 -15
  109. package/dist/cjs/ui/ChromeCollapsed/index.js +5 -2
  110. package/dist/cjs/ui/ChromeCollapsed/styles.js +4 -5
  111. package/dist/cjs/ui/ColorPalette/Color/index.js +8 -3
  112. package/dist/cjs/ui/ColorPalette/Color/styles.js +6 -9
  113. package/dist/cjs/ui/ColorPalette/Palettes/panelBackgroundPalette.js +22 -22
  114. package/dist/cjs/ui/ColorPalette/index.js +8 -3
  115. package/dist/cjs/ui/ColorPalette/styles.js +4 -5
  116. package/dist/cjs/ui/ColorPickerButton/index.js +11 -8
  117. package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +10 -3
  118. package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +11 -17
  119. package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +15 -12
  120. package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +27 -30
  121. package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +32 -31
  122. package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +22 -13
  123. package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +17 -20
  124. package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +4 -5
  125. package/dist/cjs/ui/ConfigPanel/LoadingState.js +5 -5
  126. package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +13 -14
  127. package/dist/cjs/ui/ContentStyles/index.js +24 -18
  128. package/dist/cjs/ui/ContextPanel/index.js +35 -62
  129. package/dist/cjs/ui/DropdownMenu/index.js +20 -25
  130. package/dist/cjs/ui/ElementBrowser/InsertMenu.js +38 -18
  131. package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +13 -12
  132. package/dist/cjs/ui/ElementBrowser/components/ElementBrowserLoader.js +7 -6
  133. package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +5 -3
  134. package/dist/cjs/ui/ElementBrowser/components/ElementSearch.js +18 -21
  135. package/dist/cjs/ui/FloatingToolbar/index.js +9 -14
  136. package/dist/cjs/ui/FloatingToolbar/styles.js +6 -13
  137. package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +37 -27
  138. package/dist/cjs/ui/LinkSearch/ToolbarComponents.js +8 -21
  139. package/dist/cjs/ui/PanelTextInput/index.js +7 -11
  140. package/dist/cjs/ui/PanelTextInput/styles.js +10 -7
  141. package/dist/cjs/ui/PluginSlot/index.js +6 -4
  142. package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +19 -12
  143. package/dist/cjs/ui/ToolbarButton/index.js +8 -8
  144. package/dist/cjs/ui/ToolbarFeedback/index.js +21 -14
  145. package/dist/cjs/ui/ToolbarFeedback/styles.js +14 -28
  146. package/dist/cjs/ui/styles.js +29 -56
  147. package/dist/cjs/utils/prosemirror/autojoin.js +83 -0
  148. package/dist/cjs/version-wrapper.js +1 -1
  149. package/dist/cjs/version.json +1 -1
  150. package/dist/es2019/editor.js +17 -13
  151. package/dist/es2019/i18n/cs.js +1 -1
  152. package/dist/es2019/i18n/de.js +3 -3
  153. package/dist/es2019/i18n/en.js +277 -131
  154. package/dist/es2019/i18n/en_GB.js +278 -132
  155. package/dist/es2019/i18n/es.js +1 -1
  156. package/dist/es2019/i18n/hu.js +2 -2
  157. package/dist/es2019/i18n/ko.js +2 -2
  158. package/dist/es2019/i18n/nb.js +1 -1
  159. package/dist/es2019/i18n/pl.js +24 -0
  160. package/dist/es2019/i18n/th.js +2 -2
  161. package/dist/es2019/i18n/tr.js +2 -2
  162. package/dist/es2019/i18n/vi.js +1 -1
  163. package/dist/es2019/i18n/zh.js +3 -0
  164. package/dist/es2019/index.js +3 -3
  165. package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +1 -1
  166. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +6 -1
  167. package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +15 -12
  168. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +13 -9
  169. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +16 -8
  170. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +6 -4
  171. package/dist/es2019/plugins/card/nodeviews/inlineCard.js +15 -23
  172. package/dist/es2019/plugins/card/pm-plugins/main.js +22 -18
  173. package/dist/es2019/plugins/card/ui/LinkToolbarButtonGroup.js +19 -14
  174. package/dist/es2019/plugins/code-block/pm-plugins/keymaps.js +1 -1
  175. package/dist/es2019/plugins/emoji/ui/Emoji/index.js +6 -3
  176. package/dist/es2019/plugins/extension/nodeviews/extension.js +5 -0
  177. package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +8 -4
  178. package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +5 -6
  179. package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +18 -11
  180. package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +18 -10
  181. package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +13 -9
  182. package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +14 -9
  183. package/dist/es2019/plugins/floating-toolbar/ui/Input.js +7 -3
  184. package/dist/es2019/plugins/floating-toolbar/ui/Separator.js +5 -4
  185. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +28 -18
  186. package/dist/es2019/plugins/grid/index.js +1 -1
  187. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +23 -14
  188. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +13 -7
  189. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +21 -17
  190. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/item.js +9 -5
  191. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/styles.js +2 -2
  192. package/dist/es2019/plugins/list/actions/wrap-and-join-lists.js +3 -69
  193. package/dist/es2019/plugins/list/ui/ToolbarLists/index.js +34 -18
  194. package/dist/es2019/plugins/media/commands/helpers.js +45 -25
  195. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +13 -10
  196. package/dist/es2019/plugins/media/nodeviews/styles.js +13 -9
  197. package/dist/es2019/plugins/media/picker-facade.js +2 -44
  198. package/dist/es2019/plugins/media/pm-plugins/main.js +5 -30
  199. package/dist/es2019/plugins/media/toolbar/linking-toolbar-appearance.js +17 -12
  200. package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +6 -5
  201. package/dist/es2019/plugins/media/ui/Media/DropPlaceholder.js +10 -6
  202. package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +24 -16
  203. package/dist/es2019/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -2
  204. package/dist/es2019/plugins/media/ui/MediaPicker/index.js +1 -1
  205. package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +19 -6
  206. package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +11 -9
  207. package/dist/es2019/plugins/panel/actions.js +1 -1
  208. package/dist/es2019/plugins/panel/nodeviews/panel.js +1 -1
  209. package/dist/es2019/plugins/panel/pm-plugins/main.js +1 -1
  210. package/dist/es2019/plugins/panel/styles.js +1 -1
  211. package/dist/es2019/plugins/panel/toolbar.js +1 -1
  212. package/dist/es2019/plugins/panel/utils.js +1 -1
  213. package/dist/es2019/plugins/paste/handlers.js +6 -3
  214. package/dist/es2019/plugins/paste/pm-plugins/main.js +26 -61
  215. package/dist/es2019/plugins/status/nodeviews/status.js +11 -7
  216. package/dist/es2019/plugins/status/ui/statusPicker.js +8 -5
  217. package/dist/es2019/plugins/table/commands/insert.js +0 -5
  218. package/dist/es2019/plugins/table/pm-plugins/main.js +65 -1
  219. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +20 -11
  220. package/dist/es2019/plugins/table/ui/common-styles.js +2 -18
  221. package/dist/es2019/plugins/table/utils/paste.js +8 -3
  222. package/dist/es2019/plugins/tasks-and-decisions/commands.js +26 -14
  223. package/dist/es2019/plugins/tasks-and-decisions/index.js +18 -19
  224. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/input-rules.js +16 -10
  225. package/dist/es2019/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +2 -2
  226. package/dist/es2019/plugins/tasks-and-decisions/ui/ToolbarTask/index.js +2 -2
  227. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +24 -11
  228. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/styles.js +20 -27
  229. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +7 -3
  230. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +9 -5
  231. package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +15 -9
  232. package/dist/es2019/plugins/text-formatting/ui/Toolbar/more-button.js +7 -3
  233. package/dist/es2019/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +6 -4
  234. package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +13 -5
  235. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +25 -14
  236. package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +8 -6
  237. package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +15 -11
  238. package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +7 -4
  239. package/dist/es2019/ui/Addon/ClickAreaInline/index.js +6 -4
  240. package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +14 -9
  241. package/dist/es2019/ui/Addon/Dropdown/index.js +7 -2
  242. package/dist/es2019/ui/Addon/Dropdown/styles.js +2 -2
  243. package/dist/es2019/ui/Addon/DropdownItem/index.js +6 -4
  244. package/dist/es2019/ui/Addon/DropdownItem/styles.js +2 -2
  245. package/dist/es2019/ui/Alignment/index.js +8 -9
  246. package/dist/es2019/ui/Alignment/styles.js +3 -2
  247. package/dist/es2019/ui/Appearance/Chromeless.js +18 -13
  248. package/dist/es2019/ui/Appearance/Comment/Comment.js +34 -30
  249. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +15 -15
  250. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +8 -4
  251. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +28 -18
  252. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +21 -14
  253. package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +41 -51
  254. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +59 -58
  255. package/dist/es2019/ui/AppearanceComponents/Mobile.js +12 -13
  256. package/dist/es2019/ui/ChromeCollapsed/index.js +7 -3
  257. package/dist/es2019/ui/ChromeCollapsed/styles.js +2 -2
  258. package/dist/es2019/ui/ColorPalette/Color/index.js +10 -4
  259. package/dist/es2019/ui/ColorPalette/Color/styles.js +3 -3
  260. package/dist/es2019/ui/ColorPalette/Palettes/panelBackgroundPalette.js +1 -1
  261. package/dist/es2019/ui/ColorPalette/index.js +6 -3
  262. package/dist/es2019/ui/ColorPalette/styles.js +2 -2
  263. package/dist/es2019/ui/ColorPickerButton/index.js +12 -7
  264. package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +11 -4
  265. package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +13 -10
  266. package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +16 -10
  267. package/dist/es2019/ui/ConfigPanel/Fields/DateRange.js +28 -19
  268. package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +24 -16
  269. package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +18 -13
  270. package/dist/es2019/ui/ConfigPanel/Fields/SelectItem.js +15 -15
  271. package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -2
  272. package/dist/es2019/ui/ConfigPanel/LoadingState.js +6 -4
  273. package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +15 -10
  274. package/dist/es2019/ui/ContentStyles/index.js +20 -17
  275. package/dist/es2019/ui/ContextPanel/index.js +27 -37
  276. package/dist/es2019/ui/DropdownMenu/index.js +28 -20
  277. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +34 -15
  278. package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +9 -5
  279. package/dist/es2019/ui/ElementBrowser/components/ElementBrowserLoader.js +6 -3
  280. package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +7 -5
  281. package/dist/es2019/ui/ElementBrowser/components/ElementSearch.js +31 -18
  282. package/dist/es2019/ui/FloatingToolbar/index.js +8 -8
  283. package/dist/es2019/ui/FloatingToolbar/styles.js +5 -7
  284. package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +30 -14
  285. package/dist/es2019/ui/LinkSearch/ToolbarComponents.js +7 -12
  286. package/dist/es2019/ui/PanelTextInput/index.js +7 -5
  287. package/dist/es2019/ui/PanelTextInput/styles.js +7 -3
  288. package/dist/es2019/ui/PluginSlot/index.js +8 -4
  289. package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +15 -12
  290. package/dist/es2019/ui/ToolbarButton/index.js +8 -5
  291. package/dist/es2019/ui/ToolbarFeedback/index.js +21 -8
  292. package/dist/es2019/ui/ToolbarFeedback/styles.js +9 -11
  293. package/dist/es2019/ui/styles.js +24 -20
  294. package/dist/es2019/utils/prosemirror/autojoin.js +70 -0
  295. package/dist/es2019/version-wrapper.js +1 -1
  296. package/dist/es2019/version.json +1 -1
  297. package/dist/esm/editor.js +16 -13
  298. package/dist/esm/i18n/cs.js +1 -1
  299. package/dist/esm/i18n/de.js +3 -3
  300. package/dist/esm/i18n/en.js +277 -131
  301. package/dist/esm/i18n/en_GB.js +278 -132
  302. package/dist/esm/i18n/es.js +1 -1
  303. package/dist/esm/i18n/hu.js +2 -2
  304. package/dist/esm/i18n/ko.js +2 -2
  305. package/dist/esm/i18n/nb.js +1 -1
  306. package/dist/esm/i18n/pl.js +24 -0
  307. package/dist/esm/i18n/th.js +2 -2
  308. package/dist/esm/i18n/tr.js +2 -2
  309. package/dist/esm/i18n/vi.js +1 -1
  310. package/dist/esm/i18n/zh.js +3 -0
  311. package/dist/esm/index.js +3 -3
  312. package/dist/esm/nodeviews/getInlineNodeViewProducer.js +1 -1
  313. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  314. package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +15 -16
  315. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +13 -9
  316. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +16 -8
  317. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +4 -6
  318. package/dist/esm/plugins/card/nodeviews/inlineCard.js +14 -38
  319. package/dist/esm/plugins/card/pm-plugins/main.js +18 -17
  320. package/dist/esm/plugins/card/ui/LinkToolbarButtonGroup.js +26 -27
  321. package/dist/esm/plugins/code-block/pm-plugins/keymaps.js +1 -1
  322. package/dist/esm/plugins/emoji/ui/Emoji/index.js +6 -3
  323. package/dist/esm/plugins/extension/nodeviews/extension.js +5 -0
  324. package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +8 -4
  325. package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +10 -9
  326. package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +15 -13
  327. package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +17 -10
  328. package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +13 -9
  329. package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +14 -9
  330. package/dist/esm/plugins/floating-toolbar/ui/Input.js +6 -3
  331. package/dist/esm/plugins/floating-toolbar/ui/Separator.js +5 -4
  332. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +30 -22
  333. package/dist/esm/plugins/grid/index.js +1 -1
  334. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +24 -15
  335. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +13 -7
  336. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +25 -23
  337. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/item.js +9 -5
  338. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/styles.js +2 -2
  339. package/dist/esm/plugins/list/actions/wrap-and-join-lists.js +3 -73
  340. package/dist/esm/plugins/list/ui/ToolbarLists/index.js +33 -18
  341. package/dist/esm/plugins/media/commands/helpers.js +45 -25
  342. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +12 -10
  343. package/dist/esm/plugins/media/nodeviews/styles.js +13 -10
  344. package/dist/esm/plugins/media/picker-facade.js +7 -71
  345. package/dist/esm/plugins/media/pm-plugins/main.js +14 -57
  346. package/dist/esm/plugins/media/toolbar/linking-toolbar-appearance.js +17 -12
  347. package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +6 -5
  348. package/dist/esm/plugins/media/ui/Media/DropPlaceholder.js +10 -6
  349. package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +23 -16
  350. package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -2
  351. package/dist/esm/plugins/media/ui/MediaPicker/index.js +1 -1
  352. package/dist/esm/plugins/mentions/ui/InviteItem/index.js +19 -6
  353. package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +8 -12
  354. package/dist/esm/plugins/panel/actions.js +1 -1
  355. package/dist/esm/plugins/panel/nodeviews/panel.js +1 -1
  356. package/dist/esm/plugins/panel/pm-plugins/main.js +1 -1
  357. package/dist/esm/plugins/panel/styles.js +1 -1
  358. package/dist/esm/plugins/panel/toolbar.js +1 -1
  359. package/dist/esm/plugins/panel/utils.js +1 -1
  360. package/dist/esm/plugins/paste/handlers.js +6 -3
  361. package/dist/esm/plugins/paste/pm-plugins/main.js +26 -61
  362. package/dist/esm/plugins/status/nodeviews/status.js +9 -9
  363. package/dist/esm/plugins/status/ui/statusPicker.js +7 -5
  364. package/dist/esm/plugins/table/commands/insert.js +0 -5
  365. package/dist/esm/plugins/table/pm-plugins/main.js +62 -1
  366. package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +19 -11
  367. package/dist/esm/plugins/table/ui/common-styles.js +3 -7
  368. package/dist/esm/plugins/table/utils/paste.js +8 -3
  369. package/dist/esm/plugins/tasks-and-decisions/commands.js +35 -11
  370. package/dist/esm/plugins/tasks-and-decisions/index.js +19 -18
  371. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/input-rules.js +21 -17
  372. package/dist/esm/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +2 -2
  373. package/dist/esm/plugins/tasks-and-decisions/ui/ToolbarTask/index.js +2 -2
  374. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +23 -11
  375. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/styles.js +7 -15
  376. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +7 -3
  377. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +9 -5
  378. package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +15 -9
  379. package/dist/esm/plugins/text-formatting/ui/Toolbar/more-button.js +7 -3
  380. package/dist/esm/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +6 -4
  381. package/dist/esm/plugins/type-ahead/ui/InputQuery.js +13 -5
  382. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +25 -14
  383. package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +8 -6
  384. package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +15 -11
  385. package/dist/esm/ui/Addon/ClickAreaBlock/index.js +6 -4
  386. package/dist/esm/ui/Addon/ClickAreaInline/index.js +5 -4
  387. package/dist/esm/ui/Addon/ClickAreaMobile/index.js +13 -10
  388. package/dist/esm/ui/Addon/Dropdown/index.js +6 -2
  389. package/dist/esm/ui/Addon/Dropdown/styles.js +2 -2
  390. package/dist/esm/ui/Addon/DropdownItem/index.js +6 -4
  391. package/dist/esm/ui/Addon/DropdownItem/styles.js +2 -2
  392. package/dist/esm/ui/Alignment/index.js +8 -9
  393. package/dist/esm/ui/Alignment/styles.js +2 -2
  394. package/dist/esm/ui/Appearance/Chromeless.js +12 -14
  395. package/dist/esm/ui/Appearance/Comment/Comment.js +31 -31
  396. package/dist/esm/ui/Appearance/Comment/Toolbar.js +13 -16
  397. package/dist/esm/ui/Appearance/FullPage/FullPage.js +7 -4
  398. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +28 -18
  399. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +22 -14
  400. package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +21 -24
  401. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +35 -34
  402. package/dist/esm/ui/AppearanceComponents/Mobile.js +13 -14
  403. package/dist/esm/ui/ChromeCollapsed/index.js +6 -3
  404. package/dist/esm/ui/ChromeCollapsed/styles.js +2 -2
  405. package/dist/esm/ui/ColorPalette/Color/index.js +9 -4
  406. package/dist/esm/ui/ColorPalette/Color/styles.js +3 -3
  407. package/dist/esm/ui/ColorPalette/Palettes/panelBackgroundPalette.js +1 -1
  408. package/dist/esm/ui/ColorPalette/index.js +7 -4
  409. package/dist/esm/ui/ColorPalette/styles.js +2 -2
  410. package/dist/esm/ui/ColorPickerButton/index.js +12 -7
  411. package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +11 -4
  412. package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +12 -10
  413. package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +16 -10
  414. package/dist/esm/ui/ConfigPanel/Fields/DateRange.js +27 -19
  415. package/dist/esm/ui/ConfigPanel/Fields/Expand.js +30 -21
  416. package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +17 -13
  417. package/dist/esm/ui/ConfigPanel/Fields/SelectItem.js +18 -18
  418. package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -2
  419. package/dist/esm/ui/ConfigPanel/LoadingState.js +6 -4
  420. package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +13 -12
  421. package/dist/esm/ui/ContentStyles/index.js +20 -17
  422. package/dist/esm/ui/ContextPanel/index.js +31 -48
  423. package/dist/esm/ui/DropdownMenu/index.js +21 -22
  424. package/dist/esm/ui/ElementBrowser/InsertMenu.js +39 -16
  425. package/dist/esm/ui/ElementBrowser/components/CategoryList.js +9 -6
  426. package/dist/esm/ui/ElementBrowser/components/ElementBrowserLoader.js +6 -3
  427. package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +7 -5
  428. package/dist/esm/ui/ElementBrowser/components/ElementSearch.js +20 -18
  429. package/dist/esm/ui/FloatingToolbar/index.js +8 -8
  430. package/dist/esm/ui/FloatingToolbar/styles.js +4 -5
  431. package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +27 -16
  432. package/dist/esm/ui/LinkSearch/ToolbarComponents.js +4 -7
  433. package/dist/esm/ui/PanelTextInput/index.js +6 -5
  434. package/dist/esm/ui/PanelTextInput/styles.js +6 -5
  435. package/dist/esm/ui/PluginSlot/index.js +7 -4
  436. package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +14 -12
  437. package/dist/esm/ui/ToolbarButton/index.js +8 -5
  438. package/dist/esm/ui/ToolbarFeedback/index.js +20 -8
  439. package/dist/esm/ui/ToolbarFeedback/styles.js +8 -11
  440. package/dist/esm/ui/styles.js +17 -23
  441. package/dist/esm/utils/prosemirror/autojoin.js +76 -0
  442. package/dist/esm/version-wrapper.js +1 -1
  443. package/dist/esm/version.json +1 -1
  444. package/dist/types/commands/index.d.ts +2 -1
  445. package/dist/types/create-editor/ErrorBoundary.d.ts +1 -1
  446. package/dist/types/create-editor/ReactEditorView.d.ts +1 -1
  447. package/dist/types/create-editor/WithEditorView.d.ts +1 -1
  448. package/dist/types/editor.d.ts +8 -8
  449. package/dist/types/i18n/en.d.ts +276 -130
  450. package/dist/types/i18n/en_GB.d.ts +276 -130
  451. package/dist/types/i18n/pl.d.ts +24 -0
  452. package/dist/types/i18n/zh.d.ts +3 -0
  453. package/dist/types/index.d.ts +2 -2
  454. package/dist/types/labs/EditorWithActions/index.d.ts +1 -1
  455. package/dist/types/labs/next/full-page.d.ts +1 -1
  456. package/dist/types/labs/next/internal/context/shared-config.d.ts +2 -2
  457. package/dist/types/labs/next/mobile.d.ts +1 -1
  458. package/dist/types/plugins/alignment/commands/index.d.ts +3 -2
  459. package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +1 -3
  460. package/dist/types/plugins/block-type/ui/ToolbarBlockType/blocktype-button.d.ts +1 -0
  461. package/dist/types/plugins/block-type/ui/ToolbarBlockType/styled.d.ts +2 -4
  462. package/dist/types/plugins/card/nodeviews/blockCard.d.ts +1 -1
  463. package/dist/types/plugins/card/nodeviews/embedCard.d.ts +1 -1
  464. package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +3 -6
  465. package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -1
  466. package/dist/types/plugins/card/pm-plugins/util/resolve.d.ts +1 -1
  467. package/dist/types/plugins/card/pm-plugins/util/state.d.ts +2 -2
  468. package/dist/types/plugins/card/toolbar.d.ts +1 -1
  469. package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +1 -1
  470. package/dist/types/plugins/card/ui/LinkToolbarButtonGroup.d.ts +2 -7
  471. package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +1 -1
  472. package/dist/types/plugins/card/utils.d.ts +1 -1
  473. package/dist/types/plugins/date/actions.d.ts +2 -1
  474. package/dist/types/plugins/emoji/ui/Emoji/index.d.ts +3 -2
  475. package/dist/types/plugins/emoji/ui/EmojiContextProvider/index.d.ts +1 -1
  476. package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +2 -2
  477. package/dist/types/plugins/extension/ui/Extension/Extension/styles.d.ts +3 -4
  478. package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -1
  479. package/dist/types/plugins/find-replace/ui/FindReplaceToolbarButton.d.ts +1 -0
  480. package/dist/types/plugins/floating-toolbar/index.d.ts +1 -1
  481. package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +3 -1
  482. package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +3 -3
  483. package/dist/types/plugins/floating-toolbar/ui/Input.d.ts +3 -1
  484. package/dist/types/plugins/floating-toolbar/ui/Separator.d.ts +3 -2
  485. package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +2 -1
  486. package/dist/types/plugins/floating-toolbar/ui/ToolbarLoader.d.ts +1 -1
  487. package/dist/types/plugins/help-dialog/ui/HelpDialogLoader.d.ts +1 -1
  488. package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -1
  489. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -0
  490. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +3 -1
  491. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/item.d.ts +1 -0
  492. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/styles.d.ts +1 -2
  493. package/dist/types/plugins/list/actions/wrap-and-join-lists.d.ts +1 -11
  494. package/dist/types/plugins/list/ui/ToolbarLists/index.d.ts +3 -3
  495. package/dist/types/plugins/media/commands/helpers.d.ts +2 -2
  496. package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +4 -2
  497. package/dist/types/plugins/media/nodeviews/styles.d.ts +4 -2
  498. package/dist/types/plugins/media/picker-facade.d.ts +5 -12
  499. package/dist/types/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.d.ts +1 -1
  500. package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -4
  501. package/dist/types/plugins/media/pm-plugins/types.d.ts +0 -1
  502. package/dist/types/plugins/media/toolbar/linking-toolbar-appearance.d.ts +1 -0
  503. package/dist/types/plugins/media/types.d.ts +0 -1
  504. package/dist/types/plugins/media/ui/CaptionPlaceholder/index.d.ts +3 -2
  505. package/dist/types/plugins/media/ui/Media/DropPlaceholder.d.ts +3 -2
  506. package/dist/types/plugins/media/ui/MediaLinkingToolbar.d.ts +3 -1
  507. package/dist/types/plugins/media/ui/MediaPicker/PickerFacadeProvider.d.ts +1 -1
  508. package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +1 -1
  509. package/dist/types/plugins/media/utils/media-files.d.ts +3 -2
  510. package/dist/types/plugins/media/utils/media-single.d.ts +2 -2
  511. package/dist/types/plugins/mentions/analytics.d.ts +4 -3
  512. package/dist/types/plugins/mentions/ui/InviteItem/styles.d.ts +6 -6
  513. package/dist/types/plugins/quick-insert/assets/index.d.ts +24 -24
  514. package/dist/types/plugins/status/nodeviews/status.d.ts +1 -4
  515. package/dist/types/plugins/status/ui/statusPicker.d.ts +4 -2
  516. package/dist/types/plugins/table/nodeviews/tableCell.d.ts +0 -1
  517. package/dist/types/plugins/table/types.d.ts +0 -1
  518. package/dist/types/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +6 -4
  519. package/dist/types/plugins/table/ui/common-styles.d.ts +0 -2
  520. package/dist/types/plugins/table/utils/paste.d.ts +2 -0
  521. package/dist/types/plugins/tasks-and-decisions/commands.d.ts +5 -2
  522. package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +3 -1
  523. package/dist/types/plugins/text-color/ui/ToolbarTextColor/styles.d.ts +3 -11
  524. package/dist/types/plugins/text-formatting/ui/Toolbar/index.d.ts +1 -0
  525. package/dist/types/plugins/text-formatting/ui/Toolbar/more-button.d.ts +1 -0
  526. package/dist/types/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.d.ts +1 -0
  527. package/dist/types/plugins/type-ahead/api.d.ts +1 -2
  528. package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +1 -0
  529. package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +8 -5
  530. package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +2 -1
  531. package/dist/types/plugins/type-ahead/ui/TypeAheadPopup.d.ts +1 -0
  532. package/dist/types/plugins/type-ahead/ui/hooks/use-resize-observer.d.ts +0 -1
  533. package/dist/types/plugins/undo-redo/ui/ToolbarUndoRedo/index.d.ts +6 -4
  534. package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +3 -1
  535. package/dist/types/ui/Addon/ClickAreaInline/index.d.ts +3 -1
  536. package/dist/types/ui/Addon/ClickAreaMobile/index.d.ts +3 -1
  537. package/dist/types/ui/Addon/Dropdown/index.d.ts +3 -1
  538. package/dist/types/ui/Addon/Dropdown/styles.d.ts +1 -2
  539. package/dist/types/ui/Addon/DropdownItem/index.d.ts +3 -2
  540. package/dist/types/ui/Addon/DropdownItem/styles.d.ts +1 -2
  541. package/dist/types/ui/Alignment/index.d.ts +3 -3
  542. package/dist/types/ui/Alignment/styles.d.ts +1 -2
  543. package/dist/types/ui/Appearance/Chromeless.d.ts +3 -1
  544. package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -0
  545. package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +2 -2
  546. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +3 -1
  547. package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -0
  548. package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +6 -12
  549. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +376 -17
  550. package/dist/types/ui/AppearanceComponents/Mobile.d.ts +3 -1
  551. package/dist/types/ui/ChromeCollapsed/index.d.ts +1 -0
  552. package/dist/types/ui/ChromeCollapsed/styles.d.ts +1 -4
  553. package/dist/types/ui/ColorPalette/Color/index.d.ts +3 -1
  554. package/dist/types/ui/ColorPalette/Color/styles.d.ts +2 -3
  555. package/dist/types/ui/ColorPalette/index.d.ts +1 -0
  556. package/dist/types/ui/ColorPalette/styles.d.ts +1 -2
  557. package/dist/types/ui/ColorPickerButton/index.d.ts +2 -1
  558. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  559. package/dist/types/ui/ConfigPanel/ConfigPanelLoader.d.ts +1 -1
  560. package/dist/types/ui/ConfigPanel/ErrorMessage/index.d.ts +5 -4
  561. package/dist/types/ui/ConfigPanel/Fields/CheckboxGroup.d.ts +2 -2
  562. package/dist/types/ui/ConfigPanel/Fields/ColorPicker.d.ts +3 -2
  563. package/dist/types/ui/ConfigPanel/Fields/DateRange.d.ts +3 -3
  564. package/dist/types/ui/ConfigPanel/Fields/Expand.d.ts +11 -7
  565. package/dist/types/ui/ConfigPanel/Fields/Fieldset.d.ts +1 -0
  566. package/dist/types/ui/ConfigPanel/Fields/SelectItem.d.ts +3 -2
  567. package/dist/types/ui/ConfigPanel/Fields/TabGroup.d.ts +6 -4
  568. package/dist/types/ui/ConfigPanel/Fields/common/RequiredIndicator.d.ts +1 -2
  569. package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +1 -1
  570. package/dist/types/ui/ConfigPanel/Header.d.ts +13 -7
  571. package/dist/types/ui/ConfigPanel/LoadingState.d.ts +3 -2
  572. package/dist/types/ui/ConfigPanel/NestedForms/RemovableField.d.ts +14 -8
  573. package/dist/types/ui/ContentStyles/index.d.ts +4 -1
  574. package/dist/types/ui/ContextPanel/index.d.ts +8 -14
  575. package/dist/types/ui/DropdownMenu/index.d.ts +3 -1
  576. package/dist/types/ui/EditorContext/index.d.ts +1 -1
  577. package/dist/types/ui/ElementBrowser/InsertMenu.d.ts +2 -2
  578. package/dist/types/ui/ElementBrowser/components/CategoryList.d.ts +1 -1
  579. package/dist/types/ui/ElementBrowser/components/ElementBrowserLoader.d.ts +1 -1
  580. package/dist/types/ui/ElementBrowser/components/ElementList/ElementList.d.ts +1 -1
  581. package/dist/types/ui/ElementBrowser/components/ElementSearch.d.ts +3 -2
  582. package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
  583. package/dist/types/ui/FloatingToolbar/index.d.ts +3 -2
  584. package/dist/types/ui/FloatingToolbar/styles.d.ts +1 -5
  585. package/dist/types/ui/LinkSearch/LinkSearchListItem.d.ts +5 -7
  586. package/dist/types/ui/LinkSearch/ToolbarComponents.d.ts +3 -8
  587. package/dist/types/ui/LinkSearch/index.d.ts +20 -20
  588. package/dist/types/ui/LinkSearch/withActivityProvider.d.ts +21 -20
  589. package/dist/types/ui/PanelTextInput/index.d.ts +3 -1
  590. package/dist/types/ui/PanelTextInput/styles.d.ts +2 -4
  591. package/dist/types/ui/PluginSlot/index.d.ts +3 -1
  592. package/dist/types/ui/Toolbar/ToolbarWithSizeDetector.d.ts +1 -0
  593. package/dist/types/ui/Toolbar/toolbar-size.d.ts +3 -2
  594. package/dist/types/ui/ToolbarButton/index.d.ts +5 -7
  595. package/dist/types/ui/ToolbarButton/styles.d.ts +2 -4
  596. package/dist/types/ui/ToolbarFeedback/index.d.ts +4 -2
  597. package/dist/types/ui/ToolbarFeedback/styles.d.ts +6 -7
  598. package/dist/types/ui/WithEditorActions/index.d.ts +2 -2
  599. package/dist/types/ui/WithHelpTrigger/index.d.ts +1 -1
  600. package/dist/types/ui/WithPluginState/index.d.ts +3 -3
  601. package/dist/types/ui/styles.d.ts +12 -22
  602. package/dist/types/utils/nodes.d.ts +2 -1
  603. package/dist/types/utils/prosemirror/autojoin.d.ts +13 -0
  604. package/package.json +23 -23
  605. package/dist/cjs/ui/Separator/index.js +0 -21
  606. package/dist/es2019/ui/Separator/index.js +0 -9
  607. package/dist/esm/ui/Separator/index.js +0 -8
  608. package/dist/types/ui/Separator/index.d.ts +0 -3
@@ -1,9 +1,8 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
 
3
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
+ var _templateObject, _templateObject2, _templateObject3;
4
4
 
5
5
  import { css } from '@emotion/react';
6
- import { css as deprecatedCss } from 'styled-components';
7
6
  import { tableMarginTop, tableSharedStyle } from '@atlaskit/editor-common/styles';
8
7
  import { fontSize } from '@atlaskit/theme/constants';
9
8
  import { N40A, B300, N300, N20A, N0, R500 } from '@atlaskit/theme/colors';
@@ -18,10 +17,7 @@ var sentinelStyles = ".".concat(ClassName.TABLE_CONTAINER, " {\n > .").concat(C
18
17
  export var tableStyles = function tableStyles(props) {
19
18
  var _props$featureFlags;
20
19
 
21
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: white !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button*/\n ", "\n /* Ends Delete button*/\n\n /* sticky styles */\n .", " .", " .", ":first-child {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n\n box-shadow: 0px -", "px white;\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: white;\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid white;\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid green;\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: white;\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-child {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: 1px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-child {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid white;\n }\n\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-child,\n > h2:first-child,\n > h3:first-child,\n > h4:first-child,\n > h5:first-child,\n > h6:first-child {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n opacity: 0.3;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n /*\n compensating for half of the insert column button\n that is aligned to the right edge initially on hover of the top right column control when table overflown,\n its center should be aligned with the edge\n */\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n .ProseMirror .pm-table-cell-content-wrap ol[data-child-count='100+'] {\n padding-left: revert;\n }\n"])), ClassName.LAYOUT_BUTTON, N20A, N300, ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, B300, tableSharedStyle(props), columnControlsLineMarker(props), hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor(props), ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper, ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper, DeleteButton, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, stickyRowOffsetTop, stickyRowZIndex, N40A, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, stickyRowZIndex + 1, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', OverflowShadow(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tablePadding, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, ClassName.NODEVIEW_WRAPPER, ClassName.NODEVIEW_WRAPPER, ClassName.TABLE_CONTAINER, columnControlsDecoration(props), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker(props, "\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS_INSERT_COLUMN_MARKER, InsertMarker(props, "\n right: -1px;\n top: -12px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor(props), tableBorderRadiusSize, tableToolbarColor(props), ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, tableToolbarDeleteColor, ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker(props, "\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton(props, "\n border-bottom: 1px solid ".concat(tableBorderColor(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-child {\n top: 0;\n }\n ")), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, akEditorTableToolbarSize - 1, akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor(props), relativeFontSizeToBase16(fontSize()), tableToolbarColor(props), tableTextColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, N0, ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, N0, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableToolbarDeleteColor, tableBorderDeleteColor, R500, akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, tableBorderSelectedColor, ClassName.SELECTED_CELL, tableCellSelectedColor, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.ROW_CONTROLS_WRAPPER, tableToolbarSize, ClassName.TABLE_NODE_WRAPPER, tableInsertColumnButtonSize / 2, tableInsertColumnButtonSize / 2, tableScrollbarOffset, tableScrollbarOffset, ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR);
20
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: white !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-child {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n\n box-shadow: 0px -", "px white;\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: white;\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid white;\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid green;\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: white;\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-child {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: 1px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-child {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid white;\n }\n\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-child,\n > h2:first-child,\n > h3:first-child,\n > h4:first-child,\n > h5:first-child,\n > h6:first-child {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n opacity: 0.3;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n /*\n compensating for half of the insert column button\n that is aligned to the right edge initially on hover of the top right column control when table overflown,\n its center should be aligned with the edge\n */\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n .ProseMirror .pm-table-cell-content-wrap ol[data-child-count='100+'] {\n padding-left: revert;\n }\n"])), ClassName.LAYOUT_BUTTON, N20A, N300, ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, B300, tableSharedStyle(props), columnControlsLineMarker(props), hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor(props), ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper, ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper, DeleteButton, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, stickyRowOffsetTop, stickyRowZIndex, N40A, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, stickyRowZIndex + 1, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', OverflowShadow(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tablePadding, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, ClassName.NODEVIEW_WRAPPER, ClassName.NODEVIEW_WRAPPER, ClassName.TABLE_CONTAINER, columnControlsDecoration(props), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker(props, "\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS_INSERT_COLUMN_MARKER, InsertMarker(props, "\n right: -1px;\n top: -12px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor(props), tableBorderRadiusSize, tableToolbarColor(props), ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, tableToolbarDeleteColor, ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker(props, "\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton(props, "\n border-bottom: 1px solid ".concat(tableBorderColor(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-child {\n top: 0;\n }\n ")), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, akEditorTableToolbarSize - 1, akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor(props), relativeFontSizeToBase16(fontSize()), tableToolbarColor(props), tableTextColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, N0, ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, N0, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableToolbarDeleteColor, tableBorderDeleteColor, R500, akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, tableBorderSelectedColor, ClassName.SELECTED_CELL, tableCellSelectedColor, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.ROW_CONTROLS_WRAPPER, tableToolbarSize, ClassName.TABLE_NODE_WRAPPER, tableInsertColumnButtonSize / 2, tableInsertColumnButtonSize / 2, tableScrollbarOffset, tableScrollbarOffset, ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR);
22
21
  };
23
22
  export var tableFullPageEditorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n }\n"])), ClassName.TABLE_NODE_WRAPPER);
24
- export var deprecatedTableFullPageEditorStyles = deprecatedCss(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n }\n"])), ClassName.TABLE_NODE_WRAPPER);
25
- export var tableCommentEditorStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), ClassName.TABLE_NODE_WRAPPER, scrollbarStyles); // TODO remove this after migrated off styled-component
26
-
27
- export var deprecatedTableCommentEditorStyles = deprecatedCss(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), ClassName.TABLE_NODE_WRAPPER, scrollbarStyles);
23
+ export var tableCommentEditorStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), ClassName.TABLE_NODE_WRAPPER, scrollbarStyles);
@@ -1,7 +1,8 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import { Fragment, Slice } from 'prosemirror-model';
3
3
  import { flatten } from 'prosemirror-utils';
4
- import { flatmap, mapSlice } from '../../../utils/slice'; // lifts up the content of each cell, returning an array of nodes
4
+ import { flatmap, mapSlice } from '../../../utils/slice';
5
+ import { getPluginState } from '../pm-plugins/plugin-factory'; // lifts up the content of each cell, returning an array of nodes
5
6
 
6
7
  export var unwrapContentFromTable = function unwrapContentFromTable(maybeTable) {
7
8
  var schema = maybeTable.type.schema;
@@ -43,7 +44,7 @@ export var transformSliceToFixHardBreakProblemOnCopyFromCell = function transfor
43
44
  table = _schema$nodes2.table,
44
45
  hardBreak = _schema$nodes2.hardBreak;
45
46
  var emptyParagraphNode = paragraph.createAndFill();
46
- var hardBreakNode = hardBreak.createAndFill();
47
+ var hardBreakNode = hardBreak === null || hardBreak === void 0 ? void 0 : hardBreak.createAndFill();
47
48
  var paragraphNodeSize = emptyParagraphNode ? emptyParagraphNode.nodeSize : 0;
48
49
  var hardBreakNodeSize = hardBreakNode ? hardBreakNode.nodeSize : 0;
49
50
  var paragraphWithHardBreakSize = paragraphNodeSize + hardBreakNodeSize;
@@ -93,4 +94,8 @@ export var transformSliceToCorrectEmptyTableCells = function transformSliceToCor
93
94
 
94
95
  return node;
95
96
  });
96
- };
97
+ };
98
+ export function isHeaderRowRequired(state) {
99
+ var tableState = getPluginState(state);
100
+ return tableState && tableState.pluginConfig.isHeaderRowRequired;
101
+ }
@@ -1,4 +1,3 @@
1
- import { autoJoin } from 'prosemirror-commands';
2
1
  import { NodeRange } from 'prosemirror-model';
3
2
  import { TextSelection } from 'prosemirror-state';
4
3
  import { findParentNodeOfType, hasParentNodeOfType, replaceParentNodeOfType, safeInsert, setTextSelection } from 'prosemirror-utils';
@@ -7,6 +6,7 @@ import { uuid } from '@atlaskit/adf-schema';
7
6
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, EVENT_TYPE, INPUT_METHOD, USER_CONTEXT } from '../analytics';
8
7
  import { GapCursorSelection } from '../selection/gap-cursor-selection';
9
8
  import { stateKey as taskDecisionStateKey } from './pm-plugins/plugin-key';
9
+ import { autoJoinTr } from '../../utils/prosemirror/autojoin';
10
10
 
11
11
  var getContextData = function getContextData() {
12
12
  var contextProvider = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -68,11 +68,23 @@ export var getListTypes = function getListTypes(listType, schema) {
68
68
  item: decisionItem
69
69
  };
70
70
  };
71
+ /*
72
+ * @deprecated - [ED-13182] insertTaskDecision has been depreciated in favor of insertTaskDecisionCommand
73
+ */
74
+
71
75
  export var insertTaskDecision = function insertTaskDecision(view, listType) {
72
76
  var inputMethod = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : INPUT_METHOD.TOOLBAR;
73
77
  var listLocalId = arguments.length > 3 ? arguments[3] : undefined;
74
78
  var itemLocalId = arguments.length > 4 ? arguments[4] : undefined;
75
- var state = view.state;
79
+ // eslint-disable-next-line no-console
80
+ console.warn('insertTaskDecision has been depreciated in favor of insertTaskDecisionCommand');
81
+ return insertTaskDecisionCommand(listType, inputMethod, undefined, listLocalId, itemLocalId);
82
+ };
83
+ export var insertTaskDecisionAction = function insertTaskDecisionAction(state, listType) {
84
+ var inputMethod = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : INPUT_METHOD.TOOLBAR;
85
+ var addItem = arguments.length > 3 ? arguments[3] : undefined;
86
+ var listLocalId = arguments.length > 4 ? arguments[4] : undefined;
87
+ var itemLocalId = arguments.length > 5 ? arguments[5] : undefined;
76
88
  var schema = state.schema;
77
89
 
78
90
  var addAndCreateList = function addAndCreateList(_ref) {
@@ -100,18 +112,30 @@ export var insertTaskDecision = function insertTaskDecision(view, listType) {
100
112
  }]).setSelection(new TextSelection(tr.doc.resolve(newItemParagraphPos)));
101
113
  };
102
114
 
103
- var tr = insertTaskDecisionWithAnalytics(state, listType, inputMethod, addAndCreateList, addToList, listLocalId, itemLocalId);
104
- return autoJoin(function (state, dispatch) {
105
- if (tr) {
106
- if (dispatch) {
107
- dispatch(tr);
108
- }
115
+ var addAndCreateListFn = addItem !== null && addItem !== void 0 ? addItem : addAndCreateList;
116
+ var tr = insertTaskDecisionWithAnalytics(state, listType, inputMethod, addAndCreateListFn, addToList, listLocalId, itemLocalId);
117
+
118
+ if (!tr) {
119
+ return state.tr;
120
+ }
109
121
 
110
- return true;
122
+ autoJoinTr(tr, ['taskList', 'decisionList']);
123
+ return tr;
124
+ };
125
+ export var insertTaskDecisionCommand = function insertTaskDecisionCommand(listType) {
126
+ var inputMethod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : INPUT_METHOD.TOOLBAR;
127
+ var addItem = arguments.length > 2 ? arguments[2] : undefined;
128
+ var listLocalId = arguments.length > 3 ? arguments[3] : undefined;
129
+ var itemLocalId = arguments.length > 4 ? arguments[4] : undefined;
130
+ return function (state, dispatch) {
131
+ var tr = insertTaskDecisionAction(state, listType, inputMethod, addItem, listLocalId, itemLocalId);
132
+
133
+ if (dispatch) {
134
+ dispatch(tr);
111
135
  }
112
136
 
113
- return false;
114
- }, ['taskList', 'decisionList']);
137
+ return true;
138
+ };
115
139
  };
116
140
  export var insertTaskDecisionWithAnalytics = function insertTaskDecisionWithAnalytics(state, listType, inputMethod, addAndCreateList, addToList, listLocalId, itemLocalId) {
117
141
  var schema = state.schema;
@@ -2,36 +2,35 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject;
4
4
 
5
- import React from 'react';
6
- import styled from 'styled-components';
5
+ /** @jsx jsx */
6
+ import { css, jsx } from '@emotion/react';
7
7
  import { decisionItem, decisionList, taskItem, taskList } from '@atlaskit/adf-schema';
8
8
  import { INPUT_METHOD } from '../analytics';
9
9
  import { messages as insertBlockMessages } from '../insert-block/ui/ToolbarInsertBlock/messages';
10
10
  import { IconAction, IconDecision } from '../quick-insert/assets';
11
- import { getListTypes, insertTaskDecisionWithAnalytics } from './commands';
11
+ import { insertTaskDecisionAction, getListTypes } from './commands';
12
12
  import inputRulePlugin from './pm-plugins/input-rules';
13
13
  import keymap from './pm-plugins/keymaps';
14
14
  import { createPlugin } from './pm-plugins/main';
15
15
  import ToolbarDecision from './ui/ToolbarDecision';
16
16
  import ToolbarTask from './ui/ToolbarTask';
17
- var TaskDecisionToolbarGroup = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n"])));
17
+ var taskDecisionToolbarGroup = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n"])));
18
18
 
19
- var quickInsertItem = function quickInsertItem(insert, state, listType) {
20
- var _getListTypes = getListTypes(listType, state.schema),
21
- list = _getListTypes.list,
22
- item = _getListTypes.item;
23
-
24
- var addItem = function addItem(_ref) {
19
+ var addItem = function addItem(insert, listType, schema) {
20
+ return function (_ref) {
25
21
  var listLocalId = _ref.listLocalId,
26
22
  itemLocalId = _ref.itemLocalId;
23
+
24
+ var _getListTypes = getListTypes(listType, schema),
25
+ list = _getListTypes.list,
26
+ item = _getListTypes.item;
27
+
27
28
  return insert(list.createChecked({
28
29
  localId: listLocalId
29
30
  }, item.createChecked({
30
31
  localId: itemLocalId
31
32
  })));
32
33
  };
33
-
34
- return insertTaskDecisionWithAnalytics(state, listType, INPUT_METHOD.QUICK_INSERT, addItem);
35
34
  };
36
35
 
37
36
  var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin() {
@@ -86,11 +85,13 @@ var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin() {
86
85
  secondaryToolbarComponent: function secondaryToolbarComponent(_ref6) {
87
86
  var editorView = _ref6.editorView,
88
87
  disabled = _ref6.disabled;
89
- return /*#__PURE__*/React.createElement(TaskDecisionToolbarGroup, null, /*#__PURE__*/React.createElement(ToolbarDecision, {
88
+ return jsx("div", {
89
+ css: taskDecisionToolbarGroup
90
+ }, jsx(ToolbarDecision, {
90
91
  editorView: editorView,
91
92
  isDisabled: disabled,
92
93
  isReducedSpacing: true
93
- }), /*#__PURE__*/React.createElement(ToolbarTask, {
94
+ }), jsx(ToolbarTask, {
94
95
  editorView: editorView,
95
96
  isDisabled: disabled,
96
97
  isReducedSpacing: true
@@ -107,10 +108,10 @@ var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin() {
107
108
  keywords: ['checkbox', 'task', 'todo'],
108
109
  keyshortcut: '[]',
109
110
  icon: function icon() {
110
- return /*#__PURE__*/React.createElement(IconAction, null);
111
+ return jsx(IconAction, null);
111
112
  },
112
113
  action: function action(insert, state) {
113
- return quickInsertItem(insert, state, 'taskList');
114
+ return insertTaskDecisionAction(state, 'taskList', INPUT_METHOD.QUICK_INSERT, addItem(insert, 'taskList', state.schema));
114
115
  }
115
116
  }, {
116
117
  id: 'decision',
@@ -119,10 +120,10 @@ var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin() {
119
120
  priority: 900,
120
121
  keyshortcut: '<>',
121
122
  icon: function icon() {
122
- return /*#__PURE__*/React.createElement(IconDecision, null);
123
+ return jsx(IconDecision, null);
123
124
  },
124
125
  action: function action(insert, state) {
125
- return quickInsertItem(insert, state, 'decisionList');
126
+ return insertTaskDecisionAction(state, 'decisionList', INPUT_METHOD.QUICK_INSERT, addItem(insert, 'decisionList', state.schema));
126
127
  }
127
128
  }];
128
129
  }
@@ -3,11 +3,24 @@ import { canInsert } from 'prosemirror-utils';
3
3
  import { createRule, createPlugin } from '../../../utils/input-rules';
4
4
  import { leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
5
5
  import { INPUT_METHOD } from '../../analytics';
6
- import { changeInDepth, insertTaskDecisionWithAnalytics } from '../commands';
6
+ import { changeInDepth, insertTaskDecisionAction, getListTypes } from '../commands';
7
7
 
8
8
  var createListRule = function createListRule(regex, listType) {
9
9
  return createRule(regex, function (state, _match, start, end) {
10
- var insertTr = insertTaskDecisionWithAnalytics(state, listType, INPUT_METHOD.FORMATTING, addItem(start, end));
10
+ var paragraph = state.schema.nodes.paragraph;
11
+
12
+ var _getListTypes = getListTypes(listType, state.schema),
13
+ list = _getListTypes.list;
14
+
15
+ var $end = state.doc.resolve(end);
16
+ var $endOfParent = state.doc.resolve($end.after()); // Only allow creating list in nodes that support them.
17
+ // Parent must be a paragraph as we don't want this applying to headings
18
+
19
+ if ($end.parent.type !== paragraph || !canInsert($endOfParent, list.createAndFill())) {
20
+ return null;
21
+ }
22
+
23
+ var insertTr = insertTaskDecisionAction(state, listType, INPUT_METHOD.FORMATTING, addItem(start, end));
11
24
  return insertTr;
12
25
  });
13
26
  };
@@ -22,9 +35,7 @@ var addItem = function addItem(start, end) {
22
35
  itemLocalId = _ref.itemLocalId;
23
36
  var $from = state.selection.$from,
24
37
  schema = state.schema;
25
- var _schema$nodes = schema.nodes,
26
- paragraph = _schema$nodes.paragraph,
27
- hardBreak = _schema$nodes.hardBreak;
38
+ var hardBreak = schema.nodes.hardBreak;
28
39
  var content = $from.node($from.depth).content;
29
40
  var shouldBreakNode = false;
30
41
  content.forEach(function (node, offset) {
@@ -32,13 +43,6 @@ var addItem = function addItem(start, end) {
32
43
  shouldBreakNode = true;
33
44
  }
34
45
  });
35
- var $end = state.doc.resolve(end);
36
- var $endOfParent = state.doc.resolve($end.after()); // Only allow creating list in nodes that support them.
37
- // Parent must be a paragraph as we don't want this applying to headings
38
-
39
- if ($end.parent.type !== paragraph || !canInsert($endOfParent, list.createAndFill())) {
40
- return null;
41
- }
42
46
 
43
47
  if (!shouldBreakNode) {
44
48
  tr.replaceRangeWith($from.before(), $from.after(), list.create({
@@ -62,11 +66,11 @@ var addItem = function addItem(start, end) {
62
66
 
63
67
  export function inputRulePlugin(schema, featureFlags) {
64
68
  var rules = [];
65
- var _schema$nodes2 = schema.nodes,
66
- decisionList = _schema$nodes2.decisionList,
67
- decisionItem = _schema$nodes2.decisionItem,
68
- taskList = _schema$nodes2.taskList,
69
- taskItem = _schema$nodes2.taskItem;
69
+ var _schema$nodes = schema.nodes,
70
+ decisionList = _schema$nodes.decisionList,
71
+ decisionItem = _schema$nodes.decisionItem,
72
+ taskList = _schema$nodes.taskList,
73
+ taskItem = _schema$nodes.taskItem;
70
74
 
71
75
  if (decisionList && decisionItem) {
72
76
  rules.push(createListRule(new RegExp("(^|".concat(leafNodeReplacementCharacter, ")\\<\\>\\s$")), 'decisionList'));
@@ -15,7 +15,7 @@ import { injectIntl } from 'react-intl-next';
15
15
  import DecisionIcon from '@atlaskit/icon/glyph/editor/decision';
16
16
  import ToolbarButton, { TOOLBAR_BUTTON } from '../../../../ui/ToolbarButton';
17
17
  import { messages } from '../../../insert-block/ui/ToolbarInsertBlock/messages';
18
- import { insertTaskDecision } from '../../commands';
18
+ import { insertTaskDecisionCommand } from '../../commands';
19
19
  export var ToolbarDecision = /*#__PURE__*/function (_PureComponent) {
20
20
  _inherits(ToolbarDecision, _PureComponent);
21
21
 
@@ -43,7 +43,7 @@ export var ToolbarDecision = /*#__PURE__*/function (_PureComponent) {
43
43
  return false;
44
44
  }
45
45
 
46
- insertTaskDecision(editorView, 'decisionList')(editorView.state, editorView.dispatch);
46
+ insertTaskDecisionCommand('decisionList')(editorView.state, editorView.dispatch);
47
47
  return true;
48
48
  });
49
49
 
@@ -15,7 +15,7 @@ import { injectIntl } from 'react-intl-next';
15
15
  import TaskIcon from '@atlaskit/icon/glyph/editor/task';
16
16
  import ToolbarButton, { TOOLBAR_BUTTON } from '../../../../ui/ToolbarButton';
17
17
  import { messages } from '../../../insert-block/ui/ToolbarInsertBlock/messages';
18
- import { insertTaskDecision } from '../../commands';
18
+ import { insertTaskDecisionCommand } from '../../commands';
19
19
  export var ToolbarTask = /*#__PURE__*/function (_PureComponent) {
20
20
  _inherits(ToolbarTask, _PureComponent);
21
21
 
@@ -43,7 +43,7 @@ export var ToolbarTask = /*#__PURE__*/function (_PureComponent) {
43
43
  return false;
44
44
  }
45
45
 
46
- insertTaskDecision(editorView, 'taskList')(editorView.state, editorView.dispatch);
46
+ insertTaskDecisionCommand('taskList')(editorView.state, editorView.dispatch);
47
47
  return true;
48
48
  });
49
49
 
@@ -14,19 +14,21 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
14
14
 
15
15
  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; } }
16
16
 
17
+ /** @jsx jsx */
17
18
  import React from 'react';
19
+ import { jsx } from '@emotion/react';
18
20
  import { defineMessages, injectIntl } from 'react-intl-next';
19
21
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
20
22
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
21
23
  import ColorPalette from '../../../../ui/ColorPalette';
22
24
  import { textColorPalette as originalTextColors } from '../../../../ui/ColorPalette/Palettes/textColorPalette';
23
25
  import Dropdown from '../../../../ui/Dropdown';
24
- import { ExpandIconWrapper, MenuWrapper, Separator, TriggerWrapper } from '../../../../ui/styles';
26
+ import { expandIconWrapperStyle, wrapperStyle, separatorStyles, triggerWrapperStyles } from '../../../../ui/styles';
25
27
  import ToolbarButton, { TOOLBAR_BUTTON } from '../../../../ui/ToolbarButton';
26
28
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../../analytics';
27
29
  import * as commands from '../../commands/change-color';
28
30
  import { EditorTextColorIcon } from './icon';
29
- import { disabledRainbow, rainbow, TextColorIconBar, TextColorIconWrapper } from './styles';
31
+ import { backgroundDisabled, textColorIconBar, textColorIconWrapper } from './styles';
30
32
  var EXPERIMENT_NAME = 'editor.toolbarTextColor.moreColors';
31
33
  var EXPERIMENT_GROUP_CONTROL = 'control';
32
34
  export var messages = defineMessages({
@@ -156,7 +158,10 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
156
158
  fitWidth = 242;
157
159
  }
158
160
 
159
- return /*#__PURE__*/React.createElement(MenuWrapper, null, /*#__PURE__*/React.createElement(Dropdown, {
161
+ var selectedColor = pluginState.color !== pluginState.defaultColor && pluginState.color;
162
+ return jsx("span", {
163
+ css: wrapperStyle
164
+ }, jsx(Dropdown, {
160
165
  mountTo: popupsMountPoint,
161
166
  boundariesElement: popupsBoundariesElement,
162
167
  scrollableElement: popupsScrollableElement,
@@ -165,7 +170,7 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
165
170
  handleEscapeKeydown: this.hide,
166
171
  zIndex: akEditorMenuZIndex,
167
172
  fitWidth: fitWidth,
168
- trigger: /*#__PURE__*/React.createElement(ToolbarButton, {
173
+ trigger: jsx(ToolbarButton, {
169
174
  buttonId: TOOLBAR_BUTTON.TEXT_COLOR,
170
175
  spacing: isReducedSpacing ? 'none' : 'default',
171
176
  disabled: disabled || pluginState.disabled,
@@ -175,22 +180,29 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
175
180
  "aria-haspopup": true,
176
181
  title: labelTextColor,
177
182
  onClick: this.toggleOpen,
178
- iconBefore: /*#__PURE__*/React.createElement(TriggerWrapper, null, /*#__PURE__*/React.createElement(TextColorIconWrapper, null, /*#__PURE__*/React.createElement(EditorTextColorIcon, null), /*#__PURE__*/React.createElement(TextColorIconBar, {
179
- selectedColor: pluginState.color !== pluginState.defaultColor && pluginState.color,
180
- gradientColors: pluginState.disabled ? disabledRainbow : rainbow
181
- })), /*#__PURE__*/React.createElement(ExpandIconWrapper, null, /*#__PURE__*/React.createElement(ExpandIcon, {
183
+ iconBefore: jsx("div", {
184
+ css: triggerWrapperStyles
185
+ }, jsx("div", {
186
+ css: textColorIconWrapper
187
+ }, jsx(EditorTextColorIcon, null), jsx("div", {
188
+ css: [textColorIconBar, selectedColor ? "background: ".concat(selectedColor, ";") : pluginState.disabled && backgroundDisabled]
189
+ })), jsx("span", {
190
+ css: expandIconWrapperStyle
191
+ }, jsx(ExpandIcon, {
182
192
  label: ""
183
193
  })))
184
194
  })
185
- }, /*#__PURE__*/React.createElement("div", {
195
+ }, jsx("div", {
186
196
  "data-testid": "text-color-palette"
187
- }, /*#__PURE__*/React.createElement(ColorPalette, {
197
+ }, jsx(ColorPalette, {
188
198
  palette: palette,
189
199
  onClick: function onClick(color) {
190
200
  return _this2.changeTextColor(color, pluginState.disabled);
191
201
  },
192
202
  selectedColor: pluginState.color
193
- }))), /*#__PURE__*/React.createElement(Separator, null));
203
+ }))), jsx("span", {
204
+ css: separatorStyles
205
+ }));
194
206
  }
195
207
  }, {
196
208
  key: "getCommonAnalyticsAttributes",
@@ -1,21 +1,10 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
 
3
- var _templateObject, _templateObject2;
3
+ var _templateObject, _templateObject2, _templateObject3;
4
4
 
5
- import styled from 'styled-components';
5
+ import { css } from '@emotion/react';
6
6
  import { borderRadius } from '@atlaskit/theme/constants';
7
7
  import * as colors from '@atlaskit/theme/colors';
8
- export var TextColorIconWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
9
- export var TextColorIconBar = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n left: 0;\n right: 0;\n top: 16px;\n margin: auto;\n width: 12px;\n height: 3px;\n border-radius: ", ";\n\n ", ";\n"])), borderRadius() + 'px', function (_ref) {
10
- var gradientColors = _ref.gradientColors,
11
- selectedColor = _ref.selectedColor;
12
-
13
- if (selectedColor) {
14
- return "background: ".concat(selectedColor);
15
- }
16
-
17
- return "background: ".concat(gradientColors);
18
- });
19
8
 
20
9
  var createSteppedRainbow = function createSteppedRainbow(colors) {
21
10
  return "\n linear-gradient(\n to right,\n ".concat(colors.map(function (color, i) {
@@ -34,5 +23,8 @@ var createSteppedRainbow = function createSteppedRainbow(colors) {
34
23
  }).join('\n'), "\n );\n ");
35
24
  };
36
25
 
37
- export var rainbow = createSteppedRainbow([colors.P300, colors.T300, colors.Y400, colors.R400]);
38
- export var disabledRainbow = createSteppedRainbow([colors.N80, colors.N60, colors.N40, colors.N60]);
26
+ var rainbow = createSteppedRainbow([colors.P300, colors.T300, colors.Y400, colors.R400]);
27
+ var disabledRainbow = createSteppedRainbow([colors.N80, colors.N60, colors.N40, colors.N60]);
28
+ export var textColorIconWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
29
+ export var textColorIconBar = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n left: 0;\n right: 0;\n top: 16px;\n margin: auto;\n width: 12px;\n height: 3px;\n border-radius: ", ";\n background: ", ";\n"])), borderRadius() + 'px', rainbow);
30
+ export var backgroundDisabled = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: ", ";\n"])), disabledRainbow);
@@ -1,5 +1,7 @@
1
- import React, { useMemo } from 'react';
2
- import { Shortcut } from '../../../../../ui/styles';
1
+ /** @jsx jsx */
2
+ import { useMemo } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { shortcutStyle } from '../../../../../ui/styles';
3
5
  import { toolbarMessages } from '../toolbar-messages';
4
6
  import { clearFormattingWithAnalytics } from '../../../commands/clear-formatting';
5
7
  import { pluginKey as clearFormattingPluginKey } from '../../../pm-plugins/clear-formatting';
@@ -29,7 +31,9 @@ export var useClearIcon = function useClearIcon(_ref) {
29
31
  key: 'clearFormatting',
30
32
  command: clearFormattingToolbar,
31
33
  content: clearFormattingLabel,
32
- elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(clearFormattingKeymap)),
34
+ elemAfter: jsx("div", {
35
+ css: shortcutStyle
36
+ }, tooltip(clearFormattingKeymap)),
33
37
  value: {
34
38
  name: 'clearFormatting'
35
39
  },
@@ -2,10 +2,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
 
3
3
  var _IconsMarkSchema;
4
4
 
5
+ /** @jsx jsx */
5
6
  import React, { useMemo } from 'react';
7
+ import { jsx } from '@emotion/react';
6
8
  import BoldIcon from '@atlaskit/icon/glyph/editor/bold';
7
9
  import ItalicIcon from '@atlaskit/icon/glyph/editor/italic';
8
- import { Shortcut } from '../../../../../ui/styles';
10
+ import { shortcutStyle } from '../../../../../ui/styles';
9
11
  import { toolbarMessages } from '../toolbar-messages';
10
12
  import * as commands from '../../../commands/text-formatting';
11
13
  import { TOOLBAR_ACTION_SUBJECT_ID } from '../../../../../plugins/analytics/types/toolbar-button';
@@ -27,7 +29,7 @@ var IconButtons = {
27
29
  message: toolbarMessages.bold,
28
30
  tooltipKeymap: toggleBold,
29
31
  component: function component() {
30
- return /*#__PURE__*/React.createElement(BoldIcon, {
32
+ return jsx(BoldIcon, {
31
33
  label: ""
32
34
  });
33
35
  }
@@ -38,7 +40,7 @@ var IconButtons = {
38
40
  message: toolbarMessages.italic,
39
41
  tooltipKeymap: toggleItalic,
40
42
  component: function component() {
41
- return /*#__PURE__*/React.createElement(ItalicIcon, {
43
+ return jsx(ItalicIcon, {
42
44
  label: ""
43
45
  });
44
46
  }
@@ -85,11 +87,13 @@ var getIcon = function getIcon(_ref) {
85
87
  key: iconType,
86
88
  command: icon.command,
87
89
  iconElement: icon.component ? icon.component() : undefined,
88
- tooltipElement: tooltipKeymap ? /*#__PURE__*/React.createElement(ToolTipContent, {
90
+ tooltipElement: tooltipKeymap ? jsx(ToolTipContent, {
89
91
  description: content,
90
92
  keymap: tooltipKeymap
91
93
  }) : undefined,
92
- elemAfter: tooltipKeymap ? /*#__PURE__*/React.createElement(Shortcut, null, tooltip(tooltipKeymap)) : undefined,
94
+ elemAfter: tooltipKeymap ? jsx("div", {
95
+ css: shortcutStyle
96
+ }, tooltip(tooltipKeymap)) : undefined,
93
97
  value: {
94
98
  name: iconType
95
99
  },