@atlaskit/editor-core 190.1.20 → 190.1.24

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 (126) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/dist/cjs/composable-editor/editor-internal.js +11 -1
  4. package/dist/cjs/create-editor/ReactEditorView.js +6 -1
  5. package/dist/cjs/index.js +1 -1
  6. package/dist/cjs/plugins/index.js +0 -7
  7. package/dist/cjs/plugins/paste/pm-plugins/main.js +14 -10
  8. package/dist/cjs/presets/default.js +2 -2
  9. package/dist/cjs/presets/universal.js +2 -1
  10. package/dist/cjs/utils/index.js +12 -18
  11. package/dist/cjs/utils/performance/measure-enum.js +1 -2
  12. package/dist/cjs/version-wrapper.js +1 -1
  13. package/dist/es2019/composable-editor/editor-internal.js +11 -1
  14. package/dist/es2019/create-editor/ReactEditorView.js +6 -1
  15. package/dist/es2019/index.js +14 -1
  16. package/dist/es2019/plugins/index.js +0 -1
  17. package/dist/es2019/plugins/paste/pm-plugins/main.js +11 -5
  18. package/dist/es2019/presets/default.js +1 -1
  19. package/dist/es2019/presets/universal.js +2 -1
  20. package/dist/es2019/utils/index.js +0 -7
  21. package/dist/es2019/utils/performance/measure-enum.js +1 -2
  22. package/dist/es2019/version-wrapper.js +1 -1
  23. package/dist/esm/composable-editor/editor-internal.js +11 -1
  24. package/dist/esm/create-editor/ReactEditorView.js +6 -1
  25. package/dist/esm/index.js +14 -1
  26. package/dist/esm/plugins/index.js +0 -1
  27. package/dist/esm/plugins/paste/pm-plugins/main.js +9 -5
  28. package/dist/esm/presets/default.js +1 -1
  29. package/dist/esm/presets/universal.js +2 -1
  30. package/dist/esm/utils/index.js +0 -5
  31. package/dist/esm/utils/performance/measure-enum.js +1 -2
  32. package/dist/esm/version-wrapper.js +1 -1
  33. package/dist/types/index.d.ts +15 -2
  34. package/dist/types/plugins/index.d.ts +0 -1
  35. package/dist/types/plugins/paste/pm-plugins/main.d.ts +2 -0
  36. package/dist/types/presets/default.d.ts +1 -1
  37. package/dist/types/types/editor-props.d.ts +1 -1
  38. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
  39. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  40. package/dist/types/utils/index.d.ts +0 -1
  41. package/dist/types/utils/performance/measure-enum.d.ts +0 -1
  42. package/dist/types-ts4.5/index.d.ts +15 -2
  43. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  44. package/dist/types-ts4.5/plugins/paste/pm-plugins/main.d.ts +2 -0
  45. package/dist/types-ts4.5/presets/default.d.ts +1 -1
  46. package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
  47. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
  48. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
  49. package/dist/types-ts4.5/utils/index.d.ts +0 -1
  50. package/dist/types-ts4.5/utils/performance/measure-enum.d.ts +0 -1
  51. package/package.json +7 -5
  52. package/dist/cjs/plugins/annotation/commands/index.js +0 -150
  53. package/dist/cjs/plugins/annotation/commands/transform.js +0 -86
  54. package/dist/cjs/plugins/annotation/index.js +0 -130
  55. package/dist/cjs/plugins/annotation/nodeviews/index.js +0 -59
  56. package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +0 -243
  57. package/dist/cjs/plugins/annotation/pm-plugins/keymap.js +0 -15
  58. package/dist/cjs/plugins/annotation/pm-plugins/plugin-factory.js +0 -107
  59. package/dist/cjs/plugins/annotation/pm-plugins/reducer.js +0 -84
  60. package/dist/cjs/plugins/annotation/pm-plugins/types.js +0 -17
  61. package/dist/cjs/plugins/annotation/toolbar.js +0 -59
  62. package/dist/cjs/plugins/annotation/types.js +0 -20
  63. package/dist/cjs/plugins/annotation/ui/AnnotationViewWrapper.js +0 -38
  64. package/dist/cjs/plugins/annotation/ui/InlineCommentView.js +0 -149
  65. package/dist/cjs/plugins/annotation/update-provider.js +0 -36
  66. package/dist/cjs/plugins/annotation/utils.js +0 -372
  67. package/dist/es2019/plugins/annotation/commands/index.js +0 -123
  68. package/dist/es2019/plugins/annotation/commands/transform.js +0 -64
  69. package/dist/es2019/plugins/annotation/index.js +0 -125
  70. package/dist/es2019/plugins/annotation/nodeviews/index.js +0 -31
  71. package/dist/es2019/plugins/annotation/pm-plugins/inline-comment.js +0 -178
  72. package/dist/es2019/plugins/annotation/pm-plugins/keymap.js +0 -9
  73. package/dist/es2019/plugins/annotation/pm-plugins/plugin-factory.js +0 -108
  74. package/dist/es2019/plugins/annotation/pm-plugins/reducer.js +0 -94
  75. package/dist/es2019/plugins/annotation/pm-plugins/types.js +0 -11
  76. package/dist/es2019/plugins/annotation/toolbar.js +0 -53
  77. package/dist/es2019/plugins/annotation/types.js +0 -14
  78. package/dist/es2019/plugins/annotation/ui/AnnotationViewWrapper.js +0 -14
  79. package/dist/es2019/plugins/annotation/ui/InlineCommentView.js +0 -147
  80. package/dist/es2019/plugins/annotation/update-provider.js +0 -9
  81. package/dist/es2019/plugins/annotation/utils.js +0 -334
  82. package/dist/esm/plugins/annotation/commands/index.js +0 -143
  83. package/dist/esm/plugins/annotation/commands/transform.js +0 -80
  84. package/dist/esm/plugins/annotation/index.js +0 -118
  85. package/dist/esm/plugins/annotation/nodeviews/index.js +0 -52
  86. package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +0 -236
  87. package/dist/esm/plugins/annotation/pm-plugins/keymap.js +0 -9
  88. package/dist/esm/plugins/annotation/pm-plugins/plugin-factory.js +0 -101
  89. package/dist/esm/plugins/annotation/pm-plugins/reducer.js +0 -77
  90. package/dist/esm/plugins/annotation/pm-plugins/types.js +0 -11
  91. package/dist/esm/plugins/annotation/toolbar.js +0 -52
  92. package/dist/esm/plugins/annotation/types.js +0 -14
  93. package/dist/esm/plugins/annotation/ui/AnnotationViewWrapper.js +0 -31
  94. package/dist/esm/plugins/annotation/ui/InlineCommentView.js +0 -144
  95. package/dist/esm/plugins/annotation/update-provider.js +0 -29
  96. package/dist/esm/plugins/annotation/utils.js +0 -345
  97. package/dist/types/plugins/annotation/commands/index.d.ts +0 -15
  98. package/dist/types/plugins/annotation/commands/transform.d.ts +0 -11
  99. package/dist/types/plugins/annotation/index.d.ts +0 -15
  100. package/dist/types/plugins/annotation/nodeviews/index.d.ts +0 -11
  101. package/dist/types/plugins/annotation/pm-plugins/inline-comment.d.ts +0 -3
  102. package/dist/types/plugins/annotation/pm-plugins/keymap.d.ts +0 -3
  103. package/dist/types/plugins/annotation/pm-plugins/plugin-factory.d.ts +0 -2
  104. package/dist/types/plugins/annotation/pm-plugins/reducer.d.ts +0 -3
  105. package/dist/types/plugins/annotation/pm-plugins/types.d.ts +0 -78
  106. package/dist/types/plugins/annotation/toolbar.d.ts +0 -5
  107. package/dist/types/plugins/annotation/types.d.ts +0 -86
  108. package/dist/types/plugins/annotation/ui/AnnotationViewWrapper.d.ts +0 -10
  109. package/dist/types/plugins/annotation/ui/InlineCommentView.d.ts +0 -13
  110. package/dist/types/plugins/annotation/update-provider.d.ts +0 -12
  111. package/dist/types/plugins/annotation/utils.d.ts +0 -45
  112. package/dist/types-ts4.5/plugins/annotation/commands/index.d.ts +0 -15
  113. package/dist/types-ts4.5/plugins/annotation/commands/transform.d.ts +0 -11
  114. package/dist/types-ts4.5/plugins/annotation/index.d.ts +0 -17
  115. package/dist/types-ts4.5/plugins/annotation/nodeviews/index.d.ts +0 -11
  116. package/dist/types-ts4.5/plugins/annotation/pm-plugins/inline-comment.d.ts +0 -3
  117. package/dist/types-ts4.5/plugins/annotation/pm-plugins/keymap.d.ts +0 -3
  118. package/dist/types-ts4.5/plugins/annotation/pm-plugins/plugin-factory.d.ts +0 -2
  119. package/dist/types-ts4.5/plugins/annotation/pm-plugins/reducer.d.ts +0 -3
  120. package/dist/types-ts4.5/plugins/annotation/pm-plugins/types.d.ts +0 -78
  121. package/dist/types-ts4.5/plugins/annotation/toolbar.d.ts +0 -5
  122. package/dist/types-ts4.5/plugins/annotation/types.d.ts +0 -86
  123. package/dist/types-ts4.5/plugins/annotation/ui/AnnotationViewWrapper.d.ts +0 -10
  124. package/dist/types-ts4.5/plugins/annotation/ui/InlineCommentView.d.ts +0 -13
  125. package/dist/types-ts4.5/plugins/annotation/update-provider.d.ts +0 -12
  126. package/dist/types-ts4.5/plugins/annotation/utils.d.ts +0 -45
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 190.1.24
4
+
5
+ ### Patch Changes
6
+
7
+ - [#63488](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63488) [`8fbd518c208f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8fbd518c208f) - [ED-20569] Add tooling to help the extension plugin extraction on confluence
8
+ - [#63353](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63353) [`6e9371645615`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6e9371645615) - Clean up of platform.linking-platform.smart-card.cross-join feature flag
9
+ - Updated dependencies
10
+
11
+ ## 190.1.23
12
+
13
+ ### Patch Changes
14
+
15
+ - [#63348](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63348) [`2d6eebf2ed74`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2d6eebf2ed74) - Extract annotation plugin from editor-core to @atlaskit/editor-plugin-annotation.
16
+ - Updated dependencies
17
+
3
18
  ## 190.1.20
4
19
 
5
20
  ### Patch Changes
@@ -64,6 +64,9 @@
64
64
  {
65
65
  "path": "../../editor-plugin-analytics/afm-cc/tsconfig.json"
66
66
  },
67
+ {
68
+ "path": "../../editor-plugin-annotation/afm-cc/tsconfig.json"
69
+ },
67
70
  {
68
71
  "path": "../../editor-plugin-base/afm-cc/tsconfig.json"
69
72
  },
@@ -39,7 +39,17 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
39
39
  onEditorDestroyed = _ref.onEditorDestroyed,
40
40
  preset = _ref.preset;
41
41
  var Component = (0, _createEditor.getUiComponent)(props.appearance);
42
- var setEditorApi = (0, _context.useSetPresetContext)();
42
+ var _setInternalEditorApi = (0, _context.useSetPresetContext)();
43
+ var setEditorApi = (0, _react.useCallback)(function (api) {
44
+ if (_setInternalEditorApi) {
45
+ _setInternalEditorApi(api);
46
+ }
47
+
48
+ // This is an workaround to unblock Editor Lego Decoupling project, if you have questions ping us #cc-editor-lego
49
+ // We may clean up this code when EditorActions deprecation process starts
50
+ // @ts-expect-error 2339: Property '__EDITOR_INTERNALS_DO_NOT_USE__API' does not exist on type 'EditorActions<any>'.
51
+ editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
52
+ }, [_setInternalEditorApi, editorActions]);
43
53
  var overriddenEditorProps = _objectSpread(_objectSpread({}, props), {}, {
44
54
  onSave: props.onSave ? handleSave : undefined,
45
55
  // noop all analytic events, even if a handler is still passed.
@@ -536,7 +536,12 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
536
536
  getEditorState: _this.getEditorState,
537
537
  getEditorView: _this.getEditorView
538
538
  });
539
- (_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 || _props$setEditorApi.call(props, _this.pluginInjectionAPI.api());
539
+ var api = _this.pluginInjectionAPI.api();
540
+ (_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 || _props$setEditorApi.call(props, api);
541
+ if (props.editorProps.editorActions) {
542
+ // @ts-expect-error
543
+ props.editorProps.editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
544
+ }
540
545
  _this.eventDispatcher = new _eventDispatcher.EventDispatcher();
541
546
  _this.dispatch = (0, _eventDispatcher.createDispatch)(_this.eventDispatcher);
542
547
  _this.errorReporter = (0, _createEditor.createErrorReporter)(props.editorProps.errorReporterHandler);
package/dist/cjs/index.js CHANGED
@@ -172,7 +172,7 @@ var _ContextPanel = _interopRequireDefault(require("./ui/ContextPanel"));
172
172
  var _resource = require("@atlaskit/emoji/resource");
173
173
  var _resource2 = require("@atlaskit/mention/resource");
174
174
  var _teamResource = require("@atlaskit/mention/team-resource");
175
- var _annotation = require("./plugins/annotation");
175
+ var _annotation = require("@atlaskit/editor-common/annotation");
176
176
  var _analytics = require("@atlaskit/editor-common/analytics");
177
177
  var _utils = require("./utils");
178
178
  var _actions = _interopRequireDefault(require("./actions"));
@@ -4,12 +4,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- Object.defineProperty(exports, "annotationPlugin", {
8
- enumerable: true,
9
- get: function get() {
10
- return _annotation.default;
11
- }
12
- });
13
7
  Object.defineProperty(exports, "avatarGroupPlugin", {
14
8
  enumerable: true,
15
9
  get: function get() {
@@ -62,7 +56,6 @@ var _collabEdit = _interopRequireDefault(require("./collab-edit"));
62
56
  var _extension = _interopRequireDefault(require("./extension"));
63
57
  var _jiraIssue = _interopRequireDefault(require("./jira-issue"));
64
58
  var _paste = _interopRequireDefault(require("./paste"));
65
- var _annotation = _interopRequireDefault(require("./annotation"));
66
59
  var _feedbackDialog = _interopRequireDefault(require("./feedback-dialog"));
67
60
  var _findReplace = _interopRequireDefault(require("./find-replace"));
68
61
  var _avatarGroup = _interopRequireDefault(require("./avatar-group"));
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.createPlugin = createPlugin;
8
+ exports.isInsideBlockQuote = void 0;
8
9
  Object.defineProperty(exports, "stateKey", {
9
10
  enumerable: true,
10
11
  get: function get() {
@@ -28,16 +29,18 @@ var _util = require("../util");
28
29
  var _transforms = require("@atlaskit/editor-common/transforms");
29
30
  var _handlers = require("../handlers");
30
31
  var _analytics2 = require("./analytics");
31
- var _utils3 = require("../../../utils");
32
+ var _coreUtils = require("@atlaskit/editor-common/core-utils");
32
33
  var _commands = require("../commands");
33
- var _utils4 = require("../../annotation/utils");
34
34
  var _clipboardTextSerializer = require("./clipboard-text-serializer");
35
35
  var _tinyMCE = require("../util/tinyMCE");
36
36
  var _pluginFactory = require("./plugin-factory");
37
- var _utils5 = require("@atlaskit/editor-prosemirror/utils");
37
+ var _utils3 = require("@atlaskit/editor-prosemirror/utils");
38
38
  var _actions = require("../actions");
39
- // TODO: ED-20519 It requires annotation extraction to use the plugin injection API
40
-
39
+ var isInsideBlockQuote = exports.isInsideBlockQuote = function isInsideBlockQuote(state) {
40
+ var blockquote = state.schema.nodes.blockquote;
41
+ return (0, _utils3.hasParentNodeOfType)(blockquote)(state.selection);
42
+ };
43
+ var PASTE = 'Editor Paste Plugin Paste Duration';
41
44
  function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pluginInjectionApi, cardOptions, sanitizePrivateContent, providerFactory) {
42
45
  var _pluginInjectionApi$a;
43
46
  var editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
@@ -180,7 +183,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
180
183
  if (pasteTrackingEnabled) {
181
184
  var content = (0, _analytics2.getContentNodeTypes)(slice.content);
182
185
  var pasteId = (0, _uuid.default)();
183
- var measureName = "".concat(_utils3.measurements.PASTE, "_").concat(pasteId);
186
+ var measureName = "".concat(PASTE, "_").concat(pasteId);
184
187
  (0, _utils.measureRender)(measureName, function (_ref) {
185
188
  var duration = _ref.duration,
186
189
  distortedDuration = _ref.distortedDuration;
@@ -207,7 +210,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
207
210
  // Don't add closeHistory if we're pasting over layout columns, as we will appendTransaction
208
211
  // to cleanup the layout's structure and we want to keep the paste and re-structuring as
209
212
  // one event.
210
- var isPastingOverLayoutColumns = (0, _utils5.hasParentNodeOfType)(state.schema.nodes.layoutColumn)(state.selection);
213
+ var isPastingOverLayoutColumns = (0, _utils3.hasParentNodeOfType)(state.schema.nodes.layoutColumn)(state.selection);
211
214
 
212
215
  // don't add closeHistory call if we're pasting a table, as some tables may involve additional
213
216
  // appendedTransactions to repair them (if they're partial or incomplete) and we don't want
@@ -323,7 +326,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
323
326
  }
324
327
  return (0, _analytics2.handleMarkdownWithAnalytics)(view, event, markdownSlice, pluginInjectionApi)(state, dispatch);
325
328
  }
326
- if (isRichText && (0, _utils3.isInsideBlockQuote)(state)) {
329
+ if (isRichText && isInsideBlockQuote(state)) {
327
330
  //If pasting inside blockquote
328
331
  //Skip the blockquote node and keep remaining nodes as they are
329
332
  var blockquote = schema.nodes.blockquote;
@@ -370,7 +373,8 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
370
373
  // remove annotation marks from the pasted data if they are not present in the document
371
374
  // for the cases when they are pasted from external pages
372
375
  if (slice.content.size && (0, _utils.containsAnyAnnotations)(slice, state)) {
373
- (0, _utils4.stripNonExistingAnnotations)(slice, state);
376
+ var _pluginInjectionApi$a3;
377
+ pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a3 = pluginInjectionApi.annotation) === null || _pluginInjectionApi$a3 === void 0 || _pluginInjectionApi$a3.actions.stripNonExistingAnnotations(slice, state);
374
378
  }
375
379
 
376
380
  // ED-4732
@@ -397,7 +401,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
397
401
  if ((0, _analytics2.handleExpandWithAnalytics)(editorAnalyticsAPI)(view, event, slice)(state, dispatch)) {
398
402
  return true;
399
403
  }
400
- if (!(0, _utils3.insideTable)(state)) {
404
+ if (!(0, _coreUtils.insideTable)(state)) {
401
405
  slice = (0, _transforms.transformSliceNestedExpandToExpand)(slice, state.schema);
402
406
  }
403
407
 
@@ -25,7 +25,7 @@ var _editorPluginFloatingToolbar = require("@atlaskit/editor-plugin-floating-too
25
25
  var _editorPluginClipboard = require("@atlaskit/editor-plugin-clipboard");
26
26
  var _editorPluginAnalytics = require("@atlaskit/editor-plugin-analytics");
27
27
  var _editorPluginPlaceholder = require("@atlaskit/editor-plugin-placeholder");
28
- var _annotation = _interopRequireDefault(require("../plugins/annotation"));
28
+ var _editorPluginAnnotation = require("@atlaskit/editor-plugin-annotation");
29
29
  var _editorPluginComposition = require("@atlaskit/editor-plugin-composition");
30
30
  var _editorPluginQuickInsert = require("@atlaskit/editor-plugin-quick-insert");
31
31
  var _editorPluginSelection = require("@atlaskit/editor-plugin-selection");
@@ -61,7 +61,7 @@ function createDefaultPreset(options) {
61
61
  return builder.add(p);
62
62
  }
63
63
  return builder;
64
- }).add([_editorPluginBlockType.blockTypePlugin, options.blockType]).add(_editorPluginClearMarksOnEmptyDoc.clearMarksOnEmptyDocPlugin).maybeAdd(_annotation.default, function (p, builder) {
64
+ }).add([_editorPluginBlockType.blockTypePlugin, options.blockType]).add(_editorPluginClearMarksOnEmptyDoc.clearMarksOnEmptyDocPlugin).maybeAdd(_editorPluginAnnotation.annotationPlugin, function (p, builder) {
65
65
  if (options.annotationProviders) {
66
66
  return builder.add([p, options.annotationProviders]);
67
67
  }
@@ -46,6 +46,7 @@ var _editorPluginToolbarListsIndentation = require("@atlaskit/editor-plugin-tool
46
46
  var _editorPluginCustomAutoformat = require("@atlaskit/editor-plugin-custom-autoformat");
47
47
  var _editorPluginAlignment = require("@atlaskit/editor-plugin-alignment");
48
48
  var _editorPluginDataConsumer = require("@atlaskit/editor-plugin-data-consumer");
49
+ var _editorPluginAnnotation = require("@atlaskit/editor-plugin-annotation");
49
50
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
50
51
  var _plugins = require("../plugins");
51
52
  var _utils = require("@atlaskit/editor-common/utils");
@@ -283,7 +284,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
283
284
  }]);
284
285
  }
285
286
  return builder;
286
- }).maybeAdd(_plugins.annotationPlugin, function (plugin, builder) {
287
+ }).maybeAdd(_editorPluginAnnotation.annotationPlugin, function (plugin, builder) {
287
288
  // See default list for when adding annotations with a provider
288
289
  if (!props.annotationProviders && props.allowConfluenceInlineComment) {
289
290
  return builder.add([plugin, undefined]);
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "SetAttrsStep", {
13
13
  Object.defineProperty(exports, "checkNodeDown", {
14
14
  enumerable: true,
15
15
  get: function get() {
16
- return _utils2.checkNodeDown;
16
+ return _utils.checkNodeDown;
17
17
  }
18
18
  });
19
19
  Object.defineProperty(exports, "getNodesCount", {
@@ -32,32 +32,31 @@ Object.defineProperty(exports, "insideTable", {
32
32
  Object.defineProperty(exports, "insideTableCell", {
33
33
  enumerable: true,
34
34
  get: function get() {
35
- return _utils2.insideTableCell;
35
+ return _utils.insideTableCell;
36
36
  }
37
37
  });
38
38
  Object.defineProperty(exports, "isElementInTableCell", {
39
39
  enumerable: true,
40
40
  get: function get() {
41
- return _utils2.isElementInTableCell;
41
+ return _utils.isElementInTableCell;
42
42
  }
43
43
  });
44
44
  Object.defineProperty(exports, "isEmptyNode", {
45
45
  enumerable: true,
46
46
  get: function get() {
47
- return _utils2.isEmptyNode;
47
+ return _utils.isEmptyNode;
48
48
  }
49
49
  });
50
50
  Object.defineProperty(exports, "isInListItem", {
51
51
  enumerable: true,
52
52
  get: function get() {
53
- return _utils2.isInListItem;
53
+ return _utils.isInListItem;
54
54
  }
55
55
  });
56
- exports.isInsideBlockQuote = void 0;
57
56
  Object.defineProperty(exports, "isLastItemMediaGroup", {
58
57
  enumerable: true,
59
58
  get: function get() {
60
- return _utils2.isLastItemMediaGroup;
59
+ return _utils.isLastItemMediaGroup;
61
60
  }
62
61
  });
63
62
  Object.defineProperty(exports, "isLinkMark", {
@@ -76,7 +75,7 @@ Object.defineProperty(exports, "isParagraph", {
76
75
  Object.defineProperty(exports, "isSelectionInsideLastNodeInDocument", {
77
76
  enumerable: true,
78
77
  get: function get() {
79
- return _utils2.isSelectionInsideLastNodeInDocument;
78
+ return _utils.isSelectionInsideLastNodeInDocument;
80
79
  }
81
80
  });
82
81
  exports.isTemporary = void 0;
@@ -89,7 +88,7 @@ Object.defineProperty(exports, "isText", {
89
88
  Object.defineProperty(exports, "isTextSelection", {
90
89
  enumerable: true,
91
90
  get: function get() {
92
- return _utils2.isTextSelection;
91
+ return _utils.isTextSelection;
93
92
  }
94
93
  });
95
94
  Object.defineProperty(exports, "measurements", {
@@ -101,7 +100,7 @@ Object.defineProperty(exports, "measurements", {
101
100
  Object.defineProperty(exports, "nodeToJSON", {
102
101
  enumerable: true,
103
102
  get: function get() {
104
- return _utils2.nodeToJSON;
103
+ return _utils.nodeToJSON;
105
104
  }
106
105
  });
107
106
  Object.defineProperty(exports, "nodesBetweenChanged", {
@@ -113,7 +112,7 @@ Object.defineProperty(exports, "nodesBetweenChanged", {
113
112
  Object.defineProperty(exports, "nonNullable", {
114
113
  enumerable: true,
115
114
  get: function get() {
116
- return _utils2.nonNullable;
115
+ return _utils.nonNullable;
117
116
  }
118
117
  });
119
118
  Object.defineProperty(exports, "setNodeSelection", {
@@ -133,13 +132,12 @@ exports.sum = sum;
133
132
  Object.defineProperty(exports, "toJSON", {
134
133
  enumerable: true,
135
134
  get: function get() {
136
- return _utils2.toJSON;
135
+ return _utils.toJSON;
137
136
  }
138
137
  });
139
138
  exports.whichTransitionEvent = whichTransitionEvent;
140
139
  var _commands = require("@atlaskit/editor-prosemirror/commands");
141
- var _utils = require("@atlaskit/editor-prosemirror/utils");
142
- var _utils2 = require("@atlaskit/editor-common/utils");
140
+ var _utils = require("@atlaskit/editor-common/utils");
143
141
  var _coreUtils = require("@atlaskit/editor-common/core-utils");
144
142
  var _document = require("./document");
145
143
  var _nodes = require("./nodes");
@@ -234,10 +232,6 @@ var isTemporary = exports.isTemporary = function isTemporary(id) {
234
232
  var hasOpenEnd = exports.hasOpenEnd = function hasOpenEnd(slice) {
235
233
  return slice.openStart > 0 || slice.openEnd > 0;
236
234
  };
237
- var isInsideBlockQuote = exports.isInsideBlockQuote = function isInsideBlockQuote(state) {
238
- var blockquote = state.schema.nodes.blockquote;
239
- return (0, _utils.hasParentNodeOfType)(blockquote)(state.selection);
240
- };
241
235
  function sum(arr, f) {
242
236
  return arr.reduce(function (val, x) {
243
237
  return val + f(x);
@@ -8,6 +8,5 @@ var _default = exports.default = {
8
8
  EDITOR_MOUNTED: 'Editor Component Mount Time',
9
9
  PROSEMIRROR_RENDERED: 'ProseMirror Render Time',
10
10
  PROSEMIRROR_CONTENT_RENDERED: 'ProseMirror Content Render Time',
11
- ON_EDITOR_READY_CALLBACK: 'onEditorReady Callback Duration',
12
- PASTE: 'Editor Paste Plugin Paste Duration'
11
+ ON_EDITOR_READY_CALLBACK: 'onEditorReady Callback Duration'
13
12
  };
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "190.1.20";
8
+ var version = exports.version = "190.1.24";
@@ -31,7 +31,17 @@ export const EditorInternal = /*#__PURE__*/memo(({
31
31
  }) => {
32
32
  var _props$performanceTra, _props$performanceTra2, _props$performanceTra3, _props$performanceTra4;
33
33
  const Component = getUiComponent(props.appearance);
34
- const setEditorApi = useSetPresetContext();
34
+ const _setInternalEditorApi = useSetPresetContext();
35
+ const setEditorApi = useCallback(api => {
36
+ if (_setInternalEditorApi) {
37
+ _setInternalEditorApi(api);
38
+ }
39
+
40
+ // This is an workaround to unblock Editor Lego Decoupling project, if you have questions ping us #cc-editor-lego
41
+ // We may clean up this code when EditorActions deprecation process starts
42
+ // @ts-expect-error 2339: Property '__EDITOR_INTERNALS_DO_NOT_USE__API' does not exist on type 'EditorActions<any>'.
43
+ editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
44
+ }, [_setInternalEditorApi, editorActions]);
35
45
  const overriddenEditorProps = {
36
46
  ...props,
37
47
  onSave: props.onSave ? handleSave : undefined,
@@ -533,7 +533,12 @@ export class ReactEditorView extends React.Component {
533
533
  getEditorState: this.getEditorState,
534
534
  getEditorView: this.getEditorView
535
535
  });
536
- (_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 ? void 0 : _props$setEditorApi.call(props, this.pluginInjectionAPI.api());
536
+ const api = this.pluginInjectionAPI.api();
537
+ (_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 ? void 0 : _props$setEditorApi.call(props, api);
538
+ if (props.editorProps.editorActions) {
539
+ // @ts-expect-error
540
+ props.editorProps.editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
541
+ }
537
542
  this.eventDispatcher = new EventDispatcher();
538
543
  this.dispatch = createDispatch(this.eventDispatcher);
539
544
  this.errorReporter = createErrorReporter(props.editorProps.errorReporterHandler);
@@ -11,7 +11,20 @@ export { default as ContextPanel } from './ui/ContextPanel';
11
11
  export { EmojiResource } from '@atlaskit/emoji/resource';
12
12
  export { MentionResource } from '@atlaskit/mention/resource';
13
13
  export { TeamMentionResource } from '@atlaskit/mention/team-resource';
14
- export { AnnotationUpdateEmitter } from './plugins/annotation';
14
+ /**
15
+ * @deprecated
16
+ * DO NOT USE THIS WILL BE REMOVED SOON AND IS UNSAFE.
17
+ * This is here while we work to extract the annotation plugin.
18
+ * Please use the export from `@atlaskit/editor-common/annotation`.
19
+ */
20
+ export { AnnotationUpdateEmitter } from '@atlaskit/editor-common/annotation';
21
+
22
+ /**
23
+ * @deprecated
24
+ * DO NOT USE THIS WILL BE REMOVED SOON AND IS UNSAFE.
25
+ * This is here while we work to extract the annotation plugin.
26
+ * Please use the export from `@atlaskit/editor-plugin-annotation`.
27
+ */
15
28
 
16
29
  // Used in mobile bridge
17
30
 
@@ -2,7 +2,6 @@ export { default as collabEditPlugin } from './collab-edit';
2
2
  export { default as extensionPlugin } from './extension';
3
3
  export { default as jiraIssuePlugin } from './jira-issue';
4
4
  export { default as pastePlugin } from './paste';
5
- export { default as annotationPlugin } from './annotation';
6
5
  export { default as feedbackDialogPlugin } from './feedback-dialog';
7
6
  export { default as findReplacePlugin } from './find-replace';
8
7
  export { default as avatarGroupPlugin } from './avatar-group';
@@ -13,16 +13,21 @@ import { escapeLinks, htmlContainsSingleFile, isPastedFromWord, isPastedFromExce
13
13
  import { transformSliceNestedExpandToExpand, transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, transformSliceToDecisionList } from '@atlaskit/editor-common/transforms';
14
14
  import { handleMacroAutoConvert, handleMention, handleParagraphBlockMarks } from '../handlers';
15
15
  import { createPasteMeasurePayload, getContentNodeTypes, handlePasteAsPlainTextWithAnalytics, handlePasteIntoTaskAndDecisionWithAnalytics, handleCodeBlockWithAnalytics, handleMediaSingleWithAnalytics, handlePastePreservingMarksWithAnalytics, handleMarkdownWithAnalytics, handleRichTextWithAnalytics, handleExpandWithAnalytics, handleSelectedTableWithAnalytics, handlePasteLinkOnSelectedTextWithAnalytics, sendPasteAnalyticsEvent, handlePasteIntoCaptionWithAnalytics, handlePastePanelOrDecisionIntoListWithAnalytics, handlePasteNonNestableBlockNodesIntoListWithAnalytics } from './analytics';
16
- import { isInsideBlockQuote, insideTable, measurements } from '../../../utils';
16
+ import { insideTable } from '@atlaskit/editor-common/core-utils';
17
17
  import { upgradeTextToLists, splitParagraphs } from '../commands';
18
- // TODO: ED-20519 It requires annotation extraction to use the plugin injection API
19
- import { stripNonExistingAnnotations } from '../../annotation/utils';
20
18
  import { clipboardTextSerializer } from './clipboard-text-serializer';
21
19
  import { htmlHasIncompleteTable, tryRebuildCompleteTableHtml, isPastedFromTinyMCEConfluence } from '../util/tinyMCE';
22
20
  import { pluginKey as stateKey, createPluginState } from './plugin-factory';
23
21
  export { pluginKey as stateKey } from './plugin-factory';
24
22
  import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
25
23
  import { PastePluginActionTypes } from '../actions';
24
+ export const isInsideBlockQuote = state => {
25
+ const {
26
+ blockquote
27
+ } = state.schema.nodes;
28
+ return hasParentNodeOfType(blockquote)(state.selection);
29
+ };
30
+ const PASTE = 'Editor Paste Plugin Paste Duration';
26
31
  export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pluginInjectionApi, cardOptions, sanitizePrivateContent, providerFactory) {
27
32
  var _pluginInjectionApi$a;
28
33
  const editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
@@ -144,7 +149,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
144
149
  if (pasteTrackingEnabled) {
145
150
  const content = getContentNodeTypes(slice.content);
146
151
  const pasteId = uuid();
147
- const measureName = `${measurements.PASTE}_${pasteId}`;
152
+ const measureName = `${PASTE}_${pasteId}`;
148
153
  measureRender(measureName, ({
149
154
  duration,
150
155
  distortedDuration
@@ -339,7 +344,8 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
339
344
  // remove annotation marks from the pasted data if they are not present in the document
340
345
  // for the cases when they are pasted from external pages
341
346
  if (slice.content.size && containsAnyAnnotations(slice, state)) {
342
- stripNonExistingAnnotations(slice, state);
347
+ var _pluginInjectionApi$a4;
348
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a4 = pluginInjectionApi.annotation) === null || _pluginInjectionApi$a4 === void 0 ? void 0 : _pluginInjectionApi$a4.actions.stripNonExistingAnnotations(slice, state);
343
349
  }
344
350
 
345
351
  // ED-4732
@@ -19,7 +19,7 @@ import { floatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar'
19
19
  import { clipboardPlugin } from '@atlaskit/editor-plugin-clipboard';
20
20
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
21
21
  import { placeholderPlugin } from '@atlaskit/editor-plugin-placeholder';
22
- import annotationPlugin from '../plugins/annotation';
22
+ import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
23
23
  import { compositionPlugin } from '@atlaskit/editor-plugin-composition';
24
24
  import { quickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
25
25
  import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
@@ -36,8 +36,9 @@ import { toolbarListsIndentationPlugin } from '@atlaskit/editor-plugin-toolbar-l
36
36
  import { customAutoformatPlugin } from '@atlaskit/editor-plugin-custom-autoformat';
37
37
  import { alignmentPlugin } from '@atlaskit/editor-plugin-alignment';
38
38
  import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
39
+ import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
39
40
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
40
- import { annotationPlugin, avatarGroupPlugin, beforePrimaryToolbarPlugin, collabEditPlugin, extensionPlugin, feedbackDialogPlugin, findReplacePlugin, jiraIssuePlugin } from '../plugins';
41
+ import { avatarGroupPlugin, beforePrimaryToolbarPlugin, collabEditPlugin, extensionPlugin, feedbackDialogPlugin, findReplacePlugin, jiraIssuePlugin } from '../plugins';
41
42
  import { shouldForceTracking } from '@atlaskit/editor-common/utils';
42
43
  import { isFullPage as fullPageCheck } from '../utils/is-full-page';
43
44
  import { createDefaultPreset } from './default';
@@ -1,5 +1,4 @@
1
1
  import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
2
- import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
3
2
  export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem, toJSON, nodeToJSON } from '@atlaskit/editor-common/utils';
4
3
  export { insideTable } from '@atlaskit/editor-common/core-utils';
5
4
  export { nodesBetweenChanged, getNodesCount } from './document';
@@ -94,12 +93,6 @@ export const isTemporary = id => {
94
93
  export const hasOpenEnd = slice => {
95
94
  return slice.openStart > 0 || slice.openEnd > 0;
96
95
  };
97
- export const isInsideBlockQuote = state => {
98
- const {
99
- blockquote
100
- } = state.schema.nodes;
101
- return hasParentNodeOfType(blockquote)(state.selection);
102
- };
103
96
  export { isTextSelection, isElementInTableCell, isLastItemMediaGroup, nonNullable } from '@atlaskit/editor-common/utils';
104
97
  export function sum(arr, f) {
105
98
  return arr.reduce((val, x) => val + f(x), 0);
@@ -2,6 +2,5 @@ export default {
2
2
  EDITOR_MOUNTED: 'Editor Component Mount Time',
3
3
  PROSEMIRROR_RENDERED: 'ProseMirror Render Time',
4
4
  PROSEMIRROR_CONTENT_RENDERED: 'ProseMirror Content Render Time',
5
- ON_EDITOR_READY_CALLBACK: 'onEditorReady Callback Duration',
6
- PASTE: 'Editor Paste Plugin Paste Duration'
5
+ ON_EDITOR_READY_CALLBACK: 'onEditorReady Callback Duration'
7
6
  };
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "190.1.20";
2
+ export const version = "190.1.24";
@@ -33,7 +33,17 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
33
33
  onEditorDestroyed = _ref.onEditorDestroyed,
34
34
  preset = _ref.preset;
35
35
  var Component = getUiComponent(props.appearance);
36
- var setEditorApi = useSetPresetContext();
36
+ var _setInternalEditorApi = useSetPresetContext();
37
+ var setEditorApi = useCallback(function (api) {
38
+ if (_setInternalEditorApi) {
39
+ _setInternalEditorApi(api);
40
+ }
41
+
42
+ // This is an workaround to unblock Editor Lego Decoupling project, if you have questions ping us #cc-editor-lego
43
+ // We may clean up this code when EditorActions deprecation process starts
44
+ // @ts-expect-error 2339: Property '__EDITOR_INTERNALS_DO_NOT_USE__API' does not exist on type 'EditorActions<any>'.
45
+ editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
46
+ }, [_setInternalEditorApi, editorActions]);
37
47
  var overriddenEditorProps = _objectSpread(_objectSpread({}, props), {}, {
38
48
  onSave: props.onSave ? handleSave : undefined,
39
49
  // noop all analytic events, even if a handler is still passed.
@@ -530,7 +530,12 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
530
530
  getEditorState: _this.getEditorState,
531
531
  getEditorView: _this.getEditorView
532
532
  });
533
- (_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 || _props$setEditorApi.call(props, _this.pluginInjectionAPI.api());
533
+ var api = _this.pluginInjectionAPI.api();
534
+ (_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 || _props$setEditorApi.call(props, api);
535
+ if (props.editorProps.editorActions) {
536
+ // @ts-expect-error
537
+ props.editorProps.editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
538
+ }
534
539
  _this.eventDispatcher = new EventDispatcher();
535
540
  _this.dispatch = createDispatch(_this.eventDispatcher);
536
541
  _this.errorReporter = createErrorReporter(props.editorProps.errorReporterHandler);
package/dist/esm/index.js CHANGED
@@ -11,7 +11,20 @@ export { default as ContextPanel } from './ui/ContextPanel';
11
11
  export { EmojiResource } from '@atlaskit/emoji/resource';
12
12
  export { MentionResource } from '@atlaskit/mention/resource';
13
13
  export { TeamMentionResource } from '@atlaskit/mention/team-resource';
14
- export { AnnotationUpdateEmitter } from './plugins/annotation';
14
+ /**
15
+ * @deprecated
16
+ * DO NOT USE THIS WILL BE REMOVED SOON AND IS UNSAFE.
17
+ * This is here while we work to extract the annotation plugin.
18
+ * Please use the export from `@atlaskit/editor-common/annotation`.
19
+ */
20
+ export { AnnotationUpdateEmitter } from '@atlaskit/editor-common/annotation';
21
+
22
+ /**
23
+ * @deprecated
24
+ * DO NOT USE THIS WILL BE REMOVED SOON AND IS UNSAFE.
25
+ * This is here while we work to extract the annotation plugin.
26
+ * Please use the export from `@atlaskit/editor-plugin-annotation`.
27
+ */
15
28
 
16
29
  // Used in mobile bridge
17
30
 
@@ -2,7 +2,6 @@ export { default as collabEditPlugin } from './collab-edit';
2
2
  export { default as extensionPlugin } from './extension';
3
3
  export { default as jiraIssuePlugin } from './jira-issue';
4
4
  export { default as pastePlugin } from './paste';
5
- export { default as annotationPlugin } from './annotation';
6
5
  export { default as feedbackDialogPlugin } from './feedback-dialog';
7
6
  export { default as findReplacePlugin } from './find-replace';
8
7
  export { default as avatarGroupPlugin } from './avatar-group';
@@ -15,16 +15,19 @@ import { escapeLinks, htmlContainsSingleFile, isPastedFromWord, isPastedFromExce
15
15
  import { transformSliceNestedExpandToExpand, transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, transformSliceToDecisionList } from '@atlaskit/editor-common/transforms';
16
16
  import { handleMacroAutoConvert, handleMention, handleParagraphBlockMarks } from '../handlers';
17
17
  import { createPasteMeasurePayload, getContentNodeTypes, handlePasteAsPlainTextWithAnalytics, handlePasteIntoTaskAndDecisionWithAnalytics, handleCodeBlockWithAnalytics, handleMediaSingleWithAnalytics, handlePastePreservingMarksWithAnalytics, handleMarkdownWithAnalytics, handleRichTextWithAnalytics, handleExpandWithAnalytics, handleSelectedTableWithAnalytics, handlePasteLinkOnSelectedTextWithAnalytics, sendPasteAnalyticsEvent, handlePasteIntoCaptionWithAnalytics, handlePastePanelOrDecisionIntoListWithAnalytics, handlePasteNonNestableBlockNodesIntoListWithAnalytics } from './analytics';
18
- import { isInsideBlockQuote, insideTable, measurements } from '../../../utils';
18
+ import { insideTable } from '@atlaskit/editor-common/core-utils';
19
19
  import { upgradeTextToLists, splitParagraphs } from '../commands';
20
- // TODO: ED-20519 It requires annotation extraction to use the plugin injection API
21
- import { stripNonExistingAnnotations } from '../../annotation/utils';
22
20
  import { clipboardTextSerializer } from './clipboard-text-serializer';
23
21
  import { htmlHasIncompleteTable, tryRebuildCompleteTableHtml, isPastedFromTinyMCEConfluence } from '../util/tinyMCE';
24
22
  import { pluginKey as stateKey, createPluginState } from './plugin-factory';
25
23
  export { pluginKey as stateKey } from './plugin-factory';
26
24
  import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
27
25
  import { PastePluginActionTypes } from '../actions';
26
+ export var isInsideBlockQuote = function isInsideBlockQuote(state) {
27
+ var blockquote = state.schema.nodes.blockquote;
28
+ return hasParentNodeOfType(blockquote)(state.selection);
29
+ };
30
+ var PASTE = 'Editor Paste Plugin Paste Duration';
28
31
  export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pluginInjectionApi, cardOptions, sanitizePrivateContent, providerFactory) {
29
32
  var _pluginInjectionApi$a;
30
33
  var editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
@@ -167,7 +170,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
167
170
  if (pasteTrackingEnabled) {
168
171
  var content = getContentNodeTypes(slice.content);
169
172
  var pasteId = uuid();
170
- var measureName = "".concat(measurements.PASTE, "_").concat(pasteId);
173
+ var measureName = "".concat(PASTE, "_").concat(pasteId);
171
174
  measureRender(measureName, function (_ref) {
172
175
  var duration = _ref.duration,
173
176
  distortedDuration = _ref.distortedDuration;
@@ -357,7 +360,8 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
357
360
  // remove annotation marks from the pasted data if they are not present in the document
358
361
  // for the cases when they are pasted from external pages
359
362
  if (slice.content.size && containsAnyAnnotations(slice, state)) {
360
- stripNonExistingAnnotations(slice, state);
363
+ var _pluginInjectionApi$a3;
364
+ pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a3 = pluginInjectionApi.annotation) === null || _pluginInjectionApi$a3 === void 0 || _pluginInjectionApi$a3.actions.stripNonExistingAnnotations(slice, state);
361
365
  }
362
366
 
363
367
  // ED-4732
@@ -19,7 +19,7 @@ import { floatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar'
19
19
  import { clipboardPlugin } from '@atlaskit/editor-plugin-clipboard';
20
20
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
21
21
  import { placeholderPlugin } from '@atlaskit/editor-plugin-placeholder';
22
- import annotationPlugin from '../plugins/annotation';
22
+ import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
23
23
  import { compositionPlugin } from '@atlaskit/editor-plugin-composition';
24
24
  import { quickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
25
25
  import { selectionPlugin } from '@atlaskit/editor-plugin-selection';