@atlaskit/editor-core 162.0.1 → 163.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 (503) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/cjs/create-editor/ErrorBoundary.js +1 -1
  3. package/dist/cjs/create-editor/ReactEditorView.js +2 -2
  4. package/dist/cjs/editor.js +3 -7
  5. package/dist/cjs/keymaps/index.js +14 -9
  6. package/dist/cjs/labs/next/full-page.js +34 -46
  7. package/dist/cjs/labs/next/presets/cxhtml.js +0 -1
  8. package/dist/cjs/nodeviews/ReactNodeView.js +16 -41
  9. package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +227 -0
  10. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +21 -0
  11. package/dist/cjs/nodeviews/getPerformanceOptions.js +64 -0
  12. package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +16 -6
  13. package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +10 -17
  14. package/dist/cjs/plugins/analytics/types/enums.js +2 -0
  15. package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +9 -16
  16. package/dist/cjs/plugins/base/index.js +26 -7
  17. package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +141 -76
  18. package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +5 -8
  19. package/dist/cjs/plugins/block-type/commands/block-type.js +21 -9
  20. package/dist/cjs/plugins/breakout/ui/LayoutButton.js +9 -9
  21. package/dist/cjs/plugins/card/nodeviews/genericCard.js +4 -4
  22. package/dist/cjs/plugins/card/pm-plugins/doc.js +53 -6
  23. package/dist/cjs/plugins/card/pm-plugins/main.js +16 -1
  24. package/dist/cjs/plugins/card/styles.js +2 -2
  25. package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +6 -6
  26. package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +7 -8
  27. package/dist/cjs/plugins/code-block/styles.js +2 -2
  28. package/dist/cjs/plugins/collab-edit/styles.js +2 -2
  29. package/dist/cjs/plugins/collab-edit/ui/avatars.js +6 -1
  30. package/dist/cjs/plugins/collab-edit/ui/colored-avatar-item.js +4 -5
  31. package/dist/cjs/plugins/collab-edit/ui/invite-to-edit.js +15 -4
  32. package/dist/cjs/plugins/collab-edit/ui/styles.js +10 -14
  33. package/dist/cjs/plugins/date/nodeviews/date.js +30 -75
  34. package/dist/cjs/plugins/date/pm-plugins/main.js +8 -11
  35. package/dist/cjs/plugins/date/styles.js +2 -2
  36. package/dist/cjs/plugins/date/ui/DatePicker/date-picker-input.js +7 -6
  37. package/dist/cjs/plugins/date/ui/DatePicker/index.js +8 -7
  38. package/dist/cjs/plugins/emoji/styles.js +3 -3
  39. package/dist/cjs/plugins/expand/ui/ExpandIconButton.js +13 -16
  40. package/dist/cjs/plugins/expand/ui/styles.js +26 -12
  41. package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +16 -9
  42. package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +9 -6
  43. package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/index.js +7 -3
  44. package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +7 -4
  45. package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +14 -13
  46. package/dist/cjs/plugins/extension/ui/Extension/styles.js +20 -26
  47. package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +14 -17
  48. package/dist/cjs/plugins/extension/ui/styles.js +2 -2
  49. package/dist/cjs/plugins/fake-text-cursor/styles.js +2 -2
  50. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +1 -1
  51. package/dist/cjs/plugins/find-replace/styles.js +2 -2
  52. package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +6 -7
  53. package/dist/cjs/plugins/floating-toolbar/ui/styles.js +7 -1
  54. package/dist/cjs/plugins/grid/styles.js +2 -2
  55. package/dist/cjs/plugins/help-dialog/ui/index.js +134 -40
  56. package/dist/cjs/plugins/help-dialog/ui/styles.js +26 -49
  57. package/dist/cjs/plugins/hyperlink/styles.js +6 -16
  58. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +23 -20
  59. package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +13 -10
  60. package/dist/cjs/plugins/list/commands/index.js +8 -0
  61. package/dist/cjs/plugins/list/pm-plugins/main.js +6 -0
  62. package/dist/cjs/plugins/list/styles.js +2 -2
  63. package/dist/cjs/plugins/list/utils/node.js +4 -3
  64. package/dist/cjs/plugins/media/index.js +9 -40
  65. package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +28 -23
  66. package/dist/cjs/plugins/media/pm-plugins/main.js +1 -8
  67. package/dist/cjs/plugins/media/pm-plugins/media-editor-plugin-factory.js +2 -67
  68. package/dist/cjs/plugins/media/styles.js +1 -1
  69. package/dist/cjs/plugins/media/toolbar/index.js +0 -13
  70. package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +1 -1
  71. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +12 -8
  72. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/styled.js +7 -6
  73. package/dist/cjs/plugins/media/utils/media-single.js +8 -4
  74. package/dist/cjs/plugins/mentions/styles.js +2 -2
  75. package/dist/cjs/plugins/panel/styles.js +5 -2
  76. package/dist/cjs/plugins/placeholder/styles.js +2 -2
  77. package/dist/cjs/plugins/placeholder-text/styles.js +2 -2
  78. package/dist/cjs/plugins/rule/pm-plugins/input-rule.js +2 -1
  79. package/dist/cjs/plugins/rule/styles.js +5 -2
  80. package/dist/cjs/plugins/selection/gap-cursor/styles.js +4 -4
  81. package/dist/cjs/plugins/selection/pm-plugins/selection-main.js +13 -30
  82. package/dist/cjs/plugins/status/index.js +9 -12
  83. package/dist/cjs/plugins/status/nodeviews/status.js +43 -126
  84. package/dist/cjs/plugins/status/plugin.js +14 -6
  85. package/dist/cjs/plugins/status/styles.js +2 -2
  86. package/dist/cjs/plugins/table/index.js +1 -1
  87. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +10 -16
  88. package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +2 -2
  89. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +7 -12
  90. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +2 -2
  91. package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
  92. package/dist/cjs/plugins/tasks-and-decisions/styles.js +2 -2
  93. package/dist/cjs/plugins/type-ahead/constants.js +3 -1
  94. package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +8 -0
  95. package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +15 -56
  96. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +48 -3
  97. package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +4 -1
  98. package/dist/cjs/plugins/unsupported-content/styles.js +2 -2
  99. package/dist/cjs/profiler/render-count.js +1 -3
  100. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -1
  101. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +0 -1
  102. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +0 -1
  103. package/dist/cjs/ui/Appearance/FullPage/messages.js +2 -2
  104. package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +18 -16
  105. package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +16 -14
  106. package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +13 -10
  107. package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +15 -4
  108. package/dist/cjs/ui/ConfigPanel/Header.js +30 -30
  109. package/dist/cjs/ui/ContentStyles/index.js +13 -20
  110. package/dist/cjs/ui/ElementBrowser/InsertMenu.js +5 -6
  111. package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +30 -23
  112. package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +51 -47
  113. package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +17 -14
  114. package/dist/cjs/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +18 -18
  115. package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +55 -68
  116. package/dist/cjs/ui/ElementBrowser/hooks/use-container-width.js +10 -11
  117. package/dist/cjs/ui/FloatingToolbar/styles.js +1 -1
  118. package/dist/cjs/ui/LinkSearch/LinkSearchList.js +18 -22
  119. package/dist/cjs/ui/PortalProvider/index.js +3 -3
  120. package/dist/cjs/ui/Resizer/styled.js +7 -5
  121. package/dist/cjs/ui/Toolbar/ToolbarInner.js +5 -3
  122. package/dist/cjs/ui/WithFlash/index.js +9 -17
  123. package/dist/cjs/utils/insert.js +25 -2
  124. package/dist/cjs/utils/performance/components/RenderTracking.js +52 -0
  125. package/dist/cjs/version-wrapper.js +1 -1
  126. package/dist/cjs/version.json +1 -1
  127. package/dist/es2019/create-editor/ErrorBoundary.js +2 -2
  128. package/dist/es2019/create-editor/ReactEditorView.js +1 -1
  129. package/dist/es2019/editor.js +3 -5
  130. package/dist/es2019/keymaps/index.js +10 -4
  131. package/dist/es2019/labs/next/full-page.js +44 -43
  132. package/dist/es2019/labs/next/presets/cxhtml.js +0 -1
  133. package/dist/es2019/nodeviews/ReactNodeView.js +13 -35
  134. package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +216 -0
  135. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +15 -0
  136. package/dist/es2019/nodeviews/getPerformanceOptions.js +47 -0
  137. package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +18 -7
  138. package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +5 -5
  139. package/dist/es2019/plugins/analytics/types/enums.js +2 -0
  140. package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +12 -7
  141. package/dist/es2019/plugins/base/index.js +24 -5
  142. package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +135 -77
  143. package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +5 -4
  144. package/dist/es2019/plugins/block-type/commands/block-type.js +18 -11
  145. package/dist/es2019/plugins/breakout/ui/LayoutButton.js +10 -6
  146. package/dist/es2019/plugins/card/nodeviews/genericCard.js +5 -5
  147. package/dist/es2019/plugins/card/pm-plugins/doc.js +44 -4
  148. package/dist/es2019/plugins/card/pm-plugins/main.js +17 -1
  149. package/dist/es2019/plugins/card/styles.js +1 -1
  150. package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +6 -6
  151. package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +8 -7
  152. package/dist/es2019/plugins/code-block/styles.js +4 -0
  153. package/dist/es2019/plugins/collab-edit/styles.js +1 -1
  154. package/dist/es2019/plugins/collab-edit/ui/avatars.js +6 -2
  155. package/dist/es2019/plugins/collab-edit/ui/colored-avatar-item.js +5 -4
  156. package/dist/es2019/plugins/collab-edit/ui/invite-to-edit.js +9 -5
  157. package/dist/es2019/plugins/collab-edit/ui/styles.js +5 -7
  158. package/dist/es2019/plugins/date/nodeviews/date.js +37 -48
  159. package/dist/es2019/plugins/date/pm-plugins/main.js +8 -10
  160. package/dist/es2019/plugins/date/styles.js +1 -1
  161. package/dist/es2019/plugins/date/ui/DatePicker/date-picker-input.js +8 -4
  162. package/dist/es2019/plugins/date/ui/DatePicker/index.js +9 -5
  163. package/dist/es2019/plugins/emoji/styles.js +1 -2
  164. package/dist/es2019/plugins/expand/ui/ExpandIconButton.js +13 -14
  165. package/dist/es2019/plugins/expand/ui/styles.js +32 -22
  166. package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +17 -11
  167. package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +7 -6
  168. package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/index.js +9 -5
  169. package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +5 -3
  170. package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +14 -7
  171. package/dist/es2019/plugins/extension/ui/Extension/styles.js +14 -8
  172. package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +15 -9
  173. package/dist/es2019/plugins/extension/ui/styles.js +2 -1
  174. package/dist/es2019/plugins/fake-text-cursor/styles.js +1 -1
  175. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +1 -1
  176. package/dist/es2019/plugins/find-replace/styles.js +1 -1
  177. package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +12 -8
  178. package/dist/es2019/plugins/floating-toolbar/ui/styles.js +7 -1
  179. package/dist/es2019/plugins/grid/styles.js +1 -1
  180. package/dist/es2019/plugins/help-dialog/ui/index.js +132 -37
  181. package/dist/es2019/plugins/help-dialog/ui/styles.js +13 -13
  182. package/dist/es2019/plugins/hyperlink/styles.js +1 -5
  183. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +25 -20
  184. package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +14 -7
  185. package/dist/es2019/plugins/list/commands/index.js +7 -0
  186. package/dist/es2019/plugins/list/pm-plugins/main.js +6 -0
  187. package/dist/es2019/plugins/list/styles.js +1 -1
  188. package/dist/es2019/plugins/list/utils/node.js +4 -3
  189. package/dist/es2019/plugins/media/index.js +1 -28
  190. package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +30 -16
  191. package/dist/es2019/plugins/media/pm-plugins/main.js +1 -7
  192. package/dist/es2019/plugins/media/pm-plugins/media-editor-plugin-factory.js +1 -49
  193. package/dist/es2019/plugins/media/styles.js +1 -2
  194. package/dist/es2019/plugins/media/toolbar/index.js +0 -12
  195. package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +0 -1
  196. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +14 -9
  197. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/styled.js +4 -5
  198. package/dist/es2019/plugins/media/utils/media-single.js +9 -5
  199. package/dist/es2019/plugins/mentions/styles.js +1 -1
  200. package/dist/es2019/plugins/panel/styles.js +3 -3
  201. package/dist/es2019/plugins/placeholder/styles.js +1 -1
  202. package/dist/es2019/plugins/placeholder-text/styles.js +1 -1
  203. package/dist/es2019/plugins/rule/pm-plugins/input-rule.js +4 -1
  204. package/dist/es2019/plugins/rule/styles.js +3 -3
  205. package/dist/es2019/plugins/selection/gap-cursor/styles.js +2 -2
  206. package/dist/es2019/plugins/selection/pm-plugins/selection-main.js +4 -20
  207. package/dist/es2019/plugins/status/index.js +1 -5
  208. package/dist/es2019/plugins/status/nodeviews/status.js +45 -82
  209. package/dist/es2019/plugins/status/plugin.js +13 -6
  210. package/dist/es2019/plugins/status/styles.js +1 -7
  211. package/dist/es2019/plugins/table/index.js +1 -1
  212. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +11 -10
  213. package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
  214. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +7 -8
  215. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +1 -1
  216. package/dist/es2019/plugins/table/ui/common-styles.js +4 -0
  217. package/dist/es2019/plugins/tasks-and-decisions/styles.js +1 -1
  218. package/dist/es2019/plugins/type-ahead/constants.js +1 -0
  219. package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +11 -1
  220. package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +19 -51
  221. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +41 -3
  222. package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +3 -1
  223. package/dist/es2019/plugins/unsupported-content/styles.js +1 -1
  224. package/dist/es2019/profiler/render-count.js +1 -1
  225. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -0
  226. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +0 -1
  227. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +0 -1
  228. package/dist/es2019/ui/Appearance/FullPage/messages.js +1 -1
  229. package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +19 -16
  230. package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +18 -13
  231. package/dist/es2019/ui/ConfigPanel/Fields/TabGroup.js +14 -8
  232. package/dist/es2019/ui/ConfigPanel/Fields/UserSelect.js +12 -3
  233. package/dist/es2019/ui/ConfigPanel/Header.js +30 -19
  234. package/dist/es2019/ui/ContentStyles/index.js +33 -38
  235. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +5 -6
  236. package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +49 -38
  237. package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +54 -33
  238. package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +18 -10
  239. package/dist/es2019/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +19 -17
  240. package/dist/es2019/ui/ElementBrowser/components/StatelessElementBrowser.js +132 -119
  241. package/dist/es2019/ui/ElementBrowser/hooks/use-container-width.js +10 -9
  242. package/dist/es2019/ui/FloatingToolbar/styles.js +2 -1
  243. package/dist/es2019/ui/LinkSearch/LinkSearchList.js +14 -9
  244. package/dist/es2019/ui/PortalProvider/index.js +3 -3
  245. package/dist/es2019/ui/Resizer/styled.js +3 -3
  246. package/dist/es2019/ui/Toolbar/ToolbarInner.js +6 -3
  247. package/dist/es2019/ui/WithFlash/index.js +15 -6
  248. package/dist/es2019/utils/insert.js +20 -0
  249. package/dist/es2019/utils/performance/components/RenderTracking.js +37 -0
  250. package/dist/es2019/version-wrapper.js +1 -1
  251. package/dist/es2019/version.json +1 -1
  252. package/dist/esm/create-editor/ErrorBoundary.js +2 -2
  253. package/dist/esm/create-editor/ReactEditorView.js +1 -1
  254. package/dist/esm/editor.js +3 -5
  255. package/dist/esm/keymaps/index.js +7 -4
  256. package/dist/esm/labs/next/full-page.js +38 -36
  257. package/dist/esm/labs/next/presets/cxhtml.js +0 -1
  258. package/dist/esm/nodeviews/ReactNodeView.js +17 -38
  259. package/dist/esm/nodeviews/getInlineNodeViewProducer.js +212 -0
  260. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +9 -0
  261. package/dist/esm/nodeviews/getPerformanceOptions.js +45 -0
  262. package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +17 -7
  263. package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +5 -5
  264. package/dist/esm/plugins/analytics/types/enums.js +2 -0
  265. package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +9 -9
  266. package/dist/esm/plugins/base/index.js +26 -7
  267. package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +134 -69
  268. package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +5 -4
  269. package/dist/esm/plugins/block-type/commands/block-type.js +19 -9
  270. package/dist/esm/plugins/breakout/ui/LayoutButton.js +9 -6
  271. package/dist/esm/plugins/card/nodeviews/genericCard.js +5 -5
  272. package/dist/esm/plugins/card/pm-plugins/doc.js +47 -4
  273. package/dist/esm/plugins/card/pm-plugins/main.js +15 -1
  274. package/dist/esm/plugins/card/styles.js +1 -1
  275. package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +6 -6
  276. package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +8 -9
  277. package/dist/esm/plugins/code-block/styles.js +2 -2
  278. package/dist/esm/plugins/collab-edit/styles.js +1 -1
  279. package/dist/esm/plugins/collab-edit/ui/avatars.js +6 -2
  280. package/dist/esm/plugins/collab-edit/ui/colored-avatar-item.js +5 -4
  281. package/dist/esm/plugins/collab-edit/ui/invite-to-edit.js +9 -5
  282. package/dist/esm/plugins/collab-edit/ui/styles.js +6 -7
  283. package/dist/esm/plugins/date/nodeviews/date.js +30 -71
  284. package/dist/esm/plugins/date/pm-plugins/main.js +8 -9
  285. package/dist/esm/plugins/date/styles.js +1 -1
  286. package/dist/esm/plugins/date/ui/DatePicker/date-picker-input.js +7 -4
  287. package/dist/esm/plugins/date/ui/DatePicker/index.js +8 -5
  288. package/dist/esm/plugins/emoji/styles.js +2 -2
  289. package/dist/esm/plugins/expand/ui/ExpandIconButton.js +13 -15
  290. package/dist/esm/plugins/expand/ui/styles.js +24 -12
  291. package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +18 -11
  292. package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +5 -5
  293. package/dist/esm/plugins/extension/ui/Extension/InlineExtension/index.js +9 -5
  294. package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +5 -3
  295. package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +13 -7
  296. package/dist/esm/plugins/extension/ui/Extension/styles.js +13 -11
  297. package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +15 -9
  298. package/dist/esm/plugins/extension/ui/styles.js +2 -2
  299. package/dist/esm/plugins/fake-text-cursor/styles.js +1 -1
  300. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +1 -1
  301. package/dist/esm/plugins/find-replace/styles.js +1 -1
  302. package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +6 -7
  303. package/dist/esm/plugins/floating-toolbar/ui/styles.js +7 -1
  304. package/dist/esm/plugins/grid/styles.js +1 -1
  305. package/dist/esm/plugins/help-dialog/ui/index.js +135 -41
  306. package/dist/esm/plugins/help-dialog/ui/styles.js +13 -13
  307. package/dist/esm/plugins/hyperlink/styles.js +3 -5
  308. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +24 -20
  309. package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +14 -7
  310. package/dist/esm/plugins/list/commands/index.js +7 -0
  311. package/dist/esm/plugins/list/pm-plugins/main.js +6 -0
  312. package/dist/esm/plugins/list/styles.js +1 -1
  313. package/dist/esm/plugins/list/utils/node.js +4 -3
  314. package/dist/esm/plugins/media/index.js +9 -37
  315. package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +29 -15
  316. package/dist/esm/plugins/media/pm-plugins/main.js +1 -9
  317. package/dist/esm/plugins/media/pm-plugins/media-editor-plugin-factory.js +1 -58
  318. package/dist/esm/plugins/media/styles.js +1 -1
  319. package/dist/esm/plugins/media/toolbar/index.js +0 -12
  320. package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +1 -1
  321. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +13 -9
  322. package/dist/esm/plugins/media/ui/ResizableMediaSingle/styled.js +4 -3
  323. package/dist/esm/plugins/media/utils/media-single.js +9 -5
  324. package/dist/esm/plugins/mentions/styles.js +1 -1
  325. package/dist/esm/plugins/panel/styles.js +4 -2
  326. package/dist/esm/plugins/placeholder/styles.js +1 -1
  327. package/dist/esm/plugins/placeholder-text/styles.js +1 -1
  328. package/dist/esm/plugins/rule/pm-plugins/input-rule.js +2 -1
  329. package/dist/esm/plugins/rule/styles.js +4 -2
  330. package/dist/esm/plugins/selection/gap-cursor/styles.js +3 -3
  331. package/dist/esm/plugins/selection/pm-plugins/selection-main.js +5 -21
  332. package/dist/esm/plugins/status/index.js +9 -12
  333. package/dist/esm/plugins/status/nodeviews/status.js +37 -115
  334. package/dist/esm/plugins/status/plugin.js +13 -6
  335. package/dist/esm/plugins/status/styles.js +2 -2
  336. package/dist/esm/plugins/table/index.js +1 -1
  337. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +10 -11
  338. package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
  339. package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +7 -10
  340. package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +1 -1
  341. package/dist/esm/plugins/table/ui/common-styles.js +1 -1
  342. package/dist/esm/plugins/tasks-and-decisions/styles.js +1 -1
  343. package/dist/esm/plugins/type-ahead/constants.js +1 -0
  344. package/dist/esm/plugins/type-ahead/ui/InputQuery.js +9 -1
  345. package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +18 -56
  346. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +44 -3
  347. package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +3 -1
  348. package/dist/esm/plugins/unsupported-content/styles.js +1 -1
  349. package/dist/esm/profiler/render-count.js +1 -1
  350. package/dist/esm/ui/Appearance/Comment/Toolbar.js +1 -1
  351. package/dist/esm/ui/Appearance/FullPage/FullPage.js +0 -1
  352. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +0 -1
  353. package/dist/esm/ui/Appearance/FullPage/messages.js +1 -1
  354. package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +19 -16
  355. package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +17 -13
  356. package/dist/esm/ui/ConfigPanel/Fields/TabGroup.js +13 -8
  357. package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +14 -3
  358. package/dist/esm/ui/ConfigPanel/Header.js +30 -19
  359. package/dist/esm/ui/ContentStyles/index.js +12 -17
  360. package/dist/esm/ui/ElementBrowser/InsertMenu.js +5 -6
  361. package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +29 -18
  362. package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +50 -35
  363. package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +18 -10
  364. package/dist/esm/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +19 -17
  365. package/dist/esm/ui/ElementBrowser/components/StatelessElementBrowser.js +53 -52
  366. package/dist/esm/ui/ElementBrowser/hooks/use-container-width.js +9 -8
  367. package/dist/esm/ui/FloatingToolbar/styles.js +1 -1
  368. package/dist/esm/ui/LinkSearch/LinkSearchList.js +14 -9
  369. package/dist/esm/ui/PortalProvider/index.js +3 -3
  370. package/dist/esm/ui/Resizer/styled.js +4 -2
  371. package/dist/esm/ui/Toolbar/ToolbarInner.js +6 -3
  372. package/dist/esm/ui/WithFlash/index.js +8 -8
  373. package/dist/esm/utils/insert.js +20 -0
  374. package/dist/esm/utils/performance/components/RenderTracking.js +39 -0
  375. package/dist/esm/version-wrapper.js +1 -1
  376. package/dist/esm/version.json +1 -1
  377. package/dist/types/editor.d.ts +1 -1
  378. package/dist/types/keymaps/index.d.ts +3 -2
  379. package/dist/types/labs/next/full-page.d.ts +1 -1
  380. package/dist/types/labs/next/mobile.d.ts +1 -1
  381. package/dist/types/nodeviews/ReactNodeView.d.ts +0 -5
  382. package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +23 -0
  383. package/dist/types/nodeviews/getInlineNodeViewProducer.styles.d.ts +1 -0
  384. package/dist/types/nodeviews/getPerformanceOptions.d.ts +19 -0
  385. package/dist/types/plugins/alignment/ui/ToolbarAlignment/index.d.ts +3 -1
  386. package/dist/types/plugins/alignment/ui/ToolbarAlignment/styles.d.ts +4 -5
  387. package/dist/types/plugins/analytics/types/enums.d.ts +2 -0
  388. package/dist/types/plugins/analytics/types/events.d.ts +11 -3
  389. package/dist/types/plugins/analytics/types/general-events.d.ts +1 -1
  390. package/dist/types/plugins/analytics/types/utils.d.ts +4 -0
  391. package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +2 -2
  392. package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +12 -6
  393. package/dist/types/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.d.ts +3 -3
  394. package/dist/types/plugins/breakout/ui/LayoutButton.d.ts +1 -0
  395. package/dist/types/plugins/card/pm-plugins/doc.d.ts +1 -0
  396. package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -1
  397. package/dist/types/plugins/card/styles.d.ts +1 -1
  398. package/dist/types/plugins/card/ui/LinkToolbarButtonGroup.d.ts +1 -1
  399. package/dist/types/plugins/collab-edit/styles.d.ts +1 -1
  400. package/dist/types/plugins/collab-edit/ui/avatars.d.ts +1 -0
  401. package/dist/types/plugins/collab-edit/ui/colored-avatar-item.d.ts +3 -2
  402. package/dist/types/plugins/collab-edit/ui/invite-to-edit.d.ts +1 -0
  403. package/dist/types/plugins/collab-edit/ui/styles.d.ts +3 -8
  404. package/dist/types/plugins/date/nodeviews/date.d.ts +3 -15
  405. package/dist/types/plugins/date/styles.d.ts +1 -1
  406. package/dist/types/plugins/date/ui/DatePicker/date-picker-input.d.ts +1 -0
  407. package/dist/types/plugins/date/ui/DatePicker/index.d.ts +1 -0
  408. package/dist/types/plugins/emoji/styles.d.ts +2 -2
  409. package/dist/types/plugins/expand/ui/ExpandIconButton.d.ts +5 -3
  410. package/dist/types/plugins/expand/ui/styles.d.ts +2 -1
  411. package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +1 -0
  412. package/dist/types/plugins/extension/ui/Extension/Extension/styles.d.ts +3 -8
  413. package/dist/types/plugins/extension/ui/Extension/InlineExtension/index.d.ts +3 -1
  414. package/dist/types/plugins/extension/ui/Extension/InlineExtension/styles.d.ts +2 -2
  415. package/dist/types/plugins/extension/ui/Extension/Lozenge.d.ts +3 -1
  416. package/dist/types/plugins/extension/ui/Extension/styles.d.ts +6 -6
  417. package/dist/types/plugins/extension/ui/SaveIndicator/SaveIndicator.d.ts +1 -0
  418. package/dist/types/plugins/extension/ui/styles.d.ts +1 -1
  419. package/dist/types/plugins/fake-text-cursor/styles.d.ts +1 -1
  420. package/dist/types/plugins/find-replace/styles.d.ts +1 -1
  421. package/dist/types/plugins/floating-toolbar/ui/styles.d.ts +6 -1
  422. package/dist/types/plugins/grid/styles.d.ts +1 -1
  423. package/dist/types/plugins/help-dialog/ui/index.d.ts +3 -1
  424. package/dist/types/plugins/help-dialog/ui/styles.d.ts +12 -13
  425. package/dist/types/plugins/hyperlink/styles.d.ts +2 -4
  426. package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +4 -2
  427. package/dist/types/plugins/jira-issue/nodeviews/jira-issue.d.ts +3 -2
  428. package/dist/types/plugins/list/styles.d.ts +1 -1
  429. package/dist/types/plugins/list/utils/node.d.ts +0 -1
  430. package/dist/types/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.d.ts +3 -1
  431. package/dist/types/plugins/media/pm-plugins/main.d.ts +0 -1
  432. package/dist/types/plugins/media/pm-plugins/media-editor-plugin-factory.d.ts +1 -3
  433. package/dist/types/plugins/media/types.d.ts +0 -19
  434. package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +3 -1
  435. package/dist/types/plugins/media/ui/ResizableMediaSingle/styled.d.ts +2 -2
  436. package/dist/types/plugins/mentions/styles.d.ts +1 -1
  437. package/dist/types/plugins/panel/styles.d.ts +2 -1
  438. package/dist/types/plugins/placeholder/styles.d.ts +1 -1
  439. package/dist/types/plugins/placeholder-text/styles.d.ts +1 -1
  440. package/dist/types/plugins/rule/styles.d.ts +2 -1
  441. package/dist/types/plugins/selection/gap-cursor/styles.d.ts +1 -1
  442. package/dist/types/plugins/status/nodeviews/status.d.ts +6 -13
  443. package/dist/types/plugins/status/plugin.d.ts +2 -3
  444. package/dist/types/plugins/status/styles.d.ts +1 -1
  445. package/dist/types/plugins/status/ui/statusPicker.d.ts +1 -1
  446. package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +4 -2
  447. package/dist/types/plugins/table/ui/FloatingContextualButton/styles.d.ts +1 -1
  448. package/dist/types/plugins/table/ui/FloatingContextualMenu/index.d.ts +3 -2
  449. package/dist/types/plugins/table/ui/FloatingContextualMenu/styles.d.ts +1 -1
  450. package/dist/types/plugins/tasks-and-decisions/styles.d.ts +1 -1
  451. package/dist/types/plugins/type-ahead/constants.d.ts +1 -0
  452. package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +1 -0
  453. package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +26 -0
  454. package/dist/types/plugins/unsupported-content/styles.d.ts +1 -1
  455. package/dist/types/types/editor-appearance-component.d.ts +0 -1
  456. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +0 -1
  457. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -9
  458. package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
  459. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  460. package/dist/types/ui/ConfigPanel/ErrorMessage/ErrorImage.d.ts +1 -0
  461. package/dist/types/ui/ConfigPanel/Fields/Boolean.d.ts +2 -2
  462. package/dist/types/ui/ConfigPanel/Fields/TabGroup.d.ts +1 -0
  463. package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +1 -1
  464. package/dist/types/ui/ConfigPanel/Header.d.ts +3 -3
  465. package/dist/types/ui/ContentStyles/index.d.ts +1 -4
  466. package/dist/types/ui/ElementBrowser/ModalElementBrowser.d.ts +1 -0
  467. package/dist/types/ui/ElementBrowser/components/ElementList/ElementList.d.ts +1 -0
  468. package/dist/types/ui/ElementBrowser/components/ElementSearch.d.ts +1 -1
  469. package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +2 -1
  470. package/dist/types/ui/ElementBrowser/hooks/use-container-width.d.ts +1 -0
  471. package/dist/types/ui/LinkSearch/LinkSearchList.d.ts +4 -3
  472. package/dist/types/ui/Resizer/styled.d.ts +1 -2
  473. package/dist/types/ui/Toolbar/ToolbarInner.d.ts +3 -1
  474. package/dist/types/ui/ToolbarButton/index.d.ts +3 -3
  475. package/dist/types/ui/ToolbarButton/styles.d.ts +2 -2
  476. package/dist/types/ui/WithFlash/index.d.ts +3 -1
  477. package/dist/types/utils/insert.d.ts +2 -1
  478. package/dist/types/utils/performance/components/RenderTracking.d.ts +13 -0
  479. package/package.json +27 -29
  480. package/dist/cjs/plugins/media/commands/media-editor.js +0 -80
  481. package/dist/cjs/plugins/media/pm-plugins/media-editor.js +0 -106
  482. package/dist/cjs/plugins/media/toolbar/annotation.js +0 -244
  483. package/dist/cjs/plugins/media/ui/MediaEditor.js +0 -88
  484. package/dist/cjs/utils/compare.js +0 -136
  485. package/dist/cjs/utils/react-hooks/use-component-renderer-tracking/index.js +0 -83
  486. package/dist/es2019/plugins/media/commands/media-editor.js +0 -46
  487. package/dist/es2019/plugins/media/pm-plugins/media-editor.js +0 -43
  488. package/dist/es2019/plugins/media/toolbar/annotation.js +0 -136
  489. package/dist/es2019/plugins/media/ui/MediaEditor.js +0 -51
  490. package/dist/es2019/utils/compare.js +0 -99
  491. package/dist/es2019/utils/react-hooks/use-component-renderer-tracking/index.js +0 -66
  492. package/dist/esm/plugins/media/commands/media-editor.js +0 -59
  493. package/dist/esm/plugins/media/pm-plugins/media-editor.js +0 -90
  494. package/dist/esm/plugins/media/toolbar/annotation.js +0 -218
  495. package/dist/esm/plugins/media/ui/MediaEditor.js +0 -76
  496. package/dist/esm/utils/compare.js +0 -115
  497. package/dist/esm/utils/react-hooks/use-component-renderer-tracking/index.js +0 -68
  498. package/dist/types/plugins/media/commands/media-editor.d.ts +0 -7
  499. package/dist/types/plugins/media/pm-plugins/media-editor.d.ts +0 -3
  500. package/dist/types/plugins/media/toolbar/annotation.d.ts +0 -24
  501. package/dist/types/plugins/media/ui/MediaEditor.d.ts +0 -14
  502. package/dist/types/utils/compare.d.ts +0 -32
  503. package/dist/types/utils/react-hooks/use-component-renderer-tracking/index.d.ts +0 -30
