@fileverse-dev/ddoc 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/dist/constants/index.d.ts +1 -0
- package/dist/index.es.js +431 -437
- package/dist/index.umd.js +6 -6
- package/dist/packages/ddoc/types.d.ts +1 -1
- package/dist/packages/ddoc/use-ddoc-editor.d.ts +2 -2
- package/package.json +1 -1
@@ -13,7 +13,7 @@ export interface DdocProps {
|
|
13
13
|
isPreviewMode: boolean;
|
14
14
|
initialContent?: JSONContent | null;
|
15
15
|
onAutoSave?: (data: Data) => void;
|
16
|
-
|
16
|
+
walletAddress?: string | null;
|
17
17
|
username?: string | null;
|
18
18
|
renderToolLeftSection?: ({ editor }: {
|
19
19
|
editor: JSONContent;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { DdocProps } from './types';
|
2
2
|
|
3
3
|
import * as Y from 'yjs';
|
4
|
-
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId,
|
4
|
+
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onAutoSave, onChange, onCollaboratorChange, }: Partial<DdocProps>) => {
|
5
5
|
editor: import('@tiptap/react').Editor | null;
|
6
6
|
ref: import('react').RefObject<HTMLDivElement>;
|
7
7
|
loading: boolean;
|
8
|
-
connect: (username: string, isEns?: boolean) => () => void;
|
8
|
+
connect: (username: string | null | undefined, isEns?: boolean) => () => void;
|
9
9
|
ydoc: Y.Doc;
|
10
10
|
};
|