@fileverse-dev/ddoc 2.0.6 → 2.0.7-patch-1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/dist/index.es.js +27159 -26591
- package/dist/package/components/mobile-toolbar.d.ts +2 -1
- package/dist/package/extensions/page-break/index.d.ts +1 -0
- package/dist/package/extensions/page-break/page-break-node-view.d.ts +4 -0
- package/dist/package/extensions/page-break/page-break.d.ts +20 -0
- package/dist/package/types.d.ts +1 -0
- package/dist/package/use-ddoc-editor.d.ts +1 -1
- package/dist/package/utils/upload-images.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +2 -2
@@ -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,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>;
|
package/dist/package/types.d.ts
CHANGED
@@ -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>;
|