@fileverse-dev/ddoc 2.1.1-v2-patch-15 → 2.1.1-ws-patch-1
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/README.md +0 -15
- package/dist/index.es.js +73386 -76281
- package/dist/package/components/{editor-bubble-menu/types.d.ts → editor-bubble-menu.d.ts} +5 -11
- package/dist/package/components/node-selector.d.ts +9 -0
- package/dist/package/components/presentation-mode/presentation-mode.d.ts +3 -3
- package/dist/package/extensions/default-extension.d.ts +1 -1
- package/dist/package/extensions/supercharged-table/extension-table/table-view.d.ts +5 -2
- package/dist/package/extensions/supercharged-table/extension-table-row/table-row-node-view.d.ts +5 -2
- package/dist/package/types.d.ts +5 -26
- package/dist/package/use-ddoc-editor.d.ts +1 -6
- package/dist/package/utils/security.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -3
- package/dist/package/components/editor-bubble-menu/editor-bubble-menu.d.ts +0 -3
- package/dist/package/components/editor-bubble-menu/node-selector.d.ts +0 -3
- package/dist/package/components/editor-bubble-menu/props.d.ts +0 -58
- package/dist/package/components/inline-comment/comment-bubble-card.d.ts +0 -7
- package/dist/package/components/inline-comment/comment-card.d.ts +0 -3
- package/dist/package/components/inline-comment/comment-drawer.d.ts +0 -3
- package/dist/package/components/inline-comment/comment-dropdown.d.ts +0 -3
- package/dist/package/components/inline-comment/comment-section.d.ts +0 -3
- package/dist/package/components/inline-comment/comment-username.d.ts +0 -4
- package/dist/package/components/inline-comment/context/comment-context.d.ts +0 -6
- package/dist/package/components/inline-comment/context/types.d.ts +0 -74
- package/dist/package/components/inline-comment/types.d.ts +0 -65
- package/dist/package/components/inline-comment/use-comment-actions.d.ts +0 -0
- package/dist/package/components/toc/document-outline.d.ts +0 -3
- package/dist/package/components/toc/toc.d.ts +0 -5
- package/dist/package/components/toc/types.d.ts +0 -30
- package/dist/package/extensions/comment/comment.d.ts +0 -63
- package/dist/package/extensions/comment/index.d.ts +0 -2
- package/dist/package/utils/helpers.d.ts +0 -2
- package/dist/package/utils/responsive.d.ts +0 -7
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-
|
5
|
+
"version": "2.1.1-ws-patch-1",
|
6
6
|
"main": "dist/index.es.js",
|
7
7
|
"module": "dist/index.es.js",
|
8
8
|
"exports": {
|
@@ -39,7 +39,7 @@
|
|
39
39
|
"@_ueberdosis/prosemirror-tables": "^1.1.3",
|
40
40
|
"@aarkue/tiptap-math-extension": "^1.3.3",
|
41
41
|
"@fileverse-dev/md2slides": "^0.0.8",
|
42
|
-
"@fileverse/ui": "
|
42
|
+
"@fileverse/ui": "4.1.4-patch-2",
|
43
43
|
"@radix-ui/react-focus-scope": "^1.1.0",
|
44
44
|
"@radix-ui/react-popover": "^1.0.7",
|
45
45
|
"@tippyjs/react": "^4.2.6",
|
@@ -72,7 +72,6 @@
|
|
72
72
|
"base64-js": "^1.5.1",
|
73
73
|
"classnames": "^2.5.1",
|
74
74
|
"copy-to-clipboard": "^3.3.3",
|
75
|
-
"date-fns": "^4.1.0",
|
76
75
|
"dompurify": "^3.1.6",
|
77
76
|
"embla-carousel-react": "^8.1.5",
|
78
77
|
"ethers": "^6.13.1",
|
@@ -1,58 +0,0 @@
|
|
1
|
-
import { Editor } from '@tiptap/core';
|
2
|
-
import { EditorBubbleMenuProps } from './types';
|
3
|
-
|
4
|
-
export declare const bubbleMenuProps: (props: EditorBubbleMenuProps) => {
|
5
|
-
tippyOptions: {
|
6
|
-
moveTransition: string;
|
7
|
-
duration: number;
|
8
|
-
animation: string;
|
9
|
-
zIndex: number;
|
10
|
-
appendTo: () => HTMLElement | null;
|
11
|
-
popperOptions: {
|
12
|
-
strategy: string;
|
13
|
-
modifiers: ({
|
14
|
-
name: string;
|
15
|
-
options: {
|
16
|
-
fallbackPlacements: string[];
|
17
|
-
altAxis?: undefined;
|
18
|
-
tether?: undefined;
|
19
|
-
};
|
20
|
-
} | {
|
21
|
-
name: string;
|
22
|
-
options: {
|
23
|
-
altAxis: boolean;
|
24
|
-
tether: boolean;
|
25
|
-
fallbackPlacements?: undefined;
|
26
|
-
};
|
27
|
-
})[];
|
28
|
-
};
|
29
|
-
};
|
30
|
-
className?: string | undefined;
|
31
|
-
editor: import('@tiptap/extension-bubble-menu').BubbleMenuPluginProps["editor"] | null;
|
32
|
-
pluginKey?: string | import('prosemirror-state').PluginKey<any> | undefined;
|
33
|
-
updateDelay?: number | undefined;
|
34
|
-
shouldShow?: ((props: {
|
35
|
-
editor: Editor;
|
36
|
-
element: HTMLElement;
|
37
|
-
view: import('prosemirror-view').EditorView;
|
38
|
-
state: import('prosemirror-state').EditorState;
|
39
|
-
oldState?: import('prosemirror-state').EditorState;
|
40
|
-
from: number;
|
41
|
-
to: number;
|
42
|
-
}) => boolean) | null | undefined;
|
43
|
-
activeCommentId: string | null;
|
44
|
-
isPreviewMode: boolean;
|
45
|
-
onError?: (errorString: string) => void;
|
46
|
-
zoomLevel: string;
|
47
|
-
setIsCommentSectionOpen?: (isOpen: boolean) => void;
|
48
|
-
inlineCommentData?: import('../../types').InlineCommentData;
|
49
|
-
setInlineCommentData?: React.Dispatch<React.SetStateAction<import('../../types').InlineCommentData>>;
|
50
|
-
walletAddress?: string;
|
51
|
-
username?: string;
|
52
|
-
onInlineComment?: () => void;
|
53
|
-
commentDrawerOpen?: boolean;
|
54
|
-
setCommentDrawerOpen?: React.Dispatch<import('react').SetStateAction<boolean>>;
|
55
|
-
};
|
56
|
-
export declare const shouldShow: ({ editor }: {
|
57
|
-
editor: Editor;
|
58
|
-
}) => boolean;
|
@@ -1,3 +0,0 @@
|
|
1
|
-
import { CommentCardProps } from './types';
|
2
|
-
|
3
|
-
export declare const CommentCard: ({ username, selectedContent, comment, createdAt, replies, onResolve, onDelete, onUnresolve, isResolved, isDropdown, activeCommentId, id, isDisabled, isCommentOwner, }: CommentCardProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { CommentUsernameProps } from './context/types';
|
2
|
-
|
3
|
-
declare const CommentUsername: ({ username, setUsername, isNavbarVisible, isConnected, connectViaUsername, connectViaWallet, isLoading, }: CommentUsernameProps) => import("react/jsx-runtime").JSX.Element;
|
4
|
-
export { CommentUsername };
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { CommentContextType, CommentProviderProps } from './types';
|
2
|
-
import { EnsStatus } from '../types';
|
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;
|
5
|
-
export declare const useComments: () => CommentContextType;
|
6
|
-
export declare const useEnsName: (username?: string) => EnsStatus;
|
@@ -1,74 +0,0 @@
|
|
1
|
-
import { Editor } from '@tiptap/react';
|
2
|
-
import { IComment } from '../../../extensions/comment';
|
3
|
-
import { SetStateAction } from 'react';
|
4
|
-
import { CommentAccountProps } from '../../../types';
|
5
|
-
|
6
|
-
export interface CommentContextType extends CommentAccountProps {
|
7
|
-
comments: IComment[];
|
8
|
-
setComments: React.Dispatch<SetStateAction<IComment[]>>;
|
9
|
-
editor: Editor;
|
10
|
-
username?: string | null;
|
11
|
-
setUsername?: React.Dispatch<SetStateAction<string>>;
|
12
|
-
showResolved: boolean;
|
13
|
-
setShowResolved: (show: boolean) => void;
|
14
|
-
resolveComment: (commentId: string) => void;
|
15
|
-
unresolveComment: (commentId: string) => void;
|
16
|
-
deleteComment: (commentId: string) => void;
|
17
|
-
handleAddReply: (activeCommentId: string, replyContent: string, onCommentReply: (activeCommentId: string, reply: IComment) => void) => void;
|
18
|
-
focusCommentInEditor: (commentId: string) => void;
|
19
|
-
handleReplyChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
20
|
-
handleCommentChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
21
|
-
handleCommentKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
22
|
-
handleReplySubmit: () => void;
|
23
|
-
toggleResolved: () => void;
|
24
|
-
openReplyId: string | null;
|
25
|
-
setOpenReplyId: (id: string | null) => void;
|
26
|
-
handleReplyKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
27
|
-
commentsSectionRef: React.RefObject<HTMLDivElement>;
|
28
|
-
replySectionRef: React.RefObject<HTMLDivElement>;
|
29
|
-
addComment: (content?: string) => void;
|
30
|
-
handleCommentSubmit: () => void;
|
31
|
-
reply: string;
|
32
|
-
setReply: React.Dispatch<React.SetStateAction<string>>;
|
33
|
-
comment: string;
|
34
|
-
setComment: React.Dispatch<React.SetStateAction<string>>;
|
35
|
-
onPrevComment: () => void;
|
36
|
-
onNextComment: () => void;
|
37
|
-
activeCommentIndex: number;
|
38
|
-
activeComment: IComment | undefined;
|
39
|
-
selectedText: string;
|
40
|
-
isCommentOpen: boolean;
|
41
|
-
onInlineCommentClick: (event: React.MouseEvent) => void;
|
42
|
-
handleInlineComment: () => void;
|
43
|
-
portalRef: React.RefObject<HTMLDivElement>;
|
44
|
-
buttonRef: React.RefObject<HTMLDivElement>;
|
45
|
-
dropdownRef: React.RefObject<HTMLDivElement>;
|
46
|
-
activeComments: IComment[];
|
47
|
-
handleInput: (e: React.FormEvent<HTMLTextAreaElement>, content: string) => void;
|
48
|
-
isCommentActive: boolean;
|
49
|
-
isCommentResolved: boolean;
|
50
|
-
ensResolutionUrl: string;
|
51
|
-
onCommentReply?: (activeCommentId: string, reply: IComment) => void;
|
52
|
-
}
|
53
|
-
export interface CommentProviderProps extends CommentAccountProps {
|
54
|
-
children: React.ReactNode;
|
55
|
-
editor: Editor;
|
56
|
-
initialComments?: IComment[];
|
57
|
-
setInitialComments?: React.Dispatch<SetStateAction<IComment[]>>;
|
58
|
-
onCommentReply?: (activeCommentId: string, reply: IComment) => void;
|
59
|
-
onNewComment?: (newComment: IComment) => void;
|
60
|
-
onResolveComment?: (activeCommentId: string) => void;
|
61
|
-
onUnresolveComment?: (activeCommentId: string) => void;
|
62
|
-
onDeleteComment?: (activeCommentId: string) => void;
|
63
|
-
username: string | null;
|
64
|
-
setUsername?: React.Dispatch<SetStateAction<string>>;
|
65
|
-
activeCommentId: string | null;
|
66
|
-
setActiveCommentId: React.Dispatch<React.SetStateAction<string | null>>;
|
67
|
-
focusCommentWithActiveId: (id: string) => void;
|
68
|
-
ensResolutionUrl: string;
|
69
|
-
}
|
70
|
-
export interface CommentUsernameProps extends CommentAccountProps {
|
71
|
-
username?: string | null;
|
72
|
-
setUsername?: React.Dispatch<SetStateAction<string>>;
|
73
|
-
isNavbarVisible?: boolean;
|
74
|
-
}
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import { BubbleMenuProps, Editor } from '@tiptap/react';
|
2
|
-
import { IComment } from '../../extensions/comment';
|
3
|
-
import { SetStateAction } from 'react';
|
4
|
-
|
5
|
-
export interface UseCommentActionsProps {
|
6
|
-
editor: Editor;
|
7
|
-
comments: IComment[];
|
8
|
-
setComments: (comments: IComment[]) => void;
|
9
|
-
}
|
10
|
-
export interface CommentDropdownProps {
|
11
|
-
editor: Editor;
|
12
|
-
onSubmit: (content: string) => string;
|
13
|
-
onClose: () => void;
|
14
|
-
setComments?: (comments: IComment[]) => void;
|
15
|
-
comments?: IComment[];
|
16
|
-
username?: string;
|
17
|
-
walletAddress?: string;
|
18
|
-
activeCommentId?: string;
|
19
|
-
commentDrawerOpen?: boolean;
|
20
|
-
setCommentDrawerOpen?: React.Dispatch<SetStateAction<boolean>>;
|
21
|
-
initialComment?: string;
|
22
|
-
isBubbleMenu?: boolean;
|
23
|
-
selectedContent?: string;
|
24
|
-
isDisabled?: boolean;
|
25
|
-
isCommentOwner?: boolean;
|
26
|
-
}
|
27
|
-
export interface CommentDrawerProps {
|
28
|
-
isOpen: boolean;
|
29
|
-
onClose: () => void;
|
30
|
-
isNavbarVisible: boolean;
|
31
|
-
isPresentationMode: boolean;
|
32
|
-
activeCommentId: string | null;
|
33
|
-
isPreviewMode: boolean;
|
34
|
-
}
|
35
|
-
export interface CommentCardProps extends IComment {
|
36
|
-
comment?: string;
|
37
|
-
onResolve?: (commentId: string) => void;
|
38
|
-
onDelete?: (commentId: string) => void;
|
39
|
-
onUnresolve?: (commentId: string) => void;
|
40
|
-
isResolved?: boolean;
|
41
|
-
isDropdown?: boolean;
|
42
|
-
activeCommentId?: string;
|
43
|
-
isDisabled?: boolean;
|
44
|
-
isCommentOwner?: boolean;
|
45
|
-
}
|
46
|
-
export type CommentBubbleMenuProps = Omit<BubbleMenuProps, 'children'> & {
|
47
|
-
zoomLevel: string;
|
48
|
-
};
|
49
|
-
export interface CommentReplyProps {
|
50
|
-
reply: string;
|
51
|
-
username: string;
|
52
|
-
createdAt: Date;
|
53
|
-
}
|
54
|
-
export interface EnsStatus {
|
55
|
-
name: string;
|
56
|
-
isEns: boolean;
|
57
|
-
}
|
58
|
-
export interface CommentSectionProps {
|
59
|
-
activeCommentId: string | null;
|
60
|
-
isNavbarVisible?: boolean;
|
61
|
-
}
|
62
|
-
export interface UserDisplayProps {
|
63
|
-
ensStatus: EnsStatus;
|
64
|
-
createdAt: Date | undefined;
|
65
|
-
}
|
File without changes
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { ToCProps, ToCItemProps } from './types';
|
2
|
-
|
3
|
-
export declare const ToCItem: ({ item, onItemClick, index, }: ToCItemProps) => import("react/jsx-runtime").JSX.Element;
|
4
|
-
export declare const ToCEmptyState: () => import("react/jsx-runtime").JSX.Element;
|
5
|
-
export declare const ToC: ({ items, editor, setItems }: ToCProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,30 +0,0 @@
|
|
1
|
-
import { Editor } from '@tiptap/react';
|
2
|
-
import { SetStateAction } from 'react';
|
3
|
-
|
4
|
-
export interface ToCItemType {
|
5
|
-
id: string;
|
6
|
-
level: number;
|
7
|
-
textContent: string;
|
8
|
-
itemIndex: number;
|
9
|
-
isActive?: boolean;
|
10
|
-
}
|
11
|
-
export type ToCProps = {
|
12
|
-
items: ToCItemType[];
|
13
|
-
setItems: (items: ToCItemType[] | ((prev: ToCItemType[]) => ToCItemType[])) => void;
|
14
|
-
editor: Editor;
|
15
|
-
};
|
16
|
-
export type ToCItemProps = {
|
17
|
-
item: ToCItemType;
|
18
|
-
onItemClick: (e: React.MouseEvent, id: string) => void;
|
19
|
-
onItemRemove: (e: React.MouseEvent, id: string) => void;
|
20
|
-
index: number;
|
21
|
-
};
|
22
|
-
export interface DocumentOutlineProps {
|
23
|
-
editor: Editor;
|
24
|
-
hasToC: boolean;
|
25
|
-
items: ToCItemType[];
|
26
|
-
setItems: (items: ToCItemType[] | ((prev: ToCItemType[]) => ToCItemType[])) => void;
|
27
|
-
showTOC: boolean | undefined;
|
28
|
-
setShowTOC: React.Dispatch<SetStateAction<boolean>> | undefined;
|
29
|
-
isPreviewMode: boolean;
|
30
|
-
}
|
@@ -1,63 +0,0 @@
|
|
1
|
-
import { Mark, Range } from '@tiptap/core';
|
2
|
-
import { Mark as PMMark } from '@tiptap/pm/model';
|
3
|
-
|
4
|
-
declare module '@tiptap/core' {
|
5
|
-
interface Commands<ReturnType> {
|
6
|
-
comment: {
|
7
|
-
/**
|
8
|
-
* Set a comment (add)
|
9
|
-
*/
|
10
|
-
setComment: (commentId: string) => ReturnType;
|
11
|
-
/**
|
12
|
-
* Unset a comment (remove completely)
|
13
|
-
*/
|
14
|
-
unsetComment: (commentId: string) => ReturnType;
|
15
|
-
/**
|
16
|
-
* Resolve a comment (keep ID but update styling)
|
17
|
-
*/
|
18
|
-
resolveComment: (commentId: string) => ReturnType;
|
19
|
-
/**
|
20
|
-
* Unresolve a comment (switch back to unresolved state)
|
21
|
-
*/
|
22
|
-
unresolveComment: (commentId: string) => ReturnType;
|
23
|
-
/**
|
24
|
-
* Set a comment active
|
25
|
-
*/
|
26
|
-
setCommentActive: (commentId: string) => ReturnType;
|
27
|
-
/**
|
28
|
-
* Unset comment active
|
29
|
-
*/
|
30
|
-
unsetCommentActive: () => ReturnType;
|
31
|
-
};
|
32
|
-
}
|
33
|
-
}
|
34
|
-
export interface MarkWithRange {
|
35
|
-
mark: PMMark;
|
36
|
-
range: Range;
|
37
|
-
}
|
38
|
-
export interface CommentOptions {
|
39
|
-
HTMLAttributes: Record<string, any>;
|
40
|
-
onCommentActivated: (commentId: string) => void;
|
41
|
-
onCommentResolved?: (commentId: string) => void;
|
42
|
-
onCommentUnresolved?: (commentId: string) => void;
|
43
|
-
onCommentDeleted?: (commentId: string) => void;
|
44
|
-
}
|
45
|
-
export interface CommentStorage {
|
46
|
-
activeCommentId: string | null;
|
47
|
-
}
|
48
|
-
export interface IComment {
|
49
|
-
id?: string;
|
50
|
-
username?: string;
|
51
|
-
reactions?: {
|
52
|
-
count: number;
|
53
|
-
type: string;
|
54
|
-
}[];
|
55
|
-
selectedContent?: string;
|
56
|
-
content?: string;
|
57
|
-
replies?: IComment[];
|
58
|
-
createdAt?: Date;
|
59
|
-
resolved?: boolean;
|
60
|
-
deleted?: boolean;
|
61
|
-
commentIndex?: number;
|
62
|
-
}
|
63
|
-
export declare const CommentExtension: Mark<CommentOptions, CommentStorage>;
|