@fileverse-dev/ddoc 2.0.6 → 2.0.7-patch-1

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,10 +1,11 @@
1
1
  import { Editor } from '@tiptap/react';
2
2
 
3
- declare const MobileToolbar: ({ editor, onError, isKeyboardVisible, isNavbarVisible, setIsNavbarVisible, }: {
3
+ declare const MobileToolbar: ({ editor, onError, isKeyboardVisible, isNavbarVisible, setIsNavbarVisible, secureImageUploadUrl, }: {
4
4
  editor: Editor;
5
5
  onError?: (errorString: string) => void;
6
6
  isKeyboardVisible: boolean;
7
7
  isNavbarVisible: boolean;
8
8
  setIsNavbarVisible: React.Dispatch<React.SetStateAction<boolean>>;
9
+ secureImageUploadUrl?: string;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
10
11
  export default MobileToolbar;
@@ -0,0 +1 @@
1
+ export * from './page-break';
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { NodeViewProps } from '@tiptap/react';
3
+
4
+ export declare const PageBreakNodeView: React.FC<NodeViewProps>;
@@ -0,0 +1,20 @@
1
+ import { Node } from '@tiptap/core';
2
+
3
+ export interface PageBreakRuleOptions {
4
+ HTMLAttributes: Record<string, any>;
5
+ }
6
+ declare module '@tiptap/core' {
7
+ interface Commands<ReturnType> {
8
+ pageBreak: {
9
+ /**
10
+ * Add a page break
11
+ */
12
+ setPageBreak: () => ReturnType;
13
+ /**
14
+ * Remove a page break
15
+ */
16
+ unsetPageBreak: () => ReturnType;
17
+ };
18
+ }
19
+ }
20
+ export declare const PageBreak: Node<PageBreakRuleOptions, any>;
@@ -39,6 +39,7 @@ export interface DdocProps {
39
39
  color: string;
40
40
  }>;
41
41
  className?: string;
42
+ scrollPosition?: number;
42
43
  }
43
44
  export interface IEditorSelectionData {
44
45
  from: number;
@@ -1,7 +1,7 @@
1
1
  import { DdocProps } from './types';
2
2
 
3
3
  import * as Y from 'yjs';
4
- export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, onTextSelection, ensResolutionUrl, onError, setCharacterCount, setWordCount, secureImageUploadUrl }: Partial<DdocProps>) => {
4
+ export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, onTextSelection, ensResolutionUrl, onError, setCharacterCount, setWordCount, secureImageUploadUrl, scrollPosition, }: Partial<DdocProps>) => {
5
5
  editor: import('@tiptap/core').Editor | null;
6
6
  isContentLoading: boolean;
7
7
  ref: import('react').RefObject<HTMLDivElement>;
@@ -6,3 +6,4 @@ export default UploadImagesPlugin;
6
6
  export declare function startImageUpload(file: File, view: EditorView, pos: number, secureImageUploadUrl?: string): Promise<void>;
7
7
  export declare const uploadFn: (image: File) => Promise<string>;
8
8
  export declare const uploadSecureImage: (url: string, image: File, publicKey: ArrayBuffer) => Promise<any>;
9
+ export declare const handleDecryptImage: (url: string, encryptedKey: string, privateKey: string, iv: string) => Promise<string | undefined>;