@atlaskit/collab-provider 10.8.0 → 10.8.1
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 +8 -0
- package/dist/cjs/document/document-service.js +5 -8
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/document/document-service.js +4 -10
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/document/document-service.js +5 -11
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/document/document-service.d.ts +2 -1
- package/dist/types-ts4.5/document/document-service.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 10.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#120905](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120905)
|
|
8
|
+
[`4194ea903d7d6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4194ea903d7d6) -
|
|
9
|
+
Refactor step merging while offline.
|
|
10
|
+
|
|
3
11
|
## 10.8.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -13,6 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
13
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
14
|
var _const = require("../helpers/const");
|
|
15
15
|
var _prosemirrorCollab = require("@atlaskit/prosemirror-collab");
|
|
16
|
+
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
16
17
|
var _editorJsonTransformer = require("@atlaskit/editor-json-transformer");
|
|
17
18
|
var _throttle = _interopRequireDefault(require("lodash/throttle"));
|
|
18
19
|
var _performance = require("../analytics/performance");
|
|
@@ -935,10 +936,9 @@ var DocumentService = exports.DocumentService = /*#__PURE__*/function () {
|
|
|
935
936
|
// we need to lock them to ensure they don't get
|
|
936
937
|
// mutated in: `packages/editor/editor-plugin-collab-edit/src/pm-plugins/mergeUnconfirmed.ts`
|
|
937
938
|
if ((0, _platformFeatureFlags.fg)('platform_editor_merge_unconfirmed_steps')) {
|
|
938
|
-
unconfirmedStepsData.
|
|
939
|
-
if (
|
|
940
|
-
|
|
941
|
-
(_s$lockStep = s.lockStep) === null || _s$lockStep === void 0 || _s$lockStep.call(s);
|
|
939
|
+
unconfirmedStepsData.origins.forEach(function (origin) {
|
|
940
|
+
if (origin instanceof _state.Transaction) {
|
|
941
|
+
return origin.setMeta('mergeIsLocked', true);
|
|
942
942
|
}
|
|
943
943
|
});
|
|
944
944
|
}
|
|
@@ -967,7 +967,4 @@ var DocumentService = exports.DocumentService = /*#__PURE__*/function () {
|
|
|
967
967
|
});
|
|
968
968
|
}
|
|
969
969
|
}]);
|
|
970
|
-
}();
|
|
971
|
-
function isLockable(step) {
|
|
972
|
-
return (step === null || step === void 0 ? void 0 : step.lockStep) !== undefined;
|
|
973
|
-
}
|
|
970
|
+
}();
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/collab-provider";
|
|
8
|
-
var version = exports.version = "10.8.
|
|
8
|
+
var version = exports.version = "10.8.1";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
import { ACK_MAX_TRY, EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
|
|
4
4
|
import { getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
|
|
5
|
+
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
6
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
6
7
|
import throttle from 'lodash/throttle';
|
|
7
8
|
import { MEASURE_NAME, startMeasure, stopMeasure } from '../analytics/performance';
|
|
@@ -806,10 +807,9 @@ export class DocumentService {
|
|
|
806
807
|
// we need to lock them to ensure they don't get
|
|
807
808
|
// mutated in: `packages/editor/editor-plugin-collab-edit/src/pm-plugins/mergeUnconfirmed.ts`
|
|
808
809
|
if (fg('platform_editor_merge_unconfirmed_steps')) {
|
|
809
|
-
unconfirmedStepsData.
|
|
810
|
-
if (
|
|
811
|
-
|
|
812
|
-
(_s$lockStep = s.lockStep) === null || _s$lockStep === void 0 ? void 0 : _s$lockStep.call(s);
|
|
810
|
+
unconfirmedStepsData.origins.forEach(origin => {
|
|
811
|
+
if (origin instanceof Transaction) {
|
|
812
|
+
return origin.setMeta('mergeIsLocked', true);
|
|
813
813
|
}
|
|
814
814
|
});
|
|
815
815
|
}
|
|
@@ -837,10 +837,4 @@ export class DocumentService {
|
|
|
837
837
|
forcePublish
|
|
838
838
|
});
|
|
839
839
|
}
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
// Based on: packages/editor/editor-plugin-collab-edit/src/pm-plugins/mergeUnconfirmed.ts
|
|
843
|
-
|
|
844
|
-
function isLockable(step) {
|
|
845
|
-
return (step === null || step === void 0 ? void 0 : step.lockStep) !== undefined;
|
|
846
840
|
}
|
|
@@ -8,6 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { ACK_MAX_TRY, EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
|
|
10
10
|
import { getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
|
|
11
|
+
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
11
12
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
12
13
|
import throttle from 'lodash/throttle';
|
|
13
14
|
import { MEASURE_NAME, startMeasure, stopMeasure } from '../analytics/performance';
|
|
@@ -928,10 +929,9 @@ export var DocumentService = /*#__PURE__*/function () {
|
|
|
928
929
|
// we need to lock them to ensure they don't get
|
|
929
930
|
// mutated in: `packages/editor/editor-plugin-collab-edit/src/pm-plugins/mergeUnconfirmed.ts`
|
|
930
931
|
if (fg('platform_editor_merge_unconfirmed_steps')) {
|
|
931
|
-
unconfirmedStepsData.
|
|
932
|
-
if (
|
|
933
|
-
|
|
934
|
-
(_s$lockStep = s.lockStep) === null || _s$lockStep === void 0 || _s$lockStep.call(s);
|
|
932
|
+
unconfirmedStepsData.origins.forEach(function (origin) {
|
|
933
|
+
if (origin instanceof Transaction) {
|
|
934
|
+
return origin.setMeta('mergeIsLocked', true);
|
|
935
935
|
}
|
|
936
936
|
});
|
|
937
937
|
}
|
|
@@ -960,10 +960,4 @@ export var DocumentService = /*#__PURE__*/function () {
|
|
|
960
960
|
});
|
|
961
961
|
}
|
|
962
962
|
}]);
|
|
963
|
-
}();
|
|
964
|
-
|
|
965
|
-
// Based on: packages/editor/editor-plugin-collab-edit/src/pm-plugins/mergeUnconfirmed.ts
|
|
966
|
-
|
|
967
|
-
function isLockable(step) {
|
|
968
|
-
return (step === null || step === void 0 ? void 0 : step.lockStep) !== undefined;
|
|
969
|
-
}
|
|
963
|
+
}();
|
|
@@ -4,7 +4,8 @@ import type AnalyticsHelper from '../analytics/analytics-helper';
|
|
|
4
4
|
import { CatchupEventReason } from '../helpers/const';
|
|
5
5
|
import type { MetadataService } from '../metadata/metadata-service';
|
|
6
6
|
import type { Catchupv2Response, ChannelEvent, ReconcileResponse, ReconnectionMetadata, StepsPayload } from '../types';
|
|
7
|
-
import type { EditorState
|
|
7
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
+
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
8
9
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
9
10
|
import type { InternalError } from '../errors/internal-errors';
|
|
10
11
|
import type { ParticipantsService } from '../participants/participants-service';
|
|
@@ -4,7 +4,8 @@ import type AnalyticsHelper from '../analytics/analytics-helper';
|
|
|
4
4
|
import { CatchupEventReason } from '../helpers/const';
|
|
5
5
|
import type { MetadataService } from '../metadata/metadata-service';
|
|
6
6
|
import type { Catchupv2Response, ChannelEvent, ReconcileResponse, ReconnectionMetadata, StepsPayload } from '../types';
|
|
7
|
-
import type { EditorState
|
|
7
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
+
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
8
9
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
9
10
|
import type { InternalError } from '../errors/internal-errors';
|
|
10
11
|
import type { ParticipantsService } from '../participants/participants-service';
|