@atlaskit/editor-plugin-avatar-group 1.5.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-avatar-group
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#134135](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/134135)
8
+ [`aff992988cf17`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/aff992988cf17) -
9
+ Refactor avatar plugin to use editorAPI instead of editorView
10
+
11
+ ## 1.5.3
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 1.5.2
4
18
 
5
19
  ### Patch Changes
@@ -42,12 +42,10 @@ var avatarGroupPlugin = exports.avatarGroupPlugin = function avatarGroupPlugin(_
42
42
  actions: {
43
43
  getToolbarItem: function getToolbarItem(_ref3) {
44
44
  var _api$featureFlags$sha, _api$featureFlags2, _api$analytics2;
45
- var editorView = _ref3.editorView,
46
- inviteToEditHandler = _ref3.inviteToEditHandler,
45
+ var inviteToEditHandler = _ref3.inviteToEditHandler,
47
46
  isInviteToEditButtonSelected = _ref3.isInviteToEditButtonSelected,
48
47
  inviteToEditComponent = _ref3.inviteToEditComponent;
49
48
  return /*#__PURE__*/_react.default.createElement(_avatarsWithPluginState.default, {
50
- editorView: editorView,
51
49
  featureFlags: (_api$featureFlags$sha = api === null || api === void 0 || (_api$featureFlags2 = api.featureFlags) === null || _api$featureFlags2 === void 0 ? void 0 : _api$featureFlags2.sharedState.currentState()) !== null && _api$featureFlags$sha !== void 0 ? _api$featureFlags$sha : {},
52
50
  editorAnalyticsAPI: api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions,
53
51
  editorAPI: api,
@@ -19,29 +19,29 @@ var _toAvatar = _interopRequireDefault(require("./to-avatar"));
19
19
 
20
20
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
21
21
 
22
- var scrollToCollabCursor = exports.scrollToCollabCursor = function scrollToCollabCursor(editorView, participants, sessionId, index, editorAnalyticsAPI) {
22
+ var scrollToCollabCursor = exports.scrollToCollabCursor = function scrollToCollabCursor(editorAPI, participants, sessionId, index, editorAnalyticsAPI) {
23
23
  var selectedUser = participants[index];
24
- if (selectedUser && selectedUser.cursorPos !== undefined && selectedUser.sessionId !== sessionId) {
25
- var state = editorView.state;
26
- var tr = state.tr;
24
+ var cursorPos = selectedUser.cursorPos;
25
+ if (selectedUser && cursorPos !== undefined && selectedUser.sessionId !== sessionId) {
26
+ var _editorAPI$core, _editorAPI$core2;
27
27
  var analyticsPayload = {
28
28
  action: _analytics2.ACTION.MATCHED,
29
29
  actionSubject: _analytics2.ACTION_SUBJECT.SELECTION,
30
30
  eventType: _analytics2.EVENT_TYPE.TRACK
31
31
  };
32
- tr.setSelection(_state.Selection.near(tr.doc.resolve(selectedUser.cursorPos)));
33
- editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(analyticsPayload)(tr);
34
- tr.scrollIntoView();
35
- editorView.dispatch(tr);
36
- if (!editorView.hasFocus()) {
37
- editorView.focus();
38
- }
32
+ editorAPI === null || editorAPI === void 0 || (_editorAPI$core = editorAPI.core) === null || _editorAPI$core === void 0 || (_editorAPI$core = _editorAPI$core.actions) === null || _editorAPI$core === void 0 || _editorAPI$core.execute(function (_ref) {
33
+ var tr = _ref.tr;
34
+ tr.setSelection(_state.Selection.near(tr.doc.resolve(cursorPos)));
35
+ editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(analyticsPayload)(tr);
36
+ tr.scrollIntoView();
37
+ return tr;
38
+ });
39
+ editorAPI === null || editorAPI === void 0 || (_editorAPI$core2 = editorAPI.core) === null || _editorAPI$core2 === void 0 || (_editorAPI$core2 = _editorAPI$core2.actions) === null || _editorAPI$core2 === void 0 || _editorAPI$core2.focus();
39
40
  }
40
41
  };
41
42
  var Avatars = exports.Avatars = /*#__PURE__*/_react.default.memo(function (props) {
42
43
  var _props$participants;
43
44
  var sessionId = props.sessionId,
44
- editorView = props.editorView,
45
45
  featureFlags = props.featureFlags,
46
46
  editorAPI = props.editorAPI;
47
47
  var participants = (_props$participants = props.participants) === null || _props$participants === void 0 ? void 0 : _props$participants.toArray();
@@ -63,14 +63,11 @@ var Avatars = exports.Avatars = /*#__PURE__*/_react.default.memo(function (props
63
63
  data: avatars,
64
64
  maxCount: 3,
65
65
  onAvatarClick: function onAvatarClick(_event, _analytics, index) {
66
- if (!editorView) {
67
- return;
68
- }
69
66
  var allowCollabAvatarScroll = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.collabAvatarScroll;
70
67
 
71
68
  // user does not need to scroll to their own position (index 0)
72
69
  if (allowCollabAvatarScroll && index > 0) {
73
- scrollToCollabCursor(editorView, participants, props.sessionId, index, props.editorAnalyticsAPI);
70
+ scrollToCollabCursor(editorAPI, participants, props.sessionId, index, props.editorAnalyticsAPI);
74
71
  }
75
72
  }
76
73
  }), props.children)
@@ -36,14 +36,12 @@ export const avatarGroupPlugin = ({
36
36
  primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && props.showAvatarGroup ? primaryToolbarComponent : undefined,
37
37
  actions: {
38
38
  getToolbarItem: ({
39
- editorView,
40
39
  inviteToEditHandler,
41
40
  isInviteToEditButtonSelected,
42
41
  inviteToEditComponent
43
42
  }) => {
44
43
  var _api$featureFlags$sha, _api$featureFlags2, _api$analytics2;
45
44
  return /*#__PURE__*/React.createElement(AvatarsWithPluginState, {
46
- editorView: editorView,
47
45
  featureFlags: (_api$featureFlags$sha = api === null || api === void 0 ? void 0 : (_api$featureFlags2 = api.featureFlags) === null || _api$featureFlags2 === void 0 ? void 0 : _api$featureFlags2.sharedState.currentState()) !== null && _api$featureFlags$sha !== void 0 ? _api$featureFlags$sha : {},
48
46
  editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions,
49
47
  editorAPI: api,
@@ -12,32 +12,31 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
12
12
  import { Selection } from '@atlaskit/editor-prosemirror/state';
13
13
  import { avatarContainerStyles } from './styles';
14
14
  import toAvatar from './to-avatar';
15
- export const scrollToCollabCursor = (editorView, participants, sessionId, index, editorAnalyticsAPI) => {
15
+ export const scrollToCollabCursor = (editorAPI, participants, sessionId, index, editorAnalyticsAPI) => {
16
16
  const selectedUser = participants[index];
17
- if (selectedUser && selectedUser.cursorPos !== undefined && selectedUser.sessionId !== sessionId) {
18
- const {
19
- state
20
- } = editorView;
21
- let tr = state.tr;
17
+ const cursorPos = selectedUser.cursorPos;
18
+ if (selectedUser && cursorPos !== undefined && selectedUser.sessionId !== sessionId) {
19
+ var _editorAPI$core, _editorAPI$core$actio, _editorAPI$core2, _editorAPI$core2$acti;
22
20
  const analyticsPayload = {
23
21
  action: ACTION.MATCHED,
24
22
  actionSubject: ACTION_SUBJECT.SELECTION,
25
23
  eventType: EVENT_TYPE.TRACK
26
24
  };
27
- tr.setSelection(Selection.near(tr.doc.resolve(selectedUser.cursorPos)));
28
- editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent(analyticsPayload)(tr);
29
- tr.scrollIntoView();
30
- editorView.dispatch(tr);
31
- if (!editorView.hasFocus()) {
32
- editorView.focus();
33
- }
25
+ editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$core = editorAPI.core) === null || _editorAPI$core === void 0 ? void 0 : (_editorAPI$core$actio = _editorAPI$core.actions) === null || _editorAPI$core$actio === void 0 ? void 0 : _editorAPI$core$actio.execute(({
26
+ tr
27
+ }) => {
28
+ tr.setSelection(Selection.near(tr.doc.resolve(cursorPos)));
29
+ editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent(analyticsPayload)(tr);
30
+ tr.scrollIntoView();
31
+ return tr;
32
+ });
33
+ editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$core2 = editorAPI.core) === null || _editorAPI$core2 === void 0 ? void 0 : (_editorAPI$core2$acti = _editorAPI$core2.actions) === null || _editorAPI$core2$acti === void 0 ? void 0 : _editorAPI$core2$acti.focus();
34
34
  }
35
35
  };
36
36
  export const Avatars = /*#__PURE__*/React.memo(props => {
37
37
  var _props$participants;
38
38
  const {
39
39
  sessionId,
40
- editorView,
41
40
  featureFlags,
42
41
  editorAPI
43
42
  } = props;
@@ -56,14 +55,11 @@ export const Avatars = /*#__PURE__*/React.memo(props => {
56
55
  data: avatars,
57
56
  maxCount: 3,
58
57
  onAvatarClick: (_event, _analytics, index) => {
59
- if (!editorView) {
60
- return;
61
- }
62
58
  const allowCollabAvatarScroll = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.collabAvatarScroll;
63
59
 
64
60
  // user does not need to scroll to their own position (index 0)
65
61
  if (allowCollabAvatarScroll && index > 0) {
66
- scrollToCollabCursor(editorView, participants, props.sessionId, index, props.editorAnalyticsAPI);
62
+ scrollToCollabCursor(editorAPI, participants, props.sessionId, index, props.editorAnalyticsAPI);
67
63
  }
68
64
  }
69
65
  }), props.children)
@@ -35,12 +35,10 @@ export var avatarGroupPlugin = function avatarGroupPlugin(_ref) {
35
35
  actions: {
36
36
  getToolbarItem: function getToolbarItem(_ref3) {
37
37
  var _api$featureFlags$sha, _api$featureFlags2, _api$analytics2;
38
- var editorView = _ref3.editorView,
39
- inviteToEditHandler = _ref3.inviteToEditHandler,
38
+ var inviteToEditHandler = _ref3.inviteToEditHandler,
40
39
  isInviteToEditButtonSelected = _ref3.isInviteToEditButtonSelected,
41
40
  inviteToEditComponent = _ref3.inviteToEditComponent;
42
41
  return /*#__PURE__*/React.createElement(AvatarsWithPluginState, {
43
- editorView: editorView,
44
42
  featureFlags: (_api$featureFlags$sha = api === null || api === void 0 || (_api$featureFlags2 = api.featureFlags) === null || _api$featureFlags2 === void 0 ? void 0 : _api$featureFlags2.sharedState.currentState()) !== null && _api$featureFlags$sha !== void 0 ? _api$featureFlags$sha : {},
45
43
  editorAnalyticsAPI: api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions,
46
44
  editorAPI: api,
@@ -12,29 +12,29 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
12
12
  import { Selection } from '@atlaskit/editor-prosemirror/state';
13
13
  import { avatarContainerStyles } from './styles';
14
14
  import toAvatar from './to-avatar';
15
- export var scrollToCollabCursor = function scrollToCollabCursor(editorView, participants, sessionId, index, editorAnalyticsAPI) {
15
+ export var scrollToCollabCursor = function scrollToCollabCursor(editorAPI, participants, sessionId, index, editorAnalyticsAPI) {
16
16
  var selectedUser = participants[index];
17
- if (selectedUser && selectedUser.cursorPos !== undefined && selectedUser.sessionId !== sessionId) {
18
- var state = editorView.state;
19
- var tr = state.tr;
17
+ var cursorPos = selectedUser.cursorPos;
18
+ if (selectedUser && cursorPos !== undefined && selectedUser.sessionId !== sessionId) {
19
+ var _editorAPI$core, _editorAPI$core2;
20
20
  var analyticsPayload = {
21
21
  action: ACTION.MATCHED,
22
22
  actionSubject: ACTION_SUBJECT.SELECTION,
23
23
  eventType: EVENT_TYPE.TRACK
24
24
  };
25
- tr.setSelection(Selection.near(tr.doc.resolve(selectedUser.cursorPos)));
26
- editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(analyticsPayload)(tr);
27
- tr.scrollIntoView();
28
- editorView.dispatch(tr);
29
- if (!editorView.hasFocus()) {
30
- editorView.focus();
31
- }
25
+ editorAPI === null || editorAPI === void 0 || (_editorAPI$core = editorAPI.core) === null || _editorAPI$core === void 0 || (_editorAPI$core = _editorAPI$core.actions) === null || _editorAPI$core === void 0 || _editorAPI$core.execute(function (_ref) {
26
+ var tr = _ref.tr;
27
+ tr.setSelection(Selection.near(tr.doc.resolve(cursorPos)));
28
+ editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(analyticsPayload)(tr);
29
+ tr.scrollIntoView();
30
+ return tr;
31
+ });
32
+ editorAPI === null || editorAPI === void 0 || (_editorAPI$core2 = editorAPI.core) === null || _editorAPI$core2 === void 0 || (_editorAPI$core2 = _editorAPI$core2.actions) === null || _editorAPI$core2 === void 0 || _editorAPI$core2.focus();
32
33
  }
33
34
  };
34
35
  export var Avatars = /*#__PURE__*/React.memo(function (props) {
35
36
  var _props$participants;
36
37
  var sessionId = props.sessionId,
37
- editorView = props.editorView,
38
38
  featureFlags = props.featureFlags,
39
39
  editorAPI = props.editorAPI;
40
40
  var participants = (_props$participants = props.participants) === null || _props$participants === void 0 ? void 0 : _props$participants.toArray();
@@ -56,14 +56,11 @@ export var Avatars = /*#__PURE__*/React.memo(function (props) {
56
56
  data: avatars,
57
57
  maxCount: 3,
58
58
  onAvatarClick: function onAvatarClick(_event, _analytics, index) {
59
- if (!editorView) {
60
- return;
61
- }
62
59
  var allowCollabAvatarScroll = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.collabAvatarScroll;
63
60
 
64
61
  // user does not need to scroll to their own position (index 0)
65
62
  if (allowCollabAvatarScroll && index > 0) {
66
- scrollToCollabCursor(editorView, participants, props.sessionId, index, props.editorAnalyticsAPI);
63
+ scrollToCollabCursor(editorAPI, participants, props.sessionId, index, props.editorAnalyticsAPI);
67
64
  }
68
65
  }
69
66
  }), props.children)
@@ -5,7 +5,6 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
5
  import type { CollabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
6
6
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
7
7
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
8
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
9
8
  type Config = {
10
9
  collabEdit?: CollabEditOptions;
11
10
  takeFullWidth: boolean;
@@ -20,9 +19,7 @@ export type AvatarGroupPlugin = NextEditorPlugin<'avatarGroup', {
20
19
  OptionalPlugin<PrimaryToolbarPlugin>
21
20
  ];
22
21
  actions: {
23
- getToolbarItem: ({ editorView, inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: {
24
- editorView: EditorView;
25
- } & CollabInviteToEditProps) => JSX.Element | null;
22
+ getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: CollabInviteToEditProps) => JSX.Element | null;
26
23
  };
27
24
  }>;
28
25
  export declare const avatarGroupPlugin: AvatarGroupPlugin;
@@ -95,9 +95,7 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
95
95
  };
96
96
  }, undefined>>];
97
97
  actions: {
98
- getToolbarItem: ({ editorView, inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: {
99
- editorView: EditorView;
100
- } & CollabInviteToEditProps) => JSX.Element | null;
98
+ getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: CollabInviteToEditProps) => JSX.Element | null;
101
99
  };
102
100
  }> | undefined;
103
101
  } & CollabInviteToEditProps & WrappedComponentProps>> & {
@@ -183,9 +181,7 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
183
181
  };
184
182
  }, undefined>>];
185
183
  actions: {
186
- getToolbarItem: ({ editorView, inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: {
187
- editorView: EditorView;
188
- } & CollabInviteToEditProps) => JSX.Element | null;
184
+ getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: CollabInviteToEditProps) => JSX.Element | null;
189
185
  };
190
186
  }> | undefined;
191
187
  } & CollabInviteToEditProps & WrappedComponentProps>;
@@ -20,5 +20,5 @@ export interface AvatarsProps {
20
20
  editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
21
21
  children: ReactNode;
22
22
  }
23
- export declare const scrollToCollabCursor: (editorView: EditorView, participants: CollabParticipant[], sessionId: string | undefined, index: number, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => void;
23
+ export declare const scrollToCollabCursor: (editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined, participants: CollabParticipant[], sessionId: string | undefined, index: number, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => void;
24
24
  export declare const Avatars: React.MemoExoticComponent<(props: AvatarsProps) => jsx.JSX.Element | null>;
@@ -78,9 +78,7 @@ declare const _default: import("memoize-one").MemoizedFn<(participant: CollabPar
78
78
  };
79
79
  }, undefined>>];
80
80
  actions: {
81
- getToolbarItem: ({ editorView, inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: {
82
- editorView: import("prosemirror-view").EditorView;
83
- } & import("@atlaskit/editor-common/collab").CollabInviteToEditProps) => JSX.Element | null;
81
+ getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: import("@atlaskit/editor-common/collab").CollabInviteToEditProps) => JSX.Element | null;
84
82
  };
85
83
  }> | undefined) => AvatarProps>;
86
84
  export default _default;
@@ -5,7 +5,6 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
5
  import type { CollabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
6
6
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
7
7
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
8
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
9
8
  type Config = {
10
9
  collabEdit?: CollabEditOptions;
11
10
  takeFullWidth: boolean;
@@ -20,9 +19,7 @@ export type AvatarGroupPlugin = NextEditorPlugin<'avatarGroup', {
20
19
  OptionalPlugin<PrimaryToolbarPlugin>
21
20
  ];
22
21
  actions: {
23
- getToolbarItem: ({ editorView, inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: {
24
- editorView: EditorView;
25
- } & CollabInviteToEditProps) => JSX.Element | null;
22
+ getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: CollabInviteToEditProps) => JSX.Element | null;
26
23
  };
27
24
  }>;
28
25
  export declare const avatarGroupPlugin: AvatarGroupPlugin;
@@ -109,9 +109,7 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
109
109
  }, undefined>>
110
110
  ];
111
111
  actions: {
112
- getToolbarItem: ({ editorView, inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: {
113
- editorView: EditorView;
114
- } & CollabInviteToEditProps) => JSX.Element | null;
112
+ getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: CollabInviteToEditProps) => JSX.Element | null;
115
113
  };
116
114
  }> | undefined;
117
115
  } & CollabInviteToEditProps & WrappedComponentProps>> & {
@@ -211,9 +209,7 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
211
209
  }, undefined>>
212
210
  ];
213
211
  actions: {
214
- getToolbarItem: ({ editorView, inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: {
215
- editorView: EditorView;
216
- } & CollabInviteToEditProps) => JSX.Element | null;
212
+ getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: CollabInviteToEditProps) => JSX.Element | null;
217
213
  };
218
214
  }> | undefined;
219
215
  } & CollabInviteToEditProps & WrappedComponentProps>;
@@ -20,5 +20,5 @@ export interface AvatarsProps {
20
20
  editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
21
21
  children: ReactNode;
22
22
  }
23
- export declare const scrollToCollabCursor: (editorView: EditorView, participants: CollabParticipant[], sessionId: string | undefined, index: number, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => void;
23
+ export declare const scrollToCollabCursor: (editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined, participants: CollabParticipant[], sessionId: string | undefined, index: number, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => void;
24
24
  export declare const Avatars: React.MemoExoticComponent<(props: AvatarsProps) => jsx.JSX.Element | null>;
@@ -92,9 +92,7 @@ declare const _default: import("memoize-one").MemoizedFn<(participant: CollabPar
92
92
  }, undefined>>
93
93
  ];
94
94
  actions: {
95
- getToolbarItem: ({ editorView, inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: {
96
- editorView: import("prosemirror-view").EditorView;
97
- } & import("@atlaskit/editor-common/collab").CollabInviteToEditProps) => JSX.Element | null;
95
+ getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: import("@atlaskit/editor-common/collab").CollabInviteToEditProps) => JSX.Element | null;
98
96
  };
99
97
  }> | undefined) => AvatarProps>;
100
98
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-avatar-group",
3
- "version": "1.5.2",
3
+ "version": "2.0.0",
4
4
  "description": "Avatar Group plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,16 +38,16 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@atlaskit/avatar-group": "^9.11.0",
41
- "@atlaskit/editor-common": "^87.10.0",
42
- "@atlaskit/editor-plugin-analytics": "^1.7.0",
43
- "@atlaskit/editor-plugin-collab-edit": "^1.13.0",
41
+ "@atlaskit/editor-common": "^88.2.0",
42
+ "@atlaskit/editor-plugin-analytics": "^1.8.0",
43
+ "@atlaskit/editor-plugin-collab-edit": "^1.16.0",
44
44
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
45
45
  "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
46
46
  "@atlaskit/editor-prosemirror": "5.0.1",
47
47
  "@atlaskit/editor-shared-styles": "^2.13.0",
48
- "@atlaskit/icon": "^22.12.0",
48
+ "@atlaskit/icon": "^22.15.0",
49
49
  "@atlaskit/theme": "^13.0.0",
50
- "@atlaskit/tokens": "^1.58.0",
50
+ "@atlaskit/tokens": "^1.59.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "@emotion/react": "^11.7.1",
53
53
  "memoize-one": "^6.0.0",