@@ -9,9 +9,7 @@ exports.default = JIRAIssueNode;
9
9
 
10
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
11
 
12
- var _react = _interopRequireDefault(require("react"));
13
-
14
- var _styledComponents = _interopRequireDefault(require("styled-components"));
12
+ var _react = require("@emotion/react");
15
13
 
16
14
  var _jiraIcon = require("@atlaskit/logo/jira-icon");
17
15
 
@@ -23,15 +21,20 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
23
21
 
24
22
  var _templateObject, _templateObject2, _templateObject3;
25
23
 
26
- var WrapperNode = _styledComponents.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n font-size: ", ";\n margin: 0 2px;\n min-height: 24px;\n padding: 0 4px;\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n\n .ProseMirror-selectednode & {\n background: ", ";\n outline: none;\n }\n"])), _colors.N30, _colors.N50, (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)(13), _colors.N50);
27
-
28
- var JiraChildNode = _styledComponents.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n color: #707070;\n line-height: 24px;\n vertical-align: top;\n\n &::before {\n color: black;\n content: 'JIRA | ';\n }\n"])));
29
-
30
- var SvgChildNode = _styledComponents.default.span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n\n & > div {\n height: 24px;\n width: 24px;\n }\n"])));
24
+ var wrapperNode = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n font-size: ", ";\n margin: 0 2px;\n min-height: 24px;\n padding: 0 4px;\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n\n .ProseMirror-selectednode & {\n background: ", ";\n outline: none;\n }\n"])), _colors.N30, _colors.N50, (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)(13), _colors.N50);
25
+ var jiraChildNode = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n color: #707070;\n line-height: 24px;\n vertical-align: top;\n\n &::before {\n color: black;\n content: 'JIRA | ';\n }\n"])));
26
+ var svgChildNode = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n\n & > div {\n height: 24px;\n width: 24px;\n }\n"])));
31
27
 
