@fileverse-dev/ddoc 2.1.1-v2-patch-9 → 2.1.1-v2-patch-11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +20605 -20449
- package/dist/package/components/editor-bubble-menu/props.d.ts +1 -1
- package/dist/package/components/inline-comment/comment-card.d.ts +1 -1
- package/dist/package/components/inline-comment/comment-username.d.ts +4 -0
- package/dist/package/components/inline-comment/context/comment-context.d.ts +1 -1
- package/dist/package/components/inline-comment/context/types.d.ts +12 -4
- package/dist/package/components/inline-comment/types.d.ts +1 -0
- package/dist/package/extensions/comment/comment.d.ts +2 -0
- package/dist/package/types.d.ts +8 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
@@ -27,6 +27,7 @@ export declare const bubbleMenuProps: (props: EditorBubbleMenuProps) => {
|
|
27
27
|
})[];
|
28
28
|
};
|
29
29
|
};
|
30
|
+
className?: string | undefined;
|
30
31
|
editor: import('@tiptap/extension-bubble-menu').BubbleMenuPluginProps["editor"] | null;
|
31
32
|
pluginKey?: string | import('prosemirror-state').PluginKey<any> | undefined;
|
32
33
|
updateDelay?: number | undefined;
|
@@ -39,7 +40,6 @@ export declare const bubbleMenuProps: (props: EditorBubbleMenuProps) => {
|
|
39
40
|
from: number;
|
40
41
|
to: number;
|
41
42
|
}) => boolean) | null | undefined;
|
42
|
-
className?: string | undefined;
|
43
43
|
activeCommentId: string | null;
|
44
44
|
isPreviewMode: boolean;
|
45
45
|
onError?: (errorString: string) => void;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { CommentCardProps } from './types';
|
2
2
|
|
3
|
-
export declare const CommentCard: ({ username, selectedContent, comment, createdAt, replies, onResolve, onDelete, onUnresolve, isResolved, isDropdown, activeCommentId, id, }: CommentCardProps) => import("react/jsx-runtime").JSX.Element;
|
3
|
+
export declare const CommentCard: ({ username, selectedContent, comment, createdAt, replies, onResolve, onDelete, onUnresolve, isResolved, isDropdown, activeCommentId, id, isDisabled, }: CommentCardProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { CommentUsernameProps } from './context/types';
|
2
|
+
|
3
|
+
declare const CommentUsername: ({ username, setUsername, isNavbarVisible, isConnected, connectViaUsername, connectViaWallet, }: CommentUsernameProps) => import("react/jsx-runtime").JSX.Element;
|
4
|
+
export { CommentUsername };
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CommentContextType, CommentProviderProps } from './types';
|
2
2
|
import { EnsStatus } from '../types';
|
3
3
|
|
4
|
-
export declare const CommentProvider: ({ children, editor, initialComments, setInitialComments, username, activeCommentId, setActiveCommentId, focusCommentWithActiveId, onNewComment, onCommentReply, ensResolutionUrl, onResolveComment, onUnresolveComment, onDeleteComment, }: CommentProviderProps) => import("react/jsx-runtime").JSX.Element;
|
4
|
+
export declare const CommentProvider: ({ children, editor, initialComments, setInitialComments, username, setUsername, activeCommentId, setActiveCommentId, focusCommentWithActiveId, onNewComment, onCommentReply, ensResolutionUrl, onResolveComment, onUnresolveComment, onDeleteComment, isConnected, connectViaWallet, isLoading, connectViaUsername, }: CommentProviderProps) => import("react/jsx-runtime").JSX.Element;
|
5
5
|
export declare const useComments: () => CommentContextType;
|
6
6
|
export declare const useEnsName: (username?: string) => EnsStatus;
|
@@ -1,12 +1,14 @@
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
2
2
|
import { IComment } from '../../../extensions/comment';
|
3
3
|
import { SetStateAction } from 'react';
|
4
|
+
import { CommentAccountProps } from '../../../types';
|
4
5
|
|
5
|
-
export interface CommentContextType {
|
6
|
+
export interface CommentContextType extends CommentAccountProps {
|
6
7
|
comments: IComment[];
|
7
8
|
setComments: React.Dispatch<SetStateAction<IComment[]>>;
|
8
9
|
editor: Editor;
|
9
|
-
username?: string;
|
10
|
+
username?: string | null;
|
11
|
+
setUsername?: React.Dispatch<SetStateAction<string>>;
|
10
12
|
showResolved: boolean;
|
11
13
|
setShowResolved: (show: boolean) => void;
|
12
14
|
resolveComment: (commentId: string) => void;
|
@@ -48,7 +50,7 @@ export interface CommentContextType {
|
|
48
50
|
ensResolutionUrl: string;
|
49
51
|
onCommentReply?: (activeCommentId: string, reply: IComment) => void;
|
50
52
|
}
|
51
|
-
export interface CommentProviderProps {
|
53
|
+
export interface CommentProviderProps extends CommentAccountProps {
|
52
54
|
children: React.ReactNode;
|
53
55
|
editor: Editor;
|
54
56
|
initialComments?: IComment[];
|
@@ -58,9 +60,15 @@ export interface CommentProviderProps {
|
|
58
60
|
onResolveComment?: (activeCommentId: string) => void;
|
59
61
|
onUnresolveComment?: (activeCommentId: string) => void;
|
60
62
|
onDeleteComment?: (activeCommentId: string) => void;
|
61
|
-
username: string;
|
63
|
+
username: string | null;
|
64
|
+
setUsername?: React.Dispatch<SetStateAction<string>>;
|
62
65
|
activeCommentId: string | null;
|
63
66
|
setActiveCommentId: React.Dispatch<React.SetStateAction<string | null>>;
|
64
67
|
focusCommentWithActiveId: (id: string) => void;
|
65
68
|
ensResolutionUrl: string;
|
66
69
|
}
|
70
|
+
export interface CommentUsernameProps extends CommentAccountProps {
|
71
|
+
username?: string | null;
|
72
|
+
setUsername?: React.Dispatch<SetStateAction<string>>;
|
73
|
+
isNavbarVisible?: boolean;
|
74
|
+
}
|
package/dist/package/types.d.ts
CHANGED
@@ -16,7 +16,13 @@ export type InlineCommentData = {
|
|
16
16
|
highlightedTextContent: string;
|
17
17
|
handleClick: boolean;
|
18
18
|
};
|
19
|
-
export interface
|
19
|
+
export interface CommentAccountProps {
|
20
|
+
isConnected?: boolean;
|
21
|
+
connectViaWallet?: () => Promise<void>;
|
22
|
+
isLoading?: boolean;
|
23
|
+
connectViaUsername?: (username: string) => Promise<void>;
|
24
|
+
}
|
25
|
+
export interface DdocProps extends CommentAccountProps {
|
20
26
|
commentDrawerOpen?: boolean;
|
21
27
|
setCommentDrawerOpen?: React.Dispatch<SetStateAction<boolean>>;
|
22
28
|
initialComments?: IComment[];
|
@@ -50,6 +56,7 @@ export interface DdocProps {
|
|
50
56
|
initialContent?: JSONContent | string | string[] | null;
|
51
57
|
walletAddress?: string | null;
|
52
58
|
username?: string | null;
|
59
|
+
setUsername?: React.Dispatch<SetStateAction<string>>;
|
53
60
|
renderNavbar?: ({ editor }: {
|
54
61
|
editor: JSONContent;
|
55
62
|
}) => JSX.Element;
|