@atlaskit/editor-core 171.0.0 → 172.0.1

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 (303) hide show
  1. package/CHANGELOG.md +96 -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/table/ui/common-styles.js +1 -1
  58. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/keymaps.js +43 -32
  59. package/dist/cjs/plugins/toolbar-lists-indentation/index.js +33 -13
  60. package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +122 -0
  61. package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +18 -12
  62. package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +10 -10
  63. package/dist/cjs/plugins/toolbar-lists-indentation/ui/index.js +7 -1
  64. package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +40 -19
  65. package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +10 -0
  66. package/dist/cjs/types/browser.js +6 -0
  67. package/dist/cjs/ui/Addon/click-area-helper.js +40 -19
  68. package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -2
  69. package/dist/cjs/ui/ContentStyles/index.js +1 -3
  70. package/dist/cjs/ui/DropList/index.js +215 -0
  71. package/dist/cjs/ui/Dropdown/index.js +2 -5
  72. package/dist/cjs/ui/DropdownMenu/index.js +140 -86
  73. package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +25 -14
  74. package/dist/cjs/ui/ElementBrowser/components/ElementList/cellSizeAndPositionGetter.js +2 -2
  75. package/dist/cjs/ui/ElementBrowser/components/ElementList/utils.js +28 -1
  76. package/dist/cjs/ui/ElementBrowser/constants.js +2 -7
  77. package/dist/cjs/ui/Layer/index.js +245 -0
  78. package/dist/cjs/ui/Layer/internal/helpers.js +70 -0
  79. package/dist/cjs/ui/PortalProvider/index.js +7 -26
  80. package/dist/cjs/version-wrapper.js +1 -1
  81. package/dist/cjs/version.json +1 -1
  82. package/dist/es2019/create-editor/ReactEditorView.js +15 -4
  83. package/dist/es2019/create-editor/create-plugins-list.js +21 -11
  84. package/dist/es2019/editor.js +9 -23
  85. package/dist/es2019/labs/next/internal/hooks/use-editor/index.js +6 -1
  86. package/dist/es2019/labs/next/presets/default.js +1 -1
  87. package/dist/es2019/nodeviews/context-adapter.js +2 -2
  88. package/dist/es2019/plugins/analytics/plugin.js +19 -4
  89. package/dist/es2019/plugins/base/index.js +3 -3
  90. package/dist/es2019/plugins/base/pm-plugins/disable-spell-checking.js +70 -0
  91. package/dist/es2019/plugins/card/index.js +1 -1
  92. package/dist/es2019/plugins/card/nodeviews/embedCard.js +1 -2
  93. package/dist/es2019/plugins/card/toolbar.js +10 -5
  94. package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +5 -1
  95. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +7 -7
  96. package/dist/es2019/plugins/clipboard/pm-plugins/main.js +1 -2
  97. package/dist/es2019/plugins/code-block/actions.js +12 -0
  98. package/dist/es2019/plugins/code-block/index.js +4 -0
  99. package/dist/es2019/plugins/code-block/nodeviews/code-block.js +1 -1
  100. package/dist/es2019/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +112 -0
  101. package/dist/es2019/plugins/code-block/pm-plugins/main.js +1 -21
  102. package/dist/es2019/plugins/code-block/styles.js +2 -159
  103. package/dist/es2019/plugins/code-block/toolbar.js +8 -0
  104. package/dist/es2019/plugins/code-block/ui/class-names.js +1 -2
  105. package/dist/es2019/plugins/copy-button/commands.js +35 -15
  106. package/dist/es2019/plugins/copy-button/toolbar.js +29 -0
  107. package/dist/es2019/plugins/copy-button/utils.js +15 -27
  108. package/dist/es2019/plugins/expand/toolbar.js +4 -1
  109. package/dist/es2019/plugins/extension/toolbar.js +4 -1
  110. package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +1 -1
  111. package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -1
  112. package/dist/es2019/plugins/extension/ui/Extension/styles.js +1 -3
  113. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +27 -15
  114. package/dist/es2019/plugins/feedback-dialog/index.js +1 -1
  115. package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +0 -19
  116. package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +14 -29
  117. package/dist/es2019/plugins/hyperlink/Toolbar.js +11 -5
  118. package/dist/es2019/plugins/hyperlink/index.js +4 -4
  119. package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/index.js +24 -0
  120. package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/useEscapeClickaway.js +28 -0
  121. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +50 -9
  122. package/dist/es2019/plugins/indentation/commands/index.js +24 -9
  123. package/dist/es2019/plugins/indentation/commands/utils.js +8 -3
  124. package/dist/es2019/plugins/indentation/pm-plugins/keymap.js +5 -4
  125. package/dist/es2019/plugins/layout/toolbar.js +2 -1
  126. package/dist/es2019/plugins/media/toolbar/index.js +10 -3
  127. package/dist/es2019/plugins/mentions/analytics.js +1 -1
  128. package/dist/es2019/plugins/panel/toolbar.js +1 -1
  129. package/dist/es2019/plugins/paste/edge-cases/index.js +15 -3
  130. package/dist/es2019/plugins/paste/handlers.js +27 -2
  131. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +12 -3
  132. package/dist/es2019/plugins/paste/pm-plugins/main.js +24 -4
  133. package/dist/es2019/plugins/status/analytics.js +1 -1
  134. package/dist/es2019/plugins/table/toolbar.js +1 -1
  135. package/dist/es2019/plugins/table/ui/common-styles.js +2 -0
  136. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/keymaps.js +10 -10
  137. package/dist/es2019/plugins/toolbar-lists-indentation/index.js +23 -4
  138. package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +104 -0
  139. package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +18 -12
  140. package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +10 -10
  141. package/dist/es2019/plugins/toolbar-lists-indentation/ui/index.js +7 -1
  142. package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +38 -16
  143. package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +9 -0
  144. package/dist/es2019/types/browser.js +2 -0
  145. package/dist/es2019/ui/Addon/click-area-helper.js +37 -18
  146. package/dist/es2019/ui/Appearance/Comment/Comment.js +2 -2
  147. package/dist/es2019/ui/ContentStyles/index.js +5 -9
  148. package/dist/es2019/ui/DropList/index.js +186 -0
  149. package/dist/es2019/ui/Dropdown/index.js +2 -6
  150. package/dist/es2019/ui/DropdownMenu/index.js +124 -75
  151. package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +11 -22
  152. package/dist/es2019/ui/ElementBrowser/components/ElementList/cellSizeAndPositionGetter.js +3 -3
  153. package/dist/es2019/ui/ElementBrowser/components/ElementList/utils.js +26 -2
  154. package/dist/es2019/ui/ElementBrowser/constants.js +1 -4
  155. package/dist/es2019/ui/Layer/index.js +195 -0
  156. package/dist/es2019/ui/Layer/internal/helpers.js +62 -0
  157. package/dist/es2019/ui/PortalProvider/index.js +5 -23
  158. package/dist/es2019/version-wrapper.js +1 -1
  159. package/dist/es2019/version.json +1 -1
  160. package/dist/esm/create-editor/ReactEditorView.js +13 -4
  161. package/dist/esm/create-editor/create-plugins-list.js +21 -12
  162. package/dist/esm/editor.js +9 -23
  163. package/dist/esm/labs/next/internal/hooks/use-editor/index.js +6 -1
  164. package/dist/esm/labs/next/presets/default.js +1 -1
  165. package/dist/esm/nodeviews/context-adapter.js +2 -2
  166. package/dist/esm/plugins/analytics/plugin.js +24 -11
  167. package/dist/esm/plugins/base/index.js +3 -3
  168. package/dist/esm/plugins/base/pm-plugins/disable-spell-checking.js +72 -0
  169. package/dist/esm/plugins/card/index.js +1 -1
  170. package/dist/esm/plugins/card/nodeviews/embedCard.js +1 -2
  171. package/dist/esm/plugins/card/toolbar.js +11 -5
  172. package/dist/esm/plugins/card/ui/EditLinkToolbar.js +5 -1
  173. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +7 -7
  174. package/dist/esm/plugins/clipboard/pm-plugins/main.js +1 -2
  175. package/dist/esm/plugins/code-block/actions.js +12 -0
  176. package/dist/esm/plugins/code-block/index.js +6 -0
  177. package/dist/esm/plugins/code-block/nodeviews/code-block.js +2 -4
  178. package/dist/esm/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +112 -0
  179. package/dist/esm/plugins/code-block/pm-plugins/main.js +1 -20
  180. package/dist/esm/plugins/code-block/styles.js +4 -32
  181. package/dist/esm/plugins/code-block/toolbar.js +8 -0
  182. package/dist/esm/plugins/code-block/ui/class-names.js +1 -2
  183. package/dist/esm/plugins/copy-button/commands.js +35 -15
  184. package/dist/esm/plugins/copy-button/toolbar.js +31 -0
  185. package/dist/esm/plugins/copy-button/utils.js +14 -29
  186. package/dist/esm/plugins/expand/toolbar.js +6 -2
  187. package/dist/esm/plugins/extension/toolbar.js +4 -1
  188. package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +1 -1
  189. package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -1
  190. package/dist/esm/plugins/extension/ui/Extension/styles.js +3 -4
  191. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +28 -16
  192. package/dist/esm/plugins/feedback-dialog/index.js +1 -1
  193. package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +0 -21
  194. package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +8 -27
  195. package/dist/esm/plugins/hyperlink/Toolbar.js +144 -135
  196. package/dist/esm/plugins/hyperlink/index.js +4 -4
  197. package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/index.js +26 -0
  198. package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/useEscapeClickaway.js +28 -0
  199. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +46 -5
  200. package/dist/esm/plugins/indentation/commands/index.js +30 -9
  201. package/dist/esm/plugins/indentation/commands/utils.js +12 -8
  202. package/dist/esm/plugins/indentation/pm-plugins/keymap.js +5 -4
  203. package/dist/esm/plugins/layout/toolbar.js +2 -1
  204. package/dist/esm/plugins/media/toolbar/index.js +12 -5
  205. package/dist/esm/plugins/mentions/analytics.js +1 -1
  206. package/dist/esm/plugins/panel/toolbar.js +1 -1
  207. package/dist/esm/plugins/paste/edge-cases/index.js +15 -3
  208. package/dist/esm/plugins/paste/handlers.js +23 -2
  209. package/dist/esm/plugins/paste/pm-plugins/analytics.js +13 -3
  210. package/dist/esm/plugins/paste/pm-plugins/main.js +23 -4
  211. package/dist/esm/plugins/status/analytics.js +1 -1
  212. package/dist/esm/plugins/table/toolbar.js +1 -1
  213. package/dist/esm/plugins/table/ui/common-styles.js +1 -1
  214. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/keymaps.js +37 -31
  215. package/dist/esm/plugins/toolbar-lists-indentation/index.js +32 -13
  216. package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +105 -0
  217. package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +18 -12
  218. package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +10 -10
  219. package/dist/esm/plugins/toolbar-lists-indentation/ui/index.js +7 -1
  220. package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +38 -20
  221. package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +9 -0
  222. package/dist/esm/types/browser.js +2 -0
  223. package/dist/esm/ui/Addon/click-area-helper.js +37 -18
  224. package/dist/esm/ui/Appearance/Comment/Comment.js +2 -2
  225. package/dist/esm/ui/ContentStyles/index.js +2 -4
  226. package/dist/esm/ui/DropList/index.js +203 -0
  227. package/dist/esm/ui/Dropdown/index.js +2 -6
  228. package/dist/esm/ui/DropdownMenu/index.js +134 -88
  229. package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +27 -17
  230. package/dist/esm/ui/ElementBrowser/components/ElementList/cellSizeAndPositionGetter.js +3 -3
  231. package/dist/esm/ui/ElementBrowser/components/ElementList/utils.js +26 -2
  232. package/dist/esm/ui/ElementBrowser/constants.js +1 -4
  233. package/dist/esm/ui/Layer/index.js +228 -0
  234. package/dist/esm/ui/Layer/internal/helpers.js +62 -0
  235. package/dist/esm/ui/PortalProvider/index.js +7 -26
  236. package/dist/esm/version-wrapper.js +1 -1
  237. package/dist/esm/version.json +1 -1
  238. package/dist/types/labs/next/presets/default.d.ts +2 -0
  239. package/dist/types/plugins/analytics/plugin.d.ts +5 -1
  240. package/dist/types/plugins/analytics/types/cut-copy-events.d.ts +2 -0
  241. package/dist/types/plugins/analytics/types/general-events.d.ts +1 -0
  242. package/dist/types/plugins/analytics/types/paste-events.d.ts +1 -0
  243. package/dist/types/plugins/base/index.d.ts +1 -1
  244. package/dist/types/plugins/base/pm-plugins/{fix-chrome-spell-checking.d.ts → disable-spell-checking.d.ts} +0 -0
  245. package/dist/types/plugins/card/index.d.ts +2 -7
  246. package/dist/types/plugins/card/nodeviews/genericCard.d.ts +2 -1
  247. package/dist/types/plugins/card/toolbar.d.ts +3 -5
  248. package/dist/types/plugins/card/types.d.ts +2 -0
  249. package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +4 -1
  250. package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +2 -1
  251. package/dist/types/plugins/clipboard/pm-plugins/main.d.ts +3 -0
  252. package/dist/types/plugins/code-block/nodeviews/code-block.d.ts +1 -1
  253. package/dist/types/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.d.ts +11 -0
  254. package/dist/types/plugins/code-block/styles.d.ts +0 -1
  255. package/dist/types/plugins/code-block/ui/class-names.d.ts +0 -1
  256. package/dist/types/plugins/copy-button/commands.d.ts +2 -2
  257. package/dist/types/plugins/copy-button/toolbar.d.ts +7 -0
  258. package/dist/types/plugins/copy-button/utils.d.ts +7 -6
  259. package/dist/types/plugins/floating-toolbar/types.d.ts +1 -2
  260. package/dist/types/plugins/hyperlink/Toolbar.d.ts +2 -1
  261. package/dist/types/plugins/hyperlink/index.d.ts +2 -2
  262. package/dist/types/plugins/hyperlink/types.d.ts +30 -0
  263. package/dist/types/plugins/hyperlink/ui/EditorLinkPicker/index.d.ts +7 -0
  264. package/dist/types/plugins/hyperlink/ui/EditorLinkPicker/useEscapeClickaway.d.ts +2 -0
  265. package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +4 -3
  266. package/dist/types/plugins/indentation/commands/index.d.ts +6 -2
  267. package/dist/types/plugins/indentation/commands/utils.d.ts +8 -2
  268. package/dist/types/plugins/paste/edge-cases/index.d.ts +3 -2
  269. package/dist/types/plugins/paste/handlers.d.ts +1 -0
  270. package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +7 -1
  271. package/dist/types/plugins/tasks-and-decisions/pm-plugins/keymaps.d.ts +5 -0
  272. package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +2 -1
  273. package/dist/types/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts +14 -0
  274. package/dist/types/plugins/toolbar-lists-indentation/types.d.ts +2 -0
  275. package/dist/types/plugins/toolbar-lists-indentation/ui/index.d.ts +2 -0
  276. package/dist/types/types/browser.d.ts +10 -0
  277. package/dist/types/types/editor-props.d.ts +6 -5
  278. package/dist/types/types/feature-flags.d.ts +29 -24
  279. package/dist/types/types/index.d.ts +1 -0
  280. package/dist/types/ui/Addon/click-area-helper.d.ts +10 -0
  281. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
  282. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  283. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  284. package/dist/types/ui/DropList/index.d.ts +22 -0
  285. package/dist/types/ui/Dropdown/index.d.ts +2 -1
  286. package/dist/types/ui/DropdownMenu/index.d.ts +0 -1
  287. package/dist/types/ui/ElementBrowser/components/ElementList/cellSizeAndPositionGetter.d.ts +1 -1
  288. package/dist/types/ui/ElementBrowser/components/ElementList/utils.d.ts +1 -0
  289. package/dist/types/ui/ElementBrowser/constants.d.ts +1 -3
  290. package/dist/types/ui/Layer/index.d.ts +47 -0
  291. package/dist/types/ui/Layer/internal/helpers.d.ts +5 -0
  292. package/package.json +23 -18
  293. package/dist/cjs/plugins/base/pm-plugins/fix-chrome-spell-checking.js +0 -37
  294. package/dist/cjs/plugins/code-block/nodeviews/highlighting-code-block.js +0 -195
  295. package/dist/cjs/utils/check-if-mobile-bridge.js +0 -19
  296. package/dist/es2019/plugins/base/pm-plugins/fix-chrome-spell-checking.js +0 -22
  297. package/dist/es2019/plugins/code-block/nodeviews/highlighting-code-block.js +0 -152
  298. package/dist/es2019/utils/check-if-mobile-bridge.js +0 -12
  299. package/dist/esm/plugins/base/pm-plugins/fix-chrome-spell-checking.js +0 -24
  300. package/dist/esm/plugins/code-block/nodeviews/highlighting-code-block.js +0 -178
  301. package/dist/esm/utils/check-if-mobile-bridge.js +0 -12
  302. package/dist/types/plugins/code-block/nodeviews/highlighting-code-block.d.ts +0 -48
  303. package/dist/types/utils/check-if-mobile-bridge.d.ts +0 -1
