@atlaskit/collab-provider 9.29.2 → 9.29.3
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 +961 -962
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/document/document-service.d.ts +1 -1
- package/dist/types/namespace/namespace-service.d.ts +1 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types-ts4.5/document/document-service.d.ts +1 -1
- package/dist/types-ts4.5/namespace/namespace-service.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +1 -1
- package/package.json +2 -4
- package/report.api.md +128 -138
|
@@ -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 = "9.29.
|
|
8
|
+
var version = exports.version = "9.29.3";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -81,7 +81,7 @@ export declare class DocumentService {
|
|
|
81
81
|
onStepsAdded: (data: StepsPayload) => void;
|
|
82
82
|
onRestore: ({ doc, version, metadata }: CollabInitPayload) => Promise<void>;
|
|
83
83
|
getFinalAcknowledgedState: () => Promise<ResolvedEditorState>;
|
|
84
|
-
updateDocument: ({ doc, version, metadata, reserveCursor
|
|
84
|
+
updateDocument: ({ doc, version, metadata, reserveCursor }: CollabInitPayload) => void;
|
|
85
85
|
private updateDocumentAnalytics;
|
|
86
86
|
private validatePMJSONDocument;
|
|
87
87
|
/**
|
|
@@ -10,5 +10,5 @@ export declare class NamespaceService {
|
|
|
10
10
|
/**
|
|
11
11
|
* ESS-2916 namespace status event- lock/unlock
|
|
12
12
|
*/
|
|
13
|
-
onNamespaceStatusChanged: ({ isLocked, waitTimeInMs, timestamp
|
|
13
|
+
onNamespaceStatusChanged: ({ isLocked, waitTimeInMs, timestamp }: NamespaceStatus) => Promise<void>;
|
|
14
14
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ export interface CatchupOptions {
|
|
|
202
202
|
filterQueue: (condition: (stepsPayload: StepsPayload) => boolean) => void;
|
|
203
203
|
getUnconfirmedSteps: () => readonly Step[] | undefined;
|
|
204
204
|
applyLocalSteps: (steps: Step[]) => void;
|
|
205
|
-
updateDocument: ({ doc, version, metadata, reserveCursor
|
|
205
|
+
updateDocument: ({ doc, version, metadata, reserveCursor }: CollabInitPayload) => void;
|
|
206
206
|
updateMetadata: (metadata: Metadata | undefined) => void;
|
|
207
207
|
analyticsHelper: AnalyticsHelper | undefined;
|
|
208
208
|
clientId: number | string | undefined;
|
|
@@ -81,7 +81,7 @@ export declare class DocumentService {
|
|
|
81
81
|
onStepsAdded: (data: StepsPayload) => void;
|
|
82
82
|
onRestore: ({ doc, version, metadata }: CollabInitPayload) => Promise<void>;
|
|
83
83
|
getFinalAcknowledgedState: () => Promise<ResolvedEditorState>;
|
|
84
|
-
updateDocument: ({ doc, version, metadata, reserveCursor
|
|
84
|
+
updateDocument: ({ doc, version, metadata, reserveCursor }: CollabInitPayload) => void;
|
|
85
85
|
private updateDocumentAnalytics;
|
|
86
86
|
private validatePMJSONDocument;
|
|
87
87
|
/**
|
|
@@ -10,5 +10,5 @@ export declare class NamespaceService {
|
|
|
10
10
|
/**
|
|
11
11
|
* ESS-2916 namespace status event- lock/unlock
|
|
12
12
|
*/
|
|
13
|
-
onNamespaceStatusChanged: ({ isLocked, waitTimeInMs, timestamp
|
|
13
|
+
onNamespaceStatusChanged: ({ isLocked, waitTimeInMs, timestamp }: NamespaceStatus) => Promise<void>;
|
|
14
14
|
}
|
|
@@ -202,7 +202,7 @@ export interface CatchupOptions {
|
|
|
202
202
|
filterQueue: (condition: (stepsPayload: StepsPayload) => boolean) => void;
|
|
203
203
|
getUnconfirmedSteps: () => readonly Step[] | undefined;
|
|
204
204
|
applyLocalSteps: (steps: Step[]) => void;
|
|
205
|
-
updateDocument: ({ doc, version, metadata, reserveCursor
|
|
205
|
+
updateDocument: ({ doc, version, metadata, reserveCursor }: CollabInitPayload) => void;
|
|
206
206
|
updateMetadata: (metadata: Metadata | undefined) => void;
|
|
207
207
|
analyticsHelper: AnalyticsHelper | undefined;
|
|
208
208
|
clientId: number | string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/collab-provider",
|
|
3
|
-
"version": "9.29.
|
|
3
|
+
"version": "9.29.3",
|
|
4
4
|
"description": "A provider for collaborative editing.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
41
41
|
"@atlaskit/analytics-listeners": "^8.9.0",
|
|
42
|
-
"@atlaskit/editor-common": "^
|
|
42
|
+
"@atlaskit/editor-common": "^82.0.0",
|
|
43
43
|
"@atlaskit/editor-json-transformer": "^8.13.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
@@ -67,11 +67,9 @@
|
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@atlaskit/adf-schema": "^36.10.7",
|
|
70
|
-
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
71
70
|
"@atlassian/feature-flags-test-utils": "^0.2.0",
|
|
72
71
|
"typescript": "~5.4.2"
|
|
73
72
|
},
|
|
74
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
75
73
|
"platform-feature-flags": {
|
|
76
74
|
"platform.editor.live-pages-expand-divergence": {
|
|
77
75
|
"type": "boolean"
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/collab-provider"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -52,10 +53,7 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
52
53
|
type AuthCallback = (cb: (data: InitAndAuthData) => void) => void;
|
|
53
54
|
|
|
54
55
|
// @public (undocumented)
|
|
55
|
-
type BaseEvents = Pick<
|
|
56
|
-
CollabEditProvider<CollabEvents>,
|
|
57
|
-
'send' | 'sendMessage' | 'setup'
|
|
58
|
-
>;
|
|
56
|
+
type BaseEvents = Pick<CollabEditProvider<CollabEvents>, 'send' | 'sendMessage' | 'setup'>;
|
|
59
57
|
|
|
60
58
|
export { CollabConnectedPayload };
|
|
61
59
|
|
|
@@ -71,16 +69,16 @@ export { CollabEventConnectionData };
|
|
|
71
69
|
|
|
72
70
|
// @public (undocumented)
|
|
73
71
|
export interface CollabEventDisconnectedData {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
72
|
+
// (undocumented)
|
|
73
|
+
reason:
|
|
74
|
+
| 'CLIENT_DISCONNECT'
|
|
75
|
+
| 'SERVER_DISCONNECT'
|
|
76
|
+
| 'SOCKET_CLOSED'
|
|
77
|
+
| 'SOCKET_ERROR'
|
|
78
|
+
| 'SOCKET_TIMEOUT'
|
|
79
|
+
| 'UNKNOWN_DISCONNECT';
|
|
80
|
+
// (undocumented)
|
|
81
|
+
sid: string;
|
|
84
82
|
}
|
|
85
83
|
|
|
86
84
|
export { CollabEventInitData };
|
|
@@ -111,58 +109,58 @@ export { CollabTelepointerPayload };
|
|
|
111
109
|
|
|
112
110
|
// @public (undocumented)
|
|
113
111
|
interface Config {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
112
|
+
analyticsClient?: AnalyticsWebClient;
|
|
113
|
+
// (undocumented)
|
|
114
|
+
cacheToken?: boolean;
|
|
115
|
+
// (undocumented)
|
|
116
|
+
createSocket: (
|
|
117
|
+
path: string,
|
|
118
|
+
auth?: AuthCallback | InitAndAuthData,
|
|
119
|
+
productInfo?: ProductInformation,
|
|
120
|
+
) => Socket;
|
|
121
|
+
// (undocumented)
|
|
122
|
+
documentAri: string;
|
|
123
|
+
enableErrorOnFailedDocumentApply?: boolean;
|
|
124
|
+
failedStepLimitBeforeCatchupOnPublish?: number;
|
|
125
|
+
// (undocumented)
|
|
126
|
+
featureFlags?: {
|
|
127
|
+
[key: string]: boolean;
|
|
128
|
+
};
|
|
129
|
+
// (undocumented)
|
|
130
|
+
getAnalyticsWebClient?: Promise<AnalyticsWebClient>;
|
|
131
|
+
// (undocumented)
|
|
132
|
+
getUser?: GetUserType;
|
|
133
|
+
// (undocumented)
|
|
134
|
+
initialDraft?: InitialDraft;
|
|
135
|
+
// (undocumented)
|
|
136
|
+
isBufferingEnabled?: boolean;
|
|
137
|
+
// (undocumented)
|
|
138
|
+
lifecycle?: Lifecycle;
|
|
139
|
+
// (undocumented)
|
|
140
|
+
need404?: boolean;
|
|
141
|
+
permissionTokenRefresh?: () => Promise<null | string>;
|
|
142
|
+
// (undocumented)
|
|
143
|
+
productInfo?: ProductInformation;
|
|
144
|
+
rateLimitMaxStepSize?: number;
|
|
145
|
+
// (undocumented)
|
|
146
|
+
rateLimitStepCount?: number;
|
|
147
|
+
// (undocumented)
|
|
148
|
+
rateLimitTotalStepSize?: number;
|
|
149
|
+
// (undocumented)
|
|
150
|
+
rateLimitType?: number;
|
|
151
|
+
// (undocumented)
|
|
152
|
+
storage?: Storage_2;
|
|
153
|
+
throwOnNotConnected?: boolean;
|
|
154
|
+
// (undocumented)
|
|
155
|
+
url: string;
|
|
158
156
|
}
|
|
159
157
|
|
|
160
158
|
// @public (undocumented)
|
|
161
159
|
class Emitter<T = any> {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
protected emit<K extends keyof T>(evt: K, data: T[K]): this;
|
|
161
|
+
off<K extends keyof T>(evt: K, handler: (args: T[K]) => void): this;
|
|
162
|
+
on<K extends keyof T>(evt: K, handler: (args: T[K]) => void): this;
|
|
163
|
+
unsubscribeAll<K extends keyof T>(evt?: K): this;
|
|
166
164
|
}
|
|
167
165
|
|
|
168
166
|
// @public (undocumented)
|
|
@@ -170,39 +168,35 @@ type EventHandler = () => void;
|
|
|
170
168
|
|
|
171
169
|
// @public (undocumented)
|
|
172
170
|
type GetUserType =
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
) => Promise<
|
|
176
|
-
Pick<ProviderParticipant, 'avatar' | 'email' | 'name' | 'userId'>
|
|
177
|
-
>)
|
|
178
|
-
| undefined;
|
|
171
|
+
| ((userId: string) => Promise<Pick<ProviderParticipant, 'avatar' | 'email' | 'name' | 'userId'>>)
|
|
172
|
+
| undefined;
|
|
179
173
|
|
|
180
174
|
// @public (undocumented)
|
|
181
175
|
interface InitAndAuthData {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
176
|
+
// (undocumented)
|
|
177
|
+
initialized: boolean;
|
|
178
|
+
// (undocumented)
|
|
179
|
+
need404?: boolean;
|
|
180
|
+
// (undocumented)
|
|
181
|
+
token?: string;
|
|
188
182
|
}
|
|
189
183
|
|
|
190
184
|
// @public (undocumented)
|
|
191
185
|
interface InitialDraft {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
186
|
+
// (undocumented)
|
|
187
|
+
document: JSONDocNode;
|
|
188
|
+
// (undocumented)
|
|
189
|
+
metadata?: Metadata_2;
|
|
190
|
+
// (undocumented)
|
|
191
|
+
timestamp?: number;
|
|
192
|
+
// (undocumented)
|
|
193
|
+
version: number;
|
|
200
194
|
}
|
|
201
195
|
|
|
202
196
|
// @public (undocumented)
|
|
203
197
|
interface Lifecycle {
|
|
204
|
-
|
|
205
|
-
|
|
198
|
+
// (undocumented)
|
|
199
|
+
on(event: LifecycleEvents, handler: EventHandler): void;
|
|
206
200
|
}
|
|
207
201
|
|
|
208
202
|
// @public (undocumented)
|
|
@@ -212,45 +206,41 @@ export { NewCollabSyncUpErrorAttributes };
|
|
|
212
206
|
|
|
213
207
|
// @public (undocumented)
|
|
214
208
|
type ProductInformation = {
|
|
215
|
-
|
|
216
|
-
|
|
209
|
+
product: string;
|
|
210
|
+
subProduct?: string;
|
|
217
211
|
};
|
|
218
212
|
|
|
219
213
|
// @public (undocumented)
|
|
220
214
|
export class Provider extends Emitter<CollabEvents> implements BaseEvents {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
onSyncUpError?: SyncUpErrorFunction;
|
|
251
|
-
}): this;
|
|
252
|
-
// @deprecated
|
|
253
|
-
unsubscribeAll(): this;
|
|
215
|
+
constructor(config: Config);
|
|
216
|
+
destroy(): this;
|
|
217
|
+
// @deprecated
|
|
218
|
+
disconnect(): this;
|
|
219
|
+
getCurrentState: () => Promise<ResolvedEditorState>;
|
|
220
|
+
getFinalAcknowledgedState: () => Promise<ResolvedEditorState>;
|
|
221
|
+
getMetadata: () => Metadata_2;
|
|
222
|
+
// (undocumented)
|
|
223
|
+
getParticipants: () => ProviderParticipant[];
|
|
224
|
+
// (undocumented)
|
|
225
|
+
getUnconfirmedSteps: () => readonly Step[] | undefined;
|
|
226
|
+
// @deprecated
|
|
227
|
+
initialize(getState: () => EditorState): this;
|
|
228
|
+
send(_tr: Transaction | null, _oldState: EditorState | null, newState: EditorState): void;
|
|
229
|
+
sendMessage(data: CollabTelepointerPayload): void;
|
|
230
|
+
// @deprecated
|
|
231
|
+
setEditorWidth(editorWidth: string, broadcast?: boolean): void;
|
|
232
|
+
setMetadata(metadata: Metadata_2): void;
|
|
233
|
+
// @deprecated
|
|
234
|
+
setTitle(title: string, broadcast?: boolean): void;
|
|
235
|
+
setup({
|
|
236
|
+
getState,
|
|
237
|
+
onSyncUpError,
|
|
238
|
+
}: {
|
|
239
|
+
getState: () => EditorState;
|
|
240
|
+
onSyncUpError?: SyncUpErrorFunction;
|
|
241
|
+
}): this;
|
|
242
|
+
// @deprecated
|
|
243
|
+
unsubscribeAll(): this;
|
|
254
244
|
}
|
|
255
245
|
|
|
256
246
|
export { PROVIDER_ERROR_CODE };
|
|
@@ -263,32 +253,32 @@ export { ResolvedEditorState };
|
|
|
263
253
|
|
|
264
254
|
// @public (undocumented)
|
|
265
255
|
interface SimpleEventEmitter {
|
|
266
|
-
|
|
267
|
-
|
|
256
|
+
// (undocumented)
|
|
257
|
+
on(event: string, fn: Function): SimpleEventEmitter;
|
|
268
258
|
}
|
|
269
259
|
|
|
270
260
|
// @public (undocumented)
|
|
271
261
|
export interface Socket extends SimpleEventEmitter {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
262
|
+
// (undocumented)
|
|
263
|
+
close(): Socket;
|
|
264
|
+
// (undocumented)
|
|
265
|
+
connect(): Socket;
|
|
266
|
+
// (undocumented)
|
|
267
|
+
emit(event: string, ...args: any[]): Socket;
|
|
268
|
+
// (undocumented)
|
|
269
|
+
id: string;
|
|
270
|
+
// (undocumented)
|
|
271
|
+
io?: Manager;
|
|
282
272
|
}
|
|
283
273
|
|
|
284
274
|
// @public (undocumented)
|
|
285
275
|
interface Storage_2 {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
276
|
+
// (undocumented)
|
|
277
|
+
delete(key: string): Promise<void>;
|
|
278
|
+
// (undocumented)
|
|
279
|
+
get(key: string): Promise<string>;
|
|
280
|
+
// (undocumented)
|
|
281
|
+
set(key: string, value: string): Promise<void>;
|
|
292
282
|
}
|
|
293
283
|
|
|
294
284
|
export { SyncUpErrorFunction };
|