@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.
- package/README.md +20 -19
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +35549 -30397
- package/dist/package/components/mobile-toolbar.d.ts +2 -1
- package/dist/package/components/secure-image.d.ts +6 -4
- package/dist/package/preview-ddoc-editor.d.ts +4 -0
- package/dist/package/types.d.ts +1 -0
- package/dist/package/utils/security.d.ts +2 -2
- package/dist/package/utils/upload-images.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
@@ -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:
|
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:
|
12
|
+
export declare const SecureImage: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLImageElement>>;
|
11
13
|
export {};
|
package/dist/package/types.d.ts
CHANGED
@@ -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:
|
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>;
|