32
28
  function JIRAIssueNode(props) {
33
29
  var issueKey = props.node.attrs.issueKey;
34
- return /*#__PURE__*/_react.default.createElement(WrapperNode, null, /*#__PURE__*/_react.default.createElement(SvgChildNode, null, /*#__PURE__*/_react.default.createElement(_jiraIcon.JiraIcon, {
30
+ return (0, _react.jsx)("span", {
31
+ css: wrapperNode,
32
+ "data-testid": "jira-issue-node"
33
+ }, (0, _react.jsx)("span", {
34
+ css: svgChildNode
35
+ }, (0, _react.jsx)(_jiraIcon.JiraIcon, {
35
36
  size: "small"
36
- })), /*#__PURE__*/_react.default.createElement(JiraChildNode, null, issueKey));
37
+ })), (0, _react.jsx)("span", {
38
+ css: jiraChildNode
39
+ }, issueKey));
37
40
  }
@@ -29,6 +29,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
29
29
 
30
30
  var _prosemirrorModel = require("prosemirror-model");
31
31
 
32
+ var _prosemirrorState = require("prosemirror-state");
33
+
32
34
  var baseCommand = _interopRequireWildcard(require("prosemirror-commands"));
33
35
 
34
36
  var _prosemirrorUtils = require("prosemirror-utils");
