@fileverse-dev/ddoc 3.0.93-bug-fix-2 → 3.0.93-bug-fix-4

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.
@@ -1,7 +1,7 @@
1
1
  export type EditorChangeSource = 'editor' | 'indexeddb-rehydration';
2
2
  export interface EditorChangeMetadata {
3
3
  source: EditorChangeSource;
4
- shouldCreateDoc: boolean;
4
+ shouldSync: boolean;
5
5
  }
6
6
  export declare const EDITOR_CONTENT_CHANGE: EditorChangeMetadata;
7
7
  export declare const INDEXEDDB_REHYDRATION_CHANGE: EditorChangeMetadata;
@@ -1,9 +1,9 @@
1
- import { JSONContent } from '@tiptap/react';
2
1
  import { CollaborationProps } from '../sync-local/types';
3
2
  import { EditorChangeMetadata } from '../editor-change-metadata';
3
+ import { DdocProps } from '../types';
4
4
  import * as Y from 'yjs';
5
5
  interface UseYjsSetupArgs {
6
- onChange?: (updatedDocContent: string | JSONContent, updateChunk: string, meta?: EditorChangeMetadata) => void;
6
+ onChange?: DdocProps['onChange'];
7
7
  enableIndexeddbSync?: boolean;
8
8
  ddocId?: string;
9
9
  collaboration?: CollaborationProps;
@@ -17,6 +17,7 @@ export declare const useYjsSetup: ({ onChange, enableIndexeddbSync, ddocId, coll
17
17
  terminateSession: () => void;
18
18
  awareness: import('y-protocols/awareness.js').Awareness | null;
19
19
  hasCollabContentInitialised: boolean;
20
+ isIndexeddbSynced: boolean;
20
21
  initialiseYjsIndexedDbProvider: () => Promise<void>;
21
22
  refreshYjsIndexedDbProvider: () => Promise<void>;
22
23
  flushPendingUpdate: (changeMeta?: EditorChangeMetadata) => void;
@@ -25,6 +25,7 @@ export declare const useDdocEditor: ({ isPreviewMode, initialContent, versionHis
25
25
  isReady: boolean;
26
26
  isSyncing: boolean;
27
27
  hasCollabContentInitialised: boolean;
28
+ isIndexeddbSynced: boolean;
28
29
  initialiseYjsIndexedDbProvider: () => Promise<void>;
29
30
  flushPendingUpdate: (changeMeta?: import('./editor-change-metadata').EditorChangeMetadata) => void;
30
31
  collabState: import('./types').CollabState;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "3.0.93-bug-fix-2",
5
+ "version": "3.0.93-bug-fix-4",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {