@atlaskit/editor-core 166.0.4 → 167.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (498) hide show
  1. package/.eslintrc.js +46 -1
  2. package/CHANGELOG.md +99 -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/insert-block/index.js +1 -1
  54. package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +4 -2
  55. package/dist/cjs/plugins/layout/styles.js +1 -1
  56. package/dist/cjs/plugins/media/commands/helpers.js +10 -9
  57. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +23 -4
  58. package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +6 -0
  59. package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -3
  60. package/dist/cjs/plugins/media/pm-plugins/main.js +1 -0
  61. package/dist/cjs/plugins/media/styles.js +1 -1
  62. package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +3 -1
  63. package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +4 -2
  64. package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +3 -1
  65. package/dist/cjs/plugins/mentions/styles.js +3 -1
  66. package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +3 -1
  67. package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +4 -2
  68. package/dist/cjs/plugins/panel/index.js +1 -0
  69. package/dist/cjs/plugins/panel/nodeviews/panel.js +4 -1
  70. package/dist/cjs/plugins/panel/pm-plugins/keymaps.js +21 -3
  71. package/dist/cjs/plugins/paste/handlers.js +23 -0
  72. package/dist/cjs/plugins/paste/linkify-md-plugin.js +7 -0
  73. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +9 -1
  74. package/dist/cjs/plugins/paste/pm-plugins/main.js +27 -1
  75. package/dist/cjs/plugins/placeholder/index.js +15 -3
  76. package/dist/cjs/plugins/placeholder/styles.js +3 -1
  77. package/dist/cjs/plugins/placeholder-text/styles.js +3 -1
  78. package/dist/cjs/plugins/quick-insert/search.js +3 -1
  79. package/dist/cjs/plugins/selection/gap-cursor/styles.js +1 -1
  80. package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
  81. package/dist/cjs/plugins/status/ui/statusPicker.js +3 -3
  82. package/dist/cjs/plugins/table/index.js +14 -4
  83. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +6 -6
  84. package/dist/cjs/plugins/table/nodeviews/table.js +9 -4
  85. package/dist/cjs/plugins/table/pm-plugins/main.js +1 -4
  86. package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +118 -0
  87. package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
  88. package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
  89. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
  90. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
  91. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
  92. package/dist/cjs/plugins/table/transforms/column-width.js +1 -2
  93. package/dist/cjs/plugins/table/transforms/fix-tables.js +1 -3
  94. package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +4 -1
  95. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +3 -1
  96. package/dist/cjs/plugins/table/ui/common-styles.js +4 -2
  97. package/dist/cjs/plugins/table/ui/consts.js +14 -11
  98. package/dist/cjs/plugins/table/ui/ui-styles.js +17 -10
  99. package/dist/cjs/plugins/table/utils/decoration.js +3 -4
  100. package/dist/cjs/plugins/table/utils/paste.js +9 -9
  101. package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
  102. package/dist/cjs/plugins/type-ahead/index.js +4 -3
  103. package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +3 -1
  104. package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +4 -4
  105. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +11 -9
  106. package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +73 -3
  107. package/dist/cjs/plugins/unsupported-content/styles.js +1 -1
  108. package/dist/cjs/ui/Addon/Dropdown/styles.js +3 -1
  109. package/dist/cjs/ui/Addon/DropdownItem/styles.js +3 -1
  110. package/dist/cjs/ui/Appearance/Chromeless.js +2 -1
  111. package/dist/cjs/ui/Appearance/Comment/Comment.js +10 -3
  112. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +4 -2
  113. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +5 -2
  114. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
  115. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
  116. package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +6 -3
  117. package/dist/cjs/ui/ChromeCollapsed/styles.js +1 -1
  118. package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +21 -14
  119. package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
  120. package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +3 -1
  121. package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +3 -1
  122. package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +3 -1
  123. package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +3 -1
  124. package/dist/cjs/ui/ConfigPanel/Header.js +4 -2
  125. package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +4 -8
  126. package/dist/cjs/ui/ContentStyles/index.js +4 -2
  127. package/dist/cjs/ui/ContextPanel/index.js +3 -1
  128. package/dist/cjs/ui/DropdownMenu/index.js +5 -0
  129. package/dist/cjs/ui/ElementBrowser/InsertMenu.js +6 -4
  130. package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +4 -2
  131. package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +4 -2
  132. package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
  133. package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +3 -1
  134. package/dist/cjs/ui/ElementBrowser/components/ElementSearch.js +3 -1
  135. package/dist/cjs/ui/ElementBrowser/constants.js +3 -1
  136. package/dist/cjs/ui/FloatingToolbar/styles.js +2 -2
  137. package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +5 -3
  138. package/dist/cjs/ui/PanelTextInput/styles.js +3 -1
  139. package/dist/cjs/ui/PluginSlot/index.js +7 -4
  140. package/dist/cjs/ui/Toolbar/ToolbarInner.js +2 -1
  141. package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +5 -2
  142. package/dist/cjs/ui/ToolbarFeedback/styles.js +5 -3
  143. package/dist/cjs/ui/WithFlash/index.js +4 -2
  144. package/dist/cjs/ui/styles.js +6 -4
  145. package/dist/cjs/utils/document.js +62 -6
  146. package/dist/cjs/utils/filter/privacy-filter.js +2 -2
  147. package/dist/cjs/utils/step.js +17 -1
  148. package/dist/cjs/version-wrapper.js +1 -1
  149. package/dist/cjs/version.json +1 -1
  150. package/dist/es2019/actions/index.js +25 -1
  151. package/dist/es2019/create-editor/ReactEditorView.js +2 -0
  152. package/dist/es2019/create-editor/create-plugins-list.js +1 -2
  153. package/dist/es2019/editor.js +5 -2
  154. package/dist/es2019/keymaps/index.js +5 -1
  155. package/dist/es2019/labs/next/ContentComponents.js +7 -2
  156. package/dist/es2019/labs/next/full-page.js +11 -8
  157. package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +4 -3
  158. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +16 -4
  159. package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
  160. package/dist/es2019/plugins/analytics/types/enums.js +3 -0
  161. package/dist/es2019/plugins/base/index.js +6 -15
  162. package/dist/es2019/plugins/base/pm-plugins/better-type-history.js +1 -11
  163. package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
  164. package/dist/es2019/plugins/block-type/commands/block-type.js +25 -16
  165. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
  166. package/dist/es2019/plugins/breakout/ui/LayoutButton.js +6 -10
  167. package/dist/es2019/plugins/card/styles.js +1 -1
  168. package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
  169. package/dist/es2019/plugins/code-block/actions.js +32 -0
  170. package/dist/es2019/plugins/code-block/nodeviews/code-block.js +61 -1
  171. package/dist/es2019/plugins/code-block/pm-plugins/actions.js +2 -1
  172. package/dist/es2019/plugins/code-block/pm-plugins/main.js +37 -3
  173. package/dist/es2019/plugins/code-block/styles.js +30 -27
  174. package/dist/es2019/plugins/collab-edit/styles.js +3 -2
  175. package/dist/es2019/plugins/collab-edit/ui/styles.js +4 -3
  176. package/dist/es2019/plugins/collab-edit/utils.js +1 -0
  177. package/dist/es2019/plugins/date/ui/DatePicker/index.js +3 -2
  178. package/dist/es2019/plugins/expand/ui/styles.js +15 -14
  179. package/dist/es2019/plugins/extension/commands.js +3 -2
  180. package/dist/es2019/plugins/extension/context-panel.js +11 -3
  181. package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +5 -4
  182. package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
  183. package/dist/es2019/plugins/extension/ui/Extension/styles.js +7 -6
  184. package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -4
  185. package/dist/es2019/plugins/fake-text-cursor/styles.js +3 -2
  186. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
  187. package/dist/es2019/plugins/find-replace/styles.js +4 -4
  188. package/dist/es2019/plugins/find-replace/ui/styles.js +3 -2
  189. package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
  190. package/dist/es2019/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
  191. package/dist/es2019/plugins/floating-toolbar/ui/Separator.js +2 -1
  192. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +4 -4
  193. package/dist/es2019/plugins/floating-toolbar/ui/styles.js +11 -10
  194. package/dist/es2019/plugins/grid/styles.js +4 -2
  195. package/dist/es2019/plugins/help-dialog/ui/styles.js +10 -9
  196. package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
  197. package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +9 -1
  198. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -4
  199. package/dist/es2019/plugins/hyperlink/utils.js +43 -2
  200. package/dist/es2019/plugins/insert-block/index.js +1 -1
  201. package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
  202. package/dist/es2019/plugins/layout/styles.js +10 -7
  203. package/dist/es2019/plugins/media/commands/helpers.js +6 -8
  204. package/dist/es2019/plugins/media/nodeviews/mediaInline.js +21 -5
  205. package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
  206. package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -4
  207. package/dist/es2019/plugins/media/pm-plugins/main.js +2 -0
  208. package/dist/es2019/plugins/media/styles.js +3 -3
  209. package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
  210. package/dist/es2019/plugins/media/ui/Media/DropPlaceholder.js +4 -3
  211. package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +2 -1
  212. package/dist/es2019/plugins/mentions/styles.js +5 -4
  213. package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +2 -1
  214. package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +3 -2
  215. package/dist/es2019/plugins/panel/index.js +1 -0
  216. package/dist/es2019/plugins/panel/nodeviews/panel.js +4 -1
  217. package/dist/es2019/plugins/panel/pm-plugins/keymaps.js +22 -4
  218. package/dist/es2019/plugins/paste/handlers.js +23 -0
  219. package/dist/es2019/plugins/paste/linkify-md-plugin.js +7 -1
  220. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +4 -1
  221. package/dist/es2019/plugins/paste/pm-plugins/main.js +27 -2
  222. package/dist/es2019/plugins/placeholder/index.js +12 -1
  223. package/dist/es2019/plugins/placeholder/styles.js +3 -1
  224. package/dist/es2019/plugins/placeholder-text/styles.js +5 -4
  225. package/dist/es2019/plugins/quick-insert/search.js +1 -1
  226. package/dist/es2019/plugins/selection/gap-cursor/styles.js +9 -9
  227. package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
  228. package/dist/es2019/plugins/status/ui/statusPicker.js +3 -3
  229. package/dist/es2019/plugins/table/index.js +13 -4
  230. package/dist/es2019/plugins/table/nodeviews/TableComponent.js +6 -6
  231. package/dist/es2019/plugins/table/nodeviews/table.js +6 -2
  232. package/dist/es2019/plugins/table/pm-plugins/main.js +1 -4
  233. package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +106 -0
  234. package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
  235. package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin.js +2 -4
  236. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +3 -7
  237. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
  238. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
  239. package/dist/es2019/plugins/table/transforms/column-width.js +1 -2
  240. package/dist/es2019/plugins/table/transforms/fix-tables.js +1 -3
  241. package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +4 -2
  242. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +4 -3
  243. package/dist/es2019/plugins/table/ui/common-styles.js +29 -27
  244. package/dist/es2019/plugins/table/ui/consts.js +15 -12
  245. package/dist/es2019/plugins/table/ui/ui-styles.js +28 -23
  246. package/dist/es2019/plugins/table/utils/decoration.js +1 -4
  247. package/dist/es2019/plugins/table/utils/paste.js +9 -9
  248. package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
  249. package/dist/es2019/plugins/type-ahead/index.js +4 -3
  250. package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +2 -1
  251. package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +4 -4
  252. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
  253. package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +64 -6
  254. package/dist/es2019/plugins/unsupported-content/styles.js +1 -1
  255. package/dist/es2019/ui/Addon/Dropdown/styles.js +3 -2
  256. package/dist/es2019/ui/Addon/DropdownItem/styles.js +3 -2
  257. package/dist/es2019/ui/Appearance/Chromeless.js +2 -1
  258. package/dist/es2019/ui/Appearance/Comment/Comment.js +9 -4
  259. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +4 -2
  260. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +6 -2
  261. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
  262. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
  263. package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +7 -3
  264. package/dist/es2019/ui/ChromeCollapsed/styles.js +4 -3
  265. package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +10 -2
  266. package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
  267. package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
  268. package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
  269. package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +2 -1
  270. package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +2 -1
  271. package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
  272. package/dist/es2019/ui/ConfigPanel/Header.js +3 -2
  273. package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +4 -3
  274. package/dist/es2019/ui/ContentStyles/index.js +3 -2
  275. package/dist/es2019/ui/ContextPanel/index.js +2 -1
  276. package/dist/es2019/ui/DropdownMenu/index.js +5 -0
  277. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +6 -3
  278. package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +3 -2
  279. package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +3 -2
  280. package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
  281. package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
  282. package/dist/es2019/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
  283. package/dist/es2019/ui/ElementBrowser/components/ElementSearch.js +2 -1
  284. package/dist/es2019/ui/ElementBrowser/constants.js +3 -1
  285. package/dist/es2019/ui/FloatingToolbar/styles.js +4 -4
  286. package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +4 -3
  287. package/dist/es2019/ui/PanelTextInput/styles.js +5 -5
  288. package/dist/es2019/ui/PluginSlot/index.js +7 -4
  289. package/dist/es2019/ui/Toolbar/ToolbarInner.js +2 -1
  290. package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
  291. package/dist/es2019/ui/ToolbarFeedback/styles.js +5 -4
  292. package/dist/es2019/ui/WithFlash/index.js +4 -3
  293. package/dist/es2019/ui/styles.js +10 -9
  294. package/dist/es2019/utils/document.js +58 -5
  295. package/dist/es2019/utils/filter/privacy-filter.js +1 -1
  296. package/dist/es2019/utils/step.js +12 -1
  297. package/dist/es2019/version-wrapper.js +1 -1
  298. package/dist/es2019/version.json +1 -1
  299. package/dist/esm/actions/index.js +26 -1
  300. package/dist/esm/create-editor/ReactEditorView.js +2 -0
  301. package/dist/esm/create-editor/create-plugins-list.js +1 -2
  302. package/dist/esm/editor.js +5 -2
  303. package/dist/esm/keymaps/index.js +5 -1
  304. package/dist/esm/labs/next/ContentComponents.js +8 -4
  305. package/dist/esm/labs/next/full-page.js +11 -8
  306. package/dist/esm/nodeviews/getInlineNodeViewProducer.js +4 -3
  307. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +3 -2
  308. package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
  309. package/dist/esm/plugins/analytics/types/enums.js +3 -0
  310. package/dist/esm/plugins/base/index.js +8 -17
  311. package/dist/esm/plugins/base/pm-plugins/better-type-history.js +1 -11
  312. package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
  313. package/dist/esm/plugins/block-type/commands/block-type.js +31 -22
  314. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
  315. package/dist/esm/plugins/breakout/ui/LayoutButton.js +3 -5
  316. package/dist/esm/plugins/card/styles.js +1 -1
  317. package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
  318. package/dist/esm/plugins/code-block/actions.js +28 -0
  319. package/dist/esm/plugins/code-block/nodeviews/code-block.js +67 -1
  320. package/dist/esm/plugins/code-block/pm-plugins/actions.js +2 -1
  321. package/dist/esm/plugins/code-block/pm-plugins/main.js +39 -3
  322. package/dist/esm/plugins/code-block/styles.js +27 -23
  323. package/dist/esm/plugins/collab-edit/styles.js +3 -2
  324. package/dist/esm/plugins/collab-edit/ui/styles.js +3 -2
  325. package/dist/esm/plugins/collab-edit/utils.js +2 -0
  326. package/dist/esm/plugins/date/ui/DatePicker/index.js +2 -1
  327. package/dist/esm/plugins/expand/ui/styles.js +15 -14
  328. package/dist/esm/plugins/extension/commands.js +3 -2
  329. package/dist/esm/plugins/extension/context-panel.js +21 -7
  330. package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +5 -4
  331. package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
  332. package/dist/esm/plugins/extension/ui/Extension/styles.js +6 -5
  333. package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +3 -2
  334. package/dist/esm/plugins/fake-text-cursor/styles.js +2 -1
  335. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
  336. package/dist/esm/plugins/find-replace/styles.js +3 -3
  337. package/dist/esm/plugins/find-replace/ui/styles.js +3 -2
  338. package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
  339. package/dist/esm/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
  340. package/dist/esm/plugins/floating-toolbar/ui/Separator.js +2 -1
  341. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +5 -4
  342. package/dist/esm/plugins/floating-toolbar/ui/styles.js +11 -10
  343. package/dist/esm/plugins/grid/styles.js +2 -1
  344. package/dist/esm/plugins/help-dialog/ui/styles.js +8 -7
  345. package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
  346. package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +9 -1
  347. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +4 -3
  348. package/dist/esm/plugins/hyperlink/utils.js +44 -2
  349. package/dist/esm/plugins/insert-block/index.js +1 -1
  350. package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +3 -2
  351. package/dist/esm/plugins/layout/styles.js +1 -1
  352. package/dist/esm/plugins/media/commands/helpers.js +6 -8
  353. package/dist/esm/plugins/media/nodeviews/mediaInline.js +22 -4
  354. package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
  355. package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +4 -3
  356. package/dist/esm/plugins/media/pm-plugins/main.js +2 -0
  357. package/dist/esm/plugins/media/styles.js +1 -1
  358. package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
  359. package/dist/esm/plugins/media/ui/Media/DropPlaceholder.js +3 -2
  360. package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +2 -1
  361. package/dist/esm/plugins/mentions/styles.js +2 -1
  362. package/dist/esm/plugins/mentions/ui/InviteItem/index.js +2 -1
  363. package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +3 -2
  364. package/dist/esm/plugins/panel/index.js +1 -0
  365. package/dist/esm/plugins/panel/nodeviews/panel.js +4 -1
  366. package/dist/esm/plugins/panel/pm-plugins/keymaps.js +22 -4
  367. package/dist/esm/plugins/paste/handlers.js +21 -0
  368. package/dist/esm/plugins/paste/linkify-md-plugin.js +7 -1
  369. package/dist/esm/plugins/paste/pm-plugins/analytics.js +6 -1
  370. package/dist/esm/plugins/paste/pm-plugins/main.js +27 -2
  371. package/dist/esm/plugins/placeholder/index.js +12 -1
  372. package/dist/esm/plugins/placeholder/styles.js +2 -1
  373. package/dist/esm/plugins/placeholder-text/styles.js +2 -1
  374. package/dist/esm/plugins/quick-insert/search.js +3 -1
  375. package/dist/esm/plugins/selection/gap-cursor/styles.js +1 -1
  376. package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
  377. package/dist/esm/plugins/status/ui/statusPicker.js +2 -2
  378. package/dist/esm/plugins/table/index.js +13 -4
  379. package/dist/esm/plugins/table/nodeviews/TableComponent.js +6 -6
  380. package/dist/esm/plugins/table/nodeviews/table.js +6 -2
  381. package/dist/esm/plugins/table/pm-plugins/main.js +1 -4
  382. package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +102 -0
  383. package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
  384. package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
  385. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
  386. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
  387. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
  388. package/dist/esm/plugins/table/transforms/column-width.js +1 -2
  389. package/dist/esm/plugins/table/transforms/fix-tables.js +1 -3
  390. package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +3 -1
  391. package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +2 -1
  392. package/dist/esm/plugins/table/ui/common-styles.js +4 -2
  393. package/dist/esm/plugins/table/ui/consts.js +15 -12
  394. package/dist/esm/plugins/table/ui/ui-styles.js +15 -10
  395. package/dist/esm/plugins/table/utils/decoration.js +3 -4
  396. package/dist/esm/plugins/table/utils/paste.js +9 -9
  397. package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
  398. package/dist/esm/plugins/type-ahead/index.js +4 -3
  399. package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +2 -1
  400. package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +4 -4
  401. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
  402. package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +71 -5
  403. package/dist/esm/plugins/unsupported-content/styles.js +1 -1
  404. package/dist/esm/ui/Addon/Dropdown/styles.js +2 -1
  405. package/dist/esm/ui/Addon/DropdownItem/styles.js +2 -1
  406. package/dist/esm/ui/Appearance/Chromeless.js +2 -1
  407. package/dist/esm/ui/Appearance/Comment/Comment.js +10 -3
  408. package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -2
  409. package/dist/esm/ui/Appearance/FullPage/FullPage.js +6 -2
  410. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
  411. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
  412. package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +5 -3
  413. package/dist/esm/ui/ChromeCollapsed/styles.js +1 -1
  414. package/dist/esm/ui/ConfigPanel/ConfigPanel.js +21 -14
  415. package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
  416. package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
  417. package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
  418. package/dist/esm/ui/ConfigPanel/Fields/Expand.js +2 -1
  419. package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +2 -1
  420. package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
  421. package/dist/esm/ui/ConfigPanel/Header.js +3 -2
  422. package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +3 -2
  423. package/dist/esm/ui/ContentStyles/index.js +3 -2
  424. package/dist/esm/ui/ContextPanel/index.js +2 -1
  425. package/dist/esm/ui/DropdownMenu/index.js +5 -0
  426. package/dist/esm/ui/ElementBrowser/InsertMenu.js +5 -4
  427. package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +3 -2
  428. package/dist/esm/ui/ElementBrowser/components/CategoryList.js +3 -2
  429. package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +11 -5
  430. package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
  431. package/dist/esm/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
  432. package/dist/esm/ui/ElementBrowser/components/ElementSearch.js +2 -1
  433. package/dist/esm/ui/ElementBrowser/constants.js +3 -1
  434. package/dist/esm/ui/FloatingToolbar/styles.js +3 -3
  435. package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +4 -3
  436. package/dist/esm/ui/PanelTextInput/styles.js +4 -3
  437. package/dist/esm/ui/PluginSlot/index.js +7 -4
  438. package/dist/esm/ui/Toolbar/ToolbarInner.js +2 -1
  439. package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
  440. package/dist/esm/ui/ToolbarFeedback/styles.js +4 -3
  441. package/dist/esm/ui/WithFlash/index.js +3 -2
  442. package/dist/esm/ui/styles.js +5 -4
  443. package/dist/esm/utils/document.js +59 -5
  444. package/dist/esm/utils/filter/privacy-filter.js +1 -1
  445. package/dist/esm/utils/step.js +12 -1
  446. package/dist/esm/version-wrapper.js +1 -1
  447. package/dist/esm/version.json +1 -1
  448. package/dist/types/actions/index.d.ts +6 -0
  449. package/dist/types/labs/next/ContentComponents.d.ts +7 -1
  450. package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +1 -0
  451. package/dist/types/plugins/analytics/types/enums.d.ts +3 -0
  452. package/dist/types/plugins/analytics/types/general-events.d.ts +7 -1
  453. package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +1 -1
  454. package/dist/types/plugins/code-block/actions.d.ts +2 -0
  455. package/dist/types/plugins/code-block/nodeviews/code-block.d.ts +2 -0
  456. package/dist/types/plugins/code-block/pm-plugins/actions.d.ts +1 -0
  457. package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +1 -0
  458. package/dist/types/plugins/extension/commands.d.ts +1 -1
  459. package/dist/types/plugins/extension/types.d.ts +1 -0
  460. package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
  461. package/dist/types/plugins/find-replace/styles.d.ts +0 -2
  462. package/dist/types/plugins/hyperlink/utils.d.ts +8 -0
  463. package/dist/types/plugins/media/commands/helpers.d.ts +2 -0
  464. package/dist/types/plugins/media/nodeviews/mediaNodeView/media.d.ts +1 -0
  465. package/dist/types/plugins/media/pm-plugins/main.d.ts +2 -1
  466. package/dist/types/plugins/media/pm-plugins/types.d.ts +2 -1
  467. package/dist/types/plugins/paste/handlers.d.ts +1 -0
  468. package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +1 -0
  469. package/dist/types/plugins/table/commands/misc.d.ts +0 -1
  470. package/dist/types/plugins/table/index.d.ts +0 -1
  471. package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +1 -0
  472. package/dist/types/plugins/table/nodeviews/types.d.ts +0 -1
  473. package/dist/types/plugins/table/pm-plugins/main.d.ts +1 -1
  474. package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +15 -0
  475. package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
  476. package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +1 -1
  477. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +1 -2
  478. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -1
  479. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +0 -1
  480. package/dist/types/plugins/table/transforms/fix-tables.d.ts +0 -1
  481. package/dist/types/plugins/table/types.d.ts +0 -1
  482. package/dist/types/plugins/table/ui/consts.d.ts +9 -9
  483. package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +2 -0
  484. package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +4 -4
  485. package/dist/types/types/editor-appearance-component.d.ts +0 -1
  486. package/dist/types/types/editor-props.d.ts +4 -0
  487. package/dist/types/types/feature-flags.d.ts +8 -0
  488. package/dist/types/types/ui-components.d.ts +1 -0
  489. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -0
  490. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -0
  491. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +3 -2
  492. package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +3 -2
  493. package/dist/types/ui/PluginSlot/index.d.ts +1 -0
  494. package/dist/types/ui/Toolbar/toolbar-types.d.ts +1 -0
  495. package/dist/types/utils/document.d.ts +1 -0
  496. package/dist/types/utils/step.d.ts +1 -0
  497. package/docs/0-intro.tsx +12 -4
  498. package/package.json +23 -23
@@ -3,10 +3,11 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
3
3
  var _templateObject, _templateObject2;
4
4
 
5
5
  import { css } from '@emotion/react';
6
- import { N400, N800 } from '@atlaskit/theme/colors';
7
- import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles'; // Normal .className gets overridden by input[type=text] hence this hack to produce input.className
6
+ import { N400, N100 } from '@atlaskit/theme/colors';
7
+ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
8
+ import { token } from '@atlaskit/tokens'; // Normal .className gets overridden by input[type=text] hence this hack to produce input.className
8
9
 
9
- export var panelTextInput = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n input& {\n background: transparent;\n border: 0;\n border-radius: 0;\n box-sizing: content-box;\n color: ", ";\n flex-grow: 1;\n font-size: ", ";\n line-height: 20px;\n padding: 0;\n min-width: 145px;\n\n /* Hides IE10+ built-in [x] clear input button */\n &::-ms-clear {\n display: none;\n }\n\n &:focus {\n outline: none;\n }\n\n &::placeholder {\n color: ", ";\n opacity: 0.5;\n }\n }\n"])), N400, relativeFontSizeToBase16(13), N800);
10
+ export var panelTextInput = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n input& {\n background: transparent;\n border: 0;\n border-radius: 0;\n box-sizing: content-box;\n color: ", ";\n flex-grow: 1;\n font-size: ", ";\n line-height: 20px;\n padding: 0;\n min-width: 145px;\n\n /* Hides IE10+ built-in [x] clear input button */\n &::-ms-clear {\n display: none;\n }\n\n &:focus {\n outline: none;\n }\n\n &::placeholder {\n color: ", ";\n }\n }\n"])), token('color.text.subtle', N400), relativeFontSizeToBase16(13), token('color.text.subtlest', N100));
10
11
  export var panelTextInputWithCustomWidth = function panelTextInputWithCustomWidth(width) {
11
12
  return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n input& {\n width: ", "px;\n }\n"])), width);
12
13
  };
@@ -79,8 +79,9 @@ var PluginSlot = /*#__PURE__*/function (_React$Component) {
79
79
  popupsBoundariesElement = _this$props.popupsBoundariesElement,
80
80
  popupsScrollableElement = _this$props.popupsScrollableElement,
81
81
  containerElement = _this$props.containerElement,
82
- disabled = _this$props.disabled;
83
- return !(nextProps.editorView === editorView && nextProps.editorActions === editorActions && nextProps.items === items && nextProps.providerFactory === providerFactory && nextProps.eventDispatcher === eventDispatcher && nextProps.popupsMountPoint === popupsMountPoint && nextProps.popupsBoundariesElement === popupsBoundariesElement && nextProps.popupsScrollableElement === popupsScrollableElement && nextProps.containerElement === containerElement && nextProps.disabled === disabled);
82
+ disabled = _this$props.disabled,
83
+ wrapperElement = _this$props.wrapperElement;
84
+ return !(nextProps.editorView === editorView && nextProps.editorActions === editorActions && nextProps.items === items && nextProps.providerFactory === providerFactory && nextProps.eventDispatcher === eventDispatcher && nextProps.popupsMountPoint === popupsMountPoint && nextProps.popupsBoundariesElement === popupsBoundariesElement && nextProps.popupsScrollableElement === popupsScrollableElement && nextProps.containerElement === containerElement && nextProps.disabled === disabled && nextProps.wrapperElement === wrapperElement);
84
85
  }
