@fileverse-dev/ddoc 3.0.17 → 3.0.18

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
@@ -1,4 +1,4 @@
1
- import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-Dclni9Zc.mjs";
1
+ import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-De1EPlZu.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as Editor,
@@ -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>;
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.17",
5
+ "version": "3.0.18",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {