@atlaskit/editor-plugin-collab-edit 4.1.7 → 4.2.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 +19 -0
- package/dist/cjs/pm-plugins/mergeUnconfirmed.js +6 -1
- package/dist/es2019/pm-plugins/mergeUnconfirmed.js +6 -1
- package/dist/esm/pm-plugins/mergeUnconfirmed.js +6 -1
- package/dist/types/pm-plugins/participants.d.ts +1 -1
- package/dist/types/types/index.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/participants.d.ts +1 -1
- package/dist/types-ts4.5/types/index.d.ts +3 -3
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-collab-edit
|
|
2
2
|
|
|
3
|
+
## 4.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ed995ae598c97`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ed995ae598c97) -
|
|
8
|
+
Fix metadata on offline syncing transaction
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.2.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`72f94befc61f2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/72f94befc61f2) -
|
|
16
|
+
replace method-style signatures with function-style signatures
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 4.1.7
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.mergeUnconfirmedSteps = mergeUnconfirmedSteps;
|
|
7
7
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
8
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
9
|
var _prosemirrorCollab = require("@atlaskit/prosemirror-collab");
|
|
9
10
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
10
11
|
var isLocked = function isLocked(step) {
|
|
@@ -40,7 +41,11 @@ function mergeUnconfirmedSteps(steps, api) {
|
|
|
40
41
|
// As we want to wait until all the transactions have been pushed through
|
|
41
42
|
var origin = lastStep.origin;
|
|
42
43
|
if (mergedStep && inverted) {
|
|
43
|
-
|
|
44
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_offline_editing_resync_flicker_fix')) {
|
|
45
|
+
acc[acc.length - 1] = new _prosemirrorCollab.Rebaseable(mergedStep, inverted, origin instanceof _state.Transaction ? origin.setMeta('isOffline', origin.getMeta('isOffline') === true || isOffline) : origin);
|
|
46
|
+
} else {
|
|
47
|
+
acc[acc.length - 1] = new _prosemirrorCollab.Rebaseable(mergedStep, inverted, origin instanceof _state.Transaction ? origin.setMeta('isOffline', isOffline) : origin);
|
|
48
|
+
}
|
|
44
49
|
return acc;
|
|
45
50
|
}
|
|
46
51
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { Rebaseable } from '@atlaskit/prosemirror-collab';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
const isLocked = step => {
|
|
@@ -34,7 +35,11 @@ export function mergeUnconfirmedSteps(steps, api) {
|
|
|
34
35
|
// As we want to wait until all the transactions have been pushed through
|
|
35
36
|
const origin = lastStep.origin;
|
|
36
37
|
if (mergedStep && inverted) {
|
|
37
|
-
|
|
38
|
+
if (fg('platform_editor_offline_editing_resync_flicker_fix')) {
|
|
39
|
+
acc[acc.length - 1] = new Rebaseable(mergedStep, inverted, origin instanceof Transaction ? origin.setMeta('isOffline', origin.getMeta('isOffline') === true || isOffline) : origin);
|
|
40
|
+
} else {
|
|
41
|
+
acc[acc.length - 1] = new Rebaseable(mergedStep, inverted, origin instanceof Transaction ? origin.setMeta('isOffline', isOffline) : origin);
|
|
42
|
+
}
|
|
38
43
|
return acc;
|
|
39
44
|
}
|
|
40
45
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { Rebaseable } from '@atlaskit/prosemirror-collab';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
var isLocked = function isLocked(step) {
|
|
@@ -34,7 +35,11 @@ export function mergeUnconfirmedSteps(steps, api) {
|
|
|
34
35
|
// As we want to wait until all the transactions have been pushed through
|
|
35
36
|
var origin = lastStep.origin;
|
|
36
37
|
if (mergedStep && inverted) {
|
|
37
|
-
|
|
38
|
+
if (fg('platform_editor_offline_editing_resync_flicker_fix')) {
|
|
39
|
+
acc[acc.length - 1] = new Rebaseable(mergedStep, inverted, origin instanceof Transaction ? origin.setMeta('isOffline', origin.getMeta('isOffline') === true || isOffline) : origin);
|
|
40
|
+
} else {
|
|
41
|
+
acc[acc.length - 1] = new Rebaseable(mergedStep, inverted, origin instanceof Transaction ? origin.setMeta('isOffline', isOffline) : origin);
|
|
42
|
+
}
|
|
38
43
|
return acc;
|
|
39
44
|
}
|
|
40
45
|
}
|
|
@@ -10,5 +10,5 @@ export declare class Participants implements ReadOnlyParticipants {
|
|
|
10
10
|
toArray(): CollabParticipant[];
|
|
11
11
|
get(sessionId: string): CollabParticipant | undefined;
|
|
12
12
|
size(): number;
|
|
13
|
-
eq(other:
|
|
13
|
+
eq(other: ReadOnlyParticipants): boolean;
|
|
14
14
|
}
|
|
@@ -9,9 +9,9 @@ export type PrivateCollabEditOptions = CollabEditOptions & {
|
|
|
9
9
|
export type ProviderCallback = <ReturnType>(codeToExecute: (provider: CollabEditProvider) => ReturnType | undefined, onError?: (err: Error) => void) => Promise<ReturnType | undefined> | undefined;
|
|
10
10
|
export type ProviderBuilder = (collabEditProviderPromise: Promise<CollabEditProvider>) => ProviderCallback;
|
|
11
11
|
export interface ReadOnlyParticipants {
|
|
12
|
-
get(sessionId: string)
|
|
13
|
-
toArray()
|
|
14
|
-
eq(other: ReadOnlyParticipants)
|
|
12
|
+
get: (sessionId: string) => CollabParticipant | undefined;
|
|
13
|
+
toArray: () => ReadonlyArray<CollabParticipant>;
|
|
14
|
+
eq: (other: ReadOnlyParticipants) => boolean;
|
|
15
15
|
}
|
|
16
16
|
export type CollabInitializedMetadata = {
|
|
17
17
|
collabInitialisedAt: null | number;
|
|
@@ -10,5 +10,5 @@ export declare class Participants implements ReadOnlyParticipants {
|
|
|
10
10
|
toArray(): CollabParticipant[];
|
|
11
11
|
get(sessionId: string): CollabParticipant | undefined;
|
|
12
12
|
size(): number;
|
|
13
|
-
eq(other:
|
|
13
|
+
eq(other: ReadOnlyParticipants): boolean;
|
|
14
14
|
}
|
|
@@ -9,9 +9,9 @@ export type PrivateCollabEditOptions = CollabEditOptions & {
|
|
|
9
9
|
export type ProviderCallback = <ReturnType>(codeToExecute: (provider: CollabEditProvider) => ReturnType | undefined, onError?: (err: Error) => void) => Promise<ReturnType | undefined> | undefined;
|
|
10
10
|
export type ProviderBuilder = (collabEditProviderPromise: Promise<CollabEditProvider>) => ProviderCallback;
|
|
11
11
|
export interface ReadOnlyParticipants {
|
|
12
|
-
get(sessionId: string)
|
|
13
|
-
toArray()
|
|
14
|
-
eq(other: ReadOnlyParticipants)
|
|
12
|
+
get: (sessionId: string) => CollabParticipant | undefined;
|
|
13
|
+
toArray: () => ReadonlyArray<CollabParticipant>;
|
|
14
|
+
eq: (other: ReadOnlyParticipants) => boolean;
|
|
15
15
|
}
|
|
16
16
|
export type CollabInitializedMetadata = {
|
|
17
17
|
collabInitialisedAt: null | number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-collab-edit",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "Collab Edit plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@atlaskit/adf-schema": "^50.2.1",
|
|
34
34
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
35
|
-
"@atlaskit/editor-json-transformer": "^8.
|
|
35
|
+
"@atlaskit/editor-json-transformer": "^8.27.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-connectivity": "^3.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"memoize-one": "^6.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@atlaskit/editor-common": "^107.
|
|
50
|
+
"@atlaskit/editor-common": "^107.27.0",
|
|
51
51
|
"react": "^18.2.0",
|
|
52
52
|
"react-dom": "^18.2.0"
|
|
53
53
|
},
|
|
@@ -105,6 +105,9 @@
|
|
|
105
105
|
"platform-feature-flags": {
|
|
106
106
|
"platform_enable_ncs_step_metrics": {
|
|
107
107
|
"type": "boolean"
|
|
108
|
+
},
|
|
109
|
+
"platform_editor_offline_editing_resync_flicker_fix": {
|
|
110
|
+
"type": "boolean"
|
|
108
111
|
}
|
|
109
112
|
}
|
|
110
113
|
}
|