85
86
  }, {
86
87
  key: "componentDidMount",
@@ -115,7 +116,8 @@ var PluginSlot = /*#__PURE__*/function (_React$Component) {
115
116
  popupsScrollableElement = _this$props2.popupsScrollableElement,
116
117
  containerElement = _this$props2.containerElement,
117
118
  disabled = _this$props2.disabled,
118
- dispatchAnalyticsEvent = _this$props2.dispatchAnalyticsEvent;
119
+ dispatchAnalyticsEvent = _this$props2.dispatchAnalyticsEvent,
120
+ wrapperElement = _this$props2.wrapperElement;
119
121
 
120
122
  if (!items || !editorView) {
121
123
  return null;
@@ -141,7 +143,8 @@ var PluginSlot = /*#__PURE__*/function (_React$Component) {
141
143
  popupsBoundariesElement: popupsBoundariesElement,
142
144
  popupsScrollableElement: popupsScrollableElement,
143
145
  containerElement: containerElement,
144
- disabled: disabled
146
+ disabled: disabled,
147
+ wrapperElement: wrapperElement
145
148
  });
146
149
  return element && /*#__PURE__*/React.cloneElement(element, props);
147
150
  })));
@@ -75,7 +75,8 @@ export var ToolbarInner = /*#__PURE__*/function (_React$Component) {
75
75
  isToolbarReducedSpacing: isToolbarReducedSpacing,
76
76
  containerElement: containerElement,
77
77
  isLastItem: key === items.length - 1,
78
- dispatchAnalyticsEvent: dispatchAnalyticsEvent
78
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
79
+ wrapperElement: null
79
80
  });
80
81
  return element && /*#__PURE__*/React.cloneElement(element, props);
81
82
  }));
@@ -13,6 +13,7 @@ import { useElementWidth } from './hooks';
13
13
  import { widthToToolbarSize, toolbarSizeToWidth } from './toolbar-size';
14
14
  import { Toolbar } from './Toolbar';
15
15
  import { ToolbarSize } from './types';
16
+ import { isFullPage } from '../../utils/is-full-page';
16
17
  var toolbar = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n position: relative;\n @media (max-width: ", "px) {\n grid-column: 1 / 2;\n grid-row: 2;\n width: calc(100% - 30px);\n margin: 0 15px;\n }\n"])), akEditorMobileMaxWidth);
17
18
  export var ToolbarWithSizeDetector = function ToolbarWithSizeDetector(props) {
18
19
  var ref = /*#__PURE__*/React.createRef();
@@ -27,10 +28,11 @@ export var ToolbarWithSizeDetector = function ToolbarWithSizeDetector(props) {
27
28
  });
28
29
  var toolbarSize = typeof width === 'undefined' && typeof elementWidth === 'undefined' ? undefined : widthToToolbarSize(width || elementWidth, props.appearance);