@@ -37,9 +37,19 @@ function createPlugin(options) {
37
37
  // that has an analytics event.
38
38
  if (hasRequiredPerformanceAPIs && tr.docChanged && payload.action !== ACTION.INSERTED && payload.action !== ACTION.DELETED) {
39
39
  const measureName = `${payload.actionSubject}:${payload.action}:${payload.actionSubjectId}`;
40
- measureRender(measureName, duration => {
40
+ measureRender( // NOTE this name could be resulting in misleading data -- where if multiple payloads are
41
+ // received before a render completes -- the measurement value will be inaccurate (this is
42
+ // due to measureRender requiring unique measureNames)
43
+ measureName, ({
44
+ duration,
45
+ distortedDuration
46
+ }) => {
41
47
  fireAnalyticsEvent(pluginState.createAnalyticsEvent)({
42
- payload: extendPayload(payload, duration),
48
+ payload: extendPayload({
49
+ payload,
50
+ duration,
51
+ distortedDuration
52
+ }),
43
53
  channel
44
54
  });
45
55
  });
@@ -103,10 +113,15 @@ const analyticsPlugin = options => ({
103
113
 
104
114
  });
105
115
 
106
- export function extendPayload(payload, duration) {
116
+ export function extendPayload({
117
+ payload,
118
+ duration,
119
+ distortedDuration
120
+ }) {
107
121
  return { ...payload,
108
122
  attributes: { ...payload.attributes,
109
- duration
123
+ duration,
124
+ distortedDuration
110
125
  },
111
126
  eventType: EVENT_TYPE.OPERATIONAL
112
127
  };
@@ -5,7 +5,7 @@ import { doc, paragraph, text } from '@atlaskit/adf-schema';
5
5
  import filterStepsPlugin from './pm-plugins/filter-steps';
6
6
  import focusHandlerPlugin from './pm-plugins/focus-handler';
7
7
  import fixChrome88SelectionPlugin from './pm-plugins/fix-chrome-88-selection';
8
- import fixChromeSpellCheckingPlugin from './pm-plugins/fix-chrome-spell-checking';
8
+ import disableSpellcheckingPlugin from './pm-plugins/disable-spell-checking';
9
9
  import contextIdentifierPlugin from './pm-plugins/context-identifier';
10
10
  import newlinePreserveMarksPlugin from './pm-plugins/newline-preserve-marks';
11
11
  import inlineCursorTargetPlugin from './pm-plugins/inline-cursor-target';
@@ -102,8 +102,8 @@ const basePlugin = options => ({
102
102
  }
103
103
 
104
104
  plugins.push({
105
- name: 'fixChromeSpellCheckingPlugin',
106
- plugin: () => fixChromeSpellCheckingPlugin()
105
+ name: 'disableSpellcheckingPlugin',
106
+ plugin: () => disableSpellcheckingPlugin()
107
107
  });
108
108
  return plugins;
109
109
  },
@@ -0,0 +1,70 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import { PluginKey } from 'prosemirror-state';
3
+ import { getFeatureFlags } from '../../feature-flags-context';
4
+ import { browser as browserEnv } from '@atlaskit/editor-common/utils';
5
+
6
+ function getCurrentBrowserAndVersion() {
7
+ switch (true) {
8
+ case browserEnv.chrome === true:
9
+ return {
10
+ browser: 'chrome',
11
+ version: browserEnv.chrome_version
12
+ };
13
+
14
+ case browserEnv.ie === true:
15
+ return {
16
+ browser: 'ie',
17
+ version: browserEnv.ie_version
18
+ };
19
+
20
+ case browserEnv.gecko === true:
21
+ return {
22
+ browser: 'gecko',
23
+ version: browserEnv.gecko_version
24
+ };
25
+
26
+ case browserEnv.safari === true:
27
+ return {
28
+ browser: 'safari',
29
+ version: browserEnv.safari_version
30
+ };
31
+ }
32
+
33
+ return undefined;
34
+ }
35
+
36
+ export default (() => new SafePlugin({
37
+ key: new PluginKey('disableSpellchecking'),
38
+ props: {
39
+ attributes: editorState => {
40
+ const featureFlags = getFeatureFlags(editorState) || undefined;
41
+
42
+ if (!featureFlags) {
43
+ return;
44
+ }
45
+
46
+ const browserConfigFeatureFlag = featureFlags.disableSpellcheckByBrowser;
47
+ const userCurrentBrowserAndVersion = getCurrentBrowserAndVersion();
48
+
49
+ if (!userCurrentBrowserAndVersion || !browserConfigFeatureFlag) {
50
+ return;
51
+ }
52
+
53
+ const browserVersionDisableRange = browserConfigFeatureFlag[userCurrentBrowserAndVersion.browser];
54
+
55
+ if (!browserVersionDisableRange || !browserEnv[userCurrentBrowserAndVersion.browser]) {
56
+ return;
57
+ }
58
+
59
+ const shouldDisableSpellcheck = !!browserVersionDisableRange.maximum ? userCurrentBrowserAndVersion.version >= browserVersionDisableRange.minimum && userCurrentBrowserAndVersion.version <= browserVersionDisableRange.maximum : browserEnv[userCurrentBrowserAndVersion.browser] && userCurrentBrowserAndVersion.version >= browserVersionDisableRange.minimum;
60
+
61
+ if (shouldDisableSpellcheck) {
62
+ return {
63
+ spellcheck: 'false'
64
+ };
65
+ }
66
+
67
+ return;
68
+ }
69
+ }
70
+ }));
@@ -62,7 +62,7 @@ const cardPlugin = options => {
62
62
  },
63
63
 
64
64
  pluginsOptions: {
65
- floatingToolbar: floatingToolbar(options, options.platform)
65
+ floatingToolbar: floatingToolbar(options, options.platform, options.linkPicker)
66
66
  }
67
67
  };
68
68
  };
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import React from 'react';
4
- import { Card as SmartCard } from '@atlaskit/smart-card';
4
+ import { Card as SmartCard, EmbedResizeMessageListener } from '@atlaskit/smart-card';
5
5
  import PropTypes from 'prop-types';
6
6
  import rafSchedule from 'raf-schd';
7
7
  import { Card } from './genericCard';
@@ -15,7 +15,6 @@ import { createDisplayGrid } from '../../../plugins/grid';
15
15
  import WithPluginState from '../../../ui/WithPluginState';
16
16
  import { pluginKey as widthPluginKey } from '../../width';
17
17
  import { floatingLayouts, isRichMediaInsideOfBlockNode } from '../../../utils/rich-media-utils';
18
- import { EmbedResizeMessageListener } from '@atlaskit/smart-card';
19
18
  import { pluginKey as tableResizePluginKey } from '../../table/pm-plugins/table-resizing';
20
19
  import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
21
20
  export class EmbedCardComponent extends React.PureComponent {
@@ -19,6 +19,7 @@ import { messages } from './messages';
19
19
  import buildLayoutButtons from '../../ui/MediaAndEmbedsToolbar';
20
20
  import { buildVisitedLinkPayload } from '../../utils/linking-utils';
21
21
  import { FLOATING_TOOLBAR_LINKPICKER_CLASSNAME } from './styles';
22
+ import { getCopyButtonConfig, showCopyButton } from '../copy-button/toolbar';
22
23
  export const removeCard = (state, dispatch) => {
23
24
  if (!(state.selection instanceof NodeSelection)) {
24
25
  return false;
@@ -95,6 +96,9 @@ const generateDeleteButton = (node, state, intl) => {
95
96
  title: intl.formatMessage(commonMessages.remove),
96
97
  onClick: removeCard
97
98
  };
99
+ const copyButton = [...(state && showCopyButton(state) ? [getCopyButtonConfig(state, intl.formatMessage, node.type), {
100
+ type: 'separator'
101
+ }] : [])];
98
102
 
99
103
  if (node.type === inlineCard) {
100
104
  const unlinkButtonWithSeparator = [{
@@ -106,13 +110,13 @@ const generateDeleteButton = (node, state, intl) => {
106
110
  }, {
107
111
  type: 'separator'
108
112
  }];
109
- return [...unlinkButtonWithSeparator, removeButton];
113
+ return [...unlinkButtonWithSeparator, ...copyButton, removeButton];
110
114
  }
111
115
 
112
- return [removeButton];
116
+ return [...copyButton, removeButton];
113
117
  };
114
118
 
115
- const generateToolbarItems = (state, intl, providerFactory, cardOptions, platform) => node => {
119
+ const generateToolbarItems = (state, intl, providerFactory, cardOptions, platform, linkPicker) => node => {
116
120
  const {
117
121
  url
118
122
  } = titleUrlPairFromNode(node);
@@ -137,6 +141,7 @@ const generateToolbarItems = (state, intl, providerFactory, cardOptions, platfor
137
141
  if (pluginState.showLinkingToolbar && platform !== 'mobile') {
138
142
  return [buildEditLinkToolbar({
139
143
  providerFactory,
144
+ linkPicker,
140
145
  node
141
146
  })];
142
147
  } else {
@@ -203,7 +208,7 @@ const generateToolbarItems = (state, intl, providerFactory, cardOptions, platfor
203
208
  }
204
209
  };
205
210
 
206
- export const floatingToolbar = (cardOptions, platform) => {
211
+ export const floatingToolbar = (cardOptions, platform, linkPickerOptions) => {
207
212
  return (state, intl, providerFactory) => {
208
213
  const {
209
214
  inlineCard,
@@ -249,7 +254,7 @@ export const floatingToolbar = (cardOptions, platform) => {
249
254
 
250
255
  return element;
251
256
  },
252
- items: generateToolbarItems(state, intl, providerFactory, cardOptions, platform),
257
+ items: generateToolbarItems(state, intl, providerFactory, cardOptions, platform, linkPickerOptions),
253
258
  ...(pluginState.showLinkingToolbar ? editLinkToolbarConfig : {})
254
259
  };
255
260
  };
@@ -27,6 +27,7 @@ export class EditLinkToolbar extends React.Component {
27
27
 
28
28
  render() {
29
29
  const {
30
+ linkPickerOptions,
30
31
  providerFactory,
31
32
  url,
32
33
  text,
@@ -35,6 +36,7 @@ export class EditLinkToolbar extends React.Component {
35
36
  } = this.props;
36
37
  return /*#__PURE__*/React.createElement(HyperlinkToolbar, {
37
38
  view: view,
39
+ linkPickerOptions: linkPickerOptions,
38
40
  providerFactory: providerFactory,
39
41
  displayUrl: url,
40
42
  displayText: text,
@@ -65,7 +67,8 @@ export const editLink = (state, dispatch) => {
65
67
  };
66
68
  export const buildEditLinkToolbar = ({
67
69
  providerFactory,
68
- node
70
+ node,
71
+ linkPicker
69
72
  }) => {
70
73
  return {
71
74
  type: 'custom',
@@ -79,6 +82,7 @@ export const buildEditLinkToolbar = ({
79
82
  return /*#__PURE__*/React.createElement(EditLinkToolbar, {
80
83
  key: idx,
81
84
  view: view,
85
+ linkPickerOptions: linkPicker,
82
86
  providerFactory: providerFactory,
83
87
  url: displayInfo.url,
84
88
  text: displayInfo.title || '',
@@ -37,8 +37,8 @@ export class LinkToolbarAppearance extends React.Component {
37
37
  }
38
38
  }
39
39
 
40
- const isSmartLinkSupportedInParent = isSupportedInParent(editorState, Fragment.from(editorState.schema.nodes.blockCard.createChecked({})), currentAppearance);
41
- const tooltip = isSmartLinkSupportedInParent ? undefined : parentNodeName(editorState, intl);
40
+ const isBlockCardLinkSupportedInParent = isSupportedInParent(editorState, Fragment.from(editorState.schema.nodes.blockCard.createChecked({})), currentAppearance);
41
+ const isEmbedCardLinkSupportedInParent = allowEmbeds ? isSupportedInParent(editorState, Fragment.from(editorState.schema.nodes.embedCard.createChecked({})), currentAppearance) : false;
42
42
  const embedOption = allowEmbeds && preview && {
43
43
  appearance: 'embed',
44
44
  title: intl.formatMessage(messages.embed),
@@ -46,8 +46,8 @@ export class LinkToolbarAppearance extends React.Component {
46
46
  selected: currentAppearance === 'embed',
47
47
  hidden: false,
48
48
  testId: 'embed-appearance',
49
- disabled: !isSmartLinkSupportedInParent,
50
- tooltip
49
+ disabled: !isEmbedCardLinkSupportedInParent,
50
+ tooltip: isEmbedCardLinkSupportedInParent ? undefined : getUnavailableMessage(editorState, intl)
51
51
  };
52
52
  const options = [{
53
53
  title: intl.formatMessage(messages.url),
@@ -66,8 +66,8 @@ export class LinkToolbarAppearance extends React.Component {
66
66
  onClick: setSelectedCardAppearance('block'),
67
67
  selected: currentAppearance === 'block',
68
68
  testId: 'block-appearance',
69
- disabled: !isSmartLinkSupportedInParent,
70
- tooltip
69
+ disabled: !isBlockCardLinkSupportedInParent,
70
+ tooltip: isBlockCardLinkSupportedInParent ? undefined : getUnavailableMessage(editorState, intl)
71
71
  }];
72
72
 
73
73
  const dispatchCommand = fn => {
@@ -128,7 +128,7 @@ _defineProperty(LinkToolbarAppearance, "contextTypes", {
128
128
  contextAdapter: PropTypes.object
129
129
  });
130
130
 
131
- const parentNodeName = (state, intl) => {
131
+ const getUnavailableMessage = (state, intl) => {
132
132
  try {
133
133
  const parentNode = state.selection.$from.node(1);
134
134
  const parentName = intl.formatMessage(nodeNames[parentNode.type.name]);
@@ -107,8 +107,7 @@ export const sendClipboardAnalytics = (view, dispatchAnalyticsEvent, action) =>
107
107
 
108
108
  return false;
109
109
  };
110
-
111
- const getAnalyticsPayload = (state, action) => {
110
+ export const getAnalyticsPayload = (state, action) => {
112
111
  const {
113
112
  selection,
114
113
  doc
@@ -1,6 +1,7 @@
1
1
  import { findParentNodeOfType, findSelectedNodeOfType, removeSelectedNode, removeParentNodeOfType, isNodeSelection } from 'prosemirror-utils';
2
2
  import { NodeSelection } from 'prosemirror-state';
3
3
  import { pluginKey } from './plugin-key';
4
+ import { copySelectionPluginKey } from './pm-plugins/codeBlockCopySelectionPlugin';
4
5
  import { ACTIONS } from './pm-plugins/actions';
5
6
  import { copyToClipboard } from '../../utils/clipboard';
6
7
  import { addAnalytics } from '../analytics/utils';
@@ -75,6 +76,7 @@ export const copyContentToClipboard = (state, dispatch) => {
75
76
  type: ACTIONS.SET_COPIED_TO_CLIPBOARD,
76
77
  data: true
77
78
  });
79
+ copyToClipboardTr.setMeta(copySelectionPluginKey, 'remove-selection');
78
80
 
79
81
  if (dispatch) {
80
82
  dispatch(copyToClipboardTr);
@@ -95,10 +97,20 @@ export const resetCopiedState = (state, dispatch) => {
95
97
  type: ACTIONS.SET_COPIED_TO_CLIPBOARD,
96
98
  data: false
97
99
  });
100
+ resetCopiedStateTr.setMeta(copySelectionPluginKey, 'remove-selection');
98
101
 
99
102
  if (dispatch) {
100
103
  dispatch(resetCopiedStateTr);
101
104
  }
105
+ } else {
106
+ const clearSelectionStateTransaction = state.tr;
107
+ clearSelectionStateTransaction.setMeta(copySelectionPluginKey, 'remove-selection'); // note: dispatch should always be defined when called from the
108
+ // floating toolbar. Howver the Command type which floating toolbar uses
109
+ // (and resetCopiedState) uses suggests it's optional.
110
+
111
+ if (dispatch) {
112
+ dispatch(clearSelectionStateTransaction);
113
+ }
102
114
  }
103
115
 
104
116
  return true;
@@ -4,6 +4,7 @@ import { createPlugin } from './pm-plugins/main';
4
4
  import { getToolbarConfig } from './toolbar';
5
5
  import keymap from './pm-plugins/keymaps';
6
6
  import ideUX from './pm-plugins/ide-ux';
7
+ import { codeBlockCopySelectionPlugin } from './pm-plugins/codeBlockCopySelectionPlugin';
7
8
  import { addAnalytics, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD, EVENT_TYPE } from '../analytics';
8
9
  import { IconCode } from '../quick-insert/assets';
9
10
  import { messages } from '../block-type/messages';
@@ -36,6 +37,9 @@ const codeBlockPlugin = options => ({
36
37
  plugin: ({
37
38
  schema
38
39
  }) => keymap(schema)
40
+ }, {
41
+ name: 'codeBlockCopySelection',
42
+ plugin: () => codeBlockCopySelectionPlugin()
39
43
  }];
40
44
  },
41
45
 
@@ -134,4 +134,4 @@ export class CodeBlockView {
134
134
  }
135
135
 
136
136
  }
137
- export const codeBlockNodeView = () => (node, view, getPos) => new CodeBlockView(node, view, getPos);
137
+ export const codeBlockNodeView = (node, view, getPos) => new CodeBlockView(node, view, getPos);
@@ -0,0 +1,112 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import { PluginKey } from 'prosemirror-state';
3
+ import { Decoration, DecorationSet } from 'prosemirror-view';
4
+ import { getSelectedNodeOrNodeParentByNodeType } from '../../copy-button/utils';
5
+ export const copySelectionPluginKey = new PluginKey('codeBlockCopySelectionPlugin');
6
+
7
+ function getSelectionDecorationStartAndEnd({
8
+ state,
9
+ transaction
10
+ }) {
11
+ const codeBlockNode = getSelectedNodeOrNodeParentByNodeType({
12
+ nodeType: state.schema.nodes.codeBlock,
13
+ selection: transaction.selection
14
+ });
15
+
16
+ if (!codeBlockNode) {
17
+ return {
18
+ decorationStartAndEnd: undefined
19
+ };
20
+ }
21
+
22
+ const decorationStartAndEnd = [codeBlockNode.start, codeBlockNode.start + codeBlockNode.node.nodeSize];
23
+ return {
24
+ decorationStartAndEnd
25
+ };
26
+ }
27
+
28
+ export function codeBlockCopySelectionPlugin() {
29
+ return new SafePlugin({
30
+ key: copySelectionPluginKey,
31
+ state: {
32
+ init() {
33
+ return {
34
+ decorationStartAndEnd: undefined
35
+ };
36
+ },
37
+
38
+ apply(transaction, currentCodeBlockCopySelectionPluginState, _oldState, newState) {
39
+ switch (transaction.getMeta(copySelectionPluginKey)) {
40
+ case 'show-selection':
41
+ {
42
+ return getSelectionDecorationStartAndEnd({
43
+ state: newState,
44
+ transaction
45
+ });
46
+ }
47
+
48
+ case 'remove-selection':
49
+ return {
50
+ decorationStartAndEnd: undefined
51
+ };
52
+
53
+ default:
54
+ // The contents of the code block can change while the selection is being shown
55
+ // (either from collab edits -- or from the user continuing to type while hovering
56
+ // the mouse over the copy button).
57
+ // This ensures the selection is updated in these cases.
58
+ if (currentCodeBlockCopySelectionPluginState.decorationStartAndEnd !== undefined) {
59
+ return getSelectionDecorationStartAndEnd({
60
+ state: newState,
61
+ transaction
62
+ });
63
+ }
64
+
65
+ return currentCodeBlockCopySelectionPluginState;
66
+ }
67
+ }
68
+
69
+ },
70
+ props: {
71
+ decorations(state) {
72
+ if (copySelectionPluginKey.getState(state).decorationStartAndEnd) {
73
+ const [start, end] = copySelectionPluginKey.getState(state).decorationStartAndEnd;
74
+ return DecorationSet.create(state.doc, [Decoration.inline(start, end, {
75
+ class: 'ProseMirror-fake-text-selection'
76
+ })]);
77
+ }
78
+
79
+ return DecorationSet.empty;
80
+ }
81
+
82
+ }
83
+ });
84
+ }
85
+ export function provideVisualFeedbackForCopyButton(state, dispatch) {
86
+ const tr = state.tr;
87
+ tr.setMeta(copySelectionPluginKey, 'show-selection'); // note: dispatch should always be defined when called from the
88
+ // floating toolbar. Howver the Command type which the floating toolbar
89
+ // uses suggests it's optional.
90
+ // Using the type here to protect against future refactors of the
91
+ // floating toolbar
92
+
93
+ if (dispatch) {
94
+ dispatch(tr);
95
+ }
96
+
97
+ return false;
98
+ }
99
+ export function removeVisualFeedbackForCopyButton(state, dispatch) {
100
+ const tr = state.tr;
101
+ tr.setMeta(copySelectionPluginKey, 'remove-selection'); // note: dispatch should always be defined when called from the
102
+ // floating toolbar. Howver the Command type which the floating toolbar
103
+ // uses suggests it's optional.
104
+ // Using the type here to protect against future refactors of the
105
+ // floating toolbar
106
+
107
+ if (dispatch) {
108
+ dispatch(tr);
109
+ }
110
+
111
+ return false;
112
+ }
@@ -1,24 +1,19 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { browser } from '@atlaskit/editor-common/utils';
3
3
  import { NodeSelection } from 'prosemirror-state';
4
- import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
5
4
  import { codeBlockNodeView } from '../nodeviews/code-block';
6
- import { highlightingCodeBlockNodeView } from '../nodeviews/highlighting-code-block';
7
5
  import { createSelectionClickHandler } from '../../selection/utils';
8
6
  import { pluginKey } from '../plugin-key';
9
7
  import { ACTIONS } from './actions';
10
8
  import { ignoreFollowingMutations, resetShouldIgnoreFollowingMutations } from '../actions';
11
9
  import { findCodeBlock } from '../utils';
12
10
  import { codeBlockClassNames } from '../ui/class-names';
13
- import { getFeatureFlags } from '../../feature-flags-context';
14
11
  export const createPlugin = ({
15
12
  useLongPressSelection = false,
16
13
  getIntl,
17
14
  appearance,
18
15
  allowCompositionInputOverride = false
19
16
  }) => {
20
- const intl = getIntl();
21
- const codeBidiWarningLabel = intl.formatMessage(codeBidiWarningMessages.label);
22
17
  const handleDOMEvents = {}; // ME-1599: Composition on mobile was causing the DOM observer to mutate the code block
23
18
  // incorrecly and lose content when pressing enter in the middle of a code block line.
24
19
 
@@ -102,22 +97,7 @@ export const createPlugin = ({
102
97
  key: pluginKey,
103
98
  props: {
104
99
  nodeViews: {
105
- codeBlock(node, view, getPos) {
106
- const featureFlags = getFeatureFlags(view.state); // The appearance being mobile indicates we are in an editor being
107
- // rendered by mobile bridge in a web view.
108
- // The tooltip is likely to have unexpected behaviour there, with being cut
109
- // off, so we disable it. This is also to keep the behaviour consistent with
110
- // the rendering in the mobile Native Renderer.
111
-
112
- const codeBidiWarningTooltipEnabled = appearance !== 'mobile';
113
- const createCodeBlockNodeView = featureFlags !== null && featureFlags !== void 0 && featureFlags.codeBlockSyntaxHighlighting ? highlightingCodeBlockNodeView({
114
- codeBidiWarnings: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.codeBidiWarnings,
115
- codeBidiWarningLabel,
116
- codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled
117
- }) : codeBlockNodeView();
118
- return createCodeBlockNodeView(node, view, getPos);
119
- }
120
-
100
+ codeBlock: codeBlockNodeView
121
101
  },
122
102
  handleClickOn: createSelectionClickHandler(['codeBlock'], target => !!(target.closest(`.${codeBlockClassNames.gutter}`) || target.classList.contains(codeBlockClassNames.content)), {
123
103
  useLongPressSelection