@atlaskit/editor-core 166.0.4 → 167.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (489) hide show
  1. package/.eslintrc.js +46 -1
  2. package/CHANGELOG.md +87 -0
  3. package/dist/cjs/actions/index.js +26 -2
  4. package/dist/cjs/create-editor/ReactEditorView.js +2 -0
  5. package/dist/cjs/create-editor/create-plugins-list.js +1 -2
  6. package/dist/cjs/editor.js +5 -2
  7. package/dist/cjs/keymaps/index.js +5 -1
  8. package/dist/cjs/labs/next/ContentComponents.js +8 -4
  9. package/dist/cjs/labs/next/full-page.js +14 -8
  10. package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +7 -3
  11. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +3 -1
  12. package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +3 -1
  13. package/dist/cjs/plugins/analytics/types/enums.js +3 -0
  14. package/dist/cjs/plugins/base/index.js +8 -17
  15. package/dist/cjs/plugins/base/pm-plugins/better-type-history.js +3 -12
  16. package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +71 -16
  17. package/dist/cjs/plugins/block-type/commands/block-type.js +32 -22
  18. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +4 -2
  19. package/dist/cjs/plugins/breakout/ui/LayoutButton.js +4 -11
  20. package/dist/cjs/plugins/card/styles.js +1 -1
  21. package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
  22. package/dist/cjs/plugins/code-block/actions.js +36 -2
  23. package/dist/cjs/plugins/code-block/nodeviews/code-block.js +70 -1
  24. package/dist/cjs/plugins/code-block/pm-plugins/actions.js +2 -1
  25. package/dist/cjs/plugins/code-block/pm-plugins/main.js +46 -8
  26. package/dist/cjs/plugins/code-block/styles.js +28 -24
  27. package/dist/cjs/plugins/collab-edit/styles.js +4 -2
  28. package/dist/cjs/plugins/collab-edit/ui/styles.js +4 -2
  29. package/dist/cjs/plugins/collab-edit/utils.js +1 -0
  30. package/dist/cjs/plugins/date/ui/DatePicker/index.js +3 -1
  31. package/dist/cjs/plugins/expand/ui/styles.js +16 -14
  32. package/dist/cjs/plugins/extension/commands.js +3 -2
  33. package/dist/cjs/plugins/extension/context-panel.js +21 -7
  34. package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +6 -4
  35. package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +3 -1
  36. package/dist/cjs/plugins/extension/ui/Extension/styles.js +7 -5
  37. package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -2
  38. package/dist/cjs/plugins/fake-text-cursor/styles.js +3 -1
  39. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
  40. package/dist/cjs/plugins/find-replace/styles.js +2 -6
  41. package/dist/cjs/plugins/find-replace/ui/styles.js +4 -2
  42. package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +3 -1
  43. package/dist/cjs/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +3 -1
  44. package/dist/cjs/plugins/floating-toolbar/ui/Separator.js +3 -1
  45. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +6 -4
  46. package/dist/cjs/plugins/floating-toolbar/ui/styles.js +12 -10
  47. package/dist/cjs/plugins/grid/styles.js +3 -1
  48. package/dist/cjs/plugins/help-dialog/ui/styles.js +9 -7
  49. package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +23 -1
  50. package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +10 -1
  51. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -3
  52. package/dist/cjs/plugins/hyperlink/utils.js +53 -2
  53. package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +4 -2
  54. package/dist/cjs/plugins/layout/styles.js +1 -1
  55. package/dist/cjs/plugins/media/commands/helpers.js +10 -9
  56. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +23 -4
  57. package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +6 -0
  58. package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -3
  59. package/dist/cjs/plugins/media/pm-plugins/main.js +1 -0
  60. package/dist/cjs/plugins/media/styles.js +1 -1
  61. package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +3 -1
  62. package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +4 -2
  63. package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +3 -1
  64. package/dist/cjs/plugins/mentions/styles.js +3 -1
  65. package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +3 -1
  66. package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +4 -2
  67. package/dist/cjs/plugins/panel/index.js +1 -0
  68. package/dist/cjs/plugins/panel/nodeviews/panel.js +4 -1
  69. package/dist/cjs/plugins/panel/pm-plugins/keymaps.js +21 -3
  70. package/dist/cjs/plugins/paste/handlers.js +23 -0
  71. package/dist/cjs/plugins/paste/linkify-md-plugin.js +7 -0
  72. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +9 -1
  73. package/dist/cjs/plugins/paste/pm-plugins/main.js +27 -1
  74. package/dist/cjs/plugins/placeholder/index.js +15 -3
  75. package/dist/cjs/plugins/placeholder/styles.js +3 -1
  76. package/dist/cjs/plugins/placeholder-text/styles.js +3 -1
  77. package/dist/cjs/plugins/selection/gap-cursor/styles.js +1 -1
  78. package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
  79. package/dist/cjs/plugins/status/ui/statusPicker.js +3 -3
  80. package/dist/cjs/plugins/table/index.js +14 -4
  81. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +6 -6
  82. package/dist/cjs/plugins/table/nodeviews/table.js +9 -4
  83. package/dist/cjs/plugins/table/pm-plugins/main.js +1 -4
  84. package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +118 -0
  85. package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
  86. package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
  87. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
  88. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
  89. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
  90. package/dist/cjs/plugins/table/transforms/column-width.js +1 -2
  91. package/dist/cjs/plugins/table/transforms/fix-tables.js +1 -3
  92. package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +4 -1
  93. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +3 -1
  94. package/dist/cjs/plugins/table/ui/common-styles.js +4 -2
  95. package/dist/cjs/plugins/table/ui/consts.js +14 -11
  96. package/dist/cjs/plugins/table/ui/ui-styles.js +17 -10
  97. package/dist/cjs/plugins/table/utils/decoration.js +3 -4
  98. package/dist/cjs/plugins/table/utils/paste.js +9 -9
  99. package/dist/cjs/plugins/type-ahead/index.js +4 -3
  100. package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +3 -1
  101. package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +4 -4
  102. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +11 -9
  103. package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +73 -3
  104. package/dist/cjs/plugins/unsupported-content/styles.js +1 -1
  105. package/dist/cjs/ui/Addon/Dropdown/styles.js +3 -1
  106. package/dist/cjs/ui/Addon/DropdownItem/styles.js +3 -1
  107. package/dist/cjs/ui/Appearance/Chromeless.js +2 -1
  108. package/dist/cjs/ui/Appearance/Comment/Comment.js +10 -3
  109. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +4 -2
  110. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +5 -2
  111. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
  112. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
  113. package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +6 -3
  114. package/dist/cjs/ui/ChromeCollapsed/styles.js +1 -1
  115. package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +21 -14
  116. package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
  117. package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +3 -1
  118. package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +3 -1
  119. package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +3 -1
  120. package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +3 -1
  121. package/dist/cjs/ui/ConfigPanel/Header.js +4 -2
  122. package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +4 -8
  123. package/dist/cjs/ui/ContentStyles/index.js +4 -2
  124. package/dist/cjs/ui/ContextPanel/index.js +3 -1
  125. package/dist/cjs/ui/DropdownMenu/index.js +5 -0
  126. package/dist/cjs/ui/ElementBrowser/InsertMenu.js +6 -4
  127. package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +4 -2
  128. package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +4 -2
  129. package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
  130. package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +3 -1
  131. package/dist/cjs/ui/ElementBrowser/components/ElementSearch.js +3 -1
  132. package/dist/cjs/ui/ElementBrowser/constants.js +3 -1
  133. package/dist/cjs/ui/FloatingToolbar/styles.js +2 -2
  134. package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +5 -3
  135. package/dist/cjs/ui/PanelTextInput/styles.js +3 -1
  136. package/dist/cjs/ui/PluginSlot/index.js +7 -4
  137. package/dist/cjs/ui/Toolbar/ToolbarInner.js +2 -1
  138. package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +5 -2
  139. package/dist/cjs/ui/ToolbarFeedback/styles.js +5 -3
  140. package/dist/cjs/ui/WithFlash/index.js +4 -2
  141. package/dist/cjs/ui/styles.js +6 -4
  142. package/dist/cjs/utils/document.js +62 -6
  143. package/dist/cjs/utils/filter/privacy-filter.js +2 -2
  144. package/dist/cjs/utils/step.js +17 -1
  145. package/dist/cjs/version-wrapper.js +1 -1
  146. package/dist/cjs/version.json +1 -1
  147. package/dist/es2019/actions/index.js +25 -1
  148. package/dist/es2019/create-editor/ReactEditorView.js +2 -0
  149. package/dist/es2019/create-editor/create-plugins-list.js +1 -2
  150. package/dist/es2019/editor.js +5 -2
  151. package/dist/es2019/keymaps/index.js +5 -1
  152. package/dist/es2019/labs/next/ContentComponents.js +7 -2
  153. package/dist/es2019/labs/next/full-page.js +11 -8
  154. package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +4 -3
  155. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +16 -4
  156. package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
  157. package/dist/es2019/plugins/analytics/types/enums.js +3 -0
  158. package/dist/es2019/plugins/base/index.js +6 -15
  159. package/dist/es2019/plugins/base/pm-plugins/better-type-history.js +1 -11
  160. package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
  161. package/dist/es2019/plugins/block-type/commands/block-type.js +25 -16
  162. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
  163. package/dist/es2019/plugins/breakout/ui/LayoutButton.js +6 -10
  164. package/dist/es2019/plugins/card/styles.js +1 -1
  165. package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
  166. package/dist/es2019/plugins/code-block/actions.js +32 -0
  167. package/dist/es2019/plugins/code-block/nodeviews/code-block.js +61 -1
  168. package/dist/es2019/plugins/code-block/pm-plugins/actions.js +2 -1
  169. package/dist/es2019/plugins/code-block/pm-plugins/main.js +37 -3
  170. package/dist/es2019/plugins/code-block/styles.js +30 -27
  171. package/dist/es2019/plugins/collab-edit/styles.js +3 -2
  172. package/dist/es2019/plugins/collab-edit/ui/styles.js +4 -3
  173. package/dist/es2019/plugins/collab-edit/utils.js +1 -0
  174. package/dist/es2019/plugins/date/ui/DatePicker/index.js +3 -2
  175. package/dist/es2019/plugins/expand/ui/styles.js +15 -14
  176. package/dist/es2019/plugins/extension/commands.js +3 -2
  177. package/dist/es2019/plugins/extension/context-panel.js +11 -3
  178. package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +5 -4
  179. package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
  180. package/dist/es2019/plugins/extension/ui/Extension/styles.js +7 -6
  181. package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -4
  182. package/dist/es2019/plugins/fake-text-cursor/styles.js +3 -2
  183. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
  184. package/dist/es2019/plugins/find-replace/styles.js +4 -4
  185. package/dist/es2019/plugins/find-replace/ui/styles.js +3 -2
  186. package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
  187. package/dist/es2019/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
  188. package/dist/es2019/plugins/floating-toolbar/ui/Separator.js +2 -1
  189. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +4 -4
  190. package/dist/es2019/plugins/floating-toolbar/ui/styles.js +11 -10
  191. package/dist/es2019/plugins/grid/styles.js +4 -2
  192. package/dist/es2019/plugins/help-dialog/ui/styles.js +10 -9
  193. package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
  194. package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +9 -1
  195. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -4
  196. package/dist/es2019/plugins/hyperlink/utils.js +43 -2
  197. package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
  198. package/dist/es2019/plugins/layout/styles.js +10 -7
  199. package/dist/es2019/plugins/media/commands/helpers.js +6 -8
  200. package/dist/es2019/plugins/media/nodeviews/mediaInline.js +21 -5
  201. package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
  202. package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -4
  203. package/dist/es2019/plugins/media/pm-plugins/main.js +2 -0
  204. package/dist/es2019/plugins/media/styles.js +3 -3
  205. package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
  206. package/dist/es2019/plugins/media/ui/Media/DropPlaceholder.js +4 -3
  207. package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +2 -1
  208. package/dist/es2019/plugins/mentions/styles.js +5 -4
  209. package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +2 -1
  210. package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +3 -2
  211. package/dist/es2019/plugins/panel/index.js +1 -0
  212. package/dist/es2019/plugins/panel/nodeviews/panel.js +4 -1
  213. package/dist/es2019/plugins/panel/pm-plugins/keymaps.js +22 -4
  214. package/dist/es2019/plugins/paste/handlers.js +23 -0
  215. package/dist/es2019/plugins/paste/linkify-md-plugin.js +7 -1
  216. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +4 -1
  217. package/dist/es2019/plugins/paste/pm-plugins/main.js +27 -2
  218. package/dist/es2019/plugins/placeholder/index.js +12 -1
  219. package/dist/es2019/plugins/placeholder/styles.js +3 -1
  220. package/dist/es2019/plugins/placeholder-text/styles.js +5 -4
  221. package/dist/es2019/plugins/selection/gap-cursor/styles.js +9 -9
  222. package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
  223. package/dist/es2019/plugins/status/ui/statusPicker.js +3 -3
  224. package/dist/es2019/plugins/table/index.js +13 -4
  225. package/dist/es2019/plugins/table/nodeviews/TableComponent.js +6 -6
  226. package/dist/es2019/plugins/table/nodeviews/table.js +6 -2
  227. package/dist/es2019/plugins/table/pm-plugins/main.js +1 -4
  228. package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +106 -0
  229. package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
  230. package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin.js +2 -4
  231. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +3 -7
  232. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
  233. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
  234. package/dist/es2019/plugins/table/transforms/column-width.js +1 -2
  235. package/dist/es2019/plugins/table/transforms/fix-tables.js +1 -3
  236. package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +4 -2
  237. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +4 -3
  238. package/dist/es2019/plugins/table/ui/common-styles.js +29 -27
  239. package/dist/es2019/plugins/table/ui/consts.js +15 -12
  240. package/dist/es2019/plugins/table/ui/ui-styles.js +28 -23
  241. package/dist/es2019/plugins/table/utils/decoration.js +1 -4
  242. package/dist/es2019/plugins/table/utils/paste.js +9 -9
  243. package/dist/es2019/plugins/type-ahead/index.js +4 -3
  244. package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +2 -1
  245. package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +4 -4
  246. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
  247. package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +64 -6
  248. package/dist/es2019/plugins/unsupported-content/styles.js +1 -1
  249. package/dist/es2019/ui/Addon/Dropdown/styles.js +3 -2
  250. package/dist/es2019/ui/Addon/DropdownItem/styles.js +3 -2
  251. package/dist/es2019/ui/Appearance/Chromeless.js +2 -1
  252. package/dist/es2019/ui/Appearance/Comment/Comment.js +9 -4
  253. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +4 -2
  254. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +6 -2
  255. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
  256. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
  257. package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +7 -3
  258. package/dist/es2019/ui/ChromeCollapsed/styles.js +4 -3
  259. package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +10 -2
  260. package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
  261. package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
  262. package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
  263. package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +2 -1
  264. package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +2 -1
  265. package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
  266. package/dist/es2019/ui/ConfigPanel/Header.js +3 -2
  267. package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +4 -3
  268. package/dist/es2019/ui/ContentStyles/index.js +3 -2
  269. package/dist/es2019/ui/ContextPanel/index.js +2 -1
  270. package/dist/es2019/ui/DropdownMenu/index.js +5 -0
  271. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +6 -3
  272. package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +3 -2
  273. package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +3 -2
  274. package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
  275. package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
  276. package/dist/es2019/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
  277. package/dist/es2019/ui/ElementBrowser/components/ElementSearch.js +2 -1
  278. package/dist/es2019/ui/ElementBrowser/constants.js +3 -1
  279. package/dist/es2019/ui/FloatingToolbar/styles.js +4 -4
  280. package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +4 -3
  281. package/dist/es2019/ui/PanelTextInput/styles.js +5 -5
  282. package/dist/es2019/ui/PluginSlot/index.js +7 -4
  283. package/dist/es2019/ui/Toolbar/ToolbarInner.js +2 -1
  284. package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
  285. package/dist/es2019/ui/ToolbarFeedback/styles.js +5 -4
  286. package/dist/es2019/ui/WithFlash/index.js +4 -3
  287. package/dist/es2019/ui/styles.js +10 -9
  288. package/dist/es2019/utils/document.js +58 -5
  289. package/dist/es2019/utils/filter/privacy-filter.js +1 -1
  290. package/dist/es2019/utils/step.js +12 -1
  291. package/dist/es2019/version-wrapper.js +1 -1
  292. package/dist/es2019/version.json +1 -1
  293. package/dist/esm/actions/index.js +26 -1
  294. package/dist/esm/create-editor/ReactEditorView.js +2 -0
  295. package/dist/esm/create-editor/create-plugins-list.js +1 -2
  296. package/dist/esm/editor.js +5 -2
  297. package/dist/esm/keymaps/index.js +5 -1
  298. package/dist/esm/labs/next/ContentComponents.js +8 -4
  299. package/dist/esm/labs/next/full-page.js +11 -8
  300. package/dist/esm/nodeviews/getInlineNodeViewProducer.js +4 -3
  301. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +3 -2
  302. package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
  303. package/dist/esm/plugins/analytics/types/enums.js +3 -0
  304. package/dist/esm/plugins/base/index.js +8 -17
  305. package/dist/esm/plugins/base/pm-plugins/better-type-history.js +1 -11
  306. package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
  307. package/dist/esm/plugins/block-type/commands/block-type.js +31 -22
  308. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
  309. package/dist/esm/plugins/breakout/ui/LayoutButton.js +3 -5
  310. package/dist/esm/plugins/card/styles.js +1 -1
  311. package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
  312. package/dist/esm/plugins/code-block/actions.js +28 -0
  313. package/dist/esm/plugins/code-block/nodeviews/code-block.js +67 -1
  314. package/dist/esm/plugins/code-block/pm-plugins/actions.js +2 -1
  315. package/dist/esm/plugins/code-block/pm-plugins/main.js +39 -3
  316. package/dist/esm/plugins/code-block/styles.js +27 -23
  317. package/dist/esm/plugins/collab-edit/styles.js +3 -2
  318. package/dist/esm/plugins/collab-edit/ui/styles.js +3 -2
  319. package/dist/esm/plugins/collab-edit/utils.js +2 -0
  320. package/dist/esm/plugins/date/ui/DatePicker/index.js +2 -1
  321. package/dist/esm/plugins/expand/ui/styles.js +15 -14
  322. package/dist/esm/plugins/extension/commands.js +3 -2
  323. package/dist/esm/plugins/extension/context-panel.js +21 -7
  324. package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +5 -4
  325. package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
  326. package/dist/esm/plugins/extension/ui/Extension/styles.js +6 -5
  327. package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +3 -2
  328. package/dist/esm/plugins/fake-text-cursor/styles.js +2 -1
  329. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
  330. package/dist/esm/plugins/find-replace/styles.js +3 -3
  331. package/dist/esm/plugins/find-replace/ui/styles.js +3 -2
  332. package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
  333. package/dist/esm/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
  334. package/dist/esm/plugins/floating-toolbar/ui/Separator.js +2 -1
  335. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +5 -4
  336. package/dist/esm/plugins/floating-toolbar/ui/styles.js +11 -10
  337. package/dist/esm/plugins/grid/styles.js +2 -1
  338. package/dist/esm/plugins/help-dialog/ui/styles.js +8 -7
  339. package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
  340. package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +9 -1
  341. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +4 -3
  342. package/dist/esm/plugins/hyperlink/utils.js +44 -2
  343. package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +3 -2
  344. package/dist/esm/plugins/layout/styles.js +1 -1
  345. package/dist/esm/plugins/media/commands/helpers.js +6 -8
  346. package/dist/esm/plugins/media/nodeviews/mediaInline.js +22 -4
  347. package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
  348. package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +4 -3
  349. package/dist/esm/plugins/media/pm-plugins/main.js +2 -0
  350. package/dist/esm/plugins/media/styles.js +1 -1
  351. package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
  352. package/dist/esm/plugins/media/ui/Media/DropPlaceholder.js +3 -2
  353. package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +2 -1
  354. package/dist/esm/plugins/mentions/styles.js +2 -1
  355. package/dist/esm/plugins/mentions/ui/InviteItem/index.js +2 -1
  356. package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +3 -2
  357. package/dist/esm/plugins/panel/index.js +1 -0
  358. package/dist/esm/plugins/panel/nodeviews/panel.js +4 -1
  359. package/dist/esm/plugins/panel/pm-plugins/keymaps.js +22 -4
  360. package/dist/esm/plugins/paste/handlers.js +21 -0
  361. package/dist/esm/plugins/paste/linkify-md-plugin.js +7 -1
  362. package/dist/esm/plugins/paste/pm-plugins/analytics.js +6 -1
  363. package/dist/esm/plugins/paste/pm-plugins/main.js +27 -2
  364. package/dist/esm/plugins/placeholder/index.js +12 -1
  365. package/dist/esm/plugins/placeholder/styles.js +2 -1
  366. package/dist/esm/plugins/placeholder-text/styles.js +2 -1
  367. package/dist/esm/plugins/selection/gap-cursor/styles.js +1 -1
  368. package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
  369. package/dist/esm/plugins/status/ui/statusPicker.js +2 -2
  370. package/dist/esm/plugins/table/index.js +13 -4
  371. package/dist/esm/plugins/table/nodeviews/TableComponent.js +6 -6
  372. package/dist/esm/plugins/table/nodeviews/table.js +6 -2
  373. package/dist/esm/plugins/table/pm-plugins/main.js +1 -4
  374. package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +102 -0
  375. package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
  376. package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
  377. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
  378. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
  379. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
  380. package/dist/esm/plugins/table/transforms/column-width.js +1 -2
  381. package/dist/esm/plugins/table/transforms/fix-tables.js +1 -3
  382. package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +3 -1
  383. package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +2 -1
  384. package/dist/esm/plugins/table/ui/common-styles.js +4 -2
  385. package/dist/esm/plugins/table/ui/consts.js +15 -12
  386. package/dist/esm/plugins/table/ui/ui-styles.js +15 -10
  387. package/dist/esm/plugins/table/utils/decoration.js +3 -4
  388. package/dist/esm/plugins/table/utils/paste.js +9 -9
  389. package/dist/esm/plugins/type-ahead/index.js +4 -3
  390. package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +2 -1
  391. package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +4 -4
  392. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
  393. package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +71 -5
  394. package/dist/esm/plugins/unsupported-content/styles.js +1 -1
  395. package/dist/esm/ui/Addon/Dropdown/styles.js +2 -1
  396. package/dist/esm/ui/Addon/DropdownItem/styles.js +2 -1
  397. package/dist/esm/ui/Appearance/Chromeless.js +2 -1
  398. package/dist/esm/ui/Appearance/Comment/Comment.js +10 -3
  399. package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -2
  400. package/dist/esm/ui/Appearance/FullPage/FullPage.js +6 -2
  401. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
  402. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
  403. package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +5 -3
  404. package/dist/esm/ui/ChromeCollapsed/styles.js +1 -1
  405. package/dist/esm/ui/ConfigPanel/ConfigPanel.js +21 -14
  406. package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
  407. package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
  408. package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
  409. package/dist/esm/ui/ConfigPanel/Fields/Expand.js +2 -1
  410. package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +2 -1
  411. package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
  412. package/dist/esm/ui/ConfigPanel/Header.js +3 -2
  413. package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +3 -2
  414. package/dist/esm/ui/ContentStyles/index.js +3 -2
  415. package/dist/esm/ui/ContextPanel/index.js +2 -1
  416. package/dist/esm/ui/DropdownMenu/index.js +5 -0
  417. package/dist/esm/ui/ElementBrowser/InsertMenu.js +5 -4
  418. package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +3 -2
  419. package/dist/esm/ui/ElementBrowser/components/CategoryList.js +3 -2
  420. package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +11 -5
  421. package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
  422. package/dist/esm/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
  423. package/dist/esm/ui/ElementBrowser/components/ElementSearch.js +2 -1
  424. package/dist/esm/ui/ElementBrowser/constants.js +3 -1
  425. package/dist/esm/ui/FloatingToolbar/styles.js +3 -3
  426. package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +4 -3
  427. package/dist/esm/ui/PanelTextInput/styles.js +4 -3
  428. package/dist/esm/ui/PluginSlot/index.js +7 -4
  429. package/dist/esm/ui/Toolbar/ToolbarInner.js +2 -1
  430. package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
  431. package/dist/esm/ui/ToolbarFeedback/styles.js +4 -3
  432. package/dist/esm/ui/WithFlash/index.js +3 -2
  433. package/dist/esm/ui/styles.js +5 -4
  434. package/dist/esm/utils/document.js +59 -5
  435. package/dist/esm/utils/filter/privacy-filter.js +1 -1
  436. package/dist/esm/utils/step.js +12 -1
  437. package/dist/esm/version-wrapper.js +1 -1
  438. package/dist/esm/version.json +1 -1
  439. package/dist/types/actions/index.d.ts +6 -0
  440. package/dist/types/labs/next/ContentComponents.d.ts +7 -1
  441. package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +1 -0
  442. package/dist/types/plugins/analytics/types/enums.d.ts +3 -0
  443. package/dist/types/plugins/analytics/types/general-events.d.ts +7 -1
  444. package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +1 -1
  445. package/dist/types/plugins/code-block/actions.d.ts +2 -0
  446. package/dist/types/plugins/code-block/nodeviews/code-block.d.ts +2 -0
  447. package/dist/types/plugins/code-block/pm-plugins/actions.d.ts +1 -0
  448. package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +1 -0
  449. package/dist/types/plugins/extension/commands.d.ts +1 -1
  450. package/dist/types/plugins/extension/types.d.ts +1 -0
  451. package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
  452. package/dist/types/plugins/find-replace/styles.d.ts +0 -2
  453. package/dist/types/plugins/hyperlink/utils.d.ts +8 -0
  454. package/dist/types/plugins/media/commands/helpers.d.ts +2 -0
  455. package/dist/types/plugins/media/nodeviews/mediaNodeView/media.d.ts +1 -0
  456. package/dist/types/plugins/media/pm-plugins/main.d.ts +2 -1
  457. package/dist/types/plugins/media/pm-plugins/types.d.ts +2 -1
  458. package/dist/types/plugins/paste/handlers.d.ts +1 -0
  459. package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +1 -0
  460. package/dist/types/plugins/table/commands/misc.d.ts +0 -1
  461. package/dist/types/plugins/table/index.d.ts +0 -1
  462. package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +1 -0
  463. package/dist/types/plugins/table/nodeviews/types.d.ts +0 -1
  464. package/dist/types/plugins/table/pm-plugins/main.d.ts +1 -1
  465. package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +15 -0
  466. package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
  467. package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +1 -1
  468. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +1 -2
  469. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -1
  470. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +0 -1
  471. package/dist/types/plugins/table/transforms/fix-tables.d.ts +0 -1
  472. package/dist/types/plugins/table/types.d.ts +0 -1
  473. package/dist/types/plugins/table/ui/consts.d.ts +9 -9
  474. package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +2 -0
  475. package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +4 -4
  476. package/dist/types/types/editor-appearance-component.d.ts +0 -1
  477. package/dist/types/types/editor-props.d.ts +4 -0
  478. package/dist/types/types/feature-flags.d.ts +8 -0
  479. package/dist/types/types/ui-components.d.ts +1 -0
  480. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -0
  481. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -0
  482. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +3 -2
  483. package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +3 -2
  484. package/dist/types/ui/PluginSlot/index.d.ts +1 -0
  485. package/dist/types/ui/Toolbar/toolbar-types.d.ts +1 -0
  486. package/dist/types/utils/document.d.ts +1 -0
  487. package/dist/types/utils/step.d.ts +1 -0
  488. package/docs/0-intro.tsx +12 -4
  489. package/package.json +20 -20
