@fileverse-dev/ddoc 2.0.5 → 2.0.6-patch-2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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;
@@ -1,11 +1,13 @@
1
- import { FC } from 'react';
2
-
3
1
  type Props = {
4
2
  encryptedKey: string;
5
3
  url: string;
6
4
  iv: string;
7
- privateKey: ArrayBuffer;
5
+ privateKey: string;
8
6
  alt?: string;
7
+ width?: string;
8
+ height?: string;
9
+ className?: string;
10
+ caption?: string;
9
11
  };
10
- export declare const SecureImage: FC<Props>;
12
+ export declare const SecureImage: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLImageElement>>;
11
13
  export {};
@@ -0,0 +1,4 @@
1
+ import { DdocProps } from './types';
2
+
3
+ declare const PreviewDdocEditor: import('react').ForwardRefExoticComponent<DdocProps & import('react').RefAttributes<unknown>>;
4
+ export { PreviewDdocEditor };
@@ -38,6 +38,7 @@ export interface DdocProps {
38
38
  name: string;
39
39
  color: string;
40
40
  }>;
41
+ className?: string;
41
42
  }
42
43
  export interface IEditorSelectionData {
43
44
  from: number;
@@ -2,7 +2,7 @@ export declare const base64ToArrayBuffer: (base64String: string) => ArrayBufferL
2
2
  export declare const arrayBufferToBase64: (buffer: ArrayBuffer) => string;
3
3
  export declare const generateRSAKeyPair: () => Promise<{
4
4
  publicKey: ArrayBuffer;
5
- privateKey: ArrayBuffer;
5
+ privateKey: Uint8Array;
6
6
  }>;
7
7
  export declare const decryptAESKey: (encryptedKeyBase64: string, privateKeyPem: BufferSource) => Promise<ArrayBuffer>;
8
8
  export declare const decryptImageData: (encryptedImageData: ArrayBuffer, aesKeyBuffer: ArrayBuffer, iv: string) => Promise<ArrayBuffer>;
@@ -13,5 +13,5 @@ type DecryptImage = {
13
13
  iv: string;
14
14
  imageBuffer: ArrayBuffer;
15
15
  };
16
- export declare const decryptImage: ({ encryptedKey, privateKey, iv, imageBuffer }: DecryptImage) => Promise<ArrayBuffer | undefined>;
16
+ export declare const decryptImage: ({ encryptedKey, privateKey, iv, imageBuffer, }: DecryptImage) => Promise<ArrayBuffer | undefined>;
17
17
  export {};
@@ -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>;