@atlaskit/editor-core 187.18.1 → 187.19.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 (113) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/labs/next/presets/default.js +2 -1
  3. package/dist/cjs/labs/next/presets/universal.js +2 -1
  4. package/dist/cjs/plugins/base/index.js +0 -7
  5. package/dist/cjs/plugins/code-block/index.js +1 -1
  6. package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +98 -95
  7. package/dist/cjs/plugins/composition/index.js +33 -0
  8. package/dist/cjs/plugins/{base/pm-plugins/composition.js → composition/pm-plugins/main.js} +8 -14
  9. package/dist/cjs/plugins/{image-upload → composition}/pm-plugins/plugin-key.js +3 -3
  10. package/dist/cjs/plugins/index.js +0 -7
  11. package/dist/cjs/plugins/paste/pm-plugins/main.js +2 -6
  12. package/dist/cjs/plugins/placeholder/index.js +2 -2
  13. package/dist/cjs/utils/clipboard.js +5 -27
  14. package/dist/cjs/version-wrapper.js +1 -1
  15. package/dist/cjs/version.json +1 -1
  16. package/dist/es2019/labs/next/presets/default.js +2 -1
  17. package/dist/es2019/labs/next/presets/universal.js +2 -1
  18. package/dist/es2019/plugins/base/index.js +0 -5
  19. package/dist/es2019/plugins/code-block/index.js +1 -1
  20. package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +107 -104
  21. package/dist/es2019/plugins/composition/index.js +23 -0
  22. package/dist/es2019/plugins/{base/pm-plugins/composition.js → composition/pm-plugins/main.js} +7 -12
  23. package/dist/es2019/plugins/{image-upload → composition}/pm-plugins/plugin-key.js +1 -1
  24. package/dist/es2019/plugins/index.js +0 -1
  25. package/dist/es2019/plugins/paste/pm-plugins/main.js +2 -2
  26. package/dist/es2019/plugins/placeholder/index.js +2 -2
  27. package/dist/es2019/utils/clipboard.js +0 -16
  28. package/dist/es2019/version-wrapper.js +1 -1
  29. package/dist/es2019/version.json +1 -1
  30. package/dist/esm/labs/next/presets/default.js +2 -1
  31. package/dist/esm/labs/next/presets/universal.js +2 -1
  32. package/dist/esm/plugins/base/index.js +0 -7
  33. package/dist/esm/plugins/code-block/index.js +1 -1
  34. package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +98 -95
  35. package/dist/esm/plugins/composition/index.js +25 -0
  36. package/dist/esm/plugins/{base/pm-plugins/composition.js → composition/pm-plugins/main.js} +7 -12
  37. package/dist/esm/plugins/{image-upload → composition}/pm-plugins/plugin-key.js +1 -1
  38. package/dist/esm/plugins/index.js +0 -1
  39. package/dist/esm/plugins/paste/pm-plugins/main.js +2 -2
  40. package/dist/esm/plugins/placeholder/index.js +2 -2
  41. package/dist/esm/utils/clipboard.js +4 -23
  42. package/dist/esm/version-wrapper.js +1 -1
  43. package/dist/esm/version.json +1 -1
  44. package/dist/types/labs/next/presets/default.d.ts +16 -0
  45. package/dist/types/plugins/code-block/index.d.ts +6 -4
  46. package/dist/types/plugins/code-block/pm-plugins/ide-ux.d.ts +4 -2
  47. package/dist/types/plugins/composition/index.d.ts +8 -0
  48. package/dist/types/plugins/composition/pm-plugins/main.d.ts +4 -0
  49. package/dist/types/plugins/composition/pm-plugins/plugin-key.d.ts +6 -0
  50. package/dist/types/plugins/index.d.ts +0 -1
  51. package/dist/types/plugins/insert-block/index.d.ts +1 -1
  52. package/dist/types/plugins/placeholder/index.d.ts +2 -1
  53. package/dist/types/utils/clipboard.d.ts +0 -3
  54. package/dist/types-ts4.5/labs/next/presets/default.d.ts +20 -0
  55. package/dist/types-ts4.5/plugins/code-block/index.d.ts +6 -4
  56. package/dist/types-ts4.5/plugins/code-block/pm-plugins/ide-ux.d.ts +4 -2
  57. package/dist/types-ts4.5/plugins/composition/index.d.ts +8 -0
  58. package/dist/types-ts4.5/plugins/composition/pm-plugins/main.d.ts +4 -0
  59. package/dist/types-ts4.5/plugins/composition/pm-plugins/plugin-key.d.ts +6 -0
  60. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  61. package/dist/types-ts4.5/plugins/insert-block/index.d.ts +1 -1
  62. package/dist/types-ts4.5/plugins/placeholder/index.d.ts +3 -1
  63. package/dist/types-ts4.5/utils/clipboard.d.ts +0 -3
  64. package/package.json +4 -3
  65. package/dist/cjs/plugins/image-upload/index.js +0 -45
  66. package/dist/cjs/plugins/image-upload/pm-plugins/actions.js +0 -19
  67. package/dist/cjs/plugins/image-upload/pm-plugins/commands-toolbar.js +0 -19
  68. package/dist/cjs/plugins/image-upload/pm-plugins/commands.js +0 -40
  69. package/dist/cjs/plugins/image-upload/pm-plugins/input-rule.js +0 -31
  70. package/dist/cjs/plugins/image-upload/pm-plugins/main.js +0 -194
  71. package/dist/cjs/plugins/image-upload/types.js +0 -5
  72. package/dist/cjs/plugins/image-upload/utils.js +0 -40
  73. package/dist/cjs/utils/drag-drop.js +0 -19
  74. package/dist/es2019/plugins/image-upload/index.js +0 -34
  75. package/dist/es2019/plugins/image-upload/pm-plugins/actions.js +0 -8
  76. package/dist/es2019/plugins/image-upload/pm-plugins/commands-toolbar.js +0 -12
  77. package/dist/es2019/plugins/image-upload/pm-plugins/commands.js +0 -28
  78. package/dist/es2019/plugins/image-upload/pm-plugins/input-rule.js +0 -25
  79. package/dist/es2019/plugins/image-upload/pm-plugins/main.js +0 -159
  80. package/dist/es2019/plugins/image-upload/types.js +0 -1
  81. package/dist/es2019/plugins/image-upload/utils.js +0 -38
  82. package/dist/es2019/utils/drag-drop.js +0 -9
  83. package/dist/esm/plugins/image-upload/index.js +0 -37
  84. package/dist/esm/plugins/image-upload/pm-plugins/actions.js +0 -12
  85. package/dist/esm/plugins/image-upload/pm-plugins/commands-toolbar.js +0 -12
  86. package/dist/esm/plugins/image-upload/pm-plugins/commands.js +0 -32
  87. package/dist/esm/plugins/image-upload/pm-plugins/input-rule.js +0 -23
  88. package/dist/esm/plugins/image-upload/pm-plugins/main.js +0 -186
  89. package/dist/esm/plugins/image-upload/types.js +0 -1
  90. package/dist/esm/plugins/image-upload/utils.js +0 -31
  91. package/dist/esm/utils/drag-drop.js +0 -11
  92. package/dist/types/plugins/base/pm-plugins/composition.d.ts +0 -9
  93. package/dist/types/plugins/image-upload/index.d.ts +0 -16
  94. package/dist/types/plugins/image-upload/pm-plugins/actions.d.ts +0 -3
  95. package/dist/types/plugins/image-upload/pm-plugins/commands-toolbar.d.ts +0 -3
  96. package/dist/types/plugins/image-upload/pm-plugins/commands.d.ts +0 -5
  97. package/dist/types/plugins/image-upload/pm-plugins/input-rule.d.ts +0 -5
  98. package/dist/types/plugins/image-upload/pm-plugins/main.d.ts +0 -4
  99. package/dist/types/plugins/image-upload/pm-plugins/plugin-key.d.ts +0 -3
  100. package/dist/types/plugins/image-upload/types.d.ts +0 -18
  101. package/dist/types/plugins/image-upload/utils.d.ts +0 -5
  102. package/dist/types/utils/drag-drop.d.ts +0 -2
  103. package/dist/types-ts4.5/plugins/base/pm-plugins/composition.d.ts +0 -9
  104. package/dist/types-ts4.5/plugins/image-upload/index.d.ts +0 -16
  105. package/dist/types-ts4.5/plugins/image-upload/pm-plugins/actions.d.ts +0 -3
  106. package/dist/types-ts4.5/plugins/image-upload/pm-plugins/commands-toolbar.d.ts +0 -3
  107. package/dist/types-ts4.5/plugins/image-upload/pm-plugins/commands.d.ts +0 -5
  108. package/dist/types-ts4.5/plugins/image-upload/pm-plugins/input-rule.d.ts +0 -5
  109. package/dist/types-ts4.5/plugins/image-upload/pm-plugins/main.d.ts +0 -4
  110. package/dist/types-ts4.5/plugins/image-upload/pm-plugins/plugin-key.d.ts +0 -3
  111. package/dist/types-ts4.5/plugins/image-upload/types.d.ts +0 -18
  112. package/dist/types-ts4.5/plugins/image-upload/utils.d.ts +0 -5
  113. package/dist/types-ts4.5/utils/drag-drop.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 187.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`7cb6ec49e68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7cb6ec49e68) - Decouple `composition` plugin from `base` plugin
8
+
9
+ ## 187.18.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`079e7748c62`](https://bitbucket.org/atlassian/atlassian-frontend/commits/079e7748c62) - Extracted `editor-plugin-image-upload` from `editor-core`.
14
+ - Updated dependencies
15
+
3
16
  ## 187.18.1
4
17
 
5
18
  ### Patch Changes
@@ -26,6 +26,7 @@ var _plugins = require("../../../plugins");
26
26
  var _editorPluginAnalytics = require("@atlaskit/editor-plugin-analytics");
27
27
  var _placeholder = _interopRequireDefault(require("../../../plugins/placeholder"));
28
28
  var _annotation = _interopRequireDefault(require("../../../plugins/annotation"));
29
+ var _composition = _interopRequireDefault(require("../../../plugins/composition"));
29
30
  var _quickInsert = _interopRequireDefault(require("../../../plugins/quick-insert"));
30
31
  var _selection = _interopRequireDefault(require("../../../plugins/selection"));
31
32
  var _codeBlock = _interopRequireDefault(require("../../../plugins/code-block"));
@@ -61,7 +62,7 @@ function createDefaultPreset(options) {
61
62
  }]);
62
63
  }
63
64
  return builder;
64
- }).add([_paste.default, options.paste]).add(_clipboard.default).add(_editorPluginFocus.focusPlugin).add([_base.default, options.base]).add(_editorPluginDecorations.decorationsPlugin).maybeAdd(_undoRedo.default, function (p, builder) {
65
+ }).add([_paste.default, options.paste]).add(_clipboard.default).add(_editorPluginFocus.focusPlugin).add(_composition.default).add([_base.default, options.base]).add(_editorPluginDecorations.decorationsPlugin).maybeAdd(_undoRedo.default, function (p, builder) {
65
66
  var _options$featureFlags;
66
67
  // The undo redo plugin needs to be add before the blockTypePlugin
67
68
  if ((_options$featureFlags = options.featureFlags) !== null && _options$featureFlags !== void 0 && _options$featureFlags.undoRedoButtons) {
@@ -9,6 +9,7 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _api = require("../../../selection-api/api");
11
11
  var _plugins = require("../../../plugins");
12
+ var _editorPluginImageUpload = require("@atlaskit/editor-plugin-image-upload");
12
13
  var _editorPluginGuideline = require("@atlaskit/editor-plugin-guideline");
13
14
  var _editorPluginContextPanel = require("@atlaskit/editor-plugin-context-panel");
14
15
  var _editorPluginGrid = require("@atlaskit/editor-plugin-grid");
@@ -183,7 +184,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
183
184
  return builder.add([plugin, props.onSave]);
184
185
  }
185
186
  return builder;
186
- }).maybeAdd(_plugins.imageUploadPlugin, function (plugin, builder) {
187
+ }).maybeAdd(_editorPluginImageUpload.imageUploadPlugin, function (plugin, builder) {
187
188
  if (props.legacyImageUploadProvider) {
188
189
  return builder.add(plugin);
189
190
  }
@@ -19,7 +19,6 @@ var _inlineCursorTarget = _interopRequireDefault(require("./pm-plugins/inline-cu
19
19
  var _scrollGutter = _interopRequireDefault(require("./pm-plugins/scroll-gutter"));
20
20
  var _keymaps = require("@atlaskit/editor-common/keymaps");
21
21
  var _frozenEditor = _interopRequireDefault(require("./pm-plugins/frozen-editor"));
22
- var _composition = _interopRequireDefault(require("./pm-plugins/composition"));
23
22
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
24
23
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
25
24
  // Chrome >= 88
@@ -112,12 +111,6 @@ var basePlugin = function basePlugin(options, api) {
112
111
  return (0, _disableSpellChecking.default)(featureFlags);
113
112
  }
114
113
  });
115
- plugins.push({
116
- name: 'compositionPlugin',
117
- plugin: function plugin() {
118
- return (0, _composition.default)();
119
- }
120
- });
121
114
  return plugins;
122
115
  },
123
116
  nodes: function nodes() {
@@ -44,7 +44,7 @@ var codeBlockPlugin = function codeBlockPlugin(options, api) {
44
44
  }, {
45
45
  name: 'codeBlockIDEKeyBindings',
46
46
  plugin: function plugin() {
47
- return _ideUx.default;
47
+ return (0, _ideUx.default)(api);
48
48
  }
49
49
  }, {
50
50
  name: 'codeBlockKeyMap',
@@ -15,113 +15,116 @@ var _bracketHandling = require("../ide-ux/bracket-handling");
15
15
  var _quoteHandling = require("../ide-ux/quote-handling");
16
16
  var _lineHandling = require("../ide-ux/line-handling");
17
17
  var _commands = require("../ide-ux/commands");
18
- var _composition = require("../../base/pm-plugins/composition");
19
- var _default = new _safePlugin.SafePlugin({
20
- props: {
21
- handleTextInput: function handleTextInput(view, from, to, text) {
22
- var state = view.state,
23
- dispatch = view.dispatch;
24
- if ((0, _lineHandling.isCursorInsideCodeBlock)(state) && !(0, _composition.isComposing)(state)) {
25
- var beforeText = (0, _lineHandling.getStartOfCurrentLine)(state).text;
26
- var afterText = (0, _lineHandling.getEndOfCurrentLine)(state).text;
27
-
28
- // If text is a closing bracket/quote and we've already inserted it, move the selection after
29
- if ((0, _pairedCharacterHandling.isCursorBeforeClosingCharacter)(afterText) && (0, _pairedCharacterHandling.isClosingCharacter)(text) && afterText.startsWith(text)) {
30
- dispatch((0, _utils.setTextSelection)(to + text.length)(state.tr));
31
- return true;
32
- }
33
-
34
- // Automatically add right-hand side bracket when user types the left bracket
35
- if ((0, _bracketHandling.shouldAutoCloseBracket)(beforeText, afterText)) {
36
- var _getAutoClosingBracke = (0, _bracketHandling.getAutoClosingBracketInfo)(beforeText + text, afterText),
37
- left = _getAutoClosingBracke.left,
38
- right = _getAutoClosingBracke.right;
39
- if (left && right) {
40
- var bracketPair = state.schema.text(text + right);
41
- var tr = state.tr.replaceWith(from, to, bracketPair);
42
- dispatch((0, _utils.setTextSelection)(from + text.length)(tr));
43
- return true;
44
- }
45
- }
46
-
47
- // Automatically add closing quote when user types a starting quote
48
- if ((0, _quoteHandling.shouldAutoCloseQuote)(beforeText, afterText)) {
49
- var _getAutoClosingQuoteI = (0, _quoteHandling.getAutoClosingQuoteInfo)(beforeText + text, afterText),
50
- leftQuote = _getAutoClosingQuoteI.left,
51
- rightQuote = _getAutoClosingQuoteI.right;
52
- if (leftQuote && rightQuote) {
53
- var quotePair = state.schema.text(text + rightQuote);
54
- var _tr = state.tr.replaceWith(from, to, quotePair);
55
- dispatch((0, _utils.setTextSelection)(from + text.length)(_tr));
56
- return true;
57
- }
58
- }
59
- }
60
- return false;
61
- },
62
- handleKeyDown: (0, _keymap.keydownHandler)({
63
- Backspace: function Backspace(state, dispatch) {
64
- if ((0, _lineHandling.isCursorInsideCodeBlock)(state)) {
65
- var $cursor = (0, _utils2.getCursor)(state.selection);
18
+ var ideUX = function ideUX(pluginInjectionApi) {
19
+ return new _safePlugin.SafePlugin({
20
+ props: {
21
+ handleTextInput: function handleTextInput(view, from, to, text) {
22
+ var state = view.state,
23
+ dispatch = view.dispatch;
24
+ var compositionPluginState = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.composition.sharedState.currentState();
25
+ if ((0, _lineHandling.isCursorInsideCodeBlock)(state) && !(compositionPluginState !== null && compositionPluginState !== void 0 && compositionPluginState.isComposing)) {
66
26
  var beforeText = (0, _lineHandling.getStartOfCurrentLine)(state).text;
67
27
  var afterText = (0, _lineHandling.getEndOfCurrentLine)(state).text;
68
- var _getAutoClosingBracke2 = (0, _bracketHandling.getAutoClosingBracketInfo)(beforeText, afterText),
69
- leftBracket = _getAutoClosingBracke2.left,
70
- rightBracket = _getAutoClosingBracke2.right,
71
- hasTrailingMatchingBracket = _getAutoClosingBracke2.hasTrailingMatchingBracket;
72
- if (leftBracket && rightBracket && hasTrailingMatchingBracket && dispatch) {
73
- dispatch(state.tr.delete($cursor.pos - leftBracket.length, $cursor.pos + rightBracket.length));
28
+
29
+ // If text is a closing bracket/quote and we've already inserted it, move the selection after
30
+ if ((0, _pairedCharacterHandling.isCursorBeforeClosingCharacter)(afterText) && (0, _pairedCharacterHandling.isClosingCharacter)(text) && afterText.startsWith(text)) {
31
+ dispatch((0, _utils.setTextSelection)(to + text.length)(state.tr));
74
32
  return true;
75
33
  }
76
- var _getAutoClosingQuoteI2 = (0, _quoteHandling.getAutoClosingQuoteInfo)(beforeText, afterText),
77
- leftQuote = _getAutoClosingQuoteI2.left,
78
- rightQuote = _getAutoClosingQuoteI2.right,
79
- hasTrailingMatchingQuote = _getAutoClosingQuoteI2.hasTrailingMatchingQuote;
80
- if (leftQuote && rightQuote && hasTrailingMatchingQuote && dispatch) {
81
- dispatch(state.tr.delete($cursor.pos - leftQuote.length, $cursor.pos + rightQuote.length));
82
- return true;
34
+
35
+ // Automatically add right-hand side bracket when user types the left bracket
36
+ if ((0, _bracketHandling.shouldAutoCloseBracket)(beforeText, afterText)) {
37
+ var _getAutoClosingBracke = (0, _bracketHandling.getAutoClosingBracketInfo)(beforeText + text, afterText),
38
+ left = _getAutoClosingBracke.left,
39
+ right = _getAutoClosingBracke.right;
40
+ if (left && right) {
41
+ var bracketPair = state.schema.text(text + right);
42
+ var tr = state.tr.replaceWith(from, to, bracketPair);
43
+ dispatch((0, _utils.setTextSelection)(from + text.length)(tr));
44
+ return true;
45
+ }
83
46
  }
84
- var _getLineInfo = (0, _lineHandling.getLineInfo)(beforeText),
85
- _getLineInfo$indentTo = _getLineInfo.indentToken,
86
- size = _getLineInfo$indentTo.size,
87
- token = _getLineInfo$indentTo.token,
88
- indentText = _getLineInfo.indentText;
89
- if (beforeText === indentText) {
90
- if (indentText.endsWith(token.repeat(size)) && dispatch) {
91
- dispatch(state.tr.delete($cursor.pos - (size - indentText.length % size || size), $cursor.pos));
47
+
48
+ // Automatically add closing quote when user types a starting quote
49
+ if ((0, _quoteHandling.shouldAutoCloseQuote)(beforeText, afterText)) {
50
+ var _getAutoClosingQuoteI = (0, _quoteHandling.getAutoClosingQuoteInfo)(beforeText + text, afterText),
51
+ leftQuote = _getAutoClosingQuoteI.left,
52
+ rightQuote = _getAutoClosingQuoteI.right;
53
+ if (leftQuote && rightQuote) {
54
+ var quotePair = state.schema.text(text + rightQuote);
55
+ var _tr = state.tr.replaceWith(from, to, quotePair);
56
+ dispatch((0, _utils.setTextSelection)(from + text.length)(_tr));
92
57
  return true;
93
58
  }
94
59
  }
95
60
  }
96
61
  return false;
97
62
  },
98
- Enter: (0, _utils3.filterCommand)(_lineHandling.isSelectionEntirelyInsideCodeBlock, _commands.insertNewlineWithIndent),
99
- 'Mod-]': (0, _utils3.filterCommand)(_lineHandling.isSelectionEntirelyInsideCodeBlock, _commands.indent),
100
- 'Mod-[': (0, _utils3.filterCommand)(_lineHandling.isSelectionEntirelyInsideCodeBlock, _commands.outdent),
101
- Tab: (0, _utils3.filterCommand)(_lineHandling.isSelectionEntirelyInsideCodeBlock, function (state, dispatch) {
102
- if (!dispatch) {
63
+ handleKeyDown: (0, _keymap.keydownHandler)({
64
+ Backspace: function Backspace(state, dispatch) {
65
+ if ((0, _lineHandling.isCursorInsideCodeBlock)(state)) {
66
+ var $cursor = (0, _utils2.getCursor)(state.selection);
67
+ var beforeText = (0, _lineHandling.getStartOfCurrentLine)(state).text;
68
+ var afterText = (0, _lineHandling.getEndOfCurrentLine)(state).text;
69
+ var _getAutoClosingBracke2 = (0, _bracketHandling.getAutoClosingBracketInfo)(beforeText, afterText),
70
+ leftBracket = _getAutoClosingBracke2.left,
71
+ rightBracket = _getAutoClosingBracke2.right,
72
+ hasTrailingMatchingBracket = _getAutoClosingBracke2.hasTrailingMatchingBracket;
73
+ if (leftBracket && rightBracket && hasTrailingMatchingBracket && dispatch) {
74
+ dispatch(state.tr.delete($cursor.pos - leftBracket.length, $cursor.pos + rightBracket.length));
75
+ return true;
76
+ }
77
+ var _getAutoClosingQuoteI2 = (0, _quoteHandling.getAutoClosingQuoteInfo)(beforeText, afterText),
78
+ leftQuote = _getAutoClosingQuoteI2.left,
79
+ rightQuote = _getAutoClosingQuoteI2.right,
80
+ hasTrailingMatchingQuote = _getAutoClosingQuoteI2.hasTrailingMatchingQuote;
81
+ if (leftQuote && rightQuote && hasTrailingMatchingQuote && dispatch) {
82
+ dispatch(state.tr.delete($cursor.pos - leftQuote.length, $cursor.pos + rightQuote.length));
83
+ return true;
84
+ }
85
+ var _getLineInfo = (0, _lineHandling.getLineInfo)(beforeText),
86
+ _getLineInfo$indentTo = _getLineInfo.indentToken,
87
+ size = _getLineInfo$indentTo.size,
88
+ token = _getLineInfo$indentTo.token,
89
+ indentText = _getLineInfo.indentText;
90
+ if (beforeText === indentText) {
91
+ if (indentText.endsWith(token.repeat(size)) && dispatch) {
92
+ dispatch(state.tr.delete($cursor.pos - (size - indentText.length % size || size), $cursor.pos));
93
+ return true;
94
+ }
95
+ }
96
+ }
103
97
  return false;
104
- }
105
- if ((0, _lineHandling.isCursorInsideCodeBlock)(state)) {
106
- return (0, _commands.insertIndent)(state, dispatch);
107
- }
108
- return (0, _commands.indent)(state, dispatch);
109
- }),
110
- 'Shift-Tab': (0, _utils3.filterCommand)(_lineHandling.isSelectionEntirelyInsideCodeBlock, _commands.outdent),
111
- 'Mod-a': function ModA(state, dispatch) {
112
- if ((0, _lineHandling.isSelectionEntirelyInsideCodeBlock)(state)) {
113
- var _state$selection = state.selection,
114
- $from = _state$selection.$from,
115
- $to = _state$selection.$to;
116
- var isFullCodeBlockSelection = $from.parentOffset === 0 && $to.parentOffset === $to.parent.nodeSize - 2;
117
- if (!isFullCodeBlockSelection && dispatch) {
118
- dispatch(state.tr.setSelection(_state.TextSelection.create(state.doc, $from.start(), $to.end())));
119
- return true;
98
+ },
99
+ Enter: (0, _utils3.filterCommand)(_lineHandling.isSelectionEntirelyInsideCodeBlock, _commands.insertNewlineWithIndent),
100
+ 'Mod-]': (0, _utils3.filterCommand)(_lineHandling.isSelectionEntirelyInsideCodeBlock, _commands.indent),
101
+ 'Mod-[': (0, _utils3.filterCommand)(_lineHandling.isSelectionEntirelyInsideCodeBlock, _commands.outdent),
102
+ Tab: (0, _utils3.filterCommand)(_lineHandling.isSelectionEntirelyInsideCodeBlock, function (state, dispatch) {
103
+ if (!dispatch) {
104
+ return false;
105
+ }
106
+ if ((0, _lineHandling.isCursorInsideCodeBlock)(state)) {
107
+ return (0, _commands.insertIndent)(state, dispatch);
108
+ }
109
+ return (0, _commands.indent)(state, dispatch);
110
+ }),
111
+ 'Shift-Tab': (0, _utils3.filterCommand)(_lineHandling.isSelectionEntirelyInsideCodeBlock, _commands.outdent),
112
+ 'Mod-a': function ModA(state, dispatch) {
113
+ if ((0, _lineHandling.isSelectionEntirelyInsideCodeBlock)(state)) {
114
+ var _state$selection = state.selection,
115
+ $from = _state$selection.$from,
116
+ $to = _state$selection.$to;
117
+ var isFullCodeBlockSelection = $from.parentOffset === 0 && $to.parentOffset === $to.parent.nodeSize - 2;
118
+ if (!isFullCodeBlockSelection && dispatch) {
119
+ dispatch(state.tr.setSelection(_state.TextSelection.create(state.doc, $from.start(), $to.end())));
120
+ return true;
121
+ }
120
122
  }
123
+ return false;
121
124
  }
122
- return false;
123
- }
124
- })
125
- }
126
- });
125
+ })
126
+ }
127
+ });
128
+ };
129
+ var _default = ideUX;
127
130
  exports.default = _default;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _main = _interopRequireDefault(require("./pm-plugins/main"));
9
+ var _pluginKey = require("./pm-plugins/plugin-key");
10
+ var composition = function composition() {
11
+ return {
12
+ name: 'composition',
13
+ getSharedState: function getSharedState(editorState) {
14
+ var _pluginKey$getState;
15
+ if (!editorState) {
16
+ return undefined;
17
+ }
18
+ return {
19
+ isComposing: !!((_pluginKey$getState = _pluginKey.pluginKey.getState(editorState)) !== null && _pluginKey$getState !== void 0 && _pluginKey$getState.isComposing)
20
+ };
21
+ },
22
+ pmPlugins: function pmPlugins() {
23
+ return [{
24
+ name: 'composition',
25
+ plugin: function plugin() {
26
+ return (0, _main.default)();
27
+ }
28
+ }];
29
+ }
30
+ };
31
+ };
32
+ var _default = composition;
33
+ exports.default = _default;
@@ -3,22 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.isComposing = exports.default = void 0;
6
+ exports.default = void 0;
7
7
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
8
- var _state = require("@atlaskit/editor-prosemirror/state");
9
8
  var _utils = require("@atlaskit/editor-common/utils");
10
- var compositionPluginKey = new _state.PluginKey('compositionPlugin');
11
- var isComposing = function isComposing(state) {
12
- var _compositionPluginKey;
13
- return !!((_compositionPluginKey = compositionPluginKey.getState(state)) !== null && _compositionPluginKey !== void 0 && _compositionPluginKey.isComposing);
14
- };
15
- exports.isComposing = isComposing;
9
+ var _pluginKey = require("./plugin-key");
16
10
  var isLinux = function isLinux() {
17
11
  return navigator.userAgent.indexOf('Linux') >= 0;
18
12
  };
19
13
  var _default = function _default() {
20
14
  return new _safePlugin.SafePlugin({
21
- key: compositionPluginKey,
15
+ key: _pluginKey.pluginKey,
22
16
  state: {
23
17
  init: function init() {
24
18
  return {
@@ -27,7 +21,7 @@ var _default = function _default() {
27
21
  };
28
22
  },
29
23
  apply: function apply(tr, value) {
30
- var isComposing = tr.getMeta(compositionPluginKey);
24
+ var isComposing = tr.getMeta(_pluginKey.pluginKey);
31
25
  var zeroWidthSpacePos = tr.getMeta('zeroWidthSpacePos');
32
26
  if (typeof isComposing === 'undefined') {
33
27
  return value;
@@ -42,7 +36,7 @@ var _default = function _default() {
42
36
  handleDOMEvents: {
43
37
  compositionstart: function compositionstart(view, event) {
44
38
  var tr = view.state.tr;
45
- tr.setMeta(compositionPluginKey, true);
39
+ tr.setMeta(_pluginKey.pluginKey, true);
46
40
 
47
41
  // only apply for linux and cursor is at start of line
48
42
  if (isLinux() && view.state.selection.$from.parentOffset === 0) {
@@ -56,10 +50,10 @@ var _default = function _default() {
56
50
  },
57
51
  compositionend: function compositionend(view, event) {
58
52
  var tr = view.state.tr;
59
- tr.setMeta(compositionPluginKey, false);
53
+ tr.setMeta(_pluginKey.pluginKey, false);
60
54
  if (isLinux()) {
61
- var _compositionPluginKey2;
62
- var zeroWidthSpacePos = (_compositionPluginKey2 = compositionPluginKey.getState(view.state)) === null || _compositionPluginKey2 === void 0 ? void 0 : _compositionPluginKey2.zeroWidthSpacePos;
55
+ var _pluginKey$getState;
56
+ var zeroWidthSpacePos = (_pluginKey$getState = _pluginKey.pluginKey.getState(view.state)) === null || _pluginKey$getState === void 0 ? void 0 : _pluginKey$getState.zeroWidthSpacePos;
63
57
  if (typeof zeroWidthSpacePos !== 'undefined') {
64
58
  tr.deleteRange(zeroWidthSpacePos, zeroWidthSpacePos + 1);
65
59
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.stateKey = void 0;
6
+ exports.pluginKey = void 0;
7
7
  var _state = require("@atlaskit/editor-prosemirror/state");
8
- var stateKey = new _state.PluginKey('imageUploadPlugin');
9
- exports.stateKey = stateKey;
8
+ var pluginKey = new _state.PluginKey('compositionPlugin');
9
+ exports.pluginKey = pluginKey;
@@ -191,12 +191,6 @@ Object.defineProperty(exports, "historyPlugin", {
191
191
  return _history.default;
192
192
  }
193
193
  });
194
- Object.defineProperty(exports, "imageUploadPlugin", {
195
- enumerable: true,
196
- get: function get() {
197
- return _imageUpload.default;
198
- }
199
- });
200
194
  Object.defineProperty(exports, "indentationPlugin", {
201
195
  enumerable: true,
202
196
  get: function get() {
@@ -388,7 +382,6 @@ var _emoji = _interopRequireDefault(require("./emoji"));
388
382
  var _extension = _interopRequireDefault(require("./extension"));
389
383
  var _fakeTextCursor = _interopRequireDefault(require("./fake-text-cursor"));
390
384
  var _helpDialog = _interopRequireDefault(require("./help-dialog"));
391
- var _imageUpload = _interopRequireDefault(require("./image-upload"));
392
385
  var _insertBlock = _interopRequireDefault(require("./insert-block"));
393
386
  var _jiraIssue = _interopRequireDefault(require("./jira-issue"));
394
387
  var _layout = _interopRequireDefault(require("./layout"));
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -21,7 +20,7 @@ var _editorMarkdownTransformer = require("@atlaskit/editor-markdown-transformer"
21
20
  var _card = require("@atlaskit/editor-common/card");
22
21
  var _slice = require("../../../utils/slice");
23
22
  var _extensions = require("@atlaskit/editor-common/extensions");
24
- var clipboard = _interopRequireWildcard(require("../../../utils/clipboard"));
23
+ var _paste = require("@atlaskit/editor-common/paste");
25
24
  var _mediaSingle = require("../../media/utils/media-single");
26
25
  var _util = require("../util");
27
26
  var _utils = require("@atlaskit/editor-common/utils");
@@ -33,7 +32,6 @@ var _analytics2 = require("../../analytics");
33
32
  var _utils4 = require("../../../utils");
34
33
  var _mediaCommon = require("../../media/utils/media-common");
35
34
  var _commands = require("../commands");
36
- var _paste = require("@atlaskit/editor-common/paste");
37
35
  var _utils5 = require("../../tasks-and-decisions/utils");
38
36
  var _utils6 = require("../../annotation/utils");
39
37
  var _clipboardTextSerializer = require("./clipboard-text-serializer");
@@ -42,8 +40,6 @@ var _utils7 = require("@atlaskit/editor-tables/utils");
42
40
  var _step = require("../../../utils/step");
43
41
  var _pluginFactory = require("./plugin-factory");
44
42
  var _utils8 = require("@atlaskit/editor-prosemirror/utils");
45
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
46
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
47
43
  function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pluginInjectionApi, cardOptions, sanitizePrivateContent, providerFactory) {
48
44
  var atlassianMarkDownParser = new _editorMarkdownTransformer.MarkdownTransformer(schema, _paste.md);
49
45
  function getMarkdownSlice(text, openStart, openEnd) {
@@ -134,7 +130,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
134
130
  if ((_text = text) !== null && _text !== void 0 && _text.includes('\r')) {
135
131
  text = text.replace(/\r/g, '');
136
132
  }
137
- var isPastedFile = clipboard.isPastedFile(event);
133
+ var isPastedFile = (0, _paste.isPastedFile)(event);
138
134
  var isPlainText = text && !html;
139
135
  var isRichText = !!html;
140
136
 
@@ -11,7 +11,6 @@ var _utils = require("@atlaskit/editor-common/utils");
11
11
  var _state = require("@atlaskit/editor-prosemirror/state");
12
12
  var _view = require("@atlaskit/editor-prosemirror/view");
13
13
  var _utils2 = require("../type-ahead/utils");
14
- var _composition = require("../base/pm-plugins/composition");
15
14
  var pluginKey = new _state.PluginKey('placeholderPlugin');
16
15
  exports.pluginKey = pluginKey;
17
16
  function getPlaceholderState(editorState) {
@@ -108,7 +107,8 @@ function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api) {
108
107
  hasPlaceholder = _getPlaceholderState.hasPlaceholder,
109
108
  placeholderText = _getPlaceholderState.placeholderText,
110
109
  pos = _getPlaceholderState.pos;
111
- if (hasPlaceholder && placeholderText && pos !== undefined && !(0, _composition.isComposing)(editorState)) {
110
+ var compositionPluginState = api === null || api === void 0 ? void 0 : api.dependencies.composition.sharedState.currentState();
111
+ if (hasPlaceholder && placeholderText && pos !== undefined && !(compositionPluginState !== null && compositionPluginState !== void 0 && compositionPluginState.isComposing)) {
112
112
  return createPlaceholderDecoration(editorState, placeholderText, pos);
113
113
  }
114
114
  return;
@@ -5,35 +5,13 @@ var _typeof3 = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.checkClipboardTypes = checkClipboardTypes;
9
- exports.isClipboardEvent = exports.copyToClipboard = exports.copyHTMLToClipboardPolyfill = exports.copyHTMLToClipboard = void 0;
10
- exports.isPastedFile = isPastedFile;
8
+ exports.copyToClipboard = exports.copyHTMLToClipboardPolyfill = exports.copyHTMLToClipboard = void 0;
11
9
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
12
10
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
13
11
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
14
12
  var clipboard = _interopRequireWildcard(require("clipboard-polyfill"));
15
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
- function checkClipboardTypes(type, item) {
18
- var isDOMStringList = function isDOMStringList(t) {
19
- return !t.indexOf && !!t.contains;
20
- };
21
- return isDOMStringList(type) ? type.contains(item) : type.indexOf(item) > -1;
22
- }
23
-
24
- // Typeguard Function
25
- var isClipboardEvent = function isClipboardEvent(event) {
26
- return 'clipboardData' in event;
27
- };
28
- exports.isClipboardEvent = isClipboardEvent;
29
- function isPastedFile(rawEvent) {
30
- var _ref = rawEvent,
31
- clipboardData = _ref.clipboardData;
32
- if (!clipboardData) {
33
- return false;
34
- }
35
- return checkClipboardTypes(clipboardData.types, 'Files');
36
- }
37
15
  var isClipboardApiSupported = function isClipboardApiSupported() {
38
16
  return !!navigator.clipboard && typeof navigator.clipboard.writeText === 'function';
39
17
  };
@@ -41,7 +19,7 @@ var isIEClipboardApiSupported = function isIEClipboardApiSupported() {
41
19
  return window.clipboardData && typeof window.clipboardData.setData === 'function';
42
20
  };
43
21
  var copyToClipboard = /*#__PURE__*/function () {
44
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(textToCopy) {
22
+ var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(textToCopy) {
45
23
  return _regenerator.default.wrap(function _callee$(_context) {
46
24
  while (1) switch (_context.prev = _context.next) {
47
25
  case 0:
@@ -89,12 +67,12 @@ var copyToClipboard = /*#__PURE__*/function () {
89
67
  }, _callee, null, [[1, 6], [12, 17]]);
90
68
  }));
91
69
  return function copyToClipboard(_x) {
92
- return _ref2.apply(this, arguments);
70
+ return _ref.apply(this, arguments);
93
71
  };
94
72
  }();
95
73
  exports.copyToClipboard = copyToClipboard;
96
74
  var copyHTMLToClipboard = /*#__PURE__*/function () {
97
- var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(elementToCopy, plainTextToCopy) {
75
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(elementToCopy, plainTextToCopy) {
98
76
  var data;
99
77
  return _regenerator.default.wrap(function _callee2$(_context2) {
100
78
  while (1) switch (_context2.prev = _context2.next) {
@@ -137,7 +115,7 @@ var copyHTMLToClipboard = /*#__PURE__*/function () {
137
115
  }, _callee2, null, [[1, 7]]);
138
116
  }));
139
117
  return function copyHTMLToClipboard(_x2, _x3) {
140
- return _ref3.apply(this, arguments);
118
+ return _ref2.apply(this, arguments);
141
119
  };
142
120
  }();
143
121
 
@@ -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.18.1";
9
+ var version = "187.19.0";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.18.1",
3
+ "version": "187.19.0",
4
4
  "sideEffects": false
5
5
  }
@@ -20,6 +20,7 @@ import { analyticsPlugin as deprecatedAnalyticsPlugin } from '../../../plugins';
20
20
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
21
21
  import placeholderPlugin from '../../../plugins/placeholder';
22
22
  import annotationPlugin from '../../../plugins/annotation';
23
+ import compositionPlugin from '../../../plugins/composition';
23
24
  import quickInsertPlugin from '../../../plugins/quick-insert';
24
25
  import selectionPlugin from '../../../plugins/selection';
25
26
  import codeBlockPlugin from '../../../plugins/code-block';
@@ -57,7 +58,7 @@ export function createDefaultPreset(options) {
57
58
  }]);
58
59
  }
59
60
  return builder;
60
- }).add([pastePlugin, options.paste]).add(clipboardPlugin).add(focusPlugin).add([basePlugin, options.base]).add(decorationsPlugin).maybeAdd(undoRedoPlugin, (p, builder) => {
61
+ }).add([pastePlugin, options.paste]).add(clipboardPlugin).add(focusPlugin).add(compositionPlugin).add([basePlugin, options.base]).add(decorationsPlugin).maybeAdd(undoRedoPlugin, (p, builder) => {
61
62
  var _options$featureFlags;
62
63
  // The undo redo plugin needs to be add before the blockTypePlugin
63
64
  if ((_options$featureFlags = options.featureFlags) !== null && _options$featureFlags !== void 0 && _options$featureFlags.undoRedoButtons) {
@@ -1,5 +1,6 @@
1
1
  import { createEditorSelectionAPI } from '../../../selection-api/api';
2
- import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, emojiPlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, imageUploadPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, listPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, rulePlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin, statusPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin, copyButtonPlugin, borderPlugin } from '../../../plugins';
2
+ import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, emojiPlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, listPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, rulePlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin, statusPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin, copyButtonPlugin, borderPlugin } from '../../../plugins';
3
+ import { imageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
3
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
4
5
  import { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
5
6
  import { gridPlugin } from '@atlaskit/editor-plugin-grid';
@@ -11,7 +11,6 @@ import inlineCursorTargetPlugin from './pm-plugins/inline-cursor-target';
11
11
  import scrollGutter from './pm-plugins/scroll-gutter';
12
12
  import { keymap } from '@atlaskit/editor-common/keymaps';
13
13
  import frozenEditor from './pm-plugins/frozen-editor';
14
- import compositionPlugin from './pm-plugins/composition';
15
14
  // Chrome >= 88
16
15
  export const isChromeWithSelectionBug = browser.chrome && browser.chrome_version >= 88;
17
16
  const basePlugin = (options, api) => {
@@ -85,10 +84,6 @@ const basePlugin = (options, api) => {
85
84
  name: 'disableSpellcheckingPlugin',
86
85
  plugin: () => disableSpellcheckingPlugin(featureFlags)
87
86
  });
88
- plugins.push({
89
- name: 'compositionPlugin',
90
- plugin: () => compositionPlugin()
91
- });
92
87
  return plugins;
93
88
  },
94
89
  nodes() {