@fileverse-dev/ddoc 3.0.95 → 3.0.96

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,8 +1,8 @@
1
- import { JSONContent } from '@tiptap/react';
2
1
  import { CollaborationProps } from '../sync-local/types';
2
+ import { DdocProps } from '../types';
3
3
  import * as Y from 'yjs';
4
4
  interface UseYjsSetupArgs {
5
- onChange?: (updatedDocContent: string | JSONContent, updateChunk: string) => void;
5
+ onChange?: DdocProps['onChange'];
6
6
  enableIndexeddbSync?: boolean;
7
7
  ddocId?: string;
8
8
  collaboration?: CollaborationProps;
@@ -16,6 +16,7 @@ export declare const useYjsSetup: ({ onChange, enableIndexeddbSync, ddocId, coll
16
16
  terminateSession: () => void;
17
17
  awareness: import('y-protocols/awareness.js').Awareness | null;
18
18
  hasCollabContentInitialised: boolean;
19
+ isIndexeddbSynced: boolean;
19
20
  initialiseYjsIndexedDbProvider: () => Promise<void>;
20
21
  refreshYjsIndexedDbProvider: () => Promise<void>;
21
22
  flushPendingUpdate: () => void;
@@ -138,7 +138,7 @@ export interface DdocProps extends CommentAccountProps {
138
138
  renderNavbar?: ({ editor }: {
139
139
  editor: JSONContent;
140
140
  }) => JSX.Element;
141
- onChange?: (updatedDocContent: Data['editorJSONData'], updateChunk: string) => void;
141
+ onChange?: (updatedDocContent: string | JSONContent, updateChunk: string) => void;
142
142
  onCollaboratorChange?: (collaborators: undefined | IDocCollabUsers[]) => void;
143
143
  onTextSelection?: (data: IEditorSelectionData) => void;
144
144
  onCommentInteraction?: (data: IEditorSelectionData) => 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: () => 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.95",
5
+ "version": "3.0.96",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {