@atlaskit/editor-core 171.0.1 → 172.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 (300) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/codemods/172.0.0-transform-smartlinks-prop.ts +8 -0
  3. package/codemods/__tests__/rename-smartlinks-prop.ts +204 -0
  4. package/codemods/migrates/rename-smartlinks-prop.ts +56 -0
  5. package/dist/cjs/create-editor/ReactEditorView.js +13 -4
  6. package/dist/cjs/create-editor/create-plugins-list.js +21 -12
  7. package/dist/cjs/editor.js +8 -23
  8. package/dist/cjs/labs/next/internal/hooks/use-editor/index.js +6 -1
  9. package/dist/cjs/labs/next/presets/default.js +1 -1
  10. package/dist/cjs/nodeviews/context-adapter.js +2 -2
  11. package/dist/cjs/plugins/analytics/plugin.js +24 -11
  12. package/dist/cjs/plugins/base/index.js +3 -3
  13. package/dist/cjs/plugins/base/pm-plugins/disable-spell-checking.js +84 -0
  14. package/dist/cjs/plugins/card/index.js +1 -1
  15. package/dist/cjs/plugins/card/toolbar.js +11 -5
  16. package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +5 -1
  17. package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +7 -7
  18. package/dist/cjs/plugins/clipboard/pm-plugins/main.js +4 -2
  19. package/dist/cjs/plugins/code-block/actions.js +13 -0
  20. package/dist/cjs/plugins/code-block/index.js +7 -0
  21. package/dist/cjs/plugins/code-block/nodeviews/code-block.js +2 -4
  22. package/dist/cjs/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +132 -0
  23. package/dist/cjs/plugins/code-block/pm-plugins/main.js +1 -23
  24. package/dist/cjs/plugins/code-block/styles.js +3 -36
  25. package/dist/cjs/plugins/code-block/toolbar.js +9 -0
  26. package/dist/cjs/plugins/code-block/ui/class-names.js +1 -2
  27. package/dist/cjs/plugins/copy-button/commands.js +40 -20
  28. package/dist/cjs/plugins/copy-button/toolbar.js +51 -0
  29. package/dist/cjs/plugins/copy-button/utils.js +16 -38
  30. package/dist/cjs/plugins/expand/toolbar.js +8 -2
  31. package/dist/cjs/plugins/extension/toolbar.js +5 -1
  32. package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +1 -1
  33. package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -1
  34. package/dist/cjs/plugins/extension/ui/Extension/styles.js +2 -4
  35. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +29 -18
  36. package/dist/cjs/plugins/feedback-dialog/index.js +2 -2
  37. package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +0 -20
  38. package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +7 -32
  39. package/dist/cjs/plugins/hyperlink/Toolbar.js +146 -135
  40. package/dist/cjs/plugins/hyperlink/index.js +4 -4
  41. package/dist/cjs/plugins/hyperlink/ui/EditorLinkPicker/index.js +50 -0
  42. package/dist/cjs/plugins/hyperlink/ui/EditorLinkPicker/useEscapeClickaway.js +38 -0
  43. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +50 -5
  44. package/dist/cjs/plugins/indentation/commands/index.js +35 -7
  45. package/dist/cjs/plugins/indentation/commands/utils.js +11 -7
  46. package/dist/cjs/plugins/indentation/pm-plugins/keymap.js +5 -3
  47. package/dist/cjs/plugins/layout/toolbar.js +3 -1
  48. package/dist/cjs/plugins/media/toolbar/index.js +13 -5
  49. package/dist/cjs/plugins/mentions/analytics.js +5 -5
  50. package/dist/cjs/plugins/panel/toolbar.js +3 -3
  51. package/dist/cjs/plugins/paste/edge-cases/index.js +16 -3
  52. package/dist/cjs/plugins/paste/handlers.js +25 -2
  53. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +16 -3
  54. package/dist/cjs/plugins/paste/pm-plugins/main.js +22 -3
  55. package/dist/cjs/plugins/status/analytics.js +3 -3
  56. package/dist/cjs/plugins/table/toolbar.js +2 -2
  57. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/keymaps.js +43 -32
  58. package/dist/cjs/plugins/toolbar-lists-indentation/index.js +33 -13
  59. package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +122 -0
  60. package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +8 -2
  61. package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +2 -2
  62. package/dist/cjs/plugins/toolbar-lists-indentation/ui/index.js +7 -1
  63. package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +40 -19
  64. package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +10 -0
  65. package/dist/cjs/types/browser.js +6 -0
  66. package/dist/cjs/ui/Addon/click-area-helper.js +40 -19
  67. package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -2
  68. package/dist/cjs/ui/ContentStyles/index.js +1 -3
  69. package/dist/cjs/ui/DropList/index.js +215 -0
  70. package/dist/cjs/ui/Dropdown/index.js +2 -5
  71. package/dist/cjs/ui/DropdownMenu/index.js +140 -86
  72. package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +25 -14
  73. package/dist/cjs/ui/ElementBrowser/components/ElementList/cellSizeAndPositionGetter.js +2 -2
  74. package/dist/cjs/ui/ElementBrowser/components/ElementList/utils.js +28 -1
  75. package/dist/cjs/ui/ElementBrowser/constants.js +2 -7
  76. package/dist/cjs/ui/Layer/index.js +245 -0
  77. package/dist/cjs/ui/Layer/internal/helpers.js +70 -0
  78. package/dist/cjs/ui/PortalProvider/index.js +7 -26
  79. package/dist/cjs/version-wrapper.js +1 -1
  80. package/dist/cjs/version.json +1 -1
  81. package/dist/es2019/create-editor/ReactEditorView.js +15 -4
  82. package/dist/es2019/create-editor/create-plugins-list.js +21 -11
  83. package/dist/es2019/editor.js +9 -23
  84. package/dist/es2019/labs/next/internal/hooks/use-editor/index.js +6 -1
  85. package/dist/es2019/labs/next/presets/default.js +1 -1
  86. package/dist/es2019/nodeviews/context-adapter.js +2 -2
  87. package/dist/es2019/plugins/analytics/plugin.js +19 -4
  88. package/dist/es2019/plugins/base/index.js +3 -3
  89. package/dist/es2019/plugins/base/pm-plugins/disable-spell-checking.js +70 -0
  90. package/dist/es2019/plugins/card/index.js +1 -1
  91. package/dist/es2019/plugins/card/nodeviews/embedCard.js +1 -2
  92. package/dist/es2019/plugins/card/toolbar.js +10 -5
  93. package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +5 -1
  94. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +7 -7
  95. package/dist/es2019/plugins/clipboard/pm-plugins/main.js +1 -2
  96. package/dist/es2019/plugins/code-block/actions.js +12 -0
  97. package/dist/es2019/plugins/code-block/index.js +4 -0
  98. package/dist/es2019/plugins/code-block/nodeviews/code-block.js +1 -1
  99. package/dist/es2019/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +112 -0
  100. package/dist/es2019/plugins/code-block/pm-plugins/main.js +1 -21
  101. package/dist/es2019/plugins/code-block/styles.js +2 -159
  102. package/dist/es2019/plugins/code-block/toolbar.js +8 -0
  103. package/dist/es2019/plugins/code-block/ui/class-names.js +1 -2
  104. package/dist/es2019/plugins/copy-button/commands.js +35 -15
  105. package/dist/es2019/plugins/copy-button/toolbar.js +29 -0
  106. package/dist/es2019/plugins/copy-button/utils.js +15 -27
  107. package/dist/es2019/plugins/expand/toolbar.js +4 -1
  108. package/dist/es2019/plugins/extension/toolbar.js +4 -1
  109. package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +1 -1
  110. package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -1
  111. package/dist/es2019/plugins/extension/ui/Extension/styles.js +1 -3
  112. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +27 -15
  113. package/dist/es2019/plugins/feedback-dialog/index.js +1 -1
  114. package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +0 -19
  115. package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +14 -29
  116. package/dist/es2019/plugins/hyperlink/Toolbar.js +11 -5
  117. package/dist/es2019/plugins/hyperlink/index.js +4 -4
  118. package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/index.js +24 -0
  119. package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/useEscapeClickaway.js +28 -0
  120. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +50 -9
  121. package/dist/es2019/plugins/indentation/commands/index.js +24 -9
  122. package/dist/es2019/plugins/indentation/commands/utils.js +8 -3
  123. package/dist/es2019/plugins/indentation/pm-plugins/keymap.js +5 -4
  124. package/dist/es2019/plugins/layout/toolbar.js +2 -1
  125. package/dist/es2019/plugins/media/toolbar/index.js +10 -3
  126. package/dist/es2019/plugins/mentions/analytics.js +1 -1
  127. package/dist/es2019/plugins/panel/toolbar.js +1 -1
  128. package/dist/es2019/plugins/paste/edge-cases/index.js +15 -3
  129. package/dist/es2019/plugins/paste/handlers.js +27 -2
  130. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +12 -3
  131. package/dist/es2019/plugins/paste/pm-plugins/main.js +24 -4
  132. package/dist/es2019/plugins/status/analytics.js +1 -1
  133. package/dist/es2019/plugins/table/toolbar.js +1 -1
  134. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/keymaps.js +10 -10
  135. package/dist/es2019/plugins/toolbar-lists-indentation/index.js +23 -4
  136. package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +104 -0
  137. package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +8 -2
  138. package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +2 -2
  139. package/dist/es2019/plugins/toolbar-lists-indentation/ui/index.js +7 -1
  140. package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +38 -16
  141. package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +9 -0
  142. package/dist/es2019/types/browser.js +2 -0
  143. package/dist/es2019/ui/Addon/click-area-helper.js +37 -18
  144. package/dist/es2019/ui/Appearance/Comment/Comment.js +2 -2
  145. package/dist/es2019/ui/ContentStyles/index.js +5 -9
  146. package/dist/es2019/ui/DropList/index.js +186 -0
  147. package/dist/es2019/ui/Dropdown/index.js +2 -6
  148. package/dist/es2019/ui/DropdownMenu/index.js +124 -75
  149. package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +11 -22
  150. package/dist/es2019/ui/ElementBrowser/components/ElementList/cellSizeAndPositionGetter.js +3 -3
  151. package/dist/es2019/ui/ElementBrowser/components/ElementList/utils.js +26 -2
  152. package/dist/es2019/ui/ElementBrowser/constants.js +1 -4
  153. package/dist/es2019/ui/Layer/index.js +195 -0
  154. package/dist/es2019/ui/Layer/internal/helpers.js +62 -0
  155. package/dist/es2019/ui/PortalProvider/index.js +5 -23
  156. package/dist/es2019/version-wrapper.js +1 -1
  157. package/dist/es2019/version.json +1 -1
  158. package/dist/esm/create-editor/ReactEditorView.js +13 -4
  159. package/dist/esm/create-editor/create-plugins-list.js +21 -12
  160. package/dist/esm/editor.js +9 -23
  161. package/dist/esm/labs/next/internal/hooks/use-editor/index.js +6 -1
  162. package/dist/esm/labs/next/presets/default.js +1 -1
  163. package/dist/esm/nodeviews/context-adapter.js +2 -2
  164. package/dist/esm/plugins/analytics/plugin.js +24 -11
  165. package/dist/esm/plugins/base/index.js +3 -3
  166. package/dist/esm/plugins/base/pm-plugins/disable-spell-checking.js +72 -0
  167. package/dist/esm/plugins/card/index.js +1 -1
  168. package/dist/esm/plugins/card/nodeviews/embedCard.js +1 -2
  169. package/dist/esm/plugins/card/toolbar.js +11 -5
  170. package/dist/esm/plugins/card/ui/EditLinkToolbar.js +5 -1
  171. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +7 -7
  172. package/dist/esm/plugins/clipboard/pm-plugins/main.js +1 -2
  173. package/dist/esm/plugins/code-block/actions.js +12 -0
  174. package/dist/esm/plugins/code-block/index.js +6 -0
  175. package/dist/esm/plugins/code-block/nodeviews/code-block.js +2 -4
  176. package/dist/esm/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +112 -0
  177. package/dist/esm/plugins/code-block/pm-plugins/main.js +1 -20
  178. package/dist/esm/plugins/code-block/styles.js +4 -32
  179. package/dist/esm/plugins/code-block/toolbar.js +8 -0
  180. package/dist/esm/plugins/code-block/ui/class-names.js +1 -2
  181. package/dist/esm/plugins/copy-button/commands.js +35 -15
  182. package/dist/esm/plugins/copy-button/toolbar.js +31 -0
  183. package/dist/esm/plugins/copy-button/utils.js +14 -29
  184. package/dist/esm/plugins/expand/toolbar.js +6 -2
  185. package/dist/esm/plugins/extension/toolbar.js +4 -1
  186. package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +1 -1
  187. package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -1
  188. package/dist/esm/plugins/extension/ui/Extension/styles.js +3 -4
  189. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +28 -16
  190. package/dist/esm/plugins/feedback-dialog/index.js +1 -1
  191. package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +0 -21
  192. package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +8 -27
  193. package/dist/esm/plugins/hyperlink/Toolbar.js +144 -135
  194. package/dist/esm/plugins/hyperlink/index.js +4 -4
  195. package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/index.js +26 -0
  196. package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/useEscapeClickaway.js +28 -0
  197. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +46 -5
  198. package/dist/esm/plugins/indentation/commands/index.js +30 -9
  199. package/dist/esm/plugins/indentation/commands/utils.js +12 -8
  200. package/dist/esm/plugins/indentation/pm-plugins/keymap.js +5 -4
  201. package/dist/esm/plugins/layout/toolbar.js +2 -1
  202. package/dist/esm/plugins/media/toolbar/index.js +12 -5
  203. package/dist/esm/plugins/mentions/analytics.js +1 -1
  204. package/dist/esm/plugins/panel/toolbar.js +1 -1
  205. package/dist/esm/plugins/paste/edge-cases/index.js +15 -3
  206. package/dist/esm/plugins/paste/handlers.js +23 -2
  207. package/dist/esm/plugins/paste/pm-plugins/analytics.js +13 -3
  208. package/dist/esm/plugins/paste/pm-plugins/main.js +23 -4
  209. package/dist/esm/plugins/status/analytics.js +1 -1
  210. package/dist/esm/plugins/table/toolbar.js +1 -1
  211. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/keymaps.js +37 -31
  212. package/dist/esm/plugins/toolbar-lists-indentation/index.js +32 -13
  213. package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +105 -0
  214. package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +8 -2
  215. package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +2 -2
  216. package/dist/esm/plugins/toolbar-lists-indentation/ui/index.js +7 -1
  217. package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +38 -20
  218. package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +9 -0
  219. package/dist/esm/types/browser.js +2 -0
  220. package/dist/esm/ui/Addon/click-area-helper.js +37 -18
  221. package/dist/esm/ui/Appearance/Comment/Comment.js +2 -2
  222. package/dist/esm/ui/ContentStyles/index.js +2 -4
  223. package/dist/esm/ui/DropList/index.js +203 -0
  224. package/dist/esm/ui/Dropdown/index.js +2 -6
  225. package/dist/esm/ui/DropdownMenu/index.js +134 -88
  226. package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +27 -17
  227. package/dist/esm/ui/ElementBrowser/components/ElementList/cellSizeAndPositionGetter.js +3 -3
  228. package/dist/esm/ui/ElementBrowser/components/ElementList/utils.js +26 -2
  229. package/dist/esm/ui/ElementBrowser/constants.js +1 -4
  230. package/dist/esm/ui/Layer/index.js +228 -0
  231. package/dist/esm/ui/Layer/internal/helpers.js +62 -0
  232. package/dist/esm/ui/PortalProvider/index.js +7 -26
  233. package/dist/esm/version-wrapper.js +1 -1
  234. package/dist/esm/version.json +1 -1
  235. package/dist/types/labs/next/presets/default.d.ts +2 -0
  236. package/dist/types/plugins/analytics/plugin.d.ts +5 -1
  237. package/dist/types/plugins/analytics/types/cut-copy-events.d.ts +2 -0
  238. package/dist/types/plugins/analytics/types/general-events.d.ts +1 -0
  239. package/dist/types/plugins/analytics/types/paste-events.d.ts +1 -0
  240. package/dist/types/plugins/base/index.d.ts +1 -1
  241. package/dist/types/plugins/base/pm-plugins/{fix-chrome-spell-checking.d.ts → disable-spell-checking.d.ts} +0 -0
  242. package/dist/types/plugins/card/index.d.ts +2 -7
  243. package/dist/types/plugins/card/nodeviews/genericCard.d.ts +2 -1
  244. package/dist/types/plugins/card/toolbar.d.ts +3 -5
  245. package/dist/types/plugins/card/types.d.ts +2 -0
  246. package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +4 -1
  247. package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +2 -1
  248. package/dist/types/plugins/clipboard/pm-plugins/main.d.ts +3 -0
  249. package/dist/types/plugins/code-block/nodeviews/code-block.d.ts +1 -1
  250. package/dist/types/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.d.ts +11 -0
  251. package/dist/types/plugins/code-block/styles.d.ts +0 -1
  252. package/dist/types/plugins/code-block/ui/class-names.d.ts +0 -1
  253. package/dist/types/plugins/copy-button/commands.d.ts +2 -2
  254. package/dist/types/plugins/copy-button/toolbar.d.ts +7 -0
  255. package/dist/types/plugins/copy-button/utils.d.ts +7 -6
  256. package/dist/types/plugins/floating-toolbar/types.d.ts +1 -2
  257. package/dist/types/plugins/hyperlink/Toolbar.d.ts +2 -1
  258. package/dist/types/plugins/hyperlink/index.d.ts +2 -2
  259. package/dist/types/plugins/hyperlink/types.d.ts +30 -0
  260. package/dist/types/plugins/hyperlink/ui/EditorLinkPicker/index.d.ts +7 -0
  261. package/dist/types/plugins/hyperlink/ui/EditorLinkPicker/useEscapeClickaway.d.ts +2 -0
  262. package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +4 -3
  263. package/dist/types/plugins/indentation/commands/index.d.ts +6 -2
  264. package/dist/types/plugins/indentation/commands/utils.d.ts +8 -2
  265. package/dist/types/plugins/paste/edge-cases/index.d.ts +3 -2
  266. package/dist/types/plugins/paste/handlers.d.ts +1 -0
  267. package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +7 -1
  268. package/dist/types/plugins/tasks-and-decisions/pm-plugins/keymaps.d.ts +5 -0
  269. package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +2 -1
  270. package/dist/types/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts +14 -0
  271. package/dist/types/plugins/toolbar-lists-indentation/types.d.ts +2 -0
  272. package/dist/types/plugins/toolbar-lists-indentation/ui/index.d.ts +2 -0
  273. package/dist/types/types/browser.d.ts +10 -0
  274. package/dist/types/types/editor-props.d.ts +6 -5
  275. package/dist/types/types/feature-flags.d.ts +29 -24
  276. package/dist/types/types/index.d.ts +1 -0
  277. package/dist/types/ui/Addon/click-area-helper.d.ts +10 -0
  278. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
  279. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  280. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  281. package/dist/types/ui/DropList/index.d.ts +22 -0
  282. package/dist/types/ui/Dropdown/index.d.ts +2 -1
  283. package/dist/types/ui/DropdownMenu/index.d.ts +0 -1
  284. package/dist/types/ui/ElementBrowser/components/ElementList/cellSizeAndPositionGetter.d.ts +1 -1
  285. package/dist/types/ui/ElementBrowser/components/ElementList/utils.d.ts +1 -0
  286. package/dist/types/ui/ElementBrowser/constants.d.ts +1 -3
  287. package/dist/types/ui/Layer/index.d.ts +47 -0
  288. package/dist/types/ui/Layer/internal/helpers.d.ts +5 -0
  289. package/package.json +23 -18
  290. package/dist/cjs/plugins/base/pm-plugins/fix-chrome-spell-checking.js +0 -37
  291. package/dist/cjs/plugins/code-block/nodeviews/highlighting-code-block.js +0 -195
  292. package/dist/cjs/utils/check-if-mobile-bridge.js +0 -19
  293. package/dist/es2019/plugins/base/pm-plugins/fix-chrome-spell-checking.js +0 -22
  294. package/dist/es2019/plugins/code-block/nodeviews/highlighting-code-block.js +0 -152
  295. package/dist/es2019/utils/check-if-mobile-bridge.js +0 -12
  296. package/dist/esm/plugins/base/pm-plugins/fix-chrome-spell-checking.js +0 -24
  297. package/dist/esm/plugins/code-block/nodeviews/highlighting-code-block.js +0 -178
  298. package/dist/esm/utils/check-if-mobile-bridge.js +0 -12
  299. package/dist/types/plugins/code-block/nodeviews/highlighting-code-block.d.ts +0 -48
  300. package/dist/types/utils/check-if-mobile-bridge.d.ts +0 -1
@@ -0,0 +1,31 @@
1
+ import CopyIcon from '@atlaskit/icon/glyph/copy';
2
+ import commonMessages from '../../messages';
3
+ import { hoverDecoration } from '../base/pm-plugins/decoration';
4
+ import { createToolbarCopyCommand, resetCopiedState } from './commands';
5
+ import { pluginKey } from './pm-plugins/plugin-key';
6
+ export var getCopyButtonConfig = function getCopyButtonConfig(state, formatMessage, nodeType, onMouseEnter, onMouseLeave) {
7
+ var copyButtonState = pluginKey.getState(state);
8
+ return {
9
+ id: 'editor.floatingToolbar.copy',
10
+ type: 'button',
11
+ appearance: 'subtle',
12
+ icon: CopyIcon,
13
+ onClick: createToolbarCopyCommand(nodeType),
14
+ title: formatMessage(copyButtonState !== null && copyButtonState !== void 0 && copyButtonState.copied ? commonMessages.copiedToClipboard : commonMessages.copyToClipboard),
15
+ onMouseEnter: onMouseEnter || hoverDecoration(nodeType, true, 'ak-editor-selected-node'),
16
+ onMouseLeave: resetCopiedState(nodeType, onMouseLeave),
17
+ onFocus: hoverDecoration(nodeType, true, 'ak-editor-selected-node'),
18
+ onBlur: hoverDecoration(nodeType, false),
19
+ hideTooltipOnClick: false,
20
+ tabIndex: null // TODO select and delete styling needs to be removed when keyboard cursor moves away
21
+ // problem already exist with delete as well
22
+
23
+ };
24
+ };
25
+ export var showCopyButton = function showCopyButton(state) {
26
+ return state && // Check if the Copy button plugin is enabled
27
+ // @ts-ignore pluginKey.key
28
+ state.plugins.find(function (p) {
29
+ return p.key === pluginKey.key;
30
+ });
31
+ };
@@ -1,31 +1,16 @@
1
- import CopyIcon from '@atlaskit/icon/glyph/copy';
2
- import commonMessages from '../../messages';
3
- import { hoverDecoration } from '../base/pm-plugins/decoration';
4
- import { copy, resetCopiedState } from './commands';
5
- import { pluginKey } from './pm-plugins/plugin-key';
6
- export var getCopyButtonConfig = function getCopyButtonConfig(state, formatMessage, nodeType, onMouseEnter, onMouseLeave) {
7
- var copyButtonState = pluginKey.getState(state);
8
- return {
9
- id: 'editor.floatingToolbar.copy',
10
- type: 'button',
11
- appearance: 'subtle',
12
- icon: CopyIcon,
13
- onClick: copy(nodeType),
14
- title: formatMessage(copyButtonState !== null && copyButtonState !== void 0 && copyButtonState.copied ? commonMessages.copiedToClipboard : commonMessages.copyToClipboard),
15
- onMouseEnter: onMouseEnter || hoverDecoration(nodeType, true, 'ak-editor-selected-node'),
16
- onMouseLeave: resetCopiedState(nodeType, onMouseLeave),
17
- onFocus: hoverDecoration(nodeType, true, 'ak-editor-selected-node'),
18
- onBlur: hoverDecoration(nodeType, false),
19
- hideTooltipOnClick: false,
20
- tabIndex: null // TODO select and delete styling needs to be removed when keyboard cursor moves away
21
- // problem already exist with delete as well
1
+ import { findSelectedNodeOfType, findParentNodeOfType } from 'prosemirror-utils';
2
+ import { DOMSerializer } from 'prosemirror-model';
3
+ export function getSelectedNodeOrNodeParentByNodeType(_ref) {
4
+ var nodeType = _ref.nodeType,
5
+ selection = _ref.selection;
6
+ var node = findSelectedNodeOfType(nodeType)(selection);
22
7
 
23
- };
24
- };
25
- export var showCopyButton = function showCopyButton(state) {
26
- return state && // Check if the Copy button plugin is enabled
27
- // @ts-ignore pluginKey.key
28
- state.plugins.find(function (p) {
29
- return p.key === pluginKey.key;
30
- });
8
+ if (!node) {
9
+ node = findParentNodeOfType(nodeType)(selection);
10
+ }
11
+
12
+ return node;
13
+ }
14
+ export var toDOM = function toDOM(node, schema) {
15
+ return DOMSerializer.fromSchema(schema).serializeNode(node);
31
16
  };
@@ -1,8 +1,10 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
1
2
  import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
2
3
  import commonMessages from '../../messages';
3
4
  import { deleteExpand } from './commands';
4
5
  import { hoverDecoration } from '../base/pm-plugins/decoration';
5
6
  import { getPluginState } from './pm-plugins/plugin-factory';
7
+ import { getCopyButtonConfig, showCopyButton } from '../copy-button/toolbar';
6
8
  export var getToolbarConfig = function getToolbarConfig(state, _ref) {
7
9
  var formatMessage = _ref.formatMessage;
8
10
 
@@ -20,7 +22,9 @@ export var getToolbarConfig = function getToolbarConfig(state, _ref) {
20
22
  },
21
23
  nodeType: [nestedExpand, expand],
22
24
  offset: [0, 6],
23
- items: [{
25
+ items: [].concat(_toConsumableArray(state && showCopyButton(state) ? [getCopyButtonConfig(state, formatMessage, [nestedExpand, expand]), {
26
+ type: 'separator'
27
+ }] : []), [{
24
28
  id: 'editor.expand.delete',
25
29
  type: 'button',
26
30
  appearance: 'danger',
@@ -32,7 +36,7 @@ export var getToolbarConfig = function getToolbarConfig(state, _ref) {
32
36
  onBlur: hoverDecoration([nestedExpand, expand], false),
33
37
  title: formatMessage(commonMessages.remove),
34
38
  tabIndex: null
35
- }]
39
+ }])
36
40
  };
37
41
  }
38
42
 
@@ -13,6 +13,7 @@ import { getPluginState } from './pm-plugins/main';
13
13
  import { getSelectedExtension } from './utils';
14
14
  import { updateExtensionLayout, removeExtension } from './commands';
15
15
  import { pluginKey as macroPluginKey } from '../macro/plugin-key';
16
+ import { getCopyButtonConfig, showCopyButton } from '../copy-button/toolbar';
16
17
  export var messages = defineMessages({
17
18
  edit: {
18
19
  id: 'fabric.editor.edit',
@@ -116,7 +117,9 @@ export var getToolbarConfig = function getToolbarConfig() {
116
117
  }, {
117
118
  type: 'extensions-placeholder',
118
119
  separator: 'end'
119
- }, {
120
+ }], _toConsumableArray(state && showCopyButton(state) ? [getCopyButtonConfig(state, intl.formatMessage, nodeType), {
121
+ type: 'separator'
122
+ }] : []), [{
120
123
  id: 'editor.extension.delete',
121
124
  type: 'button',
122
125
  icon: RemoveIcon,
@@ -13,7 +13,7 @@ export var widerLayoutClassName = 'wider-layout';
13
13
  export var wrapperStyle = function wrapperStyle(theme, extensionWidth) {
14
14
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n &.without-frame {\n background: transparent;\n }\n cursor: pointer;\n width: 100%;\n\n .extension-overflow-wrapper:not(.with-body) {\n overflow-x: auto;\n }\n\n /* extension container breakout, only works on top level */\n .ProseMirror\n > ", "\n > [extensiontype]\n &.", ",\n .ProseMirror\n > [extensiontype]\n &.", " {\n width: ", ";\n margin-left: 50%;\n transform: translateX(-50%);\n }\n"])), wrapperDefault(theme), dataConsumerSelector, widerLayoutClassName, widerLayoutClassName, extensionWidth);
15
15
  };
16
- export var header = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: ", "px ", "px ", "px;\n vertical-align: middle;\n\n &.with-children:not(.without-frame) {\n padding: 4px 8px 8px;\n }\n &.without-frame {\n padding: 0;\n }\n"])), padding / 2, padding / 2, padding / 4);
16
+ export var header = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: ", "px ", "px 0px;\n vertical-align: middle;\n\n &.with-children:not(.without-frame) {\n padding: 4px 8px 8px;\n }\n &.without-frame {\n padding: 0;\n }\n"])), padding / 2, padding / 2);
17
17
  export var content = function content(theme) {
18
18
  return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: ", "px;\n background: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n cursor: initial;\n"])), padding, themed({
19
19
  light: token('elevation.surface', 'white'),
@@ -7,5 +7,5 @@ import { borderRadius } from '@atlaskit/theme/constants';
7
7
  import { wrapperDefault } from '../styles';
8
8
  import { token } from '@atlaskit/tokens';
9
9
  export var wrapperStyle = function wrapperStyle(theme) {
10
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n cursor: pointer;\n display: inline-flex;\n margin: 1px;\n\n > img {\n border-radius: ", "px;\n }\n\n &::after,\n &::before {\n vertical-align: text-top;\n display: inline-block;\n width: 1px;\n content: '';\n }\n\n &.with-children {\n padding: 0;\n background: ", ";\n }\n"])), wrapperDefault(theme), borderRadius(), token('color.background.neutral.subtle', 'white'));
10
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n cursor: pointer;\n display: inline-flex;\n margin: 1px 1px 4px;\n\n > img {\n border-radius: ", "px;\n }\n\n &::after,\n &::before {\n vertical-align: text-top;\n display: inline-block;\n width: 1px;\n content: '';\n }\n\n &.with-children {\n padding: 0;\n background: ", ";\n }\n"])), wrapperDefault(theme), borderRadius(), token('color.background.neutral.subtle', 'white'));
11
11
  };
@@ -3,21 +3,20 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
3
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
4
4
 
5
5
  import { css } from '@emotion/react';
6
- import { fontSize, gridSize } from '@atlaskit/theme/constants';
6
+ import { gridSize } from '@atlaskit/theme/constants';
7
7
  import { themed } from '@atlaskit/theme/components';
8
8
  import { borderRadius } from '@atlaskit/theme/constants';
9
9
  import { N20, DN50, DN700, B200, N20A, N70 } from '@atlaskit/theme/colors';
10
- import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
11
10
  import { token } from '@atlaskit/tokens';
12
11
  export var padding = gridSize();
13
12
  export var BODIED_EXT_PADDING = padding * 2;
14
13
  export var wrapperDefault = function wrapperDefault(theme) {
15
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n position: relative;\n vertical-align: middle;\n font-size: ", ";\n\n .ProseMirror-selectednode > span > & > .extension-overlay {\n box-shadow: inset 0px 0px 0px 2px ", ";\n opacity: 1;\n }\n\n &.with-overlay {\n .extension-overlay {\n background: ", ";\n color: transparent;\n }\n\n &:hover .extension-overlay {\n opacity: 1;\n }\n }\n"])), themed({
14
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n position: relative;\n vertical-align: middle;\n\n .ProseMirror-selectednode > span > & > .extension-overlay {\n box-shadow: inset 0px 0px 0px 2px ", ";\n opacity: 1;\n }\n\n &.with-overlay {\n .extension-overlay {\n background: ", ";\n color: transparent;\n }\n\n &:hover .extension-overlay {\n opacity: 1;\n }\n }\n"])), themed({
16
15
  light: token('color.background.neutral', N20),
17
16
  dark: token('color.background.neutral', DN50)
18
17
  })(theme), borderRadius(), themed({
19
18
  dark: token('color.text', DN700)
20
- })(theme), relativeFontSizeToBase16(fontSize()), token('color.border.selected', B200), token('color.background.neutral.hovered', N20A));
19
+ })(theme), token('color.border.selected', B200), token('color.background.neutral.hovered', N20A));
21
20
  };
22
21
  export var overlay = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.3s;\n"])), borderRadius());
23
22
  export var placeholderFallback = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n\n & > img {\n margin: 0 4px;\n }\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: placeholder-fallback;\n"])));
@@ -1,17 +1,31 @@
1
- import _typeof from "@babel/runtime/helpers/typeof";
2
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _typeof from "@babel/runtime/helpers/typeof";
3
3
 
4
4
  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; }
5
5
 
6
6
  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; }
7
7
 
8
8
  import { normalizeFeatureFlags } from '@atlaskit/editor-common/normalize-feature-flags';
9
- import { browser } from '@atlaskit/editor-common/utils';
10
9
 
11
- var safeNumberFeatureFlag = function safeNumberFeatureFlag(value) {
12
- var parsedValue = parseInt(value, 10);
13
- return !isNaN(parsedValue) && Number.isInteger(parsedValue) && Number.isSafeInteger(parsedValue) ? parsedValue : undefined;
14
- };
10
+ function verifyJSON(json) {
11
+ try {
12
+ return JSON.parse(json);
13
+ } catch (e) {
14
+ return undefined;
15
+ }
16
+ }
17
+
18
+ function getSpellCheck(featureFlags) {
19
+ if (!!(featureFlags !== null && featureFlags !== void 0 && featureFlags['disableSpellcheckByBrowser'])) {
20
+ return _typeof(featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags['disableSpellcheckByBrowser']) === 'object' ? featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags['disableSpellcheckByBrowser'] : typeof (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags['disableSpellcheckByBrowser']) === 'string' ? verifyJSON(featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags['disableSpellcheckByBrowser']) : undefined;
21
+ }
22
+
23
+ if (!!(featureFlags !== null && featureFlags !== void 0 && featureFlags['disable-spellcheck-by-browser'])) {
24
+ return _typeof(featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags['disable-spellcheck-by-browser']) === 'object' ? featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags['disable-spellcheck-by-browser'] : typeof (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags['disable-spellcheck-by-browser']) === 'string' ? verifyJSON(featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags['disable-spellcheck-by-browser']) : undefined;
25
+ }
26
+
27
+ return undefined;
28
+ }
15
29
  /**
16
30
  * Transforms EditorProps to an FeatureFlags object,
17
31
  * which is used by both current and archv3 editors.
@@ -19,7 +33,7 @@ var safeNumberFeatureFlag = function safeNumberFeatureFlag(value) {
19
33
 
20
34
 
21
35
  export function createFeatureFlagsFromProps(props) {
22
- var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$allowTables, _props$featureFlags3, _props$featureFlags4, _props$allowTables2, _props$featureFlags5, _props$featureFlags6, _props$allowTables3, _props$featureFlags7, _props$featureFlags8, _props$allowTables4, _props$featureFlags9, _props$featureFlags10, _props$allowTables5, _props$allowExtension, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$collabEdit, _props$collabEdit2, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41;
36
+ var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$allowTables, _props$featureFlags3, _props$featureFlags4, _props$allowTables2, _props$featureFlags5, _props$featureFlags6, _props$allowTables3, _props$featureFlags7, _props$featureFlags8, _props$allowTables4, _props$featureFlags9, _props$featureFlags10, _props$allowTables5, _props$allowExtension, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$collabEdit, _props$collabEdit2, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38;
23
37
 
24
38
  var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
25
39
  return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
@@ -49,16 +63,14 @@ export function createFeatureFlagsFromProps(props) {
49
63
  plainTextPasteLinkification: Boolean(typeof ((_props$featureFlags21 = props.featureFlags) === null || _props$featureFlags21 === void 0 ? void 0 : _props$featureFlags21.plainTextPasteLinkification) === 'boolean' ? !!((_props$featureFlags22 = props.featureFlags) !== null && _props$featureFlags22 !== void 0 && _props$featureFlags22.plainTextPasteLinkification) : false),
50
64
  collabAvatarScroll: Boolean(typeof ((_props$featureFlags23 = props.featureFlags) === null || _props$featureFlags23 === void 0 ? void 0 : _props$featureFlags23.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags24 = props.featureFlags) !== null && _props$featureFlags24 !== void 0 && _props$featureFlags24.collabAvatarScroll) : false),
51
65
  ufo: Boolean(typeof ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.ufo) === 'boolean' ? !!((_props$featureFlags26 = props.featureFlags) !== null && _props$featureFlags26 !== void 0 && _props$featureFlags26.ufo) : false),
52
- codeBlockSyntaxHighlighting: Boolean(typeof normalizedFeatureFlags.codeBlockSyntaxHighlighting === 'boolean' ? !!normalizedFeatureFlags.codeBlockSyntaxHighlighting && !browser.safari : false),
53
66
  twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags27 = props.featureFlags) === null || _props$featureFlags27 === void 0 ? void 0 : _props$featureFlags27.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags28 = props.featureFlags) !== null && _props$featureFlags28 !== void 0 && _props$featureFlags28.twoLineEditorToolbar) : false),
54
- codeBidiWarnings: Boolean(typeof ((_props$featureFlags29 = props.featureFlags) === null || _props$featureFlags29 === void 0 ? void 0 : _props$featureFlags29.codeBidiWarnings) === 'boolean' ? !!((_props$featureFlags30 = props.featureFlags) !== null && _props$featureFlags30 !== void 0 && _props$featureFlags30.codeBidiWarnings) : true),
55
- saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags31 = props.featureFlags) === null || _props$featureFlags31 === void 0 ? void 0 : _props$featureFlags31.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags32 = props.featureFlags) !== null && _props$featureFlags32 !== void 0 && _props$featureFlags32.saferDispatchedTransactions) : false)),
56
- maxUnsafeChromeSpellcheckingVersion: safeNumberFeatureFlag((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.maxUnsafeChromeSpellcheckingVersion),
67
+ saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags29 = props.featureFlags) === null || _props$featureFlags29 === void 0 ? void 0 : _props$featureFlags29.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags30 = props.featureFlags) !== null && _props$featureFlags30 !== void 0 && _props$featureFlags30.saferDispatchedTransactions) : false)),
57
68
  useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
58
- chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags34 = props.featureFlags) === null || _props$featureFlags34 === void 0 ? void 0 : _props$featureFlags34.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
59
- viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined,
60
- showHoverPreview: Boolean(typeof ((_props$featureFlags36 = props.featureFlags) === null || _props$featureFlags36 === void 0 ? void 0 : _props$featureFlags36.showHoverPreview) === 'boolean' ? !!((_props$featureFlags37 = props.featureFlags) !== null && _props$featureFlags37 !== void 0 && _props$featureFlags37.showHoverPreview) : false),
61
- indentationButtonsInTheToolbar: Boolean(typeof ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38['indentation-buttons-in-the-toolbar']) === 'boolean' ? !!((_props$featureFlags39 = props.featureFlags) !== null && _props$featureFlags39 !== void 0 && _props$featureFlags39['indentation-buttons-in-the-toolbar']) : false),
62
- floatingToolbarCopyButton: Boolean(typeof ((_props$featureFlags40 = props.featureFlags) === null || _props$featureFlags40 === void 0 ? void 0 : _props$featureFlags40.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags41 = props.featureFlags) !== null && _props$featureFlags41 !== void 0 && _props$featureFlags41.floatingToolbarCopyButton) : false)
69
+ chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags31 = props.featureFlags) === null || _props$featureFlags31 === void 0 ? void 0 : _props$featureFlags31.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
70
+ viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags32 = props.featureFlags) === null || _props$featureFlags32 === void 0 ? void 0 : _props$featureFlags32['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined,
71
+ showHoverPreview: Boolean(typeof ((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.showHoverPreview) === 'boolean' ? !!((_props$featureFlags34 = props.featureFlags) !== null && _props$featureFlags34 !== void 0 && _props$featureFlags34.showHoverPreview) : false),
72
+ indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags36 = props.featureFlags) !== null && _props$featureFlags36 !== void 0 && _props$featureFlags36.indentationButtonsInTheToolbar) : false)),
73
+ floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags38 = props.featureFlags) !== null && _props$featureFlags38 !== void 0 && _props$featureFlags38.floatingToolbarCopyButton) : false)),
74
+ disableSpellcheckByBrowser: getSpellCheck(props.featureFlags)
63
75
  });
64
76
  }
@@ -10,7 +10,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
10
10
  import React from 'react';
11
11
  import { PluginKey } from 'prosemirror-state';
12
12
  import { IconFeedback } from '../quick-insert/assets';
13
- import { version as coreVersion } from '../../version.json';
13
+ import { version as coreVersion } from '../../version-wrapper';
14
14
  import { addAnalytics, ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE } from '../analytics';
15
15
  import loadJiraCollectorDialogScript from './loadJiraCollectorDialogScript';
16
16
  import { messages } from '../insert-block/ui/ToolbarInsertBlock/messages';
@@ -52,12 +52,6 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
52
52
 
53
53
  _this = _super.call.apply(_super, [this].concat(args));
54
54
 
55
- _defineProperty(_assertThisInitialized(_this), "handleKeydown", function (event) {
56
- if (event.metaKey && event.key === 'f') {
57
- event.preventDefault();
58
- }
59
- });
60
-
61
55
  _defineProperty(_assertThisInitialized(_this), "toggleOpen", function () {
62
56
  if (_this.props.isActive) {
63
57
  _this.props.onCancel({
@@ -72,21 +66,6 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
72
66
  }
73
67
 
74
68
  _createClass(FindReplaceToolbarButton, [{
75
- key: "componentDidMount",
76
- value: function componentDidMount() {
77
- window.addEventListener('keydown', this.handleKeydown);
78
- }
79
- }, {
80
- key: "componentWillUnmount",
81
- value: function componentWillUnmount() {
82
- window.removeEventListener('keydown', this.handleKeydown);
83
- }
84
- /**
85
- * Prevent browser find opening if you hit cmd+f with cursor
86
- * inside find/replace component
87
- */
88
-
89
- }, {
90
69
  key: "render",
91
70
  value: function render() {
92
71
  var _this2 = this;
@@ -1,4 +1,3 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
2
  import _createClass from "@babel/runtime/helpers/createClass";
4
3
  import _inherits from "@babel/runtime/helpers/inherits";
@@ -16,9 +15,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
16
15
  import { css, jsx } from '@emotion/react';
17
16
  import { Component } from 'react';
18
17
  import { gridSize } from '@atlaskit/theme/constants';
19
- import { B400 } from '@atlaskit/theme/colors'; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
20
-
21
- import Item, { itemThemeNamespace } from '@atlaskit/item';
18
+ import { B400 } from '@atlaskit/theme/colors';
19
+ import { ButtonItem } from '@atlaskit/menu';
22
20
  import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
23
21
  import Tooltip from '@atlaskit/tooltip';
24
22
  import { injectIntl } from 'react-intl-next';
@@ -29,26 +27,8 @@ export var menuItemDimensions = {
29
27
  height: 32
30
28
  };
31
29
  var spacer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n padding: 8px;\n"])));
32
- var menuContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: ", "px;\n\n // temporary solution before we migrated off dst/item\n & span[class^='ItemParts__Before'] {\n margin-right: 4px;\n }\n"])), menuItemDimensions.width);
33
- var padding = gridSize();
30
+ var menuContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: ", "px;\n\n // temporary solution to retain spacing defined by @atlaskit/Item\n & button {\n min-height: ", "px;\n padding: 8px 8px 7px;\n\n & > [data-item-elem-before] {\n margin-right: ", "px;\n }\n }\n"])), menuItemDimensions.width, gridSize() * 4, gridSize() / 2);
34
31
  export var itemSpacing = gridSize() / 2;
35
- var editorItemTheme = {
36
- borderRadius: 0,
37
- beforeItemSpacing: {
38
- compact: itemSpacing
39
- },
40
- padding: {
41
- compact: {
42
- bottom: padding,
43
- left: padding,
44
- right: padding,
45
- top: padding
46
- }
47
- },
48
- height: {
49
- compact: menuItemDimensions.height
50
- }
51
- };
52
32
 
53
33
  var Dropdown = /*#__PURE__*/function (_Component) {
54
34
  _inherits(Dropdown, _Component);
@@ -76,10 +56,9 @@ var Dropdown = /*#__PURE__*/function (_Component) {
76
56
  }, items.filter(function (item) {
77
57
  return !item.hidden;
78
58
  }).map(function (item, idx) {
79
- var itemContent = jsx(Item, {
59
+ var itemContent = jsx(ButtonItem, {
80
60
  key: idx,
81
- isCompact: true,
82
- elemBefore: _this.renderSelected(item, intl),
61
+ iconBefore: _this.renderSelected(item, intl),
83
62
  onClick: function onClick() {
84
63
  /**
85
64
  * The order of dispatching the event and hide() is important, because
@@ -92,7 +71,9 @@ var Dropdown = /*#__PURE__*/function (_Component) {
92
71
  },
93
72
  "data-testid": item.testId,
94
73
  isDisabled: item.disabled,
95
- theme: _defineProperty({}, itemThemeNamespace, editorItemTheme)
74
+ onMouseDown: function onMouseDown(e) {
75
+ e.preventDefault();
76
+ }
96
77
  }, item.title);
97
78
 
98
79
  if (item.tooltip) {