@atlaskit/editor-plugin-collab-edit 3.4.0 → 3.5.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 +22 -0
- package/dist/cjs/collabEditPlugin.js +3 -3
- package/dist/cjs/pm-plugins/main/plugin-state.js +9 -4
- package/dist/cjs/pm-plugins/utils.js +13 -1
- package/dist/es2019/collabEditPlugin.js +3 -3
- package/dist/es2019/pm-plugins/main/plugin-state.js +7 -4
- package/dist/es2019/pm-plugins/utils.js +13 -1
- package/dist/esm/collabEditPlugin.js +3 -3
- package/dist/esm/pm-plugins/main/plugin-state.js +9 -4
- package/dist/esm/pm-plugins/utils.js +13 -1
- package/dist/types/pm-plugins/main/plugin-state.d.ts +1 -0
- package/dist/types/pm-plugins/utils.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/main/plugin-state.d.ts +1 -0
- package/dist/types-ts4.5/pm-plugins/utils.d.ts +1 -1
- package/package.json +14 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-collab-edit
|
|
2
2
|
|
|
3
|
+
## 3.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#147951](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/147951)
|
|
8
|
+
[`ec2f90f672938`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ec2f90f672938) -
|
|
9
|
+
[ux] getFullName has been added to PluginState. User's initial and full name are now in their
|
|
10
|
+
separate elements under telepointer.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 3.4.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [#140813](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140813)
|
|
21
|
+
[`c4756a5c1a4ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c4756a5c1a4ae) -
|
|
22
|
+
Migrating offline editing feature gates to a new experiment "platform_editor_offline_editing_web"
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 3.4.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
@@ -13,8 +13,8 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
13
13
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
14
14
|
var _editorJsonTransformer = require("@atlaskit/editor-json-transformer");
|
|
15
15
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _prosemirrorCollab = require("@atlaskit/prosemirror-collab");
|
|
17
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
18
18
|
var _analytics2 = require("./pm-plugins/analytics");
|
|
19
19
|
var _sendTransaction = require("./pm-plugins/events/send-transaction");
|
|
20
20
|
var _main = require("./pm-plugins/main");
|
|
@@ -206,7 +206,7 @@ var collabEditPlugin = exports.collabEditPlugin = function collabEditPlugin(_ref
|
|
|
206
206
|
plugin: function plugin() {
|
|
207
207
|
return (0, _prosemirrorCollab.collab)({
|
|
208
208
|
clientID: userId,
|
|
209
|
-
transformUnconfirmed: (0,
|
|
209
|
+
transformUnconfirmed: (0, _experiments.editorExperiment)('platform_editor_offline_editing_web', true) ? function (steps) {
|
|
210
210
|
return (0, _mergeUnconfirmed.mergeUnconfirmedSteps)(steps, api);
|
|
211
211
|
} : undefined
|
|
212
212
|
});
|
|
@@ -252,7 +252,7 @@ var collabEditPlugin = exports.collabEditPlugin = function collabEditPlugin(_ref
|
|
|
252
252
|
name: 'collabTrackLastOrganicChangePlugin',
|
|
253
253
|
plugin: _trackLastOrganicChange.createPlugin
|
|
254
254
|
});
|
|
255
|
-
if ((0,
|
|
255
|
+
if ((0, _experiments.editorExperiment)('platform_editor_offline_editing_web', true)) {
|
|
256
256
|
plugins.push({
|
|
257
257
|
name: 'trackLastRemoteConflictPlugin',
|
|
258
258
|
plugin: _trackReconnectionConflict.createPlugin
|
|
@@ -59,11 +59,16 @@ var PluginState = exports.PluginState = /*#__PURE__*/function () {
|
|
|
59
59
|
get: function get() {
|
|
60
60
|
return this.sid;
|
|
61
61
|
}
|
|
62
|
+
}, {
|
|
63
|
+
key: "getFullName",
|
|
64
|
+
value: function getFullName(sessionId) {
|
|
65
|
+
var participant = this.participants.get(sessionId);
|
|
66
|
+
return participant ? participant.name : 'X';
|
|
67
|
+
}
|
|
62
68
|
}, {
|
|
63
69
|
key: "getInitial",
|
|
64
70
|
value: function getInitial(sessionId) {
|
|
65
|
-
|
|
66
|
-
return participant ? participant.name.substring(0, 1).toUpperCase() : 'X';
|
|
71
|
+
return this.getFullName(sessionId).substring(0, 1).toUpperCase();
|
|
67
72
|
}
|
|
68
73
|
}, {
|
|
69
74
|
key: "getPresenceId",
|
|
@@ -142,7 +147,7 @@ var PluginState = exports.PluginState = /*#__PURE__*/function () {
|
|
|
142
147
|
} catch (err) {
|
|
143
148
|
this.onError(err);
|
|
144
149
|
}
|
|
145
|
-
add = add.concat((0, _utils.createTelepointers)(from, to, sessionId, isSelection, this.getInitial(sessionId), this.getPresenceId(sessionId)));
|
|
150
|
+
add = add.concat((0, _utils.createTelepointers)(from, to, sessionId, isSelection, this.getInitial(sessionId), this.getPresenceId(sessionId), this.getFullName(sessionId)));
|
|
146
151
|
}
|
|
147
152
|
}
|
|
148
153
|
if (tr.docChanged) {
|
|
@@ -161,7 +166,7 @@ var PluginState = exports.PluginState = /*#__PURE__*/function () {
|
|
|
161
166
|
size = _ref.slice.content.size,
|
|
162
167
|
_from = _ref.from;
|
|
163
168
|
var pos = getValidPos(tr, size ? Math.min(_from + size, tr.doc.nodeSize - 3) : Math.max(_from, 1));
|
|
164
|
-
add = add.concat((0, _utils.createTelepointers)(pos, pos, _sessionId, false, _this.getInitial(_sessionId), presenceId));
|
|
169
|
+
add = add.concat((0, _utils.createTelepointers)(pos, pos, _sessionId, false, _this.getInitial(_sessionId), presenceId, _this.getFullName(_sessionId)));
|
|
165
170
|
}
|
|
166
171
|
}
|
|
167
172
|
}
|
|
@@ -37,7 +37,7 @@ function getAvatarColor(str) {
|
|
|
37
37
|
textColor: participantColor.color.textColor
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
var createTelepointers = exports.createTelepointers = function createTelepointers(from, to, sessionId, isSelection, initial, presenceId) {
|
|
40
|
+
var createTelepointers = exports.createTelepointers = function createTelepointers(from, to, sessionId, isSelection, initial, presenceId, fullName) {
|
|
41
41
|
var decorations = [];
|
|
42
42
|
var avatarColor = getAvatarColor(presenceId);
|
|
43
43
|
var color = avatarColor.index.toString();
|
|
@@ -67,6 +67,18 @@ var createTelepointers = exports.createTelepointers = function createTelepointer
|
|
|
67
67
|
color: avatarColor.backgroundColor
|
|
68
68
|
}), ";");
|
|
69
69
|
cursor.setAttribute('data-initial', initial);
|
|
70
|
+
if ((0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer')) {
|
|
71
|
+
var fullNameEl = document.createElement('span');
|
|
72
|
+
fullNameEl.textContent = fullName;
|
|
73
|
+
fullNameEl.className = 'telepointer-fullname';
|
|
74
|
+
fullNameEl.style.backgroundColor = avatarColor.backgroundColor;
|
|
75
|
+
cursor.appendChild(fullNameEl);
|
|
76
|
+
var initialEl = document.createElement('span');
|
|
77
|
+
initialEl.textContent = initial;
|
|
78
|
+
initialEl.className = 'telepointer-initial';
|
|
79
|
+
initialEl.style.backgroundColor = avatarColor.backgroundColor;
|
|
80
|
+
cursor.appendChild(initialEl);
|
|
81
|
+
}
|
|
70
82
|
return decorations.concat(
|
|
71
83
|
// Ignored via go/ees005
|
|
72
84
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2,8 +2,8 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
|
|
|
2
2
|
import { isEmptyDocument } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
4
4
|
import { AddMarkStep, AddNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { collab, getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
|
|
6
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
7
|
import { addSynchronyErrorAnalytics } from './pm-plugins/analytics';
|
|
8
8
|
import { sendTransaction } from './pm-plugins/events/send-transaction';
|
|
9
9
|
import { createPlugin } from './pm-plugins/main';
|
|
@@ -160,7 +160,7 @@ export const collabEditPlugin = ({
|
|
|
160
160
|
name: 'pmCollab',
|
|
161
161
|
plugin: () => collab({
|
|
162
162
|
clientID: userId,
|
|
163
|
-
transformUnconfirmed:
|
|
163
|
+
transformUnconfirmed: editorExperiment('platform_editor_offline_editing_web', true) ? steps => mergeUnconfirmedSteps(steps, api) : undefined
|
|
164
164
|
})
|
|
165
165
|
}, {
|
|
166
166
|
name: 'nativeCollabProviderPlugin',
|
|
@@ -198,7 +198,7 @@ export const collabEditPlugin = ({
|
|
|
198
198
|
name: 'collabTrackLastOrganicChangePlugin',
|
|
199
199
|
plugin: createLastOrganicChangePlugin
|
|
200
200
|
});
|
|
201
|
-
if (
|
|
201
|
+
if (editorExperiment('platform_editor_offline_editing_web', true)) {
|
|
202
202
|
plugins.push({
|
|
203
203
|
name: 'trackLastRemoteConflictPlugin',
|
|
204
204
|
plugin: createTrackReconnectionConflictPlugin
|
|
@@ -40,9 +40,12 @@ export class PluginState {
|
|
|
40
40
|
this.isReady = collabInitalised;
|
|
41
41
|
this.onError = onError || this.onError;
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
getFullName(sessionId) {
|
|
44
44
|
const participant = this.participants.get(sessionId);
|
|
45
|
-
return participant ? participant.name
|
|
45
|
+
return participant ? participant.name : 'X';
|
|
46
|
+
}
|
|
47
|
+
getInitial(sessionId) {
|
|
48
|
+
return this.getFullName(sessionId).substring(0, 1).toUpperCase();
|
|
46
49
|
}
|
|
47
50
|
getPresenceId(sessionId) {
|
|
48
51
|
var _participant$presence;
|
|
@@ -118,7 +121,7 @@ export class PluginState {
|
|
|
118
121
|
} catch (err) {
|
|
119
122
|
this.onError(err);
|
|
120
123
|
}
|
|
121
|
-
add = add.concat(createTelepointers(from, to, sessionId, isSelection, this.getInitial(sessionId), this.getPresenceId(sessionId)));
|
|
124
|
+
add = add.concat(createTelepointers(from, to, sessionId, isSelection, this.getInitial(sessionId), this.getPresenceId(sessionId), this.getFullName(sessionId)));
|
|
122
125
|
}
|
|
123
126
|
}
|
|
124
127
|
if (tr.docChanged) {
|
|
@@ -145,7 +148,7 @@ export class PluginState {
|
|
|
145
148
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
146
149
|
} = step;
|
|
147
150
|
const pos = getValidPos(tr, size ? Math.min(from + size, tr.doc.nodeSize - 3) : Math.max(from, 1));
|
|
148
|
-
add = add.concat(createTelepointers(pos, pos, sessionId, false, this.getInitial(sessionId), presenceId));
|
|
151
|
+
add = add.concat(createTelepointers(pos, pos, sessionId, false, this.getInitial(sessionId), presenceId, this.getFullName(sessionId)));
|
|
149
152
|
}
|
|
150
153
|
}
|
|
151
154
|
}
|
|
@@ -23,7 +23,7 @@ export function getAvatarColor(str) {
|
|
|
23
23
|
textColor: participantColor.color.textColor
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
export const createTelepointers = (from, to, sessionId, isSelection, initial, presenceId) => {
|
|
26
|
+
export const createTelepointers = (from, to, sessionId, isSelection, initial, presenceId, fullName) => {
|
|
27
27
|
const decorations = [];
|
|
28
28
|
const avatarColor = getAvatarColor(presenceId);
|
|
29
29
|
const color = avatarColor.index.toString();
|
|
@@ -53,6 +53,18 @@ export const createTelepointers = (from, to, sessionId, isSelection, initial, pr
|
|
|
53
53
|
color: avatarColor.backgroundColor
|
|
54
54
|
})};`;
|
|
55
55
|
cursor.setAttribute('data-initial', initial);
|
|
56
|
+
if (fg('confluence_team_presence_scroll_to_pointer')) {
|
|
57
|
+
const fullNameEl = document.createElement('span');
|
|
58
|
+
fullNameEl.textContent = fullName;
|
|
59
|
+
fullNameEl.className = 'telepointer-fullname';
|
|
60
|
+
fullNameEl.style.backgroundColor = avatarColor.backgroundColor;
|
|
61
|
+
cursor.appendChild(fullNameEl);
|
|
62
|
+
const initialEl = document.createElement('span');
|
|
63
|
+
initialEl.textContent = initial;
|
|
64
|
+
initialEl.className = 'telepointer-initial';
|
|
65
|
+
initialEl.style.backgroundColor = avatarColor.backgroundColor;
|
|
66
|
+
cursor.appendChild(initialEl);
|
|
67
|
+
}
|
|
56
68
|
return decorations.concat(
|
|
57
69
|
// Ignored via go/ees005
|
|
58
70
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -8,8 +8,8 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
|
|
|
8
8
|
import { isEmptyDocument } from '@atlaskit/editor-common/utils';
|
|
9
9
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
10
10
|
import { AddMarkStep, AddNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
import { collab, getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
|
|
12
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
13
|
import { addSynchronyErrorAnalytics } from './pm-plugins/analytics';
|
|
14
14
|
import { sendTransaction } from './pm-plugins/events/send-transaction';
|
|
15
15
|
import { createPlugin } from './pm-plugins/main';
|
|
@@ -199,7 +199,7 @@ export var collabEditPlugin = function collabEditPlugin(_ref4) {
|
|
|
199
199
|
plugin: function plugin() {
|
|
200
200
|
return collab({
|
|
201
201
|
clientID: userId,
|
|
202
|
-
transformUnconfirmed:
|
|
202
|
+
transformUnconfirmed: editorExperiment('platform_editor_offline_editing_web', true) ? function (steps) {
|
|
203
203
|
return mergeUnconfirmedSteps(steps, api);
|
|
204
204
|
} : undefined
|
|
205
205
|
});
|
|
@@ -245,7 +245,7 @@ export var collabEditPlugin = function collabEditPlugin(_ref4) {
|
|
|
245
245
|
name: 'collabTrackLastOrganicChangePlugin',
|
|
246
246
|
plugin: createLastOrganicChangePlugin
|
|
247
247
|
});
|
|
248
|
-
if (
|
|
248
|
+
if (editorExperiment('platform_editor_offline_editing_web', true)) {
|
|
249
249
|
plugins.push({
|
|
250
250
|
name: 'trackLastRemoteConflictPlugin',
|
|
251
251
|
plugin: createTrackReconnectionConflictPlugin
|
|
@@ -53,11 +53,16 @@ export var PluginState = /*#__PURE__*/function () {
|
|
|
53
53
|
get: function get() {
|
|
54
54
|
return this.sid;
|
|
55
55
|
}
|
|
56
|
+
}, {
|
|
57
|
+
key: "getFullName",
|
|
58
|
+
value: function getFullName(sessionId) {
|
|
59
|
+
var participant = this.participants.get(sessionId);
|
|
60
|
+
return participant ? participant.name : 'X';
|
|
61
|
+
}
|
|
56
62
|
}, {
|
|
57
63
|
key: "getInitial",
|
|
58
64
|
value: function getInitial(sessionId) {
|
|
59
|
-
|
|
60
|
-
return participant ? participant.name.substring(0, 1).toUpperCase() : 'X';
|
|
65
|
+
return this.getFullName(sessionId).substring(0, 1).toUpperCase();
|
|
61
66
|
}
|
|
62
67
|
}, {
|
|
63
68
|
key: "getPresenceId",
|
|
@@ -136,7 +141,7 @@ export var PluginState = /*#__PURE__*/function () {
|
|
|
136
141
|
} catch (err) {
|
|
137
142
|
this.onError(err);
|
|
138
143
|
}
|
|
139
|
-
add = add.concat(createTelepointers(from, to, sessionId, isSelection, this.getInitial(sessionId), this.getPresenceId(sessionId)));
|
|
144
|
+
add = add.concat(createTelepointers(from, to, sessionId, isSelection, this.getInitial(sessionId), this.getPresenceId(sessionId), this.getFullName(sessionId)));
|
|
140
145
|
}
|
|
141
146
|
}
|
|
142
147
|
if (tr.docChanged) {
|
|
@@ -155,7 +160,7 @@ export var PluginState = /*#__PURE__*/function () {
|
|
|
155
160
|
size = _ref.slice.content.size,
|
|
156
161
|
_from = _ref.from;
|
|
157
162
|
var pos = getValidPos(tr, size ? Math.min(_from + size, tr.doc.nodeSize - 3) : Math.max(_from, 1));
|
|
158
|
-
add = add.concat(createTelepointers(pos, pos, _sessionId, false, _this.getInitial(_sessionId), presenceId));
|
|
163
|
+
add = add.concat(createTelepointers(pos, pos, _sessionId, false, _this.getInitial(_sessionId), presenceId, _this.getFullName(_sessionId)));
|
|
159
164
|
}
|
|
160
165
|
}
|
|
161
166
|
}
|
|
@@ -28,7 +28,7 @@ export function getAvatarColor(str) {
|
|
|
28
28
|
textColor: participantColor.color.textColor
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
export var createTelepointers = function createTelepointers(from, to, sessionId, isSelection, initial, presenceId) {
|
|
31
|
+
export var createTelepointers = function createTelepointers(from, to, sessionId, isSelection, initial, presenceId, fullName) {
|
|
32
32
|
var decorations = [];
|
|
33
33
|
var avatarColor = getAvatarColor(presenceId);
|
|
34
34
|
var color = avatarColor.index.toString();
|
|
@@ -58,6 +58,18 @@ export var createTelepointers = function createTelepointers(from, to, sessionId,
|
|
|
58
58
|
color: avatarColor.backgroundColor
|
|
59
59
|
}), ";");
|
|
60
60
|
cursor.setAttribute('data-initial', initial);
|
|
61
|
+
if (fg('confluence_team_presence_scroll_to_pointer')) {
|
|
62
|
+
var fullNameEl = document.createElement('span');
|
|
63
|
+
fullNameEl.textContent = fullName;
|
|
64
|
+
fullNameEl.className = 'telepointer-fullname';
|
|
65
|
+
fullNameEl.style.backgroundColor = avatarColor.backgroundColor;
|
|
66
|
+
cursor.appendChild(fullNameEl);
|
|
67
|
+
var initialEl = document.createElement('span');
|
|
68
|
+
initialEl.textContent = initial;
|
|
69
|
+
initialEl.className = 'telepointer-initial';
|
|
70
|
+
initialEl.style.backgroundColor = avatarColor.backgroundColor;
|
|
71
|
+
cursor.appendChild(initialEl);
|
|
72
|
+
}
|
|
61
73
|
return decorations.concat(
|
|
62
74
|
// Ignored via go/ees005
|
|
63
75
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -16,6 +16,7 @@ export declare class PluginState {
|
|
|
16
16
|
get activeParticipants(): ReadOnlyParticipants;
|
|
17
17
|
get sessionId(): string | undefined;
|
|
18
18
|
constructor(decorations: DecorationSet, participants: Participants, sessionId?: string, collabInitalised?: boolean, onError?: (err: Error) => void);
|
|
19
|
+
getFullName(sessionId: string): string;
|
|
19
20
|
getInitial(sessionId: string): string;
|
|
20
21
|
getPresenceId(sessionId: string): string;
|
|
21
22
|
apply(tr: ReadonlyTransaction): PluginState;
|
|
@@ -10,7 +10,7 @@ export declare function getAvatarColor(str: string): {
|
|
|
10
10
|
backgroundColor: string;
|
|
11
11
|
textColor: string;
|
|
12
12
|
};
|
|
13
|
-
export declare const createTelepointers: (from: number, to: number, sessionId: string, isSelection: boolean, initial: string, presenceId: string) => Decoration[];
|
|
13
|
+
export declare const createTelepointers: (from: number, to: number, sessionId: string, isSelection: boolean, initial: string, presenceId: string, fullName: string) => Decoration[];
|
|
14
14
|
export declare const replaceDocument: (doc: any, state: EditorState, version?: number, options?: CollabEditOptions, reserveCursor?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI) => Transaction;
|
|
15
15
|
export declare const scrollToCollabCursor: (editorView: EditorView, participants: CollabParticipant[], sessionId: string | undefined, index: number, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => void;
|
|
16
16
|
export declare const getPositionOfTelepointer: (sessionId: string, decorationSet: DecorationSet) => undefined | number;
|
|
@@ -16,6 +16,7 @@ export declare class PluginState {
|
|
|
16
16
|
get activeParticipants(): ReadOnlyParticipants;
|
|
17
17
|
get sessionId(): string | undefined;
|
|
18
18
|
constructor(decorations: DecorationSet, participants: Participants, sessionId?: string, collabInitalised?: boolean, onError?: (err: Error) => void);
|
|
19
|
+
getFullName(sessionId: string): string;
|
|
19
20
|
getInitial(sessionId: string): string;
|
|
20
21
|
getPresenceId(sessionId: string): string;
|
|
21
22
|
apply(tr: ReadonlyTransaction): PluginState;
|
|
@@ -10,7 +10,7 @@ export declare function getAvatarColor(str: string): {
|
|
|
10
10
|
backgroundColor: string;
|
|
11
11
|
textColor: string;
|
|
12
12
|
};
|
|
13
|
-
export declare const createTelepointers: (from: number, to: number, sessionId: string, isSelection: boolean, initial: string, presenceId: string) => Decoration[];
|
|
13
|
+
export declare const createTelepointers: (from: number, to: number, sessionId: string, isSelection: boolean, initial: string, presenceId: string, fullName: string) => Decoration[];
|
|
14
14
|
export declare const replaceDocument: (doc: any, state: EditorState, version?: number, options?: CollabEditOptions, reserveCursor?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI) => Transaction;
|
|
15
15
|
export declare const scrollToCollabCursor: (editorView: EditorView, participants: CollabParticipant[], sessionId: string | undefined, index: number, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => void;
|
|
16
16
|
export declare const getPositionOfTelepointer: (sessionId: string, decorationSet: DecorationSet) => undefined | number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-collab-edit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Collab Edit plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
35
35
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
36
|
-
"@atlaskit/editor-common": "^103.
|
|
36
|
+
"@atlaskit/editor-common": "^103.22.0",
|
|
37
37
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/prosemirror-collab": "^0.16.0",
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^4.15.0",
|
|
46
47
|
"@babel/runtime": "^7.0.0",
|
|
47
48
|
"memoize-one": "^6.0.0"
|
|
48
49
|
},
|
|
@@ -51,17 +52,17 @@
|
|
|
51
52
|
"react-dom": "^18.2.0"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
|
-
"@af/integration-testing": "
|
|
55
|
-
"@af/visual-regression": "
|
|
56
|
-
"@atlaskit/editor-plugin-mentions": "^4.
|
|
55
|
+
"@af/integration-testing": "workspace:^",
|
|
56
|
+
"@af/visual-regression": "workspace:^",
|
|
57
|
+
"@atlaskit/editor-plugin-mentions": "^4.5.0",
|
|
57
58
|
"@atlaskit/editor-plugin-text-formatting": "^2.2.0",
|
|
58
|
-
"@atlaskit/editor-plugin-type-ahead": "^2.
|
|
59
|
+
"@atlaskit/editor-plugin-type-ahead": "^2.6.0",
|
|
59
60
|
"@atlaskit/editor-plugin-unsupported-content": "^2.1.0",
|
|
60
|
-
"@atlaskit/editor-test-helpers": "
|
|
61
|
-
"@atlaskit/ssr": "
|
|
62
|
-
"@atlaskit/synchrony-test-helpers": "
|
|
61
|
+
"@atlaskit/editor-test-helpers": "workspace:^",
|
|
62
|
+
"@atlaskit/ssr": "workspace:^",
|
|
63
|
+
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
63
64
|
"@atlaskit/util-data-test": "^18.0.0",
|
|
64
|
-
"@atlaskit/visual-regression": "
|
|
65
|
+
"@atlaskit/visual-regression": "workspace:^",
|
|
65
66
|
"@testing-library/react": "^13.4.0",
|
|
66
67
|
"typescript": "~5.4.2",
|
|
67
68
|
"wait-for-expect": "^1.2.0"
|
|
@@ -106,17 +107,14 @@
|
|
|
106
107
|
"platform_editor_use_nested_table_pm_nodes": {
|
|
107
108
|
"type": "boolean"
|
|
108
109
|
},
|
|
109
|
-
"platform_editor_merge_unconfirmed_steps": {
|
|
110
|
-
"type": "boolean"
|
|
111
|
-
},
|
|
112
|
-
"platform_editor_offline_conflict_resolution": {
|
|
113
|
-
"type": "boolean"
|
|
114
|
-
},
|
|
115
110
|
"platform_editor_selection_without_left_shift": {
|
|
116
111
|
"type": "boolean"
|
|
117
112
|
},
|
|
118
113
|
"platform_editor_no_telecursor_on_live_doc_init": {
|
|
119
114
|
"type": "boolean"
|
|
115
|
+
},
|
|
116
|
+
"confluence_team_presence_scroll_to_pointer": {
|
|
117
|
+
"type": "boolean"
|
|
120
118
|
}
|
|
121
119
|
}
|
|
122
120
|
}
|