@fileverse-dev/ddoc 3.0.93-bug-fix-1 → 3.0.93-bug-fix-3
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.es.js
CHANGED
|
@@ -178657,10 +178657,10 @@ const qze = { status: "idle" }, Vze = (e) => {
|
|
|
178657
178657
|
};
|
|
178658
178658
|
}, j6 = {
|
|
178659
178659
|
source: "editor",
|
|
178660
|
-
|
|
178660
|
+
shouldSync: !0
|
|
178661
178661
|
}, Gze = {
|
|
178662
178662
|
source: "indexeddb-rehydration",
|
|
178663
|
-
|
|
178663
|
+
shouldSync: !1
|
|
178664
178664
|
}, Kze = ({
|
|
178665
178665
|
onChange: e,
|
|
178666
178666
|
enableIndexeddbSync: t,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type EditorChangeSource = 'editor' | 'indexeddb-rehydration';
|
|
2
2
|
export interface EditorChangeMetadata {
|
|
3
3
|
source: EditorChangeSource;
|
|
4
|
-
|
|
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?:
|
|
6
|
+
onChange?: DdocProps['onChange'];
|
|
7
7
|
enableIndexeddbSync?: boolean;
|
|
8
8
|
ddocId?: string;
|
|
9
9
|
collaboration?: CollaborationProps;
|
package/dist/package/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ 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';
|
|
8
9
|
|
|
9
10
|
export type { CollaborationProps, CollabConnectionConfig, CollabSessionMeta, CollabServices, CollabCallbacks, CollabState, CollabError, CollabErrorCode, CollabStatus, } from './sync-local/types';
|
|
10
11
|
export declare const DdocEditorProps: EditorProps;
|
|
@@ -138,7 +139,7 @@ export interface DdocProps extends CommentAccountProps {
|
|
|
138
139
|
renderNavbar?: ({ editor }: {
|
|
139
140
|
editor: JSONContent;
|
|
140
141
|
}) => JSX.Element;
|
|
141
|
-
onChange?: (updatedDocContent:
|
|
142
|
+
onChange?: (updatedDocContent: string | JSONContent, updateChunk: string, meta?: EditorChangeMetadata) => void;
|
|
142
143
|
onCollaboratorChange?: (collaborators: undefined | IDocCollabUsers[]) => void;
|
|
143
144
|
onTextSelection?: (data: IEditorSelectionData) => void;
|
|
144
145
|
onCommentInteraction?: (data: IEditorSelectionData) => void;
|