@fileverse-dev/ddoc 1.5.2 → 1.5.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +19 -15
- package/dist/index.es.js +6263 -6193
- package/dist/index.umd.js +94 -89
- package/dist/packages/ddoc/types.d.ts +5 -0
- package/dist/packages/ddoc/use-ddoc-editor.d.ts +1 -1
- package/package.json +1 -1
- package/dist/constants/index.d.ts +0 -8
@@ -1,5 +1,6 @@
|
|
1
1
|
import { JSONContent } from '@tiptap/core';
|
2
2
|
import { EditorProps } from '@tiptap/pm/view';
|
3
|
+
import { Editor } from '@tiptap/react';
|
3
4
|
|
4
5
|
export declare const DdocEditorProps: EditorProps;
|
5
6
|
export interface IDocCollabUsers {
|
@@ -11,6 +12,7 @@ export interface DdocProps {
|
|
11
12
|
enableCollaboration?: boolean;
|
12
13
|
collaborationId?: string;
|
13
14
|
isPreviewMode: boolean;
|
15
|
+
ensResolutionUrl?: string;
|
14
16
|
initialContent?: JSONContent | null;
|
15
17
|
onAutoSave?: (data: Data) => void;
|
16
18
|
walletAddress?: string | null;
|
@@ -26,6 +28,9 @@ export interface DdocProps {
|
|
26
28
|
onCollaboratorChange?: (collaborators: undefined | IDocCollabUsers[]) => void;
|
27
29
|
onTextSelection?: (data: IEditorSelectionData) => void;
|
28
30
|
onCommentInteraction?: (data: IEditorSelectionData) => void;
|
31
|
+
handleCommentButtonOutsideClick?: (editor: Editor | null) => void;
|
32
|
+
handleCommentButtonClick?: (e: Editor) => void;
|
33
|
+
showCommentButton?: boolean;
|
29
34
|
}
|
30
35
|
export interface IEditorSelectionData {
|
31
36
|
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, onAutoSave, onChange, onCollaboratorChange, onCommentInteraction, onTextSelection, }: Partial<DdocProps>) => {
|
4
|
+
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onAutoSave, onChange, onCollaboratorChange, onCommentInteraction, onTextSelection, ensResolutionUrl, }: Partial<DdocProps>) => {
|
5
5
|
editor: import('@tiptap/react').Editor | null;
|
6
6
|
ref: import('react').RefObject<HTMLDivElement>;
|
7
7
|
loading: boolean;
|
package/package.json
CHANGED
@@ -1,8 +0,0 @@
|
|
1
|
-
export declare const DEFAULT_AUTHENTICATED_HEADER: {
|
2
|
-
Authorization: string;
|
3
|
-
invoker: string;
|
4
|
-
contract: string;
|
5
|
-
chain: number;
|
6
|
-
};
|
7
|
-
export declare const API_URL = "https://dev-fileverse-storage.herokuapp.com";
|
8
|
-
export declare const ENS_RESOLUTION_URL = "https://eth-mainnet.g.alchemy.com/v2/uzKE0HT-Vc3LmUAA_dNVEt2rO8LtJGA3";
|