@atlaskit/editor-core 180.0.0 → 180.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (457) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/codemods/180.1.0-update-to-editor-migration-component.ts +8 -0
  3. package/codemods/__tests__/rename-editor-to-editor-migration-component.ts +156 -0
  4. package/codemods/migrates/rename-editor-to-editor-migration-component.ts +34 -0
  5. package/dist/cjs/actions/index.js +1 -1
  6. package/dist/cjs/create-editor/ReactEditorView.js +12 -762
  7. package/dist/cjs/create-editor/ReactEditorViewInternal.js +783 -0
  8. package/dist/cjs/create-editor/ReactEditorViewNext.js +16 -0
  9. package/dist/cjs/create-editor/create-plugins-list.js +1 -0
  10. package/dist/cjs/create-editor/feature-flags-from-props.js +3 -2
  11. package/dist/cjs/editor-next/editor-internal.js +147 -0
  12. package/dist/cjs/editor-next/editor-migration-component.js +35 -0
  13. package/dist/cjs/editor-next/hooks/useEditorMeasuresConstructor.js +36 -0
  14. package/dist/cjs/editor-next/hooks/useMeasureEditorMountTime.js +42 -0
  15. package/dist/cjs/editor-next/hooks/useProviderFactory.js +72 -0
  16. package/dist/cjs/editor-next/index.js +139 -0
  17. package/dist/cjs/editor-next/utils/deprecationWarnings.js +45 -0
  18. package/dist/cjs/editor-next/utils/editorMeasureTTICallback.js +44 -0
  19. package/dist/cjs/editor-next/utils/editorPropTypes.js +36 -0
  20. package/dist/cjs/editor-next/utils/getBaseFontSize.js +17 -0
  21. package/dist/cjs/editor-next/utils/handleProviders.js +56 -0
  22. package/dist/cjs/editor-next/utils/onEditorCreated.js +28 -0
  23. package/dist/cjs/editor-next/utils/sendDurationAnalytics.js +68 -0
  24. package/dist/cjs/editor-next/utils/trackEditorActions.js +101 -0
  25. package/dist/cjs/editor.js +130 -443
  26. package/dist/cjs/index.js +7 -0
  27. package/dist/cjs/labs/next/internal/hooks/use-analytics/index.js +4 -4
  28. package/dist/cjs/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +6 -6
  29. package/dist/cjs/labs/next/presets/create-stub-internal-apis.js +117 -0
  30. package/dist/cjs/labs/next/presets/preset.js +0 -5
  31. package/dist/cjs/labs/next/presets/universal.js +11 -2
  32. package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +48 -13
  33. package/dist/cjs/plugins/analytics/index.js +2 -3
  34. package/dist/cjs/plugins/analytics/plugin.js +5 -6
  35. package/dist/cjs/plugins/analytics/utils.js +0 -11
  36. package/dist/cjs/plugins/base/pm-plugins/filter-steps.js +1 -1
  37. package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +98 -56
  38. package/dist/cjs/plugins/base/utils/input-latency-tracking.js +24 -25
  39. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -0
  40. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +36 -9
  41. package/dist/cjs/plugins/card/nodeviews/blockCard.js +2 -1
  42. package/dist/cjs/plugins/card/nodeviews/genericCard.js +16 -2
  43. package/dist/cjs/plugins/card/pm-plugins/main.js +4 -2
  44. package/dist/cjs/plugins/clipboard/pm-plugins/main.js +4 -1
  45. package/dist/cjs/plugins/collab-edit/plugin.js +2 -3
  46. package/dist/cjs/plugins/extension/toolbar.js +7 -1
  47. package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +5 -1
  48. package/dist/cjs/plugins/floating-toolbar/ui/Button.js +2 -0
  49. package/dist/cjs/plugins/floating-toolbar/ui/CheckboxModal.js +5 -3
  50. package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +38 -9
  51. package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +23 -21
  52. package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +12 -7
  53. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +11 -0
  54. package/dist/cjs/plugins/fragment/pm-plugins/fragment-consistency.js +1 -0
  55. package/dist/cjs/plugins/hyperlink/analytics.js +5 -5
  56. package/dist/cjs/plugins/hyperlink/index.js +1 -1
  57. package/dist/cjs/plugins/hyperlink/pm-plugins/main.js +9 -5
  58. package/dist/cjs/plugins/hyperlink/ui/EditorLinkPicker/index.js +10 -4
  59. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
  60. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +4 -3
  61. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -0
  62. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -0
  63. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +3 -0
  64. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +1 -0
  65. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -0
  66. package/dist/cjs/plugins/media/commands/helpers.js +12 -40
  67. package/dist/cjs/plugins/media/commands/index.js +4 -4
  68. package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +14 -12
  69. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +1 -1
  70. package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +310 -205
  71. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +1 -1
  72. package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
  73. package/dist/cjs/plugins/media/pm-plugins/main.js +2 -27
  74. package/dist/cjs/plugins/media/toolbar/filePreviewItem.js +1 -4
  75. package/dist/cjs/plugins/panel/utils.js +4 -1
  76. package/dist/cjs/plugins/paste/handlers.js +128 -13
  77. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +15 -6
  78. package/dist/cjs/plugins/paste/pm-plugins/main.js +12 -3
  79. package/dist/cjs/plugins/placeholder-text/index.js +2 -2
  80. package/dist/cjs/plugins/status/index.js +9 -3
  81. package/dist/cjs/plugins/status/ui/statusPicker.js +8 -2
  82. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +42 -8
  83. package/dist/cjs/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +22 -2
  84. package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +3 -1
  85. package/dist/cjs/plugins/text-formatting/ui/Toolbar/more-button.js +3 -1
  86. package/dist/cjs/plugins/text-formatting/utils.js +1 -10
  87. package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +19 -1
  88. package/dist/cjs/plugins/type-ahead/index.js +1 -1
  89. package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +79 -106
  90. package/dist/cjs/types/get-editor-props.js +5 -0
  91. package/dist/cjs/ui/ChromeCollapsed/index.js +1 -0
  92. package/dist/cjs/ui/CollapsedEditor/index.js +7 -13
  93. package/dist/cjs/ui/ColorPickerButton/index.js +68 -6
  94. package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +1 -1
  95. package/dist/cjs/ui/ContextPanel/context.js +13 -12
  96. package/dist/cjs/ui/Dropdown/index.js +7 -2
  97. package/dist/cjs/ui/DropdownMenu/index.js +7 -2
  98. package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +1 -1
  99. package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +1 -1
  100. package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +1 -1
  101. package/dist/cjs/ui/PanelTextInput/index.js +4 -4
  102. package/dist/cjs/ui/PortalProvider/index.js +5 -5
  103. package/dist/cjs/ui/WidthEmitter/index.js +29 -35
  104. package/dist/cjs/utils/document.js +15 -0
  105. package/dist/cjs/utils/extensions.js +6 -7
  106. package/dist/cjs/utils/get-editor-plugins.js +32 -0
  107. package/dist/cjs/utils/linking-utils.js +1 -1
  108. package/dist/cjs/utils/performance/components/RenderTracking.js +1 -1
  109. package/dist/cjs/utils/performance/safer-transactions.js +1 -1
  110. package/dist/cjs/utils/prepare-extension-provider.js +25 -0
  111. package/dist/cjs/version-wrapper.js +1 -1
  112. package/dist/cjs/version.json +1 -1
  113. package/dist/es2019/actions/index.js +2 -2
  114. package/dist/es2019/create-editor/ReactEditorView.js +6 -708
  115. package/dist/es2019/create-editor/ReactEditorViewInternal.js +712 -0
  116. package/dist/es2019/create-editor/ReactEditorViewNext.js +7 -0
  117. package/dist/es2019/create-editor/create-plugins-list.js +1 -0
  118. package/dist/es2019/create-editor/feature-flags-from-props.js +3 -2
  119. package/dist/es2019/editor-next/editor-internal.js +142 -0
  120. package/dist/es2019/editor-next/editor-migration-component.js +10 -0
  121. package/dist/es2019/editor-next/hooks/useEditorMeasuresConstructor.js +30 -0
  122. package/dist/es2019/editor-next/hooks/useMeasureEditorMountTime.js +35 -0
  123. package/dist/es2019/editor-next/hooks/useProviderFactory.js +61 -0
  124. package/dist/es2019/editor-next/index.js +90 -0
  125. package/dist/es2019/editor-next/utils/deprecationWarnings.js +39 -0
  126. package/dist/es2019/editor-next/utils/editorMeasureTTICallback.js +40 -0
  127. package/dist/es2019/editor-next/utils/editorPropTypes.js +29 -0
  128. package/dist/es2019/editor-next/utils/getBaseFontSize.js +11 -0
  129. package/dist/es2019/editor-next/utils/handleProviders.js +52 -0
  130. package/dist/es2019/editor-next/utils/onEditorCreated.js +21 -0
  131. package/dist/es2019/editor-next/utils/sendDurationAnalytics.js +40 -0
  132. package/dist/es2019/editor-next/utils/trackEditorActions.js +78 -0
  133. package/dist/es2019/editor.js +111 -396
  134. package/dist/es2019/index.js +2 -1
  135. package/dist/es2019/labs/next/internal/hooks/use-analytics/index.js +2 -2
  136. package/dist/es2019/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +2 -3
  137. package/dist/es2019/labs/next/presets/create-stub-internal-apis.js +105 -0
  138. package/dist/es2019/labs/next/presets/preset.js +0 -3
  139. package/dist/es2019/labs/next/presets/universal.js +13 -2
  140. package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +41 -12
  141. package/dist/es2019/plugins/analytics/index.js +3 -4
  142. package/dist/es2019/plugins/analytics/plugin.js +1 -2
  143. package/dist/es2019/plugins/analytics/utils.js +0 -4
  144. package/dist/es2019/plugins/base/pm-plugins/filter-steps.js +1 -1
  145. package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +96 -58
  146. package/dist/es2019/plugins/base/utils/input-latency-tracking.js +23 -23
  147. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -0
  148. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +31 -5
  149. package/dist/es2019/plugins/card/nodeviews/blockCard.js +4 -1
  150. package/dist/es2019/plugins/card/nodeviews/genericCard.js +16 -2
  151. package/dist/es2019/plugins/card/pm-plugins/main.js +3 -1
  152. package/dist/es2019/plugins/clipboard/pm-plugins/main.js +3 -1
  153. package/dist/es2019/plugins/collab-edit/plugin.js +1 -2
  154. package/dist/es2019/plugins/extension/toolbar.js +7 -1
  155. package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +5 -1
  156. package/dist/es2019/plugins/floating-toolbar/ui/Button.js +2 -0
  157. package/dist/es2019/plugins/floating-toolbar/ui/CheckboxModal.js +5 -3
  158. package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +35 -7
  159. package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +2 -2
  160. package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +12 -7
  161. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +11 -0
  162. package/dist/es2019/plugins/fragment/pm-plugins/fragment-consistency.js +1 -0
  163. package/dist/es2019/plugins/hyperlink/analytics.js +1 -1
  164. package/dist/es2019/plugins/hyperlink/index.js +1 -1
  165. package/dist/es2019/plugins/hyperlink/pm-plugins/main.js +8 -4
  166. package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/index.js +9 -3
  167. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
  168. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +3 -2
  169. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -0
  170. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -0
  171. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +3 -0
  172. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +1 -0
  173. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +24 -0
  174. package/dist/es2019/plugins/media/commands/helpers.js +9 -35
  175. package/dist/es2019/plugins/media/commands/index.js +1 -1
  176. package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +3 -3
  177. package/dist/es2019/plugins/media/nodeviews/mediaInline.js +1 -1
  178. package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +70 -37
  179. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +1 -1
  180. package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
  181. package/dist/es2019/plugins/media/pm-plugins/main.js +3 -30
  182. package/dist/es2019/plugins/media/toolbar/filePreviewItem.js +1 -4
  183. package/dist/es2019/plugins/panel/utils.js +4 -1
  184. package/dist/es2019/plugins/paste/handlers.js +127 -5
  185. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +10 -4
  186. package/dist/es2019/plugins/paste/pm-plugins/main.js +13 -4
  187. package/dist/es2019/plugins/placeholder-text/index.js +1 -1
  188. package/dist/es2019/plugins/status/index.js +8 -2
  189. package/dist/es2019/plugins/status/ui/statusPicker.js +8 -2
  190. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +42 -8
  191. package/dist/es2019/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +20 -3
  192. package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +4 -2
  193. package/dist/es2019/plugins/text-formatting/ui/Toolbar/more-button.js +3 -1
  194. package/dist/es2019/plugins/text-formatting/utils.js +0 -8
  195. package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +16 -1
  196. package/dist/es2019/plugins/type-ahead/index.js +1 -1
  197. package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +73 -92
  198. package/dist/es2019/types/get-editor-props.js +1 -0
  199. package/dist/es2019/ui/ChromeCollapsed/index.js +1 -0
  200. package/dist/es2019/ui/CollapsedEditor/index.js +7 -11
  201. package/dist/es2019/ui/ColorPickerButton/index.js +61 -8
  202. package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +1 -1
  203. package/dist/es2019/ui/ContextPanel/context.js +5 -4
  204. package/dist/es2019/ui/Dropdown/index.js +5 -2
  205. package/dist/es2019/ui/DropdownMenu/index.js +5 -2
  206. package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +1 -1
  207. package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +1 -1
  208. package/dist/es2019/ui/ElementBrowser/components/StatelessElementBrowser.js +1 -1
  209. package/dist/es2019/ui/PanelTextInput/index.js +3 -3
  210. package/dist/es2019/ui/PortalProvider/index.js +1 -1
  211. package/dist/es2019/ui/WidthEmitter/index.js +25 -29
  212. package/dist/es2019/utils/document.js +11 -1
  213. package/dist/es2019/utils/extensions.js +1 -3
  214. package/dist/es2019/utils/get-editor-plugins.js +25 -0
  215. package/dist/es2019/utils/linking-utils.js +1 -1
  216. package/dist/es2019/utils/performance/components/RenderTracking.js +1 -1
  217. package/dist/es2019/utils/performance/safer-transactions.js +1 -1
  218. package/dist/es2019/utils/prepare-extension-provider.js +13 -0
  219. package/dist/es2019/version-wrapper.js +1 -1
  220. package/dist/es2019/version.json +1 -1
  221. package/dist/esm/actions/index.js +2 -2
  222. package/dist/esm/create-editor/ReactEditorView.js +12 -763
  223. package/dist/esm/create-editor/ReactEditorViewInternal.js +776 -0
  224. package/dist/esm/create-editor/ReactEditorViewNext.js +7 -0
  225. package/dist/esm/create-editor/create-plugins-list.js +1 -0
  226. package/dist/esm/create-editor/feature-flags-from-props.js +3 -2
  227. package/dist/esm/editor-next/editor-internal.js +141 -0
  228. package/dist/esm/editor-next/editor-migration-component.js +28 -0
  229. package/dist/esm/editor-next/hooks/useEditorMeasuresConstructor.js +30 -0
  230. package/dist/esm/editor-next/hooks/useMeasureEditorMountTime.js +35 -0
  231. package/dist/esm/editor-next/hooks/useProviderFactory.js +65 -0
  232. package/dist/esm/editor-next/index.js +134 -0
  233. package/dist/esm/editor-next/utils/deprecationWarnings.js +39 -0
  234. package/dist/esm/editor-next/utils/editorMeasureTTICallback.js +38 -0
  235. package/dist/esm/editor-next/utils/editorPropTypes.js +28 -0
  236. package/dist/esm/editor-next/utils/getBaseFontSize.js +11 -0
  237. package/dist/esm/editor-next/utils/handleProviders.js +50 -0
  238. package/dist/esm/editor-next/utils/onEditorCreated.js +21 -0
  239. package/dist/esm/editor-next/utils/sendDurationAnalytics.js +61 -0
  240. package/dist/esm/editor-next/utils/trackEditorActions.js +94 -0
  241. package/dist/esm/editor.js +130 -440
  242. package/dist/esm/index.js +2 -1
  243. package/dist/esm/labs/next/internal/hooks/use-analytics/index.js +2 -2
  244. package/dist/esm/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +2 -3
  245. package/dist/esm/labs/next/presets/create-stub-internal-apis.js +110 -0
  246. package/dist/esm/labs/next/presets/preset.js +0 -5
  247. package/dist/esm/labs/next/presets/universal.js +11 -2
  248. package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +48 -13
  249. package/dist/esm/plugins/analytics/index.js +3 -4
  250. package/dist/esm/plugins/analytics/plugin.js +1 -2
  251. package/dist/esm/plugins/analytics/utils.js +0 -9
  252. package/dist/esm/plugins/base/pm-plugins/filter-steps.js +1 -1
  253. package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +98 -56
  254. package/dist/esm/plugins/base/utils/input-latency-tracking.js +24 -25
  255. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -0
  256. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +36 -9
  257. package/dist/esm/plugins/card/nodeviews/blockCard.js +2 -1
  258. package/dist/esm/plugins/card/nodeviews/genericCard.js +16 -2
  259. package/dist/esm/plugins/card/pm-plugins/main.js +4 -2
  260. package/dist/esm/plugins/clipboard/pm-plugins/main.js +4 -1
  261. package/dist/esm/plugins/collab-edit/plugin.js +1 -2
  262. package/dist/esm/plugins/extension/toolbar.js +7 -1
  263. package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +5 -1
  264. package/dist/esm/plugins/floating-toolbar/ui/Button.js +2 -0
  265. package/dist/esm/plugins/floating-toolbar/ui/CheckboxModal.js +5 -3
  266. package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +38 -9
  267. package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +23 -21
  268. package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +12 -7
  269. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +11 -0
  270. package/dist/esm/plugins/fragment/pm-plugins/fragment-consistency.js +1 -0
  271. package/dist/esm/plugins/hyperlink/analytics.js +1 -1
  272. package/dist/esm/plugins/hyperlink/index.js +1 -1
  273. package/dist/esm/plugins/hyperlink/pm-plugins/main.js +9 -5
  274. package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/index.js +10 -4
  275. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
  276. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +3 -2
  277. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -0
  278. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -0
  279. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +3 -0
  280. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +1 -0
  281. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -0
  282. package/dist/esm/plugins/media/commands/helpers.js +9 -35
  283. package/dist/esm/plugins/media/commands/index.js +1 -1
  284. package/dist/esm/plugins/media/nodeviews/mediaGroup.js +14 -12
  285. package/dist/esm/plugins/media/nodeviews/mediaInline.js +1 -1
  286. package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +311 -206
  287. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
  288. package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
  289. package/dist/esm/plugins/media/pm-plugins/main.js +3 -28
  290. package/dist/esm/plugins/media/toolbar/filePreviewItem.js +1 -4
  291. package/dist/esm/plugins/panel/utils.js +4 -1
  292. package/dist/esm/plugins/paste/handlers.js +127 -13
  293. package/dist/esm/plugins/paste/pm-plugins/analytics.js +13 -5
  294. package/dist/esm/plugins/paste/pm-plugins/main.js +13 -4
  295. package/dist/esm/plugins/placeholder-text/index.js +2 -2
  296. package/dist/esm/plugins/status/index.js +9 -3
  297. package/dist/esm/plugins/status/ui/statusPicker.js +8 -2
  298. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +42 -8
  299. package/dist/esm/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +23 -3
  300. package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +4 -2
  301. package/dist/esm/plugins/text-formatting/ui/Toolbar/more-button.js +3 -1
  302. package/dist/esm/plugins/text-formatting/utils.js +0 -8
  303. package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +19 -1
  304. package/dist/esm/plugins/type-ahead/index.js +1 -1
  305. package/dist/esm/plugins/type-ahead/ui/InputQuery.js +79 -106
  306. package/dist/esm/types/get-editor-props.js +1 -0
  307. package/dist/esm/ui/ChromeCollapsed/index.js +1 -0
  308. package/dist/esm/ui/CollapsedEditor/index.js +7 -13
  309. package/dist/esm/ui/ColorPickerButton/index.js +69 -7
  310. package/dist/esm/ui/ConfigPanel/ConfigPanel.js +1 -1
  311. package/dist/esm/ui/ContextPanel/context.js +8 -8
  312. package/dist/esm/ui/Dropdown/index.js +7 -2
  313. package/dist/esm/ui/DropdownMenu/index.js +7 -2
  314. package/dist/esm/ui/ElementBrowser/components/CategoryList.js +1 -1
  315. package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +1 -1
  316. package/dist/esm/ui/ElementBrowser/components/StatelessElementBrowser.js +1 -1
  317. package/dist/esm/ui/PanelTextInput/index.js +4 -4
  318. package/dist/esm/ui/PortalProvider/index.js +1 -1
  319. package/dist/esm/ui/WidthEmitter/index.js +28 -37
  320. package/dist/esm/utils/document.js +15 -1
  321. package/dist/esm/utils/extensions.js +1 -3
  322. package/dist/esm/utils/get-editor-plugins.js +25 -0
  323. package/dist/esm/utils/linking-utils.js +1 -1
  324. package/dist/esm/utils/performance/components/RenderTracking.js +1 -1
  325. package/dist/esm/utils/performance/safer-transactions.js +1 -1
  326. package/dist/esm/utils/prepare-extension-provider.js +17 -0
  327. package/dist/esm/version-wrapper.js +1 -1
  328. package/dist/esm/version.json +1 -1
  329. package/dist/types/actions/index.d.ts +2 -2
  330. package/dist/types/create-editor/ReactEditorView.d.ts +7 -109
  331. package/dist/types/create-editor/ReactEditorViewInternal.d.ts +112 -0
  332. package/dist/types/create-editor/ReactEditorViewNext.d.ts +9 -0
  333. package/dist/types/editor-next/editor-internal.d.ts +44 -0
  334. package/dist/types/editor-next/editor-migration-component.d.ts +5 -0
  335. package/dist/types/editor-next/hooks/useEditorMeasuresConstructor.d.ts +17 -0
  336. package/dist/types/editor-next/hooks/useMeasureEditorMountTime.d.ts +13 -0
  337. package/dist/types/editor-next/hooks/useProviderFactory.d.ts +21 -0
  338. package/dist/types/editor-next/index.d.ts +34 -0
  339. package/dist/types/editor-next/utils/deprecationWarnings.d.ts +2 -0
  340. package/dist/types/editor-next/utils/editorMeasureTTICallback.d.ts +5 -0
  341. package/dist/types/editor-next/utils/editorPropTypes.d.ts +19 -0
  342. package/dist/types/editor-next/utils/getBaseFontSize.d.ts +6 -0
  343. package/dist/types/editor-next/utils/handleProviders.d.ts +14 -0
  344. package/dist/types/editor-next/utils/onEditorCreated.d.ts +12 -0
  345. package/dist/types/editor-next/utils/sendDurationAnalytics.d.ts +15 -0
  346. package/dist/types/editor-next/utils/trackEditorActions.d.ts +29 -0
  347. package/dist/types/editor.d.ts +47 -25
  348. package/dist/types/index.d.ts +1 -0
  349. package/dist/types/labs/next/internal/hooks/use-analytics/index.d.ts +1 -1
  350. package/dist/types/labs/next/presets/create-stub-internal-apis.d.ts +16 -0
  351. package/dist/types/labs/next/presets/preset.d.ts +6 -6
  352. package/dist/types/labs/next/presets/universal.d.ts +1 -1
  353. package/dist/types/plugins/alignment/index.d.ts +1 -1
  354. package/dist/types/plugins/alignment/ui/ToolbarAlignment/index.d.ts +3 -1
  355. package/dist/types/plugins/analytics/index.d.ts +3 -6
  356. package/dist/types/plugins/analytics/plugin.d.ts +3 -1
  357. package/dist/types/plugins/analytics/utils.d.ts +2 -3
  358. package/dist/types/plugins/annotation/index.d.ts +3 -1
  359. package/dist/types/plugins/avatar-group/index.d.ts +3 -1
  360. package/dist/types/plugins/base/index.d.ts +3 -1
  361. package/dist/types/plugins/base/pm-plugins/filter-steps.d.ts +1 -1
  362. package/dist/types/plugins/base/utils/input-latency-tracking.d.ts +1 -3
  363. package/dist/types/plugins/before-primaryToolbar/index.d.ts +3 -1
  364. package/dist/types/plugins/block-type/index.d.ts +3 -1
  365. package/dist/types/plugins/block-type/ui/ToolbarBlockType/blocktype-button.d.ts +1 -0
  366. package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +1 -0
  367. package/dist/types/plugins/breakout/index.d.ts +3 -1
  368. package/dist/types/plugins/card/index.d.ts +3 -1
  369. package/dist/types/plugins/card/nodeviews/genericCard.d.ts +1 -1
  370. package/dist/types/plugins/card/pm-plugins/util/state.d.ts +1 -0
  371. package/dist/types/plugins/card/types.d.ts +3 -0
  372. package/dist/types/plugins/code-bidi-warning/index.d.ts +3 -1
  373. package/dist/types/plugins/code-block/index.d.ts +3 -1
  374. package/dist/types/plugins/collab-edit/index.d.ts +3 -1
  375. package/dist/types/plugins/context-panel/index.d.ts +1 -1
  376. package/dist/types/plugins/emoji/index.d.ts +3 -1
  377. package/dist/types/plugins/expand/index.d.ts +3 -1
  378. package/dist/types/plugins/extension/index.d.ts +3 -1
  379. package/dist/types/plugins/extension/toolbar.d.ts +5 -0
  380. package/dist/types/plugins/feature-flags-context/index.d.ts +3 -1
  381. package/dist/types/plugins/feedback-dialog/index.d.ts +3 -1
  382. package/dist/types/plugins/find-replace/index.d.ts +3 -1
  383. package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +2 -1
  384. package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +5 -2
  385. package/dist/types/plugins/grid/index.d.ts +3 -1
  386. package/dist/types/plugins/help-dialog/index.d.ts +3 -1
  387. package/dist/types/plugins/hyperlink/analytics.d.ts +1 -1
  388. package/dist/types/plugins/hyperlink/index.d.ts +3 -1
  389. package/dist/types/plugins/hyperlink/pm-plugins/main.d.ts +4 -2
  390. package/dist/types/plugins/hyperlink/types.d.ts +3 -1
  391. package/dist/types/plugins/hyperlink/ui/EditorLinkPicker/index.d.ts +3 -1
  392. package/dist/types/plugins/insert-block/index.d.ts +3 -1
  393. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +1 -0
  394. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.d.ts +1 -0
  395. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +1 -0
  396. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -0
  397. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +1 -0
  398. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +1 -0
  399. package/dist/types/plugins/layout/index.d.ts +3 -1
  400. package/dist/types/plugins/list/index.d.ts +3 -1
  401. package/dist/types/plugins/max-content-size/index.d.ts +3 -1
  402. package/dist/types/plugins/media/commands/helpers.d.ts +5 -12
  403. package/dist/types/plugins/media/commands/index.d.ts +1 -1
  404. package/dist/types/plugins/media/index.d.ts +3 -1
  405. package/dist/types/plugins/media/nodeviews/__mocks__/mediaNodeUpdater.d.ts +3 -1
  406. package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +4 -1
  407. package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -4
  408. package/dist/types/plugins/media/pm-plugins/types.d.ts +1 -4
  409. package/dist/types/plugins/mentions/index.d.ts +3 -1
  410. package/dist/types/plugins/panel/index.d.ts +3 -1
  411. package/dist/types/plugins/paste/handlers.d.ts +2 -1
  412. package/dist/types/plugins/paste/index.d.ts +3 -1
  413. package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +4 -1
  414. package/dist/types/plugins/placeholder/index.d.ts +3 -1
  415. package/dist/types/plugins/placeholder-text/index.d.ts +3 -1
  416. package/dist/types/plugins/quick-insert/index.d.ts +3 -1
  417. package/dist/types/plugins/save-on-enter/index.d.ts +3 -1
  418. package/dist/types/plugins/selection/index.d.ts +3 -1
  419. package/dist/types/plugins/status/index.d.ts +3 -1
  420. package/dist/types/plugins/status/ui/statusPicker.d.ts +3 -0
  421. package/dist/types/plugins/submit-editor/index.d.ts +3 -1
  422. package/dist/types/plugins/tasks-and-decisions/index.d.ts +3 -1
  423. package/dist/types/plugins/text-color/index.d.ts +3 -1
  424. package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +2 -0
  425. package/dist/types/plugins/text-formatting/index.d.ts +3 -1
  426. package/dist/types/plugins/text-formatting/ui/Toolbar/more-button.d.ts +2 -1
  427. package/dist/types/plugins/text-formatting/utils.d.ts +0 -1
  428. package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +3 -1
  429. package/dist/types/plugins/type-ahead/index.d.ts +3 -1
  430. package/dist/types/types/get-editor-props.d.ts +12 -0
  431. package/dist/types/types/performance-tracking.d.ts +10 -0
  432. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +29 -29
  433. package/dist/types/ui/CollapsedEditor/index.d.ts +4 -3
  434. package/dist/types/ui/ColorPickerButton/index.d.ts +2 -1
  435. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  436. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  437. package/dist/types/ui/ContextPanel/context.d.ts +2 -1
  438. package/dist/types/ui/PanelTextInput/index.d.ts +1 -1
  439. package/dist/types/ui/PortalProvider/index.d.ts +1 -1
  440. package/dist/types/utils/document.d.ts +4 -3
  441. package/dist/types/utils/get-editor-plugins.d.ts +10 -0
  442. package/dist/types/utils/linking-utils.d.ts +1 -1
  443. package/dist/types/utils/performance/components/RenderTracking.d.ts +1 -1
  444. package/dist/types/utils/performance/instrumented-plugin.d.ts +1 -1
  445. package/dist/types/utils/performance/safer-transactions.d.ts +1 -1
  446. package/dist/types/utils/prepare-extension-provider.d.ts +5 -0
  447. package/docs/0-intro.tsx +0 -1
  448. package/package.json +23 -22
  449. package/report.api.md +193 -139
  450. package/dist/cjs/plugins/analytics/analytics-queue.js +0 -79
  451. package/dist/cjs/plugins/analytics/fire-analytics-event.js +0 -35
  452. package/dist/es2019/plugins/analytics/analytics-queue.js +0 -53
  453. package/dist/es2019/plugins/analytics/fire-analytics-event.js +0 -26
  454. package/dist/esm/plugins/analytics/analytics-queue.js +0 -71
  455. package/dist/esm/plugins/analytics/fire-analytics-event.js +0 -28
  456. package/dist/types/plugins/analytics/analytics-queue.d.ts +0 -10
  457. package/dist/types/plugins/analytics/fire-analytics-event.d.ts +0 -9
