@atlaskit/editor-core 183.1.6 → 184.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/labs/next/full-page.js +2 -6
  3. package/dist/cjs/labs/next/presets/create-stub-internal-apis.js +4 -2
  4. package/dist/cjs/labs/next/presets/default.js +2 -2
  5. package/dist/cjs/labs/next/presets/universal.js +2 -1
  6. package/dist/cjs/plugins/breakout/index.js +54 -35
  7. package/dist/cjs/plugins/card/toolbar.js +4 -3
  8. package/dist/cjs/plugins/collab-edit/plugin-state.js +2 -3
  9. package/dist/cjs/plugins/copy-button/commands.js +8 -1
  10. package/dist/cjs/plugins/extension/index.js +1 -1
  11. package/dist/cjs/plugins/extension/nodeviews/extension.js +5 -3
  12. package/dist/cjs/plugins/extension/pm-plugins/main.js +6 -6
  13. package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +34 -4
  14. package/dist/cjs/plugins/extension/ui/Extension/ExtensionComponent.js +4 -2
  15. package/dist/cjs/plugins/extension/ui/Extension/index.js +4 -2
  16. package/dist/cjs/plugins/help-dialog/index.js +12 -8
  17. package/dist/cjs/plugins/index.js +0 -14
  18. package/dist/cjs/plugins/layout/pm-plugins/main.js +0 -1
  19. package/dist/cjs/plugins/media/index.js +15 -5
  20. package/dist/cjs/plugins/media/nodeviews/mediaNodeView/index.js +22 -14
  21. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +53 -34
  22. package/dist/cjs/plugins/media/styles.js +1 -1
  23. package/dist/cjs/plugins/media/toolbar/index.js +4 -3
  24. package/dist/cjs/plugins/paste/pm-plugins/main.js +7 -1
  25. package/dist/cjs/test-utils.js +6 -1
  26. package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -2
  27. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -2
  28. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +1 -2
  29. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -2
  30. package/dist/cjs/ui/ContentStyles/index.js +9 -10
  31. package/dist/cjs/ui/ContextPanel/index.js +67 -56
  32. package/dist/cjs/ui/MediaAndEmbedsToolbar/index.js +10 -11
  33. package/dist/cjs/ui/Resizer/index.js +8 -8
  34. package/dist/cjs/ui/WidthEmitter/index.js +10 -4
  35. package/dist/cjs/utils/clipboard.js +18 -11
  36. package/dist/cjs/utils/performance/instrumented-plugin.js +14 -2
  37. package/dist/cjs/version-wrapper.js +1 -1
  38. package/dist/cjs/version.json +1 -1
  39. package/dist/es2019/labs/next/full-page.js +2 -5
  40. package/dist/es2019/labs/next/presets/create-stub-internal-apis.js +4 -2
  41. package/dist/es2019/labs/next/presets/default.js +1 -1
  42. package/dist/es2019/labs/next/presets/universal.js +2 -1
  43. package/dist/es2019/plugins/breakout/index.js +48 -31
  44. package/dist/es2019/plugins/card/toolbar.js +4 -3
  45. package/dist/es2019/plugins/collab-edit/plugin-state.js +2 -4
  46. package/dist/es2019/plugins/copy-button/commands.js +9 -2
  47. package/dist/es2019/plugins/extension/index.js +1 -1
  48. package/dist/es2019/plugins/extension/nodeviews/extension.js +5 -3
  49. package/dist/es2019/plugins/extension/pm-plugins/main.js +4 -4
  50. package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +38 -2
  51. package/dist/es2019/plugins/extension/ui/Extension/ExtensionComponent.js +4 -2
  52. package/dist/es2019/plugins/extension/ui/Extension/index.js +4 -2
  53. package/dist/es2019/plugins/help-dialog/index.js +14 -9
  54. package/dist/es2019/plugins/index.js +0 -2
  55. package/dist/es2019/plugins/layout/pm-plugins/main.js +0 -1
  56. package/dist/es2019/plugins/media/index.js +15 -5
  57. package/dist/es2019/plugins/media/nodeviews/mediaNodeView/index.js +21 -10
  58. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +53 -33
  59. package/dist/es2019/plugins/media/styles.js +1 -7
  60. package/dist/es2019/plugins/media/toolbar/index.js +4 -4
  61. package/dist/es2019/plugins/paste/pm-plugins/main.js +7 -1
  62. package/dist/es2019/test-utils.js +6 -1
  63. package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
  64. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -1
  65. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
  66. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
  67. package/dist/es2019/ui/ContentStyles/index.js +1 -2
  68. package/dist/es2019/ui/ContextPanel/index.js +66 -43
  69. package/dist/es2019/ui/MediaAndEmbedsToolbar/index.js +8 -9
  70. package/dist/es2019/ui/Resizer/index.js +1 -1
  71. package/dist/es2019/ui/WidthEmitter/index.js +10 -4
  72. package/dist/es2019/utils/clipboard.js +12 -7
  73. package/dist/es2019/utils/performance/instrumented-plugin.js +15 -2
  74. package/dist/es2019/version-wrapper.js +1 -1
  75. package/dist/es2019/version.json +1 -1
  76. package/dist/esm/labs/next/full-page.js +2 -5
  77. package/dist/esm/labs/next/presets/create-stub-internal-apis.js +4 -2
  78. package/dist/esm/labs/next/presets/default.js +1 -1
  79. package/dist/esm/labs/next/presets/universal.js +2 -1
  80. package/dist/esm/plugins/breakout/index.js +54 -35
  81. package/dist/esm/plugins/card/toolbar.js +4 -3
  82. package/dist/esm/plugins/collab-edit/plugin-state.js +2 -3
  83. package/dist/esm/plugins/copy-button/commands.js +9 -2
  84. package/dist/esm/plugins/extension/index.js +1 -1
  85. package/dist/esm/plugins/extension/nodeviews/extension.js +5 -3
  86. package/dist/esm/plugins/extension/pm-plugins/main.js +6 -6
  87. package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +33 -2
  88. package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +4 -2
  89. package/dist/esm/plugins/extension/ui/Extension/index.js +4 -2
  90. package/dist/esm/plugins/help-dialog/index.js +12 -8
  91. package/dist/esm/plugins/index.js +0 -2
  92. package/dist/esm/plugins/layout/pm-plugins/main.js +0 -1
  93. package/dist/esm/plugins/media/index.js +15 -5
  94. package/dist/esm/plugins/media/nodeviews/mediaNodeView/index.js +22 -14
  95. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +54 -35
  96. package/dist/esm/plugins/media/styles.js +2 -2
  97. package/dist/esm/plugins/media/toolbar/index.js +4 -3
  98. package/dist/esm/plugins/paste/pm-plugins/main.js +7 -1
  99. package/dist/esm/test-utils.js +6 -1
  100. package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
  101. package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -1
  102. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
  103. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
  104. package/dist/esm/ui/ContentStyles/index.js +1 -2
  105. package/dist/esm/ui/ContextPanel/index.js +64 -53
  106. package/dist/esm/ui/MediaAndEmbedsToolbar/index.js +10 -11
  107. package/dist/esm/ui/Resizer/index.js +1 -1
  108. package/dist/esm/ui/WidthEmitter/index.js +10 -4
  109. package/dist/esm/utils/clipboard.js +16 -10
  110. package/dist/esm/utils/performance/instrumented-plugin.js +14 -2
  111. package/dist/esm/version-wrapper.js +1 -1
  112. package/dist/esm/version.json +1 -1
  113. package/dist/types/actions/index.d.ts +1 -1
  114. package/dist/types/create-editor/get-plugins.d.ts +2 -0
  115. package/dist/types/index.d.ts +0 -1
  116. package/dist/types/plugins/breakout/index.d.ts +4 -0
  117. package/dist/types/plugins/breakout/ui/LayoutButton.d.ts +1 -1
  118. package/dist/types/plugins/card/index.d.ts +2 -2
  119. package/dist/types/plugins/collab-edit/actions.d.ts +3 -2
  120. package/dist/types/plugins/collab-edit/events/handlers.d.ts +3 -3
  121. package/dist/types/plugins/collab-edit/events/initialize.d.ts +1 -1
  122. package/dist/types/plugins/collab-edit/events/send-transaction.d.ts +1 -1
  123. package/dist/types/plugins/collab-edit/index.d.ts +0 -1
  124. package/dist/types/plugins/collab-edit/native-collab-provider-plugin.d.ts +2 -2
  125. package/dist/types/plugins/collab-edit/participants.d.ts +1 -1
  126. package/dist/types/plugins/collab-edit/plugin.d.ts +0 -2
  127. package/dist/types/plugins/collab-edit/types.d.ts +1 -3
  128. package/dist/types/plugins/collab-edit/ui/to-avatar.d.ts +1 -1
  129. package/dist/types/plugins/collab-edit/utils.d.ts +2 -1
  130. package/dist/types/plugins/extension/index.d.ts +2 -1
  131. package/dist/types/plugins/extension/nodeviews/extension.d.ts +4 -1
  132. package/dist/types/plugins/extension/pm-plugins/main.d.ts +3 -1
  133. package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
  134. package/dist/types/plugins/extension/ui/Extension/ExtensionComponent.d.ts +3 -0
  135. package/dist/types/plugins/extension/ui/Extension/index.d.ts +3 -0
  136. package/dist/types/plugins/help-dialog/index.d.ts +3 -1
  137. package/dist/types/plugins/index.d.ts +0 -3
  138. package/dist/types/plugins/media/index.d.ts +12 -2
  139. package/dist/types/plugins/media/nodeviews/mediaNodeView/index.d.ts +4 -2
  140. package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
  141. package/dist/types/plugins/media/nodeviews/types.d.ts +2 -1
  142. package/dist/types/plugins/media/toolbar/index.d.ts +3 -1
  143. package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +2 -2
  144. package/dist/types/test-utils.d.ts +3 -1
  145. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  146. package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
  147. package/dist/types/ui/ContextPanel/index.d.ts +3 -4
  148. package/dist/types/ui/MediaAndEmbedsToolbar/index.d.ts +3 -1
  149. package/dist/types/ui/PluginSlot/index.d.ts +1 -1
  150. package/dist/types/ui/Resizer/types.d.ts +2 -2
  151. package/dist/types/utils/clipboard.d.ts +1 -0
  152. package/dist/types-ts4.5/actions/index.d.ts +1 -1
  153. package/dist/types-ts4.5/create-editor/get-plugins.d.ts +2 -0
  154. package/dist/types-ts4.5/index.d.ts +0 -1
  155. package/dist/types-ts4.5/plugins/breakout/index.d.ts +6 -0
  156. package/dist/types-ts4.5/plugins/breakout/ui/LayoutButton.d.ts +1 -1
  157. package/dist/types-ts4.5/plugins/card/index.d.ts +2 -2
  158. package/dist/types-ts4.5/plugins/collab-edit/actions.d.ts +3 -2
  159. package/dist/types-ts4.5/plugins/collab-edit/events/handlers.d.ts +3 -3
  160. package/dist/types-ts4.5/plugins/collab-edit/events/initialize.d.ts +1 -1
  161. package/dist/types-ts4.5/plugins/collab-edit/events/send-transaction.d.ts +1 -1
  162. package/dist/types-ts4.5/plugins/collab-edit/index.d.ts +0 -1
  163. package/dist/types-ts4.5/plugins/collab-edit/native-collab-provider-plugin.d.ts +2 -2
  164. package/dist/types-ts4.5/plugins/collab-edit/participants.d.ts +1 -1
  165. package/dist/types-ts4.5/plugins/collab-edit/plugin.d.ts +0 -2
  166. package/dist/types-ts4.5/plugins/collab-edit/types.d.ts +1 -3
  167. package/dist/types-ts4.5/plugins/collab-edit/ui/to-avatar.d.ts +1 -1
  168. package/dist/types-ts4.5/plugins/collab-edit/utils.d.ts +2 -1
  169. package/dist/types-ts4.5/plugins/extension/index.d.ts +3 -1
  170. package/dist/types-ts4.5/plugins/extension/nodeviews/extension.d.ts +4 -1
  171. package/dist/types-ts4.5/plugins/extension/pm-plugins/main.d.ts +3 -1
  172. package/dist/types-ts4.5/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
  173. package/dist/types-ts4.5/plugins/extension/ui/Extension/ExtensionComponent.d.ts +3 -0
  174. package/dist/types-ts4.5/plugins/extension/ui/Extension/index.d.ts +3 -0
  175. package/dist/types-ts4.5/plugins/help-dialog/index.d.ts +5 -1
  176. package/dist/types-ts4.5/plugins/index.d.ts +0 -3
  177. package/dist/types-ts4.5/plugins/media/index.d.ts +9 -2
  178. package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeView/index.d.ts +4 -2
  179. package/dist/types-ts4.5/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
  180. package/dist/types-ts4.5/plugins/media/nodeviews/types.d.ts +2 -1
  181. package/dist/types-ts4.5/plugins/media/toolbar/index.d.ts +3 -1
  182. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +2 -2
  183. package/dist/types-ts4.5/test-utils.d.ts +3 -1
  184. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  185. package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +1 -1
  186. package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +3 -4
  187. package/dist/types-ts4.5/ui/MediaAndEmbedsToolbar/index.d.ts +3 -1
  188. package/dist/types-ts4.5/ui/PluginSlot/index.d.ts +1 -1
  189. package/dist/types-ts4.5/ui/Resizer/types.d.ts +2 -2
  190. package/dist/types-ts4.5/utils/clipboard.d.ts +1 -0
  191. package/package.json +18 -16
  192. package/report.api.md +15 -63
  193. package/dist/cjs/plugins/collab-edit/provider/index.js +0 -5
  194. package/dist/cjs/plugins/collab-edit/provider/types.js +0 -5
  195. package/dist/cjs/plugins/grid/index.js +0 -207
  196. package/dist/cjs/plugins/grid/styles.js +0 -16
  197. package/dist/cjs/plugins/grid/types.js +0 -5
  198. package/dist/cjs/plugins/width/index.js +0 -88
  199. package/dist/cjs/ui/ContextPanel/context.js +0 -89
  200. package/dist/es2019/plugins/collab-edit/provider/index.js +0 -1
  201. package/dist/es2019/plugins/collab-edit/provider/types.js +0 -1
  202. package/dist/es2019/plugins/grid/index.js +0 -168
  203. package/dist/es2019/plugins/grid/styles.js +0 -36
  204. package/dist/es2019/plugins/grid/types.js +0 -1
  205. package/dist/es2019/plugins/width/index.js +0 -72
  206. package/dist/es2019/ui/ContextPanel/context.js +0 -65
  207. package/dist/esm/plugins/collab-edit/provider/index.js +0 -1
  208. package/dist/esm/plugins/collab-edit/provider/types.js +0 -1
  209. package/dist/esm/plugins/grid/index.js +0 -191
  210. package/dist/esm/plugins/grid/styles.js +0 -7
  211. package/dist/esm/plugins/grid/types.js +0 -1
  212. package/dist/esm/plugins/width/index.js +0 -78
  213. package/dist/esm/ui/ContextPanel/context.js +0 -79
  214. package/dist/types/plugins/collab-edit/provider/index.d.ts +0 -1
  215. package/dist/types/plugins/collab-edit/provider/types.d.ts +0 -1
  216. package/dist/types/plugins/grid/index.d.ts +0 -25
  217. package/dist/types/plugins/grid/styles.d.ts +0 -2
  218. package/dist/types/plugins/grid/types.d.ts +0 -7
  219. package/dist/types/plugins/width/index.d.ts +0 -18
  220. package/dist/types/ui/ContextPanel/context.d.ts +0 -24
  221. package/dist/types-ts4.5/plugins/collab-edit/provider/index.d.ts +0 -1
  222. package/dist/types-ts4.5/plugins/collab-edit/provider/types.d.ts +0 -1
  223. package/dist/types-ts4.5/plugins/grid/index.d.ts +0 -27
  224. package/dist/types-ts4.5/plugins/grid/styles.d.ts +0 -2
  225. package/dist/types-ts4.5/plugins/grid/types.d.ts +0 -7
  226. package/dist/types-ts4.5/plugins/width/index.d.ts +0 -18
  227. package/dist/types-ts4.5/ui/ContextPanel/context.d.ts +0 -24