29
30
  var toolbarStyle = useMemo(function () {
30
- var toolbarMinWidth = toolbarSizeToWidth(ToolbarSize.M, props.appearance);
31
+ var toolbarWidth = isFullPage(props.appearance) && props.twoLineEditorToolbar ? ToolbarSize.S : ToolbarSize.M;
32
+ var toolbarMinWidth = toolbarSizeToWidth(toolbarWidth, props.appearance);
31
33
  var minWidth = "min-width: ".concat(props.hasMinWidth ? toolbarMinWidth : '254', "px");
32
34
  return [toolbar, minWidth];
33
- }, [props.appearance, props.hasMinWidth]);
35
+ }, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
34
36
  return jsx("div", {
35
37
  css: toolbarStyle
36
38
  }, jsx(WidthObserver, {
@@ -5,10 +5,11 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
5
5
  import { css } from '@emotion/react';
6
6
  import { borderRadius } from '@atlaskit/theme/constants';
7
7
  import { N60A, N400, P400 } from '@atlaskit/theme/colors';
8
+ import { token } from '@atlaskit/tokens';
8
9
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
9
10
  export var buttonContent = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n height: 24px;\n line-height: 24px;\n min-width: 70px;\n"])));
10
11
  export var wrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n margin-right: 0;\n"])));
11
- export var confirmationPopup = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: #fff;\n border-radius: ", "px;\n box-shadow: 0 4px 8px -2px ", ", 0 0 1px ", ";\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n overflow: auto;\n max-height: none;\n height: 410px;\n width: 280px;\n"])), borderRadius(), N60A, N60A);
12
- export var confirmationText = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: ", ";\n word-spacing: 4px;\n line-height: 22px;\n color: ", ";\n margin-top: 30px;\n padding: 20px;\n & > div {\n width: 240px;\n }\n & > div:first-of-type {\n margin-bottom: 12px;\n }\n & > div:nth-of-type(2) {\n margin-bottom: 20px;\n }\n"])), relativeFontSizeToBase16(14), N400);
13
- export var confirmationHeader = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 100px;\n width: 100%;\n display: inline-block;\n"])), P400);
12
+ export var confirmationPopup = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n overflow: auto;\n max-height: none;\n height: 410px;\n width: 280px;\n"])), token('elevation.surface.overlay', '#fff'), borderRadius(), token('elevation.shadow.overlay', "0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A)));
13
+ export var confirmationText = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: ", ";\n word-spacing: 4px;\n line-height: 22px;\n color: ", ";\n margin-top: 30px;\n padding: 20px;\n & > div {\n width: 240px;\n }\n & > div:first-of-type {\n margin-bottom: 12px;\n }\n & > div:nth-of-type(2) {\n margin-bottom: 20px;\n }\n"])), relativeFontSizeToBase16(14), token('color.text.subtle', N400));
14
+ export var confirmationHeader = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 100px;\n width: 100%;\n display: inline-block;\n"])), token('color.background.discovery.bold', P400));
14
15
  export var confirmationImg = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100px;\n display: block;\n margin: 25px auto 0 auto;\n"])));
@@ -17,8 +17,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
17
17
  import React from 'react';
18
18
  import { css, jsx, keyframes } from '@emotion/react';
19
19
  import { R100 } from '@atlaskit/theme/colors';
20
- var pulseBackground = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 50% {\n background-color: ", ";\n }\n"])), R100);
21
- var pulseBackgroundReverse = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n background-color: ", ";\n }\n 50% {\n background-color: auto;\n }\n 100% {\n background-color: ", ";\n }\n"])), R100, R100);
20
+ import { token } from '@atlaskit/tokens';
21
+ var pulseBackground = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 50% {\n background-color: ", ";\n }\n"])), token('color.blanket.danger', R100));
22
+ var pulseBackgroundReverse = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n background-color: ", ";\n }\n 50% {\n background-color: auto;\n }\n 100% {\n background-color: ", ";\n }\n"])), token('color.blanket.danger', R100), token('color.blanket.danger', R100));
22
23
  var flashWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &.-flash > div {\n animation: 0.25s ease-in-out ", ";\n }\n\n & > div {\n animation: 'none';\n }\n"])), pulseBackgroundReverse);
23
24
  var flashWrapperAnimated = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n\n & > div {\n animation: 0.25s ease-in-out ", ";\n }\n"])), flashWrapper, pulseBackground);
24
25
 
@@ -5,10 +5,11 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
5
5
  import { css } from '@emotion/react';
6
6
  import { gridSize, borderRadius } from '@atlaskit/theme/constants';
7
7
  import { N30, N100 } from '@atlaskit/theme/colors';
8
+ import { token } from '@atlaskit/tokens';
8
9
  import { akEditorMobileMaxWidth, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
9
10
  var akGridSize = gridSize() + 'px';
10
11
  export var buttonGroupStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n\n & > div {\n display: flex;\n }\n"])));
11
- export var separatorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n width: 1px;\n height: 24px;\n display: inline-block;\n margin: 0 8px;\n"])), N30);
12
+ export var separatorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n width: 1px;\n height: 24px;\n display: inline-block;\n margin: 0 8px;\n"])), token('color.border', N30));
12
13
  export var wrapperStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n > div,\n > span {\n display: flex;\n }\n\n > div > div {\n display: flex;\n }\n\n margin-left: 0;\n min-width: auto;\n"])));
13
14
  export var wrapperSmallStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-left: 4px;\n min-width: 40px;\n"])));
14
15
  export var expandIconWrapperStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: -8px;\n"])));
@@ -16,10 +17,10 @@ export var triggerWrapperStyles = css(_templateObject6 || (_templateObject6 = _t
16
17
  export var buttonContentStyle = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n min-width: 80px;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n flex-direction: column;\n padding: 6px;\n"])));
17
18
  export var buttonContentReducedSpacingStyle = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding: 8px;\n"]))); // Taken from the style of inline dialog components
18
19
 
19
- export var dropShadow = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n box-shadow: 0 0 1px rgba(9, 30, 66, 0.31),\n 0 4px 8px -2px rgba(9, 30, 66, 0.25);\n"]))); // TODO change to use emotion css
20
+ export var dropShadow = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n box-shadow: ", ";\n"])), token('elevation.shadow.overlay', "0 0 1px rgba(9, 30, 66, 0.31),\n 0 4px 8px -2px rgba(9, 30, 66, 0.25)")); // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
20
21
 
21
- export var scrollbarStyles = "\n -ms-overflow-style: -ms-autohiding-scrollbar;\n\n &::-webkit-scrollbar {\n height: ".concat(akGridSize, ";\n width: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-corner {\n display: none;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0);\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.2);\n border-radius: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n }\n");
22
- export var shortcutStyle = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: rgba(223, 225, 229, 0.5); /* N60 at 50% */\n color: ", ";\n border-radius: ", "px;\n padding: 4px;\n line-height: 12px;\n font-size: ", ";\n align-self: flex-end;\n @media (max-width: ", "px) {\n display: none;\n }\n"])), N100, borderRadius(), relativeFontSizeToBase16(11.67), akEditorMobileMaxWidth);
22
+ export var scrollbarStyles = "\n -ms-overflow-style: -ms-autohiding-scrollbar;\n\n &::-webkit-scrollbar {\n height: ".concat(akGridSize, ";\n width: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-corner {\n display: none;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ").concat(token('color.background.neutral.subtle', 'rgba(0, 0, 0, 0)'), ";\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: ").concat(token('color.background.neutral.bold', 'rgba(0, 0, 0, 0.2)'), ";\n border-radius: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ").concat(token('color.background.neutral.bold.hovered', 'rgba(0, 0, 0, 0.4)'), ";\n }\n");
23
+ export var shortcutStyle = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: ", "; /* N60 at 50% */\n color: ", ";\n border-radius: ", "px;\n padding: 4px;\n line-height: 12px;\n font-size: ", ";\n align-self: flex-end;\n @media (max-width: ", "px) {\n display: none;\n }\n"])), token('color.background.neutral', 'rgba(223, 225, 229, 0.5)'), token('color.text.subtle', N100), borderRadius(), relativeFontSizeToBase16(11.67), akEditorMobileMaxWidth);
23
24
  export var clickSelectWrapperStyle = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n user-select: all;\n"])));
24
25
  export var cellColourPreviewStyles = function cellColourPreviewStyles(selectedColor) {
25
26
  return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n &::before {\n background: ", ";\n }\n"])), selectedColor);
@@ -1,6 +1,6 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import { Node } from 'prosemirror-model';
3
- import { transformMediaLinkMarks, transformTextLinkCodeMarks } from '@atlaskit/adf-utils';
3
+ import { transformMediaLinkMarks, transformTextLinkCodeMarks, transformDedupeMarks, transformNodesMissingContent, transformIndentationMarks } from '@atlaskit/adf-utils/transforms';
4
4
  import { sanitizeNodeForPrivacy } from '../utils/filter/privacy-filter';
5
5
  import { validateADFEntity, findAndTrackUnsupportedContentNodes } from '@atlaskit/editor-common/utils';
6
6
  import { getBreakoutMode } from './node-width';
@@ -78,6 +78,9 @@ export function isEmptyDocument(node) {
78
78
  export function hasDocAsParent($anchor) {
79
79
  return $anchor.depth === 1;
80
80
  }
81
+ export function isProseMirrorSchemaCheckError(error) {
82
+ return error instanceof RangeError && (!!error.message.match(/^Invalid collection of marks for node/) || !!error.message.match(/^Invalid content for node/));
83
+ }
81
84
  export function isInEmptyLine(state) {
82
85
  var selection = state.selection;
83
86
  var _ref = selection,
@@ -188,9 +191,10 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
188
191
  // and preserving code marks during content changes.
189
192
 
190
193
 
191
- var transformResult = transformTextLinkCodeMarks(node);
192
- transformedAdf = transformResult.transformedAdf;
193
- isTransformed = transformResult.isTransformed;
194
+ var _transformTextLinkCod = transformTextLinkCodeMarks(transformedAdf);
195
+
196
+ transformedAdf = _transformTextLinkCod.transformedAdf;
197
+ isTransformed = _transformTextLinkCod.isTransformed;
194
198
 
195
199
  if (isTransformed && dispatchAnalyticsEvent) {
196
200
  dispatchAnalyticsEvent({
@@ -200,6 +204,51 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
200
204
  });
201
205
  }
202
206
 
207
+ var discardedMarks = [];
208
+
209
+ var _transformDedupeMarks = transformDedupeMarks(transformedAdf);
210
+
211
+ transformedAdf = _transformDedupeMarks.transformedAdf;
212
+ isTransformed = _transformDedupeMarks.isTransformed;
213
+ discardedMarks = _transformDedupeMarks.discardedMarks;
214
+
215
+ if (isTransformed && dispatchAnalyticsEvent) {
216
+ dispatchAnalyticsEvent({
217
+ action: ACTION.DEDUPE_MARKS_TRANSFORMED,
218
+ actionSubject: ACTION_SUBJECT.EDITOR,
219
+ eventType: EVENT_TYPE.OPERATIONAL,
220
+ attributes: {
221
+ discardedMarks: discardedMarks
222
+ }
223
+ });
224
+ }
225
+
226
+ var _transformNodesMissin = transformNodesMissingContent(transformedAdf);
227
+
228
+ transformedAdf = _transformNodesMissin.transformedAdf;
229
+ isTransformed = _transformNodesMissin.isTransformed;
230
+
231
+ if (isTransformed && dispatchAnalyticsEvent) {
232
+ dispatchAnalyticsEvent({
233
+ action: ACTION.NODES_MISSING_CONTENT_TRANSFORMED,
234
+ actionSubject: ACTION_SUBJECT.EDITOR,
235
+ eventType: EVENT_TYPE.OPERATIONAL
236
+ });
237
+ }
238
+
239
+ var _transformIndentation = transformIndentationMarks(transformedAdf);
240
+
241
+ transformedAdf = _transformIndentation.transformedAdf;
242
+ isTransformed = _transformIndentation.isTransformed;
243
+
244
+ if (isTransformed && dispatchAnalyticsEvent) {
245
+ dispatchAnalyticsEvent({
246
+ action: ACTION.INDENTATION_MARKS_TRANSFORMED,
247
+ actionSubject: ACTION_SUBJECT.EDITOR,
248
+ eventType: EVENT_TYPE.OPERATIONAL
249
+ });
250
+ }
251
+
203
252
  var entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent);
204
253
  var newEntity = maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent);
205
254
  var parsedDoc = Node.fromJSON(schema, newEntity); // throws an error if the document is invalid
@@ -218,7 +267,7 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
218
267
  });
219
268
  }
220
269
 
221
- return;
270
+ throw err;
222
271
  }
223
272
 
224
273
  if (dispatchAnalyticsEvent) {
@@ -240,6 +289,11 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
240
289
 
241
290
 
242
291
  console.error("Error processing document:\n".concat(e.message, "\n\n"), JSON.stringify(node));
292
+
293
+ if (isProseMirrorSchemaCheckError(e)) {
294
+ throw e;
295
+ }
296
+
243
297
  return;
244
298
  }
245
299
  }
@@ -4,7 +4,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
4
4
 
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
 
7
- import { traverse } from '@atlaskit/adf-utils';
7
+ import { traverse } from '@atlaskit/adf-utils/traverse';
8
8
  import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
9
9
 
10
10
  /**
@@ -1,3 +1,4 @@
1
+ import { ReplaceAroundStep, ReplaceStep } from 'prosemirror-transform';
1
2
  export var stepHasSlice = function stepHasSlice(step) {
2
3
  return step && step.hasOwnProperty('slice');
3
4
  };
@@ -23,4 +24,14 @@ export function stepAddsOneOf(step, nodeTypes) {
23
24
  return !adds;
24
25
  });
25
26
  return adds;
26
- }
27
+ }
28
+ export var extractSliceFromStep = function extractSliceFromStep(step) {
29
+ if (!(step instanceof ReplaceStep) && !(step instanceof ReplaceAroundStep)) {
30
+ return null;
31
+ } // @ts-ignore This is by design. Slice is a private property, but accesible, from ReplaceStep.
32
+ // However, we need to read it to found if the step was adding a newline
33
+
34
+
35
+ var slice = step.slice;
36
+ return slice;
37
+ };
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "166.0.4";
2
+ export var version = "167.0.2";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "166.0.4",
3
+ "version": "167.0.2",
4
4
  "sideEffects": false
5
5
  }
@@ -12,6 +12,7 @@ export interface EditorActionsOptions<T> {
12
12
  clear(): boolean;
13
13
  getValue(): Promise<T | JSONDocNode | undefined>;
14
14
  getNodeByLocalId(id: string): Node | undefined;
15
+ getSelectedNode(): Node | undefined;
15
16
  replaceDocument(rawValue: any): boolean;
16
17
  replaceSelection(rawValue: Node | Object | string): boolean;
17
18
  appendText(text: string): boolean;
@@ -37,6 +38,11 @@ export default class EditorActions<T = any> implements EditorActionsOptions<T> {
37
38
  __temporaryFixForConfigPanel(): Promise<void>;
38
39
  getValue(): Promise<JSONDocNode | T | undefined>;
39
40
  getNodeByLocalId(id: string): Node | undefined;
41
+ /**
42
+ * This method will return the currently selected `Node` if the selection is a `Node`.
43
+ * Otherwise, if the selection is textual or a non-selectable `Node` within another selectable `Node`, the closest selectable parent `Node` will be returned.
44
+ */
45
+ getSelectedNode(): Node | undefined;
40
46
  isDocumentEmpty(): boolean;