@@ -387,6 +389,12 @@ var joinToPreviousListItem = function joinToPreviousListItem(state, dispatch) {
387
389
  }
388
390
 
389
391
  if (dispatch) {
392
+ var _tr$doc$resolve$nodeB;
393
+
394
+ if (!((_tr$doc$resolve$nodeB = tr.doc.resolve($lastNode.pos).nodeBefore) !== null && _tr$doc$resolve$nodeB !== void 0 && _tr$doc$resolve$nodeB.isBlock) || tr.doc.resolve($lastNode.pos).nodeBefore === null) {
395
+ tr = tr.setSelection(_prosemirrorState.TextSelection.near(tr.doc.resolve(tr.mapping.map($cut.pos)), -1));
396
+ }
397
+
390
398
  dispatch(tr.scrollIntoView());
391
399
  }
392
400
 
@@ -69,6 +69,12 @@ var getDecorations = function getDecorations(doc) {
69
69
  decorations.push(_prosemirrorView.Decoration.node(from, to, {
70
70
  'data-indent-level': "".concat(depth)
71
71
  }));
72
+
73
+ if (node.childCount >= 100) {
74
+ decorations.push(_prosemirrorView.Decoration.node(from, to, {
75
+ 'data-child-count': '100+'
76
+ }));
77
+ }
72
78
  }
