@fileverse-dev/ddoc 2.1.3 → 2.1.4

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 +1,3 @@
1
- export declare const Spinner: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const Spinner: ({ size }: {
2
+ size?: "sm" | "md" | "lg";
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -52,6 +52,7 @@ export declare const bubbleMenuProps: (props: EditorBubbleMenuProps) => {
52
52
  onInlineComment?: () => void;
53
53
  commentDrawerOpen?: boolean;
54
54
  setCommentDrawerOpen?: React.Dispatch<import('react').SetStateAction<boolean>>;
55
+ isCollabDocumentPublished?: boolean | undefined;
55
56
  };
56
57
  export declare const shouldShow: ({ editor }: {
57
58
  editor: Editor;
@@ -21,6 +21,7 @@ export type EditorBubbleMenuProps = Omit<BubbleMenuProps, 'children'> & {
21
21
  onInlineComment?: () => void;
22
22
  commentDrawerOpen?: boolean;
23
23
  setCommentDrawerOpen?: React.Dispatch<SetStateAction<boolean>>;
24
+ isCollabDocumentPublished?: boolean | undefined;
24
25
  };
25
26
  export interface NodeSelectorProps {
26
27
  editor: Editor;
@@ -1,7 +1,8 @@
1
1
  import { Editor } from '@tiptap/core';
2
2
 
3
- export declare const CommentBubbleCard: ({ editor, activeCommentId, commentDrawerOpen, }: {
3
+ export declare const CommentBubbleCard: ({ editor, activeCommentId, commentDrawerOpen, isCollabDocumentPublished, }: {
4
4
  editor: Editor;
5
5
  activeCommentId: string | null;
6
6
  commentDrawerOpen: boolean;
7
+ isCollabDocumentPublished: boolean | undefined;
7
8
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
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, isDisabled, isCommentOwner, version, }: 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, isCommentOwner, version, emptyComment, }: CommentCardProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const UserDisplaySkeleton: () => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { CommentSectionProps } from './types';
2
2
 
3
- export declare const CommentSection: ({ activeCommentId, isNavbarVisible, isPresentationMode, isOpen, }: CommentSectionProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const CommentSection: ({ activeCommentId, isNavbarVisible, isPresentationMode, }: CommentSectionProps) => import("react/jsx-runtime").JSX.Element;
@@ -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, setUsername, activeCommentId, setActiveCommentId, focusCommentWithActiveId, onNewComment, onCommentReply, ensResolutionUrl, onResolveComment, onUnresolveComment, onDeleteComment, isConnected, connectViaWallet, isLoading, connectViaUsername, isDDocOwner, }: 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, isDDocOwner, onInlineComment, onComment, setCommentDrawerOpen, }: CommentProviderProps) => import("react/jsx-runtime").JSX.Element;
5
5
  export declare const useComments: () => CommentContextType;
6
6
  export declare const useEnsName: (username?: string) => EnsStatus;
@@ -49,6 +49,8 @@ export interface CommentContextType extends CommentAccountProps {
49
49
  isCommentResolved: boolean;
50
50
  ensResolutionUrl: string;
51
51
  onCommentReply?: (activeCommentId: string, reply: IComment) => void;
52
+ onComment?: () => void;
53
+ setCommentDrawerOpen?: React.Dispatch<React.SetStateAction<boolean>>;
52
54
  }
53
55
  export interface CommentProviderProps extends CommentAccountProps {
54
56
  children: React.ReactNode;
@@ -66,6 +68,9 @@ export interface CommentProviderProps extends CommentAccountProps {
66
68
  setActiveCommentId: React.Dispatch<React.SetStateAction<string | null>>;
67
69
  focusCommentWithActiveId: (id: string) => void;
68
70
  ensResolutionUrl: string;
71
+ onInlineComment?: () => void;
72
+ onComment?: () => void;
73
+ setCommentDrawerOpen?: React.Dispatch<React.SetStateAction<boolean>>;
69
74
  }
70
75
  export interface CommentUsernameProps extends CommentAccountProps {
71
76
  username?: string | null;
@@ -43,6 +43,7 @@ export interface CommentCardProps extends IComment {
43
43
  isDisabled?: boolean;
44
44
  isCommentOwner?: boolean;
45
45
  version?: string;
46
+ emptyComment?: boolean;
46
47
  }
47
48
  export type CommentBubbleMenuProps = Omit<BubbleMenuProps, 'children'> & {
48
49
  zoomLevel: string;
@@ -51,16 +52,17 @@ export interface CommentReplyProps {
51
52
  reply: string;
52
53
  username: string;
53
54
  createdAt: Date;
55
+ isLast: boolean;
54
56
  }
55
57
  export interface EnsStatus {
56
58
  name: string;
57
59
  isEns: boolean;
60
+ isLoading: boolean;
58
61
  }
59
62
  export interface CommentSectionProps {
60
63
  activeCommentId: string | null;
61
64
  isNavbarVisible?: boolean;
62
65
  isPresentationMode?: boolean;
63
- isOpen?: boolean;
64
66
  }
65
67
  export interface UserDisplayProps {
66
68
  ensStatus: EnsStatus;
@@ -0,0 +1,12 @@
1
+ import { Editor, JSONContent } from '@tiptap/react';
2
+
3
+ import * as Y from 'yjs';
4
+ export declare const useHeadlessEditor: () => {
5
+ setContent: (initialContent: string | string[] | JSONContent, editor: Editor, ydoc: Y.Doc) => void;
6
+ getEditor: () => {
7
+ editor: Editor;
8
+ ydoc: Y.Doc;
9
+ };
10
+ convertJSONContentToYjsEncodedString: (content: JSONContent) => string;
11
+ downloadContentAsMd: (content: string | string[] | JSONContent, title: string) => void;
12
+ };
@@ -0,0 +1 @@
1
+ export declare const useEscapeKey: (callback: () => void) => void;
@@ -24,6 +24,7 @@ export interface CommentAccountProps {
24
24
  isDDocOwner?: boolean;
25
25
  }
26
26
  export interface DdocProps extends CommentAccountProps {
27
+ isCollabDocumentPublished?: boolean;
27
28
  commentDrawerOpen?: boolean;
28
29
  setCommentDrawerOpen?: React.Dispatch<SetStateAction<boolean>>;
29
30
  initialComments?: IComment[];
@@ -80,6 +81,7 @@ export interface DdocProps extends CommentAccountProps {
80
81
  unFocused?: boolean;
81
82
  isPresentationMode?: boolean;
82
83
  setIsPresentationMode?: React.Dispatch<SetStateAction<boolean>>;
84
+ onComment?: () => void;
83
85
  onInlineComment?: () => void;
84
86
  onMarkdownExport?: () => void;
85
87
  onMarkdownImport?: () => void;
@@ -1,2 +1,3 @@
1
- export declare const nameFormatter: (address: string) => string;
1
+ export declare const nameFormatter: (username: string) => string;
2
2
  export declare const dateFormatter: (date: Date) => string | import("react/jsx-runtime").JSX.Element;
3
+ export declare const renderTextWithLinks: (text: string) => (string | import("react/jsx-runtime").JSX.Element)[];