@atlaskit/collab-provider 11.2.4 → 11.3.0

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 11.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`72f94befc61f2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/72f94befc61f2) -
8
+ replace method-style signatures with function-style signatures
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
3
14
  ## 11.2.4
4
15
 
5
16
  ### Patch Changes
@@ -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 = "11.2.3";
8
+ var version = exports.version = "11.2.4";
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 = "11.2.3";
2
+ export const version = "11.2.4";
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 = "11.2.3";
2
+ export var version = "11.2.4";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -4,34 +4,34 @@ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/stat
4
4
  import type { InternalError } from '../errors/internal-errors';
5
5
  import type { GetResolvedEditorStateReason } from '@atlaskit/editor-common/types';
6
6
  export interface DocumentServiceInterface {
7
- setup(params: {
7
+ setup: (params: {
8
8
  getState: () => EditorState;
9
9
  onSyncUpError?: SyncUpErrorFunction;
10
10
  clientId: number | string | undefined;
11
- }): this;
12
- updateDocument(params: {
11
+ }) => this;
12
+ updateDocument: (params: {
13
13
  doc: any;
14
14
  version: number;
15
15
  metadata: any;
16
16
  reserveCursor?: boolean;
17
- }): void;
18
- onRestore(params: {
17
+ }) => void;
18
+ onRestore: (params: {
19
19
  doc: any;
20
20
  version: number;
21
21
  metadata: any;
22
- }): void;
23
- onStepsAdded(data: {
22
+ }) => void;
23
+ onStepsAdded: (data: {
24
24
  version: number;
25
25
  steps: any[];
26
- }): void;
27
- onStepRejectedError(): void;
28
- send(tr: Transaction | null, oldState: EditorState | null, newState: EditorState, sendAnalyticsEvent?: boolean): void;
29
- sendStepsFromCurrentState(sendAnalyticsEvent?: boolean, reason?: GetResolvedEditorStateReason): void;
30
- throttledCatchupv2(): void;
31
- getCurrentState(): Promise<ResolvedEditorState>;
32
- getFinalAcknowledgedState(reason: GetResolvedEditorStateReason): Promise<ResolvedEditorState>;
33
- getIsNamespaceLocked(): boolean;
34
- getUnconfirmedSteps(): readonly ProseMirrorStep[] | undefined;
35
- getCurrentPmVersion(): number;
26
+ }) => void;
27
+ onStepRejectedError: () => void;
28
+ send: (tr: Transaction | null, oldState: EditorState | null, newState: EditorState, sendAnalyticsEvent?: boolean) => void;
29
+ sendStepsFromCurrentState: (sendAnalyticsEvent?: boolean, reason?: GetResolvedEditorStateReason) => void;
30
+ throttledCatchupv2: () => void;
31
+ getCurrentState: () => Promise<ResolvedEditorState>;
32
+ getFinalAcknowledgedState: (reason: GetResolvedEditorStateReason) => Promise<ResolvedEditorState>;
33
+ getIsNamespaceLocked: () => boolean;
34
+ getUnconfirmedSteps: () => readonly ProseMirrorStep[] | undefined;
35
+ getCurrentPmVersion: () => number;
36
36
  onErrorHandled: (error: InternalError) => void;
37
37
  }
@@ -12,7 +12,7 @@ export type BatchProps = {
12
12
  /** how often the debounce should run. Defaults to {@link ./participants-service#DEFAULT_FETCH_USERS_INTERVAL} if none provided **/
13
13
  debounceTime?: number;
14
14
  getUsers?: GetUsersType;
15
- onError?(error: unknown): void;
15
+ onError?: (error: unknown) => void;
16
16
  /** when to stop fetching users. eg. if this = 5, we won't attempt to hydrate more than 5 **/
17
17
  participantsLimit?: number;
18
18
  };
@@ -13,9 +13,9 @@ export interface CollabEventDisconnectedData {
13
13
  reason: 'CLIENT_DISCONNECT' | 'SERVER_DISCONNECT' | 'SOCKET_CLOSED' | 'SOCKET_ERROR' | 'SOCKET_TIMEOUT' | 'UNKNOWN_DISCONNECT';
14
14
  }
15
15
  export interface Storage {
16
- get(key: string): Promise<string>;
17
- set(key: string, value: string): Promise<void>;
18
- delete(key: string): Promise<void>;
16
+ get: (key: string) => Promise<string>;
17
+ set: (key: string, value: string) => Promise<void>;
18
+ delete: (key: string) => Promise<void>;
19
19
  }
20
20
  export interface InitialDraft {
21
21
  document: JSONDocNode;
@@ -4,34 +4,34 @@ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/stat
4
4
  import type { InternalError } from '../errors/internal-errors';
5
5
  import type { GetResolvedEditorStateReason } from '@atlaskit/editor-common/types';
6
6
  export interface DocumentServiceInterface {
7
- setup(params: {
7
+ setup: (params: {
8
8
  getState: () => EditorState;
9
9
  onSyncUpError?: SyncUpErrorFunction;
10
10
  clientId: number | string | undefined;
11
- }): this;
12
- updateDocument(params: {
11
+ }) => this;
12
+ updateDocument: (params: {
13
13
  doc: any;
14
14
  version: number;
15
15
  metadata: any;
16
16
  reserveCursor?: boolean;
17
- }): void;
18
- onRestore(params: {
17
+ }) => void;
18
+ onRestore: (params: {
19
19
  doc: any;
20
20
  version: number;
21
21
  metadata: any;
22
- }): void;
23
- onStepsAdded(data: {
22
+ }) => void;
23
+ onStepsAdded: (data: {
24
24
  version: number;
25
25
  steps: any[];
26
- }): void;
27
- onStepRejectedError(): void;
28
- send(tr: Transaction | null, oldState: EditorState | null, newState: EditorState, sendAnalyticsEvent?: boolean): void;
29
- sendStepsFromCurrentState(sendAnalyticsEvent?: boolean, reason?: GetResolvedEditorStateReason): void;
30
- throttledCatchupv2(): void;
31
- getCurrentState(): Promise<ResolvedEditorState>;
32
- getFinalAcknowledgedState(reason: GetResolvedEditorStateReason): Promise<ResolvedEditorState>;
33
- getIsNamespaceLocked(): boolean;
34
- getUnconfirmedSteps(): readonly ProseMirrorStep[] | undefined;
35
- getCurrentPmVersion(): number;
26
+ }) => void;
27
+ onStepRejectedError: () => void;
28
+ send: (tr: Transaction | null, oldState: EditorState | null, newState: EditorState, sendAnalyticsEvent?: boolean) => void;
29
+ sendStepsFromCurrentState: (sendAnalyticsEvent?: boolean, reason?: GetResolvedEditorStateReason) => void;
30
+ throttledCatchupv2: () => void;
31
+ getCurrentState: () => Promise<ResolvedEditorState>;
32
+ getFinalAcknowledgedState: (reason: GetResolvedEditorStateReason) => Promise<ResolvedEditorState>;
33
+ getIsNamespaceLocked: () => boolean;
34
+ getUnconfirmedSteps: () => readonly ProseMirrorStep[] | undefined;
35
+ getCurrentPmVersion: () => number;
36
36
  onErrorHandled: (error: InternalError) => void;
37
37
  }
@@ -12,7 +12,7 @@ export type BatchProps = {
12
12
  /** how often the debounce should run. Defaults to {@link ./participants-service#DEFAULT_FETCH_USERS_INTERVAL} if none provided **/
13
13
  debounceTime?: number;
14
14
  getUsers?: GetUsersType;
15
- onError?(error: unknown): void;
15
+ onError?: (error: unknown) => void;
16
16
  /** when to stop fetching users. eg. if this = 5, we won't attempt to hydrate more than 5 **/
17
17
  participantsLimit?: number;
18
18
  };
@@ -13,9 +13,9 @@ export interface CollabEventDisconnectedData {
13
13
  reason: 'CLIENT_DISCONNECT' | 'SERVER_DISCONNECT' | 'SOCKET_CLOSED' | 'SOCKET_ERROR' | 'SOCKET_TIMEOUT' | 'UNKNOWN_DISCONNECT';
14
14
  }
15
15
  export interface Storage {
16
- get(key: string): Promise<string>;
17
- set(key: string, value: string): Promise<void>;
18
- delete(key: string): Promise<void>;
16
+ get: (key: string) => Promise<string>;
17
+ set: (key: string, value: string) => Promise<void>;
18
+ delete: (key: string) => Promise<void>;
19
19
  }
20
20
  export interface InitialDraft {
21
21
  document: JSONDocNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "11.2.4",
3
+ "version": "11.3.0",
4
4
  "description": "A provider for collaborative editing.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/analytics-gas-types": "^5.1.0",
37
37
  "@atlaskit/analytics-listeners": "^9.0.0",
38
38
  "@atlaskit/anonymous-assets": "^0.0.4",
39
- "@atlaskit/editor-json-transformer": "^8.25.0",
39
+ "@atlaskit/editor-json-transformer": "^8.27.0",
40
40
  "@atlaskit/editor-prosemirror": "7.0.0",
41
41
  "@atlaskit/feature-gate-js-client": "^5.5.0",
42
42
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -68,7 +68,7 @@
68
68
  }
69
69
  },
70
70
  "devDependencies": {
71
- "@atlaskit/adf-schema": "^50.2.0",
71
+ "@atlaskit/adf-schema": "^50.2.1",
72
72
  "@atlassian/feature-flags-test-utils": "^0.3.0"
73
73
  },
74
74
  "platform-feature-flags": {
@@ -86,6 +86,6 @@
86
86
  }
87
87
  },
88
88
  "peerDependencies": {
89
- "@atlaskit/editor-common": "^107.25.0"
89
+ "@atlaskit/editor-common": "^107.26.0"
90
90
  }
91
91
  }