@@ -10,9 +10,10 @@ import DocumentFilledIcon from '@atlaskit/icon/glyph/document-filled';
10
10
  import { hexToRgba } from '@atlaskit/adf-schema';
11
11
  import { injectIntl } from 'react-intl-next';
12
12
  import { dropPlaceholderMessages } from './drop-placeholder-messages';
13
+ import { token } from '@atlaskit/tokens';
13
14
  import { MEDIA_HEIGHT, FILE_WIDTH } from '../../nodeviews/mediaNodeView/media';
14
- var iconWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n background: ", ";\n border-radius: ", "px;\n margin: 5px 3px 25px;\n width: ", "px;\n min-height: ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), hexToRgba(B400, 0.4) || B400, hexToRgba(B300, 0.6) || B300, borderRadius(), FILE_WIDTH, MEDIA_HEIGHT);
15
- var dropLine = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n margin: 2px 0;\n width: 100%;\n height: 2px;\n"])), B200, borderRadius());
15
+ var iconWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n background: ", ";\n border-radius: ", "px;\n margin: 5px 3px 25px;\n width: ", "px;\n min-height: ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), token('color.icon.accent.blue', hexToRgba(B400, 0.4) || B400), token('color.background.accent.blue.subtle', hexToRgba(B300, 0.6) || B300), borderRadius(), FILE_WIDTH, MEDIA_HEIGHT);
16
+ var dropLine = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n margin: 2px 0;\n width: 100%;\n height: 2px;\n"])), token('color.border.focused', B200), borderRadius());
16
17
 
