@fileverse-dev/ddoc 3.0.93-bug-fix-6 → 3.0.93-bug-fix-8
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/index.d.ts +0 -1
- package/dist/index.es.js +9083 -9097
- package/dist/package/hooks/use-tab-manager.d.ts +1 -2
- package/dist/package/hooks/use-yjs-setup.d.ts +1 -2
- package/dist/package/types.d.ts +1 -2
- package/dist/package/use-ddoc-editor.d.ts +1 -1
- package/package.json +1 -1
- package/dist/package/editor-change-metadata.d.ts +0 -7
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
|
2
2
|
import { DdocProps } from '../types';
|
|
3
3
|
import { Tab } from '../components/tabs/utils/tab-utils';
|
|
4
|
-
import { EditorChangeMetadata } from '../editor-change-metadata';
|
|
5
4
|
import * as Y from 'yjs';
|
|
6
5
|
interface UseTabManagerArgs {
|
|
7
6
|
ydoc: Y.Doc;
|
|
@@ -13,7 +12,7 @@ interface UseTabManagerArgs {
|
|
|
13
12
|
defaultTabId?: string;
|
|
14
13
|
onVersionHistoryActiveTabChange?: (tabId: string | null) => void;
|
|
15
14
|
getEditor?: () => Editor | null;
|
|
16
|
-
flushPendingUpdate?: (
|
|
15
|
+
flushPendingUpdate?: () => void;
|
|
17
16
|
}
|
|
18
17
|
export declare const getNewTabId: () => string;
|
|
19
18
|
export declare const useTabManager: ({ ydoc, initialContent, enableCollaboration, isDDocOwner, createDefaultTabIfMissing, shouldSyncActiveTab, defaultTabId, onVersionHistoryActiveTabChange, flushPendingUpdate, getEditor, }: UseTabManagerArgs) => {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CollaborationProps } from '../sync-local/types';
|
|
2
|
-
import { EditorChangeMetadata } from '../editor-change-metadata';
|
|
3
2
|
import { DdocProps } from '../types';
|
|
4
3
|
import * as Y from 'yjs';
|
|
5
4
|
interface UseYjsSetupArgs {
|
|
@@ -20,7 +19,7 @@ export declare const useYjsSetup: ({ onChange, enableIndexeddbSync, ddocId, coll
|
|
|
20
19
|
isIndexeddbSynced: boolean;
|
|
21
20
|
initialiseYjsIndexedDbProvider: () => Promise<void>;
|
|
22
21
|
refreshYjsIndexedDbProvider: () => Promise<void>;
|
|
23
|
-
flushPendingUpdate: (
|
|
22
|
+
flushPendingUpdate: () => void;
|
|
24
23
|
collabState: import('../types').CollabState;
|
|
25
24
|
};
|
|
26
25
|
export {};
|
package/dist/package/types.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { Editor } from '@tiptap/react';
|
|
|
5
5
|
import { default as React, SetStateAction } from 'react';
|
|
6
6
|
import { IComment } from './extensions/comment';
|
|
7
7
|
import { CollaborationProps } from './sync-local/types';
|
|
8
|
-
import { EditorChangeMetadata } from './editor-change-metadata';
|
|
9
8
|
|
|
10
9
|
export type { CollaborationProps, CollabConnectionConfig, CollabSessionMeta, CollabServices, CollabCallbacks, CollabState, CollabError, CollabErrorCode, CollabStatus, } from './sync-local/types';
|
|
11
10
|
export declare const DdocEditorProps: EditorProps;
|
|
@@ -139,7 +138,7 @@ export interface DdocProps extends CommentAccountProps {
|
|
|
139
138
|
renderNavbar?: ({ editor }: {
|
|
140
139
|
editor: JSONContent;
|
|
141
140
|
}) => JSX.Element;
|
|
142
|
-
onChange?: (updatedDocContent: string | JSONContent, updateChunk: string
|
|
141
|
+
onChange?: (updatedDocContent: string | JSONContent, updateChunk: string) => void;
|
|
143
142
|
onCollaboratorChange?: (collaborators: undefined | IDocCollabUsers[]) => void;
|
|
144
143
|
onTextSelection?: (data: IEditorSelectionData) => void;
|
|
145
144
|
onCommentInteraction?: (data: IEditorSelectionData) => void;
|
|
@@ -27,7 +27,7 @@ export declare const useDdocEditor: ({ isPreviewMode, initialContent, versionHis
|
|
|
27
27
|
hasCollabContentInitialised: boolean;
|
|
28
28
|
isIndexeddbSynced: boolean;
|
|
29
29
|
initialiseYjsIndexedDbProvider: () => Promise<void>;
|
|
30
|
-
flushPendingUpdate: (
|
|
30
|
+
flushPendingUpdate: () => void;
|
|
31
31
|
collabState: import('./types').CollabState;
|
|
32
32
|
editor: Editor | null;
|
|
33
33
|
ref: import('react').RefObject<HTMLDivElement>;
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export type EditorChangeSource = 'editor' | 'indexeddb-rehydration';
|
|
2
|
-
export interface EditorChangeMetadata {
|
|
3
|
-
source: EditorChangeSource;
|
|
4
|
-
shouldSync: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare const EDITOR_CONTENT_CHANGE: EditorChangeMetadata;
|
|
7
|
-
export declare const INDEXEDDB_REHYDRATION_CHANGE: EditorChangeMetadata;
|