@docx-editor.dev/pro 2.27.0 → 2.28.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/dist/chunk-CNXDNDD3.js +1 -0
- package/dist/{chunk-PVRTSPHN.cjs → chunk-FD2KDBHX.cjs} +1 -1
- package/dist/chunk-JRHEYVVY.cjs +1 -0
- package/dist/chunk-L567WP3J.js +5 -0
- package/dist/chunk-MJECUVHQ.cjs +5 -0
- package/dist/chunk-MWO2ZUEJ.js +1 -0
- package/dist/chunk-N34IUO36.cjs +1 -0
- package/dist/chunk-OT5R3IYV.cjs +1 -0
- package/dist/chunk-P2EF7WMV.js +1 -0
- package/dist/chunk-Q5JTCGJI.js +1 -0
- package/dist/chunk-SNQCYZLT.js +1 -0
- package/dist/chunk-ZSAAX6HV.cjs +1 -0
- package/dist/collaboration/hocuspocus.cjs +1 -1
- package/dist/collaboration/hocuspocus.d.cts +18 -11
- package/dist/collaboration/hocuspocus.d.ts +18 -11
- package/dist/collaboration/hocuspocus.js +1 -1
- package/dist/collaboration/index.cjs +2 -2
- package/dist/collaboration/index.d.cts +333 -18
- package/dist/collaboration/index.d.ts +333 -18
- package/dist/collaboration/index.js +2 -2
- package/dist/collaboration/webrtc.cjs +2 -2
- package/dist/collaboration/webrtc.d.cts +26 -3
- package/dist/collaboration/webrtc.d.ts +26 -3
- package/dist/collaboration/webrtc.js +2 -2
- package/dist/{collaboration-module-DlSv0oAd.d.cts → collaboration-module-DWn2heE1.d.cts} +1 -0
- package/dist/{collaboration-module-DlSv0oAd.d.ts → collaboration-module-DWn2heE1.d.ts} +1 -0
- package/dist/{define-custom-node-DUJ4ZZdo.d.ts → define-custom-node-CNRQG1TI.d.cts} +12 -4
- package/dist/{define-custom-node-DG5gpRa5.d.cts → define-custom-node-D0c36PpZ.d.ts} +12 -4
- package/dist/document-session-3VC43WNI.cjs +1 -0
- package/dist/{document-session-BKKfJzKB.d.cts → document-session-Bxs4_GgX.d.ts} +55 -33
- package/dist/document-session-J2YKWERI.js +1 -0
- package/dist/{document-session-BQ4nBDTd.d.ts → document-session-_v9vqiSX.d.cts} +55 -33
- package/dist/document-session-options-CfKypp9c.d.cts +37 -0
- package/dist/document-session-options-DelOC7PX.d.ts +37 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +29 -4
- package/dist/index.d.ts +29 -4
- package/dist/index.js +1 -1
- package/dist/react/hocuspocus.cjs +1 -1
- package/dist/react/hocuspocus.d.cts +52 -8
- package/dist/react/hocuspocus.d.ts +52 -8
- package/dist/react/hocuspocus.js +1 -1
- package/dist/react/index.cjs +2 -2
- package/dist/react/index.d.cts +354 -156
- package/dist/react/index.d.ts +354 -156
- package/dist/react/index.js +2 -2
- package/dist/react/webrtc.cjs +1 -1
- package/dist/react/webrtc.d.cts +35 -7
- package/dist/react/webrtc.d.ts +35 -7
- package/dist/react/webrtc.js +1 -1
- package/dist/{session-okdqygLg.d.cts → types-6EmrEn4n.d.cts} +26 -4
- package/dist/{session-okdqygLg.d.ts → types-6EmrEn4n.d.ts} +26 -4
- package/dist/{session-B-ds4k64.d.cts → types-BQ1vBt5Q.d.cts} +32 -54
- package/dist/{session-B-ds4k64.d.ts → types-BQ1vBt5Q.d.ts} +32 -54
- package/dist/vue/hocuspocus.cjs +1 -1
- package/dist/vue/hocuspocus.d.cts +52 -7
- package/dist/vue/hocuspocus.d.ts +52 -7
- package/dist/vue/hocuspocus.js +1 -1
- package/dist/vue/index.cjs +2 -2
- package/dist/vue/index.d.cts +235 -24
- package/dist/vue/index.d.ts +235 -24
- package/dist/vue/index.js +2 -2
- package/dist/vue/webrtc.cjs +1 -1
- package/dist/vue/webrtc.d.cts +36 -6
- package/dist/vue/webrtc.d.ts +36 -6
- package/dist/vue/webrtc.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-6CDC4KCE.js +0 -4
- package/dist/chunk-6SR5OK66.cjs +0 -4
- package/dist/chunk-GDTCNTK7.cjs +0 -1
- package/dist/chunk-HJB77VBO.js +0 -1
- package/dist/chunk-HZEWGK5A.cjs +0 -4
- package/dist/chunk-Q4YPX2DT.cjs +0 -1
- package/dist/chunk-Q7P2DQ33.js +0 -1
- package/dist/chunk-RGR2BLZD.js +0 -4
- package/dist/chunk-W3V54DWZ.js +0 -1
- package/dist/document-session-32FPPQHT.js +0 -1
- package/dist/document-session-32ULDU2C.js +0 -1
- package/dist/document-session-HCU2O55L.cjs +0 -1
- package/dist/document-session-ZOM2KHHX.cjs +0 -1
- package/dist/hocuspocus-BMF7MTMJ.js +0 -1
- package/dist/hocuspocus-JPJOC6ZV.cjs +0 -1
- package/dist/webrtc-MM3LDVLU.cjs +0 -2
- package/dist/webrtc-RYONN7E7.js +0 -2
|
@@ -3,14 +3,13 @@ import { CollaborationIdentity, CollaborationStatus, CollaborationStatusSnapshot
|
|
|
3
3
|
/**
|
|
4
4
|
* Create or join bootstrap for one collaboration replica.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* The document and WebRTC factories share this union.
|
|
7
7
|
*
|
|
8
8
|
* `create-or-join` removes the out-of-band decision about which peer creates a room.
|
|
9
9
|
* The replica probes for an initialized room and joins it when one appears. Otherwise it
|
|
10
10
|
* runs a short awareness election and only the winning candidate seeds from `document`.
|
|
11
11
|
* A room that two peers seeded concurrently reports the terminal failure code
|
|
12
|
-
* `concurrent-seed` on every replica.
|
|
13
|
-
* the experimental text factory refuses it.
|
|
12
|
+
* `concurrent-seed` on every replica.
|
|
14
13
|
* @public
|
|
15
14
|
*/
|
|
16
15
|
type CollaborationBootstrap = {
|
|
@@ -23,12 +22,16 @@ type CollaborationBootstrap = {
|
|
|
23
22
|
} | {
|
|
24
23
|
readonly kind: 'create-or-join';
|
|
25
24
|
readonly document: Uint8Array;
|
|
26
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Wait for an existing initialized room before the seed election. Default 4000 ms, or
|
|
27
|
+
* 0 with Hocuspocus, where the server sync already delivered the whole room.
|
|
28
|
+
*/
|
|
27
29
|
readonly probeTimeoutMs?: number;
|
|
28
30
|
/** Seed election window after an empty probe. Default 1500 ms. */
|
|
29
31
|
readonly electionWindowMs?: number;
|
|
30
32
|
/** Join wait after this replica loses the seed election. Default 30000 ms. */
|
|
31
33
|
readonly timeoutMs?: number;
|
|
34
|
+
/** Abort the join. The factory rejects with `initialization-aborted`. */
|
|
32
35
|
readonly signal?: AbortSignal;
|
|
33
36
|
};
|
|
34
37
|
/**
|
|
@@ -39,7 +42,9 @@ type CollaborationBootstrap = {
|
|
|
39
42
|
* @public
|
|
40
43
|
*/
|
|
41
44
|
interface CollaborationIdentityUpdate {
|
|
45
|
+
/** New display name, 1 to 256 characters after trimming. */
|
|
42
46
|
readonly name?: string;
|
|
47
|
+
/** New presence color, at most 64 characters. */
|
|
43
48
|
readonly color?: string;
|
|
44
49
|
}
|
|
45
50
|
/**
|
|
@@ -50,9 +55,11 @@ interface CollaborationIdentityUpdate {
|
|
|
50
55
|
* @public
|
|
51
56
|
*/
|
|
52
57
|
interface CollaborationSession {
|
|
58
|
+
/** The room's document id. */
|
|
53
59
|
readonly documentId: string;
|
|
54
60
|
/** Unique identity for this attachment lifetime. */
|
|
55
61
|
readonly sessionId: string;
|
|
62
|
+
/** The validated local identity. */
|
|
56
63
|
readonly identity: CollaborationIdentity;
|
|
57
64
|
/**
|
|
58
65
|
* Update the display name and color mid-session, when the replica supports it.
|
|
@@ -61,6 +68,12 @@ interface CollaborationSession {
|
|
|
61
68
|
* freezes identity for its lifetime omits it.
|
|
62
69
|
*/
|
|
63
70
|
setIdentity?(update: CollaborationIdentityUpdate): void;
|
|
71
|
+
/**
|
|
72
|
+
* Whether edits continue while the transport is down (`disconnected`). Set by the
|
|
73
|
+
* `offlineEditing` option; absent means true.
|
|
74
|
+
*/
|
|
75
|
+
readonly offlineEditing?: boolean;
|
|
76
|
+
/** Current lifecycle state. */
|
|
64
77
|
status(): CollaborationStatus;
|
|
65
78
|
/**
|
|
66
79
|
* Cached status, current reason, and last failure.
|
|
@@ -68,14 +81,23 @@ interface CollaborationSession {
|
|
|
68
81
|
* Same reference until any of those values change.
|
|
69
82
|
*/
|
|
70
83
|
statusSnapshot(): CollaborationStatusSnapshot;
|
|
84
|
+
/** Call `listener` on each status or reason change. Returns the unsubscribe function. */
|
|
71
85
|
subscribeStatus(listener: (status: CollaborationStatus, reason?: CollaborationFailureCode, detail?: string) => void): () => void;
|
|
86
|
+
/** Whether the shared undo history holds a local step to undo. */
|
|
72
87
|
canUndo(): boolean;
|
|
88
|
+
/** Whether the shared undo history holds a local step to redo. */
|
|
73
89
|
canRedo(): boolean;
|
|
90
|
+
/** Undo this participant's last step; others' edits stay. Returns false when refused. */
|
|
74
91
|
undo(): boolean;
|
|
92
|
+
/** Redo this participant's last undone step. Returns false when refused. */
|
|
75
93
|
redo(): boolean;
|
|
94
|
+
/** Participants in presence, this replica included. Capped at 256. */
|
|
76
95
|
participants(): readonly CollaborationParticipant[];
|
|
96
|
+
/** Call `listener` when the participant list changes. Returns the unsubscribe function. */
|
|
77
97
|
subscribeParticipants(listener: (participants: readonly CollaborationParticipant[]) => void): () => void;
|
|
98
|
+
/** Other participants' selections, resolved into this replica's addresses. */
|
|
78
99
|
remoteSelections(): readonly CollaborationRemoteSelection[];
|
|
100
|
+
/** Call `listener` when a remote selection changes. Returns the unsubscribe function. */
|
|
79
101
|
subscribeRemoteSelections(listener: (selections: readonly CollaborationRemoteSelection[]) => void): () => void;
|
|
80
102
|
}
|
|
81
103
|
|
|
@@ -3,14 +3,13 @@ import { CollaborationIdentity, CollaborationStatus, CollaborationStatusSnapshot
|
|
|
3
3
|
/**
|
|
4
4
|
* Create or join bootstrap for one collaboration replica.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* The document and WebRTC factories share this union.
|
|
7
7
|
*
|
|
8
8
|
* `create-or-join` removes the out-of-band decision about which peer creates a room.
|
|
9
9
|
* The replica probes for an initialized room and joins it when one appears. Otherwise it
|
|
10
10
|
* runs a short awareness election and only the winning candidate seeds from `document`.
|
|
11
11
|
* A room that two peers seeded concurrently reports the terminal failure code
|
|
12
|
-
* `concurrent-seed` on every replica.
|
|
13
|
-
* the experimental text factory refuses it.
|
|
12
|
+
* `concurrent-seed` on every replica.
|
|
14
13
|
* @public
|
|
15
14
|
*/
|
|
16
15
|
type CollaborationBootstrap = {
|
|
@@ -23,12 +22,16 @@ type CollaborationBootstrap = {
|
|
|
23
22
|
} | {
|
|
24
23
|
readonly kind: 'create-or-join';
|
|
25
24
|
readonly document: Uint8Array;
|
|
26
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Wait for an existing initialized room before the seed election. Default 4000 ms, or
|
|
27
|
+
* 0 with Hocuspocus, where the server sync already delivered the whole room.
|
|
28
|
+
*/
|
|
27
29
|
readonly probeTimeoutMs?: number;
|
|
28
30
|
/** Seed election window after an empty probe. Default 1500 ms. */
|
|
29
31
|
readonly electionWindowMs?: number;
|
|
30
32
|
/** Join wait after this replica loses the seed election. Default 30000 ms. */
|
|
31
33
|
readonly timeoutMs?: number;
|
|
34
|
+
/** Abort the join. The factory rejects with `initialization-aborted`. */
|
|
32
35
|
readonly signal?: AbortSignal;
|
|
33
36
|
};
|
|
34
37
|
/**
|
|
@@ -39,7 +42,9 @@ type CollaborationBootstrap = {
|
|
|
39
42
|
* @public
|
|
40
43
|
*/
|
|
41
44
|
interface CollaborationIdentityUpdate {
|
|
45
|
+
/** New display name, 1 to 256 characters after trimming. */
|
|
42
46
|
readonly name?: string;
|
|
47
|
+
/** New presence color, at most 64 characters. */
|
|
43
48
|
readonly color?: string;
|
|
44
49
|
}
|
|
45
50
|
/**
|
|
@@ -50,9 +55,11 @@ interface CollaborationIdentityUpdate {
|
|
|
50
55
|
* @public
|
|
51
56
|
*/
|
|
52
57
|
interface CollaborationSession {
|
|
58
|
+
/** The room's document id. */
|
|
53
59
|
readonly documentId: string;
|
|
54
60
|
/** Unique identity for this attachment lifetime. */
|
|
55
61
|
readonly sessionId: string;
|
|
62
|
+
/** The validated local identity. */
|
|
56
63
|
readonly identity: CollaborationIdentity;
|
|
57
64
|
/**
|
|
58
65
|
* Update the display name and color mid-session, when the replica supports it.
|
|
@@ -61,6 +68,12 @@ interface CollaborationSession {
|
|
|
61
68
|
* freezes identity for its lifetime omits it.
|
|
62
69
|
*/
|
|
63
70
|
setIdentity?(update: CollaborationIdentityUpdate): void;
|
|
71
|
+
/**
|
|
72
|
+
* Whether edits continue while the transport is down (`disconnected`). Set by the
|
|
73
|
+
* `offlineEditing` option; absent means true.
|
|
74
|
+
*/
|
|
75
|
+
readonly offlineEditing?: boolean;
|
|
76
|
+
/** Current lifecycle state. */
|
|
64
77
|
status(): CollaborationStatus;
|
|
65
78
|
/**
|
|
66
79
|
* Cached status, current reason, and last failure.
|
|
@@ -68,14 +81,23 @@ interface CollaborationSession {
|
|
|
68
81
|
* Same reference until any of those values change.
|
|
69
82
|
*/
|
|
70
83
|
statusSnapshot(): CollaborationStatusSnapshot;
|
|
84
|
+
/** Call `listener` on each status or reason change. Returns the unsubscribe function. */
|
|
71
85
|
subscribeStatus(listener: (status: CollaborationStatus, reason?: CollaborationFailureCode, detail?: string) => void): () => void;
|
|
86
|
+
/** Whether the shared undo history holds a local step to undo. */
|
|
72
87
|
canUndo(): boolean;
|
|
88
|
+
/** Whether the shared undo history holds a local step to redo. */
|
|
73
89
|
canRedo(): boolean;
|
|
90
|
+
/** Undo this participant's last step; others' edits stay. Returns false when refused. */
|
|
74
91
|
undo(): boolean;
|
|
92
|
+
/** Redo this participant's last undone step. Returns false when refused. */
|
|
75
93
|
redo(): boolean;
|
|
94
|
+
/** Participants in presence, this replica included. Capped at 256. */
|
|
76
95
|
participants(): readonly CollaborationParticipant[];
|
|
96
|
+
/** Call `listener` when the participant list changes. Returns the unsubscribe function. */
|
|
77
97
|
subscribeParticipants(listener: (participants: readonly CollaborationParticipant[]) => void): () => void;
|
|
98
|
+
/** Other participants' selections, resolved into this replica's addresses. */
|
|
78
99
|
remoteSelections(): readonly CollaborationRemoteSelection[];
|
|
100
|
+
/** Call `listener` when a remote selection changes. Returns the unsubscribe function. */
|
|
79
101
|
subscribeRemoteSelections(listener: (selections: readonly CollaborationRemoteSelection[]) => void): () => void;
|
|
80
102
|
}
|
|
81
103
|
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Awareness } from 'y-protocols/awareness';
|
|
3
|
-
import { CollaborationIdentity, CollaborationStatus, CollaborationStatusSnapshot, CollaborationFailureCode, CollaborationParticipant, CollaborationRemoteSelection, EditorCollaborationSession } from '@docx-editor.dev/core/collaboration';
|
|
1
|
+
import { CollaborationIdentity, CollaborationStatus, CollaborationStatusSnapshot, CollaborationFailureCode, CollaborationParticipant, CollaborationRemoteSelection } from '@docx-editor.dev/core/collaboration';
|
|
4
2
|
|
|
5
3
|
/**
|
|
6
4
|
* Create or join bootstrap for one collaboration replica.
|
|
7
5
|
*
|
|
8
|
-
*
|
|
6
|
+
* The document and WebRTC factories share this union.
|
|
9
7
|
*
|
|
10
8
|
* `create-or-join` removes the out-of-band decision about which peer creates a room.
|
|
11
9
|
* The replica probes for an initialized room and joins it when one appears. Otherwise it
|
|
12
10
|
* runs a short awareness election and only the winning candidate seeds from `document`.
|
|
13
11
|
* A room that two peers seeded concurrently reports the terminal failure code
|
|
14
|
-
* `concurrent-seed` on every replica.
|
|
15
|
-
* the experimental text factory refuses it.
|
|
12
|
+
* `concurrent-seed` on every replica.
|
|
16
13
|
* @public
|
|
17
14
|
*/
|
|
18
15
|
type CollaborationBootstrap = {
|
|
@@ -25,12 +22,16 @@ type CollaborationBootstrap = {
|
|
|
25
22
|
} | {
|
|
26
23
|
readonly kind: 'create-or-join';
|
|
27
24
|
readonly document: Uint8Array;
|
|
28
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Wait for an existing initialized room before the seed election. Default 4000 ms, or
|
|
27
|
+
* 0 with Hocuspocus, where the server sync already delivered the whole room.
|
|
28
|
+
*/
|
|
29
29
|
readonly probeTimeoutMs?: number;
|
|
30
30
|
/** Seed election window after an empty probe. Default 1500 ms. */
|
|
31
31
|
readonly electionWindowMs?: number;
|
|
32
32
|
/** Join wait after this replica loses the seed election. Default 30000 ms. */
|
|
33
33
|
readonly timeoutMs?: number;
|
|
34
|
+
/** Abort the join. The factory rejects with `initialization-aborted`. */
|
|
34
35
|
readonly signal?: AbortSignal;
|
|
35
36
|
};
|
|
36
37
|
/**
|
|
@@ -41,7 +42,9 @@ type CollaborationBootstrap = {
|
|
|
41
42
|
* @public
|
|
42
43
|
*/
|
|
43
44
|
interface CollaborationIdentityUpdate {
|
|
45
|
+
/** New display name, 1 to 256 characters after trimming. */
|
|
44
46
|
readonly name?: string;
|
|
47
|
+
/** New presence color, at most 64 characters. */
|
|
45
48
|
readonly color?: string;
|
|
46
49
|
}
|
|
47
50
|
/**
|
|
@@ -52,9 +55,11 @@ interface CollaborationIdentityUpdate {
|
|
|
52
55
|
* @public
|
|
53
56
|
*/
|
|
54
57
|
interface CollaborationSession {
|
|
58
|
+
/** The room's document id. */
|
|
55
59
|
readonly documentId: string;
|
|
56
60
|
/** Unique identity for this attachment lifetime. */
|
|
57
61
|
readonly sessionId: string;
|
|
62
|
+
/** The validated local identity. */
|
|
58
63
|
readonly identity: CollaborationIdentity;
|
|
59
64
|
/**
|
|
60
65
|
* Update the display name and color mid-session, when the replica supports it.
|
|
@@ -63,6 +68,12 @@ interface CollaborationSession {
|
|
|
63
68
|
* freezes identity for its lifetime omits it.
|
|
64
69
|
*/
|
|
65
70
|
setIdentity?(update: CollaborationIdentityUpdate): void;
|
|
71
|
+
/**
|
|
72
|
+
* Whether edits continue while the transport is down (`disconnected`). Set by the
|
|
73
|
+
* `offlineEditing` option; absent means true.
|
|
74
|
+
*/
|
|
75
|
+
readonly offlineEditing?: boolean;
|
|
76
|
+
/** Current lifecycle state. */
|
|
66
77
|
status(): CollaborationStatus;
|
|
67
78
|
/**
|
|
68
79
|
* Cached status, current reason, and last failure.
|
|
@@ -70,72 +81,39 @@ interface CollaborationSession {
|
|
|
70
81
|
* Same reference until any of those values change.
|
|
71
82
|
*/
|
|
72
83
|
statusSnapshot(): CollaborationStatusSnapshot;
|
|
84
|
+
/** Call `listener` on each status or reason change. Returns the unsubscribe function. */
|
|
73
85
|
subscribeStatus(listener: (status: CollaborationStatus, reason?: CollaborationFailureCode, detail?: string) => void): () => void;
|
|
86
|
+
/** Whether the shared undo history holds a local step to undo. */
|
|
74
87
|
canUndo(): boolean;
|
|
88
|
+
/** Whether the shared undo history holds a local step to redo. */
|
|
75
89
|
canRedo(): boolean;
|
|
90
|
+
/** Undo this participant's last step; others' edits stay. Returns false when refused. */
|
|
76
91
|
undo(): boolean;
|
|
92
|
+
/** Redo this participant's last undone step. Returns false when refused. */
|
|
77
93
|
redo(): boolean;
|
|
94
|
+
/** Participants in presence, this replica included. Capped at 256. */
|
|
78
95
|
participants(): readonly CollaborationParticipant[];
|
|
96
|
+
/** Call `listener` when the participant list changes. Returns the unsubscribe function. */
|
|
79
97
|
subscribeParticipants(listener: (participants: readonly CollaborationParticipant[]) => void): () => void;
|
|
98
|
+
/** Other participants' selections, resolved into this replica's addresses. */
|
|
80
99
|
remoteSelections(): readonly CollaborationRemoteSelection[];
|
|
100
|
+
/** Call `listener` when a remote selection changes. Returns the unsubscribe function. */
|
|
81
101
|
subscribeRemoteSelections(listener: (selections: readonly CollaborationRemoteSelection[]) => void): () => void;
|
|
82
102
|
}
|
|
83
|
-
/**
|
|
84
|
-
* Options for the experimental paragraph-text replica of {@link createTextCollaboration}.
|
|
85
|
-
*
|
|
86
|
-
* The caller owns `ydoc`.
|
|
87
|
-
* @beta
|
|
88
|
-
*/
|
|
89
|
-
interface CreateTextCollaborationOptions {
|
|
90
|
-
readonly ydoc: Y.Doc;
|
|
91
|
-
readonly awareness: Awareness;
|
|
92
|
-
readonly documentId: string;
|
|
93
|
-
/** Unique attachment identity. Omit it to generate a new identity for this session. */
|
|
94
|
-
readonly sessionId?: string;
|
|
95
|
-
readonly identity: CollaborationIdentity;
|
|
96
|
-
readonly bootstrap: CollaborationBootstrap;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Engine-facing paragraph-text session, including attach and operation gating.
|
|
100
|
-
*
|
|
101
|
-
* Hosts consume {@link CollaborationSession}. Providers call `setTransportStatus`.
|
|
102
|
-
* @public
|
|
103
|
-
*/
|
|
104
|
-
interface TextCollaborationSession extends EditorCollaborationSession {
|
|
105
|
-
/**
|
|
106
|
-
* Provider convenience seam. Low-level consumers normally leave the session ready.
|
|
107
|
-
*
|
|
108
|
-
* `reason` is a typed code so a host can branch on it: pass `'transport-disconnected'` for
|
|
109
|
-
* a socket that will retry itself and `'authentication-failed'` for a credential the server
|
|
110
|
-
* rejected, because those need opposite responses. The provider's own phrasing goes in
|
|
111
|
-
* `detail`.
|
|
112
|
-
*/
|
|
113
|
-
setTransportStatus(status: 'ready' | 'disconnected' | 'error', reason?: CollaborationFailureCode, detail?: string): void;
|
|
114
|
-
}
|
|
115
103
|
/**
|
|
116
104
|
* Owned collaboration replica: document bytes, session, and teardown.
|
|
117
105
|
*
|
|
118
|
-
*
|
|
106
|
+
* A host reads
|
|
119
107
|
* {@link CollaborationSession}; the engine session remains assignable.
|
|
120
108
|
* @public
|
|
121
109
|
*/
|
|
122
110
|
interface CollaborationHandle<TSession extends CollaborationSession> {
|
|
111
|
+
/** The room's document as `.docx` bytes. Mount the editor with them. */
|
|
123
112
|
readonly document: Uint8Array;
|
|
113
|
+
/** The live session. Pass it to `collaborationModule`. */
|
|
124
114
|
readonly session: TSession;
|
|
115
|
+
/** Stop the replica and release its listeners. The session becomes `destroyed`. */
|
|
125
116
|
destroy(): void;
|
|
126
117
|
}
|
|
127
|
-
/** Owned replica of the experimental {@link createTextCollaboration} factory. @beta */
|
|
128
|
-
type TextCollaborationHandle = CollaborationHandle<TextCollaborationSession>;
|
|
129
|
-
/**
|
|
130
|
-
* Create or join one experimental paragraph-text collaboration replica.
|
|
131
|
-
*
|
|
132
|
-
* This replica shares only the body paragraph text of an unchanging paragraph set: no
|
|
133
|
-
* formatting, no structure, no images. Use {@link createDocumentCollaboration} for
|
|
134
|
-
* full-document collaboration; this factory remains for hosts that want to replicate plain
|
|
135
|
-
* paragraph text and nothing else. The caller owns `ydoc`.
|
|
136
|
-
* @beta
|
|
137
|
-
*/
|
|
138
|
-
declare function createTextCollaboration(options: CreateTextCollaborationOptions): Promise<TextCollaborationHandle>;
|
|
139
118
|
|
|
140
|
-
export {
|
|
141
|
-
export type { CollaborationSession as C, TextCollaborationHandle as T, CollaborationBootstrap as a, CollaborationIdentityUpdate as b, CollaborationHandle as c, CreateTextCollaborationOptions as d, TextCollaborationSession as e };
|
|
119
|
+
export type { CollaborationSession as C, CollaborationBootstrap as a, CollaborationIdentityUpdate as b, CollaborationHandle as c };
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Awareness } from 'y-protocols/awareness';
|
|
3
|
-
import { CollaborationIdentity, CollaborationStatus, CollaborationStatusSnapshot, CollaborationFailureCode, CollaborationParticipant, CollaborationRemoteSelection, EditorCollaborationSession } from '@docx-editor.dev/core/collaboration';
|
|
1
|
+
import { CollaborationIdentity, CollaborationStatus, CollaborationStatusSnapshot, CollaborationFailureCode, CollaborationParticipant, CollaborationRemoteSelection } from '@docx-editor.dev/core/collaboration';
|
|
4
2
|
|
|
5
3
|
/**
|
|
6
4
|
* Create or join bootstrap for one collaboration replica.
|
|
7
5
|
*
|
|
8
|
-
*
|
|
6
|
+
* The document and WebRTC factories share this union.
|
|
9
7
|
*
|
|
10
8
|
* `create-or-join` removes the out-of-band decision about which peer creates a room.
|
|
11
9
|
* The replica probes for an initialized room and joins it when one appears. Otherwise it
|
|
12
10
|
* runs a short awareness election and only the winning candidate seeds from `document`.
|
|
13
11
|
* A room that two peers seeded concurrently reports the terminal failure code
|
|
14
|
-
* `concurrent-seed` on every replica.
|
|
15
|
-
* the experimental text factory refuses it.
|
|
12
|
+
* `concurrent-seed` on every replica.
|
|
16
13
|
* @public
|
|
17
14
|
*/
|
|
18
15
|
type CollaborationBootstrap = {
|
|
@@ -25,12 +22,16 @@ type CollaborationBootstrap = {
|
|
|
25
22
|
} | {
|
|
26
23
|
readonly kind: 'create-or-join';
|
|
27
24
|
readonly document: Uint8Array;
|
|
28
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Wait for an existing initialized room before the seed election. Default 4000 ms, or
|
|
27
|
+
* 0 with Hocuspocus, where the server sync already delivered the whole room.
|
|
28
|
+
*/
|
|
29
29
|
readonly probeTimeoutMs?: number;
|
|
30
30
|
/** Seed election window after an empty probe. Default 1500 ms. */
|
|
31
31
|
readonly electionWindowMs?: number;
|
|
32
32
|
/** Join wait after this replica loses the seed election. Default 30000 ms. */
|
|
33
33
|
readonly timeoutMs?: number;
|
|
34
|
+
/** Abort the join. The factory rejects with `initialization-aborted`. */
|
|
34
35
|
readonly signal?: AbortSignal;
|
|
35
36
|
};
|
|
36
37
|
/**
|
|
@@ -41,7 +42,9 @@ type CollaborationBootstrap = {
|
|
|
41
42
|
* @public
|
|
42
43
|
*/
|
|
43
44
|
interface CollaborationIdentityUpdate {
|
|
45
|
+
/** New display name, 1 to 256 characters after trimming. */
|
|
44
46
|
readonly name?: string;
|
|
47
|
+
/** New presence color, at most 64 characters. */
|
|
45
48
|
readonly color?: string;
|
|
46
49
|
}
|
|
47
50
|
/**
|
|
@@ -52,9 +55,11 @@ interface CollaborationIdentityUpdate {
|
|
|
52
55
|
* @public
|
|
53
56
|
*/
|
|
54
57
|
interface CollaborationSession {
|
|
58
|
+
/** The room's document id. */
|
|
55
59
|
readonly documentId: string;
|
|
56
60
|
/** Unique identity for this attachment lifetime. */
|
|
57
61
|
readonly sessionId: string;
|
|
62
|
+
/** The validated local identity. */
|
|
58
63
|
readonly identity: CollaborationIdentity;
|
|
59
64
|
/**
|
|
60
65
|
* Update the display name and color mid-session, when the replica supports it.
|
|
@@ -63,6 +68,12 @@ interface CollaborationSession {
|
|
|
63
68
|
* freezes identity for its lifetime omits it.
|
|
64
69
|
*/
|
|
65
70
|
setIdentity?(update: CollaborationIdentityUpdate): void;
|
|
71
|
+
/**
|
|
72
|
+
* Whether edits continue while the transport is down (`disconnected`). Set by the
|
|
73
|
+
* `offlineEditing` option; absent means true.
|
|
74
|
+
*/
|
|
75
|
+
readonly offlineEditing?: boolean;
|
|
76
|
+
/** Current lifecycle state. */
|
|
66
77
|
status(): CollaborationStatus;
|
|
67
78
|
/**
|
|
68
79
|
* Cached status, current reason, and last failure.
|
|
@@ -70,72 +81,39 @@ interface CollaborationSession {
|
|
|
70
81
|
* Same reference until any of those values change.
|
|
71
82
|
*/
|
|
72
83
|
statusSnapshot(): CollaborationStatusSnapshot;
|
|
84
|
+
/** Call `listener` on each status or reason change. Returns the unsubscribe function. */
|
|
73
85
|
subscribeStatus(listener: (status: CollaborationStatus, reason?: CollaborationFailureCode, detail?: string) => void): () => void;
|
|
86
|
+
/** Whether the shared undo history holds a local step to undo. */
|
|
74
87
|
canUndo(): boolean;
|
|
88
|
+
/** Whether the shared undo history holds a local step to redo. */
|
|
75
89
|
canRedo(): boolean;
|
|
90
|
+
/** Undo this participant's last step; others' edits stay. Returns false when refused. */
|
|
76
91
|
undo(): boolean;
|
|
92
|
+
/** Redo this participant's last undone step. Returns false when refused. */
|
|
77
93
|
redo(): boolean;
|
|
94
|
+
/** Participants in presence, this replica included. Capped at 256. */
|
|
78
95
|
participants(): readonly CollaborationParticipant[];
|
|
96
|
+
/** Call `listener` when the participant list changes. Returns the unsubscribe function. */
|
|
79
97
|
subscribeParticipants(listener: (participants: readonly CollaborationParticipant[]) => void): () => void;
|
|
98
|
+
/** Other participants' selections, resolved into this replica's addresses. */
|
|
80
99
|
remoteSelections(): readonly CollaborationRemoteSelection[];
|
|
100
|
+
/** Call `listener` when a remote selection changes. Returns the unsubscribe function. */
|
|
81
101
|
subscribeRemoteSelections(listener: (selections: readonly CollaborationRemoteSelection[]) => void): () => void;
|
|
82
102
|
}
|
|
83
|
-
/**
|
|
84
|
-
* Options for the experimental paragraph-text replica of {@link createTextCollaboration}.
|
|
85
|
-
*
|
|
86
|
-
* The caller owns `ydoc`.
|
|
87
|
-
* @beta
|
|
88
|
-
*/
|
|
89
|
-
interface CreateTextCollaborationOptions {
|
|
90
|
-
readonly ydoc: Y.Doc;
|
|
91
|
-
readonly awareness: Awareness;
|
|
92
|
-
readonly documentId: string;
|
|
93
|
-
/** Unique attachment identity. Omit it to generate a new identity for this session. */
|
|
94
|
-
readonly sessionId?: string;
|
|
95
|
-
readonly identity: CollaborationIdentity;
|
|
96
|
-
readonly bootstrap: CollaborationBootstrap;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Engine-facing paragraph-text session, including attach and operation gating.
|
|
100
|
-
*
|
|
101
|
-
* Hosts consume {@link CollaborationSession}. Providers call `setTransportStatus`.
|
|
102
|
-
* @public
|
|
103
|
-
*/
|
|
104
|
-
interface TextCollaborationSession extends EditorCollaborationSession {
|
|
105
|
-
/**
|
|
106
|
-
* Provider convenience seam. Low-level consumers normally leave the session ready.
|
|
107
|
-
*
|
|
108
|
-
* `reason` is a typed code so a host can branch on it: pass `'transport-disconnected'` for
|
|
109
|
-
* a socket that will retry itself and `'authentication-failed'` for a credential the server
|
|
110
|
-
* rejected, because those need opposite responses. The provider's own phrasing goes in
|
|
111
|
-
* `detail`.
|
|
112
|
-
*/
|
|
113
|
-
setTransportStatus(status: 'ready' | 'disconnected' | 'error', reason?: CollaborationFailureCode, detail?: string): void;
|
|
114
|
-
}
|
|
115
103
|
/**
|
|
116
104
|
* Owned collaboration replica: document bytes, session, and teardown.
|
|
117
105
|
*
|
|
118
|
-
*
|
|
106
|
+
* A host reads
|
|
119
107
|
* {@link CollaborationSession}; the engine session remains assignable.
|
|
120
108
|
* @public
|
|
121
109
|
*/
|
|
122
110
|
interface CollaborationHandle<TSession extends CollaborationSession> {
|
|
111
|
+
/** The room's document as `.docx` bytes. Mount the editor with them. */
|
|
123
112
|
readonly document: Uint8Array;
|
|
113
|
+
/** The live session. Pass it to `collaborationModule`. */
|
|
124
114
|
readonly session: TSession;
|
|
115
|
+
/** Stop the replica and release its listeners. The session becomes `destroyed`. */
|
|
125
116
|
destroy(): void;
|
|
126
117
|
}
|
|
127
|
-
/** Owned replica of the experimental {@link createTextCollaboration} factory. @beta */
|
|
128
|
-
type TextCollaborationHandle = CollaborationHandle<TextCollaborationSession>;
|
|
129
|
-
/**
|
|
130
|
-
* Create or join one experimental paragraph-text collaboration replica.
|
|
131
|
-
*
|
|
132
|
-
* This replica shares only the body paragraph text of an unchanging paragraph set: no
|
|
133
|
-
* formatting, no structure, no images. Use {@link createDocumentCollaboration} for
|
|
134
|
-
* full-document collaboration; this factory remains for hosts that want to replicate plain
|
|
135
|
-
* paragraph text and nothing else. The caller owns `ydoc`.
|
|
136
|
-
* @beta
|
|
137
|
-
*/
|
|
138
|
-
declare function createTextCollaboration(options: CreateTextCollaborationOptions): Promise<TextCollaborationHandle>;
|
|
139
118
|
|
|
140
|
-
export {
|
|
141
|
-
export type { CollaborationSession as C, TextCollaborationHandle as T, CollaborationBootstrap as a, CollaborationIdentityUpdate as b, CollaborationHandle as c, CreateTextCollaborationOptions as d, TextCollaborationSession as e };
|
|
119
|
+
export type { CollaborationSession as C, CollaborationBootstrap as a, CollaborationIdentityUpdate as b, CollaborationHandle as c };
|
package/dist/vue/hocuspocus.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkN34IUO36_cjs=require('../chunk-N34IUO36.cjs');require('../chunk-QLZH2Q2C.cjs');var vue=require('vue');var m=Symbol("useHocuspocusCollaboration.createRoom");function b(o){return o?`${o.url}:${o.roomId}:${o.bootstrap.kind}:${o.identity.actorId}`:""}async function f(o){let{createHocuspocusCollaboration:a}=await import('../collaboration/hocuspocus.cjs');return a(o)}function H(o){return o?.[m]??f}function R(o){let a=vue.getCurrentInstance(),e=chunkN34IUO36_cjs.b({ownerKey:`vue-hocuspocus:${String(a?.uid??"anonymous")}`,hookName:"useHocuspocusCollaboration",createRoomOf:()=>H(vue.toValue(o)),hostModulesOf:()=>vue.toValue(o)?.modules??chunkN34IUO36_cjs.a,autoRoomOf:()=>vue.toValue(o)?.room??null,autoKeyOf:()=>b(vue.toValue(o)?.room),rejoinOptionsOf:n=>({...n,bootstrap:{kind:"join"}}),identityOf:n=>n.identity}),s=vue.shallowRef(0);return vue.watch(()=>e.room.value?.provider??null,(n,O,d)=>{if(s.value=n?.unsyncedChanges??0,!n)return;let l=()=>{s.value=n.unsyncedChanges;};n.on("unsyncedChanges",l),d(()=>n.off("unsyncedChanges",l));},{immediate:true}),{document:vue.readonly(e.document),modules:vue.readonly(e.modules),session:vue.readonly(e.session),ydoc:vue.computed(()=>e.room.value?.ydoc??null),provider:vue.computed(()=>e.room.value?.provider??null),pending:vue.readonly(e.pending),unsyncedChanges:vue.readonly(s),error:vue.readonly(e.error),connect:e.connect,leave:e.leave,rejoin:e.rejoin}}exports.useHocuspocusCollaboration=R;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@docx-editor.dev/pro/vue/hocuspocus` — Vue composable that owns a Hocuspocus room.
|
|
3
|
+
*
|
|
4
|
+
* Import this subpath only when you use Hocuspocus. `@docx-editor.dev/pro/vue`
|
|
5
|
+
* does not load a network provider.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
1
10
|
import { Ref, MaybeRefOrGetter } from 'vue';
|
|
2
11
|
import * as Y from 'yjs';
|
|
3
12
|
import { HocuspocusProvider } from '@hocuspocus/provider';
|
|
4
13
|
import { CollaborationIdentity, CollaborationFailure } from '@docx-editor.dev/core/collaboration';
|
|
5
14
|
import { EditorModule } from '@docx-editor.dev/core/editor';
|
|
6
|
-
import { a as CollaborationBootstrap, C as CollaborationSession } from '../
|
|
7
|
-
export { b as CollaborationIdentityUpdate } from '../
|
|
15
|
+
import { a as CollaborationBootstrap, C as CollaborationSession } from '../types-6EmrEn4n.cjs';
|
|
16
|
+
export { b as CollaborationIdentityUpdate } from '../types-6EmrEn4n.cjs';
|
|
8
17
|
|
|
9
18
|
/** Bootstrap for one Hocuspocus room. @public */
|
|
10
19
|
type UseHocuspocusCollaborationBootstrap = CollaborationBootstrap;
|
|
@@ -12,19 +21,23 @@ type UseHocuspocusCollaborationBootstrap = CollaborationBootstrap;
|
|
|
12
21
|
interface UseHocuspocusCollaborationConnectOptions {
|
|
13
22
|
/** Hocuspocus server WebSocket URL, for example `wss://collab.example.test`. */
|
|
14
23
|
readonly url: string;
|
|
24
|
+
/** Room name on the server, also the document id. Make one with `createCollaborationRoomId`. */
|
|
15
25
|
readonly roomId: string;
|
|
16
26
|
/**
|
|
17
27
|
* Authentication token the provider sends in its auth handshake. Pass a callback and the
|
|
18
28
|
* provider re-evaluates it on every reconnect, which is how expiring JWTs renew.
|
|
19
29
|
*/
|
|
20
30
|
readonly token?: string | (() => string | Promise<string>);
|
|
31
|
+
/** The local participant. Recorded as the author of this replica's changes. */
|
|
21
32
|
readonly identity: CollaborationIdentity;
|
|
33
|
+
/** Whether to seed the room, join it, or let the peers decide. */
|
|
22
34
|
readonly bootstrap: UseHocuspocusCollaborationBootstrap;
|
|
23
35
|
/** Bound on the wait for the server's initial sync. Default 30000 ms. */
|
|
24
36
|
readonly syncedTimeoutMs?: number;
|
|
25
37
|
/**
|
|
26
38
|
* Admit local edits while the transport is `disconnected`. Buffered updates merge on
|
|
27
|
-
* reconnect.
|
|
39
|
+
* reconnect. On by default; pass `false` to pause editing while disconnected. See
|
|
40
|
+
* {@link CreateDocumentCollaborationOptions.offlineEditing}.
|
|
28
41
|
*/
|
|
29
42
|
readonly offlineEditing?: boolean;
|
|
30
43
|
}
|
|
@@ -38,13 +51,18 @@ interface UseHocuspocusCollaborationOptions {
|
|
|
38
51
|
/**
|
|
39
52
|
* Connect this room when the composable starts. Omit it and call
|
|
40
53
|
* {@link UseHocuspocusCollaborationReturn.connect} after the user chooses a room.
|
|
54
|
+
* A different room, server, bootstrap kind, or `actorId` leaves the old room and
|
|
55
|
+
* connects the new one, and `null` leaves. A room opened with `connect` stays.
|
|
41
56
|
*/
|
|
42
57
|
readonly room?: UseHocuspocusCollaborationConnectOptions | null;
|
|
43
58
|
}
|
|
44
59
|
/** Values {@link useHocuspocusCollaboration} returns. @public */
|
|
45
60
|
interface UseHocuspocusCollaborationReturn {
|
|
61
|
+
/** The room's document as `.docx` bytes to mount. Null until the room is ready. */
|
|
46
62
|
readonly document: Readonly<Ref<Uint8Array | null>>;
|
|
63
|
+
/** Modules to pass to the editor. They include the collaboration module once ready. */
|
|
47
64
|
readonly modules: Readonly<Ref<readonly EditorModule[]>>;
|
|
65
|
+
/** The live session for status and presence. Null while no room is connected. */
|
|
48
66
|
readonly session: Readonly<Ref<CollaborationSession | null>>;
|
|
49
67
|
/**
|
|
50
68
|
* The room's shared Yjs document, owned by the composable. Null while no room is
|
|
@@ -61,7 +79,24 @@ interface UseHocuspocusCollaborationReturn {
|
|
|
61
79
|
* server events). The composable destroys it on leave and unmount.
|
|
62
80
|
*/
|
|
63
81
|
readonly provider: Readonly<Ref<HocuspocusProvider | null>>;
|
|
82
|
+
/** True while a connect is in progress. */
|
|
64
83
|
readonly pending: Readonly<Ref<boolean>>;
|
|
84
|
+
/**
|
|
85
|
+
* Local changes the server has not confirmed yet. More than zero while edits made offline
|
|
86
|
+
* wait for the connection, and for a moment after each edit while online. Warn before the
|
|
87
|
+
* page closes while it is above zero, or those edits are lost:
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const warn = (event: BeforeUnloadEvent) => {
|
|
92
|
+
* if (unsyncedChanges.value > 0) event.preventDefault();
|
|
93
|
+
* };
|
|
94
|
+
* onMounted(() => window.addEventListener('beforeunload', warn));
|
|
95
|
+
* onBeforeUnmount(() => window.removeEventListener('beforeunload', warn));
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
readonly unsyncedChanges: Readonly<Ref<number>>;
|
|
99
|
+
/** The connect failure or session failure, or null. Check it before `document`. */
|
|
65
100
|
readonly error: Readonly<Ref<CollaborationFailure | null>>;
|
|
66
101
|
/**
|
|
67
102
|
* Connect a room. RESOLVES with the failure, or null on success — it does not reject.
|
|
@@ -75,8 +110,9 @@ interface UseHocuspocusCollaborationReturn {
|
|
|
75
110
|
* Destroy the room and carry on editing locally.
|
|
76
111
|
*
|
|
77
112
|
* The current bytes live in the editor, not in this composable, so the argument is
|
|
78
|
-
* required: pass `
|
|
79
|
-
* editor from exactly
|
|
113
|
+
* required: pass the bytes `editor.save()` resolves with, as `new Uint8Array(saved)` after
|
|
114
|
+
* a `null` check, to keep what the room typed. The host remounts the editor from exactly
|
|
115
|
+
* these bytes.
|
|
80
116
|
*/
|
|
81
117
|
readonly leave: (nextDocument: Uint8Array) => void;
|
|
82
118
|
/**
|
|
@@ -84,10 +120,19 @@ interface UseHocuspocusCollaborationReturn {
|
|
|
84
120
|
* again to the same room with the same identity, url, and token.
|
|
85
121
|
*
|
|
86
122
|
* The reconnect always uses bootstrap `{ kind: 'join' }`, because the server still holds
|
|
87
|
-
* the room. When the server no longer holds it, the
|
|
123
|
+
* the room. When the server no longer holds it, the rejoin resolves with
|
|
88
124
|
* `initialization-timeout` — nothing is lost, because `nextDocument` (your saved bytes)
|
|
89
125
|
* stays mounted locally. A connect that failed also counts as the prior attempt, so
|
|
90
|
-
* rejoin retries it as a joiner.
|
|
126
|
+
* rejoin retries it as a joiner. Resolves with the failure, or `null` on success.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```ts
|
|
130
|
+
* const saved = await editorRef.value?.save();
|
|
131
|
+
* if (saved) {
|
|
132
|
+
* const failure = await rejoin(new Uint8Array(saved));
|
|
133
|
+
* if (failure) console.warn(failure.code);
|
|
134
|
+
* }
|
|
135
|
+
* ```
|
|
91
136
|
*/
|
|
92
137
|
readonly rejoin: (nextDocument: Uint8Array) => Promise<CollaborationFailure | null>;
|
|
93
138
|
}
|