@atlaskit/editor-core 190.1.19 → 190.1.23

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 (123) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/dist/cjs/create-editor/ErrorBoundary.js +9 -5
  4. package/dist/cjs/index.js +1 -1
  5. package/dist/cjs/plugins/index.js +0 -7
  6. package/dist/cjs/plugins/paste/pm-plugins/main.js +14 -10
  7. package/dist/cjs/presets/default.js +2 -2
  8. package/dist/cjs/presets/universal.js +2 -1
  9. package/dist/cjs/utils/index.js +12 -18
  10. package/dist/cjs/utils/performance/measure-enum.js +1 -2
  11. package/dist/cjs/version-wrapper.js +1 -1
  12. package/dist/es2019/create-editor/ErrorBoundary.js +10 -7
  13. package/dist/es2019/index.js +14 -1
  14. package/dist/es2019/plugins/index.js +0 -1
  15. package/dist/es2019/plugins/paste/pm-plugins/main.js +11 -5
  16. package/dist/es2019/presets/default.js +1 -1
  17. package/dist/es2019/presets/universal.js +2 -1
  18. package/dist/es2019/utils/index.js +0 -7
  19. package/dist/es2019/utils/performance/measure-enum.js +1 -2
  20. package/dist/es2019/version-wrapper.js +1 -1
  21. package/dist/esm/create-editor/ErrorBoundary.js +10 -7
  22. package/dist/esm/index.js +14 -1
  23. package/dist/esm/plugins/index.js +0 -1
  24. package/dist/esm/plugins/paste/pm-plugins/main.js +9 -5
  25. package/dist/esm/presets/default.js +1 -1
  26. package/dist/esm/presets/universal.js +2 -1
  27. package/dist/esm/utils/index.js +0 -5
  28. package/dist/esm/utils/performance/measure-enum.js +1 -2
  29. package/dist/esm/version-wrapper.js +1 -1
  30. package/dist/types/index.d.ts +15 -2
  31. package/dist/types/plugins/index.d.ts +0 -1
  32. package/dist/types/plugins/paste/pm-plugins/main.d.ts +2 -0
  33. package/dist/types/presets/default.d.ts +1 -1
  34. package/dist/types/types/editor-props.d.ts +1 -1
  35. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
  36. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  37. package/dist/types/utils/index.d.ts +0 -1
  38. package/dist/types/utils/performance/measure-enum.d.ts +0 -1
  39. package/dist/types-ts4.5/index.d.ts +15 -2
  40. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  41. package/dist/types-ts4.5/plugins/paste/pm-plugins/main.d.ts +2 -0
  42. package/dist/types-ts4.5/presets/default.d.ts +1 -1
  43. package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
  44. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
  45. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
  46. package/dist/types-ts4.5/utils/index.d.ts +0 -1
  47. package/dist/types-ts4.5/utils/performance/measure-enum.d.ts +0 -1
  48. package/package.json +10 -4
  49. package/dist/cjs/plugins/annotation/commands/index.js +0 -150
  50. package/dist/cjs/plugins/annotation/commands/transform.js +0 -86
  51. package/dist/cjs/plugins/annotation/index.js +0 -130
  52. package/dist/cjs/plugins/annotation/nodeviews/index.js +0 -59
  53. package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +0 -243
  54. package/dist/cjs/plugins/annotation/pm-plugins/keymap.js +0 -15
  55. package/dist/cjs/plugins/annotation/pm-plugins/plugin-factory.js +0 -107
  56. package/dist/cjs/plugins/annotation/pm-plugins/reducer.js +0 -84
  57. package/dist/cjs/plugins/annotation/pm-plugins/types.js +0 -17
  58. package/dist/cjs/plugins/annotation/toolbar.js +0 -59
  59. package/dist/cjs/plugins/annotation/types.js +0 -20
  60. package/dist/cjs/plugins/annotation/ui/AnnotationViewWrapper.js +0 -38
  61. package/dist/cjs/plugins/annotation/ui/InlineCommentView.js +0 -149
  62. package/dist/cjs/plugins/annotation/update-provider.js +0 -36
  63. package/dist/cjs/plugins/annotation/utils.js +0 -372
  64. package/dist/es2019/plugins/annotation/commands/index.js +0 -123
  65. package/dist/es2019/plugins/annotation/commands/transform.js +0 -64
  66. package/dist/es2019/plugins/annotation/index.js +0 -125
  67. package/dist/es2019/plugins/annotation/nodeviews/index.js +0 -31
  68. package/dist/es2019/plugins/annotation/pm-plugins/inline-comment.js +0 -178
  69. package/dist/es2019/plugins/annotation/pm-plugins/keymap.js +0 -9
  70. package/dist/es2019/plugins/annotation/pm-plugins/plugin-factory.js +0 -108
  71. package/dist/es2019/plugins/annotation/pm-plugins/reducer.js +0 -94
  72. package/dist/es2019/plugins/annotation/pm-plugins/types.js +0 -11
  73. package/dist/es2019/plugins/annotation/toolbar.js +0 -53
  74. package/dist/es2019/plugins/annotation/types.js +0 -14
  75. package/dist/es2019/plugins/annotation/ui/AnnotationViewWrapper.js +0 -14
  76. package/dist/es2019/plugins/annotation/ui/InlineCommentView.js +0 -147
  77. package/dist/es2019/plugins/annotation/update-provider.js +0 -9
  78. package/dist/es2019/plugins/annotation/utils.js +0 -334
  79. package/dist/esm/plugins/annotation/commands/index.js +0 -143
  80. package/dist/esm/plugins/annotation/commands/transform.js +0 -80
  81. package/dist/esm/plugins/annotation/index.js +0 -118
  82. package/dist/esm/plugins/annotation/nodeviews/index.js +0 -52
  83. package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +0 -236
  84. package/dist/esm/plugins/annotation/pm-plugins/keymap.js +0 -9
  85. package/dist/esm/plugins/annotation/pm-plugins/plugin-factory.js +0 -101
  86. package/dist/esm/plugins/annotation/pm-plugins/reducer.js +0 -77
  87. package/dist/esm/plugins/annotation/pm-plugins/types.js +0 -11
  88. package/dist/esm/plugins/annotation/toolbar.js +0 -52
  89. package/dist/esm/plugins/annotation/types.js +0 -14
  90. package/dist/esm/plugins/annotation/ui/AnnotationViewWrapper.js +0 -31
  91. package/dist/esm/plugins/annotation/ui/InlineCommentView.js +0 -144
  92. package/dist/esm/plugins/annotation/update-provider.js +0 -29
  93. package/dist/esm/plugins/annotation/utils.js +0 -345
  94. package/dist/types/plugins/annotation/commands/index.d.ts +0 -15
  95. package/dist/types/plugins/annotation/commands/transform.d.ts +0 -11
  96. package/dist/types/plugins/annotation/index.d.ts +0 -15
  97. package/dist/types/plugins/annotation/nodeviews/index.d.ts +0 -11
  98. package/dist/types/plugins/annotation/pm-plugins/inline-comment.d.ts +0 -3
  99. package/dist/types/plugins/annotation/pm-plugins/keymap.d.ts +0 -3
  100. package/dist/types/plugins/annotation/pm-plugins/plugin-factory.d.ts +0 -2
  101. package/dist/types/plugins/annotation/pm-plugins/reducer.d.ts +0 -3
  102. package/dist/types/plugins/annotation/pm-plugins/types.d.ts +0 -78
  103. package/dist/types/plugins/annotation/toolbar.d.ts +0 -5
  104. package/dist/types/plugins/annotation/types.d.ts +0 -86
  105. package/dist/types/plugins/annotation/ui/AnnotationViewWrapper.d.ts +0 -10
  106. package/dist/types/plugins/annotation/ui/InlineCommentView.d.ts +0 -13
  107. package/dist/types/plugins/annotation/update-provider.d.ts +0 -12
  108. package/dist/types/plugins/annotation/utils.d.ts +0 -45
  109. package/dist/types-ts4.5/plugins/annotation/commands/index.d.ts +0 -15
  110. package/dist/types-ts4.5/plugins/annotation/commands/transform.d.ts +0 -11
  111. package/dist/types-ts4.5/plugins/annotation/index.d.ts +0 -17
  112. package/dist/types-ts4.5/plugins/annotation/nodeviews/index.d.ts +0 -11
  113. package/dist/types-ts4.5/plugins/annotation/pm-plugins/inline-comment.d.ts +0 -3
  114. package/dist/types-ts4.5/plugins/annotation/pm-plugins/keymap.d.ts +0 -3
  115. package/dist/types-ts4.5/plugins/annotation/pm-plugins/plugin-factory.d.ts +0 -2
  116. package/dist/types-ts4.5/plugins/annotation/pm-plugins/reducer.d.ts +0 -3
  117. package/dist/types-ts4.5/plugins/annotation/pm-plugins/types.d.ts +0 -78
  118. package/dist/types-ts4.5/plugins/annotation/toolbar.d.ts +0 -5
  119. package/dist/types-ts4.5/plugins/annotation/types.d.ts +0 -86
  120. package/dist/types-ts4.5/plugins/annotation/ui/AnnotationViewWrapper.d.ts +0 -10
  121. package/dist/types-ts4.5/plugins/annotation/ui/InlineCommentView.d.ts +0 -13
  122. package/dist/types-ts4.5/plugins/annotation/update-provider.d.ts +0 -12
  123. 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.23
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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.
8
+ - Updated dependencies
9
+
10
+ ## 190.1.20
11
+
12
+ ### Patch Changes
13
+
14
+ - [#63392](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63392) [`7240ee0cf279`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7240ee0cf279) - [ED-21646] Only rerender once in error boundary to avoid overreporting and infinite rerendering
15
+ - [#62416](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/62416) [`9f3c36680d89`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9f3c36680d89) - [ux] Updated table context menu styling.
16
+ - Updated dependencies
17
+
3
18
  ## 190.1.19
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
  },
@@ -16,13 +16,13 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _react = _interopRequireDefault(require("react"));
18
18
  var _uuid = _interopRequireDefault(require("uuid"));
19
+ var _analytics = require("@atlaskit/editor-common/analytics");
20
+ var _monitoring = require("@atlaskit/editor-common/monitoring");
19
21
  var _ufo = require("@atlaskit/editor-common/ufo");
20
22
  var _ui = require("@atlaskit/editor-common/ui");
21
23
  var _utils = require("@atlaskit/editor-common/utils");
22
- var _analytics = require("@atlaskit/editor-common/analytics");
23
24
  var _documentLogger = require("../utils/document-logger");
24
25
  var _WithEditorView = require("./WithEditorView");
25
- var _monitoring = require("@atlaskit/editor-common/monitoring");
26
26
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
27
27
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
28
28
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -151,6 +151,10 @@ var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PUR
151
151
  key: "componentDidCatch",
152
152
  value: function componentDidCatch(error, errorInfo) {
153
153
  var _this2 = this;
154
+ // Only report and re-render once, to avoid over-reporting errors and infinite rerendering
155
+ if (this.state.error) {
156
+ return;
157
+ }
154
158
  if (this.props.errorTracking) {
155
159
  this.sendErrorData({
156
160
  error: error,
@@ -159,13 +163,13 @@ var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PUR
159
163
  });
160
164
  }
161
165
 
162
- // // Update state to allow a re-render to attempt graceful recovery (in the event that
163
- // // the error was caused by a race condition or is intermittent)
166
+ // Update state to allow a re-render to attempt graceful recovery (in the event that
167
+ // the error was caused by a race condition or is intermittent)
164
168
  this.setState({
165
169
  error: error
166
170
  }, function () {
167
171
  if (_this2.props.rethrow) {
168
- // Now that a re-render has occured, we re-throw to allow product error boundaries
172
+ // Now that a re-render has occurred, we re-throw to allow product error boundaries
169
173
  // to catch and handle the error too.
170
174
  //
171
175
  // Note that when rethrowing inside a error boundary, the stack trace
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.19";
8
+ var version = exports.version = "190.1.23";
@@ -1,14 +1,13 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import uuid from 'uuid';
4
+ import { ACTION, ACTION_SUBJECT, editorAnalyticsChannel, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
5
+ import { logException } from '@atlaskit/editor-common/monitoring';
4
6
  import { ExperienceStore } from '@atlaskit/editor-common/ufo';
5
7
  import { IntlErrorBoundary } from '@atlaskit/editor-common/ui';
6
- import { sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
7
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE, editorAnalyticsChannel } from '@atlaskit/editor-common/analytics';
8
+ import { isOutdatedBrowser, sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
8
9
  import { getDocStructure } from '../utils/document-logger';
9
10
  import { WithEditorView } from './WithEditorView';
10
- import { isOutdatedBrowser } from '@atlaskit/editor-common/utils';
11
- import { logException } from '@atlaskit/editor-common/monitoring';
12
11
  export class ErrorBoundaryWithEditorView extends React.Component {
13
12
  constructor(props) {
14
13
  super(props);
@@ -99,6 +98,10 @@ export class ErrorBoundaryWithEditorView extends React.Component {
99
98
  }
100
99
  }
101
100
  componentDidCatch(error, errorInfo) {
101
+ // Only report and re-render once, to avoid over-reporting errors and infinite rerendering
102
+ if (this.state.error) {
103
+ return;
104
+ }
102
105
  if (this.props.errorTracking) {
103
106
  this.sendErrorData({
104
107
  error,
@@ -107,13 +110,13 @@ export class ErrorBoundaryWithEditorView extends React.Component {
107
110
  });
108
111
  }
109
112
 
110
- // // Update state to allow a re-render to attempt graceful recovery (in the event that
111
- // // the error was caused by a race condition or is intermittent)
113
+ // Update state to allow a re-render to attempt graceful recovery (in the event that
114
+ // the error was caused by a race condition or is intermittent)
112
115
  this.setState({
113
116
  error
114
117
  }, () => {
115
118
  if (this.props.rethrow) {
116
- // Now that a re-render has occured, we re-throw to allow product error boundaries
119
+ // Now that a re-render has occurred, we re-throw to allow product error boundaries
117
120
  // to catch and handle the error too.
118
121
  //
119
122
  // Note that when rethrowing inside a error boundary, the stack trace
@@ -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.19";
2
+ export const version = "190.1.23";
@@ -13,14 +13,13 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
13
13
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
14
14
  import React from 'react';
15
15
  import uuid from 'uuid';
16
+ import { ACTION, ACTION_SUBJECT, editorAnalyticsChannel, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
17
+ import { logException } from '@atlaskit/editor-common/monitoring';
16
18
  import { ExperienceStore } from '@atlaskit/editor-common/ufo';
17
19
  import { IntlErrorBoundary } from '@atlaskit/editor-common/ui';
18
- import { sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
19
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE, editorAnalyticsChannel } from '@atlaskit/editor-common/analytics';
20
+ import { isOutdatedBrowser, sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
20
21
  import { getDocStructure } from '../utils/document-logger';
21
22
  import { WithEditorView } from './WithEditorView';
22
- import { isOutdatedBrowser } from '@atlaskit/editor-common/utils';
23
- import { logException } from '@atlaskit/editor-common/monitoring';
24
23
  export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
25
24
  _inherits(ErrorBoundaryWithEditorView, _React$Component);
26
25
  var _super = _createSuper(ErrorBoundaryWithEditorView);
@@ -145,6 +144,10 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
145
144
  key: "componentDidCatch",
146
145
  value: function componentDidCatch(error, errorInfo) {
147
146
  var _this2 = this;
147
+ // Only report and re-render once, to avoid over-reporting errors and infinite rerendering
148
+ if (this.state.error) {
149
+ return;
150
+ }
148
151
  if (this.props.errorTracking) {
149
152
  this.sendErrorData({
150
153
  error: error,
@@ -153,13 +156,13 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
153
156
  });
154
157
  }
155
158
 
156
- // // Update state to allow a re-render to attempt graceful recovery (in the event that
157
- // // the error was caused by a race condition or is intermittent)
159
+ // Update state to allow a re-render to attempt graceful recovery (in the event that
160
+ // the error was caused by a race condition or is intermittent)
158
161
  this.setState({
159
162
  error: error
160
163
  }, function () {
161
164
  if (_this2.props.rethrow) {
162
- // Now that a re-render has occured, we re-throw to allow product error boundaries
165
+ // Now that a re-render has occurred, we re-throw to allow product error boundaries
163
166
  // to catch and handle the error too.
164
167
  //
165
168
  // Note that when rethrowing inside a error boundary, the stack trace
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';