@fileverse-dev/ddoc 3.0.17 → 3.0.19
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/{ccip-BEK-OQA-.mjs → ccip-Dy16rTeN.mjs} +1 -1
- package/dist/{index-Dclni9Zc.mjs → index-C76rN2Gy.mjs} +11739 -11727
- package/dist/index.es.js +1 -1
- package/dist/package/sync-local/socketClient.d.ts +1 -1
- package/dist/package/types.d.ts +5 -0
- package/dist/package/use-ddoc-editor.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -55,7 +55,7 @@ export declare class SocketClient {
|
|
|
55
55
|
fetchLatestCommit(): Promise<any>;
|
|
56
56
|
getUncommittedChanges(): Promise<any>;
|
|
57
57
|
broadcastAwareness(awarenessUpdate: string): Promise<any>;
|
|
58
|
-
disconnect: () => void;
|
|
58
|
+
disconnect: (reason: string, code: number) => void;
|
|
59
59
|
terminateSession: () => Promise<void>;
|
|
60
60
|
private _buildRequest;
|
|
61
61
|
private getCollaborationKeyPair;
|
package/dist/package/types.d.ts
CHANGED
|
@@ -171,6 +171,11 @@ export interface DdocProps extends CommentAccountProps {
|
|
|
171
171
|
onUnMergedUpdates?: (state: boolean) => void;
|
|
172
172
|
onCollabError?: (error: any) => void;
|
|
173
173
|
isExistingCollabSession?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Callback when IndexedDB initialization fails
|
|
176
|
+
* @description Called when the IndexedDB persistence provider fails to initialize (e.g., private browsing, quota exceeded, corrupted DB). The editor will continue to function without local persistence.
|
|
177
|
+
*/
|
|
178
|
+
onIndexedDbError?: (error: Error) => void;
|
|
174
179
|
}
|
|
175
180
|
export interface IEditorSelectionData {
|
|
176
181
|
from: number;
|
|
@@ -2,7 +2,7 @@ import { DdocProps } from './types';
|
|
|
2
2
|
import { ToCItemType } from './components/toc/types';
|
|
3
3
|
|
|
4
4
|
import * as Y from 'yjs';
|
|
5
|
-
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, onChange, onCollaboratorChange, onCommentInteraction, onError, setCharacterCount, setWordCount, ipfsImageUploadFn, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, metadataProxyUrl, extensions: externalExtensions, onCopyHeadingLink, ipfsImageFetchFn, fetchV1ImageFn, isConnected, activeModel, maxTokens, isAIAgentEnabled, collabConfig, ...rest }: Partial<DdocProps>) => {
|
|
5
|
+
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, onChange, onCollaboratorChange, onCommentInteraction, onError, setCharacterCount, setWordCount, ipfsImageUploadFn, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, metadataProxyUrl, extensions: externalExtensions, onCopyHeadingLink, ipfsImageFetchFn, fetchV1ImageFn, isConnected, activeModel, maxTokens, isAIAgentEnabled, collabConfig, onIndexedDbError, ...rest }: Partial<DdocProps>) => {
|
|
6
6
|
editor: import('@tiptap/core').Editor | null;
|
|
7
7
|
isContentLoading: boolean;
|
|
8
8
|
ref: import('react').RefObject<HTMLDivElement>;
|