@fileverse-dev/ddoc 2.0.9-patch-2 → 2.0.9-yjs-patch-1

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,9 @@ export interface DdocProps {
27
27
  isPreviewMode: boolean;
28
28
  ensResolutionUrl?: string;
29
29
  secureImageUploadUrl?: string;
30
- initialContent?: JSONContent | null;
30
+ enableIndexeddbSync?: boolean;
31
+ ddocId?: string;
32
+ initialContent?: JSONContent | string | string[] | null;
31
33
  walletAddress?: string | null;
32
34
  username?: string | null;
33
35
  renderNavbar?: ({ editor }: {
@@ -1,10 +1,11 @@
1
1
  import { DdocProps } from './types';
2
2
 
3
3
  import * as Y from 'yjs';
4
- export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, onTextSelection, ensResolutionUrl, onError, setCharacterCount, setWordCount, secureImageUploadUrl, scrollPosition, unFocused, }: Partial<DdocProps>) => {
4
+ export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, onTextSelection, ensResolutionUrl, onError, setCharacterCount, setWordCount, secureImageUploadUrl, scrollPosition, ddocId, enableIndexeddbSync, unFocused, }: Partial<DdocProps>) => {
5
5
  editor: import('@tiptap/core').Editor | null;
6
6
  isContentLoading: boolean;
7
7
  ref: import('react').RefObject<HTMLDivElement>;
8
8
  connect: (username: string | null | undefined, isEns?: boolean) => () => void;
9
9
  ydoc: Y.Doc;
10
+ refreshYjsIndexedDbProvider: () => Promise<void>;
10
11
  };
@@ -0,0 +1 @@
1
+ export declare function isJSONString(str: unknown): boolean;