17
18
  var IconWrapperComponent = function IconWrapperComponent(props) {
18
19
  var intl = props.intl;
@@ -30,7 +30,8 @@ import { normalizeUrl } from '../../hyperlink/utils';
30
30
  import { R400 } from '@atlaskit/theme/colors';
31
31
  import { INPUT_METHOD } from '../../analytics/types/enums';
32
32
  import { mediaLinkToolbarMessages } from './media-linking-toolbar-messages';
33
- var validationWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: 0;\n padding: 12px 24px 12px 0;\n margin: 0 4px 0 32px;\n border-top: 1px solid ", ";\n align-items: start;\n display: flex;\n flex-direction: column;\n"])), R400);
33
+ import { token } from '@atlaskit/tokens';
34
+ var validationWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: 0;\n padding: 12px 24px 12px 0;\n margin: 0 4px 0 32px;\n border-top: 1px solid ", ";\n align-items: start;\n display: flex;\n flex-direction: column;\n"])), token('color.border.danger', R400));
34
35
  var buttonWrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 4px 8px 4px 0px;\n"])));
35
36
  export var LinkAddToolbar = /*#__PURE__*/function (_React$PureComponent) {
36
37
  _inherits(LinkAddToolbar, _React$PureComponent);
@@ -6,4 +6,5 @@ import { css } from '@emotion/react';
6
6
  import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
7
7
  import { SelectionStyle, getSelectionStyles, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
8
8
  import { N500, N30A } from '@atlaskit/theme/colors';
9
- export var mentionsStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n &.", " [data-mention-id] > span {\n ", "\n\n /* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n }\n }\n\n .danger {\n .", ".", "\n > span\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n }\n .", " > span > span {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background]), N500, MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, MentionSharedCssClassName.MENTION_CONTAINER, N30A, N500);
9
+ import { token } from '@atlaskit/tokens';
10
+ export var mentionsStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n &.", " [data-mention-id] > span {\n ", "\n\n /* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n }\n }\n\n .danger {\n .", ".", "\n > span\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n }\n .", " > span > span {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background]), token('color.text.subtle', N500), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, akEditorDeleteBorder, token('color.background.danger', akEditorDeleteBackgroundWithOpacity), MentionSharedCssClassName.MENTION_CONTAINER, token('color.background.neutral', N30A), token('color.text.subtle', N500));
@@ -4,6 +4,7 @@ import _extends from "@babel/runtime/helpers/extends";
4
4
  import { jsx } from '@emotion/react';
5
5
  import AddIcon from '@atlaskit/icon/glyph/add';
6
6
  import { N300 } from '@atlaskit/theme/colors';
7
+ import { token } from '@atlaskit/tokens';
7
8
  import React, { useCallback, useEffect } from 'react';
8
9
  import { FormattedMessage, injectIntl } from 'react-intl-next';
9
10
  import { avatarStyle, capitalizedStyle, mentionItemStyle, nameSectionStyle, rowStyle, ROW_SIDE_PADDING, AVATAR_HEIGHT, mentionItemSelectedStyle } from './styles';
@@ -52,7 +53,7 @@ var InviteItem = function InviteItem(_ref) {
52
53
  css: avatarStyle
53
54
  }, jsx(AddIcon, {
54
55
  label: intl.formatMessage(messages.mentionsAddLabel),
55
- primaryColor: N300
56
+ primaryColor: token('color.icon.subtle', N300)
56
57
  })), jsx("div", {
57
58
  css: nameSectionStyle,
58
59
  "data-testid": "name-section"
@@ -4,11 +4,12 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
4
4
 
5
5
  import { css } from '@emotion/react';
6
6
  import { N30, N300 } from '@atlaskit/theme/colors';
7
+ import { token } from '@atlaskit/tokens';
7
8
  export var ROW_SIDE_PADDING = 14;
8
9
  export var rowStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n overflow: hidden;\n padding: 6px ", "px;\n text-overflow: ellipsis;\n vertical-align: middle;\n"])), ROW_SIDE_PADDING);
9
10
  export var AVATAR_HEIGHT = 36;
10
11
  export var avatarStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n flex: initial;\n opacity: inherit;\n width: 36px;\n height: ", "px;\n\n > span {\n width: 24px;\n height: 24px;\n padding: 6px;\n }\n"])), AVATAR_HEIGHT);
11
- export var nameSectionStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 1;\n min-width: 0;\n margin-left: 14px;\n color: ", ";\n opacity: inherit;\n"])), N300);
12
+ export var nameSectionStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 1;\n min-width: 0;\n margin-left: 14px;\n color: ", ";\n opacity: inherit;\n"])), token('color.text.subtle', N300));
12
13
  export var mentionItemStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: transparent;\n display: block;\n overflow: hidden;\n list-style-type: none;\n cursor: pointer;\n"])));
13
- export var mentionItemSelectedStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-color: ", ";\n"])), N30);
14
+ export var mentionItemSelectedStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-color: ", ";\n"])), token('color.background.neutral.subtle.hovered', N30));
14
15
  export var capitalizedStyle = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n text-transform: capitalize;\n"])));
@@ -145,6 +145,7 @@ var panelPlugin = function panelPlugin() {
145
145
  panelIcon: ':rainbow:',
146
146
  panelIconId: '1f308',
147
147
  panelIconText: '🌈',
148
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
148
149
  panelColor: T50
149
150
  }, state, insert);
150
151
  }
@@ -81,7 +81,10 @@ var PanelNodeView = /*#__PURE__*/function () {
81
81
  key: "ignoreMutation",
82
82
  value: function ignoreMutation(mutation) {
83
83
  // ignore mutation if it caused by the icon.
84
- return mutation.target === this.icon || mutation.target.parentNode === this.icon;
84
+ var isIcon = mutation.target === this.icon || mutation.target.parentNode === this.icon; // ignore mutation if it caused by the lazy load emoji inside icon.
85
+
86
+ var isInsideIcon = this.icon.contains(mutation.target);
87
+ return isIcon || isInsideIcon;
85
88
  }
86
89
  }]);
87
90
 
@@ -1,6 +1,23 @@
1
1
  import { keymap } from 'prosemirror-keymap';
2
- import { setTextSelection } from 'prosemirror-utils';
3
- // Somewhat broken and subverted: https://product-fabric.atlassian.net/browse/ED-6504
2
+ import { setTextSelection, findParentNodeOfType } from 'prosemirror-utils';
3
+ import { isEmptyNode } from '../../../utils';
4
+
5
+ function findParentNode(selection, nodeType) {
6
+ var parentPosition = findParentNodeOfType(nodeType)(selection);
7
+
8
+ if (parentPosition) {
9
+ return parentPosition.node;
10
+ }
11
+
12
+ return null;
13
+ }
14
+
15
+ function isInsideAnEmptyNode(selection, nodeType, schema) {
16
+ var parentNode = findParentNode(selection, nodeType);
17
+ return parentNode && isEmptyNode(schema)(parentNode);
18
+ } // Somewhat broken and subverted: https://product-fabric.atlassian.net/browse/ED-6504
19
+
20
+
4
21
  export function keymapPlugin() {
5
22
  var deleteCurrentItem = function deleteCurrentItem($from, tr) {
6
23
  return tr.delete($from.before($from.depth) - 1, $from.end($from.depth) + 1);
@@ -11,7 +28,8 @@ export function keymapPlugin() {
11
28
  var selection = state.selection,
12
29
  nodes = state.schema.nodes,
13
30
  tr = state.tr;
14
- var panel = nodes.panel;
31
+ var panel = nodes.panel,
32
+ blockquote = nodes.blockquote;
15
33
  var $from = selection.$from,
16
34
  $to = selection.$to; // Don't do anything if selection is a range
17
35
 
@@ -30,7 +48,7 @@ export function keymapPlugin() {
30
48
  var isPreviousNodeAPanel = previousNodeType === panel;
31
49
  var isParentNodeAPanel = parentNodeType === panel; // Stops merging panels when deleting empty paragraph in between
32
50
 
33
- if (isPreviousNodeAPanel && !isParentNodeAPanel) {
51
+ if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || isInsideAnEmptyNode(selection, blockquote, state.schema)) {
34
52
  var content = $from.node($from.depth).content;
35
53
  var insertPos = previousPos.pos - 1;
36
54
  deleteCurrentItem($from, tr).insert(insertPos, content);
@@ -721,6 +721,27 @@ export function handleRichText(slice) {
721
721
  return true;
722
722
  };
723
723
  }
724
+ export function handlePasteIntoCaption(slice) {
725
+ return function (state, dispatch) {
726
+ var caption = state.schema.nodes.caption;
727
+ var tr = state.tr;
728
+
729
+ if (hasParentNodeOfType(caption)(state.selection)) {
730
+ // We let PM replace the selection and it will insert as text where it can't place the node
731
+ // This is totally fine as caption is just a simple block that only contains inline contents
732
+ // And it is more in line with WYSIWYG expectations
733
+ tr.replaceSelection(slice).scrollIntoView();
734
+
735
+ if (dispatch) {
736
+ dispatch(tr);
737
+ }
738
+
739
+ return true;
740
+ }
741
+
742
+ return false;
743
+ };
744
+ }
724
745
  export var handleSelectedTable = function handleSelectedTable(slice) {
725
746
  return function (state, dispatch) {
726
747
  var tr = replaceSelectedTable(state, slice, INPUT_METHOD.CLIPBOARD);
@@ -1,5 +1,6 @@
1
1
  import { linkifyMatch } from '@atlaskit/adf-schema';
2
- import LinkifyIt from 'linkify-it'; // modified version of the original Linkify plugin
2
+ import LinkifyIt from 'linkify-it';
3
+ import { findFilepaths, isLinkInMatches } from '../hyperlink/utils'; // modified version of the original Linkify plugin
3
4
  // https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js
4
5
 
5
6
  var arrayReplaceAt = function arrayReplaceAt(src, pos, newElements) {
@@ -67,8 +68,13 @@ var linkify = function linkify(state) {
67
68
  var nodes = [];
68
69
  var level = currentToken.level;
69
70
  var lastPos = 0;
71
+ var filepaths = findFilepaths(text);
70
72
 
71
73
  for (var ln = 0; ln < links.length; ln++) {
74
+ if (isLinkInMatches(links[ln].index, filepaths)) {
75
+ continue;
76
+ }
77
+
72
78
  var url = links[ln].url;
73
79
  var fullUrl = state.md.normalizeLink(url);
74
80
 
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
7
7
 
8
8
  import { ACTION, INPUT_METHOD, EVENT_TYPE, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, PasteTypes, PasteContents, withAnalytics } from '../../analytics';
9
9
  import { getPasteSource } from '../util';
10
- import { handlePasteAsPlainText, handlePasteIntoTaskAndDecision, handleCodeBlock, handleMediaSingle, handlePastePreservingMarks, handleMarkdown, handleRichText, handleExpandPasteInTable, handleSelectedTable, handlePasteLinkOnSelectedText } from '../handlers';
10
+ import { handlePasteAsPlainText, handlePasteIntoTaskAndDecision, handleCodeBlock, handleMediaSingle, handlePastePreservingMarks, handleMarkdown, handleRichText, handleExpandPasteInTable, handleSelectedTable, handlePasteLinkOnSelectedText, handlePasteIntoCaption } from '../handlers';
11
11
  import { pipe } from '../../../utils';
12
12
  import { findParentNode } from 'prosemirror-utils';
13
13
  import { mapSlice } from '../../../utils/slice';
@@ -222,6 +222,11 @@ export var handlePasteIntoTaskAndDecisionWithAnalytics = function handlePasteInt
222
222
  type: type
223
223
  }))(slice);
224
224
  };
225
+ export var handlePasteIntoCaptionWithAnalytics = function handlePasteIntoCaptionWithAnalytics(view, event, slice, type) {
226
+ return pipe(handlePasteIntoCaption, pasteCommandWithAnalytics(view, event, slice, {
227
+ type: type
228
+ }))(slice);
229
+ };
225
230
  export var handleCodeBlockWithAnalytics = function handleCodeBlockWithAnalytics(view, event, slice, text) {
226
231
  return pipe(handleCodeBlock, pasteCommandWithAnalytics(view, event, slice, {
227
232
  type: PasteTypes.plain
@@ -14,7 +14,7 @@ import { linkifyContent } from '../../hyperlink/utils';
14
14
  import { transformSliceNestedExpandToExpand } from '../../expand/utils';
15
15
  import { handleMacroAutoConvert, handleMention, handleParagraphBlockMarks } from '../handlers';
16
16
  import { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark } from '../../code-block/utils';
17
- import { createPasteMeasurePayload, getContentNodeTypes, handlePasteAsPlainTextWithAnalytics, handlePasteIntoTaskAndDecisionWithAnalytics, handleCodeBlockWithAnalytics, handleMediaSingleWithAnalytics, handlePastePreservingMarksWithAnalytics, handleMarkdownWithAnalytics, handleRichTextWithAnalytics, handleExpandWithAnalytics, handleSelectedTableWithAnalytics, handlePasteLinkOnSelectedTextWithAnalytics, sendPasteAnalyticsEvent } from './analytics';
17
+ import { createPasteMeasurePayload, getContentNodeTypes, handlePasteAsPlainTextWithAnalytics, handlePasteIntoTaskAndDecisionWithAnalytics, handleCodeBlockWithAnalytics, handleMediaSingleWithAnalytics, handlePastePreservingMarksWithAnalytics, handleMarkdownWithAnalytics, handleRichTextWithAnalytics, handleExpandWithAnalytics, handleSelectedTableWithAnalytics, handlePasteLinkOnSelectedTextWithAnalytics, sendPasteAnalyticsEvent, handlePasteIntoCaptionWithAnalytics } from './analytics';
18
18
  import { analyticsPluginKey, PasteTypes } from '../../analytics';
19
19
  import { insideTable, measurements } from '../../../utils';
20
20
  import { measureRender } from '@atlaskit/editor-common/utils';
@@ -28,6 +28,7 @@ import { pluginKey as betterTypePluginKey } from '../../base/pm-plugins/better-t
28
28
  import { clipboardTextSerializer } from './clipboard-text-serializer';
29
29
  import { htmlHasIncompleteTable, tryRebuildCompleteTableHtml, isPastedFromTinyMCEConfluence } from '../util/tinyMCE';
30
30
  import { handlePaste as handlePasteTable } from '@atlaskit/editor-tables/utils';
31
+ import { extractSliceFromStep } from '../../../utils/step';
31
32
  export var stateKey = new PluginKey('pastePlugin');
32
33
  export { md } from '../md';
33
34
  export function createPlugin(schema, dispatchAnalyticsEvent, plainTextPasteLinkification, cardOptions, sanitizePrivateContent, providerFactory) {
@@ -184,8 +185,25 @@ export function createPlugin(schema, dispatchAnalyticsEvent, plainTextPasteLinki
184
185
  // don't add closeHistory call if we're pasting a text inside placeholder text as we want the whole action
185
186
  // to be atomic
186
187
  var placeholder = state.schema.nodes.placeholder;
188
+ var isPastingTextInsidePlaceholderText = ((_state$doc$resolve$no = state.doc.resolve(state.selection.$anchor.pos).nodeAfter) === null || _state$doc$resolve$no === void 0 ? void 0 : _state$doc$resolve$no.type) === placeholder; // don't add closeHistory call if we're pasting a table, as some tables may involve additional
189
+ // appendedTransactions to repair them (if they're partial or incomplete) and we don't want
190
+ // to split those repairing transactions in prosemirror-history when they're being added to the
191
+ // "done" stack
192
+
193
+ var isPastingTable = tr.steps.some(function (step) {
194
+ var _slice$content;
195
+
196
+ var slice = extractSliceFromStep(step);
197
+ var tableExists = false;
198
+ slice === null || slice === void 0 ? void 0 : (_slice$content = slice.content) === null || _slice$content === void 0 ? void 0 : _slice$content.forEach(function (node) {
199
+ if (node.type === state.schema.nodes.table) {
200
+ tableExists = true;
201
+ }
202
+ });
203
+ return tableExists;
204
+ });
187
205
 
188
- if (((_state$doc$resolve$no = state.doc.resolve(state.selection.$anchor.pos).nodeAfter) === null || _state$doc$resolve$no === void 0 ? void 0 : _state$doc$resolve$no.type) !== placeholder) {
206
+ if (!isPastingTextInsidePlaceholderText && !isPastingTable) {
189
207
  tr.setMeta(betterTypePluginKey, true);
190
208
  }
191
209
 
@@ -308,6 +326,13 @@ export function createPlugin(schema, dispatchAnalyticsEvent, plainTextPasteLinki
308
326
 
309
327
  if (!insideTable(state)) {
310
328
  slice = transformSliceNestedExpandToExpand(slice, state.schema);
329
+ } // Create a custom handler to avoid handling with handleRichText method
330
+ // As SafeInsert is used inside handleRichText which caused some bad UX like this:
331
+ // https://product-fabric.atlassian.net/browse/MEX-1520
332
+
333
+
334
+ if (handlePasteIntoCaptionWithAnalytics(view, event, slice, PasteTypes.richText)(state, dispatch)) {
335
+ return true;
311
336
  }
312
337
 
313
338
  return handleRichTextWithAnalytics(view, event, slice)(state, dispatch);
@@ -1,4 +1,5 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import { browser } from '@atlaskit/editor-common/utils';
2
3
  import { PluginKey } from 'prosemirror-state';
3
4
  import { DecorationSet, Decoration } from 'prosemirror-view';
4
5
  import { isInEmptyLine, isEmptyDocument, bracketTyped } from '../../utils/document';
@@ -27,7 +28,17 @@ export function createPlaceholderDecoration(editorState, placeholderText) {
27
28
  placeholderDecoration.className = placeHolderClass;
28
29
  var placeholderNode = document.createElement('span');
29
30
  placeholderNode.textContent = placeholderText;
30
- placeholderDecoration.appendChild(placeholderNode);
31
+ placeholderDecoration.appendChild(placeholderNode); // ME-2289 Tapping on backspace in empty editor hides and displays the keyboard
32
+ // Add a editable buff node as the cursor moving forward is inevitable
33
+ // when backspace in GBoard composition
34
+
35
+ if (browser.android && browser.chrome) {
36
+ var buffNode = document.createElement('span');
37
+ buffNode.setAttribute('contenteditable', 'true');
38
+ buffNode.textContent = ' ';
39
+ placeholderDecoration.appendChild(buffNode);
40
+ }
41
+
31
42
  return DecorationSet.create(editorState.doc, [Decoration.widget(pos, placeholderDecoration, {
32
43
  side: -1,
33
44
  key: 'placeholder'
@@ -4,5 +4,6 @@ var _templateObject;
4
4
 
5
5
  import { css } from '@emotion/react';
6
6
  import { N200 } from '@atlaskit/theme/colors';
7
+ import { token } from '@atlaskit/tokens';
7
8
  export var placeHolderClassName = 'placeholder-decoration';
8
- export var placeholderStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror .", " {\n position: relative;\n color: ", ";\n width: 100%;\n\n pointer-events: none;\n display: block;\n user-select: none;\n\n > span {\n position: absolute;\n pointer-events: none;\n }\n\n &.align-end > span {\n right: 0;\n }\n\n &.align-center > span {\n left: 0;\n }\n }\n"])), placeHolderClassName, N200);
9
+ export var placeholderStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror .", " {\n position: relative;\n color: ", ";\n width: 100%;\n\n pointer-events: none;\n display: block;\n user-select: none;\n\n > span {\n position: absolute;\n pointer-events: none;\n outline: none;\n }\n\n &.align-end > span {\n right: 0;\n }\n\n &.align-center > span {\n left: 0;\n }\n }\n"])), placeHolderClassName, token('color.text.subtlest', N200));
@@ -5,4 +5,5 @@ var _templateObject;
5
5
  import { css } from '@emotion/react';
6
6
  import { N300 } from '@atlaskit/theme/colors';
7
7
  import { SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
8
- export var placeholderTextStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror span[data-placeholder] {\n color: ", ";\n display: inline;\n }\n\n .ProseMirror span.pm-placeholder {\n display: inline;\n color: ", ";\n }\n .ProseMirror span.pm-placeholder__text {\n display: inline;\n color: ", ";\n }\n\n .ProseMirror span.pm-placeholder.", " {\n ", "\n }\n\n .ProseMirror span.pm-placeholder__text[data-placeholder]::after {\n color: ", ";\n cursor: text;\n content: attr(data-placeholder);\n display: inline;\n }\n"])), N300, N300, N300, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Background]), N300);
8
+ import { token } from '@atlaskit/tokens';
9
+ export var placeholderTextStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror span[data-placeholder] {\n color: ", ";\n display: inline;\n }\n\n .ProseMirror span.pm-placeholder {\n display: inline;\n color: ", ";\n }\n .ProseMirror span.pm-placeholder__text {\n display: inline;\n color: ", ";\n }\n\n .ProseMirror span.pm-placeholder.", " {\n ", "\n }\n\n .ProseMirror span.pm-placeholder__text[data-placeholder]::after {\n color: ", ";\n cursor: text;\n content: attr(data-placeholder);\n display: inline;\n }\n"])), token('color.text.subtlest', N300), token('color.text.subtlest', N300), token('color.text.subtlest', N300), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Background]), token('color.text.subtlest', N300));
@@ -9,4 +9,4 @@ var gapCursor = '.ProseMirror-gapcursor';
9
9
  var prosemirrorwidget = '.ProseMirror-widget';
10
10
  var wrapLeft = '[layout="wrap-left"]';
11
11
  var wrapRight = '[layout="wrap-right"]';
12
- export var gapCursorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* =============== GAP CURSOR ================== */\n .ProseMirror {\n &.", " {\n caret-color: transparent;\n }\n\n ", " {\n display: none;\n pointer-events: none;\n position: relative;\n\n & span {\n caret-color: transparent;\n position: absolute;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n & span::after {\n animation: 1s ", " step-end infinite;\n border-left: 1px solid;\n content: '';\n display: block;\n position: absolute;\n top: 0;\n height: 100%;\n }\n &.-left span::after {\n left: -3px;\n }\n &.-right span::after {\n right: -3px;\n }\n & span[layout='full-width'],\n & span[layout='wide'] {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n &", " {\n float: right;\n }\n\n /* fix vertical alighment of gap cursor */\n &:first-child + ul,\n &:first-child + span + ul,\n &:first-child + ol,\n &:first-child + span + ol,\n &:first-child + pre,\n &:first-child + span + pre,\n &:first-child + blockquote,\n &:first-child + span + blockquote {\n margin-top: 0;\n }\n }\n &.ProseMirror-focused ", " {\n display: block;\n border-color: transparent;\n }\n }\n\n /* This hack below is for two images aligned side by side */\n ", "", " + span + ", ",\n ", "", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " {\n clear: none;\n }\n\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div {\n margin-right: 0;\n margin-left: 0;\n margin-bottom: 0;\n }\n\n ", " + ", ",\n ", " + ", " {\n float: left;\n }\n\n ", " + ", " + span + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after {\n visibility: hidden;\n display: block;\n font-size: 0;\n content: ' ';\n clear: both;\n height: 0;\n }\n\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + *,\n ", " + ", " + span + * {\n margin-top: 0;\n }\n"])), hideCaretModifier, gapCursor, gapCursorBlink, wrapRight, gapCursor, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, wrapLeft, gapCursor, wrapRight, gapCursor, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, prosemirrorwidget, gapCursor, prosemirrorwidget, gapCursor);
12
+ export var gapCursorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* =============== GAP CURSOR ================== */\n .ProseMirror {\n &.", " {\n caret-color: transparent;\n }\n\n ", " {\n display: none;\n pointer-events: none;\n position: relative;\n\n & span {\n caret-color: transparent;\n position: absolute;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n & span::after {\n animation: 1s ", " step-end infinite;\n border-left: 1px solid;\n content: '';\n display: block;\n position: absolute;\n top: 0;\n height: 100%;\n }\n &.-left span::after {\n left: -3px;\n }\n &.-right span::after {\n right: -3px;\n }\n & span[layout='full-width'],\n & span[layout='wide'] {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n &", " {\n float: right;\n }\n\n /* fix vertical alignment of gap cursor */\n &:first-of-type + ul,\n &:first-of-type + span + ul,\n &:first-of-type + ol,\n &:first-of-type + span + ol,\n &:first-of-type + pre,\n &:first-of-type + span + pre,\n &:first-of-type + blockquote,\n &:first-of-type + span + blockquote {\n margin-top: 0;\n }\n }\n &.ProseMirror-focused ", " {\n display: block;\n border-color: transparent;\n }\n }\n\n /* This hack below is for two images aligned side by side */\n ", "", " + span + ", ",\n ", "", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " {\n clear: none;\n }\n\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div {\n margin-right: 0;\n margin-left: 0;\n margin-bottom: 0;\n }\n\n ", " + ", ",\n ", " + ", " {\n float: left;\n }\n\n ", " + ", " + span + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after {\n visibility: hidden;\n display: block;\n font-size: 0;\n content: ' ';\n clear: both;\n height: 0;\n }\n\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + *,\n ", " + ", " + span + * {\n margin-top: 0;\n }\n"])), hideCaretModifier, gapCursor, gapCursorBlink, wrapRight, gapCursor, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, wrapLeft, gapCursor, wrapRight, gapCursor, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, prosemirrorwidget, gapCursor, prosemirrorwidget, gapCursor);
@@ -34,8 +34,8 @@ var plugin = new SafePlugin({
34
34
  }
35
35
 
36
36
  return {
37
- update: function update(view, state) {
38
- var pluginState = gapCursorPluginKey.getState(state);
37
+ update: function update(view) {
38
+ var pluginState = gapCursorPluginKey.getState(view.state);
39
39
  /**
40
40
  * Starting with prosemirror-view 1.19.4, cursor wrapper that previousely was hiding cursor doesn't exist:
41
41
  * https://github.com/ProseMirror/prosemirror-view/commit/4a56bc7b7e61e96ef879d1dae1014ede0fc09e43
@@ -22,10 +22,10 @@ import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
22
22
  import { StatusPicker as AkStatusPicker } from '@atlaskit/status/picker';
23
23
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
24
24
  import { N0 } from '@atlaskit/theme/colors';
25
- import { dropShadow } from '../../../ui/styles';
26
25
  import withOuterListeners from '../../../ui/with-outer-listeners';
27
26
  import { DEFAULT_STATUS } from '../actions';
28
27
  import { analyticsState, createStatusAnalyticsAndFire } from '../analytics';
28
+ import { token } from '@atlaskit/tokens';
29
29
  var PopupWithListeners = withOuterListeners(Popup);
30
30
  export var InputMethod;
31
31
 
@@ -35,7 +35,7 @@ export var InputMethod;
35
35
  InputMethod["enterKey"] = "enterKey";
36
36
  })(InputMethod || (InputMethod = {}));
37
37
 
38
- var pickerContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n padding: ", "px 0;\n border-radius: ", "px;\n ", ";\n input {\n text-transform: uppercase;\n }\n"])), N0, gridSize(), borderRadius(), dropShadow);
38
+ var pickerContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n padding: ", "px 0;\n border-radius: ", "px;\n box-shadow: ", ";\n input {\n text-transform: uppercase;\n }\n"])), token('elevation.surface.overlay', N0), gridSize(), borderRadius(), token('elevation.shadow.overlay', '0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)'));
39
39
  export var StatusPickerWithoutAnalytcs = /*#__PURE__*/function (_React$Component) {
40
40
  _inherits(StatusPickerWithoutAnalytcs, _React$Component);
41
41
 
@@ -11,6 +11,7 @@ import { IconTable } from '../quick-insert/assets';
11
11
  import { pluginConfig } from './create-plugin-config';
12
12
  import { createPlugin as createTableLocalIdPlugin } from './pm-plugins/table-local-id';
13
13
  import { createPlugin as createTableSafariDelayedDomSelectionSyncingWorkaroundPlugin } from './pm-plugins/safari-delayed-dom-selection-syncing-workaround';
14
+ import { createPlugin as createTableSafariDeleteCompositionTextIssueWorkaroundPlugin } from './pm-plugins/safari-delete-composition-text-issue-workaround';
14
15
  import { createPlugin as createDecorationsPlugin } from './pm-plugins/decorations/plugin';
15
16
  import { keymapPlugin } from './pm-plugins/keymap';
16
17
  import { tableSelectionKeymapPlugin } from './pm-plugins/table-selection-keymap';
@@ -55,13 +56,12 @@ var tablesPlugin = function tablesPlugin(options) {
55
56
  eventDispatcher = _ref.eventDispatcher;
56
57
 
57
58
  var _ref2 = options || {},
58
- dynamicSizingEnabled = _ref2.dynamicSizingEnabled,
59
59
  fullWidthEnabled = _ref2.fullWidthEnabled,
60
60
  wasFullWidthEnabled = _ref2.wasFullWidthEnabled,
61
61
  breakoutEnabled = _ref2.breakoutEnabled,
62
62
  tableOptions = _ref2.tableOptions;
63
63
 
64
- return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig(tableOptions), breakoutEnabled && dynamicSizingEnabled, breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled);
64
+ return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig(tableOptions), breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled);
65
65
  }
66
66
  }, {
67
67
  name: 'tablePMColResizing',
@@ -69,7 +69,6 @@ var tablesPlugin = function tablesPlugin(options) {
69
69
  var dispatch = _ref3.dispatch;
70
70
 
71
71
  var _ref4 = options || {},
72
- dynamicSizingEnabled = _ref4.dynamicSizingEnabled,
73
72
  fullWidthEnabled = _ref4.fullWidthEnabled,
74
73
  tableOptions = _ref4.tableOptions;
75
74
 
@@ -77,7 +76,6 @@ var tablesPlugin = function tablesPlugin(options) {
77
76
  allowColumnResizing = _pluginConfig.allowColumnResizing;
78
77
 
79
78
  return allowColumnResizing ? createFlexiResizingPlugin(dispatch, {
80
- dynamicTextSizing: dynamicSizingEnabled && !fullWidthEnabled,
81
79
  lastColumnResizable: !fullWidthEnabled
82
80
  }) : undefined;
83
81
  }
@@ -129,6 +127,17 @@ var tablesPlugin = function tablesPlugin(options) {
129
127
  return createTableSafariDelayedDomSelectionSyncingWorkaroundPlugin();
130
128
  }
131
129
  });
130
+ } // Workaround for table element breaking issue caused by composition event with an inputType of deleteCompositionText.
131
+ // https://github.com/ProseMirror/prosemirror/issues/934
132
+
133
+
134
+ if (browser.safari) {
135
+ plugins.push({
136
+ name: 'tableSafariDeleteCompositionTextIssueWorkaround',
137
+ plugin: function plugin() {
138
+ return createTableSafariDeleteCompositionTextIssueWorkaroundPlugin();
139
+ }
140
+ });
132
141
  }
133
142
 
134
143
  return plugins;
@@ -223,7 +223,6 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
223
223
  view = _this$props3.view,
224
224
  getNode = _this$props3.getNode,
225
225
  getPos = _this$props3.getPos,
226
- options = _this$props3.options,
227
226
  containerWidth = _this$props3.containerWidth;
228
227
  var node = getNode();
229
228
  var pos = getPos();
@@ -233,7 +232,6 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
233
232
  }
234
233
 
235
234
  autoSizeTable(view, node, _this.table, pos, {
236
- dynamicTextSizing: options && options.dynamicTextSizing || false,
237
235
  containerWidth: containerWidth.width
238
236
  });
239
237
  }
@@ -327,10 +325,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
327
325
  _this.node = _getNode();
328
326
  _this.containerWidth = _containerWidth; // store table size using previous full-width mode so can detect if it has changed
329
327
 
330
- var dynamicTextSizing = _options ? _options.dynamicTextSizing : false;
331
328
  var isFullWidthModeEnabled = _options ? _options.wasFullWidthModeEnabled : false;
332
329
  _this.layoutSize = _this.tableNodeLayoutSize(_this.node, _containerWidth.width, {
333
- dynamicTextSizing: dynamicTextSizing,
334
330
  isFullWidthModeEnabled: isFullWidthModeEnabled
335
331
  }); // Disable inline table editing and resizing controls in Firefox
336
332
  // https://github.com/ProseMirror/prosemirror/issues/432
@@ -415,7 +411,9 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
415
411
  value: function componentDidUpdate(prevProps) {
416
412
  var _this$props8 = this.props,
417
413
  view = _this$props8.view,
418
- getNode = _this$props8.getNode;
414
+ getNode = _this$props8.getNode,
415
+ isMediaFullscreen = _this$props8.isMediaFullscreen,
416
+ allowColumnResizing = _this$props8.allowColumnResizing;
419
417
 
420
418
  var _ref4 = getFeatureFlags(view.state) || {},
421
419
  tableOverflowShadowsOptimization = _ref4.tableOverflowShadowsOptimization;
@@ -441,7 +439,9 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
441
439
  if (currentTable.attrs.__autoSize) {
442
440
  // Wait for next tick to handle auto sizing, gives the browser time to do layout calc etc.
443
441
  this.handleAutoSizeDebounced();
444
- } else if (this.props.allowColumnResizing && this.table) {
442
+ } // re-drawing will cause media component get unmounted that will exit fullscreen mode if media is in fullscreen mode
443
+ // see https://product-fabric.atlassian.net/browse/MEX-1290
444
+ else if (allowColumnResizing && this.table && !isMediaFullscreen) {
445
445
  // If col widths (e.g. via collab) or number of columns (e.g. delete a column) have changed,
446
446
  // re-draw colgroup.
447
447
  var previousTable = this.node;
@@ -15,6 +15,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
15
15
 
16
16
  import React from 'react';
17
17
  import { DOMSerializer } from 'prosemirror-model';
18
+ import { stateKey as mediaPluginKey } from '../../../plugins/media/pm-plugins/plugin-key';
18
19
  import ReactNodeView from '../../../nodeviews/ReactNodeView';
19
20
  import WithPluginState from '../../../ui/WithPluginState';
20
21
  import { pluginKey as widthPluginKey } from '../../width';
@@ -105,19 +106,22 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
105
106
  plugins: {
106
107
  containerWidth: widthPluginKey,
107
108
  pluginState: pluginKey,
108
- tableResizingPluginState: tableResizingPluginKey
109
+ tableResizingPluginState: tableResizingPluginKey,
110
+ mediaState: mediaPluginKey
109
111
  },
110
112
  editorView: props.view,
111
113
  render: function render(pluginStates) {
112
114
  var tableResizingPluginState = pluginStates.tableResizingPluginState,
113
115
  pluginState = pluginStates.pluginState,
114
- containerWidth = pluginStates.containerWidth;
116
+ containerWidth = pluginStates.containerWidth,
117
+ mediaState = pluginStates.mediaState;
115
118
  var tableActive = props.getPos() === pluginState.tablePos;
116
119
  return /*#__PURE__*/React.createElement(TableComponent, {
117
120
  view: props.view,
118
121
  allowColumnResizing: props.allowColumnResizing,
119
122
  eventDispatcher: props.eventDispatcher,
120
123
  getPos: props.getPos,
124
+ isMediaFullscreen: mediaState === null || mediaState === void 0 ? void 0 : mediaState.isFullscreen,
121
125
  options: props.options,
122
126
  allowControls: pluginState.pluginConfig.allowControls,
123
127
  isHeaderRowEnabled: pluginState.isHeaderRowEnabled,
@@ -28,14 +28,12 @@ import { transformSliceToRemoveOpenBodiedExtension } from '../../extension/actio
28
28
  import { insideTable } from '../../../utils';
29
29
  import { isHeaderRowRequired } from '../utils/paste';
30
30
  var isBreakoutEnabled;
31
- var isDynamicTextSizingEnabled;
32
31
  var isFullWidthModeEnabled;
33
32
  var wasFullWidthModeEnabled;
34
- export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig, dynamicTextSizing, breakoutEnabled, fullWidthModeEnabled, previousFullWidthModeEnabled) {
33
+ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig, breakoutEnabled, fullWidthModeEnabled, previousFullWidthModeEnabled) {
35
34
  var _window;
36
35
 
37
36
  isBreakoutEnabled = breakoutEnabled;
38
- isDynamicTextSizingEnabled = dynamicTextSizing;
39
37
  isFullWidthModeEnabled = fullWidthModeEnabled;
40
38
  wasFullWidthModeEnabled = previousFullWidthModeEnabled;
41
39
  var state = createPluginState(dispatch, _objectSpread({
@@ -259,7 +257,6 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
259
257
  table: function table(node, view, getPos) {
260
258
  return createTableView(node, view, getPos, portalProviderAPI, eventDispatcher, {
261
259
  isBreakoutEnabled: isBreakoutEnabled,
262
- dynamicTextSizing: isDynamicTextSizingEnabled,
263
260
  isFullWidthModeEnabled: isFullWidthModeEnabled,
264
261
  wasFullWidthModeEnabled: wasFullWidthModeEnabled
265
262
  });