@@ -0,0 +1,112 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { EditorState } from 'prosemirror-state';
4
+ import { DirectEditorProps, EditorView } from 'prosemirror-view';
5
+ import { Node as PMNode } from 'prosemirror-model';
6
+ import { WrappedComponentProps } from 'react-intl-next';
7
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
8
+ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
9
+ import { ErrorReporter } from '@atlaskit/editor-common/utils';
10
+ import { ExperienceStore } from '@atlaskit/editor-common/ufo';
11
+ import { Transformer } from '@atlaskit/editor-common/types';
12
+ import { Dispatch, EventDispatcher } from '../event-dispatcher';
13
+ import { AnalyticsEventPayload, DispatchAnalyticsEvent, FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
14
+ import { EditorAppearance, EditorConfig, EditorReactContext, EditorPlugin, EditorProps } from '../types';
15
+ import { PortalProviderAPI } from '../ui/PortalProvider';
16
+ import { SEVERITY } from '@atlaskit/editor-common/utils';
17
+ import { TransactionTracker } from '../utils/performance/track-transactions';
18
+ import type { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
19
+ import { GetEditorPlugins } from '../types/get-editor-props';
20
+ export interface EditorViewProps {
21
+ editorProps: EditorProps;
22
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
23
+ providerFactory: ProviderFactory;
24
+ portalProviderAPI: PortalProviderAPI;
25
+ getEditorPlugins?: GetEditorPlugins;
26
+ allowAnalyticsGASV3?: boolean;
27
+ disabled?: boolean;
28
+ experienceStore?: ExperienceStore;
29
+ render?: (props: {
30
+ editor: JSX.Element;
31
+ view?: EditorView;
32
+ config: EditorConfig;
33
+ eventDispatcher: EventDispatcher;
34
+ transformer?: Transformer<string>;
35
+ dispatchAnalyticsEvent: DispatchAnalyticsEvent;
36
+ editorRef: React.RefObject<HTMLDivElement>;
37
+ }) => JSX.Element;
38
+ onEditorCreated: (instance: {
39
+ view: EditorView;
40
+ config: EditorConfig;
41
+ eventDispatcher: EventDispatcher;
42
+ transformer?: Transformer<string>;
43
+ }) => void;
44
+ onEditorDestroyed: (instance: {
45
+ view: EditorView;
46
+ config: EditorConfig;
47
+ eventDispatcher: EventDispatcher;
48
+ transformer?: Transformer<string>;
49
+ }) => void;
50
+ }
51
+ export declare function shouldReconfigureState(props: EditorProps, nextProps: EditorProps): boolean;
52
+ interface CreateEditorStateOptions {
53
+ props: EditorViewProps;
54
+ context: EditorReactContext;
55
+ doc?: string | Object | PMNode;
56
+ resetting?: boolean;
57
+ selectionAtStart?: boolean;
58
+ }
59
+ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewProps & WrappedComponentProps & T, {}, EditorReactContext> {
60
+ view?: EditorView;
61
+ eventDispatcher: EventDispatcher;
62
+ contentTransformer?: Transformer<string>;
63
+ config: EditorConfig;
64
+ editorState: EditorState;
65
+ errorReporter: ErrorReporter;
66
+ dispatch: Dispatch;
67
+ proseMirrorRenderedSeverity?: SEVERITY;
68
+ transactionTracker: TransactionTracker;
69
+ validTransactionCount: number;
70
+ experienceStore?: ExperienceStore;
71
+ editorRef: React.RefObject<HTMLDivElement>;
72
+ static contextTypes: {
73
+ getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
74
+ };
75
+ private canDispatchTransactions;
76
+ private focusTimeoutId?;
77
+ private reliabilityInterval?;
78
+ private pluginPerformanceObserver;
79
+ private featureFlags;
80
+ private onPluginObservation;
81
+ get transactionTracking(): import("../types/performance-tracking").TransactionTracking;
82
+ private getPluginNames;
83
+ private countNodes;
84
+ constructor(props: EditorViewProps & WrappedComponentProps & T, context: EditorReactContext);
85
+ UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
86
+ formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
87
+ resetEditorState: ({ doc, shouldScrollToBottom, }: {
88
+ doc: string;
89
+ shouldScrollToBottom: boolean;
90
+ }) => void;
91
+ blur: () => void;
92
+ reconfigureState: (props: EditorViewProps) => void;
93
+ handleAnalyticsEvent: FireAnalyticsCallback;
94
+ componentDidMount(): void;
95
+ /**
96
+ * Clean up any non-PM resources when the editor is unmounted
97
+ */
98
+ componentWillUnmount(): void;
99
+ private editorPlugins;
100
+ getPlugins(editorProps: EditorProps, prevEditorProps?: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPlugin[];
101
+ createEditorState: (options: CreateEditorStateOptions) => EditorState<any>;
102
+ private onEditorViewStateUpdated;
103
+ private trackValidTransactions;
104
+ private dispatchTransaction;
105
+ getDirectEditorProps: (state?: EditorState<any> | undefined) => DirectEditorProps;
106
+ private createEditorView;
107
+ handleEditorViewRef: (node: HTMLDivElement) => void;
108
+ dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
109
+ private editor;
110
+ render(): JSX.Element;
111
+ }
112
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { EditorViewProps } from './ReactEditorViewInternal';
3
+ import { WrappedComponentProps } from 'react-intl-next';
4
+ declare type AddRequiredProp<Type, Key extends keyof Type> = Type & Required<Pick<Type, Key>>;
5
+ export declare function ReactEditorViewEditor<T = {}>(props: AddRequiredProp<EditorViewProps & WrappedComponentProps & T, 'getEditorPlugins'>): JSX.Element;
6
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<EditorViewProps & WrappedComponentProps<"intl"> & Required<Pick<EditorViewProps & WrappedComponentProps<"intl">, "getEditorPlugins">>>> & {
7
+ WrappedComponent: React.ComponentType<EditorViewProps & WrappedComponentProps<"intl"> & Required<Pick<EditorViewProps & WrappedComponentProps<"intl">, "getEditorPlugins">>>;
8
+ };
9
+ export default _default;
@@ -0,0 +1,44 @@
1
+ /** @jsx jsx */
2
+ import { Transformer } from '@atlaskit/editor-common/types';
3
+ import { jsx } from '@emotion/react';
4
+ import { EditorView } from 'prosemirror-view';
5
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
6
+ import { ExperienceStore } from '@atlaskit/editor-common/ufo';
7
+ import EditorActions from '../actions';
8
+ import { EventDispatcher } from '../event-dispatcher';
9
+ import { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
10
+ import { EditorProps } from '../types/editor-props';
11
+ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
12
+ import { GetEditorPlugins } from '../types/get-editor-props';
13
+ interface Props {
14
+ props: EditorProps;
15
+ handleAnalyticsEvent: FireAnalyticsCallback;
16
+ createAnalyticsEvent: CreateUIAnalyticsEvent;
17
+ handleSave: (view: EditorView) => void;
18
+ editorActions: EditorActions;
19
+ getExperienceStore: () => ExperienceStore | undefined;
20
+ onEditorCreated: (instance: {
21
+ view: EditorView;
22
+ eventDispatcher: EventDispatcher;
23
+ transformer?: Transformer<string>;
24
+ }) => void;
25
+ onEditorDestroyed: (_instance: {
26
+ view: EditorView;
27
+ transformer?: Transformer<string>;
28
+ }) => void;
29
+ getEditorPlugins: GetEditorPlugins;
30
+ }
31
+ interface InternalProps extends Omit<Props, 'getExperienceStore'> {
32
+ providerFactory: ProviderFactory;
33
+ }
34
+ /**
35
+ * EditorInternal is used for the internal editor react component
36
+ * with the lifecycle methods extracted into hooks.
37
+ */
38
+ export default function EditorInternal(props: Props): jsx.JSX.Element;
39
+ /**
40
+ * EditorInternalComponent is used to capture the common component
41
+ * from the `render` method of `Editor` and share it with `EditorNext`.
42
+ */
43
+ export declare function EditorInternalWithoutHooks({ props, handleAnalyticsEvent, createAnalyticsEvent, handleSave, editorActions, providerFactory, onEditorCreated, onEditorDestroyed, getEditorPlugins, }: InternalProps): jsx.JSX.Element;
44
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { EditorProps } from '../types/editor-props';
3
+ export default class EditorMigrationComponent extends React.Component<EditorProps> {
4
+ render(): JSX.Element;
5
+ }
@@ -0,0 +1,17 @@
1
+ /** @jsx jsx */
2
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
+ import { ExperienceStore } from '@atlaskit/editor-common/ufo';
4
+ import { EditorProps } from '../../types/editor-props';
5
+ import { PerformanceTracking } from '../../types/performance-tracking';
6
+ /**
7
+ *
8
+ * Hook to be used for running analytics on mounting the editor.
9
+ * Should run once.
10
+ * WARNING: Consider any changes to also make to `src/editor.tsx`
11
+ *
12
+ * @param performanceTracking
13
+ * @param featureFlags
14
+ * @param getExperienceStore function to retrieve the Editor's current ExperienceStore
15
+ * @param createAnalyticsEvent
16
+ */
17
+ export default function useEditorConstructor(performanceTracking: PerformanceTracking | undefined, featureFlags: EditorProps['featureFlags'], getExperienceStore: () => ExperienceStore | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent): void;
@@ -0,0 +1,13 @@
1
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import { ExperienceStore } from '@atlaskit/editor-common/ufo';
3
+ import { EditorProps } from '../../types/editor-props';
4
+ /**
5
+ *
6
+ * Hook to run the analytics for the Editor component.
7
+ * WARNING: Consider any changes to also make to `src/editor.tsx`
8
+ *
9
+ * @param props EditorProps
10
+ * @param getExperienceStore function to retrieve the Editor's current ExperienceStore
11
+ * @param createAnalyticsEvent
12
+ */
13
+ export default function useMeasureEditorMountTime(props: EditorProps, getExperienceStore: () => ExperienceStore | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent): void;
@@ -0,0 +1,21 @@
1
+ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
2
+ import { EditorProps } from '../../types/editor-props';
3
+ import EditorActions from '../../actions';
4
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
5
+ import { QuickInsertProvider } from '../../plugins/quick-insert/types';
6
+ import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
7
+ export declare type ProviderFactoryState = {
8
+ extensionProvider?: ExtensionProvider;
9
+ quickInsertProvider?: Promise<QuickInsertProvider>;
10
+ };
11
+ /**
12
+ *
13
+ * This hook is used to create the provider factory object.
14
+ * WARNING: Consider any changes to also make to `src/editor.tsx`
15
+ *
16
+ * @param props
17
+ * @param editorActions
18
+ * @param createAnalyticsEvent
19
+ * @returns ProviderFactory for Editor
20
+ */
21
+ export default function useProviderFactory(props: EditorProps, editorActions: EditorActions, createAnalyticsEvent: CreateUIAnalyticsEvent): ProviderFactory;
@@ -0,0 +1,34 @@
1
+ import { jsx } from '@emotion/react';
2
+ import PropTypes from 'prop-types';
3
+ import React from 'react';
4
+ import { EditorProps } from '../types/editor-props';
5
+ import { Context } from './utils/editorPropTypes';
6
+ export default class EditorNext extends React.Component<EditorProps> {
7
+ /**
8
+ * WARNING: Code should be shared between Editor + EditorNext
9
+ * If you are making changes that affect both, consider making them
10
+ * in editor-next/editor-internal.tsx or editor-next/editor-utils.ts
11
+ */
12
+ static defaultProps: EditorProps;
13
+ static contextTypes: {
14
+ editorActions: PropTypes.Requireable<object>;
15
+ };
16
+ static propTypes: {
17
+ minHeight: ({ appearance, minHeight }: EditorProps) => Error | null;
18
+ };
19
+ private editorActions;
20
+ private createAnalyticsEvent?;
21
+ private editorSessionId;
22
+ private experienceStore?;
23
+ private startTime?;
24
+ constructor(props: EditorProps, context: Context);
25
+ private onEditorCreated;
26
+ private onEditorDestroyed;
27
+ private handleSave;
28
+ private handleAnalyticsEvent;
29
+ private registerEditorForActions;
30
+ private unregisterEditorFromActions;
31
+ private getExperienceStore;
32
+ render(): jsx.JSX.Element;
33
+ private getEditorPlugins;
34
+ }
@@ -0,0 +1,2 @@
1
+ import { EditorProps } from '../../types/editor-props';
2
+ export default function deprecationWarnings(props: EditorProps): void;
@@ -0,0 +1,5 @@
1
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import { ExperienceStore } from '@atlaskit/editor-common/ufo';
3
+ import { EditorProps } from '../../types/editor-props';
4
+ import { PerformanceTracking } from '../../types/performance-tracking';
5
+ export default function editorMeasureTTICallback(tti: number, ttiFromInvocation: number, canceled: boolean, performanceTracking: PerformanceTracking | undefined, featureFlags: EditorProps['featureFlags'], createAnalyticsEvent?: CreateUIAnalyticsEvent, experienceStore?: ExperienceStore): void;
@@ -0,0 +1,19 @@
1
+ import type { IntlShape } from 'react-intl-next';
2
+ import EditorActions from '../../actions';
3
+ import { EditorProps } from '../../types/editor-props';
4
+ export declare type Context = {
5
+ editorActions?: EditorActions;
6
+ intl: IntlShape;
7
+ };
8
+ /**
9
+ *
10
+ * Logic for Editor prop types (ie. `static propTypes = propTypes(message)`)
11
+ * for use with 'prop-types' library
12
+ *
13
+ * @param errorMessage
14
+ * @returns Editor prop-types
15
+ */
16
+ export declare function propTypes(errorMessage: string): {
17
+ minHeight: ({ appearance, minHeight }: EditorProps) => Error | null;
18
+ };
19
+ export declare const defaultProps: EditorProps;
@@ -0,0 +1,6 @@
1
+ import { EditorAppearance } from '@atlaskit/editor-common/types';
2
+ /**
3
+ * @param appearance
4
+ * @returns default font size if valid
5
+ */
6
+ export declare function getBaseFontSize(appearance?: EditorAppearance): number | undefined;
@@ -0,0 +1,14 @@
1
+ import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
2
+ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
+ import { QuickInsertProvider } from '../../plugins/quick-insert/types';
4
+ import { EditorProps } from '../../types/editor-props';
5
+ /**
6
+ *
7
+ * Utility to set all the providers on a provider factory
8
+ *
9
+ * @param providerFactory
10
+ * @param props
11
+ * @param extensionProvider
12
+ * @param quickInsertProvider
13
+ */
14
+ export default function handleProviders(providerFactory: ProviderFactory, props: EditorProps, extensionProvider?: ExtensionProvider, quickInsertProvider?: Promise<QuickInsertProvider>): void;
@@ -0,0 +1,12 @@
1
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import { ExperienceStore } from '@atlaskit/editor-common/ufo';
3
+ import { Transformer } from '@atlaskit/editor-common/types';
4
+ import { EditorView } from 'prosemirror-view';
5
+ import EditorActions from '../../actions';
6
+ import { EventDispatcher } from '../../event-dispatcher';
7
+ import { EditorProps } from '../../types/editor-props';
8
+ export default function onEditorCreated(instance: {
9
+ view: EditorView;
10
+ eventDispatcher: EventDispatcher;
11
+ transformer?: Transformer<string>;
12
+ }, props: EditorProps, setExperienceStore: (experienceStore: ExperienceStore) => void, getExperienceStore: () => ExperienceStore | undefined, getCreateAnalyticsEvent: () => CreateUIAnalyticsEvent | undefined, editorActions: EditorActions, startTime: number | undefined, registerEditorForActions: (editorView: EditorView, eventDispatcher: EventDispatcher, contentTransformer?: Transformer<string>) => void): void;
@@ -0,0 +1,15 @@
1
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import { ExperienceStore } from '@atlaskit/editor-common/ufo';
3
+ import { ACTION } from '@atlaskit/editor-common/analytics';
4
+ import { EditorProps } from '../../types/editor-props';
5
+ /**
6
+ *
7
+ * Util function to be used with the Editor component to send duration analytics
8
+ *
9
+ * @param action
10
+ * @param props
11
+ * @param getExperienceStore return the ExperienceStore of the Editor
12
+ * @param getCreateAnalyticsEvent return the CreateUIAnalyticsEvent of the Editor
13
+ * @returns
14
+ */
15
+ export default function sendDurationAnalytics(action: ACTION.EDITOR_MOUNTED | ACTION.ON_EDITOR_READY_CALLBACK, props: EditorProps, getExperienceStore: () => ExperienceStore | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined): (duration: number, startTime: number) => Promise<void>;
@@ -0,0 +1,29 @@
1
+ import EditorActions from '../../actions';
2
+ import { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
3
+ import { PerformanceTracking } from '../../types/performance-tracking';
4
+ /**
5
+ *
6
+ * Util function to be used with the Editor to track the EditorActions prop
7
+ *
8
+ * @param editorActions
9
+ * @param performanceTracking
10
+ * @param handleAnalyticsEvent
11
+ * @returns
12
+ */
13
+ export default function trackEditorActions(editorActions: EditorActions & {
14
+ _contentRetrievalTracking?: {
15
+ getValueTracked: boolean;
16
+ samplingCounters: {
17
+ success: number;
18
+ failure: number;
19
+ };
20
+ };
21
+ }, performanceTracking: PerformanceTracking | undefined, handleAnalyticsEvent: FireAnalyticsCallback): EditorActions<any> & {
22
+ _contentRetrievalTracking?: {
23
+ getValueTracked: boolean;
24
+ samplingCounters: {
25
+ success: number;
26
+ failure: number;
27
+ };
28
+ } | undefined;
29
+ };
@@ -1,33 +1,31 @@
1
1
  /** @jsx jsx */
2
- import React from 'react';
3
2
  import { jsx } from '@emotion/react';
4
3
  import PropTypes from 'prop-types';
5
4
  import { EditorView } from 'prosemirror-view';
6
- import type { IntlShape } from 'react-intl-next';
5
+ import React from 'react';
7
6
  import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
8
7
  import { Transformer } from '@atlaskit/editor-common/types';
9
8
  import EditorActions from './actions';
10
- import { EditorProps, ExtensionProvidersProp } from './types/editor-props';
9
+ import { Context } from './editor-next/utils/editorPropTypes';
11
10
  import { EventDispatcher } from './event-dispatcher';
12
- import { FireAnalyticsCallback } from './plugins/analytics';
13
- import { QuickInsertProvider, QuickInsertOptions } from './plugins/quick-insert/types';
14
- export type { AllowedBlockTypes, Command, CommandDispatch, DomAtPos, EditorAppearance, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorPlugin, EditorProps, ExtensionProvidersProp, ExtensionConfig, FeedbackInfo, MarkConfig, MessageDescriptor, NodeConfig, NodeViewConfig, PMPlugin, PMPluginCreateConfig, PMPluginFactory, PMPluginFactoryParams, PluginsOptions, ReactComponents, ToolbarUIComponentFactory, ToolbarUiComponentFactoryParams, UIComponentFactory, UiComponentFactoryParams, } from './types';
15
- declare type Context = {
16
- editorActions?: EditorActions;
17
- intl: IntlShape;
18
- };
19
- declare type State = {
20
- extensionProvider?: ExtensionProvider;
21
- quickInsertProvider?: Promise<QuickInsertProvider>;
22
- };
23
- export default class Editor extends React.Component<EditorProps, State> {
11
+ import { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
12
+ import { QuickInsertOptions, QuickInsertProvider } from './plugins/quick-insert/types';
13
+ import { EditorProps } from './types/editor-props';
14
+ import { ProviderFactoryState } from './editor-next/hooks/useProviderFactory';
15
+ export type { AllowedBlockTypes, Command, CommandDispatch, DomAtPos, EditorAppearance, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorPlugin, EditorProps, ExtensionConfig, ExtensionProvidersProp, FeedbackInfo, MarkConfig, MessageDescriptor, NodeConfig, NodeViewConfig, PluginsOptions, PMPlugin, PMPluginCreateConfig, PMPluginFactory, PMPluginFactoryParams, ReactComponents, ToolbarUIComponentFactory, ToolbarUiComponentFactoryParams, UIComponentFactory, UiComponentFactoryParams, } from './types';
16
+ export default class Editor extends React.Component<EditorProps, ProviderFactoryState> {
17
+ /**
18
+ * WARNING: Code should be shared between Editor + EditorNext
19
+ * If you are making changes that affect both, consider making them
20
+ * in editor-next/editor-internal.tsx or editor-next/editor-utils.ts
21
+ */
24
22
  static defaultProps: EditorProps;
25
- static propTypes: {
26
- minHeight: ({ appearance, minHeight }: EditorProps) => Error | null;
27
- };
28
23
  static contextTypes: {
29
24
  editorActions: PropTypes.Requireable<object>;
30
25
  };
26
+ static propTypes: {
27
+ minHeight: ({ appearance, minHeight }: EditorProps) => Error | null;
28
+ };
31
29
  private providerFactory;
32
30
  private editorActions;
33
31
  private createAnalyticsEvent?;
@@ -35,8 +33,22 @@ export default class Editor extends React.Component<EditorProps, State> {
35
33
  private experienceStore?;
36
34
  private startTime?;
37
35
  constructor(props: EditorProps, context: Context);
36
+ /**
37
+ * Consider any changes here to corresponding file for `EditorNext` in
38
+ * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts) and
39
+ * `useMeasureEditorMountTime` (editor-next/hooks/useMeasureEditorMountTime.ts)
40
+ */
38
41
  componentDidMount(): void;
42
+ /**
43
+ * Consider any changes here to corresponding file for `EditorNext` in
44
+ * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts)
45
+ */
39
46
  componentDidUpdate(prevProps: EditorProps): void;
47
+ /**
48
+ * Consider any changes here to corresponding file for `EditorNext` in
49
+ * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts) and
50
+ * `useMeasureEditorMountTime` (editor-next/hooks/useMeasureEditorMountTime.ts)
51
+ */
40
52
  componentWillUnmount(): void;
41
53
  /**
42
54
  * @private
@@ -67,7 +79,7 @@ export default class Editor extends React.Component<EditorProps, State> {
67
79
  * Please reach out to the Editor team if you were previously using this
68
80
  * and need to find a workaround.
69
81
  */
70
- prepareExtensionProvider: import("memoize-one").MemoizedFn<(extensionProviders?: ExtensionProvidersProp | undefined) => ExtensionProvider<any> | undefined>;
82
+ prepareExtensionProvider: (extensionProviders?: import("./types").ExtensionProvidersProp | undefined) => ExtensionProvider<any> | undefined;
71
83
  /**
72
84
  * @private
73
85
  * @deprecated - Do not override this at all, this is an antipattern.
@@ -86,8 +98,6 @@ export default class Editor extends React.Component<EditorProps, State> {
86
98
  eventDispatcher: EventDispatcher;
87
99
  transformer?: Transformer<string>;
88
100
  }): void;
89
- private sendDurationAnalytics;
90
- private deprecationWarnings;
91
101
  /**
92
102
  * @private
93
103
  * @deprecated - Do not override this at all, this is an antipattern.
@@ -98,10 +108,6 @@ export default class Editor extends React.Component<EditorProps, State> {
98
108
  view: EditorView;
99
109
  transformer?: Transformer<string>;
100
110
  }): void;
101
- private registerEditorForActions;
102
- private unregisterEditorFromActions;
103
- private handleProviders;
104
- private getBaseFontSize;
105
111
  /**
106
112
  * @private
107
113
  * @deprecated - Do not override this at all, this is an antipattern.
@@ -116,5 +122,21 @@ export default class Editor extends React.Component<EditorProps, State> {
116
122
  * and need to find a workaround.
117
123
  */
118
124
  handleAnalyticsEvent: FireAnalyticsCallback;
125
+ /**
126
+ * @private
127
+ * @deprecated - Do not override this at all, this is an antipattern.
128
+ * Please reach out to the Editor team if you were previously using this
129
+ * and need to find a workaround.
130
+ */
131
+ registerEditorForActions(editorView: EditorView, eventDispatcher: EventDispatcher, contentTransformer?: Transformer<string>): void;
132
+ /**
133
+ * @private
134
+ * @deprecated - Do not override this at all, this is an antipattern.
135
+ * Please reach out to the Editor team if you were previously using this
136
+ * and need to find a workaround.
137
+ */
138
+ unregisterEditorFromActions(): void;
139
+ private getExperienceStore;
119
140
  render(): jsx.JSX.Element;
141
+ private getEditorPlugins;
120
142
  }
@@ -90,3 +90,4 @@ export { DEFAULT_BORDER_COLOR } from './ui/ColorPalette/Palettes/common';
90
90
  export { default as messages, statusMessages, dateMessages } from './messages';
91
91
  export { createTypeAheadTools } from './plugins/type-ahead/api';
92
92
  export { createQuickInsertTools } from './plugins/quick-insert/api';
93
+ export { default as EditorMigrationComponent } from './editor-next/editor-migration-component';
@@ -5,4 +5,4 @@ import { EditorSharedConfig } from '../../../internal/context/shared-config';
5
5
  * and passes them through to `fireAnalyticsEvent`.
6
6
  */
7
7
  export declare function useAnalyticsHandler(editorSharedConfig: EditorSharedConfig | null): void;
8
- export declare function useCreateAnalyticsHandler(createAnalyticsEvent?: CreateUIAnalyticsEvent): import("../../../../../plugins/analytics").FireAnalyticsCallback;
8
+ export declare function useCreateAnalyticsHandler(createAnalyticsEvent?: CreateUIAnalyticsEvent): import("@atlaskit/editor-common/analytics").FireAnalyticsCallback;
@@ -0,0 +1,16 @@
1
+ import type { EditorPlugin } from '@atlaskit/editor-common/types';
2
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
+ import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
5
+ /**
6
+ * DO NOT USE THIS FUNCTION
7
+ *
8
+ * IT IS A TEMPORARY PLACEHOLDER UNTIL THOSE TICKETS XX-11111 XX-22222 are done
9
+ **/
10
+ export declare const createStubInternalApis: () => {
11
+ editorSelectionAPI: EditorSelectionAPI;
12
+ insertNodeAPI: import("../../../insert-api/types").InsertNodeAPI;
13
+ editorAnalyticsAPI: EditorAnalyticsAPI;
14
+ createAnalyticsEvent: CreateUIAnalyticsEvent;
15
+ stubInternalApisPlugin: () => EditorPlugin;
16
+ };
@@ -1,4 +1,4 @@
1
- import type { AllBuilderPlugins, AllNextEditorPlugins, SafePresetCheck } from '@atlaskit/editor-common/types';
1
+ import type { AllBuilderPlugins, NextEditorPlugin, SafePresetCheck } from '@atlaskit/editor-common/types';
2
2
  import { Builder } from '@atlaskit/editor-common/utils';
3
3
  export declare class Preset<T extends {
4
4
  name: string;
@@ -7,7 +7,7 @@ export declare class Preset<T extends {
7
7
  constructor(...more: [...StackPlugins]);
8
8
  add<NewPlugin extends AllBuilderPlugins>(nextOrTuple: SafePresetCheck<NewPlugin, StackPlugins>): Preset<T, [...[NewPlugin], ...StackPlugins]>;
9
9
  has(plugin: AllBuilderPlugins): boolean;
10
- getEditorPlugins(excludes?: Set<string>): AllNextEditorPlugins[];
10
+ getEditorPlugins(excludes?: Set<string>): NextEditorPlugin<any, any>[];
11
11
  private processEditorPlugins;
12
12
  private removeExcludedPlugins;
13
13
  }
@@ -16,10 +16,10 @@ export declare type PluginsPreset = Array<PluginConfig<any, any>>;
16
16
  * Type for Editor Preset's plugin configuration.
17
17
  *
18
18
  * Possible configurations:
19
- * – () => EditorPlugin
20
- * – (options: any) => EditorPlugin
21
- * – (options?: any) => EditorPlugin
22
- * (In the future, a preset may contain NextEditorPluginWithDependencies)
19
+ * – () => () => EditorPlugin
20
+ * – () => (options: any) => EditorPlugin
21
+ * – () => (options?: any) => EditorPlugin
22
+ * (In the future, a preset may contain externalPlugins)
23
23
  * – (props.externalPlugins) => (options?: any) => EditorPlugin
24
24
  *
25
25
  * Usage:
@@ -26,5 +26,5 @@ declare type UniversalPresetProps = EditorPresetProps & DefaultPresetPluginOptio
26
26
  * @param getEditorContainerWidth
27
27
  * @returns a full featured preset configured according to the provided props - basis for create-plugins-list
28
28
  */
29
- export default function createUniversalPreset(appearance: EditorAppearance | undefined, props: UniversalPresetProps, featureFlags: FeatureFlags, prevAppearance?: EditorAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent, insertNodeAPI?: InsertNodeAPI, editorAnalyticsAPI?: EditorAnalyticsAPI, editorSelectionAPI?: EditorSelectionAPI, getEditorContainerWidth?: GetEditorContainerWidth): Preset<EditorPlugin, []>;
29
+ export default function createUniversalPreset(appearance: EditorAppearance | undefined, props: UniversalPresetProps, featureFlags: FeatureFlags, prevAppearance?: EditorAppearance, maybeCreateAnalyticsEvent?: CreateUIAnalyticsEvent, _insertNodeAPI?: InsertNodeAPI, _editorAnalyticsAPI?: EditorAnalyticsAPI, _editorSelectionAPI?: EditorSelectionAPI, _getEditorContainerWidth?: GetEditorContainerWidth): Preset<EditorPlugin, []>;
30
30
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
2
  import { AlignmentPluginState } from './pm-plugins/types';
3
3
  export declare const defaultConfig: AlignmentPluginState;
4
- declare const alignmentPlugin: NextEditorPlugin<'alignment', never>;
4
+ declare const alignmentPlugin: NextEditorPlugin<'alignment'>;
5
5
  export default alignmentPlugin;
@@ -5,6 +5,7 @@ import { WrappedComponentProps } from 'react-intl-next';
5
5
  import { AlignmentPluginState, AlignmentState } from '../../pm-plugins/types';
6
6
  export interface State {
7
7
  isOpen: boolean;
8
+ isOpenedByKeyboard: boolean;
8
9
  }
9
10
  export interface Props {
10
11
  pluginState: AlignmentPluginState;
@@ -20,9 +21,10 @@ export declare class AlignmentToolbar extends React.Component<Props & WrappedCom
20
21
  private toolbarItemRef;
21
22
  state: State;
22
23
  render(): jsx.JSX.Element;
24
+ componentDidUpdate(prevProps: Props): void;
23
25
  private changeAlignment;
24
26
  private toggleOpen;
25
- private handleOpenChange;
27
+ private toggleOpenByKeyboard;
26
28
  private hide;
27
29
  private hideOnEscape;
28
30
  }
@@ -1,11 +1,8 @@
1
1
  import analyticsPlugin from './plugin';
2
- export { ACTION_SUBJECT_ID, ACTION_SUBJECT, ACTION, BROWSER_FREEZE_INTERACTION_TYPE, EVENT_TYPE, FULL_WIDTH_MODE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, MODE, PasteContents, PasteSources, PasteTypes, PLATFORMS, PUNC, SYMBOL, TABLE_ACTION, TABLE_BREAKOUT, TRIGGER_METHOD, USER_CONTEXT, DELETE_DIRECTION, LIST_TEXT_SCENARIOS, } from '@atlaskit/editor-common/analytics';
3
- export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, CommonListAnalyticsAttributes, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, ErrorEventPayload, ErrorEventAttributes, FormatEventPayload, GeneralEventPayload, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, SubstituteEventPayload, TableEventPayload, } from '@atlaskit/editor-common/analytics';
4
- export { withAnalytics, addAnalytics, findInsertLocation, getAnalyticsEventsFromTransaction, getSelectionType, getStateContext, mapActionSubjectIdToAttributes, } from './utils';
2
+ export { ACTION_SUBJECT_ID, ACTION_SUBJECT, ACTION, BROWSER_FREEZE_INTERACTION_TYPE, EVENT_TYPE, FULL_WIDTH_MODE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, MODE, PasteContents, PasteSources, PasteTypes, PLATFORMS, PUNC, SYMBOL, TABLE_ACTION, TABLE_BREAKOUT, TRIGGER_METHOD, USER_CONTEXT, DELETE_DIRECTION, LIST_TEXT_SCENARIOS, fireAnalyticsEvent, getAnalyticsEventsFromTransaction, } from '@atlaskit/editor-common/analytics';
3
+ export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, CommonListAnalyticsAttributes, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, ErrorEventPayload, ErrorEventAttributes, FormatEventPayload, GeneralEventPayload, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, SubstituteEventPayload, TableEventPayload, FireAnalyticsCallback, FireAnalyticsEvent, } from '@atlaskit/editor-common/analytics';
4
+ export { withAnalytics, addAnalytics, findInsertLocation, getSelectionType, getStateContext, mapActionSubjectIdToAttributes, } from './utils';
5
5
  export declare const analyticsPluginKey: import("prosemirror-state").PluginKey<any, any>;
6
6
  export default analyticsPlugin;
7
- export { fireAnalyticsEvent } from './fire-analytics-event';
8
- export type { FireAnalyticsEvent } from './fire-analytics-event';
9
- export type { FireAnalyticsCallback } from './fire-analytics-event';
10
7
  export type { HigherOrderCommand } from '../../types/command';
11
8
  export type { DispatchAnalyticsEvent } from './types/dispatch-analytics-event';
@@ -6,7 +6,9 @@ interface AnalyticsPluginOptions {
6
6
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
7
7
  performanceTracking?: PerformanceTracking;
8
8
  }
9
- declare const analyticsPlugin: NextEditorPlugin<'analytics', never, AnalyticsPluginOptions>;
9
+ declare const analyticsPlugin: NextEditorPlugin<'analytics', {
10
+ pluginConfiguration: AnalyticsPluginOptions;
11
+ }>;
10
12
  export declare function extendPayload({ payload, duration, distortedDuration, }: {
11
13
  payload: AnalyticsEventPayload;
12
14
  duration: number;