@fileverse-dev/ddoc 2.3.0-rtc-patch-20 → 2.3.0-rtc-patch-21
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/{ccip-3KvMDS3V.mjs → ccip-kBhV6Azu.mjs} +1 -1
- package/dist/{index-DuBO2VWo.mjs → index-D8aDDOiU.mjs} +17017 -17040
- package/dist/index.es.js +1 -1
- package/dist/package/sync-local/actions/index.d.ts +2 -1
- package/dist/package/sync-local/socketClient.d.ts +3 -0
- package/dist/package/sync-local/types/index.d.ts +1 -0
- package/dist/package/types.d.ts +1 -0
- package/dist/package/use-ddoc-editor.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -25,6 +25,7 @@ export declare const websocketInitializer: (context: SyncMachineContext, event:
|
|
25
25
|
onCollaborationCommit: (file: File) => Promise<string>;
|
26
26
|
onFetchCommitContent: (cid: string) => Promise<any>;
|
27
27
|
onSessionTerminated: () => void;
|
28
|
+
onUnMergedUpdates: (state: boolean) => void;
|
28
29
|
};
|
29
30
|
export declare const yjsUpdateHandler: (context: SyncMachineContext, event: SyncMachinEvent) => {
|
30
31
|
uncommittedUpdatesIdList?: undefined;
|
@@ -49,7 +50,7 @@ export declare const registerUpdateHandler: (context: SyncMachineContext, event:
|
|
49
50
|
export declare const removeLastProcessedUpdate: (context: SyncMachineContext, event: SyncMachinEvent) => {
|
50
51
|
updateQueue: Uint8Array<ArrayBufferLike>[];
|
51
52
|
};
|
52
|
-
export declare const clearUncommitedUpdatesHandler: (
|
53
|
+
export declare const clearUncommitedUpdatesHandler: () => {
|
53
54
|
uncommittedUpdatesIdList: never[];
|
54
55
|
};
|
55
56
|
export declare const addUpdateToQueueHandler: (context: SyncMachineContext, event: SyncMachinEvent) => {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { UrlProvider } from 'partysocket/ws';
|
2
2
|
import { ISocketInitConfig, RoomMember, SocketStatusEnum, SendUpdateResponse, CommitResponse } from './types';
|
3
|
+
import { Awareness } from 'y-protocols/awareness.js';
|
3
4
|
|
4
5
|
interface ISocketClientConfig {
|
5
6
|
wsUrl: UrlProvider;
|
@@ -32,11 +33,13 @@ export declare class SocketClient {
|
|
32
33
|
private ownerAddress?;
|
33
34
|
private roomKey;
|
34
35
|
private roomInfo?;
|
36
|
+
private awareness;
|
35
37
|
_onError: ISocketInitConfig['onError'] | null;
|
36
38
|
_onCollaborationConnectCallback: ISocketClientConfig['onCollaborationConnectCallback'] | null;
|
37
39
|
constructor(config: ISocketClientConfig);
|
38
40
|
private _getSequenceIdCallback;
|
39
41
|
private _removeSequenceIdFromMap;
|
42
|
+
registerAwareness(awareness: Awareness): void;
|
40
43
|
private _registerSequenceCallback;
|
41
44
|
private _sendNetworkRequest;
|
42
45
|
private _fetchRoomMembers;
|
@@ -64,6 +64,7 @@ export interface SyncMachineContext {
|
|
64
64
|
onCollaborationCommit: (file: File) => Promise<string>;
|
65
65
|
onFetchCommitContent: (cid: string) => Promise<any>;
|
66
66
|
onSessionTerminated: () => void;
|
67
|
+
onUnMergedUpdates: (state: boolean) => void;
|
67
68
|
}
|
68
69
|
export interface ErrorResponseMessage {
|
69
70
|
status: boolean;
|
package/dist/package/types.d.ts
CHANGED
@@ -158,6 +158,7 @@ export interface DdocProps extends CommentAccountProps {
|
|
158
158
|
onCollaborationCommit?: (file: File) => Promise<string>;
|
159
159
|
onFetchCommitContent?: (cid: string) => Promise<any>;
|
160
160
|
onCollabSessionTermination?: () => void;
|
161
|
+
onUnMergedUpdates?: (state: boolean) => void;
|
161
162
|
}
|
162
163
|
export interface IEditorSelectionData {
|
163
164
|
from: number;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { DdocProps } from './types';
|
2
2
|
|
3
3
|
import * as Y from 'yjs';
|
4
|
-
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration,
|
4
|
+
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, onChange, onCollaboratorChange, onCommentInteraction, onError, setCharacterCount, setWordCount, ipfsImageUploadFn, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, proExtensions, metadataProxyUrl, extensions: externalExtensions, onCopyHeadingLink, ipfsImageFetchFn, isConnected, activeModel, maxTokens, isAIAgentEnabled, collabConfig, ...rest }: Partial<DdocProps>) => {
|
5
5
|
editor: import('@tiptap/core').Editor | null;
|
6
6
|
isContentLoading: boolean;
|
7
7
|
ref: import('react').RefObject<HTMLDivElement>;
|