@@ -1,8 +1,14 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import React, { useEffect, useContext, useState } from 'react';
3
- import { pluginKey as widthPluginKey } from '../../plugins/width';
4
- import { WidthContext } from '@atlaskit/editor-common/ui';
5
- import { ContextPanel } from '../ContextPanel/context';
2
+ import React, { useContext, useEffect, useState } from 'react';
3
+ import { ContextPanel, WidthContext } from '@atlaskit/editor-common/ui';
4
+ // TODO: ED-17870 This workaround will be removed here.
5
+ // @ts-ignore
6
+ var widthPluginKey = {
7
+ key: 'widthPlugin$',
8
+ getState: function getState(state) {
9
+ return state['widthPlugin$'];
10
+ }
11
+ };
6
12
  // Why do we need this? Why not just use the width from the context directly rather than this?
7
13
  // Well my friend - some of the VR tests break, seemingly due to the fact that existing behaviour
8
14
  // assumes the initial value is 0, the width from context may not start from 0 however.
@@ -75,7 +75,7 @@ export var copyToClipboard = /*#__PURE__*/function () {
75
75
  }();
76
76
  export var copyHTMLToClipboard = /*#__PURE__*/function () {
77
77
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(elementToCopy, plainTextToCopy) {
78
- var data, Clipboard, dt;
78
+ var data;
79
79
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
80
80
  while (1) switch (_context2.prev = _context2.next) {
81
81
  case 0:
@@ -102,17 +102,13 @@ export var copyHTMLToClipboard = /*#__PURE__*/function () {
102
102
  _context2.t0 = _context2["catch"](1);
103
103
  throw new Error('Clipboard api is not supported');
104
104
  case 10:
105
- _context2.next = 17;
105
+ _context2.next = 13;
106
106
  break;
107
107
  case 12:
108
- // At the time of development, Firefox doesn't support ClipboardItem API
108
+ // ED-17083 extension copy seems have issue with ClipboardItem API
109
109
  // Hence of use of this polyfill
110
- Clipboard = clipboard;
111
- dt = new Clipboard.DT();
112
- dt.setData('text/plain', plainTextToCopy || elementToCopy.innerText);
113
- dt.setData('text/html', elementToCopy.innerHTML);
114
- Clipboard.write(dt);
115
- case 17:
110
+ copyHTMLToClipboardPolyfill(elementToCopy, plainTextToCopy);
111
+ case 13:
116
112
  case "end":
117
113
  return _context2.stop();
118
114
  }
@@ -121,4 +117,14 @@ export var copyHTMLToClipboard = /*#__PURE__*/function () {
121
117
  return function copyHTMLToClipboard(_x2, _x3) {
122
118
  return _ref3.apply(this, arguments);
123
119
  };
124
- }();
120
+ }();
121
+
122
+ // At the time of development, Firefox doesn't support ClipboardItem API
123
+ // Hence of use of this polyfill
124
+ export var copyHTMLToClipboardPolyfill = function copyHTMLToClipboardPolyfill(elementToCopy, plainTextToCopy) {
125
+ var Clipboard = clipboard;
126
+ var dt = new Clipboard.DT();
127
+ dt.setData('text/plain', plainTextToCopy || elementToCopy.innerText);
128
+ dt.setData('text/html', elementToCopy.innerHTML);
129
+ Clipboard.write(dt);
130
+ };
@@ -54,18 +54,30 @@ export var InstrumentedPlugin = /*#__PURE__*/function (_SafePlugin) {
54
54
  return result;
55
55
  };
56
56
  }
57
+ var _uiTracking$samplingR = uiTracking.samplingRate,
58
+ uiTrackingSamplingRate = _uiTracking$samplingR === void 0 ? 100 : _uiTracking$samplingR;
57
59
  if (uiTracking.enabled && spec.view) {
58
60
  var originalView = spec.view.bind(spec);
59
61
  spec.view = function (editorView) {
60
62
  var self = _assertThisInitialized(_this);
61
63
  var measure = "\uD83E\uDD89".concat(self.key, "::view::update");
62
64
  var view = originalView(editorView);
65
+ var uiTrackingSamplingCounter = 0;
63
66
  if (view.update) {
64
67
  var originalUpdate = view.update;
65
68
  view.update = function (view, state) {
66
- startMeasure(measure);
69
+ var shouldTrack = uiTrackingSamplingRate && uiTrackingSamplingCounter === 0;
70
+ if (shouldTrack) {
71
+ startMeasure(measure);
72
+ }
67
73
  originalUpdate(view, state);
68
- stopMeasure(measure, function () {});
74
+ if (shouldTrack) {
75
+ stopMeasure(measure, function () {});
76
+ }
77
+ uiTrackingSamplingCounter++;
78
+ if (uiTrackingSamplingRate && uiTrackingSamplingCounter >= uiTrackingSamplingRate) {
79
+ uiTrackingSamplingCounter = 0;
80
+ }
69
81
  };
70
82
  }
71
83
  return view;
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "183.1.6";
2
+ export var version = "184.0.0";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "183.1.6",
3
+ "version": "184.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import { Node } from 'prosemirror-model';
2
2
  import { ContextUpdateHandler, EditorActionsOptions, ReplaceRawValue } from '@atlaskit/editor-common/types';
3
3
  import { AnalyticsEventPayload } from '@atlaskit/analytics-next/AnalyticsEvent';
4
- import { ResolvedEditorState } from '@atlaskit/editor-common/collab';
4
+ import type { ResolvedEditorState } from '@atlaskit/collab-provider';
5
5
  import type { FeatureFlags, Transformer } from '@atlaskit/editor-common/types';
6
6
  import { EditorView } from 'prosemirror-view';
7
7
  import { EventDispatcher } from '../event-dispatcher';
@@ -7,6 +7,7 @@ import { MarkConfig, NodeConfig } from '../types/pm-config';
7
7
  import { EditorReactContext } from '../types/editor-react-context';
8
8
  import { FeatureFlags } from '../types/feature-flags';
9
9
  import { IntlShape } from 'react-intl-next';
10
+ import { UIComponentFactory } from '@atlaskit/editor-common/types';
10
11
  export type LightPMPluginFactoryParams = {
11
12
  schema: Schema;
12
13
  dispatch: Dispatch;
@@ -36,6 +37,7 @@ export interface LightEditorPlugin {
36
37
  marks?: () => MarkConfig[];
37
38
  nodes?: () => NodeConfig[];
38
39
  pmPlugins?: (pluginOptions?: any) => Array<LightPMPlugin>;
40
+ contentComponent?: UIComponentFactory;
39
41
  pluginsOptions?: Record<string, any>;
40
42
  onEditorViewStateUpdated?: OnEditorViewStateUpdated;
41
43
  }
@@ -13,7 +13,6 @@ export { EmojiResource } from '@atlaskit/emoji/resource';
13
13
  export { default as mediaPlugin, insertMediaSingleNode } from './plugins/media';
14
14
  export type { MediaProvider, MediaState, CustomMediaPicker, } from './plugins/media';
15
15
  export type { MediaOptions } from './plugins/media/types';
16
- export type { CollabEditProvider } from './plugins/collab-edit';
17
16
  export { AbstractMentionResource, MentionResource, PresenceResource, } from '@atlaskit/mention/resource';
18
17
  export type { MentionProvider, PresenceProvider, } from '@atlaskit/mention/resource';
19
18
  export { TeamMentionResource } from '@atlaskit/mention/team-resource';
@@ -1,8 +1,12 @@
1
1
  import { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
+ import type { widthPlugin } from '@atlaskit/editor-plugin-width';
3
+ import { BreakoutPluginState } from './types';
2
4
  interface BreakoutPluginOptions {
3
5
  allowBreakoutButton?: boolean;
4
6
  }
5
7
  declare const breakoutPlugin: NextEditorPlugin<'breakout', {
6
8
  pluginConfiguration: BreakoutPluginOptions | undefined;
9
+ dependencies: [typeof widthPlugin];
10
+ sharedState: Partial<BreakoutPluginState>;
7
11
  }>;
8
12
  export default breakoutPlugin;
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { WrappedComponentProps } from 'react-intl-next';
4
4
  import { EditorView } from 'prosemirror-view';
5
5
  import { Node as PMNode } from 'prosemirror-model';
6
- interface Props {
6
+ export interface Props {
7
7
  editorView: EditorView;
8
8
  mountPoint?: HTMLElement;
9
9
  node: PMNode | null;
@@ -2,9 +2,9 @@ import { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
2
  import { CardPluginOptions } from './types';
3
3
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
4
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
- import type widthPlugin from '../width';
5
+ import type { widthPlugin } from '@atlaskit/editor-plugin-width';
6
6
  import type basePlugin from '../base';
7
- import type gridPlugin from '../grid';
7
+ import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
8
8
  declare const cardPlugin: NextEditorPlugin<'card', {
9
9
  pluginConfiguration: CardPluginOptions;
10
10
  dependencies: [
@@ -1,10 +1,11 @@
1
1
  import { Selection } from 'prosemirror-state';
2
2
  import { EditorView } from 'prosemirror-view';
3
- import { CollabEventInitData, CollabEventRemoteData, CollabEventConnectionData, CollabEventPresenceData, CollabEventTelepointerData, CollabSendableSelection, PrivateCollabEditOptions } from './types';
3
+ import type { CollabEventInitData, CollabEventRemoteData, CollabEventConnectionData, CollabEventPresenceData, CollabTelepointerPayload, CollabSendableSelection } from '@atlaskit/collab-provider';
4
+ import { PrivateCollabEditOptions } from './types';
4
5
  export declare const handleInit: (initData: CollabEventInitData, view: EditorView, options?: PrivateCollabEditOptions) => void;
5
6
  export declare const handleConnection: (connectionData: CollabEventConnectionData, view: EditorView) => void;
6
7
  export declare const handlePresence: (presenceData: CollabEventPresenceData, view: EditorView) => void;
7
8
  export declare const applyRemoteData: (remoteData: CollabEventRemoteData, view: EditorView, options: PrivateCollabEditOptions) => void;
8
9
  export declare const applyRemoteSteps: (json: any[], view: EditorView, userIds?: (number | string)[], options?: PrivateCollabEditOptions) => void;
9
- export declare const handleTelePointer: (telepointerData: CollabEventTelepointerData, view: EditorView) => void;
10
+ export declare const handleTelePointer: (telepointerData: CollabTelepointerPayload, view: EditorView) => void;
10
11
  export declare const getSendableSelection: (selection: Selection) => CollabSendableSelection;
@@ -1,5 +1,5 @@
1
1
  import { EditorView } from 'prosemirror-view';
2
- import type { CollabEventInitData, CollabEventConnectionData, CollabEventPresenceData, CollabEventTelepointerData, CollabEventRemoteData, CollabEventLocalStepData, CollabEditProvider } from '@atlaskit/editor-common/collab';
2
+ import type { CollabEventInitData, CollabEventConnectionData, CollabEventPresenceData, CollabTelepointerPayload, CollabEventRemoteData, CollabEventLocalStepData, CollabEditProvider } from '@atlaskit/collab-provider';
3
3
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import { PrivateCollabEditOptions } from '../types';
5
5
  import { FeatureFlags } from '@atlaskit/editor-common/types';
@@ -12,7 +12,7 @@ export interface CollabHandlers {
12
12
  connectedHandler: (data: CollabEventConnectionData) => void;
13
13
  dataHandler: (data: CollabEventRemoteData) => void;
14
14
  presenceHandler: (data: CollabEventPresenceData) => void;
15
- telepointerHandler: (data: CollabEventTelepointerData) => void;
15
+ telepointerHandler: (data: CollabTelepointerPayload) => void;
16
16
  localStepsHandler: (data: CollabEventLocalStepData) => void;
17
17
  errorHandler: (error: any) => void;
18
18
  entityHandler: ({ entity }: {
@@ -20,4 +20,4 @@ export interface CollabHandlers {
20
20
  }) => void;
21
21
  }
22
22
  export type Cleanup = () => void;
23
- export declare const subscribe: (currentDeps_0: EditorView<any>, currentDeps_1: CollabEditProvider<import("@atlaskit/editor-common/collab").CollabEventData>, currentDeps_2: PrivateCollabEditOptions, currentDeps_3: FeatureFlags, currentDeps_4?: ProviderFactory | undefined) => Cleanup;
23
+ export declare const subscribe: (currentDeps_0: EditorView<any>, currentDeps_1: CollabEditProvider<import("@atlaskit/collab-provider").CollabEvents>, currentDeps_2: PrivateCollabEditOptions, currentDeps_3: FeatureFlags, currentDeps_4?: ProviderFactory | undefined) => Cleanup;
@@ -1,6 +1,6 @@
1
1
  import { EditorView } from 'prosemirror-view';
2
2
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
- import { CollabEditProvider } from '../provider';
3
+ import type { CollabEditProvider } from '@atlaskit/collab-provider';
4
4
  import { PrivateCollabEditOptions } from '../types';
5
5
  import { Cleanup } from './handlers';
6
6
  import { FeatureFlags } from '@atlaskit/editor-common/types';
@@ -1,4 +1,4 @@
1
- import type { CollabEditProvider } from '@atlaskit/editor-common/collab';
1
+ import type { CollabEditProvider } from '@atlaskit/collab-provider';
2
2
  import { Transaction, EditorState } from 'prosemirror-state';
3
3
  type Props = {
4
4
  originalTransaction: Transaction;
@@ -1,7 +1,6 @@
1
1
  import { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
2
  import { pluginKey } from './plugin';
3
3
  import { CollabEditOptions, PrivateCollabEditOptions } from './types';
4
- export type { CollabEditProvider } from './provider';
5
4
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
6
5
  export { pluginKey };
7
6
  export type { CollabEditOptions };
@@ -1,7 +1,7 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { EditorState } from 'prosemirror-state';
3
- import type { CollabEditProvider } from '@atlaskit/editor-common/collab';
3
+ import type { CollabEditProvider } from '@atlaskit/collab-provider';
4
4
  export declare const nativeCollabProviderPlugin: ({ providerPromise, }: {
5
5
  providerPromise: Promise<CollabEditProvider>;
6
- }) => SafePlugin<CollabEditProvider<import("@atlaskit/editor-common/collab").CollabEventData> | null, any>;
6
+ }) => SafePlugin<CollabEditProvider<import("@atlaskit/collab-provider").CollabEvents> | null, any>;
7
7
  export declare const getCollabProvider: (editorState: EditorState) => CollabEditProvider | null;
@@ -1,4 +1,4 @@
1
- import { CollabParticipant } from './types';
1
+ import { CollabParticipant } from '@atlaskit/collab-provider';
2
2
  export interface ReadOnlyParticipants {
3
3
  get(sessionId: string): CollabParticipant | undefined;
4
4
  toArray(): ReadonlyArray<CollabParticipant>;
@@ -2,10 +2,8 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
3
  import { Dispatch } from '../../event-dispatcher';
4
4
  import { PrivateCollabEditOptions, ProviderCallback } from './types';
5
- import { CollabEditProvider } from './provider';
6
5
  import { PluginState } from './plugin-state';
7
6
  import { pluginKey } from './plugin-key';
8
7
  import { FeatureFlags } from '@atlaskit/editor-common/types';
9
8
  export { PluginState, pluginKey };
10
- export type { CollabEditProvider };
11
9
  export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, collabProviderCallback: ProviderCallback, options: PrivateCollabEditOptions, featureFlags: FeatureFlags) => SafePlugin<any, any>;
@@ -1,9 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { Providers } from '@atlaskit/editor-common/provider-factory';
3
- import type { CollabEditProvider } from '@atlaskit/editor-common/collab';
3
+ import type { CollabEditProvider, SyncUpErrorFunction } from '@atlaskit/collab-provider';
4
4
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
5
- import { SyncUpErrorFunction } from '@atlaskit/editor-common/types';
6
- export type { CollabParticipant, CollabEventInitData, CollabEventRemoteData, CollabEventConnectionData, CollabEventPresenceData, CollabEventTelepointerData, CollabSendableSelection, } from '@atlaskit/editor-common/collab';
7
5
  export type InviteToEditComponentProps = {
8
6
  children: ReactElement<InviteToEditButtonProps>;
9
7
  };
@@ -1,4 +1,4 @@
1
1
  import { AvatarProps } from '@atlaskit/avatar-group';
2
- import { CollabParticipant } from '../types';
2
+ import type { CollabParticipant } from '@atlaskit/collab-provider';
3
3
  declare const _default: import("memoize-one").MemoizedFn<(participant: CollabParticipant) => AvatarProps>;
4
4
  export default _default;
@@ -1,6 +1,7 @@
1
1
  import { EditorState } from 'prosemirror-state';
2
2
  import { EditorView, Decoration, DecorationSet } from 'prosemirror-view';
3
- import { CollabEditOptions, CollabParticipant } from './types';
3
+ import type { CollabParticipant } from '@atlaskit/collab-provider';
4
+ import { CollabEditOptions } from './types';
4
5
  export interface Color {
5
6
  solid: string;
6
7
  selection: string;
@@ -2,6 +2,7 @@ import { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
2
2
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
3
  import { NextEditorPlugin, EditorAppearance } from '../../types';
4
4
  import { LongPressSelectionPluginOptions } from '../selection/types';
5
+ import { widthPlugin } from '@atlaskit/editor-plugin-width';
5
6
  interface ExtensionPluginOptions extends LongPressSelectionPluginOptions {
6
7
  allowAutoSave?: boolean;
7
8
  breakoutEnabled?: boolean;
@@ -10,6 +11,6 @@ interface ExtensionPluginOptions extends LongPressSelectionPluginOptions {
10
11
  }
11
12
  declare const extensionPlugin: NextEditorPlugin<'extension', {
12
13
  pluginConfiguration: ExtensionPluginOptions | undefined;
13
- dependencies: [typeof featureFlagsPlugin];
14
+ dependencies: [typeof featureFlagsPlugin, typeof widthPlugin];
14
15
  }>;
15
16
  export default extensionPlugin;
@@ -3,10 +3,12 @@ import { EditorView, NodeView } from 'prosemirror-view';
3
3
  import { Node as PmNode } from 'prosemirror-model';
4
4
  import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
5
5
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
6
+ import { PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
6
7
  import { EditorAppearance } from '../../../types/editor-appearance';
7
8
  import { ForwardRef, getPosHandler, ReactNodeView } from '../../../nodeviews';
8
9
  import { PortalProviderAPI } from '../../../ui/PortalProvider';
9
10
  import { EventDispatcher } from '../../../event-dispatcher';
11
+ import type { widthPlugin } from '@atlaskit/editor-plugin-width';
10
12
  interface ExtensionNodeViewOptions {
11
13
  appearance?: EditorAppearance;
12
14
  }
@@ -22,7 +24,8 @@ export declare class ExtensionNode extends ReactNodeView {
22
24
  providerFactory: ProviderFactory;
23
25
  extensionHandlers: ExtensionHandlers;
24
26
  extensionNodeViewOptions?: ExtensionNodeViewOptions;
27
+ pluginInjectionApi: PluginInjectionAPIWithDependency<typeof widthPlugin> | undefined;
25
28
  }, forwardRef: ForwardRef): JSX.Element;
26
29
  }
27
- export default function ExtensionNodeView(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionNodeViewOptions: ExtensionNodeViewOptions): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
30
+ export default function ExtensionNodeView(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionNodeViewOptions: ExtensionNodeViewOptions, pluginInjectionApi: PluginInjectionAPIWithDependency<typeof widthPlugin> | undefined): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
28
31
  export {};
@@ -4,11 +4,13 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
5
5
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
6
6
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
7
+ import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
7
8
  import { EditorAppearance } from '../../../types/editor-appearance';
8
9
  import { Dispatch, EventDispatcher } from '../../../event-dispatcher';
9
10
  import { PortalProviderAPI } from '../../../ui/PortalProvider';
10
11
  import { getPluginState, createCommand } from '../plugin-factory';
11
12
  import { pluginKey } from '../plugin-key';
13
+ import type extensionPlugin from '../index';
12
14
  export declare const createExtensionProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ExtensionProvider>) => Promise<void>;
13
15
  export declare const createContextIdentifierProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
14
16
  export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandlers, }: {
@@ -17,7 +19,7 @@ export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandle
17
19
  domAtPos: EditorView['domAtPos'];
18
20
  extensionHandlers: ExtensionHandlers;
19
21
  }) => true | undefined;
20
- declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, useLongPressSelection?: boolean, options?: {
22
+ declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<typeof extensionPlugin> | undefined, useLongPressSelection?: boolean, options?: {
21
23
  appearance?: EditorAppearance;
22
24
  }) => SafePlugin<import("../types").ExtensionState<import("@atlaskit/editor-common/extensions").Parameters>, import("prosemirror-model").Schema<any, any>>;
23
25
  export { pluginKey, createPlugin, createCommand, getPluginState };
@@ -5,6 +5,8 @@ import { EditorView } from 'prosemirror-view';
5
5
  import type { ExtensionProvider, ReferenceEntity } from '@atlaskit/editor-common/extensions';
6
6
  import { ProsemirrorGetPosHandler } from '../../../../../nodeviews';
7
7
  import { EditorAppearance } from '../../../../../types/editor-appearance';
8
+ import type { widthPlugin } from '@atlaskit/editor-plugin-width';
9
+ import { PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
8
10
  export interface Props {
9
11
  node: PmNode;
10
12
  getPos: ProsemirrorGetPosHandler;
@@ -15,7 +17,11 @@ export interface Props {
15
17
  references?: ReferenceEntity[];
16
18
  hideFrame?: boolean;
17
19
  editorAppearance?: EditorAppearance;
20
+ pluginInjectionApi: PluginInjectionAPIWithDependency<typeof widthPlugin> | undefined;
18
21
  }
22
+ /**
23
+ * End workaround
24
+ */
19
25
  declare const _default: {
20
26
  new (props: Readonly<Props>): {
21
27
  overflowContainer?: HTMLElement | null | undefined;
@@ -5,6 +5,8 @@ import { getNodeRenderer, getExtensionModuleNodePrivateProps } from '@atlaskit/e
5
5
  import type { ExtensionHandlers, ExtensionProvider, ReferenceEntity } from '@atlaskit/editor-common/extensions';
6
6
  import { ProsemirrorGetPosHandler } from '../../../../nodeviews';
7
7
  import { EditorAppearance } from '../../../../types/editor-appearance';
8
+ import type { widthPlugin } from '@atlaskit/editor-plugin-width';
9
+ import { PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
8
10
  export interface Props {
9
11
  editorView: EditorView;
10
12
  node: PMNode;
@@ -14,6 +16,7 @@ export interface Props {
14
16
  extensionProvider?: Promise<ExtensionProvider>;
15
17
  references?: ReferenceEntity[];
16
18
  editorAppearance?: EditorAppearance;
19
+ pluginInjectionApi: PluginInjectionAPIWithDependency<typeof widthPlugin> | undefined;
17
20
  }
18
21
  export interface State {
19
22
  extensionProvider?: ExtensionProvider;
@@ -5,6 +5,8 @@ import type { ExtensionHandlers, ReferenceEntity } from '@atlaskit/editor-common
5
5
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
6
6
  import { ProsemirrorGetPosHandler } from '../../../../nodeviews/types';
7
7
  import { EditorAppearance } from '../../../../types/editor-appearance';
8
+ import type { widthPlugin } from '@atlaskit/editor-plugin-width';
9
+ import { PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
8
10
  export interface Props {
9
11
  editorView: EditorView;
10
12
  node: PMNode;
@@ -14,6 +16,7 @@ export interface Props {
14
16
  extensionHandlers: ExtensionHandlers;
15
17
  references?: ReferenceEntity[];
16
18
  editorAppearance?: EditorAppearance;
19
+ pluginInjectionApi: PluginInjectionAPIWithDependency<typeof widthPlugin> | undefined;
17
20
  }
18
21
  export default class Extension extends Component<Props, any> {
19
22
  static displayName: string;
@@ -1,7 +1,9 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
+ import { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
4
  export declare function createPlugin(dispatch: Function, imageEnabled: boolean): SafePlugin<any, any>;
4
5
  declare const helpDialog: NextEditorPlugin<'helpDialog', {
6
+ dependencies: [OptionalPlugin<typeof analyticsPlugin>];
5
7
  pluginConfiguration: boolean;
6
8
  }>;
7
9
  export default helpDialog;
@@ -5,7 +5,6 @@ export type { BlockTypeState } from './block-type';
5
5
  export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-marks-on-change-to-empty-document';
6
6
  export { default as codeBlockPlugin } from './code-block';
7
7
  export { default as collabEditPlugin } from './collab-edit';
8
- export type { CollabEditProvider } from './collab-edit';
9
8
  export { default as datePlugin } from './date';
10
9
  export { default as emojiPlugin } from './emoji';
11
10
  export { default as extensionPlugin } from './extension';
@@ -35,11 +34,9 @@ export { default as textColorPlugin } from './text-color';
35
34
  export { default as textFormattingPlugin } from './text-formatting';
36
35
  export { default as typeAheadPlugin } from './type-ahead';
37
36
  export { default as unsupportedContentPlugin } from './unsupported-content';
38
- export { default as widthPlugin } from './width';
39
37
  export { default as cardPlugin } from './card';
40
38
  export { default as floatingToolbarPlugin } from './floating-toolbar';
41
39
  export { default as statusPlugin } from './status';
42
- export { default as gridPlugin } from './grid';
43
40
  export { default as breakoutPlugin } from './breakout';
44
41
  export { default as alignmentPlugin } from './alignment';
45
42
  export { default as dataConsumerMarkPlugin } from './data-consumer';
@@ -1,13 +1,23 @@
1
1
  import { MediaProvider } from '@atlaskit/editor-common/provider-factory';
2
2
  import { NextEditorPlugin } from '../../types';
3
+ import { OptionalPlugin } from '@atlaskit/editor-common/types';
3
4
  import { MediaState } from './pm-plugins/main';
4
5
  import { CustomMediaPicker, MediaOptions } from './types';
6
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
7
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
6
- import type gridPlugin from '../grid';
8
+ import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
9
+ import type { widthPlugin } from '@atlaskit/editor-plugin-width';
10
+ import { MediaPluginState } from './pm-plugins/types';
7
11
  export type { MediaState, MediaProvider, CustomMediaPicker };
8
12
  export { insertMediaSingleNode } from './utils/media-single';
9
13
  declare const mediaPlugin: NextEditorPlugin<'media', {
10
14
  pluginConfiguration: MediaOptions | undefined;
11
- dependencies: [typeof featureFlagsPlugin, typeof gridPlugin];
15
+ dependencies: [
16
+ typeof featureFlagsPlugin,
17
+ OptionalPlugin<typeof analyticsPlugin>,
18
+ typeof gridPlugin,
19
+ typeof widthPlugin
20
+ ];
21
+ sharedState: MediaPluginState | null;
12
22
  }>;
13
23
  export default mediaPlugin;
@@ -7,9 +7,11 @@ import { EditorView } from 'prosemirror-view';
7
7
  import { EventDispatcher } from '../../../../event-dispatcher';
8
8
  import { getPosHandler, SelectionBasedNodeView } from '../../../../nodeviews';
9
9
  import { PortalProviderAPI } from '../../../../ui/PortalProvider';
10
- import { WidthPluginState } from '../../../width';
10
+ import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
11
11
  import { MediaOptions } from '../../types';
12
12
  import { MediaNodeViewProps } from '../types';
13
+ import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
14
+ import type mediaPlugin from '../../index';
13
15
  declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
14
16
  createDomRef(): HTMLElement;
15
17
  viewShouldUpdate(nextNode: PMNode): boolean;
@@ -22,5 +24,5 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
22
24
  renderMediaNodeWithProviders: ({ mediaProvider, contextIdentifierProvider, }: Providers) => JSX.Element;
23
25
  render(): JSX.Element;
24
26
  }
25
- export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions?: MediaOptions) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
27
+ export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
26
28
  export {};
@@ -15,7 +15,7 @@ import { PortalProviderAPI } from '../../../ui/PortalProvider';
15
15
  import { MediaOptions } from '../types';
16
16
  import { MediaSingleNodeProps, MediaSingleNodeViewProps } from './types';
17
17
  import { MediaNodeUpdater } from './mediaNodeUpdater';
18
- import { DispatchAnalyticsEvent } from '../../analytics';
18
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
19
19
  import ReactNodeView from '../../../nodeviews/ReactNodeView';
20
20
  import type mediaPlugin from '../index';
21
21
  export interface MediaSingleNodeState {
@@ -25,7 +25,7 @@ export interface MediaSingleNodeProps {
25
25
  dispatchAnalyticsEvent: DispatchAnalyticsEvent;
26
26
  isCopyPasteEnabled?: boolean;
27
27
  forwardRef: ForwardRef;
28
- pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin>;
28
+ pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined;
29
29
  }
30
30
  export interface MediaSingleNodeViewProps {
31
31
  eventDispatcher: EventDispatcher;
@@ -40,4 +40,5 @@ export interface MediaNodeViewProps {
40
40
  eventDispatcher: EventDispatcher;
41
41
  providerFactory: ProviderFactory;
42
42
  mediaOptions: MediaOptions;
43
+ pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined;
43
44
  }
@@ -2,4 +2,6 @@ import { EditorState } from 'prosemirror-state';
2
2
  import { IntlShape } from 'react-intl-next';
3
3
  import { FloatingToolbarConfig } from '../../../plugins/floating-toolbar/types';
4
4
  import { MediaFloatingToolbarOptions } from '../types';
5
- export declare const floatingToolbar: (state: EditorState, intl: IntlShape, options?: MediaFloatingToolbarOptions) => FloatingToolbarConfig | undefined;
5
+ import type mediaPlugin from '../index';
6
+ import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
7
+ export declare const floatingToolbar: (state: EditorState, intl: IntlShape, options: MediaFloatingToolbarOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined) => FloatingToolbarConfig | undefined;
@@ -1,10 +1,10 @@
1
1
  import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
2
2
  import type { MediaSingleProps } from '@atlaskit/editor-common/ui';
3
3
  import { MediaClientConfig } from '@atlaskit/media-core';
4
- import { GridType } from '../../../grid/types';
4
+ import type { GridType } from '@atlaskit/editor-common/types';
5
5
  import { EditorView } from 'prosemirror-view';
6
6
  import { getPosHandler } from '../../../../nodeviews/types';
7
- import { DispatchAnalyticsEvent } from '../../../../plugins/analytics';
7
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
8
8
  import { ResolvedPos } from 'prosemirror-model';
9
9
  export type EnabledHandles = {
10
10
  left?: boolean;
@@ -8,11 +8,12 @@ export type { LightEditorPlugin } from './create-editor/get-plugins';
8
8
  export type { DispatchAnalyticsEvent } from './plugins/analytics/types';
9
9
  export type { FeatureFlags } from './types/feature-flags';
10
10
  import { EditorPresetBuilder, type EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
11
- import type { AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
11
+ import type { AllEditorPresetPluginTypes, UIComponentFactory } from '@atlaskit/editor-common/types';
12
12
  export interface LightEditorConfig {
13
13
  nodes: NodeConfig[];
14
14
  marks: MarkConfig[];
15
15
  plugins: Array<LightPMPlugin>;
16
+ contentComponents: UIComponentFactory[];
16
17
  onEditorViewStateUpdatedCallbacks: Array<OnEditorViewStateUpdated>;
17
18
  }
18
19
  export declare function getFireAnalytics(editorView: EditorView): any;
@@ -20,6 +21,7 @@ type PluginData = {
20
21
  plugins: Plugin[];
21
22
  schema: Schema;
22
23
  onEditorViewStateUpdatedCallbacks: Array<OnEditorViewStateUpdated>;
24
+ editorConfig: LightEditorConfig;
23
25
  };
24
26
  export declare const createPMSchemaAndPlugins: (inputPreset?: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>) => (pluginFactoryParams: Omit<LightPMPluginFactoryParams, 'schema'> & {
25
27
  pluginInjectionAPI: EditorPluginInjectionAPI;
@@ -87,7 +87,7 @@ export declare const ScrollContainer: import("react").ForwardRefExoticComponent<
87
87
  'aria-label'?: string | undefined;
88
88
  'aria-labelledby'?: string | undefined;
89
89
  'aria-level'?: number | undefined;
90
- 'aria-live'?: "off" | "polite" | "assertive" | undefined;
90
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
91
91
  'aria-modal'?: boolean | "false" | "true" | undefined;
92
92
  'aria-multiline'?: boolean | "false" | "true" | undefined;
93
93
  'aria-multiselectable'?: boolean | "false" | "true" | undefined;
@@ -25,5 +25,5 @@ type Props = WithAnalyticsEventsProps & {
25
25
  */
26
26
  skipFocusButtonAfterPick?: boolean;
27
27
  };
28
- declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "title" | "key" | "onChange" | "size" | "currentColor" | "cols" | "analyticsContext" | "alignX" | "colorPalette" | "placement" | "mountPoint" | "setDisableParentScroll" | "hexToPaletteColor" | "showSomewhatSemanticTooltips" | "paletteColorTooltipMessages" | "skipFocusButtonAfterPick"> & React.RefAttributes<any>>;
28
+ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "title" | "key" | "onChange" | "size" | "currentColor" | "cols" | "analyticsContext" | "colorPalette" | "placement" | "alignX" | "mountPoint" | "setDisableParentScroll" | "hexToPaletteColor" | "showSomewhatSemanticTooltips" | "paletteColorTooltipMessages" | "skipFocusButtonAfterPick"> & React.RefAttributes<any>>;
29
29
  export default _default;