73
79
  });
74
80
  return _prosemirrorView.DecorationSet.empty.add(doc, decorations);
@@ -9,9 +9,9 @@ exports.listsStyles = void 0;
9
9
 
10
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
11
 
12
- var _styledComponents = require("styled-components");
12
+ var _react = require("@emotion/react");
13
13
 
14
14
  var _templateObject;
15
15
 
16
- var listsStyles = (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror li {\n position: relative;\n\n > p:not(:first-child) {\n margin: 4px 0 0 0;\n }\n }\n"])));
16
+ var listsStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror li {\n position: relative;\n\n > p:not(:first-child) {\n margin: 4px 0 0 0;\n }\n }\n"])));
17
17
  exports.listsStyles = listsStyles;
@@ -129,10 +129,11 @@ var joinSiblingLists = function joinSiblingLists(_ref) {
129
129
 
130
130
  for (var i = joins.length - 1; i >= 0; i--) {
131
131
  var listNode = tr.doc.nodeAt(joins[i]);
132
+ var listName = listNode === null || listNode === void 0 ? void 0 : listNode.type.name;
132
133
 
133
- if (listNode) {
134
- var amount = result[listNode.type.name] || 0;
135
- result[listNode.type.name] = amount + 1;
134
+ if (listName && (listName === 'orderedList' || listName === 'bulletList')) {
135
+ var amount = result[listName] || 0;
136
+ result[listName] = amount + 1;
136
137
  }
137
138
 
138
139
  tr.join(joins[i]);
@@ -21,10 +21,6 @@ var _main = require("./pm-plugins/main");
21
21
 
22
22
  var _mediaCommon = require("@atlaskit/media-common");
23
23
 
24
- var _mediaEditor = require("./pm-plugins/media-editor");
25
-
26
- var _mediaEditorPluginFactory = require("./pm-plugins/media-editor-plugin-factory");
27
-
28
24
  var _altText = require("./pm-plugins/alt-text");
29
25
 
30
26
  var _keymap = _interopRequireDefault(require("./pm-plugins/alt-text/keymap"));
@@ -51,8 +47,6 @@ var _assets = require("../quick-insert/assets");
51
47
 
52
48
  var _WithPluginState = _interopRequireDefault(require("../../ui/WithPluginState"));
53
49
 
54
- var _MediaEditor = _interopRequireDefault(require("./ui/MediaEditor"));
55
-
56
50
  var _MediaPicker = require("./ui/MediaPicker");
57
51
 
58
52
  var _messages = require("../insert-block/ui/ToolbarInsertBlock/messages");
@@ -151,13 +145,6 @@ var mediaPlugin = function mediaPlugin(options) {
151
145
  });
152
146
  }
153
147
 
154
- if (options && options.allowAnnotation) {
155
- pmPlugins.push({
156
- name: 'mediaEditor',
157
- plugin: _mediaEditor.createPlugin
158
- });
159
- }
160
-
161
148
  if (options && options.allowAltTextOnImages) {
162
149
  pmPlugins.push({
163
150
  name: 'mediaAltText',
@@ -193,43 +180,26 @@ var mediaPlugin = function mediaPlugin(options) {
193
180
  },
194
181
  contentComponent: function contentComponent(_ref7) {
195
182
  var editorView = _ref7.editorView,
196
- eventDispatcher = _ref7.eventDispatcher,
197
183
  appearance = _ref7.appearance;
198
- // render MediaEditor separately because it doesn't depend on media plugin state
199
- // so we can utilise EventDispatcher-based rerendering
200
- var mediaEditor = options && options.allowAnnotation ? /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
201
- editorView: editorView,
202
- plugins: {
203
- mediaEditorState: _mediaEditorPluginFactory.pluginKey
204
- },
205
- eventDispatcher: eventDispatcher,
206
- render: function render(_ref8) {
207
- var mediaEditorState = _ref8.mediaEditorState;
208
- return /*#__PURE__*/_react.default.createElement(_MediaEditor.default, {
209
- mediaEditorState: mediaEditorState,
210
- view: editorView
211
- });
212
- }
213
- }) : null;
214
184
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
215
185
  editorView: editorView,
216
186
  plugins: {
217
187
  mediaState: _main.stateKey
218
188
  },
219
- render: function render(_ref9) {
220
- var mediaState = _ref9.mediaState;
189
+ render: function render(_ref8) {
190
+ var mediaState = _ref8.mediaState;
221
191
  return /*#__PURE__*/_react.default.createElement(_MediaPicker.MediaPickerComponents, {
222
192
  editorDomElement: editorView.dom,
223
193
  mediaState: mediaState,
224
194
  appearance: appearance
225
195
  });
226
196
  }
227
- }), mediaEditor);
197
+ }));
228
198
  },
