@atlaskit/editor-core 187.31.6 → 187.32.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 (203) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/cjs/create-editor/ReactEditorViewInternal.js +1 -1
  3. package/dist/cjs/plugins/analytics/plugin.js +14 -12
  4. package/dist/cjs/plugins/annotation/index.js +15 -13
  5. package/dist/cjs/plugins/avatar-group/index.js +16 -14
  6. package/dist/cjs/plugins/base/plugin.js +12 -10
  7. package/dist/cjs/plugins/before-primaryToolbar/index.js +3 -2
  8. package/dist/cjs/plugins/block-type/index.js +32 -30
  9. package/dist/cjs/plugins/breakout/index.js +10 -8
  10. package/dist/cjs/plugins/caption/index.js +7 -6
  11. package/dist/cjs/plugins/caption/pm-plugins/main.js +2 -2
  12. package/dist/cjs/plugins/code-bidi-warning/index.js +2 -4
  13. package/dist/cjs/plugins/code-block/index.js +14 -11
  14. package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +2 -2
  15. package/dist/cjs/plugins/collab-edit/index.js +16 -14
  16. package/dist/cjs/plugins/collab-edit/plugin.js +5 -5
  17. package/dist/cjs/plugins/date/index.js +18 -17
  18. package/dist/cjs/plugins/emoji/index.js +35 -33
  19. package/dist/cjs/plugins/expand/index.js +14 -13
  20. package/dist/cjs/plugins/extension/index.js +16 -15
  21. package/dist/cjs/plugins/extension/pm-plugins/main.js +4 -4
  22. package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +11 -2
  23. package/dist/cjs/plugins/feedback-dialog/index.js +5 -4
  24. package/dist/cjs/plugins/find-replace/index.js +17 -15
  25. package/dist/cjs/plugins/floating-toolbar/index.js +31 -30
  26. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +3 -3
  27. package/dist/cjs/plugins/help-dialog/index.js +18 -17
  28. package/dist/cjs/plugins/insert-block/index.js +52 -51
  29. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -11
  30. package/dist/cjs/plugins/layout/index.js +15 -14
  31. package/dist/cjs/plugins/max-content-size/index.js +4 -3
  32. package/dist/cjs/plugins/media/index.js +49 -47
  33. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
  34. package/dist/cjs/plugins/media/pm-plugins/main.js +7 -7
  35. package/dist/cjs/plugins/media/toolbar/index.js +29 -24
  36. package/dist/cjs/plugins/media/toolbar/linking.js +4 -4
  37. package/dist/cjs/plugins/media/toolbar/utils.js +22 -2
  38. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -4
  39. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
  40. package/dist/cjs/plugins/mentions/index.js +17 -15
  41. package/dist/cjs/plugins/panel/index.js +13 -12
  42. package/dist/cjs/plugins/paste/index.js +13 -10
  43. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +8 -8
  44. package/dist/cjs/plugins/paste/pm-plugins/main.js +10 -10
  45. package/dist/cjs/plugins/placeholder/index.js +9 -7
  46. package/dist/cjs/plugins/placeholder-text/index.js +23 -16
  47. package/dist/cjs/plugins/quick-insert/index.js +13 -12
  48. package/dist/cjs/plugins/rule/index.js +8 -7
  49. package/dist/cjs/plugins/save-on-enter/index.js +4 -3
  50. package/dist/cjs/plugins/selection/index.js +5 -4
  51. package/dist/cjs/plugins/status/index.js +20 -14
  52. package/dist/cjs/plugins/submit-editor/index.js +4 -3
  53. package/dist/cjs/plugins/tasks-and-decisions/index.js +6 -5
  54. package/dist/cjs/plugins/text-color/index.js +17 -15
  55. package/dist/cjs/plugins/toolbar-lists-indentation/index.js +31 -26
  56. package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +1 -1
  57. package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -4
  58. package/dist/cjs/plugins/type-ahead/index.js +21 -20
  59. package/dist/cjs/ui/ElementBrowser/InsertMenu.js +11 -11
  60. package/dist/cjs/ui/ToolbarFeedback/index.js +1 -1
  61. package/dist/cjs/use-preset.js +2 -2
  62. package/dist/cjs/version-wrapper.js +1 -1
  63. package/dist/es2019/create-editor/ReactEditorViewInternal.js +1 -1
  64. package/dist/es2019/plugins/analytics/plugin.js +11 -8
  65. package/dist/es2019/plugins/annotation/index.js +4 -1
  66. package/dist/es2019/plugins/avatar-group/index.js +8 -5
  67. package/dist/es2019/plugins/base/plugin.js +6 -3
  68. package/dist/es2019/plugins/before-primaryToolbar/index.js +4 -2
  69. package/dist/es2019/plugins/block-type/index.js +14 -11
  70. package/dist/es2019/plugins/breakout/index.js +6 -3
  71. package/dist/es2019/plugins/caption/index.js +3 -1
  72. package/dist/es2019/plugins/caption/pm-plugins/main.js +2 -2
  73. package/dist/es2019/plugins/code-bidi-warning/index.js +2 -4
  74. package/dist/es2019/plugins/code-block/index.js +15 -9
  75. package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +2 -2
  76. package/dist/es2019/plugins/collab-edit/index.js +9 -6
  77. package/dist/es2019/plugins/collab-edit/plugin.js +5 -5
  78. package/dist/es2019/plugins/date/index.js +6 -3
  79. package/dist/es2019/plugins/emoji/index.js +16 -13
  80. package/dist/es2019/plugins/expand/index.js +7 -4
  81. package/dist/es2019/plugins/extension/index.js +11 -8
  82. package/dist/es2019/plugins/extension/pm-plugins/main.js +4 -4
  83. package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +13 -2
  84. package/dist/es2019/plugins/feedback-dialog/index.js +4 -2
  85. package/dist/es2019/plugins/find-replace/index.js +8 -5
  86. package/dist/es2019/plugins/floating-toolbar/index.js +6 -4
  87. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +3 -3
  88. package/dist/es2019/plugins/help-dialog/index.js +9 -6
  89. package/dist/es2019/plugins/insert-block/index.js +12 -9
  90. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -11
  91. package/dist/es2019/plugins/layout/index.js +8 -5
  92. package/dist/es2019/plugins/max-content-size/index.js +3 -1
  93. package/dist/es2019/plugins/media/index.js +14 -10
  94. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -2
  95. package/dist/es2019/plugins/media/pm-plugins/main.js +7 -7
  96. package/dist/es2019/plugins/media/toolbar/index.js +29 -25
  97. package/dist/es2019/plugins/media/toolbar/linking.js +4 -4
  98. package/dist/es2019/plugins/media/toolbar/utils.js +18 -0
  99. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -4
  100. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
  101. package/dist/es2019/plugins/mentions/index.js +9 -6
  102. package/dist/es2019/plugins/panel/index.js +5 -2
  103. package/dist/es2019/plugins/paste/index.js +9 -5
  104. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +8 -8
  105. package/dist/es2019/plugins/paste/pm-plugins/main.js +10 -10
  106. package/dist/es2019/plugins/placeholder/index.js +10 -7
  107. package/dist/es2019/plugins/placeholder-text/index.js +12 -4
  108. package/dist/es2019/plugins/quick-insert/index.js +3 -1
  109. package/dist/es2019/plugins/rule/index.js +5 -3
  110. package/dist/es2019/plugins/save-on-enter/index.js +3 -1
  111. package/dist/es2019/plugins/selection/index.js +3 -1
  112. package/dist/es2019/plugins/status/index.js +11 -3
  113. package/dist/es2019/plugins/submit-editor/index.js +3 -1
  114. package/dist/es2019/plugins/tasks-and-decisions/index.js +6 -4
  115. package/dist/es2019/plugins/text-color/index.js +6 -3
  116. package/dist/es2019/plugins/toolbar-lists-indentation/index.js +9 -5
  117. package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +1 -1
  118. package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -4
  119. package/dist/es2019/plugins/type-ahead/index.js +3 -1
  120. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +11 -11
  121. package/dist/es2019/ui/ToolbarFeedback/index.js +1 -1
  122. package/dist/es2019/use-preset.js +2 -2
  123. package/dist/es2019/version-wrapper.js +1 -1
  124. package/dist/esm/create-editor/ReactEditorViewInternal.js +1 -1
  125. package/dist/esm/plugins/analytics/plugin.js +14 -12
  126. package/dist/esm/plugins/annotation/index.js +15 -13
  127. package/dist/esm/plugins/avatar-group/index.js +16 -14
  128. package/dist/esm/plugins/base/plugin.js +12 -10
  129. package/dist/esm/plugins/before-primaryToolbar/index.js +3 -2
  130. package/dist/esm/plugins/block-type/index.js +32 -30
  131. package/dist/esm/plugins/breakout/index.js +10 -8
  132. package/dist/esm/plugins/caption/index.js +7 -6
  133. package/dist/esm/plugins/caption/pm-plugins/main.js +2 -2
  134. package/dist/esm/plugins/code-bidi-warning/index.js +2 -4
  135. package/dist/esm/plugins/code-block/index.js +14 -11
  136. package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +2 -2
  137. package/dist/esm/plugins/collab-edit/index.js +16 -14
  138. package/dist/esm/plugins/collab-edit/plugin.js +5 -5
  139. package/dist/esm/plugins/date/index.js +18 -17
  140. package/dist/esm/plugins/emoji/index.js +35 -33
  141. package/dist/esm/plugins/expand/index.js +14 -13
  142. package/dist/esm/plugins/extension/index.js +16 -15
  143. package/dist/esm/plugins/extension/pm-plugins/main.js +4 -4
  144. package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +11 -2
  145. package/dist/esm/plugins/feedback-dialog/index.js +5 -4
  146. package/dist/esm/plugins/find-replace/index.js +17 -15
  147. package/dist/esm/plugins/floating-toolbar/index.js +31 -30
  148. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +3 -3
  149. package/dist/esm/plugins/help-dialog/index.js +18 -17
  150. package/dist/esm/plugins/insert-block/index.js +52 -51
  151. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -11
  152. package/dist/esm/plugins/layout/index.js +15 -14
  153. package/dist/esm/plugins/max-content-size/index.js +4 -3
  154. package/dist/esm/plugins/media/index.js +49 -47
  155. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +2 -2
  156. package/dist/esm/plugins/media/pm-plugins/main.js +7 -7
  157. package/dist/esm/plugins/media/toolbar/index.js +30 -25
  158. package/dist/esm/plugins/media/toolbar/linking.js +4 -4
  159. package/dist/esm/plugins/media/toolbar/utils.js +19 -0
  160. package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -4
  161. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
  162. package/dist/esm/plugins/mentions/index.js +17 -15
  163. package/dist/esm/plugins/panel/index.js +13 -12
  164. package/dist/esm/plugins/paste/index.js +13 -10
  165. package/dist/esm/plugins/paste/pm-plugins/analytics.js +8 -8
  166. package/dist/esm/plugins/paste/pm-plugins/main.js +10 -10
  167. package/dist/esm/plugins/placeholder/index.js +9 -7
  168. package/dist/esm/plugins/placeholder-text/index.js +23 -16
  169. package/dist/esm/plugins/quick-insert/index.js +13 -12
  170. package/dist/esm/plugins/rule/index.js +8 -7
  171. package/dist/esm/plugins/save-on-enter/index.js +4 -3
  172. package/dist/esm/plugins/selection/index.js +5 -4
  173. package/dist/esm/plugins/status/index.js +20 -14
  174. package/dist/esm/plugins/submit-editor/index.js +4 -3
  175. package/dist/esm/plugins/tasks-and-decisions/index.js +6 -5
  176. package/dist/esm/plugins/text-color/index.js +17 -15
  177. package/dist/esm/plugins/toolbar-lists-indentation/index.js +31 -26
  178. package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +1 -1
  179. package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -4
  180. package/dist/esm/plugins/type-ahead/index.js +21 -20
  181. package/dist/esm/ui/ElementBrowser/InsertMenu.js +11 -11
  182. package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
  183. package/dist/esm/use-preset.js +2 -2
  184. package/dist/esm/version-wrapper.js +1 -1
  185. package/dist/types/labs/next/presets/default.d.ts +62 -618
  186. package/dist/types/plugins/avatar-group/index.d.ts +1 -1
  187. package/dist/types/plugins/before-primaryToolbar/index.d.ts +1 -1
  188. package/dist/types/plugins/caption/index.d.ts +1 -1
  189. package/dist/types/plugins/media/toolbar/utils.d.ts +2 -1
  190. package/dist/types/plugins/media/types.d.ts +1 -0
  191. package/dist/types/plugins/selection/index.d.ts +2 -2
  192. package/dist/types/plugins/text-color/index.d.ts +3 -2
  193. package/dist/types/use-preset.d.ts +2 -2
  194. package/dist/types-ts4.5/labs/next/presets/default.d.ts +96 -716
  195. package/dist/types-ts4.5/plugins/avatar-group/index.d.ts +1 -1
  196. package/dist/types-ts4.5/plugins/before-primaryToolbar/index.d.ts +1 -1
  197. package/dist/types-ts4.5/plugins/caption/index.d.ts +1 -1
  198. package/dist/types-ts4.5/plugins/media/toolbar/utils.d.ts +2 -1
  199. package/dist/types-ts4.5/plugins/media/types.d.ts +1 -0
  200. package/dist/types-ts4.5/plugins/selection/index.d.ts +2 -2
  201. package/dist/types-ts4.5/plugins/text-color/index.d.ts +3 -2
  202. package/dist/types-ts4.5/use-preset.d.ts +2 -2
  203. package/package.json +4 -4
@@ -22,9 +22,11 @@ var pluginConfig = function pluginConfig(textColorConfig) {
22
22
  }
23
23
  return textColorConfig;
24
24
  };
25
- var textColorPlugin = function textColorPlugin(textColorConfig, api) {
26
- var _api$dependencies, _api$dependencies$fea;
27
- var featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies = api.dependencies) === null || _api$dependencies === void 0 ? void 0 : (_api$dependencies$fea = _api$dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
25
+ var textColorPlugin = function textColorPlugin(_ref) {
26
+ var _api$featureFlags;
27
+ var textColorConfig = _ref.config,
28
+ api = _ref.api;
29
+ var featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
28
30
  return {
29
31
  name: 'textColor',
30
32
  marks: function marks() {
@@ -36,26 +38,26 @@ var textColorPlugin = function textColorPlugin(textColorConfig, api) {
36
38
  pmPlugins: function pmPlugins() {
37
39
  return [{
38
40
  name: 'textColor',
39
- plugin: function plugin(_ref) {
40
- var dispatch = _ref.dispatch;
41
+ plugin: function plugin(_ref2) {
42
+ var dispatch = _ref2.dispatch;
41
43
  return (0, _main.createPlugin)(dispatch, pluginConfig(textColorConfig));
42
44
  }
43
45
  }];
44
46
  },
45
- primaryToolbarComponent: function primaryToolbarComponent(_ref2) {
46
- var editorView = _ref2.editorView,
47
- popupsMountPoint = _ref2.popupsMountPoint,
48
- popupsBoundariesElement = _ref2.popupsBoundariesElement,
49
- popupsScrollableElement = _ref2.popupsScrollableElement,
50
- isToolbarReducedSpacing = _ref2.isToolbarReducedSpacing,
51
- dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
52
- disabled = _ref2.disabled;
47
+ primaryToolbarComponent: function primaryToolbarComponent(_ref3) {
48
+ var editorView = _ref3.editorView,
49
+ popupsMountPoint = _ref3.popupsMountPoint,
50
+ popupsBoundariesElement = _ref3.popupsBoundariesElement,
51
+ popupsScrollableElement = _ref3.popupsScrollableElement,
52
+ isToolbarReducedSpacing = _ref3.isToolbarReducedSpacing,
53
+ dispatchAnalyticsEvent = _ref3.dispatchAnalyticsEvent,
54
+ disabled = _ref3.disabled;
53
55
  return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
54
56
  plugins: {
55
57
  textColor: _main.pluginKey
56
58
  },
57
- render: function render(_ref3) {
58
- var textColor = _ref3.textColor;
59
+ render: function render(_ref4) {
60
+ var textColor = _ref4.textColor;
59
61
  return /*#__PURE__*/_react.default.createElement(_ToolbarTextColor.default, {
60
62
  pluginState: textColor,
61
63
  isReducedSpacing: isToolbarReducedSpacing,
@@ -10,11 +10,16 @@ var _hooks = require("@atlaskit/editor-common/hooks");
10
10
  var _ui = _interopRequireDefault(require("./ui"));
11
11
  var _types = require("../../ui/Toolbar/types");
12
12
  var _indentationButtons = require("./pm-plugins/indentation-buttons");
13
- var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref, api) {
14
- var _api$dependencies$fea;
15
- var showIndentationButtons = _ref.showIndentationButtons,
16
- allowHeadingAndParagraphIndentation = _ref.allowHeadingAndParagraphIndentation;
17
- var featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies$fea = api.dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
13
+ var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref) {
14
+ var _api$featureFlags;
15
+ var config = _ref.config,
16
+ api = _ref.api;
17
+ var _ref2 = config !== null && config !== void 0 ? config : {},
18
+ _ref2$showIndentation = _ref2.showIndentationButtons,
19
+ showIndentationButtons = _ref2$showIndentation === void 0 ? false : _ref2$showIndentation,
20
+ _ref2$allowHeadingAnd = _ref2.allowHeadingAndParagraphIndentation,
21
+ allowHeadingAndParagraphIndentation = _ref2$allowHeadingAnd === void 0 ? false : _ref2$allowHeadingAnd;
22
+ var featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
18
23
  return {
19
24
  name: 'toolbarListsIndentation',
20
25
  getSharedState: function getSharedState(editorState) {
@@ -26,8 +31,8 @@ var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref,
26
31
  pmPlugins: function pmPlugins() {
27
32
  return [{
28
33
  name: 'indentationButtons',
29
- plugin: function plugin(_ref2) {
30
- var dispatch = _ref2.dispatch;
34
+ plugin: function plugin(_ref3) {
35
+ var dispatch = _ref3.dispatch;
31
36
  return (0, _indentationButtons.createPlugin)({
32
37
  dispatch: dispatch,
33
38
  showIndentationButtons: showIndentationButtons,
@@ -37,14 +42,14 @@ var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref,
37
42
  }
38
43
  }];
39
44
  },
40
- primaryToolbarComponent: function primaryToolbarComponent(_ref3) {
41
- var editorView = _ref3.editorView,
42
- popupsMountPoint = _ref3.popupsMountPoint,
43
- popupsBoundariesElement = _ref3.popupsBoundariesElement,
44
- popupsScrollableElement = _ref3.popupsScrollableElement,
45
- toolbarSize = _ref3.toolbarSize,
46
- disabled = _ref3.disabled,
47
- isToolbarReducedSpacing = _ref3.isToolbarReducedSpacing;
45
+ primaryToolbarComponent: function primaryToolbarComponent(_ref4) {
46
+ var editorView = _ref4.editorView,
47
+ popupsMountPoint = _ref4.popupsMountPoint,
48
+ popupsBoundariesElement = _ref4.popupsBoundariesElement,
49
+ popupsScrollableElement = _ref4.popupsScrollableElement,
50
+ toolbarSize = _ref4.toolbarSize,
51
+ disabled = _ref4.disabled,
52
+ isToolbarReducedSpacing = _ref4.isToolbarReducedSpacing;
48
53
  var isSmall = toolbarSize < _types.ToolbarSize.L;
49
54
  return /*#__PURE__*/_react.default.createElement(PrimaryToolbarComponent, {
50
55
  featureFlags: featureFlags,
@@ -61,17 +66,17 @@ var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref,
61
66
  }
62
67
  };
63
68
  };
64
- function PrimaryToolbarComponent(_ref4) {
65
- var featureFlags = _ref4.featureFlags,
66
- popupsMountPoint = _ref4.popupsMountPoint,
67
- popupsBoundariesElement = _ref4.popupsBoundariesElement,
68
- popupsScrollableElement = _ref4.popupsScrollableElement,
69
- isSmall = _ref4.isSmall,
70
- isToolbarReducedSpacing = _ref4.isToolbarReducedSpacing,
71
- disabled = _ref4.disabled,
72
- editorView = _ref4.editorView,
73
- showIndentationButtons = _ref4.showIndentationButtons,
74
- pluginInjectionApi = _ref4.pluginInjectionApi;
69
+ function PrimaryToolbarComponent(_ref5) {
70
+ var featureFlags = _ref5.featureFlags,
71
+ popupsMountPoint = _ref5.popupsMountPoint,
72
+ popupsBoundariesElement = _ref5.popupsBoundariesElement,
73
+ popupsScrollableElement = _ref5.popupsScrollableElement,
74
+ isSmall = _ref5.isSmall,
75
+ isToolbarReducedSpacing = _ref5.isToolbarReducedSpacing,
76
+ disabled = _ref5.disabled,
77
+ editorView = _ref5.editorView,
78
+ showIndentationButtons = _ref5.showIndentationButtons,
79
+ pluginInjectionApi = _ref5.pluginInjectionApi;
75
80
  var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['list', 'toolbarListsIndentation']),
76
81
  listState = _useSharedPluginState.listState,
77
82
  toolbarListsIndentationState = _useSharedPluginState.toolbarListsIndentationState;
@@ -26,7 +26,7 @@ function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndenta
26
26
  // not use the indentation mark.
27
27
  // Check for lists before paragraphs and headings in case
28
28
  // the selection is in a list nested in a layout column.
29
- if (api !== null && api !== void 0 && api.dependencies.list.actions.isInsideListItem(editorState.tr)) {
29
+ if (api !== null && api !== void 0 && api.list.actions.isInsideListItem(editorState.tr)) {
30
30
  var _getListItemAttribute = (0, _lists.getListItemAttributes)(selection.$head),
31
31
  indentLevel = _getListItemAttribute.indentLevel,
32
32
  itemIndex = _getListItemAttribute.itemIndex;
@@ -14,10 +14,10 @@ var onItemActivated = function onItemActivated(pluginInjectionApi) {
14
14
  editorView = _ref.editorView;
15
15
  switch (buttonName) {
16
16
  case 'bullet_list':
17
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.commands.toggleBulletList(_analytics.INPUT_METHOD.TOOLBAR));
17
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.toggleBulletList(_analytics.INPUT_METHOD.TOOLBAR));
18
18
  break;
19
19
  case 'ordered_list':
20
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.commands.toggleOrderedList(_analytics.INPUT_METHOD.TOOLBAR));
20
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.toggleOrderedList(_analytics.INPUT_METHOD.TOOLBAR));
21
21
  break;
22
22
  case 'indent':
23
23
  {
@@ -27,7 +27,7 @@ var onItemActivated = function onItemActivated(pluginInjectionApi) {
27
27
  (0, _commands.getIndentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
28
28
  }
29
29
  if (node === 'list') {
30
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.commands.indentList(_analytics.INPUT_METHOD.TOOLBAR));
30
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.indentList(_analytics.INPUT_METHOD.TOOLBAR));
31
31
  }
32
32
  if (node === 'taskList') {
33
33
  (0, _keymaps.getIndentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
@@ -42,7 +42,7 @@ var onItemActivated = function onItemActivated(pluginInjectionApi) {
42
42
  (0, _commands.getOutdentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
43
43
  }
44
44
  if (_node === 'list') {
45
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.commands.outdentList(_analytics.INPUT_METHOD.TOOLBAR));
45
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.outdentList(_analytics.INPUT_METHOD.TOOLBAR));
46
46
  }
47
47
  if (_node === 'taskList') {
48
48
  (0, _keymaps.getUnindentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
@@ -127,7 +127,8 @@ var TypeAheadMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
127
127
  *
128
128
  *
129
129
  */
130
- var typeAheadPlugin = function typeAheadPlugin(options) {
130
+ var typeAheadPlugin = function typeAheadPlugin(_ref4) {
131
+ var options = _ref4.config;
131
132
  var fireAnalyticsCallback = (0, _analytics.fireAnalyticsEvent)(options === null || options === void 0 ? void 0 : options.createAnalyticsEvent);
132
133
  var popupMountRef = {
133
134
  current: null
@@ -146,9 +147,9 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
146
147
  var typeAhead = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
147
148
  return [{
148
149
  name: 'typeAhead',
149
- plugin: function plugin(_ref4) {
150
- var dispatch = _ref4.dispatch,
151
- getIntl = _ref4.getIntl;
150
+ plugin: function plugin(_ref5) {
151
+ var dispatch = _ref5.dispatch,
152
+ getIntl = _ref5.getIntl;
152
153
  return (0, _main.createPlugin)({
153
154
  getIntl: getIntl,
154
155
  popupMountRef: popupMountRef,
@@ -162,9 +163,9 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
162
163
  plugin: _insertItemPlugin.createPlugin
163
164
  }, {
164
165
  name: 'typeAheadInputRule',
165
- plugin: function plugin(_ref5) {
166
- var schema = _ref5.schema,
167
- featureFlags = _ref5.featureFlags;
166
+ plugin: function plugin(_ref6) {
167
+ var schema = _ref6.schema,
168
+ featureFlags = _ref6.featureFlags;
168
169
  return (0, _inputRules.inputRulePlugin)(schema, typeAhead, featureFlags);
169
170
  }
170
171
  }];
@@ -172,13 +173,13 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
172
173
  commands: {
173
174
  openTypeAheadAtCursor: _openTypeaheadAtCursor.openTypeAheadAtCursor
174
175
  },
175
- contentComponent: function contentComponent(_ref6) {
176
- var editorView = _ref6.editorView,
177
- containerElement = _ref6.containerElement,
178
- popupsMountPoint = _ref6.popupsMountPoint,
179
- popupsBoundariesElement = _ref6.popupsBoundariesElement,
180
- popupsScrollableElement = _ref6.popupsScrollableElement,
181
- wrapperElement = _ref6.wrapperElement;
176
+ contentComponent: function contentComponent(_ref7) {
177
+ var editorView = _ref7.editorView,
178
+ containerElement = _ref7.containerElement,
179
+ popupsMountPoint = _ref7.popupsMountPoint,
180
+ popupsBoundariesElement = _ref7.popupsBoundariesElement,
181
+ popupsScrollableElement = _ref7.popupsScrollableElement,
182
+ wrapperElement = _ref7.wrapperElement;
182
183
  popupMountRef.current = {
183
184
  popupsMountPoint: popupsMountPoint || wrapperElement || undefined,
184
185
  popupsBoundariesElement: popupsBoundariesElement,
@@ -188,8 +189,8 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
188
189
  plugins: {
189
190
  typeAheadState: _key.pluginKey
190
191
  },
191
- render: function render(_ref7) {
192
- var typeAheadState = _ref7.typeAheadState;
192
+ render: function render(_ref8) {
193
+ var typeAheadState = _ref8.typeAheadState;
193
194
  if (!typeAheadState) {
194
195
  return null;
195
196
  }
@@ -202,10 +203,10 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
202
203
  }
203
204
  });
204
205
  },
205
- onEditorViewStateUpdated: function onEditorViewStateUpdated(_ref8) {
206
- var originalTransaction = _ref8.originalTransaction,
207
- oldEditorState = _ref8.oldEditorState,
208
- newEditorState = _ref8.newEditorState;
206
+ onEditorViewStateUpdated: function onEditorViewStateUpdated(_ref9) {
207
+ var originalTransaction = _ref9.originalTransaction,
208
+ oldEditorState = _ref9.oldEditorState,
209
+ newEditorState = _ref9.newEditorState;
209
210
  var oldPluginState = (0, _utils.getPluginState)(oldEditorState);
210
211
  var newPluginState = (0, _utils.getPluginState)(newEditorState);
211
212
  if (!oldPluginState || !newPluginState) {
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2;
24
24
  // AFP-2532 TODO: Fix automatic suppressions below
25
25
  // eslint-disable-next-line @atlassian/tangerine/import/entry-points
26
26
  var InsertMenu = function InsertMenu(_ref) {
27
- var _pluginInjectionApi$d10, _pluginInjectionApi$d11, _pluginInjectionApi$d12, _pluginInjectionApi$d13;
27
+ var _pluginInjectionApi$q10, _pluginInjectionApi$q11, _pluginInjectionApi$q12, _pluginInjectionApi$q13;
28
28
  var editorView = _ref.editorView,
29
29
  dropdownItems = _ref.dropdownItems,
30
30
  showElementBrowserLink = _ref.showElementBrowserLink,
@@ -62,12 +62,12 @@ var InsertMenu = function InsertMenu(_ref) {
62
62
  var quickInsertDropdownItems = dropdownItems.map(transform);
63
63
  var viewMoreItem = showElementBrowserLink ? quickInsertDropdownItems.pop() : undefined;
64
64
  var onInsertItem = (0, _react.useCallback)(function (item) {
65
- var _pluginInjectionApi$d;
65
+ var _pluginInjectionApi$q;
66
66
  toggleVisiblity();
67
67
  if (!editorView.hasFocus()) {
68
68
  editorView.focus();
69
69
  }
70
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.actions.insertItem(item)(editorView.state, editorView.dispatch);
70
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q === void 0 ? void 0 : _pluginInjectionApi$q.actions.insertItem(item)(editorView.state, editorView.dispatch);
71
71
  }, [editorView, toggleVisiblity, pluginInjectionApi]);
72
72
  var getItems = (0, _react.useCallback)(function (query, category) {
73
73
  var result;
@@ -78,25 +78,25 @@ var InsertMenu = function InsertMenu(_ref) {
78
78
  * @see above transform function for more details.
79
79
  */
80
80
  if (query) {
81
- var _pluginInjectionApi$d2, _pluginInjectionApi$d3, _pluginInjectionApi$d4, _pluginInjectionApi$d5;
82
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d2 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.commands.search({
81
+ var _pluginInjectionApi$q2, _pluginInjectionApi$q3, _pluginInjectionApi$q4, _pluginInjectionApi$q5;
82
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q2 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q2 === void 0 ? void 0 : _pluginInjectionApi$q2.commands.search({
83
83
  query: query,
84
84
  category: category
85
85
  }));
86
- result = (_pluginInjectionApi$d3 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d4 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d4 === void 0 ? void 0 : (_pluginInjectionApi$d5 = _pluginInjectionApi$d4.sharedState.currentState()) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : _pluginInjectionApi$d5.suggestions) !== null && _pluginInjectionApi$d3 !== void 0 ? _pluginInjectionApi$d3 : [];
86
+ result = (_pluginInjectionApi$q3 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q4 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q4 === void 0 ? void 0 : (_pluginInjectionApi$q5 = _pluginInjectionApi$q4.sharedState.currentState()) === null || _pluginInjectionApi$q5 === void 0 ? void 0 : _pluginInjectionApi$q5.suggestions) !== null && _pluginInjectionApi$q3 !== void 0 ? _pluginInjectionApi$q3 : [];
87
87
  } else {
88
- var _pluginInjectionApi$d6, _pluginInjectionApi$d7, _pluginInjectionApi$d8, _pluginInjectionApi$d9;
89
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d6 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d6 === void 0 ? void 0 : _pluginInjectionApi$d6.commands.search({
88
+ var _pluginInjectionApi$q6, _pluginInjectionApi$q7, _pluginInjectionApi$q8, _pluginInjectionApi$q9;
89
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q6 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q6 === void 0 ? void 0 : _pluginInjectionApi$q6.commands.search({
90
90
  category: category,
91
91
  featuredItems: true
92
92
  }));
93
- var featuredQuickInsertSuggestions = (_pluginInjectionApi$d7 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d8 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d8 === void 0 ? void 0 : (_pluginInjectionApi$d9 = _pluginInjectionApi$d8.sharedState.currentState()) === null || _pluginInjectionApi$d9 === void 0 ? void 0 : _pluginInjectionApi$d9.suggestions) !== null && _pluginInjectionApi$d7 !== void 0 ? _pluginInjectionApi$d7 : [];
93
+ var featuredQuickInsertSuggestions = (_pluginInjectionApi$q7 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q8 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q8 === void 0 ? void 0 : (_pluginInjectionApi$q9 = _pluginInjectionApi$q8.sharedState.currentState()) === null || _pluginInjectionApi$q9 === void 0 ? void 0 : _pluginInjectionApi$q9.suggestions) !== null && _pluginInjectionApi$q7 !== void 0 ? _pluginInjectionApi$q7 : [];
94
94
  result = quickInsertDropdownItems.concat(featuredQuickInsertSuggestions);
95
95
  }
96
96
  setItemCount(result.length);
97
97
  return result;
98
- }, [pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d10 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d10 === void 0 ? void 0 : _pluginInjectionApi$d10.commands, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d11 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d11 === void 0 ? void 0 : _pluginInjectionApi$d11.sharedState, quickInsertDropdownItems]);
99
- var emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d12 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d12 === void 0 ? void 0 : (_pluginInjectionApi$d13 = _pluginInjectionApi$d12.sharedState.currentState()) === null || _pluginInjectionApi$d13 === void 0 ? void 0 : _pluginInjectionApi$d13.emptyStateHandler;
98
+ }, [pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q10 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q10 === void 0 ? void 0 : _pluginInjectionApi$q10.commands, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q11 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q11 === void 0 ? void 0 : _pluginInjectionApi$q11.sharedState, quickInsertDropdownItems]);
99
+ var emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q12 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q12 === void 0 ? void 0 : (_pluginInjectionApi$q13 = _pluginInjectionApi$q12.sharedState.currentState()) === null || _pluginInjectionApi$q13 === void 0 ? void 0 : _pluginInjectionApi$q13.emptyStateHandler;
100
100
  return (0, _react2.jsx)("div", {
101
101
  css: function css(theme) {
102
102
  return insertMenuWrapper(theme, itemCount);
@@ -108,7 +108,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
108
108
  jiraIssueCollectorScriptLoading: true,
109
109
  showOptOutOption: false
110
110
  });
111
- basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.dependencies.base.sharedState.currentState();
111
+ basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.base.sharedState.currentState();
112
112
  sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
113
113
  contentId = basePluginState === null || basePluginState === void 0 ? void 0 : (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
114
114
  tabId = window.sessionStorage['awc.tab.id'];
@@ -27,8 +27,8 @@ var _context = require("./presets/context");
27
27
  * , []);
28
28
  *
29
29
  * // Can execute typesafe commands based on plugin1 or 2
30
- * const runCommand = () => editorApi.dependencies.core.actions.execute(
31
- * editorApi.dependencies.plugin1.commands.doSomething()
30
+ * const runCommand = () => editorApi.core.actions.execute(
31
+ * editorApi.plugin1.commands.doSomething()
32
32
  * )
33
33
  * return (
34
34
  * <>
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "187.31.6";
9
+ var version = "187.32.0";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -401,7 +401,7 @@ export class ReactEditorView extends React.Component {
401
401
  var _this$pluginInjection, _this$experienceStore10;
402
402
  const nodes = getNodesCount(this.view.state.doc);
403
403
  const ttfb = getResponseEndTime();
404
- const contextIdentifier = (_this$pluginInjection = this.pluginInjectionAPI.api().dependencies.base) === null || _this$pluginInjection === void 0 ? void 0 : _this$pluginInjection.sharedState.currentState();
404
+ const contextIdentifier = (_this$pluginInjection = this.pluginInjectionAPI.api().base) === null || _this$pluginInjection === void 0 ? void 0 : _this$pluginInjection.sharedState.currentState();
405
405
  this.dispatchAnalyticsEvent({
406
406
  action: ACTION.PROSEMIRROR_RENDERED,
407
407
  actionSubject: ACTION_SUBJECT.EDITOR,
@@ -9,19 +9,19 @@ function createPlugin(options, featureFlags, pluginInjectionApi) {
9
9
  }
10
10
  const hasRequiredPerformanceAPIs = isPerformanceAPIAvailable();
11
11
  const getCreateAnalyticsEvent = () => {
12
- var _pluginInjectionApi$d, _pluginInjectionApi$d2;
13
- return pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.sharedState.currentState()) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.createAnalyticsEvent;
12
+ var _pluginInjectionApi$a, _pluginInjectionApi$a2;
13
+ return pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : (_pluginInjectionApi$a2 = _pluginInjectionApi$a.sharedState.currentState()) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.createAnalyticsEvent;
14
14
  };
15
15
  return new SafePlugin({
16
16
  key: analyticsPluginKey,
17
17
  state: {
18
18
  init: () => {
19
- var _pluginInjectionApi$d3;
19
+ var _pluginInjectionApi$a3;
20
20
  return {
21
21
  ...options,
22
22
  createAnalyticsEvent: getCreateAnalyticsEvent(),
23
23
  fireAnalytics: fireAnalyticsEvent(options.createAnalyticsEvent),
24
- editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d3 = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d3 === void 0 ? void 0 : _pluginInjectionApi$d3.actions
24
+ editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a3 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a3 === void 0 ? void 0 : _pluginInjectionApi$a3.actions
25
25
  };
26
26
  },
27
27
  apply: (tr, pluginState, _, state) => {
@@ -77,15 +77,18 @@ function createPlugin(options, featureFlags, pluginInjectionApi) {
77
77
  * Do not use this analytics plugin.
78
78
  * This will be deprecated soon.
79
79
  */
80
- const analyticsPlugin = (options, api) => {
81
- var _api$dependencies$fea;
82
- const featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies$fea = api.dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
80
+ const analyticsPlugin = ({
81
+ config: options,
82
+ api
83
+ }) => {
84
+ var _api$featureFlags;
85
+ const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
83
86
  return {
84
87
  name: 'deprecatedAnalytics',
85
88
  pmPlugins() {
86
89
  return [{
87
90
  name: 'analyticsPlugin',
88
- plugin: () => createPlugin(options, featureFlags, api)
91
+ plugin: () => createPlugin(options !== null && options !== void 0 ? options : {}, featureFlags, api)
89
92
  }];
90
93
  }
91
94
  };
@@ -7,7 +7,10 @@ import { getPluginState } from './utils';
7
7
  import { buildToolbar } from './toolbar';
8
8
  import { InlineCommentView } from './ui/InlineCommentView';
9
9
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
10
- const annotationPlugin = (annotationProviders, api) => {
10
+ const annotationPlugin = ({
11
+ config: annotationProviders,
12
+ api
13
+ }) => {
11
14
  return {
12
15
  name: 'annotation',
13
16
  marks() {
@@ -1,8 +1,11 @@
1
1
  import React from 'react';
2
2
  import AvatarGroupPluginWrapper from './ui/AvatarGroupPluginWrapper';
3
- const avatarGroup = (props, api) => {
4
- var _api$dependencies, _api$dependencies$fea;
5
- const featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies = api.dependencies) === null || _api$dependencies === void 0 ? void 0 : (_api$dependencies$fea = _api$dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
3
+ const avatarGroup = ({
4
+ config: props,
5
+ api
6
+ }) => {
7
+ var _api$featureFlags;
8
+ const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
6
9
  return {
7
10
  name: 'avatarGroup',
8
11
  primaryToolbarComponent({
@@ -19,8 +22,8 @@ const avatarGroup = (props, api) => {
19
22
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
20
23
  editorView: editorView,
21
24
  eventDispatcher: eventDispatcher,
22
- collabEdit: props.collabEdit,
23
- takeFullWidth: props.takeFullWidth,
25
+ collabEdit: props === null || props === void 0 ? void 0 : props.collabEdit,
26
+ takeFullWidth: props === null || props === void 0 ? void 0 : props.takeFullWidth,
24
27
  featureFlags: featureFlags
25
28
  });
26
29
  }
@@ -14,9 +14,12 @@ import { keymap } from '@atlaskit/editor-common/keymaps';
14
14
  import frozenEditor from './pm-plugins/frozen-editor';
15
15
  // Chrome >= 88
16
16
  export const isChromeWithSelectionBug = browser.chrome && browser.chrome_version >= 88;
17
- const basePlugin = (options, api) => {
18
- var _api$dependencies, _api$dependencies$fea;
19
- const featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies = api.dependencies) === null || _api$dependencies === void 0 ? void 0 : (_api$dependencies$fea = _api$dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
17
+ const basePlugin = ({
18
+ config: options,
19
+ api
20
+ }) => {
21
+ var _api$featureFlags;
22
+ const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
20
23
  return {
21
24
  name: 'base',
22
25
  getSharedState(editorState) {
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  import { BeforePrimaryToolbarWrapper } from './ui/BeforePrimaryToolbarWrapper';
3
- const beforePrimaryToolbar = props => ({
3
+ const beforePrimaryToolbar = ({
4
+ config: props
5
+ }) => ({
4
6
  name: 'beforePrimaryToolbar',
5
7
  primaryToolbarComponent() {
6
8
  return /*#__PURE__*/React.createElement(BeforePrimaryToolbarWrapper, {
7
- beforePrimaryToolbarComponents: props.beforePrimaryToolbarComponents
9
+ beforePrimaryToolbarComponents: props === null || props === void 0 ? void 0 : props.beforePrimaryToolbarComponents
8
10
  });
9
11
  }
10
12
  });
@@ -81,7 +81,10 @@ const blockquotePluginOptions = ({
81
81
  }
82
82
  }];
83
83
  };
84
- const blockTypePlugin = (options, api) => ({
84
+ const blockTypePlugin = ({
85
+ config: options,
86
+ api
87
+ }) => ({
85
88
  name: 'blockType',
86
89
  nodes() {
87
90
  const nodes = [{
@@ -106,8 +109,8 @@ const blockTypePlugin = (options, api) => ({
106
109
  plugin: ({
107
110
  dispatch
108
111
  }) => {
109
- var _api$dependencies$ana;
110
- return createPlugin(api === null || api === void 0 ? void 0 : (_api$dependencies$ana = api.dependencies.analytics) === null || _api$dependencies$ana === void 0 ? void 0 : _api$dependencies$ana.actions, dispatch, options && options.lastNodeMustBeParagraph);
112
+ var _api$analytics;
113
+ return createPlugin(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, dispatch, options && options.lastNodeMustBeParagraph);
111
114
  }
112
115
  }, {
113
116
  name: 'blockTypeInputRule',
@@ -115,8 +118,8 @@ const blockTypePlugin = (options, api) => ({
115
118
  schema,
116
119
  featureFlags
117
120
  }) => {
118
- var _api$dependencies$ana2;
119
- return inputRulePlugin(api === null || api === void 0 ? void 0 : (_api$dependencies$ana2 = api.dependencies.analytics) === null || _api$dependencies$ana2 === void 0 ? void 0 : _api$dependencies$ana2.actions, schema, featureFlags);
121
+ var _api$analytics2;
122
+ return inputRulePlugin(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, schema, featureFlags);
120
123
  }
121
124
  },
122
125
  // Needs to be lower priority than editor-tables.tableEditing
@@ -127,8 +130,8 @@ const blockTypePlugin = (options, api) => ({
127
130
  schema,
128
131
  featureFlags
129
132
  }) => {
130
- var _api$dependencies$ana3;
131
- return keymapPlugin(api === null || api === void 0 ? void 0 : (_api$dependencies$ana3 = api.dependencies.analytics) === null || _api$dependencies$ana3 === void 0 ? void 0 : _api$dependencies$ana3.actions, schema, featureFlags);
133
+ var _api$analytics3;
134
+ return keymapPlugin(api === null || api === void 0 ? void 0 : (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions, schema, featureFlags);
132
135
  }
133
136
  }];
134
137
  },
@@ -144,8 +147,8 @@ const blockTypePlugin = (options, api) => ({
144
147
  }) {
145
148
  const isSmall = options && options.isUndoRedoButtonsEnabled ? toolbarSize < ToolbarSize.XXL : toolbarSize < ToolbarSize.XL;
146
149
  const boundSetBlockType = name => {
147
- var _api$dependencies$ana4;
148
- return setBlockTypeWithAnalytics(name, INPUT_METHOD.TOOLBAR, api === null || api === void 0 ? void 0 : (_api$dependencies$ana4 = api.dependencies.analytics) === null || _api$dependencies$ana4 === void 0 ? void 0 : _api$dependencies$ana4.actions)(editorView.state, editorView.dispatch);
150
+ var _api$analytics4;
151
+ return setBlockTypeWithAnalytics(name, INPUT_METHOD.TOOLBAR, api === null || api === void 0 ? void 0 : (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions)(editorView.state, editorView.dispatch);
149
152
  };
150
153
  return /*#__PURE__*/React.createElement(WithPluginState, {
151
154
  editorView: editorView,
@@ -171,9 +174,9 @@ const blockTypePlugin = (options, api) => ({
171
174
  },
172
175
  pluginsOptions: {
173
176
  quickInsert: intl => {
174
- var _api$dependencies$ana5, _api$dependencies$ana6;
177
+ var _api$analytics5, _api$analytics6;
175
178
  const exclude = options && options.allowBlockType && options.allowBlockType.exclude ? options.allowBlockType.exclude : [];
176
- return [...blockquotePluginOptions(intl, exclude.indexOf('blockquote') === -1, api === null || api === void 0 ? void 0 : (_api$dependencies$ana5 = api.dependencies.analytics) === null || _api$dependencies$ana5 === void 0 ? void 0 : _api$dependencies$ana5.actions), ...headingPluginOptions(intl, exclude.indexOf('heading') === -1, api === null || api === void 0 ? void 0 : (_api$dependencies$ana6 = api.dependencies.analytics) === null || _api$dependencies$ana6 === void 0 ? void 0 : _api$dependencies$ana6.actions)];
179
+ return [...blockquotePluginOptions(intl, exclude.indexOf('blockquote') === -1, api === null || api === void 0 ? void 0 : (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions), ...headingPluginOptions(intl, exclude.indexOf('heading') === -1, api === null || api === void 0 ? void 0 : (_api$analytics6 = api.analytics) === null || _api$analytics6 === void 0 ? void 0 : _api$analytics6.actions)];
177
180
  }
178
181
  }
179
182
  });
@@ -80,10 +80,10 @@ class BreakoutView {
80
80
  this.mark = mark;
81
81
  this.view = view;
82
82
  this.contentDOM = contentDOM;
83
- this.unsubscribe = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.width.sharedState.onChange(({
83
+ this.unsubscribe = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.width.sharedState.onChange(({
84
84
  nextSharedState
85
85
  }) => this.updateWidth(nextSharedState));
86
- this.updateWidth(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.width.sharedState.currentState());
86
+ this.updateWidth(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.width.sharedState.currentState());
87
87
  }
88
88
  // NOTE: Lifecycle events doesn't work for mark NodeView. So currently this is a no-op.
89
89
  // @see https://github.com/ProseMirror/prosemirror/issues/1082
@@ -155,7 +155,10 @@ const LayoutButtonWrapper = ({
155
155
  node: (_breakoutState$breako = breakoutState === null || breakoutState === void 0 ? void 0 : (_breakoutState$breako2 = breakoutState.breakoutNode) === null || _breakoutState$breako2 === void 0 ? void 0 : _breakoutState$breako2.node) !== null && _breakoutState$breako !== void 0 ? _breakoutState$breako : null
156
156
  });
157
157
  };
158
- const breakoutPlugin = (options, api) => ({
158
+ const breakoutPlugin = ({
159
+ config: options,
160
+ api
161
+ }) => ({
159
162
  name: 'breakout',
160
163
  pmPlugins() {
161
164
  return [{
@@ -1,7 +1,9 @@
1
1
  import { caption } from '@atlaskit/adf-schema';
2
2
  import { default as createCaptionPlugin } from './pm-plugins/main';
3
3
  import { captionKeymap } from './pm-plugins/keymap';
4
- const captionPlugin = (_, api) => {
4
+ const captionPlugin = ({
5
+ api
6
+ }) => {
5
7
  return {
6
8
  name: 'caption',
7
9
  nodes() {
@@ -12,8 +12,8 @@ const fireAnalytics = (tr, action, analyticsApi) => {
12
12
  })(tr);
13
13
  };
14
14
  export default ((portalProviderAPI, eventDispatcher, providerFactory, dispatch, pluginInjectionApi) => {
15
- var _pluginInjectionApi$d;
16
- const analyticsApi = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.actions;
15
+ var _pluginInjectionApi$a;
16
+ const analyticsApi = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
17
17
  return new SafePlugin({
18
18
  appendTransaction(transactions, oldState, newState) {
19
19
  // only run for transactions that change selection