@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.
@@ -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.2";
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
  };
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "9.29.2";
2
+ export const version = "9.29.3";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "9.29.2";
2
+ export var version = "9.29.3";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -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, }: CollabInitPayload) => void;
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, }: NamespaceStatus) => Promise<void>;
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, }: CollabInitPayload) => void;
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, }: CollabInitPayload) => void;
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, }: NamespaceStatus) => Promise<void>;
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, }: CollabInitPayload) => void;
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.2",
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": "^81.0.0",
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 [API Extractor](https://api-extractor.com/).
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
- // (undocumented)
75
- reason:
76
- | 'CLIENT_DISCONNECT'
77
- | 'SERVER_DISCONNECT'
78
- | 'SOCKET_CLOSED'
79
- | 'SOCKET_ERROR'
80
- | 'SOCKET_TIMEOUT'
81
- | 'UNKNOWN_DISCONNECT';
82
- // (undocumented)
83
- sid: string;
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
- analyticsClient?: AnalyticsWebClient;
115
- // (undocumented)
116
- cacheToken?: boolean;
117
- // (undocumented)
118
- createSocket: (
119
- path: string,
120
- auth?: AuthCallback | InitAndAuthData,
121
- productInfo?: ProductInformation,
122
- ) => Socket;
123
- // (undocumented)
124
- documentAri: string;
125
- enableErrorOnFailedDocumentApply?: boolean;
126
- failedStepLimitBeforeCatchupOnPublish?: number;
127
- // (undocumented)
128
- featureFlags?: {
129
- [key: string]: boolean;
130
- };
131
- // (undocumented)
132
- getAnalyticsWebClient?: Promise<AnalyticsWebClient>;
133
- // (undocumented)
134
- getUser?: GetUserType;
135
- // (undocumented)
136
- initialDraft?: InitialDraft;
137
- // (undocumented)
138
- isBufferingEnabled?: boolean;
139
- // (undocumented)
140
- lifecycle?: Lifecycle;
141
- // (undocumented)
142
- need404?: boolean;
143
- permissionTokenRefresh?: () => Promise<null | string>;
144
- // (undocumented)
145
- productInfo?: ProductInformation;
146
- rateLimitMaxStepSize?: number;
147
- // (undocumented)
148
- rateLimitStepCount?: number;
149
- // (undocumented)
150
- rateLimitTotalStepSize?: number;
151
- // (undocumented)
152
- rateLimitType?: number;
153
- // (undocumented)
154
- storage?: Storage_2;
155
- throwOnNotConnected?: boolean;
156
- // (undocumented)
157
- url: string;
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
- protected emit<K extends keyof T>(evt: K, data: T[K]): this;
163
- off<K extends keyof T>(evt: K, handler: (args: T[K]) => void): this;
164
- on<K extends keyof T>(evt: K, handler: (args: T[K]) => void): this;
165
- unsubscribeAll<K extends keyof T>(evt?: K): this;
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
- userId: string,
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
- // (undocumented)
183
- initialized: boolean;
184
- // (undocumented)
185
- need404?: boolean;
186
- // (undocumented)
187
- token?: string;
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
- // (undocumented)
193
- document: JSONDocNode;
194
- // (undocumented)
195
- metadata?: Metadata_2;
196
- // (undocumented)
197
- timestamp?: number;
198
- // (undocumented)
199
- version: number;
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
- // (undocumented)
205
- on(event: LifecycleEvents, handler: EventHandler): void;
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
- product: string;
216
- subProduct?: string;
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
- constructor(config: Config);
222
- destroy(): this;
223
- // @deprecated
224
- disconnect(): this;
225
- getCurrentState: () => Promise<ResolvedEditorState>;
226
- getFinalAcknowledgedState: () => Promise<ResolvedEditorState>;
227
- getMetadata: () => Metadata_2;
228
- // (undocumented)
229
- getParticipants: () => ProviderParticipant[];
230
- // (undocumented)
231
- getUnconfirmedSteps: () => readonly Step[] | undefined;
232
- // @deprecated
233
- initialize(getState: () => EditorState): this;
234
- send(
235
- _tr: Transaction | null,
236
- _oldState: EditorState | null,
237
- newState: EditorState,
238
- ): void;
239
- sendMessage(data: CollabTelepointerPayload): void;
240
- // @deprecated
241
- setEditorWidth(editorWidth: string, broadcast?: boolean): void;
242
- setMetadata(metadata: Metadata_2): void;
243
- // @deprecated
244
- setTitle(title: string, broadcast?: boolean): void;
245
- setup({
246
- getState,
247
- onSyncUpError,
248
- }: {
249
- getState: () => EditorState;
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
- // (undocumented)
267
- on(event: string, fn: Function): SimpleEventEmitter;
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
- // (undocumented)
273
- close(): Socket;
274
- // (undocumented)
275
- connect(): Socket;
276
- // (undocumented)
277
- emit(event: string, ...args: any[]): Socket;
278
- // (undocumented)
279
- id: string;
280
- // (undocumented)
281
- io?: Manager;
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
- // (undocumented)
287
- delete(key: string): Promise<void>;
288
- // (undocumented)
289
- get(key: string): Promise<string>;
290
- // (undocumented)
291
- set(key: string, value: string): Promise<void>;
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 };