229
- secondaryToolbarComponent: function secondaryToolbarComponent(_ref10) {
230
- var editorView = _ref10.editorView,
231
- eventDispatcher = _ref10.eventDispatcher,
232
- disabled = _ref10.disabled;
199
+ secondaryToolbarComponent: function secondaryToolbarComponent(_ref9) {
200
+ var editorView = _ref9.editorView,
201
+ eventDispatcher = _ref9.eventDispatcher,
202
+ disabled = _ref9.disabled;
233
203
  return /*#__PURE__*/_react.default.createElement(_ToolbarMedia.default, {
234
204
  editorView: editorView,
235
205
  eventDispatcher: eventDispatcher,
@@ -239,8 +209,8 @@ var mediaPlugin = function mediaPlugin(options) {
239
209
  });
240
210
  },
241
211
  pluginsOptions: {
242
- quickInsert: function quickInsert(_ref11) {
243
- var formatMessage = _ref11.formatMessage;
212
+ quickInsert: function quickInsert(_ref10) {
213
+ var formatMessage = _ref10.formatMessage;
244
214
  return [{
245
215
  id: 'media',
246
216
  title: formatMessage(_messages.messages.filesAndImages),
@@ -272,7 +242,6 @@ var mediaPlugin = function mediaPlugin(options) {
272
242
  allowMediaInline: options && (0, _mediaCommon.getMediaFeatureFlag)('mediaInline', options.featureFlags),
273
243
  allowResizing: options && options.allowResizing,
274
244
  allowResizingInTables: options && options.allowResizingInTables,
275
- allowAnnotation: options && options.allowAnnotation,
276
245
  allowLinking: options && options.allowLinking,
277
246
  allowAdvancedToolBarOptions: options && options.allowAdvancedToolBarOptions,
278
247
  allowAltTextOnImages: options && options.allowAltTextOnImages,
@@ -27,7 +27,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
27
27
 
28
28
  var _react = _interopRequireDefault(require("react"));
29
29
 
30
- var _styledComponents = _interopRequireDefault(require("styled-components"));
30
+ var _react2 = require("@emotion/react");
31
31
 
32
32
  var _colors = require("@atlaskit/theme/colors");
33
33
 
@@ -72,18 +72,12 @@ exports.CONTAINER_WIDTH_IN_PX = CONTAINER_WIDTH_IN_PX;
72
72
  var MAX_ALT_TEXT_LENGTH = 510; // double tweet length
73
73
 
74
74
  exports.MAX_ALT_TEXT_LENGTH = MAX_ALT_TEXT_LENGTH;
75
-
76
- var SupportText = _styledComponents.default.p(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: ", ";\n padding: 12px 40px;\n line-height: 20px;\n border-top: 1px solid ", ";\n margin: 0;\n"])), _colors.N100, (0, _editorSharedStyles.relativeFontSizeToBase16)(12), _colors.N30);
77
-
78
- var Container = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: ", "px;\n display: flex;\n flex-direction: column;\n overflow: auto;\n line-height: 2;\n"])), CONTAINER_WIDTH_IN_PX);
79
-
80
- var InputWrapper = _styledComponents.default.section(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n line-height: 0;\n padding: 5px 0;\n align-items: center;\n"])));
81
-
82
- var ValidationWrapper = _styledComponents.default.section(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n line-height: 0;\n padding: 12px 24px 12px 0;\n margin: 0 12px 0 40px;\n border-top: 1px solid ", ";\n align-items: start;\n display: flex;\n flex-direction: column;\n"])), _colors.R400);
83
-
84
- var ButtonWrapper = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 4px 8px;\n"])));
85
-
86
- var ClearText = _styledComponents.default.span(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _colors.N80);
75
+ var supportText = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: ", ";\n padding: 12px 40px;\n line-height: 20px;\n border-top: 1px solid ", ";\n margin: 0;\n"])), _colors.N100, (0, _editorSharedStyles.relativeFontSizeToBase16)(12), _colors.N30);
76
+ var container = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: ", "px;\n display: flex;\n flex-direction: column;\n overflow: auto;\n line-height: 2;\n"])), CONTAINER_WIDTH_IN_PX);
77
+ var inputWrapper = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n line-height: 0;\n padding: 5px 0;\n align-items: center;\n"])));
78
+ var validationWrapper = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n line-height: 0;\n padding: 12px 24px 12px 0;\n margin: 0 12px 0 40px;\n border-top: 1px solid ", ";\n align-items: start;\n flex-direction: column;\n"])), _colors.R400);
79
+ var buttonWrapper = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 4px 8px;\n"])));
80
+ var clearText = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _colors.N80);
87
81
 
88
82
  var AltTextEditComponent = /*#__PURE__*/function (_React$Component) {
89
83
  (0, _inherits2.default)(AltTextEditComponent, _React$Component);
@@ -186,26 +180,30 @@ var AltTextEditComponent = /*#__PURE__*/function (_React$Component) {
186
180
  var formatMessage = this.props.intl.formatMessage;
187
181
  var showClearTextButton = this.state.showClearTextButton;
188
182
  var backButtonMessage = formatMessage(_messages.messages.back);
189
-
190
- var backButtonMessageComponent = /*#__PURE__*/_react.default.createElement(keymaps.ToolTipContent, {
183
+ var backButtonMessageComponent = (0, _react2.jsx)(keymaps.ToolTipContent, {
191
184
  description: backButtonMessage,
192
185
  keymap: keymaps.escape,
193
186
  shortcutOverride: "Esc"
194
187
  });
195
-
196
188
  var errorsList = (this.state.validationErrors || []).map(function (error, index) {
197
- return /*#__PURE__*/_react.default.createElement(_ui.ErrorMessage, {
189
+ return (0, _react2.jsx)(_ui.ErrorMessage, {
198
190
  key: index
199
191
  }, error);
200
192
  });
201
- return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(InputWrapper, null, /*#__PURE__*/_react.default.createElement(ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_Button.default, {
193
+ return (0, _react2.jsx)("div", {
194
+ css: container
195
+ }, (0, _react2.jsx)("section", {
196
+ css: inputWrapper
197
+ }, (0, _react2.jsx)("div", {
198
+ css: buttonWrapper
199
+ }, (0, _react2.jsx)(_Button.default, {
202
200
  title: formatMessage(_messages.messages.back),
203
- icon: /*#__PURE__*/_react.default.createElement(_chevronLeftLarge.default, {
201
+ icon: (0, _react2.jsx)(_chevronLeftLarge.default, {
204
202
  label: formatMessage(_messages.messages.back)
205
203
  }),
206
204
  tooltipContent: backButtonMessageComponent,
207
205
  onClick: this.closeMediaAltTextMenu
208
- })), /*#__PURE__*/_react.default.createElement(_PanelTextInput.default, {
206
+ })), (0, _react2.jsx)(_PanelTextInput.default, {
209
207
  testId: "alt-text-input",
210
208
  ariaLabel: formatMessage(_messages.messages.placeholder),
211
209
  describedById: "support-text",
@@ -217,15 +215,22 @@ var AltTextEditComponent = /*#__PURE__*/function (_React$Component) {
217
215
  onSubmit: this.closeMediaAltTextMenu,
218
216
  maxLength: MAX_ALT_TEXT_LENGTH,
219
217
  autoFocus: true
220
- }), showClearTextButton && /*#__PURE__*/_react.default.createElement(ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_Button.default, {
218
+ }), showClearTextButton && (0, _react2.jsx)("div", {
219
+ css: buttonWrapper
220
+ }, (0, _react2.jsx)(_Button.default, {
221
221
  testId: "alt-text-clear-button",
222
222
  title: formatMessage(_messages.messages.clear),
223
- icon: /*#__PURE__*/_react.default.createElement(ClearText, null, /*#__PURE__*/_react.default.createElement(_crossCircle.default, {
223
+ icon: (0, _react2.jsx)("span", {
224
+ css: clearText
225
+ }, (0, _react2.jsx)(_crossCircle.default, {
224
226
  label: formatMessage(_messages.messages.clear)
225
227
  })),
226
228
  tooltipContent: formatMessage(_messages.messages.clear),
227
229
  onClick: this.handleClearText
228
- }))), !!errorsList.length && /*#__PURE__*/_react.default.createElement(ValidationWrapper, null, errorsList), /*#__PURE__*/_react.default.createElement(SupportText, {
230
+ }))), !!errorsList.length && (0, _react2.jsx)("section", {
231
+ css: validationWrapper
232
+ }, errorsList), (0, _react2.jsx)("p", {
233
+ css: supportText,
229
234
  id: "support-text"
230
235
  }, formatMessage(_messages.messages.supportText)));
231
236
  }
@@ -292,9 +292,6 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
292
292
 
293
293
  return type === mediaSingle;
294
294
  });
295
- (0, _defineProperty2.default)(this, "hasUserAuthProvider", function () {
296
- return !!_this.uploadMediaClientConfig && !!_this.uploadMediaClientConfig.userAuthProvider;
297
- });
298
295
  (0, _defineProperty2.default)(this, "insertFile", function (mediaState, onMediaStateChanged, pickerType) {
299
296
  var _this$mediaOptions2;
300
297
 
@@ -377,11 +374,7 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
377
374
  _this.onPopupToggleCallback(false);
378
375
  });
379
376
  (0, _defineProperty2.default)(this, "shouldUseMediaPickerPopup", function () {
380
- if (!_this.mediaOptions || _this.mediaOptions && _this.mediaOptions.useMediaPickerPopup === undefined) {
381
- return _this.hasUserAuthProvider();
382
- }
383
-
384
- return !!_this.mediaOptions.useMediaPickerPopup;
377
+ return false;
385
378
  });
386
379
  (0, _defineProperty2.default)(this, "showMediaPicker", function () {
387
380
  if (_this.openMediaPickerBrowser && !_this.shouldUseMediaPickerPopup()) {
@@ -1,76 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
- exports.reducer = exports.pluginKey = exports.getPluginState = exports.createPluginState = exports.createCommand = void 0;
9
-
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
6
+ exports.pluginKey = void 0;
11
7
 
12
8
  var _prosemirrorState = require("prosemirror-state");
13
9
 
14
- var _pluginStateFactory = require("../../../utils/plugin-state-factory");
15
-
16
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
-
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
-
20
10
  var pluginKey = new _prosemirrorState.PluginKey('mediaEditorPlugin');
21
- exports.pluginKey = pluginKey;
22
-
23
- var reducer = function reducer(state, action) {
24
- switch (action.type) {
25
- case 'open':
26
- return _objectSpread(_objectSpread({}, state), {}, {
27
- editor: {
28
- identifier: action.identifier,
29
- pos: action.pos
30
- }
31
- });
32
-
33
- case 'close':
34
- return _objectSpread(_objectSpread({}, state), {}, {
35
- editor: undefined
36
- });
37
-
38
- case 'upload':
39
- return _objectSpread(_objectSpread({}, state), {}, {
40
- editor: undefined
41
- });
42
-
43
- case 'setMediaClientConfig':
44
- return _objectSpread(_objectSpread({}, state), {}, {
45
- mediaClientConfig: action.mediaClientConfig
46
- });
47
-
48
- default:
49
- return state;
50
- }
51
- };
52
-
53
- exports.reducer = reducer;
54
-
55
- var _pluginFactory = (0, _pluginStateFactory.pluginFactory)(pluginKey, reducer, {
56
- mapping: function mapping(tr, state) {
57
- if (!state.editor) {
58
- return state;
59
- } // remap the position of the editing media inside the state
60
-
61
-
62
- // remap the position of the editing media inside the state
63
- return _objectSpread(_objectSpread({}, state), {}, {
64
- editor: _objectSpread(_objectSpread({}, state.editor), {}, {
65
- pos: tr.mapping.map(state.editor.pos)
66
- })
67
- });
68
- }
69
- }),
70
- createPluginState = _pluginFactory.createPluginState,
71
- createCommand = _pluginFactory.createCommand,
72
- getPluginState = _pluginFactory.getPluginState;
73
-
74
- exports.getPluginState = getPluginState;
75
- exports.createCommand = createCommand;
76
- exports.createPluginState = createPluginState;
11
+ exports.pluginKey = pluginKey;
@@ -21,7 +21,7 @@ var _mediaCard = require("@atlaskit/media-card");
21
21
 
22
22
  var _templateObject;
23
23
 
24
- var mediaStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n & [layout^='wrap-'] + [layout^='wrap-'] {\n clear: none;\n & + p,\n & + div[class^='fabric-editor-align'],\n & + ul,\n & + ol,\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n clear: both !important;\n }\n & .", " {\n margin-left: 0;\n margin-right: 0;\n }\n }\n\n .mediaSingleView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n // overwrite default Prosemirror setting making it clear: both\n clear: inherit;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right']\n + .mediaSingleView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n\n /* Larger margins for resize handlers when at depth 0 of the document */\n & > .mediaSingleView-content-wrap {\n .richMedia-resize-handle-right {\n margin-right: -", "px;\n }\n .richMedia-resize-handle-left {\n margin-left: -", "px;\n }\n }\n }\n\n .richMedia-resize-handle-right,\n .richMedia-resize-handle-left {\n display: flex;\n flex-direction: column;\n\n /* vertical align */\n justify-content: center;\n }\n\n .richMedia-resize-handle-right {\n align-items: flex-end;\n padding-right: 12px;\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: 12px;\n margin-left: -", "px;\n }\n\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n\n border-radius: 6px;\n }\n\n .", ":hover .richMedia-resize-handle-left::after,\n .", ":hover .richMedia-resize-handle-right::after {\n background: ", ";\n }\n\n .", " .richMedia-resize-handle-right::after,\n .", " .richMedia-resize-handle-left::after,\n .", " .richMedia-resize-handle-right:hover::after,\n .", " .richMedia-resize-handle-left:hover::after,\n .", ".is-resizing .richMedia-resize-handle-right::after,\n .", ".is-resizing .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n .__resizable_base__ {\n left: unset !important;\n width: auto !important;\n height: auto !important;\n }\n\n /* Danger when top level node for smart cards / inline links */\n .danger > div > div > .media-card-frame,\n .danger > span > a {\n background-color: ", ";\n box-shadow: 0px 0px 0px ", "px\n ", ";\n transition: background-color 0s;\n transition: box-shadow 0s;\n }\n .mediaGroupView-content-wrap.danger {\n /* Media inline */\n .", "::after {\n border: 1px solid ", ";\n }\n }\n /* Danger when nested node or common */\n .danger {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* Media single video player */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* New file experience */\n .", " .", " {\n box-shadow: 0 0 0 1px ", " !important;\n }\n /* Media resize handlers */\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n /* Smart cards */\n div div .media-card-frame,\n .inlineCardView-content-wrap > span > a {\n background-color: rgb(255, 189, 173, 0.5); /* R75 with 50% opactiy */\n transition: background-color 0s;\n }\n\n div div .media-card-frame::after {\n box-shadow: none;\n }\n }\n"])), _styles.mediaSingleSharedStyle, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, _editorSharedStyles.akEditorMediaResizeHandlerPadding, _editorSharedStyles.akEditorMediaResizeHandlerPadding, _styles.richMediaClassName, _styles.richMediaClassName, _colors.N60, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _colors.B200, _editorSharedStyles.akEditorDeleteBackground, _editorSharedStyles.akEditorSelectedBorderBoldSize, _editorSharedStyles.akEditorDeleteBorder, _mediaCard.fileCardImageViewSelectedSelector, _editorSharedStyles.akEditorDeleteIconColor, _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, _editorSharedStyles.akEditorDeleteIconColor, _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, _editorSharedStyles.akEditorDeleteIconColor, _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, _editorSharedStyles.akEditorDeleteIconColor, _editorSharedStyles.akEditorDeleteIconColor);
24
+ var mediaStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n & [layout^='wrap-'] + [layout^='wrap-'] {\n clear: none;\n & + p,\n & + div[class^='fabric-editor-align'],\n & + ul,\n & + ol,\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n clear: both !important;\n }\n & .", " {\n margin-left: 0;\n margin-right: 0;\n }\n }\n\n .mediaSingleView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n // overwrite default Prosemirror setting making it clear: both\n clear: inherit;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right']\n + .mediaSingleView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n\n /* Larger margins for resize handlers when at depth 0 of the document */\n & > .mediaSingleView-content-wrap {\n .richMedia-resize-handle-right {\n margin-right: -", "px;\n }\n .richMedia-resize-handle-left {\n margin-left: -", "px;\n }\n }\n }\n\n .richMedia-resize-handle-right,\n .richMedia-resize-handle-left {\n display: flex;\n flex-direction: column;\n\n /* vertical align */\n justify-content: center;\n }\n\n .richMedia-resize-handle-right {\n align-items: flex-end;\n padding-right: 12px;\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: 12px;\n margin-left: -", "px;\n }\n\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n\n border-radius: 6px;\n }\n\n .", ":hover .richMedia-resize-handle-left::after,\n .", ":hover .richMedia-resize-handle-right::after {\n background: ", ";\n }\n\n .", " .richMedia-resize-handle-right::after,\n .", " .richMedia-resize-handle-left::after,\n .", " .richMedia-resize-handle-right:hover::after,\n .", " .richMedia-resize-handle-left:hover::after,\n .", ".is-resizing .richMedia-resize-handle-right::after,\n .", ".is-resizing .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n .__resizable_base__ {\n left: unset !important;\n width: auto !important;\n height: auto !important;\n }\n\n /* Danger when top level node for smart cards / inline links */\n .danger > div > div > .media-card-frame,\n .danger > span > a {\n background-color: ", ";\n box-shadow: 0px 0px 0px ", "px\n ", ";\n transition: background-color 0s, box-shadow 0s;\n }\n .mediaGroupView-content-wrap.danger {\n /* Media inline */\n .", "::after {\n border: 1px solid ", ";\n }\n }\n /* Danger when nested node or common */\n .danger {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* Media single video player */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* New file experience */\n .", " .", " {\n box-shadow: 0 0 0 1px ", " !important;\n }\n /* Media resize handlers */\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n /* Smart cards */\n div div .media-card-frame,\n .inlineCardView-content-wrap > span > a {\n background-color: rgb(255, 189, 173, 0.5); /* R75 with 50% opactiy */\n transition: background-color 0s;\n }\n\n div div .media-card-frame::after {\n box-shadow: none;\n }\n }\n"])), _styles.mediaSingleSharedStyle, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, _editorSharedStyles.akEditorMediaResizeHandlerPadding, _editorSharedStyles.akEditorMediaResizeHandlerPadding, _styles.richMediaClassName, _styles.richMediaClassName, _colors.N60, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _colors.B200, _editorSharedStyles.akEditorDeleteBackground, _editorSharedStyles.akEditorSelectedBorderBoldSize, _editorSharedStyles.akEditorDeleteBorder, _mediaCard.fileCardImageViewSelectedSelector, _editorSharedStyles.akEditorDeleteIconColor, _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, _editorSharedStyles.akEditorDeleteIconColor, _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, _editorSharedStyles.akEditorDeleteIconColor, _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, _editorSharedStyles.akEditorDeleteIconColor, _editorSharedStyles.akEditorDeleteIconColor);
25
25
  /* `left: unset` above is to work around Chrome bug where rendering a div with
26
26
  * that style applied inside a container that has a scroll, causes any svgs on
27
27
  * the page, without a border, that are inside a flexbox, to no longer align to
@@ -29,8 +29,6 @@ var _pluginKey = require("../pm-plugins/plugin-key");
29
29
 
30
30
  var _decoration = require("../../base/pm-plugins/decoration");
31
31
 
32
- var _annotation = require("./annotation");
33
-
34
32
  var _linking = require("./linking");
35
33
 
36
34
  var _MediaAndEmbedsToolbar = _interopRequireDefault(require("../../../ui/MediaAndEmbedsToolbar"));
@@ -212,7 +210,6 @@ var generateMediaInlineFloatingToolbar = function generateMediaInlineFloatingToo
212
210
  var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToolbar(state, intl, options, pluginState, mediaLinkingState) {
213
211
  var mediaSingle = state.schema.nodes.mediaSingle;
214
212
  var allowResizing = options.allowResizing,
215
- allowAnnotation = options.allowAnnotation,
216
213
  allowLinking = options.allowLinking,
217
214
  allowAdvancedToolBarOptions = options.allowAdvancedToolBarOptions,
218
215
  allowResizingInTables = options.allowResizingInTables,
@@ -222,16 +219,6 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
222
219
  if (allowAdvancedToolBarOptions) {
223
220
  toolbarButtons = (0, _MediaAndEmbedsToolbar.default)(state, intl, state.schema.nodes.mediaSingle, allowResizing, allowResizingInTables);
224
221
 
225
- if (toolbarButtons.length) {
226
- if (allowAnnotation) {
227
- toolbarButtons.push({
228
- type: 'custom',
229
- fallback: [],
230
- render: (0, _annotation.renderAnnotationButton)(pluginState, intl)
231
- });
232
- }
233
- }
234
-
235
222
  if (toolbarButtons.length) {
236
223
  toolbarButtons.push({
237
224
  type: 'separator'
@@ -59,7 +59,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
59
59
 
60
60
  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; } }
61
61
 
62
- var ValidationWrapper = _styledComponents.default.section(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\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"])), _colors.R400);
62
+ var ValidationWrapper = _styledComponents.default.section(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), _colors.R400);
63
63
 
64
64
  var ButtonWrapper = _styledComponents.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n padding: 4px 8px 4px 0px;\n"])));
65
65
 
@@ -30,6 +30,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
30
30
 
31
31
  var _react = _interopRequireDefault(require("react"));
32
32
 
33
+ var _react2 = require("@emotion/react");
34
+
33
35
  var _prosemirrorUtils = require("prosemirror-utils");
34
36
 
35
37
  var _mediaClient = require("@atlaskit/media-client");
@@ -430,13 +432,15 @@ var ResizableMediaSingle = /*#__PURE__*/function (_React$Component) {
430
432
  offsetLeft: this.state.offsetLeft,
431
433
  wrappedLayout: this.wrappedLayout
432
434
  };
433
- return /*#__PURE__*/_react.default.createElement(_styled.Wrapper, {
434
- layout: layout,
435
- isResized: !!pctWidth,
436
- containerWidth: containerWidth || origWidth,
437
- innerRef: this.saveWrapper,
438
- fullWidthMode: fullWidthMode
439
- }, /*#__PURE__*/_react.default.createElement(_Resizer.default, (0, _extends2.default)({}, this.props, {
435
+ return (0, _react2.jsx)("div", {
436
+ ref: this.saveWrapper,
437
+ css: (0, _styled.wrapperStyle)({
438
+ layout: layout,
439
+ isResized: !!pctWidth,
440
+ containerWidth: containerWidth || origWidth,
441
+ fullWidthMode: fullWidthMode
442
+ })
443
+ }, (0, _react2.jsx)(_Resizer.default, (0, _extends2.default)({}, this.props, {
440
444
  ratio: ratio,
441
445
  width: initialWidth,
442
446
  selected: selected,
@@ -455,7 +459,7 @@ var ResizableMediaSingle = /*#__PURE__*/function (_React$Component) {
455
459
  // This workaround adds an empty div inside the resize handler to prevent the issue.
456
460
  ,
457
461
  handleComponentFunc: function handleComponentFunc() {
458
- return /*#__PURE__*/_react.default.createElement("div", {
462
+ return (0, _react2.jsx)("div", {
459
463
  contentEditable: false
460
464
  });
461
465
  }
@@ -5,17 +5,18 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.Wrapper = void 0;
8
+ exports.wrapperStyle = void 0;
9
9
 
10
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
11
 
12
- var _ui = require("@atlaskit/editor-common/ui");
12
+ var _react = require("@emotion/react");
13
13
 
14
- var _styledComponents = _interopRequireDefault(require("styled-components"));
14
+ var _ui = require("@atlaskit/editor-common/ui");
15
15
 
16
16
  var _templateObject;
17
17
 
18
- var Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & > div {\n ", ";\n position: relative;\n clear: both;\n }\n"])), _ui.MediaSingleDimensionHelper);
18
+ var wrapperStyle = function wrapperStyle(props) {
19
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & > div {\n ", ";\n position: relative;\n clear: both;\n }\n"])), (0, _ui.MediaSingleDimensionHelper)(props));
20
+ };
19
21
 
20
- exports.Wrapper = Wrapper;
21
- Wrapper.displayName = 'ResizerWrapper';
22
+ exports.wrapperStyle = wrapperStyle;
@@ -121,23 +121,27 @@ var insertMediaAsMediaSingle = function insertMediaAsMediaSingle(view, node, inp
121
121
  exports.insertMediaAsMediaSingle = insertMediaAsMediaSingle;
122
122
 
123
123
  var insertMediaSingleNode = function insertMediaSingleNode(view, mediaState, inputMethod, collection, alignLeftOnInsert) {
124
+ var _state$selection$$fro;
125
+
124
126
  if (collection === undefined) {
125
127
  return false;
126
128
  }
127
129
 
128
130
  var state = view.state,
129
131
  dispatch = view.dispatch;
130
- var grandParent = state.selection.$from.node(-1);
132
+ var grandParentType = (_state$selection$$fro = state.selection.$from.node(-1)) === null || _state$selection$$fro === void 0 ? void 0 : _state$selection$$fro.type;
133
+ var parentType = state.selection.$from.parent.type;
131
134
  var node = createMediaSingleNode(state.schema, collection, alignLeftOnInsert)(mediaState);
132
- var shouldSplit = grandParent && grandParent.type.validContent(_prosemirrorModel.Fragment.from(node));
133
135
  var fileExtension;
134
136
 
135
137
  if (mediaState.fileName) {
136
138
  var extensionIdx = mediaState.fileName.lastIndexOf('.');
137
139
  fileExtension = extensionIdx >= 0 ? mediaState.fileName.substring(extensionIdx + 1) : undefined;
138
- }
140
+ } // should split if media is valid content for the grandparent of the selected node
141
+ // and the parent node is a paragraph
142
+
139
143
 
140
- if (shouldSplit) {
144
+ if ((0, _insert.shouldSplitSelectedNodeOnNodeInsertion)(parentType, grandParentType, node)) {
141
145
  insertNodesWithOptionalParagraph([node], {
142
146
  fileExtension: fileExtension,
143
147
  inputMethod: inputMethod
@@ -9,7 +9,7 @@ exports.mentionsStyles = void 0;
9
9
 
10
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
11
 
12
- var _styledComponents = require("styled-components");
12
+ var _react = require("@emotion/react");
13
13
 
14
14
  var _mention = require("@atlaskit/editor-common/mention");
15
15
 
@@ -19,5 +19,5 @@ var _colors = require("@atlaskit/theme/colors");
19
19
 
20
20
  var _templateObject;
21
21
 
22
- var mentionsStyles = (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), _colors.N500, _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, _editorSharedStyles.akEditorDeleteBackgroundWithOpacity, _mention.MentionSharedCssClassName.MENTION_CONTAINER, _colors.N30A, _colors.N500);
22
+ var mentionsStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), _colors.N500, _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, _editorSharedStyles.akEditorDeleteBackgroundWithOpacity, _mention.MentionSharedCssClassName.MENTION_CONTAINER, _colors.N30A, _colors.N500);
23
23
  exports.mentionsStyles = mentionsStyles;