@fileverse-dev/ddoc 2.1.1-v2-patch-6 → 2.1.1-v2-patch-8

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.
@@ -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, }: CommentProviderProps) => import("react/jsx-runtime").JSX.Element;
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;
5
5
  export declare const useComments: () => CommentContextType;
6
6
  export declare const useEnsName: (username?: string) => EnsStatus;
@@ -46,6 +46,7 @@ export interface CommentContextType {
46
46
  isCommentActive: boolean;
47
47
  isCommentResolved: boolean;
48
48
  ensResolutionUrl: string;
49
+ onCommentReply?: (activeCommentId: string, reply: IComment) => void;
49
50
  }
50
51
  export interface CommentProviderProps {
51
52
  children: React.ReactNode;
@@ -54,6 +55,9 @@ export interface CommentProviderProps {
54
55
  setInitialComments?: React.Dispatch<SetStateAction<IComment[]>>;
55
56
  onCommentReply?: (activeCommentId: string, reply: IComment) => void;
56
57
  onNewComment?: (newComment: IComment) => void;
58
+ onResolveComment?: (activeCommentId: string) => void;
59
+ onUnresolveComment?: (activeCommentId: string) => void;
60
+ onDeleteComment?: (activeCommentId: string) => void;
57
61
  username: string;
58
62
  activeCommentId: string | null;
59
63
  setActiveCommentId: React.Dispatch<React.SetStateAction<string | null>>;
@@ -31,9 +31,9 @@ export interface CommentDrawerProps {
31
31
  }
32
32
  export interface CommentCardProps extends IComment {
33
33
  comment?: string;
34
- onResolve?: () => void;
35
- onDelete?: () => void;
36
- onUnresolve?: () => void;
34
+ onResolve?: (commentId: string) => void;
35
+ onDelete?: (commentId: string) => void;
36
+ onUnresolve?: (commentId: string) => void;
37
37
  isResolved?: boolean;
38
38
  isDropdown?: boolean;
39
39
  activeCommentId?: string;
@@ -1,7 +0,0 @@
1
- import { UseCommentActionsProps } from './types';
2
-
3
- export declare const useCommentActions: ({ editor, comments, setComments, }: UseCommentActionsProps) => {
4
- handleResolveComment: (commentId: string) => void;
5
- handleUnresolveComment: (commentId: string) => void;
6
- handleDeleteComment: (commentId: string) => void;
7
- };
@@ -23,6 +23,9 @@ export interface DdocProps {
23
23
  setInitialComments?: React.Dispatch<SetStateAction<IComment[]>>;
24
24
  onCommentReply?: (activeCommentId: string, reply: IComment) => void;
25
25
  onNewComment?: (newComment: IComment) => void;
26
+ onResolveComment?: (activeCommentId: string) => void;
27
+ onUnresolveComment?: (activeCommentId: string) => void;
28
+ onDeleteComment?: (activeCommentId: string) => void;
26
29
  selectedTags?: TagType[];
27
30
  setSelectedTags?: React.Dispatch<SetStateAction<TagType[]>>;
28
31
  enableCollaboration?: boolean | undefined;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "2.1.1-v2-patch-6",
5
+ "version": "2.1.1-v2-patch-8",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {