@fileverse-dev/ddoc 3.2.2-sg-6 → 3.2.2-sg-7
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.d.ts +12 -0
- package/dist/index.es.js +192767 -0
- package/dist/package/components/inline-comment/comment-drawer-constants.d.ts +1 -0
- package/dist/package/components/inline-comment/comment-drawer-desktop.d.ts +35 -0
- package/dist/package/components/inline-comment/comment-drawer-mobile.d.ts +43 -0
- package/dist/package/components/inline-comment/mobile-inline-comment-sheet.d.ts +15 -0
- package/dist/package/components/inline-comment/mobile-suggestion-draft-sheet.d.ts +15 -0
- package/dist/package/components/inline-comment/types.d.ts +1 -0
- package/dist/package/components/inline-comment/use-comment-drawer-drafts.d.ts +22 -0
- package/dist/package/components/inline-comment/use-comment-drawer-filters.d.ts +40 -0
- package/dist/package/components/inline-comment/use-comment-drawer-focus.d.ts +17 -0
- package/dist/package/components/inline-comment/use-comment-drawer-lifecycle.d.ts +13 -0
- package/dist/package/components/inline-comment/use-mobile-comment-navigation.d.ts +20 -0
- package/dist/package/stores/comment-store.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ALL_TABS_OPTION_ID = "__all_tabs__";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IComment } from '../../extensions/comment';
|
|
2
|
+
|
|
3
|
+
interface DrawerSelectOption {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
interface CommentDrawerDesktopProps {
|
|
8
|
+
activeCommentId: string | null;
|
|
9
|
+
commentType: string;
|
|
10
|
+
commentTypeOptions: DrawerSelectOption[];
|
|
11
|
+
filteredComments: IComment[];
|
|
12
|
+
isCollaborationEnabled: boolean;
|
|
13
|
+
isCommentTypeSelectOpen: boolean;
|
|
14
|
+
isConnected: boolean;
|
|
15
|
+
isNavbarVisible: boolean;
|
|
16
|
+
isOpen: boolean;
|
|
17
|
+
isPresentationMode: boolean;
|
|
18
|
+
isPreviewMode: boolean;
|
|
19
|
+
isTabSelectOpen: boolean;
|
|
20
|
+
newCommentTabId: string;
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
onCommentFocus: (commentId: string, tabId?: string) => void;
|
|
23
|
+
onCommentTypeChange: (commentType: string) => void;
|
|
24
|
+
onCommentTypeSelectOpenChange: (open: boolean) => void;
|
|
25
|
+
onReset: () => void;
|
|
26
|
+
onTabChange: (tabId: string) => void;
|
|
27
|
+
onTabSelectOpenChange: (open: boolean) => void;
|
|
28
|
+
sectionLabel: string;
|
|
29
|
+
selectedTab: string;
|
|
30
|
+
selectedTabLabel: string;
|
|
31
|
+
tabList: DrawerSelectOption[];
|
|
32
|
+
tabNameById: Record<string, string>;
|
|
33
|
+
}
|
|
34
|
+
export declare const CommentDrawerDesktop: ({ activeCommentId, commentType, commentTypeOptions, filteredComments, isCollaborationEnabled, isCommentTypeSelectOpen, isConnected, isNavbarVisible, isOpen, isPresentationMode, isPreviewMode, isTabSelectOpen, newCommentTabId, onClose, onCommentFocus, onCommentTypeChange, onCommentTypeSelectOpenChange, onReset, onTabChange, onTabSelectOpenChange, sectionLabel, selectedTab, selectedTabLabel, tabList, tabNameById, }: CommentDrawerDesktopProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IComment } from '../../extensions/comment';
|
|
2
|
+
import { InlineCommentDraft, SuggestionFloatingDraftCard } from './context/types';
|
|
3
|
+
|
|
4
|
+
interface CommentDrawerMobileProps {
|
|
5
|
+
activeCommentId: string | null;
|
|
6
|
+
activeDraft: InlineCommentDraft | null;
|
|
7
|
+
activeDraftId: string | null;
|
|
8
|
+
activeSuggestionDraftCard: SuggestionFloatingDraftCard | null;
|
|
9
|
+
canGoToNextMobileComment: boolean;
|
|
10
|
+
canGoToPreviousMobileComment: boolean;
|
|
11
|
+
comments: IComment[];
|
|
12
|
+
isCollaborationEnabled: boolean;
|
|
13
|
+
isCommentMobileFocused: boolean;
|
|
14
|
+
isConnected: boolean;
|
|
15
|
+
isDiscardCommentOverlayVisible: boolean;
|
|
16
|
+
isDiscardSuggestionOverlayVisible: boolean;
|
|
17
|
+
isInlineDraftOpen: boolean;
|
|
18
|
+
isMobileDrawerVisible: boolean;
|
|
19
|
+
isNavbarVisible: boolean;
|
|
20
|
+
isPresentationMode: boolean;
|
|
21
|
+
mobileActiveCommentsCount: number;
|
|
22
|
+
mobileDraftRef: React.RefObject<HTMLDivElement>;
|
|
23
|
+
mobileFocusedCommentIndex: number;
|
|
24
|
+
onAttemptCloseNewComment: () => void;
|
|
25
|
+
onAttemptCloseSuggestionDraft: () => void;
|
|
26
|
+
onCancelDiscardComment: () => void;
|
|
27
|
+
onCancelDiscardSuggestion: () => void;
|
|
28
|
+
onCloseDrawer: () => void;
|
|
29
|
+
onCommentFocus: (commentId: string, tabId?: string) => void;
|
|
30
|
+
onCreateComment: () => void;
|
|
31
|
+
onDiscardSuggestionDraft: () => void;
|
|
32
|
+
onFocusSuggestionDraft: () => void;
|
|
33
|
+
onNextMobileComment: () => void;
|
|
34
|
+
onPreviousMobileComment: () => void;
|
|
35
|
+
onStartNewMobileComment: () => void;
|
|
36
|
+
onSubmitSuggestionDraft: () => void;
|
|
37
|
+
onUpdateInlineDraftText: (draftId: string, text: string) => void;
|
|
38
|
+
onViewAllComments: () => void;
|
|
39
|
+
tabNameById: Record<string, string>;
|
|
40
|
+
username: string | null;
|
|
41
|
+
}
|
|
42
|
+
export declare const CommentDrawerMobile: ({ activeCommentId, activeDraft, activeDraftId, activeSuggestionDraftCard, canGoToNextMobileComment, canGoToPreviousMobileComment, comments, isCollaborationEnabled, isCommentMobileFocused, isConnected, isDiscardCommentOverlayVisible, isDiscardSuggestionOverlayVisible, isInlineDraftOpen, isMobileDrawerVisible, isNavbarVisible, isPresentationMode, mobileActiveCommentsCount, mobileDraftRef, mobileFocusedCommentIndex, onAttemptCloseNewComment, onAttemptCloseSuggestionDraft, onCancelDiscardComment, onCancelDiscardSuggestion, onCloseDrawer, onCommentFocus, onCreateComment, onDiscardSuggestionDraft, onFocusSuggestionDraft, onNextMobileComment, onPreviousMobileComment, onStartNewMobileComment, onSubmitSuggestionDraft, onUpdateInlineDraftText, onViewAllComments, tabNameById, username, }: CommentDrawerMobileProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InlineCommentDraft } from './context/types';
|
|
2
|
+
|
|
3
|
+
interface MobileInlineCommentProps {
|
|
4
|
+
activeDraft: InlineCommentDraft | null;
|
|
5
|
+
activeDraftId: string | null;
|
|
6
|
+
isDiscardCommentOverlayVisible: boolean;
|
|
7
|
+
mobileDraftRef: React.RefObject<HTMLDivElement>;
|
|
8
|
+
onAttemptClose: () => void;
|
|
9
|
+
onCancelDiscard: () => void;
|
|
10
|
+
onConfirmDiscard: () => void;
|
|
11
|
+
onSubmit: () => void;
|
|
12
|
+
onUpdateDraftText: (draftId: string, text: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const MobileInlineComment: ({ activeDraft, activeDraftId, isDiscardCommentOverlayVisible, mobileDraftRef, onAttemptClose, onCancelDiscard, onConfirmDiscard, onSubmit, onUpdateDraftText, }: MobileInlineCommentProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SuggestionFloatingDraftCard } from './context/types';
|
|
2
|
+
|
|
3
|
+
interface MobileSuggestionDraftProps {
|
|
4
|
+
activeSuggestionDraftCard: SuggestionFloatingDraftCard;
|
|
5
|
+
isConnected: boolean;
|
|
6
|
+
isDiscardSuggestionOverlayVisible: boolean;
|
|
7
|
+
username: string | null;
|
|
8
|
+
onAttemptClose: () => void;
|
|
9
|
+
onCancelDiscard: () => void;
|
|
10
|
+
onConfirmDiscard: () => void;
|
|
11
|
+
onFocusSuggestionText: () => void;
|
|
12
|
+
onSubmit: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const MobileSuggestionDraft: ({ activeSuggestionDraftCard, isConnected, isDiscardSuggestionOverlayVisible, username, onAttemptClose, onCancelDiscard, onConfirmDiscard, onFocusSuggestionText, onSubmit, }: MobileSuggestionDraftProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SuggestionFloatingDraftCard } from './context/types';
|
|
2
|
+
|
|
3
|
+
interface UseCommentDrawerDraftsProps {
|
|
4
|
+
selectedCommentTabId: string;
|
|
5
|
+
setOpenReplyId: (commentId: string | null) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const useCommentDrawerDrafts: ({ selectedCommentTabId, setOpenReplyId, }: UseCommentDrawerDraftsProps) => {
|
|
8
|
+
activeDraft: import('./context/types').InlineCommentDraft | null;
|
|
9
|
+
activeDraftId: string | null;
|
|
10
|
+
activeSuggestionDraftCard: SuggestionFloatingDraftCard | null;
|
|
11
|
+
handleCreateComment: () => void;
|
|
12
|
+
handleDiscardSuggestionDraft: () => void;
|
|
13
|
+
handleStartNewMobileComment: () => void;
|
|
14
|
+
handleSubmitSuggestionDraft: () => void;
|
|
15
|
+
isDiscardCommentOverlayVisible: boolean;
|
|
16
|
+
isDiscardSuggestionOverlayVisible: boolean;
|
|
17
|
+
isInlineDraftOpen: boolean;
|
|
18
|
+
setIsDiscardCommentOverlayVisible: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
19
|
+
setIsDiscardSuggestionOverlayVisible: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
20
|
+
updateInlineDraftText: (draftId: string, value: string) => void;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IComment } from '../../extensions/comment';
|
|
2
|
+
import { Tab } from '../tabs/utils/tab-utils';
|
|
3
|
+
|
|
4
|
+
export declare const commentTypeOptions: {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}[];
|
|
8
|
+
interface UseCommentDrawerFiltersProps {
|
|
9
|
+
activeTabId: string;
|
|
10
|
+
comments: IComment[];
|
|
11
|
+
tabs: Tab[];
|
|
12
|
+
}
|
|
13
|
+
export declare const useCommentDrawerFilters: ({ activeTabId, comments, tabs, }: UseCommentDrawerFiltersProps) => {
|
|
14
|
+
closeFilterSelects: () => void;
|
|
15
|
+
commentType: string;
|
|
16
|
+
commentTypeOptions: {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
}[];
|
|
20
|
+
filteredComments: IComment[];
|
|
21
|
+
handleCommentTypeSelectOpenChange: (open: boolean) => void;
|
|
22
|
+
handleTabSelectOpenChange: (open: boolean) => void;
|
|
23
|
+
isCommentTypeSelectOpen: boolean;
|
|
24
|
+
isTabSelectOpen: boolean;
|
|
25
|
+
resetFilters: () => void;
|
|
26
|
+
sectionLabel: string;
|
|
27
|
+
selectedCommentTabId: string;
|
|
28
|
+
selectedTab: string;
|
|
29
|
+
selectedTabLabel: string;
|
|
30
|
+
setCommentType: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
31
|
+
setTab: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
32
|
+
tabList: {
|
|
33
|
+
id: string;
|
|
34
|
+
label: string;
|
|
35
|
+
}[];
|
|
36
|
+
tabNameById: {
|
|
37
|
+
[k: string]: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IComment } from '../../extensions/comment';
|
|
2
|
+
|
|
3
|
+
interface UseCommentDrawerFocusProps {
|
|
4
|
+
activeTabId: string;
|
|
5
|
+
comments: IComment[];
|
|
6
|
+
focusCommentInEditor: (commentId: string, options?: {
|
|
7
|
+
source?: 'explicit-ui';
|
|
8
|
+
}) => void;
|
|
9
|
+
isBelow1280px: boolean;
|
|
10
|
+
onTabChange?: (tabId: string) => void;
|
|
11
|
+
setOpenReplyId: (commentId: string | null) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const useCommentDrawerFocus: ({ activeTabId, comments, focusCommentInEditor, isBelow1280px, onTabChange, setOpenReplyId, }: UseCommentDrawerFocusProps) => {
|
|
14
|
+
clearPendingCommentFocus: () => void;
|
|
15
|
+
handleCommentFocus: (commentId: string, commentTabId?: string) => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface UseCommentDrawerLifecycleProps {
|
|
2
|
+
activeSuggestionDraftCard: unknown;
|
|
3
|
+
closeFilterSelects: () => void;
|
|
4
|
+
isBelow1280px: boolean;
|
|
5
|
+
isCommentMobileFocused: boolean;
|
|
6
|
+
isInlineDraftOpen: boolean;
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
setIsDiscardCommentOverlayVisible: (visible: boolean) => void;
|
|
10
|
+
setIsDiscardSuggestionOverlayVisible: (visible: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const useCommentDrawerLifecycle: ({ activeSuggestionDraftCard, closeFilterSelects, isBelow1280px, isCommentMobileFocused, isInlineDraftOpen, isOpen, onClose, setIsDiscardCommentOverlayVisible, setIsDiscardSuggestionOverlayVisible, }: UseCommentDrawerLifecycleProps) => void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { IComment } from '../../extensions/comment';
|
|
3
|
+
|
|
4
|
+
interface UseMobileCommentNavigationProps {
|
|
5
|
+
comments: IComment[];
|
|
6
|
+
mobileDrawerRef: RefObject<HTMLDivElement>;
|
|
7
|
+
onCommentFocus: (commentId: string, tabId?: string) => void;
|
|
8
|
+
openReplyId: string | null;
|
|
9
|
+
setOpenReplyId: (commentId: string | null) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const useMobileCommentNavigation: ({ comments, mobileDrawerRef, onCommentFocus, openReplyId, setOpenReplyId, }: UseMobileCommentNavigationProps) => {
|
|
12
|
+
canGoToNextMobileComment: boolean;
|
|
13
|
+
canGoToPreviousMobileComment: boolean;
|
|
14
|
+
handleNextMobileComment: () => void;
|
|
15
|
+
handlePreviousMobileComment: () => void;
|
|
16
|
+
handleViewAllComments: () => void;
|
|
17
|
+
mobileActiveCommentsCount: number;
|
|
18
|
+
mobileFocusedCommentIndex: number;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -258,6 +258,7 @@ export interface CommentStoreState {
|
|
|
258
258
|
editReplyContent: (commentId: string, replyId: string, content: string) => void;
|
|
259
259
|
handleAddReply: (activeCommentId: string, replyContent: string, replyCallback?: (activeCommentId: string, reply: IComment) => void) => void;
|
|
260
260
|
focusCommentInEditor: (commentId: string, options?: FocusCommentInEditorOptions) => void;
|
|
261
|
+
focusSuggestionDraftInEditor: (suggestionId: string) => void;
|
|
261
262
|
onPrevComment: () => void;
|
|
262
263
|
onNextComment: () => void;
|
|
263
264
|
getEnsStatus: (walletAddress: string, setEnsStatus: React.Dispatch<React.SetStateAction<EnsStatus>>) => void;
|