41
47
  replaceDocument(rawValue: any, shouldScrollToBottom?: boolean,
42
48
  /** @deprecated [ED-14158] shouldAddToHistory is not being used in this function */
@@ -1,2 +1,8 @@
1
1
  /// <reference types="react" />
2
- export declare function ContentComponents(disabled?: any): JSX.Element | null;
2
+ declare type ContentComponentsProps = {
3
+ disabled?: any;
4
+ wrapperElement: HTMLElement | null;
5
+ containerElement: HTMLElement | null;
6
+ };
7
+ export declare function ContentComponents({ disabled, wrapperElement, containerElement, }: ContentComponentsProps): JSX.Element | null;
8
+ export {};
@@ -8,6 +8,7 @@ export declare type InlineNodeViewComponentProps = {
8
8
  node: PMNode;
9
9
  };
10
10
  declare type InlineNodeViewComponent<ExtraComponentProps> = React.ComponentType<InlineNodeViewComponentProps & ExtraComponentProps>;
11
+ export declare const inlineNodeViewClassname = "inlineNodeView";
11
12
  declare type NodeViewProducer = NonNullable<EditorProps['nodeViews']>[string];
12
13
  declare type NodeViewParams = {
13
14
  node: Parameters<NodeViewProducer>[0];
@@ -79,6 +79,9 @@ export declare enum ACTION {
79
79
  SYNCHRONY_ENTITY_ERROR = "synchronyEntityError",
80
80
  SYNCHRONY_ERROR = "synchronyError",
81
81
  TEXT_LINK_MARK_TRANSFORMED = "textLinkMarkTransformed",
82
+ DEDUPE_MARKS_TRANSFORMED = "dedupeMarksTransformed",
83
+ NODES_MISSING_CONTENT_TRANSFORMED = "nodesMissingContentTransformed",
84
+ INDENTATION_MARKS_TRANSFORMED = "indentationMarksTransformed",
82
85
  TOGGLE_EXPAND = "toggleExpand",
83
86
  TRANSACTION_DISPATCHED = "transactionDispatched",
84
87
  TRANSACTION_MUTATED_AFTER_DISPATCH = "transactionMutatedAfterDispatched",
@@ -6,6 +6,7 @@ import { FeatureFlagKey } from '../../../types/feature-flags';
6
6
  import { AnnotationAEP } from './inline-comment-events';
7
7
  import { RichMediaLayout } from '@atlaskit/adf-schema';
8
8
  import { SEVERITY } from '@atlaskit/editor-common/utils';
9
+ import type { ADFEntityMark } from '@atlaskit/adf-utils/types';
9
10
  export declare enum PLATFORMS {
10
11
  NATIVE = "mobileNative",
11
12
  HYBRID = "mobileHybrid",
@@ -168,5 +169,10 @@ declare type CodeBlockLanguageSelectedAEP = TrackAEP<ACTION.LANGUAGE_SELECTED, A
168
169
  }, undefined>;
169
170
  declare type MediaLinkTransformedAEP = OperationalAEP<ACTION.MEDIA_LINK_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
170
171
  declare type TextLinkCodeMarkTransformedAEP = OperationalAEP<ACTION.TEXT_LINK_MARK_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
171
- export declare type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP;
172
+ declare type DedupeMarksTransformedAEP = OperationalAEP<ACTION.DEDUPE_MARKS_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, {
173
+ discardedMarks: ADFEntityMark[];
174
+ }, undefined>;
175
+ declare type IndentationMarksTransformedAEP = OperationalAEP<ACTION.INDENTATION_MARKS_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
176
+ declare type NodesMissingContentTransformedAEP = OperationalAEP<ACTION.NODES_MISSING_CONTENT_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
177
+ export declare type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP;
172
178
  export {};
@@ -6,7 +6,7 @@ export declare const inlineCursorTargetStateKey: PluginKey<any, any>;
6
6
  export declare const isInlineNodeView: (node: Node | null | undefined) => boolean | null | undefined;
7
7
  export interface InlineCursorTargetState {
8
8
  cursorTarget?: {
9
- decorations: [Decoration | null, Decoration | null];
9
+ decorations: (Decoration | null)[];
10
10
  positions: {
11
11
  from: number;
12
12
  to: number;
@@ -7,3 +7,5 @@ export declare const removeCodeBlock: Command;
7
7
  export declare const changeLanguage: (language: string) => Command;
8
8
  export declare const copyContentToClipboard: Command;
9
9
  export declare const resetCopiedState: Command;
10
+ export declare const ignoreFollowingMutations: Command;
11
+ export declare const resetShouldIgnoreFollowingMutations: Command;
@@ -9,6 +9,8 @@ export declare class CodeBlockView {
9
9
  getPos: getPosHandlerNode;
10
10
  view: EditorView;
11
11
  constructor(node: Node, view: EditorView, getPos: getPosHandlerNode);
12
+ updateDOMAndSelection(savedInnerHTML: string, newCursorPosition: number): void;
13
+ coalesceDOMElements(): void;
12
14
  private ensureLineNumbers;
13
15
  update(node: Node): boolean;
14
16
  ignoreMutation(record: MutationRecord | {
@@ -1,3 +1,4 @@
1
1
  export declare const ACTIONS: {
2
2
  SET_COPIED_TO_CLIPBOARD: string;
3
+ SET_SHOULD_IGNORE_FOLLOWING_MUTATIONS: string;
3
4
  };
@@ -4,6 +4,7 @@ export declare type CodeBlockState = {
4
4
  pos: number | null;
5
5
  contentCopied: boolean;
6
6
  isNodeSelected: boolean;
7
+ shouldIgnoreFollowingMutations: boolean;
7
8
  };
8
9
  export declare const getPluginState: (state: EditorState) => CodeBlockState;
9
10
  export declare const setPluginState: (stateProps: Object) => (state: EditorState, dispatch: CommandDispatch) => boolean;
@@ -4,7 +4,7 @@ import { Parameters, TransformBefore, TransformAfter } from '@atlaskit/editor-co
4
4
  export declare function updateState(state: Partial<ExtensionState>): import("../..").Command;
5
5
  export declare function setEditingContextToContextPanel<T extends Parameters = Parameters>(processParametersBefore: TransformBefore<T>, processParametersAfter: TransformAfter<T>): import("../..").Command;
6
6
  export declare const clearEditingContext: import("../..").Command;
7
- export declare const forceAutoSave: (value: () => void) => import("../..").Command;
7
+ export declare const forceAutoSave: (resolve: () => void, reject?: ((reason?: any) => void) | undefined) => import("../..").Command;
8
8
  export declare const showContextPanel: import("../..").Command;
9
9
  export declare const updateExtensionLayout: (layout: ExtensionLayout) => import("../..").Command;
10
10
  export declare const removeExtension: () => import("../..").Command;
@@ -3,6 +3,7 @@ import { UpdateExtension, ExtensionProvider, Parameters, TransformBefore, Transf
3
3
  export declare type ExtensionState<T extends Parameters = Parameters> = {
4
4
  localId?: string;
5
5
  autoSaveResolve?: () => void;
6
+ autoSaveReject?: (reason?: any) => void;
6
7
  showEditButton: boolean;
7
8
  showContextPanel: boolean;
8
9
  updateExtension?: Promise<UpdateExtension<T> | void>;
@@ -18,6 +18,8 @@ declare const _default: {
18
18
  new (props: Readonly<Props>): {
19
19
  overflowContainer?: HTMLElement | null | undefined;
20
20
  container?: HTMLElement | undefined;
21
+ shadowObserver?: import("@atlaskit/editor-common/ui").ShadowObserver | undefined;
22
+ overflowContainerWidth: number;
21
23
  scrollable?: NodeList | undefined;
22
24
  diff?: number | undefined;
23
25
  state: {
@@ -32,6 +34,7 @@ declare const _default: {
32
34
  calcOverflowDiff: () => number;
33
35
  calcScrollableWidth: () => number;
34
36
  handleContainer: (container: HTMLElement | null) => void;
37
+ initShadowObserver(): void;
35
38
  render(): JSX.Element;
36
39
  context: any;
37
40
  setState<K extends keyof import("@atlaskit/editor-common/ui").OverflowShadowState>(state: import("@atlaskit/editor-common/ui").OverflowShadowState | ((prevState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, props: Readonly<Props>) => import("@atlaskit/editor-common/ui").OverflowShadowState | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K> | null) | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
@@ -56,6 +59,8 @@ declare const _default: {
56
59
  new (props: Props, context?: any): {
57
60
  overflowContainer?: HTMLElement | null | undefined;
58
61
  container?: HTMLElement | undefined;
62
+ shadowObserver?: import("@atlaskit/editor-common/ui").ShadowObserver | undefined;
63
+ overflowContainerWidth: number;
59
64
  scrollable?: NodeList | undefined;
60
65
  diff?: number | undefined;
61
66
  state: {
@@ -70,6 +75,7 @@ declare const _default: {
70
75
  calcOverflowDiff: () => number;
71
76
  calcScrollableWidth: () => number;
72
77
  handleContainer: (container: HTMLElement | null) => void;
78
+ initShadowObserver(): void;
73
79
  render(): JSX.Element;
74
80
  context: any;
75
81
  setState<K_1 extends keyof import("@atlaskit/editor-common/ui").OverflowShadowState>(state: import("@atlaskit/editor-common/ui").OverflowShadowState | ((prevState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, props: Readonly<Props>) => import("@atlaskit/editor-common/ui").OverflowShadowState | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K_1> | null) | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K_1> | null, callback?: (() => void) | undefined): void;
@@ -1,5 +1,3 @@
1
- export declare const searchMatchBgColour = "#B3D4FF";
2
- export declare const selectedSearchMatchBgColour = "#2684FF";
3
1
  export declare const searchMatchClass = "search-match";
4
2
  export declare const selectedSearchMatchClass = "selected-search-match";
5
3
  export declare const findReplaceStyles: import("@emotion/react").SerializedStyles;
@@ -1,4 +1,5 @@
1
1
  import { Slice, Schema } from 'prosemirror-model';
2
+ export declare const FILEPATH_REGEXP: RegExp;
2
3
  /**
3
4
  * Instance of class LinkMatcher are used in autoformatting in place of Regex.
4
5
  * Hence it has been made similar to regex with an exec method.
@@ -14,3 +15,10 @@ export declare function normalizeUrl(url?: string | null): string;
14
15
  export declare function linkifyContent(schema: Schema): (slice: Slice) => Slice;
15
16
  export declare function getLinkDomain(url: string): string;
16
17
  export declare function isFromCurrentDomain(url: string): boolean;
18
+ interface filepathMatch {
19
+ startIndex: number;
20
+ endIndex: number;
21
+ }
22
+ export declare const findFilepaths: (text: string, offset?: number) => Array<filepathMatch>;
23
+ export declare const isLinkInMatches: (linkStart: number, matchesList: Array<filepathMatch>) => boolean;
24
+ export {};
@@ -1,5 +1,6 @@
1
1
  import type { Command } from '../../../types/command';
2
2
  import type { MediaNodeWithPosHandler, MediaPluginState } from '../pm-plugins/types';
3
+ import { EditorState } from 'prosemirror-state';
3
4
  export declare const findMediaSingleNode: (mediaPluginState: MediaPluginState, id: string) => MediaNodeWithPosHandler | null;
4
5
  /**
5
6
  * Finds the media inline node with the given id.
@@ -15,6 +16,7 @@ export declare const findMediaInlineNode: (mediaPluginState: MediaPluginState, i
15
16
  export declare const findAllMediaSingleNodes: (mediaPluginState: MediaPluginState, id: string) => MediaNodeWithPosHandler[];
16
17
  export declare const findMediaNode: (mediaPluginState: MediaPluginState, id: string, isMediaSingle: boolean) => MediaNodeWithPosHandler | null;
17
18
  export declare const isMobileUploadCompleted: (mediaPluginState: MediaPluginState, mediaId: string) => boolean | undefined;
19
+ export declare const isMediaNode: (pos: number, state: EditorState) => boolean | null | undefined;
18
20
  export declare const updateAllMediaNodesAttrs: (id: string, attrs: object, isMediaSingle: boolean) => Command;
19
21
  export declare const updateMediaNodeAttrs: (id: string, attrs: object, isMediaSingle: boolean) => Command;
20
22
  export declare const replaceExternalMedia: (pos: number, attrs: object) => Command;
@@ -39,6 +39,7 @@ export declare class MediaNode extends Component<MediaNodeProps, MediaNodeState>
39
39
  private selectMediaSingleFromCard;
40
40
  private selectMediaSingle;
41
41
  render(): JSX.Element;
42
+ private onFullscreenChange;
42
43
  private handleNewNode;
43
44
  }
44
45
  declare const _default: React.ComponentClass<MediaNodeProps & ImageLoaderProps, any>;
@@ -22,6 +22,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
22
22
  waitForMediaUpload: boolean;
23
23
  allUploadsFinished: boolean;
24
24
  showDropzone: boolean;
25
+ isFullscreen: boolean;
25
26
  element?: HTMLElement;
26
27
  layout: MediaSingleLayout;
27
28
  mediaNodes: MediaNodeWithPosHandler[];
@@ -99,7 +100,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
99
100
  removeSelectedMediaContainer: () => boolean;
100
101
  selectedMediaContainerNode: () => PMNode | undefined;
101
102
  handleDrag: (dragState: 'enter' | 'leave') => void;
102
- updateAndDispatch(props: Partial<Pick<this, 'allowsUploads' | 'allUploadsFinished'>>): void;
103
+ updateAndDispatch(props: Partial<Pick<this, 'allowsUploads' | 'allUploadsFinished' | 'isFullscreen'>>): void;
103
104
  }
104
105
  export declare const getMediaPluginState: (state: EditorState) => MediaPluginState;
105
106
  export declare const createPlugin: (_schema: Schema, options: MediaPluginOptions, reactContext: () => {}, getIntl: () => IntlShape, dispatch?: Dispatch<any> | undefined, mediaOptions?: MediaOptions | undefined) => SafePlugin<any, any>;
@@ -21,6 +21,7 @@ export interface MediaPluginState {
21
21
  waitForMediaUpload: boolean;
22
22
  allUploadsFinished: boolean;
23
23
  showDropzone: boolean;
24
+ isFullscreen: boolean;
24
25
  element?: HTMLElement;
25
26
  layout: MediaSingleLayout;
26
27
  mediaNodes: MediaNodeWithPosHandler[];
@@ -58,5 +59,5 @@ export interface MediaPluginState {
58
59
  updateElement(): void;
59
60
  setView(view: EditorView): void;
60
61
  destroy(): void;
61
- updateAndDispatch(props: Partial<Pick<this, 'allowsUploads' | 'allUploadsFinished'>>): void;
62
+ updateAndDispatch(props: Partial<Pick<this, 'allowsUploads' | 'allUploadsFinished' | 'isFullscreen'>>): void;
62
63
  }
@@ -45,4 +45,5 @@ export declare function handleParagraphBlockMarks(state: EditorState, slice: Sli
45
45
  export declare function flattenNestedListInSlice(slice: Slice): Slice<any>;
46
46
  export declare function insertIntoPanel(tr: Transaction, slice: Slice, panel: any): void;
47
47
  export declare function handleRichText(slice: Slice): Command;
48
+ export declare function handlePasteIntoCaption(slice: Slice): Command;
48
49
  export declare const handleSelectedTable: (slice: Slice) => Command;
@@ -15,6 +15,7 @@ export declare function sendPasteAnalyticsEvent(view: EditorView, event: Clipboa
15
15
  export declare function pasteCommandWithAnalytics(view: EditorView, event: ClipboardEvent, slice: Slice, pasteContext: PasteContext): import("../../analytics").HigherOrderCommand;
16
16
  export declare const handlePasteAsPlainTextWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
17
17
  export declare const handlePasteIntoTaskAndDecisionWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
18
+ export declare const handlePasteIntoCaptionWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
18
19
  export declare const handleCodeBlockWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, text: string) => Command;
19
20
  export declare const handleMediaSingleWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
20
21
  export declare const handlePastePreservingMarksWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
@@ -22,7 +22,6 @@ export declare const showInsertRowButton: (rowIndex: number) => Command;
22
22
  export declare const hideInsertColumnOrRowButton: () => Command;
23
23
  export declare const addResizeHandleDecorations: (columnIndex: number) => Command;
24
24
  export declare const autoSizeTable: (view: EditorView, node: PMNode, table: HTMLTableElement, basePos: number, opts: {
25
- dynamicTextSizing: boolean;
26
25
  containerWidth: number;
27
26
  }) => boolean;
28
27
  export declare const addBoldInEmptyHeaderCells: (tableCellHeader: ContentNodeWithPos) => Command;
@@ -2,7 +2,6 @@ import { EditorPlugin } from '../../types';
2
2
  import { PluginConfig } from './types';
3
3
  interface TablePluginOptions {
4
4
  tableOptions: PluginConfig;
5
- dynamicSizingEnabled?: boolean;
6
5
  breakoutEnabled?: boolean;
7
6
  allowContextualMenu?: boolean;
8
7
  fullWidthEnabled?: boolean;
@@ -20,6 +20,7 @@ export interface ComponentProps {
20
20
  allowControls: boolean;
21
21
  isHeaderRowEnabled: boolean;
22
22
  isHeaderColumnEnabled: boolean;
23
+ isMediaFullscreen?: boolean;
23
24
  tableActive: boolean;
24
25
  ordering: TableColumnOrdering;
25
26
  tableResizingPluginState?: ColumnResizingPluginState;
@@ -3,7 +3,6 @@ import { EditorView } from 'prosemirror-view';
3
3
  import { EventDispatcher } from '../../../event-dispatcher';
4
4
  import { PortalProviderAPI } from '../../../ui/PortalProvider';
5
5
  export declare type TableOptions = {
6
- dynamicTextSizing?: boolean;
7
6
  isBreakoutEnabled?: boolean;
8
7
  isFullWidthModeEnabled?: boolean;
9
8
  wasFullWidthModeEnabled?: boolean;