@atlaskit/editor-core 180.1.0 → 181.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 (426) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/cjs/actions/index.js +25 -10
  3. package/dist/cjs/analytics-api/attach-payload-into-transaction.js +1 -1
  4. package/dist/cjs/create-editor/ReactEditorView.js +0 -5
  5. package/dist/cjs/create-editor/ReactEditorViewInternal.js +73 -103
  6. package/dist/cjs/create-editor/create-plugins-list.js +37 -5
  7. package/dist/cjs/create-editor/feature-flags-from-props.js +31 -26
  8. package/dist/cjs/create-editor/preset-utils.js +27 -0
  9. package/dist/cjs/editor-next/editor-internal.js +2 -2
  10. package/dist/cjs/editor-next/editor-migration-component.js +18 -2
  11. package/dist/cjs/editor-next/hooks/useProviderFactory.js +4 -3
  12. package/dist/cjs/editor-next/index.js +13 -9
  13. package/dist/cjs/editor-next/utils/getProvidersFromEditorProps.js +41 -0
  14. package/dist/cjs/editor-next/utils/handleProviders.js +17 -22
  15. package/dist/cjs/editor.js +20 -13
  16. package/dist/cjs/keymaps/consts.js +1 -16
  17. package/dist/cjs/labs/next/presets/cxhtml.js +56 -55
  18. package/dist/cjs/labs/next/presets/default.js +15 -42
  19. package/dist/cjs/labs/next/presets/mobile.js +76 -89
  20. package/dist/cjs/labs/next/presets/universal.js +330 -257
  21. package/dist/cjs/labs/next/presets/useUniversalPreset.js +36 -0
  22. package/dist/cjs/plugins/analytics/plugin.js +6 -0
  23. package/dist/cjs/plugins/annotation/utils.js +2 -36
  24. package/dist/cjs/plugins/base/pm-plugins/react-nodeview.js +2 -7
  25. package/dist/cjs/plugins/block-type/pm-plugins/input-rule.js +0 -10
  26. package/dist/cjs/plugins/caption/index.js +0 -7
  27. package/dist/cjs/plugins/card/nodeviews/blockCard.js +9 -4
  28. package/dist/cjs/plugins/card/nodeviews/inlineCard.js +6 -2
  29. package/dist/cjs/plugins/card/pm-plugins/main.js +6 -3
  30. package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +4 -0
  31. package/dist/cjs/plugins/code-block/pm-plugins/main-state.js +2 -14
  32. package/dist/cjs/plugins/collab-edit/provider/index.js +1 -8
  33. package/dist/cjs/plugins/collab-edit/provider/types.js +1 -12
  34. package/dist/cjs/plugins/context-panel/index.js +1 -6
  35. package/dist/cjs/plugins/data-consumer/index.js +0 -8
  36. package/dist/cjs/plugins/date/utils/internal.js +0 -4
  37. package/dist/cjs/plugins/extension/commands.js +1 -8
  38. package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +9 -2
  39. package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +2 -2
  40. package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +1 -0
  41. package/dist/cjs/plugins/feedback-dialog/index.js +1 -4
  42. package/dist/cjs/plugins/floating-toolbar/ui/Button.js +7 -3
  43. package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +10 -5
  44. package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
  45. package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
  46. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +24 -8
  47. package/dist/cjs/plugins/floating-toolbar/utils.js +0 -12
  48. package/dist/cjs/plugins/fragment/index.js +0 -8
  49. package/dist/cjs/plugins/help-dialog/commands.js +2 -6
  50. package/dist/cjs/plugins/image-upload/pm-plugins/main.js +50 -12
  51. package/dist/cjs/plugins/layout/styles.js +10 -1
  52. package/dist/cjs/plugins/list/utils/find.js +0 -28
  53. package/dist/cjs/plugins/list/utils/indentation.js +1 -25
  54. package/dist/cjs/plugins/list/utils/node.js +0 -5
  55. package/dist/cjs/plugins/list/utils/selection.js +2 -15
  56. package/dist/cjs/plugins/media/utils/media-common.js +1 -20
  57. package/dist/cjs/plugins/mentions/nodeviews/mention.js +100 -16
  58. package/dist/cjs/plugins/mentions/type-ahead/index.js +1 -18
  59. package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +1 -3
  60. package/dist/cjs/plugins/mobile-dimensions/index.js +1 -4
  61. package/dist/cjs/plugins/paste/index.js +1 -2
  62. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +123 -87
  63. package/dist/cjs/plugins/paste/util/index.js +0 -46
  64. package/dist/cjs/plugins/quick-insert/assets/index.js +1 -27
  65. package/dist/cjs/plugins/selection/gap-cursor/actions.js +49 -44
  66. package/dist/cjs/plugins/status/utils.js +1 -15
  67. package/dist/cjs/plugins/text-color/pm-plugins/main.js +0 -1
  68. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
  69. package/dist/cjs/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
  70. package/dist/cjs/plugins/text-formatting/utils.js +1 -26
  71. package/dist/cjs/plugins/type-ahead/constants.js +1 -7
  72. package/dist/cjs/plugins/type-ahead/index.js +4 -1
  73. package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +6 -37
  74. package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +4 -2
  75. package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +41 -4
  76. package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +2 -0
  77. package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
  78. package/dist/cjs/plugins/type-ahead/utils.js +25 -24
  79. package/dist/cjs/test-utils.js +4 -12
  80. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +43 -8
  81. package/dist/cjs/ui/ColorPalette/index.js +18 -0
  82. package/dist/cjs/ui/ColorPickerButton/index.js +6 -2
  83. package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -0
  84. package/dist/cjs/ui/ConfigPanel/utils.js +4 -17
  85. package/dist/cjs/ui/ContentStyles/index.js +1 -1
  86. package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +1 -1
  87. package/dist/cjs/ui/ElementBrowser/constants.js +1 -3
  88. package/dist/cjs/ui/Resizer/utils.js +1 -3
  89. package/dist/cjs/ui/styles.js +3 -7
  90. package/dist/cjs/utils/get-editor-plugins.js +1 -3
  91. package/dist/cjs/utils/index.js +9 -269
  92. package/dist/cjs/utils/input-rules.js +1 -15
  93. package/dist/cjs/version-wrapper.js +1 -1
  94. package/dist/cjs/version.json +1 -1
  95. package/dist/es2019/actions/index.js +23 -9
  96. package/dist/es2019/analytics-api/attach-payload-into-transaction.js +1 -1
  97. package/dist/es2019/create-editor/ReactEditorView.js +0 -5
  98. package/dist/es2019/create-editor/ReactEditorViewInternal.js +67 -82
  99. package/dist/es2019/create-editor/create-plugins-list.js +32 -5
  100. package/dist/es2019/create-editor/feature-flags-from-props.js +31 -26
  101. package/dist/es2019/create-editor/preset-utils.js +15 -0
  102. package/dist/es2019/editor-next/editor-internal.js +2 -2
  103. package/dist/es2019/editor-next/editor-migration-component.js +19 -2
  104. package/dist/es2019/editor-next/hooks/useProviderFactory.js +4 -3
  105. package/dist/es2019/editor-next/index.js +13 -7
  106. package/dist/es2019/editor-next/utils/getProvidersFromEditorProps.js +36 -0
  107. package/dist/es2019/editor-next/utils/handleProviders.js +18 -24
  108. package/dist/es2019/editor.js +20 -11
  109. package/dist/es2019/keymaps/consts.js +7 -11
  110. package/dist/es2019/labs/next/presets/cxhtml.js +56 -53
  111. package/dist/es2019/labs/next/presets/default.js +18 -38
  112. package/dist/es2019/labs/next/presets/mobile.js +88 -88
  113. package/dist/es2019/labs/next/presets/universal.js +338 -265
  114. package/dist/es2019/labs/next/presets/useUniversalPreset.js +25 -0
  115. package/dist/es2019/plugins/analytics/plugin.js +7 -0
  116. package/dist/es2019/plugins/annotation/utils.js +2 -30
  117. package/dist/es2019/plugins/base/pm-plugins/react-nodeview.js +1 -3
  118. package/dist/es2019/plugins/block-type/pm-plugins/input-rule.js +3 -9
  119. package/dist/es2019/plugins/caption/index.js +0 -2
  120. package/dist/es2019/plugins/card/nodeviews/blockCard.js +8 -4
  121. package/dist/es2019/plugins/card/nodeviews/inlineCard.js +6 -2
  122. package/dist/es2019/plugins/card/pm-plugins/main.js +6 -3
  123. package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +4 -0
  124. package/dist/es2019/plugins/code-block/pm-plugins/main-state.js +1 -9
  125. package/dist/es2019/plugins/collab-edit/provider/index.js +1 -1
  126. package/dist/es2019/plugins/collab-edit/provider/types.js +1 -10
  127. package/dist/es2019/plugins/context-panel/index.js +0 -3
  128. package/dist/es2019/plugins/data-consumer/index.js +0 -7
  129. package/dist/es2019/plugins/date/utils/internal.js +0 -3
  130. package/dist/es2019/plugins/extension/commands.js +0 -6
  131. package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +12 -2
  132. package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +3 -0
  133. package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +1 -0
  134. package/dist/es2019/plugins/feedback-dialog/index.js +0 -2
  135. package/dist/es2019/plugins/floating-toolbar/ui/Button.js +7 -3
  136. package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +10 -5
  137. package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -11
  138. package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
  139. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +21 -4
  140. package/dist/es2019/plugins/floating-toolbar/utils.js +0 -10
  141. package/dist/es2019/plugins/fragment/index.js +0 -7
  142. package/dist/es2019/plugins/help-dialog/commands.js +1 -2
  143. package/dist/es2019/plugins/image-upload/pm-plugins/main.js +47 -5
  144. package/dist/es2019/plugins/layout/styles.js +12 -4
  145. package/dist/es2019/plugins/list/utils/find.js +0 -27
  146. package/dist/es2019/plugins/list/utils/indentation.js +0 -23
  147. package/dist/es2019/plugins/list/utils/node.js +1 -4
  148. package/dist/es2019/plugins/list/utils/selection.js +2 -15
  149. package/dist/es2019/plugins/media/utils/media-common.js +1 -19
  150. package/dist/es2019/plugins/mentions/nodeviews/mention.js +64 -16
  151. package/dist/es2019/plugins/mentions/type-ahead/index.js +1 -14
  152. package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +1 -2
  153. package/dist/es2019/plugins/mobile-dimensions/index.js +0 -3
  154. package/dist/es2019/plugins/paste/index.js +1 -2
  155. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +126 -94
  156. package/dist/es2019/plugins/paste/util/index.js +5 -45
  157. package/dist/es2019/plugins/quick-insert/assets/index.js +0 -8
  158. package/dist/es2019/plugins/selection/gap-cursor/actions.js +56 -56
  159. package/dist/es2019/plugins/status/utils.js +1 -11
  160. package/dist/es2019/plugins/text-color/pm-plugins/main.js +1 -1
  161. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
  162. package/dist/es2019/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
  163. package/dist/es2019/plugins/text-formatting/utils.js +0 -19
  164. package/dist/es2019/plugins/type-ahead/constants.js +0 -5
  165. package/dist/es2019/plugins/type-ahead/index.js +4 -1
  166. package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +4 -37
  167. package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +4 -2
  168. package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +41 -4
  169. package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +2 -0
  170. package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
  171. package/dist/es2019/plugins/type-ahead/utils.js +22 -25
  172. package/dist/es2019/test-utils.js +4 -7
  173. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +40 -6
  174. package/dist/es2019/ui/ColorPalette/index.js +2 -1
  175. package/dist/es2019/ui/ColorPickerButton/index.js +6 -2
  176. package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -0
  177. package/dist/es2019/ui/ConfigPanel/utils.js +0 -6
  178. package/dist/es2019/ui/ContentStyles/index.js +1 -1
  179. package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +1 -1
  180. package/dist/es2019/ui/ElementBrowser/constants.js +0 -1
  181. package/dist/es2019/ui/Resizer/utils.js +0 -1
  182. package/dist/es2019/ui/styles.js +0 -6
  183. package/dist/es2019/utils/get-editor-plugins.js +1 -3
  184. package/dist/es2019/utils/index.js +13 -199
  185. package/dist/es2019/utils/input-rules.js +0 -14
  186. package/dist/es2019/version-wrapper.js +1 -1
  187. package/dist/es2019/version.json +1 -1
  188. package/dist/esm/actions/index.js +23 -9
  189. package/dist/esm/analytics-api/attach-payload-into-transaction.js +1 -1
  190. package/dist/esm/create-editor/ReactEditorView.js +0 -5
  191. package/dist/esm/create-editor/ReactEditorViewInternal.js +73 -102
  192. package/dist/esm/create-editor/create-plugins-list.js +36 -5
  193. package/dist/esm/create-editor/feature-flags-from-props.js +31 -26
  194. package/dist/esm/create-editor/preset-utils.js +21 -0
  195. package/dist/esm/editor-next/editor-internal.js +2 -2
  196. package/dist/esm/editor-next/editor-migration-component.js +18 -2
  197. package/dist/esm/editor-next/hooks/useProviderFactory.js +4 -3
  198. package/dist/esm/editor-next/index.js +13 -9
  199. package/dist/esm/editor-next/utils/getProvidersFromEditorProps.js +35 -0
  200. package/dist/esm/editor-next/utils/handleProviders.js +17 -22
  201. package/dist/esm/editor.js +20 -13
  202. package/dist/esm/keymaps/consts.js +7 -11
  203. package/dist/esm/labs/next/presets/cxhtml.js +56 -55
  204. package/dist/esm/labs/next/presets/default.js +18 -41
  205. package/dist/esm/labs/next/presets/mobile.js +88 -90
  206. package/dist/esm/labs/next/presets/universal.js +330 -257
  207. package/dist/esm/labs/next/presets/useUniversalPreset.js +29 -0
  208. package/dist/esm/plugins/analytics/plugin.js +6 -0
  209. package/dist/esm/plugins/annotation/utils.js +2 -32
  210. package/dist/esm/plugins/base/pm-plugins/react-nodeview.js +1 -5
  211. package/dist/esm/plugins/block-type/pm-plugins/input-rule.js +3 -9
  212. package/dist/esm/plugins/caption/index.js +0 -2
  213. package/dist/esm/plugins/card/nodeviews/blockCard.js +9 -4
  214. package/dist/esm/plugins/card/nodeviews/inlineCard.js +6 -2
  215. package/dist/esm/plugins/card/pm-plugins/main.js +6 -3
  216. package/dist/esm/plugins/card/pm-plugins/util/resolve.js +4 -0
  217. package/dist/esm/plugins/code-block/pm-plugins/main-state.js +0 -10
  218. package/dist/esm/plugins/collab-edit/provider/index.js +1 -1
  219. package/dist/esm/plugins/collab-edit/provider/types.js +1 -10
  220. package/dist/esm/plugins/context-panel/index.js +0 -3
  221. package/dist/esm/plugins/data-consumer/index.js +0 -7
  222. package/dist/esm/plugins/date/utils/internal.js +0 -3
  223. package/dist/esm/plugins/extension/commands.js +0 -6
  224. package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +9 -2
  225. package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +2 -2
  226. package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +1 -0
  227. package/dist/esm/plugins/feedback-dialog/index.js +0 -2
  228. package/dist/esm/plugins/floating-toolbar/ui/Button.js +7 -3
  229. package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +10 -5
  230. package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
  231. package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
  232. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +24 -8
  233. package/dist/esm/plugins/floating-toolbar/utils.js +0 -10
  234. package/dist/esm/plugins/fragment/index.js +0 -7
  235. package/dist/esm/plugins/help-dialog/commands.js +0 -3
  236. package/dist/esm/plugins/image-upload/pm-plugins/main.js +51 -12
  237. package/dist/esm/plugins/layout/styles.js +11 -2
  238. package/dist/esm/plugins/list/utils/find.js +0 -27
  239. package/dist/esm/plugins/list/utils/indentation.js +0 -23
  240. package/dist/esm/plugins/list/utils/node.js +1 -4
  241. package/dist/esm/plugins/list/utils/selection.js +2 -12
  242. package/dist/esm/plugins/media/utils/media-common.js +1 -17
  243. package/dist/esm/plugins/mentions/nodeviews/mention.js +97 -16
  244. package/dist/esm/plugins/mentions/type-ahead/index.js +1 -18
  245. package/dist/esm/plugins/mentions/ui/InviteItem/index.js +1 -2
  246. package/dist/esm/plugins/mobile-dimensions/index.js +0 -3
  247. package/dist/esm/plugins/paste/index.js +1 -2
  248. package/dist/esm/plugins/paste/pm-plugins/analytics.js +122 -86
  249. package/dist/esm/plugins/paste/util/index.js +5 -45
  250. package/dist/esm/plugins/quick-insert/assets/index.js +0 -20
  251. package/dist/esm/plugins/selection/gap-cursor/actions.js +52 -45
  252. package/dist/esm/plugins/status/utils.js +1 -13
  253. package/dist/esm/plugins/text-color/pm-plugins/main.js +1 -1
  254. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
  255. package/dist/esm/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
  256. package/dist/esm/plugins/text-formatting/utils.js +0 -21
  257. package/dist/esm/plugins/type-ahead/constants.js +0 -5
  258. package/dist/esm/plugins/type-ahead/index.js +4 -1
  259. package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +4 -33
  260. package/dist/esm/plugins/type-ahead/pm-plugins/main.js +4 -2
  261. package/dist/esm/plugins/type-ahead/ui/InputQuery.js +41 -4
  262. package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +2 -0
  263. package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
  264. package/dist/esm/plugins/type-ahead/utils.js +24 -22
  265. package/dist/esm/test-utils.js +4 -7
  266. package/dist/esm/ui/Appearance/Comment/Toolbar.js +41 -6
  267. package/dist/esm/ui/ColorPalette/index.js +2 -1
  268. package/dist/esm/ui/ColorPickerButton/index.js +6 -2
  269. package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -0
  270. package/dist/esm/ui/ConfigPanel/utils.js +3 -14
  271. package/dist/esm/ui/ContentStyles/index.js +1 -1
  272. package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +1 -1
  273. package/dist/esm/ui/ElementBrowser/constants.js +0 -1
  274. package/dist/esm/ui/Resizer/utils.js +0 -1
  275. package/dist/esm/ui/styles.js +2 -5
  276. package/dist/esm/utils/get-editor-plugins.js +1 -3
  277. package/dist/esm/utils/index.js +13 -196
  278. package/dist/esm/utils/input-rules.js +0 -13
  279. package/dist/esm/version-wrapper.js +1 -1
  280. package/dist/esm/version.json +1 -1
  281. package/dist/types/actions/index.d.ts +4 -4
  282. package/dist/types/create-editor/ReactEditorView.d.ts +0 -3
  283. package/dist/types/create-editor/ReactEditorViewInternal.d.ts +9 -7
  284. package/dist/types/create-editor/ReactEditorViewNext.d.ts +3 -4
  285. package/dist/types/create-editor/create-plugins-list.d.ts +3 -5
  286. package/dist/types/create-editor/preset-utils.d.ts +2 -0
  287. package/dist/types/editor-next/editor-internal.d.ts +9 -9
  288. package/dist/types/editor-next/hooks/useMeasureEditorMountTime.d.ts +2 -2
  289. package/dist/types/editor-next/hooks/useProviderFactory.d.ts +2 -2
  290. package/dist/types/editor-next/index.d.ts +6 -6
  291. package/dist/types/editor-next/utils/deprecationWarnings.d.ts +2 -2
  292. package/dist/types/editor-next/utils/editorPropTypes.d.ts +1 -1
  293. package/dist/types/editor-next/utils/getProvidersFromEditorProps.d.ts +9 -0
  294. package/dist/types/editor-next/utils/handleProviders.d.ts +2 -2
  295. package/dist/types/editor-next/utils/onEditorCreated.d.ts +2 -2
  296. package/dist/types/editor-next/utils/sendDurationAnalytics.d.ts +1 -1
  297. package/dist/types/editor.d.ts +7 -4
  298. package/dist/types/keymaps/consts.d.ts +0 -11
  299. package/dist/types/labs/next/presets/cxhtml.d.ts +33 -1
  300. package/dist/types/labs/next/presets/default.d.ts +67 -10
  301. package/dist/types/labs/next/presets/mobile.d.ts +33 -1
  302. package/dist/types/labs/next/presets/universal.d.ts +5 -13
  303. package/dist/types/labs/next/presets/useUniversalPreset.d.ts +7 -0
  304. package/dist/types/nodeviews/context-adapter.d.ts +0 -1
  305. package/dist/types/nodeviews/index.d.ts +0 -1
  306. package/dist/types/plugins/alignment/pm-plugins/types.d.ts +0 -11
  307. package/dist/types/plugins/annotation/utils.d.ts +0 -17
  308. package/dist/types/plugins/base/pm-plugins/react-nodeview.d.ts +2 -3
  309. package/dist/types/plugins/block-type/pm-plugins/input-rule.d.ts +2 -6
  310. package/dist/types/plugins/caption/index.d.ts +0 -2
  311. package/dist/types/plugins/card/nodeviews/blockCard.d.ts +2 -10
  312. package/dist/types/plugins/card/nodeviews/genericCard.d.ts +1 -0
  313. package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -1
  314. package/dist/types/plugins/code-block/actions.d.ts +0 -4
  315. package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +0 -3
  316. package/dist/types/plugins/collab-edit/provider/index.d.ts +1 -2
  317. package/dist/types/plugins/collab-edit/provider/types.d.ts +1 -36
  318. package/dist/types/plugins/context-panel/index.d.ts +2 -3
  319. package/dist/types/plugins/data-consumer/index.d.ts +0 -2
  320. package/dist/types/plugins/date/utils/internal.d.ts +0 -1
  321. package/dist/types/plugins/extension/commands.d.ts +0 -1
  322. package/dist/types/plugins/extension/nodeviews/extension.d.ts +0 -5
  323. package/dist/types/plugins/feedback-dialog/index.d.ts +0 -2
  324. package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +3 -1
  325. package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +1 -0
  326. package/dist/types/plugins/floating-toolbar/utils.d.ts +0 -2
  327. package/dist/types/plugins/fragment/index.d.ts +0 -2
  328. package/dist/types/plugins/help-dialog/commands.d.ts +0 -1
  329. package/dist/types/plugins/history/actions.d.ts +1 -2
  330. package/dist/types/plugins/layout/styles.d.ts +2 -1
  331. package/dist/types/plugins/list/utils/find.d.ts +0 -1
  332. package/dist/types/plugins/list/utils/indentation.d.ts +0 -1
  333. package/dist/types/plugins/list/utils/node.d.ts +0 -2
  334. package/dist/types/plugins/list/utils/selection.d.ts +0 -3
  335. package/dist/types/plugins/media/utils/media-common.d.ts +0 -5
  336. package/dist/types/plugins/mentions/types.d.ts +1 -2
  337. package/dist/types/plugins/mentions/ui/InviteItem/index.d.ts +2 -3
  338. package/dist/types/plugins/mentions/ui/InviteItem/styles.d.ts +0 -6
  339. package/dist/types/plugins/mentions/ui/ToolbarMention/index.d.ts +1 -4
  340. package/dist/types/plugins/mobile-dimensions/index.d.ts +0 -1
  341. package/dist/types/plugins/paste/index.d.ts +0 -1
  342. package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +6 -3
  343. package/dist/types/plugins/paste/util/index.d.ts +0 -6
  344. package/dist/types/plugins/quick-insert/assets/index.d.ts +0 -2
  345. package/dist/types/plugins/status/utils.d.ts +0 -3
  346. package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +0 -6
  347. package/dist/types/plugins/text-color/pm-plugins/main.d.ts +2 -12
  348. package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -1
  349. package/dist/types/plugins/text-formatting/utils.d.ts +0 -4
  350. package/dist/types/plugins/type-ahead/constants.d.ts +0 -4
  351. package/dist/types/plugins/type-ahead/index.d.ts +1 -0
  352. package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +2 -11
  353. package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +2 -1
  354. package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +1 -0
  355. package/dist/types/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +1 -0
  356. package/dist/types/plugins/type-ahead/utils.d.ts +3 -3
  357. package/dist/types/test-utils.d.ts +4 -5
  358. package/dist/types/types/editor-appearance-component.d.ts +2 -2
  359. package/dist/types/types/editor-props.d.ts +55 -42
  360. package/dist/types/ui/Appearance/Chromeless.d.ts +0 -5
  361. package/dist/types/ui/Appearance/Comment/Comment.d.ts +0 -7
  362. package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +3 -2
  363. package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +0 -4
  364. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -3
  365. package/dist/types/ui/AppearanceComponents/Mobile.d.ts +2 -5
  366. package/dist/types/ui/ColorPalette/Palettes/index.d.ts +1 -1
  367. package/dist/types/ui/ColorPalette/Palettes/type.d.ts +1 -1
  368. package/dist/types/ui/ColorPalette/index.d.ts +2 -1
  369. package/dist/types/ui/ColorPickerButton/index.d.ts +4 -2
  370. package/dist/types/ui/ConfigPanel/types.d.ts +0 -3
  371. package/dist/types/ui/ConfigPanel/utils.d.ts +2 -3
  372. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  373. package/dist/types/ui/ElementBrowser/ModalElementBrowser.d.ts +0 -3
  374. package/dist/types/ui/ElementBrowser/constants.d.ts +0 -1
  375. package/dist/types/ui/ElementBrowser/types.d.ts +0 -5
  376. package/dist/types/ui/Resizer/utils.d.ts +0 -1
  377. package/dist/types/ui/styles.d.ts +0 -1
  378. package/dist/types/utils/index.d.ts +6 -65
  379. package/dist/types/utils/input-rules.d.ts +1 -2
  380. package/dist/types/utils/table.d.ts +0 -1
  381. package/package.json +23 -24
  382. package/report.api.md +155 -146
  383. package/dist/cjs/labs/next/presets/preset.js +0 -101
  384. package/dist/cjs/plugins/analytics/types/type-ahead.js +0 -5
  385. package/dist/cjs/plugins/collab-edit/provider/channel.js +0 -313
  386. package/dist/cjs/plugins/collab-edit/provider/logger.js +0 -17
  387. package/dist/cjs/plugins/collab-edit/provider/mock-users.js +0 -19
  388. package/dist/cjs/plugins/data-consumer/plugin-key.js +0 -9
  389. package/dist/cjs/plugins/media/toolbar/toolbar-messages.js +0 -15
  390. package/dist/cjs/profiler/render-count.js +0 -60
  391. package/dist/cjs/ui/ColorPalette/Color/index.js +0 -9
  392. package/dist/cjs/ui/ConfigPanel/FieldDescription.js +0 -19
  393. package/dist/cjs/ui/WithPluginState/types.js +0 -5
  394. package/dist/es2019/labs/next/presets/preset.js +0 -68
  395. package/dist/es2019/plugins/analytics/types/type-ahead.js +0 -1
  396. package/dist/es2019/plugins/collab-edit/provider/channel.js +0 -179
  397. package/dist/es2019/plugins/collab-edit/provider/logger.js +0 -8
  398. package/dist/es2019/plugins/collab-edit/provider/mock-users.js +0 -12
  399. package/dist/es2019/plugins/data-consumer/plugin-key.js +0 -2
  400. package/dist/es2019/plugins/media/toolbar/toolbar-messages.js +0 -8
  401. package/dist/es2019/profiler/render-count.js +0 -53
  402. package/dist/es2019/ui/ColorPalette/Color/index.js +0 -2
  403. package/dist/es2019/ui/ConfigPanel/FieldDescription.js +0 -12
  404. package/dist/es2019/ui/WithPluginState/types.js +0 -1
  405. package/dist/esm/labs/next/presets/preset.js +0 -93
  406. package/dist/esm/plugins/analytics/types/type-ahead.js +0 -1
  407. package/dist/esm/plugins/collab-edit/provider/channel.js +0 -305
  408. package/dist/esm/plugins/collab-edit/provider/logger.js +0 -10
  409. package/dist/esm/plugins/collab-edit/provider/mock-users.js +0 -12
  410. package/dist/esm/plugins/data-consumer/plugin-key.js +0 -2
  411. package/dist/esm/plugins/media/toolbar/toolbar-messages.js +0 -8
  412. package/dist/esm/profiler/render-count.js +0 -49
  413. package/dist/esm/ui/ColorPalette/Color/index.js +0 -2
  414. package/dist/esm/ui/ConfigPanel/FieldDescription.js +0 -11
  415. package/dist/esm/ui/WithPluginState/types.js +0 -1
  416. package/dist/types/labs/next/presets/preset.d.ts +0 -46
  417. package/dist/types/plugins/analytics/types/type-ahead.d.ts +0 -1
  418. package/dist/types/plugins/collab-edit/provider/channel.d.ts +0 -48
  419. package/dist/types/plugins/collab-edit/provider/logger.d.ts +0 -1
  420. package/dist/types/plugins/collab-edit/provider/mock-users.d.ts +0 -6
  421. package/dist/types/plugins/data-consumer/plugin-key.d.ts +0 -2
  422. package/dist/types/plugins/media/toolbar/toolbar-messages.d.ts +0 -7
  423. package/dist/types/profiler/render-count.d.ts +0 -14
  424. package/dist/types/ui/ColorPalette/Color/index.d.ts +0 -2
  425. package/dist/types/ui/ConfigPanel/FieldDescription.d.ts +0 -6
  426. package/dist/types/ui/WithPluginState/types.d.ts +0 -10
