@atlaskit/editor-plugin-collab-edit 31.0.2 → 31.0.4
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 +15 -0
- package/dist/cjs/collabEditPlugin.js +5 -11
- package/dist/cjs/pm-plugins/main/plugin-state.js +2 -4
- package/dist/es2019/collabEditPlugin.js +3 -9
- package/dist/es2019/pm-plugins/main/plugin-state.js +3 -3
- package/dist/esm/collabEditPlugin.js +5 -11
- package/dist/esm/pm-plugins/main/plugin-state.js +2 -4
- package/package.json +2 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-collab-edit
|
|
2
2
|
|
|
3
|
+
## 31.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ffa18bdae0ee3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ffa18bdae0ee3) -
|
|
8
|
+
Clean up feature gate `platform_editor_ai_collapse_streaming_steps`
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 31.0.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`4cdaf1f75d6ad`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4cdaf1f75d6ad) -
|
|
16
|
+
Use const for stable local bindings
|
|
17
|
+
|
|
3
18
|
## 31.0.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -216,7 +216,7 @@ var collabEditPlugin = exports.collabEditPlugin = function collabEditPlugin(_ref
|
|
|
216
216
|
// Analytics steps are filtered first so they cannot break up an otherwise adjacent
|
|
217
217
|
// run of streaming frames.
|
|
218
218
|
var filtered = (0, _filterAnalytics.filterAnalyticsSteps)(steps);
|
|
219
|
-
var transformed = (0,
|
|
219
|
+
var transformed = (0, _collapseStreamingSteps.collapseStreamingSteps)(filtered);
|
|
220
220
|
return (0, _mergeUnconfirmed.mergeUnconfirmedSteps)(transformed, api);
|
|
221
221
|
};
|
|
222
222
|
var plugins = [].concat((0, _toConsumableArray2.default)(useNativePlugin ? [{
|
|
@@ -279,15 +279,9 @@ var collabEditPlugin = exports.collabEditPlugin = function collabEditPlugin(_ref
|
|
|
279
279
|
// `props.transactions` is what `applyTransaction` produced: the dispatched transaction
|
|
280
280
|
// followed by everything `appendTransaction` added. Streaming frames are built in an
|
|
281
281
|
// appendTransaction, so their hold metadata is never on `originalTransaction`.
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
var collapseStreamingStepsEnabled = (0, _fg.fg)('platform_editor_ai_collapse_streaming_steps');
|
|
286
|
-
if (collapseStreamingStepsEnabled) {
|
|
287
|
-
props.transactions.forEach(function (transaction) {
|
|
288
|
-
return sendHold.observe(transaction);
|
|
289
|
-
});
|
|
290
|
-
}
|
|
282
|
+
props.transactions.forEach(function (transaction) {
|
|
283
|
+
return sendHold.observe(transaction);
|
|
284
|
+
});
|
|
291
285
|
var addErrorAnalytics = (0, _analytics.addSynchronyErrorAnalytics)(props.newEditorState, props.newEditorState.tr, featureFlags, api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions);
|
|
292
286
|
var isEmptyDoc = (0, _utils.isEmptyDocument)(props.newEditorState.doc);
|
|
293
287
|
var viewMode = api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode;
|
|
@@ -299,7 +293,7 @@ var collabEditPlugin = exports.collabEditPlugin = function collabEditPlugin(_ref
|
|
|
299
293
|
useNativePlugin: (_options$useNativePlu = options.useNativePlugin) !== null && _options$useNativePlu !== void 0 ? _options$useNativePlu : false,
|
|
300
294
|
hideTelecursorOnLoad: !isEmptyDoc && ((_options$hideTelecurs = options.hideTelecursorOnLoad) !== null && _options$hideTelecurs !== void 0 ? _options$hideTelecurs : false),
|
|
301
295
|
viewMode: viewMode,
|
|
302
|
-
isSendHeld:
|
|
296
|
+
isSendHeld: sendHold.isHeld()
|
|
303
297
|
}), addErrorAnalytics);
|
|
304
298
|
if ((0, _fg.fg)('platform_editor_collab_organic_change_reporting')) {
|
|
305
299
|
(0, _monitorOrganicChanges.monitorOrganic)(_objectSpread(_objectSpread({
|
|
@@ -87,11 +87,9 @@ var PluginState = exports.PluginState = /*#__PURE__*/function () {
|
|
|
87
87
|
key: "apply",
|
|
88
88
|
value: function apply(tr) {
|
|
89
89
|
var _this = this;
|
|
90
|
-
// Ignored via go/ees005
|
|
91
|
-
// eslint-disable-next-line prefer-const
|
|
92
90
|
var participants = this.participants,
|
|
93
|
-
sid = this.sid
|
|
94
|
-
|
|
91
|
+
sid = this.sid;
|
|
92
|
+
var isReady = this.isReady;
|
|
95
93
|
var presenceData = tr.getMeta('presence');
|
|
96
94
|
var telepointerData = tr.getMeta('telepointer');
|
|
97
95
|
var nudgeTelepointerData = tr.getMeta('nudgeTelepointer');
|
|
@@ -173,7 +173,7 @@ export const collabEditPlugin = ({
|
|
|
173
173
|
// Analytics steps are filtered first so they cannot break up an otherwise adjacent
|
|
174
174
|
// run of streaming frames.
|
|
175
175
|
const filtered = filterAnalyticsSteps(steps);
|
|
176
|
-
const transformed =
|
|
176
|
+
const transformed = collapseStreamingSteps(filtered);
|
|
177
177
|
return mergeUnconfirmedSteps(transformed, api);
|
|
178
178
|
};
|
|
179
179
|
const plugins = [...(useNativePlugin ? [{
|
|
@@ -229,13 +229,7 @@ export const collabEditPlugin = ({
|
|
|
229
229
|
// `props.transactions` is what `applyTransaction` produced: the dispatched transaction
|
|
230
230
|
// followed by everything `appendTransaction` added. Streaming frames are built in an
|
|
231
231
|
// appendTransaction, so their hold metadata is never on `originalTransaction`.
|
|
232
|
-
|
|
233
|
-
// is turned off mid-stream, an already-active hold must stop applying immediately
|
|
234
|
-
// rather than persisting until the backstop expires and blocking every send.
|
|
235
|
-
const collapseStreamingStepsEnabled = fg('platform_editor_ai_collapse_streaming_steps');
|
|
236
|
-
if (collapseStreamingStepsEnabled) {
|
|
237
|
-
props.transactions.forEach(transaction => sendHold.observe(transaction));
|
|
238
|
-
}
|
|
232
|
+
props.transactions.forEach(transaction => sendHold.observe(transaction));
|
|
239
233
|
const addErrorAnalytics = addSynchronyErrorAnalytics(props.newEditorState, props.newEditorState.tr, featureFlags, api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions);
|
|
240
234
|
const isEmptyDoc = isEmptyDocument(props.newEditorState.doc);
|
|
241
235
|
const viewMode = api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode;
|
|
@@ -247,7 +241,7 @@ export const collabEditPlugin = ({
|
|
|
247
241
|
useNativePlugin: (_options$useNativePlu = options.useNativePlugin) !== null && _options$useNativePlu !== void 0 ? _options$useNativePlu : false,
|
|
248
242
|
hideTelecursorOnLoad: !isEmptyDoc && ((_options$hideTelecurs = options.hideTelecursorOnLoad) !== null && _options$hideTelecurs !== void 0 ? _options$hideTelecurs : false),
|
|
249
243
|
viewMode,
|
|
250
|
-
isSendHeld:
|
|
244
|
+
isSendHeld: sendHold.isHeld()
|
|
251
245
|
}), addErrorAnalytics);
|
|
252
246
|
if (fg('platform_editor_collab_organic_change_reporting')) {
|
|
253
247
|
monitorOrganic({
|
|
@@ -57,11 +57,11 @@ export class PluginState {
|
|
|
57
57
|
return (_participant$presence = participant === null || participant === void 0 ? void 0 : participant.presenceId) !== null && _participant$presence !== void 0 ? _participant$presence : sessionId;
|
|
58
58
|
}
|
|
59
59
|
apply(tr) {
|
|
60
|
-
// Ignored via go/ees005
|
|
61
|
-
// eslint-disable-next-line prefer-const
|
|
62
60
|
let {
|
|
63
61
|
participants,
|
|
64
|
-
sid
|
|
62
|
+
sid
|
|
63
|
+
} = this;
|
|
64
|
+
const {
|
|
65
65
|
isReady
|
|
66
66
|
} = this;
|
|
67
67
|
const presenceData = tr.getMeta('presence');
|
|
@@ -209,7 +209,7 @@ export var collabEditPlugin = function collabEditPlugin(_ref4) {
|
|
|
209
209
|
// Analytics steps are filtered first so they cannot break up an otherwise adjacent
|
|
210
210
|
// run of streaming frames.
|
|
211
211
|
var filtered = filterAnalyticsSteps(steps);
|
|
212
|
-
var transformed =
|
|
212
|
+
var transformed = collapseStreamingSteps(filtered);
|
|
213
213
|
return mergeUnconfirmedSteps(transformed, api);
|
|
214
214
|
};
|
|
215
215
|
var plugins = [].concat(_toConsumableArray(useNativePlugin ? [{
|
|
@@ -272,15 +272,9 @@ export var collabEditPlugin = function collabEditPlugin(_ref4) {
|
|
|
272
272
|
// `props.transactions` is what `applyTransaction` produced: the dispatched transaction
|
|
273
273
|
// followed by everything `appendTransaction` added. Streaming frames are built in an
|
|
274
274
|
// appendTransaction, so their hold metadata is never on `originalTransaction`.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
var collapseStreamingStepsEnabled = fg('platform_editor_ai_collapse_streaming_steps');
|
|
279
|
-
if (collapseStreamingStepsEnabled) {
|
|
280
|
-
props.transactions.forEach(function (transaction) {
|
|
281
|
-
return sendHold.observe(transaction);
|
|
282
|
-
});
|
|
283
|
-
}
|
|
275
|
+
props.transactions.forEach(function (transaction) {
|
|
276
|
+
return sendHold.observe(transaction);
|
|
277
|
+
});
|
|
284
278
|
var addErrorAnalytics = addSynchronyErrorAnalytics(props.newEditorState, props.newEditorState.tr, featureFlags, api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions);
|
|
285
279
|
var isEmptyDoc = isEmptyDocument(props.newEditorState.doc);
|
|
286
280
|
var viewMode = api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode;
|
|
@@ -292,7 +286,7 @@ export var collabEditPlugin = function collabEditPlugin(_ref4) {
|
|
|
292
286
|
useNativePlugin: (_options$useNativePlu = options.useNativePlugin) !== null && _options$useNativePlu !== void 0 ? _options$useNativePlu : false,
|
|
293
287
|
hideTelecursorOnLoad: !isEmptyDoc && ((_options$hideTelecurs = options.hideTelecursorOnLoad) !== null && _options$hideTelecurs !== void 0 ? _options$hideTelecurs : false),
|
|
294
288
|
viewMode: viewMode,
|
|
295
|
-
isSendHeld:
|
|
289
|
+
isSendHeld: sendHold.isHeld()
|
|
296
290
|
}), addErrorAnalytics);
|
|
297
291
|
if (fg('platform_editor_collab_organic_change_reporting')) {
|
|
298
292
|
monitorOrganic(_objectSpread(_objectSpread({
|
|
@@ -81,11 +81,9 @@ export var PluginState = /*#__PURE__*/function () {
|
|
|
81
81
|
key: "apply",
|
|
82
82
|
value: function apply(tr) {
|
|
83
83
|
var _this = this;
|
|
84
|
-
// Ignored via go/ees005
|
|
85
|
-
// eslint-disable-next-line prefer-const
|
|
86
84
|
var participants = this.participants,
|
|
87
|
-
sid = this.sid
|
|
88
|
-
|
|
85
|
+
sid = this.sid;
|
|
86
|
+
var isReady = this.isReady;
|
|
89
87
|
var presenceData = tr.getMeta('presence');
|
|
90
88
|
var telepointerData = tr.getMeta('telepointer');
|
|
91
89
|
var nudgeTelepointerData = tr.getMeta('nudgeTelepointer');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-collab-edit",
|
|
3
|
-
"version": "31.0.
|
|
3
|
+
"version": "31.0.4",
|
|
4
4
|
"description": "Collab Edit plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,20 +37,15 @@
|
|
|
37
37
|
"memoize-one": "^6.0.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@atlaskit/editor-common": "^134.
|
|
40
|
+
"@atlaskit/editor-common": "^134.2.0",
|
|
41
41
|
"react": "^18.2.0 || ^19.2.0",
|
|
42
42
|
"react-dom": "^18.2.0 || ^19.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@testing-library/react": "^16.3.0",
|
|
46
45
|
"react": "^19.2.0",
|
|
47
46
|
"react-dom": "^19.2.0"
|
|
48
47
|
},
|
|
49
48
|
"platform-feature-flags": {
|
|
50
|
-
"platform_editor_ai_collapse_streaming_steps": {
|
|
51
|
-
"type": "boolean",
|
|
52
|
-
"referenceOnly": true
|
|
53
|
-
},
|
|
54
49
|
"confluence_ncs_step_diffing_version_history": {
|
|
55
50
|
"type": "boolean",
|
|
56
51
|
"referenceOnly": true
|