@fileverse-dev/ddoc 2.0.3-sync-patch-14 → 2.0.3-sync-patch-16
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +22653 -22490
- package/dist/package/components/editor-bubble-menu.d.ts +4 -0
- package/dist/package/components/editor-utils.d.ts +16 -2
- package/dist/package/types.d.ts +13 -2
- package/dist/package/use-ddoc-editor.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
@@ -1,4 +1,5 @@
|
|
1
1
|
import { BubbleMenuProps } from '@tiptap/react';
|
2
|
+
import { default as React } from 'react';
|
2
3
|
|
3
4
|
export interface BubbleMenuItem {
|
4
5
|
name: string;
|
@@ -8,6 +9,9 @@ export interface BubbleMenuItem {
|
|
8
9
|
}
|
9
10
|
type EditorBubbleMenuProps = Omit<BubbleMenuProps, 'children'> & {
|
10
11
|
onError?: (errorString: string) => void;
|
12
|
+
setIsCommentSectionOpen?: (isOpen: boolean) => void;
|
13
|
+
inlineCommentData?: InlineCommentData;
|
14
|
+
setInlineCommentData?: React.Dispatch<React.SetStateAction<InlineCommentData>>;
|
11
15
|
};
|
12
16
|
export declare const EditorBubbleMenu: (props: EditorBubbleMenuProps) => import("react/jsx-runtime").JSX.Element;
|
13
17
|
export {};
|
@@ -69,10 +69,24 @@ export declare const LinkPopup: ({ elementRef, editor, setToolVisibility, bubble
|
|
69
69
|
setIsLinkPopupOpen?: Dispatch<SetStateAction<boolean>>;
|
70
70
|
onError?: (errorString: string) => void;
|
71
71
|
}) => import("react/jsx-runtime").JSX.Element;
|
72
|
-
export declare const
|
72
|
+
export declare const InlineCommentPopup: ({ elementRef, editor, setIsCommentSectionOpen, inlineCommentData, setInlineCommentData, }: {
|
73
|
+
elementRef: React.RefObject<HTMLDivElement>;
|
74
|
+
editor: Editor;
|
75
|
+
setIsCommentSectionOpen: Dispatch<SetStateAction<boolean>>;
|
76
|
+
inlineCommentData: {
|
77
|
+
highlightedTextContent: string;
|
78
|
+
inlineCommentText: string;
|
79
|
+
handleClick: boolean;
|
80
|
+
};
|
81
|
+
setInlineCommentData: (data: {
|
82
|
+
highlightedTextContent?: string;
|
83
|
+
inlineCommentText?: string;
|
84
|
+
handleClick?: boolean;
|
85
|
+
}) => void;
|
86
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
87
|
+
export declare const ScriptsPopup: ({ elementRef, editor, }: {
|
73
88
|
elementRef: React.RefObject<HTMLDivElement>;
|
74
89
|
editor: Editor;
|
75
|
-
setToolVisibility: Dispatch<SetStateAction<IEditorTool>>;
|
76
90
|
}) => import("react/jsx-runtime").JSX.Element;
|
77
91
|
export declare const TextColor: ({ editor, setVisibility, elementRef, }: {
|
78
92
|
editor: Editor;
|
package/dist/package/types.d.ts
CHANGED
@@ -10,10 +10,19 @@ export interface IDocCollabUsers {
|
|
10
10
|
isEns: string;
|
11
11
|
color: string;
|
12
12
|
}
|
13
|
+
type InlineCommentData = {
|
14
|
+
inlineCommentText: string;
|
15
|
+
highlightedTextContent: string;
|
16
|
+
handleClick: boolean;
|
17
|
+
};
|
13
18
|
export interface DdocProps {
|
14
19
|
selectedTags?: TagType[];
|
15
20
|
setSelectedTags?: React.Dispatch<SetStateAction<TagType[]>>;
|
16
|
-
enableCollaboration?: boolean;
|
21
|
+
enableCollaboration?: boolean | undefined;
|
22
|
+
setIsCommentSectionOpen?: React.Dispatch<SetStateAction<boolean>>;
|
23
|
+
inlineCommentData?: InlineCommentData;
|
24
|
+
setInlineCommentData?: React.Dispatch<React.SetStateAction<InlineCommentData>>;
|
25
|
+
isCommentSectionOpen?: boolean;
|
17
26
|
collaborationId?: string;
|
18
27
|
isPreviewMode: boolean;
|
19
28
|
ensResolutionUrl?: string;
|
@@ -34,7 +43,7 @@ export interface DdocProps {
|
|
34
43
|
onError?: (error: string) => void;
|
35
44
|
setCharacterCount?: React.Dispatch<SetStateAction<number>>;
|
36
45
|
setWordCount?: React.Dispatch<SetStateAction<number>>;
|
37
|
-
collaborationKey?:
|
46
|
+
collaborationKey?: CryptoKey;
|
38
47
|
yjsUpdate?: string;
|
39
48
|
onDisconnectionDueToSyncError?: (syncError: {
|
40
49
|
message: string;
|
@@ -45,6 +54,7 @@ export interface DdocProps {
|
|
45
54
|
}>;
|
46
55
|
className?: string;
|
47
56
|
scrollPosition?: number;
|
57
|
+
unFocused?: boolean;
|
48
58
|
}
|
49
59
|
export interface IEditorSelectionData {
|
50
60
|
from: number;
|
@@ -76,3 +86,4 @@ export interface CollaborationCursorOptions {
|
|
76
86
|
[key: string]: any;
|
77
87
|
}[]) => null;
|
78
88
|
}
|
89
|
+
export {};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { DdocProps } from './types';
|
2
2
|
|
3
|
-
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, ensResolutionUrl, onError, setCharacterCount, setWordCount, collaborationKey, yjsUpdate, onDisconnectionDueToSyncError, secureImageUploadUrl, scrollPosition, }: Partial<DdocProps>) => {
|
3
|
+
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, ensResolutionUrl, onError, setCharacterCount, setWordCount, collaborationKey, yjsUpdate, onDisconnectionDueToSyncError, secureImageUploadUrl, scrollPosition, unFocused, }: Partial<DdocProps>) => {
|
4
4
|
editor: import('@tiptap/core').Editor | null;
|
5
5
|
isContentLoading: boolean;
|
6
6
|
ref: import('react').RefObject<HTMLDivElement>;
|