@@ -1,9 +1,8 @@
1
1
  export declare enum HistoryActionTypes {
2
2
  UPDATE = "UPDATE"
3
3
  }
4
- export interface Update {
4
+ export interface HistoryAction {
5
5
  type: HistoryActionTypes.UPDATE;
6
6
  canUndo: boolean;
7
7
  canRedo: boolean;
8
8
  }
9
- export declare type HistoryAction = Update;
@@ -1,3 +1,4 @@
1
+ import { ThemeProps } from '@atlaskit/theme/types';
1
2
  import { LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING } from '@atlaskit/editor-common/styles';
2
3
  export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
3
- export declare const layoutStyles: import("@emotion/react").SerializedStyles;
4
+ export declare const layoutStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
@@ -1,5 +1,4 @@
1
1
  import { ResolvedPos, Node as PMNode } from 'prosemirror-model';
2
- export declare function findFirstNestedList($pos: ResolvedPos): ResolvedPos | null;
3
2
  export declare function findFirstParentListNode($pos: ResolvedPos): {
4
3
  pos: number;
5
4
  node: PMNode;
@@ -1,7 +1,6 @@
1
1
  import { ResolvedPos } from 'prosemirror-model';
2
2
  import { Transaction } from 'prosemirror-state';
3
3
  export declare const getListLiftTarget: (resPos: ResolvedPos) => number;
4
- export declare const getNextSiblingListItemPosition: ($pos: ResolvedPos) => ResolvedPos | null;
5
4
  export declare const hasValidListIndentationLevel: ({ tr, maxIndentation, }: {
6
5
  tr: Transaction;
7
6
  maxIndentation: number;
@@ -1,11 +1,9 @@
1
1
  import { Node as PMNode, NodeType } from 'prosemirror-model';
2
2
  import { Transaction } from 'prosemirror-state';
3
- export declare function isDocumentNode(node: PMNode | null | undefined): boolean;
4
3
  export declare function isListNode(node: PMNode | null | undefined): boolean;
5
4
  export declare function isParagraphNode(node: PMNode | null | undefined): boolean;
6
5
  export declare function isListItemNode(node: PMNode | null | undefined): boolean;
7
6
  export declare function isBulletList(node: PMNode | null | undefined): boolean;
8
- export declare function isListNodeValidContent(node: PMNode): boolean;
9
7
  export declare enum JoinDirection {
10
8
  LEFT = 1,
11
9
  RIGHT = -1
@@ -17,11 +17,8 @@ declare type NormalizeListItemsSelection = (props: {
17
17
  doc: PMNode;
18
18
  }) => Selection;
19
19
  export declare const normalizeListItemsSelection: NormalizeListItemsSelection;
20
- export declare const resolvePositionToStartOfListItem: ($pos: ResolvedPos) => ResolvedPos;
21
- export declare const resolvePositionToEndOfListItem: ($pos: ResolvedPos) => ResolvedPos;
22
20
  declare type CreateNodeRange = (props: {
23
21
  selection: Selection;
24
22
  }) => NodeRange | null;
25
23
  export declare const createListNodeRange: CreateNodeRange;
26
- export declare const createListItemNodeRange: CreateNodeRange;
27
24
  export {};
@@ -14,12 +14,7 @@ export declare const posOfPrecedingMediaGroup: (state: EditorState) => number |
14
14
  * or the selection is the entire paragraph
15
15
  */
16
16
  export declare const isInsidePotentialEmptyParagraph: (state: EditorState) => boolean;
17
- export declare const posOfMediaGroupBelow: (state: EditorState, $pos: ResolvedPos, prepend?: boolean) => number | undefined;
18
17
  export declare const posOfParentMediaGroup: (state: EditorState, $pos?: ResolvedPos<any> | undefined, prepend?: boolean) => number | undefined;
19
- /**
20
- * The function will return the position after current selection where mediaGroup can be inserted.
21
- */
22
- export declare function endPositionForMedia(state: EditorState, resolvedPos: ResolvedPos): number;
23
18
  export declare const removeMediaNode: (view: EditorView, node: PMNode, getPos: ProsemirrorGetPosHandler) => void;
24
19
  export declare const splitMediaGroup: (view: EditorView) => boolean;
25
20
  export declare const copyOptionalAttrsFromMediaState: (mediaState: MediaState, node: PMNode) => void;
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
3
  import { MentionDescription, MentionProvider } from '@atlaskit/mention';
4
- import { TeamMentionProvider } from '@atlaskit/mention/resource';
5
4
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
6
5
  import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
7
6
  export interface TeamInfoAttrAnalytics {
@@ -19,7 +18,7 @@ export interface MentionPluginOptions extends MentionPluginConfig {
19
18
  allowZeroWidthSpaceAfter?: boolean;
20
19
  }
21
20
  export declare type MentionPluginState = {
22
- mentionProvider?: MentionProvider | TeamMentionProvider;
21
+ mentionProvider?: MentionProvider;
23
22
  contextIdentifierProvider?: ContextIdentifierProvider;
24
23
  mentions?: Array<MentionDescription>;
25
24
  };
@@ -2,14 +2,13 @@ import { MentionDescription } from '@atlaskit/mention/resource';
2
2
  import { UserRole } from '@atlaskit/mention';
3
3
  import React, { SyntheticEvent } from 'react';
4
4
  import { WrappedComponentProps } from 'react-intl-next';
5
- export interface OnMentionEvent {
5
+ interface OnMentionEvent {
6
6
  (mention: MentionDescription, event?: SyntheticEvent<any>): void;
7
7
  }
8
- export declare const INVITE_ITEM_MIN_HEIGHT: number;
9
8
  export declare const INVITE_ITEM_DESCRIPTION: {
10
9
  id: string;
11
10
  };
12
- export interface Props {
11
+ interface Props {
13
12
  productName?: string;
14
13
  onMount?: () => void;
15
14
  onMouseEnter?: OnMentionEvent;
@@ -1,9 +1,3 @@
1
- export interface MentionItemStyleProps {
2
- selected?: boolean;
3
- }
4
- export interface NameSectionStyleProps {
5
- restricted?: boolean;
6
- }
7
1
  export declare const ROW_SIDE_PADDING = 14;
8
2
  export declare const rowStyle: import("@emotion/react").SerializedStyles;
9
3
  export declare const AVATAR_HEIGHT = 36;
@@ -1,14 +1,11 @@
1
1
  import React from 'react';
2
2
  import { EditorView } from 'prosemirror-view';
3
3
  import { WrappedComponentProps } from 'react-intl-next';
4
- export interface Props {
4
+ interface Props {
5
5
  editorView?: EditorView;
6
6
  isDisabled?: boolean;
7
7
  testId?: string;
8
8
  }
9
- export interface State {
10
- disabled: boolean;
11
- }
12
9
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
13
10
  WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
14
11
  };
@@ -1,4 +1,3 @@
1
1
  import { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- export declare const MIN_TAP_SIZE_PX = 44;
3
2
  declare const mobileDimensionsPlugin: NextEditorPlugin<'mobileDimensions'>;
4
3
  export default mobileDimensionsPlugin;
@@ -1,7 +1,6 @@
1
1
  import { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
2
  import { CardOptions } from '@atlaskit/editor-common/card';
3
3
  export declare type PastePluginOptions = {
4
- plainTextPasteLinkification?: boolean;
5
4
  cardOptions?: CardOptions;
6
5
  sanitizePrivateContent?: boolean;
7
6
  };
@@ -1,8 +1,7 @@
1
1
  import { AnalyticsEventPayload, PasteType, PasteContent } from '../../analytics';
2
2
  import { EditorView } from 'prosemirror-view';
3
- import { Slice, Fragment } from 'prosemirror-model';
3
+ import { Slice, Fragment, Schema } from 'prosemirror-model';
4
4
  import { Command } from '../../../types';
5
- import { EditorState } from 'prosemirror-state';
6
5
  declare type PasteContext = {
7
6
  type: PasteType;
8
7
  asPlain?: boolean;
@@ -11,7 +10,11 @@ declare type PasteContext = {
11
10
  /** Did this paste action split a list in half? */
12
11
  pasteSplitList?: boolean;
13
12
  };
14
- export declare function getContent(state: EditorState, slice: Slice): PasteContent;
13
+ declare type GetContentProps = {
14
+ schema: Schema;
15
+ slice: Slice;
16
+ };
17
+ export declare function getContent({ schema, slice }: GetContentProps): PasteContent;
15
18
  export declare function getMediaTraceId(slice: Slice): undefined;
16
19
  export declare function createPasteAnalyticsPayload(view: EditorView, event: ClipboardEvent, slice: Slice, pasteContext: PasteContext): AnalyticsEventPayload;
17
20
  export declare function sendPasteAnalyticsEvent(view: EditorView, event: ClipboardEvent, slice: Slice, pasteContext: PasteContext): void;
@@ -3,15 +3,9 @@ import { EditorState, Selection, Transaction } from 'prosemirror-state';
3
3
  import { PasteSource } from '../../analytics';
4
4
  export declare function isPastedFromWord(html?: string): boolean;
5
5
  export declare function isPastedFromExcel(html?: string): boolean;
6
- export declare function isPastedFromDropboxPaper(html?: string): boolean;
7
- export declare function isPastedFromGoogleDocs(html?: string): boolean;
8
- export declare function isPastedFromGoogleSpreadSheets(html?: string): boolean;
9
- export declare function isPastedFromPages(html?: string): boolean;
10
- export declare function isPastedFromFabricEditor(html?: string): boolean;
11
6
  export declare const isSingleLine: (text: string) => boolean;
12
7
  export declare function htmlContainsSingleFile(html: string): boolean;
13
8
  export declare function getPasteSource(event: ClipboardEvent): PasteSource;
14
- export declare function isCode(str: string): boolean;
15
9
  export declare function escapeLinks(text: string): string;
16
10
  export declare function hasOnlyNodesOfType(...nodeTypes: NodeType[]): (slice: Slice) => boolean;
17
11
  export declare function applyTextMarksToSlice(schema: Schema, marks?: Mark<any>[]): (slice: Slice) => Slice;
@@ -19,10 +19,8 @@ export declare const IconPanelNote: React.ComponentType<IconProps> & Loadable.Lo
19
19
  export declare const IconPanelSuccess: React.ComponentType<IconProps> & Loadable.LoadableComponent;
20
20
  export declare const IconPanelWarning: React.ComponentType<IconProps> & Loadable.LoadableComponent;
21
21
  export declare const IconPanel: React.ComponentType<IconProps> & Loadable.LoadableComponent;
22
- export declare const IconCustomPanel: React.ComponentType<IconProps> & Loadable.LoadableComponent;
23
22
  export declare const IconQuote: React.ComponentType<IconProps> & Loadable.LoadableComponent;
24
23
  export declare const IconStatus: React.ComponentType<IconProps> & Loadable.LoadableComponent;
25
- export declare const IconFallback: React.ComponentType<IconProps> & Loadable.LoadableComponent;
26
24
  declare type HeadingProps = IconProps & {
27
25
  level: HeadingLevels;
28
26
  };
@@ -1,8 +1,5 @@
1
- import { Node as PMNode } from 'prosemirror-model';
2
1
  import { Selection, Transaction } from 'prosemirror-state';
3
2
  import { StatusType } from './types';
4
3
  export declare const mayGetStatusAtSelection: (selection: Selection) => StatusType | null;
5
- export declare const mayGetStatusAtPos: (pos: number | null, doc: PMNode) => StatusType | null;
6
4
  export declare const isEmptyStatus: (node: StatusType) => boolean;
7
- export declare const setSelectionNearPos: (tr: Transaction, pos: number) => Transaction;
8
5
  export declare const setNodeSelectionNearPos: (tr: Transaction, pos: number) => Transaction;
@@ -1,11 +1,5 @@
1
- import { Node as PMNode } from 'prosemirror-model';
2
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
2
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
- import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
5
3
  import { Dispatch, EventDispatcher } from '../../../event-dispatcher';
6
4
  import { PortalProviderAPI } from '../../../ui/PortalProvider';
7
- export interface TaskDecisionPluginState {
8
- currentTaskDecisionItem: PMNode | undefined;
9
- contextIdentifierProvider?: ContextIdentifierProvider;
10
- }
11
5
  export declare function createPlugin(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, dispatch: Dispatch, useLongPressSelection?: boolean): SafePlugin<any, any>;
@@ -1,5 +1,5 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { EditorState, PluginKey, Transaction } from 'prosemirror-state';
2
+ import { PluginKey } from 'prosemirror-state';
3
3
  import { Dispatch } from '../../../event-dispatcher';
4
4
  import { PaletteColor } from '../../../ui/ColorPalette/Palettes/type';
5
5
  export { DEFAULT_COLOR } from '../utils/color';
@@ -9,16 +9,7 @@ export declare type TextColorPluginState = {
9
9
  disabled?: boolean;
10
10
  color: string | null;
11
11
  };
12
- export declare type ActionHandlerParams = {
13
- dispatch: Dispatch;
14
- pluginState: TextColorPluginState;
15
- tr: Transaction;
16
- params?: {
17
- color?: string;
18
- disabled?: boolean;
19
- };
20
- };
21
- export declare type TextColorDefaultColor = {
12
+ declare type TextColorDefaultColor = {
22
13
  color: string;
23
14
  label: string;
24
15
  };
@@ -27,7 +18,6 @@ export interface TextColorPluginConfig {
27
18
  /** @deprecated [ED-15849] Color selection palette now shows more colors by default. */
28
19
  allowMoreTextColors?: boolean;
29
20
  }
30
- export declare function createInitialPluginState(editorState: EditorState, pluginConfig?: TextColorPluginConfig): TextColorPluginState;
31
21
  export declare enum ACTIONS {
32
22
  RESET_COLOR = 0,
33
23
  SET_COLOR = 1,
@@ -1,7 +1,6 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { PluginKey } from 'prosemirror-state';
3
3
  import { Dispatch } from '../../../event-dispatcher';
4
- export declare type StateChangeHandler = (state: ClearFormattingState) => any;
5
4
  export interface ClearFormattingState {
6
5
  formattingIsPresent?: boolean;
7
6
  }
@@ -1,10 +1,6 @@
1
1
  import { MarkType, Mark as PMMark } from 'prosemirror-model';
2
2
  import { EditorState } from 'prosemirror-state';
3
3
  import { MenuIconItem } from './ui/Toolbar/types';
4
- export declare const nodeLen: (node: Node) => number;
5
- export declare const isIgnorable: (dom: any) => boolean;
6
- export declare const isBlockNode: (dom: any) => boolean;
7
- export declare const domIndex: (node: Node | null) => number | undefined;
8
4
  export declare const hasCode: (state: EditorState, pos: number) => boolean;
9
5
  /**
10
6
  * Determine if a mark (with specific attribute values) exists anywhere in the selection.
@@ -2,10 +2,6 @@ export declare const TYPE_AHEAD_DECORATION_KEY = "typeahead_decoration_key";
2
2
  export declare const TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = "typeaheadDecoration";
3
3
  export declare const TYPE_AHEAD_POPUP_CONTENT_CLASS = "fabric-editor-typeahead";
4
4
  export declare const TYPE_AHEAD_DECORATION_ELEMENT_ID = "typeahaed_decoration_element_id";
5
- export declare enum NavigationDirection {
6
- LEFT = -1,
7
- RIGHT = 1
8
- }
9
5
  export declare enum CloseSelectionOptions {
10
6
  BEFORE_TEXT_INSERTED = "BEFORE_TEXT_INSERTED",
11
7
  AFTER_TEXT_INSERTED = "AFTER_TEXT_INSERTED"
@@ -4,6 +4,7 @@ import { pluginKey as typeAheadPluginKey } from './pm-plugins/key';
4
4
  export declare type TypeAheadPluginOptions = {
5
5
  isMobile?: boolean;
6
6
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
7
+ useBetterTypeaheadNavigation?: boolean;
7
8
  };
8
9
  /**
9
10
  *
@@ -1,5 +1,3 @@
1
- import { Selection } from 'prosemirror-state';
2
- import { DecorationSet } from 'prosemirror-view';
3
1
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
2
  import { IntlShape } from 'react-intl-next';
5
3
  import type { CreateTypeAheadDecorations, RemoveTypeAheadDecorations, PopupMountPointReference } from '../types';
@@ -7,18 +5,11 @@ declare type FactoryProps = {
7
5
  intl: IntlShape;
8
6
  popupMountRef: PopupMountPointReference;
9
7
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
8
+ useBetterTypeaheadNavigation: boolean;
10
9
  };
11
10
  declare type FactoryReturn = {
12
11
  createDecorations: CreateTypeAheadDecorations;
13
12
  removeDecorations: RemoveTypeAheadDecorations;
14
13
  };
15
- export declare const factoryDecorations: ({ intl, popupMountRef, createAnalyticsEvent, }: FactoryProps) => FactoryReturn;
16
- export declare const isSelectionInsideTypeAhead: ({ decorationSet, selection, }: {
17
- decorationSet?: DecorationSet<any> | undefined;
18
- selection: Selection;
19
- }) => boolean;
20
- export declare const findDecorationElement: ({ selection, decorationSet, }: {
21
- selection: Selection;
22
- decorationSet?: DecorationSet<any> | undefined;
23
- }) => HTMLElement | null;
14
+ export declare const factoryDecorations: ({ intl, popupMountRef, createAnalyticsEvent, useBetterTypeaheadNavigation, }: FactoryProps) => FactoryReturn;
24
15
  export {};
@@ -9,6 +9,7 @@ declare type Props = {
9
9
  typeAheadHandlers: Array<TypeAheadHandler>;
10
10
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
11
11
  getIntl: () => IntlShape;
12
+ useBetterTypeaheadNavigation: boolean;
12
13
  };
13
- export declare function createPlugin({ reactDispatch, popupMountRef, createAnalyticsEvent, typeAheadHandlers, getIntl, }: Props): SafePlugin;
14
+ export declare function createPlugin({ reactDispatch, popupMountRef, createAnalyticsEvent, typeAheadHandlers, getIntl, useBetterTypeaheadNavigation, }: Props): SafePlugin;
14
15
  export {};
@@ -21,6 +21,7 @@ declare type InputQueryProps = {
21
21
  reopenQuery?: string;
22
22
  editorView: EditorView;
23
23
  items: any[];
24
+ useBetterTypeaheadNavigation: boolean;
24
25
  };
25
26
  export declare const InputQuery: React.FC<InputQueryProps>;
26
27
  export {};
@@ -15,6 +15,7 @@ declare type WrapperProps = {
15
15
  popupsScrollableElement?: HTMLElement;
16
16
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
17
17
  inputMethod?: TypeAheadInputMethod;
18
+ useBetterTypeaheadNavigation: boolean;
18
19
  };
19
20
  export declare const WrapperTypeAhead: React.FC<WrapperProps>;
20
21
  export {};
@@ -1,9 +1,8 @@
1
1
  import { EditorState } from 'prosemirror-state';
2
- import { Decoration, EditorView } from 'prosemirror-view';
2
+ import { EditorView } from 'prosemirror-view';
3
3
  import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
4
4
  import type { TypeAheadHandler, TypeAheadItem, TypeAheadPluginState } from './types';
5
5
  import { IntlShape } from 'react-intl-next';
6
- export declare const findTypeAheadDecorations: (state: EditorState) => Decoration | null;
7
6
  export declare const isTypeAheadHandler: (handler: any) => handler is TypeAheadHandler;
8
7
  /** Is a typeahead plugin open? */
9
8
  export declare const isTypeAheadOpen: (editorState: EditorState) => boolean;
@@ -19,8 +18,9 @@ export declare const findHandlerByTrigger: ({ trigger, editorState, }: {
19
18
  declare type MoveSelectedIndexProps = {
20
19
  editorView: EditorView;
21
20
  direction: 'next' | 'previous';
21
+ useBetterTypeaheadNavigation?: boolean;
22
22
  };
23
- export declare const moveSelectedIndex: ({ editorView, direction }: MoveSelectedIndexProps) => () => void;
23
+ export declare const moveSelectedIndex: ({ editorView, direction, useBetterTypeaheadNavigation, }: MoveSelectedIndexProps) => () => void;
24
24
  declare type TypeAheadAssistiveLabels = {
25
25
  popupAriaLabel: string;
26
26
  listItemAriaLabel?: string;
@@ -1,15 +1,14 @@
1
1
  import { Plugin } from 'prosemirror-state';
2
2
  import { EditorView } from 'prosemirror-view';
3
- import { LightEditorPlugin, LightPMPlugin, LightPMPluginFactoryParams, OnEditorViewStateUpdated } from './create-editor/get-plugins';
4
- import { Preset } from './labs/next/presets/preset';
3
+ import { LightPMPlugin, LightPMPluginFactoryParams, OnEditorViewStateUpdated } from './create-editor/get-plugins';
5
4
  import { Schema } from 'prosemirror-model';
6
5
  import { MarkConfig, NodeConfig } from './types/pm-config';
7
- import { AllBuilderPlugins } from '@atlaskit/editor-common/types';
8
6
  export { createTypeAheadTools } from './plugins/type-ahead/api';
9
- export { Preset } from './labs/next/presets/preset';
10
7
  export type { LightEditorPlugin } from './create-editor/get-plugins';
11
8
  export type { DispatchAnalyticsEvent } from './plugins/analytics/types';
12
9
  export type { FeatureFlags } from './types/feature-flags';
10
+ import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
11
+ import type { AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
13
12
  export interface LightEditorConfig {
14
13
  nodes: NodeConfig[];
15
14
  marks: MarkConfig[];
@@ -22,7 +21,7 @@ declare type PluginData = {
22
21
  schema: Schema;
23
22
  onEditorViewStateUpdatedCallbacks: Array<OnEditorViewStateUpdated>;
24
23
  };
25
- export declare const createPMSchemaAndPlugins: (preset?: Preset<LightEditorPlugin, AllBuilderPlugins[]>) => (pluginFactoryParams: Omit<LightPMPluginFactoryParams, 'schema'>) => PluginData;
24
+ export declare const createPMSchemaAndPlugins: (inputPreset?: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>) => (pluginFactoryParams: Omit<LightPMPluginFactoryParams, 'schema'>) => PluginData;
26
25
  export { PortalProviderAPI } from './ui/PortalProvider';
27
26
  export { EventDispatcher } from './event-dispatcher';
28
27
  export type { Dispatch } from './event-dispatcher';
@@ -5,7 +5,7 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
5
5
  import { EventDispatcher } from '../event-dispatcher';
6
6
  import EditorActions from '../actions';
7
7
  import { UIComponentFactory } from '../types/ui-components';
8
- import { ReactComponents, PrimaryToolbarComponents } from '../types/editor-props';
8
+ import { ReactComponents, PrimaryToolbarComponents, UseStickyToolbarType } from '../types/editor-props';
9
9
  import { ToolbarUIComponentFactory } from '../ui/Toolbar/types';
10
10
  import { CollabEditOptions } from '../plugins/collab-edit/types';
11
11
  import { DispatchAnalyticsEvent } from '../plugins/analytics';
@@ -43,6 +43,6 @@ export interface EditorAppearanceComponentProps {
43
43
  persistScrollGutter?: boolean;
44
44
  enableToolbarMinWidth?: boolean;
45
45
  featureFlags?: FeatureFlags;
46
- useStickyToolbar?: boolean | RefObject<HTMLElement>;
46
+ useStickyToolbar?: UseStickyToolbarType;
47
47
  innerRef?: RefObject<HTMLDivElement>;
48
48
  }
@@ -1,37 +1,38 @@
1
- import { ReactElement, RefObject } from 'react';
2
1
  import { Node, Schema } from 'prosemirror-model';
3
2
  import { EditorView } from 'prosemirror-view';
3
+ import { ReactElement, RefObject } from 'react';
4
4
  import EditorActions from '../actions';
5
5
  import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
6
- import type { ContextIdentifierProvider, SearchProvider, Providers } from '@atlaskit/editor-common/provider-factory';
7
- import { Transformer } from '@atlaskit/editor-common/types';
6
+ import type { ContextIdentifierProvider, Providers, SearchProvider } from '@atlaskit/editor-common/provider-factory';
7
+ import type { Transformer, AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
8
8
  import type { ErrorReportingHandler } from '@atlaskit/editor-common/utils';
9
9
  import { ActivityProvider } from '@atlaskit/activity-provider';
10
10
  import { MentionProvider } from '@atlaskit/mention/resource';
11
11
  import { TaskDecisionProvider } from '@atlaskit/task-decision';
12
- import { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugin-table/types';
13
- import { TextColorPluginConfig } from '../plugins/text-color/pm-plugins/main';
14
- import { MediaOptions, MediaState } from '../plugins/media/types';
15
- import { CollabEditOptions } from '../plugins/collab-edit/types';
16
12
  import { CardOptions } from '@atlaskit/editor-common/card';
17
- import { QuickInsertOptions } from '../plugins/quick-insert/types';
13
+ import { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugin-table/types';
18
14
  import { AnnotationProviders } from '../plugins/annotation/types';
19
- import { TextFormattingOptions } from '../plugins/text-formatting/types';
20
- import { PlaceholderTextOptions } from '../plugins/placeholder-text/types';
21
15
  import { BlockTypePluginOptions } from '../plugins/block-type/types';
22
16
  import { CodeBlockOptions } from '../plugins/code-block/types';
23
- import { LayoutPluginOptions } from '../plugins/layout/types';
17
+ import { CollabEditOptions } from '../plugins/collab-edit/types';
24
18
  import { FindReplaceOptions } from '../plugins/find-replace/types';
25
- import { ExtensionConfig } from './extension-config';
26
- import { EditorAppearance } from './editor-appearance';
19
+ import { LinkingOptions } from '../plugins/hyperlink/types';
20
+ import { LayoutPluginOptions } from '../plugins/layout/types';
21
+ import { MediaOptions, MediaState } from '../plugins/media/types';
22
+ import { PlaceholderTextOptions } from '../plugins/placeholder-text/types';
23
+ import { QuickInsertOptions } from '../plugins/quick-insert/types';
24
+ import { TextColorPluginConfig } from '../plugins/text-color/pm-plugins/main';
25
+ import { TextFormattingOptions } from '../plugins/text-formatting/types';
27
26
  import { MenuItem } from '../ui/DropdownMenu/types';
28
- import { EditorOnChangeHandler } from './editor-onchange';
29
- import { PerformanceTracking } from './performance-tracking';
27
+ import { MentionPluginConfig } from './../plugins/mentions/types';
30
28
  import { PanelPluginConfig } from './../plugins/panel/types';
29
+ import { EditorAppearance } from './editor-appearance';
30
+ import { EditorOnChangeHandler } from './editor-onchange';
31
31
  import { EditorPlugin } from './editor-plugin';
32
- import { MentionPluginConfig } from './../plugins/mentions/types';
33
32
  import { EmptyStateHandler } from './empty-state-handler';
34
- import { LinkingOptions } from '../plugins/hyperlink/types';
33
+ import { ExtensionConfig } from './extension-config';
34
+ import { PerformanceTracking } from './performance-tracking';
35
+ import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
35
36
  export declare type ReactComponents = ReactElement<any> | ReactElement<any>[];
36
37
  declare type ExtensionProviders = (ExtensionProvider | Promise<ExtensionProvider>)[];
37
38
  declare type ExtensionProvidersWithEditorAction = (editorActions?: EditorActions) => ExtensionProviders;
@@ -50,7 +51,10 @@ export declare type BeforeAndAfterToolbarComponents = {
50
51
  after: ReactComponents;
51
52
  };
52
53
  export declare type PrimaryToolbarComponents = BeforeAndAfterToolbarComponents | ReactComponents;
53
- export interface EditorProps extends EditorPluginFeatureProps, EditorProviderProps {
54
+ export declare type UseStickyToolbarType = boolean | RefObject<HTMLElement> | {
55
+ offsetTop: number;
56
+ };
57
+ export interface EditorBaseProps extends EditorPluginFeatureProps, EditorProviderProps {
54
58
  appearance?: EditorAppearance;
55
59
  contentComponents?: ReactComponents;
56
60
  primaryToolbarIconBefore?: ReactElement;
@@ -98,8 +102,10 @@ export interface EditorProps extends EditorPluginFeatureProps, EditorProviderPro
98
102
  * Enables the sticky toolbar in the comment/standard editor.
99
103
  * If a boolean is specified and it's `true`, the sticky toolbar will be enabled, sticking to the top of the scroll parent.
100
104
  * Instead a reference can be specified to an existing sticky toolbar on the page that the editor toolbar should stay below (experimental).
105
+ * if {offsetTop: number} is passed in, the toolbar is sticky and the toolbar's 'top' will be set to the offsetTop
106
+ * so the toolbar will sticks to `{offsetTop}` below the scroll parent.
101
107
  */
102
- useStickyToolbar?: boolean | RefObject<HTMLElement>;
108
+ useStickyToolbar?: UseStickyToolbarType;
103
109
  /**
104
110
  * @default undefined
105
111
  * @description
@@ -131,6 +137,33 @@ export interface EditorProps extends EditorPluginFeatureProps, EditorProviderPro
131
137
  featureFlags?: {
132
138
  [featureFlag: string]: string | boolean;
133
139
  };
140
+ }
141
+ export interface EditorSharedPropsWithPlugins {
142
+ onSave?: (editorView: EditorView) => void;
143
+ /**
144
+ * @description Control performance metric measurements and tracking
145
+ */
146
+ performanceTracking?: PerformanceTracking;
147
+ sanitizePrivateContent?: boolean;
148
+ allowAnalyticsGASV3?: boolean;
149
+ media?: MediaOptions;
150
+ collabEdit?: CollabEditOptions;
151
+ insertMenuItems?: MenuItem[];
152
+ primaryToolbarComponents?: PrimaryToolbarComponents;
153
+ allowUndoRedoButtons?: boolean;
154
+ allowTextColor?: boolean | TextColorPluginConfig;
155
+ allowTables?: boolean | TablesPluginConfig;
156
+ /** @deprecated Use smartLinks instead. */
157
+ UNSAFE_cards?: CardOptions;
158
+ /** @deprecated Use linking instead. */
159
+ smartLinks?: CardOptions;
160
+ /**
161
+ * Configure and extend editor linking behaviour
162
+ */
163
+ linking?: LinkingOptions;
164
+ contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
165
+ }
166
+ export interface EditorProps extends EditorBaseProps, EditorPluginFeatureProps, EditorSharedPropsWithPlugins, EditorProviderProps {
134
167
  /**
135
168
  * @deprecated Do not use outside of Editor team.
136
169
  * This has subtle side effects - you __WILL__ break functionality without implementer knowledge of editor-core internals
@@ -142,6 +175,9 @@ export interface EditorProps extends EditorPluginFeatureProps, EditorProviderPro
142
175
  __plugins: EditorPlugin[];
143
176
  };
144
177
  }
178
+ export interface EditorNextProps extends EditorBaseProps, EditorSharedPropsWithPlugins, EditorProviderProps {
179
+ preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
180
+ }
145
181
  export interface EditorProviderProps {
146
182
  activityProvider?: Promise<ActivityProvider>;
147
183
  searchProvider?: Promise<SearchProvider>;
@@ -150,7 +186,6 @@ export interface EditorProviderProps {
150
186
  presenceProvider?: Promise<any>;
151
187
  emojiProvider?: Providers['emojiProvider'];
152
188
  taskDecisionProvider?: Promise<TaskDecisionProvider>;
153
- contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
154
189
  legacyImageUploadProvider?: Providers['imageUploadProvider'];
155
190
  mentionProvider?: Promise<MentionProvider>;
156
191
  autoformattingProvider?: Providers['autoformattingProvider'];
@@ -162,13 +197,10 @@ export interface EditorPluginFeatureProps {
162
197
  allowInteractiveExpand?: boolean;
163
198
  };
164
199
  allowNestedTasks?: boolean;
165
- allowAnalyticsGASV3?: boolean;
166
200
  allowBlockType?: BlockTypePluginOptions['allowBlockType'];
167
201
  allowTasksAndDecisions?: boolean;
168
202
  allowBreakout?: boolean;
169
203
  allowRule?: boolean;
170
- allowTextColor?: boolean | TextColorPluginConfig;
171
- allowTables?: boolean | TablesPluginConfig;
172
204
  allowHelpDialog?: boolean;
173
205
  allowJiraIssue?: boolean;
174
206
  allowPanel?: boolean | PanelPluginConfig;
@@ -187,7 +219,6 @@ export interface EditorPluginFeatureProps {
187
219
  * The idea of this new behaviour is to have a consistent outcome regardless of the insertion method.
188
220
  **/
189
221
  allowNewInsertionBehaviour?: boolean;
190
- allowUndoRedoButtons?: boolean;
191
222
  allowFindReplace?: boolean | FindReplaceOptions;
192
223
  /**
193
224
  * Enable support for the "fragment" mark.
@@ -208,18 +239,6 @@ export interface EditorPluginFeatureProps {
208
239
  maxContentSize?: number;
209
240
  saveOnEnter?: boolean;
210
241
  feedbackInfo?: FeedbackInfo;
211
- media?: MediaOptions;
212
- collabEdit?: CollabEditOptions;
213
- primaryToolbarComponents?: PrimaryToolbarComponents;
214
- /** @deprecated Use smartLinks instead. */
215
- UNSAFE_cards?: CardOptions;
216
- /** @deprecated Use linking instead. */
217
- smartLinks?: CardOptions;
218
- /**
219
- * Configure and extend editor linking behaviour
220
- */
221
- linking?: LinkingOptions;
222
- sanitizePrivateContent?: boolean;
223
242
  mention?: MentionPluginConfig;
224
243
  /**
225
244
  * flag to indicate display name instead of nick name should be inserted for mentions
@@ -227,14 +246,8 @@ export interface EditorPluginFeatureProps {
227
246
  * @deprecated Use mention.mentionInsertDisplayName instead
228
247
  */
229
248
  mentionInsertDisplayName?: boolean;
230
- /**
231
- * @description Control performance metric measurements and tracking
232
- */
233
- performanceTracking?: PerformanceTracking;
234
249
  uploadErrorHandler?: (state: MediaState) => void;
235
- onSave?: (editorView: EditorView) => void;
236
250
  waitForMediaUpload?: boolean;
237
- insertMenuItems?: MenuItem[];
238
251
  extensionHandlers?: ExtensionHandlers;
239
252
  }
240
253
  export {};
@@ -2,11 +2,6 @@
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import { EditorAppearanceComponentProps } from '../../types';
5
- export interface ChromelessEditorProps {
6
- isMaxContentSizeReached?: boolean;
7
- maxHeight?: number;
8
- minHeight?: number;
9
- }
10
5
  export default class Editor extends React.Component<EditorAppearanceComponentProps, any> {
11
6
  static displayName: string;
12
7
  private appearance;