@fileverse-dev/ddoc 2.5.0-patch-5 → 2.5.0-tiptap-2
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/{ccip-B25X6nHx.mjs → ccip-C5pydaSE.mjs} +1 -1
- package/dist/{index-Cf4UGAyz.mjs → index-DHhy3vCx.mjs} +51053 -48497
- package/dist/index.es.js +1 -1
- package/dist/package/common/toolbar-button.d.ts +3 -2
- package/dist/package/components/editor-bubble-menu/editor-bubble-menu.d.ts +1 -1
- package/dist/package/components/editor-bubble-menu/props.d.ts +0 -65
- package/dist/package/components/editor-bubble-menu/types.d.ts +2 -1
- package/dist/package/components/inline-comment/comment-drawer.d.ts +1 -1
- package/dist/package/components/inline-comment/comment-section.d.ts +1 -1
- package/dist/package/components/inline-comment/comment-username.d.ts +1 -1
- package/dist/package/components/inline-comment/context/types.d.ts +0 -1
- package/dist/package/components/inline-comment/types.d.ts +2 -4
- package/dist/package/extensions/ai-writer/ai-writer-node-view.d.ts +1 -1
- package/dist/package/extensions/default-extension.d.ts +2 -3
- package/dist/package/extensions/font-size/font-size.d.ts +1 -1
- package/dist/package/extensions/link-preview/link-preview.d.ts +0 -1
- package/dist/package/extensions/slash-command/slash-comand.d.ts +1 -1
- package/dist/package/extensions/slash-command/slash-command-utils.d.ts +10 -3
- package/dist/package/types.d.ts +0 -1
- package/dist/package/utils/upload-images.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +31 -32
package/dist/index.es.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
declare const ToolbarButton: import('react').ForwardRefExoticComponent<{
|
|
2
2
|
icon: string;
|
|
3
|
-
isActive
|
|
4
|
-
onClick
|
|
3
|
+
isActive?: boolean;
|
|
4
|
+
onClick?: () => void;
|
|
5
5
|
tooltip?: string;
|
|
6
6
|
classNames?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
variant?: "default" | "danger" | "secondary" | "ghost" | null | undefined;
|
|
8
9
|
size?: "sm" | "md" | "lg";
|
|
9
10
|
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
10
11
|
export default ToolbarButton;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { EditorBubbleMenuProps } from './types';
|
|
2
2
|
|
|
3
|
-
export declare const EditorBubbleMenu: (props: EditorBubbleMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const EditorBubbleMenu: (props: EditorBubbleMenuProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,70 +1,5 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/core';
|
|
2
|
-
import { EditorBubbleMenuProps } from './types';
|
|
3
2
|
|
|
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
|
-
disableInlineComment: boolean;
|
|
46
|
-
onError?: (errorString: string) => void;
|
|
47
|
-
zoomLevel: string;
|
|
48
|
-
setIsCommentSectionOpen?: (isOpen: boolean) => void;
|
|
49
|
-
inlineCommentData?: import('../../types').InlineCommentData;
|
|
50
|
-
setInlineCommentData?: React.Dispatch<React.SetStateAction<import('../../types').InlineCommentData>>;
|
|
51
|
-
walletAddress?: string;
|
|
52
|
-
username?: string;
|
|
53
|
-
onInlineComment?: () => void;
|
|
54
|
-
commentDrawerOpen?: boolean;
|
|
55
|
-
setCommentDrawerOpen?: React.Dispatch<import('react').SetStateAction<boolean>>;
|
|
56
|
-
isCollabDocumentPublished?: boolean | undefined;
|
|
57
|
-
ipfsImageUploadFn?: (file: File) => Promise<import('../../types').IpfsImageUploadResponse>;
|
|
58
|
-
ipfsImageFetchFn?: (_data: import('../../types').IpfsImageFetchPayload) => Promise<{
|
|
59
|
-
url: string;
|
|
60
|
-
file: File;
|
|
61
|
-
}>;
|
|
62
|
-
fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
|
|
63
|
-
onReminderCreate?: (reminder: import('../../..').Reminder, type: string) => void;
|
|
64
|
-
isConnected?: boolean;
|
|
65
|
-
isCollabDocOwner?: boolean;
|
|
66
|
-
enableCollaboration?: boolean;
|
|
67
|
-
};
|
|
68
3
|
export declare const shouldShow: ({ editor }: {
|
|
69
4
|
editor: Editor;
|
|
70
5
|
}) => boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Editor } from '@tiptap/react';
|
|
2
|
+
import { BubbleMenuProps } from '@tiptap/react/menus';
|
|
2
3
|
import { SetStateAction } from 'react';
|
|
3
4
|
import { InlineCommentData, IpfsImageFetchPayload, IpfsImageUploadResponse } from '../../types';
|
|
4
5
|
import { Reminder } from '../../extensions/reminder-block/types';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CommentDrawerProps } from './types';
|
|
2
2
|
|
|
3
|
-
export declare const CommentDrawer: ({ isOpen, onClose, isNavbarVisible, isPresentationMode, activeCommentId, isPreviewMode,
|
|
3
|
+
export declare const CommentDrawer: ({ isOpen, onClose, isNavbarVisible, isPresentationMode, activeCommentId, isPreviewMode, }: CommentDrawerProps) => 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,
|
|
3
|
+
export declare const CommentSection: ({ activeCommentId, isNavbarVisible, isPresentationMode, }: CommentSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CommentUsernameProps } from './context/types';
|
|
2
2
|
|
|
3
|
-
declare const CommentUsername: ({ username, setUsername, isNavbarVisible, isConnected, connectViaUsername, connectViaWallet, isLoading,
|
|
3
|
+
declare const CommentUsername: ({ username, setUsername, isNavbarVisible, isConnected, connectViaUsername, connectViaWallet, isLoading, }: CommentUsernameProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { CommentUsername };
|
|
@@ -86,7 +86,6 @@ export interface CommentUsernameProps extends CommentAccountProps {
|
|
|
86
86
|
username?: string | null;
|
|
87
87
|
setUsername?: React.Dispatch<SetStateAction<string>>;
|
|
88
88
|
isNavbarVisible?: boolean;
|
|
89
|
-
disableOnlineFeatures?: boolean;
|
|
90
89
|
}
|
|
91
90
|
export interface EnsEntry {
|
|
92
91
|
name: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BubbleMenuProps
|
|
1
|
+
import { BubbleMenuProps } from '@tiptap/react/menus';
|
|
2
|
+
import { Editor } from '@tiptap/react';
|
|
2
3
|
import { IComment } from '../../extensions/comment';
|
|
3
4
|
import { SetStateAction } from 'react';
|
|
4
5
|
|
|
@@ -31,7 +32,6 @@ export interface CommentDrawerProps {
|
|
|
31
32
|
isPresentationMode: boolean;
|
|
32
33
|
activeCommentId: string | null;
|
|
33
34
|
isPreviewMode: boolean;
|
|
34
|
-
disableOnlineFeatures?: boolean;
|
|
35
35
|
}
|
|
36
36
|
export interface CommentCardProps extends IComment {
|
|
37
37
|
comment?: string;
|
|
@@ -45,7 +45,6 @@ export interface CommentCardProps extends IComment {
|
|
|
45
45
|
isCommentOwner?: boolean;
|
|
46
46
|
version?: string;
|
|
47
47
|
emptyComment?: boolean;
|
|
48
|
-
disableOnlineFeatures?: boolean;
|
|
49
48
|
}
|
|
50
49
|
export type CommentBubbleMenuProps = Omit<BubbleMenuProps, 'children'> & {
|
|
51
50
|
zoomLevel: string;
|
|
@@ -64,7 +63,6 @@ export interface CommentSectionProps {
|
|
|
64
63
|
activeCommentId: string | null;
|
|
65
64
|
isNavbarVisible?: boolean;
|
|
66
65
|
isPresentationMode?: boolean;
|
|
67
|
-
disableOnlineFeatures?: boolean;
|
|
68
66
|
}
|
|
69
67
|
export interface UserDisplayProps {
|
|
70
68
|
username: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { NodeViewProps } from '@tiptap/react';
|
|
3
3
|
|
|
4
|
-
export declare const AIWriterNodeView: React.MemoExoticComponent<({ node, editor: parentEditor, getPos, updateAttributes }: NodeViewProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
4
|
+
export declare const AIWriterNodeView: React.MemoExoticComponent<({ node, editor: parentEditor, getPos, updateAttributes, deleteNode, }: NodeViewProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
@@ -3,7 +3,7 @@ import { InputRule } from '@tiptap/core';
|
|
|
3
3
|
import { IpfsImageFetchPayload, IpfsImageUploadResponse } from '../types';
|
|
4
4
|
import { ToCItemType } from '../components/toc/types';
|
|
5
5
|
|
|
6
|
-
export declare const defaultExtensions: ({ ipfsImageFetchFn, onError, metadataProxyUrl, onCopyHeadingLink, ipfsImageUploadFn, fetchV1ImageFn, onTocUpdate,
|
|
6
|
+
export declare const defaultExtensions: ({ ipfsImageFetchFn, onError, metadataProxyUrl, onCopyHeadingLink, ipfsImageUploadFn, fetchV1ImageFn, onTocUpdate, }: {
|
|
7
7
|
ipfsImageFetchFn?: (_data: IpfsImageFetchPayload) => Promise<{
|
|
8
8
|
url: string;
|
|
9
9
|
file: File;
|
|
@@ -14,6 +14,5 @@ export declare const defaultExtensions: ({ ipfsImageFetchFn, onError, metadataPr
|
|
|
14
14
|
onCopyHeadingLink?: (link: string) => void;
|
|
15
15
|
fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
|
|
16
16
|
onTocUpdate?: (data: ToCItemType[], isCreate?: boolean) => void;
|
|
17
|
-
|
|
18
|
-
}) => (import('@tiptap/core').Extension<any, any> | import('@tiptap/core').Node<any, any> | import('@tiptap/core').Mark<any, any>)[];
|
|
17
|
+
}) => (import('@tiptap/core').AnyExtension | import('@tiptap/core').Node<import('@tiptap/extension-horizontal-rule').HorizontalRuleOptions, any> | import('@tiptap/core').Extension<import('./multi-column').ColumnExtensionOptions, any> | import('@tiptap/core').Node<import('./iframe').IframeOptions, any> | import('@tiptap/core').Node<import('./twitter-embed').EmbeddedTweetOptions, any> | import('@tiptap/core').Node<import('./d-block').DBlockOptions, any> | import('@tiptap/core').Extension<import('./trailing-node').TrailingNodeOptions, any> | import('@tiptap/core').Node<import('./resizable-media').MediaOptions, any> | import('@tiptap/core').Extension<import('./link-preview/link-preview').LinkPreviewOptions, any> | import('@tiptap/core').Node<import('@tiptap/extension-code-block-lowlight').CodeBlockLowlightOptions, any> | import('@tiptap/core').Extension<import('@tiptap/extension-text-style').FontFamilyOptions, any> | import('@tiptap/core').Extension<import('@tiptap/starter-kit').StarterKitOptions, any> | import('@tiptap/core').Extension<import('@tiptap/extension-table-of-contents').TableOfContentsOptions, import('@tiptap/extension-table-of-contents').TableOfContentsStorage> | import('@tiptap/core').Extension<import('@tiptap/extension-typography').TypographyOptions, any> | import('@tiptap/core').Extension<import('@tiptap/extension-text-align').TextAlignOptions, any> | import('@tiptap/core').Extension<import('@tiptap/extensions').PlaceholderOptions, any> | import('@tiptap/core').Mark<import('@tiptap/extension-highlight').HighlightOptions, any> | import('@tiptap/core').Mark<import('@tiptap/extension-text-style').TextStyleOptions, any> | import('@tiptap/core').Node<import('@tiptap/extension-list').TaskListOptions, any> | import('@tiptap/core').Node<import('@tiptap/extension-list').TaskItemOptions, any> | import('@tiptap/core').Node<import('@tiptap/extension-list').BulletListOptions, any> | import('@tiptap/core').Node<import('@tiptap/extension-list').ListItemOptions, any> | import('@tiptap/core').Extension<import('@tiptap/extensions').DropcursorOptions, any> | import('@tiptap/core').Extension<import('tiptap-markdown').MarkdownOptions, import('tiptap-markdown').MarkdownStorage> | import('@tiptap/core').Extension<import('@tiptap/extensions').CharacterCountOptions, import('@tiptap/extensions').CharacterCountStorage> | import('@tiptap/core').Extension<import('@aarkue/tiptap-math-extension').MathExtensionOption, any> | import('@tiptap/core').Mark<import('@tiptap/extension-superscript').SuperscriptExtensionOptions, any>)[];
|
|
19
18
|
export declare const createInputRule: (pattern: RegExp, data: string, type: NodeType) => InputRule;
|
|
@@ -2,5 +2,5 @@ import { Extension } from '@tiptap/core';
|
|
|
2
2
|
import { IpfsImageUploadResponse } from '../../types';
|
|
3
3
|
|
|
4
4
|
export declare const Command: Extension<any, any>;
|
|
5
|
-
declare const SlashCommand: (onError?: (errorString: string) => void, ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse>, isConnected?: boolean, enableCollaboration?: boolean
|
|
5
|
+
declare const SlashCommand: (onError?: (errorString: string) => void, ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse>, isConnected?: boolean, enableCollaboration?: boolean) => Extension<any, any>;
|
|
6
6
|
export default SlashCommand;
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { CommandProps } from './types';
|
|
2
2
|
import { IpfsImageUploadResponse } from '../../types';
|
|
3
3
|
|
|
4
|
-
export declare const getSuggestionItems: ({ query, onError, isConnected, ipfsImageUploadFn, editor, enableCollaboration,
|
|
4
|
+
export declare const getSuggestionItems: ({ query, onError, isConnected, ipfsImageUploadFn, editor, enableCollaboration, }: {
|
|
5
5
|
query: string;
|
|
6
6
|
onError?: (errorString: string) => void;
|
|
7
7
|
ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse>;
|
|
8
8
|
isConnected?: boolean;
|
|
9
9
|
editor?: any;
|
|
10
10
|
enableCollaboration?: boolean;
|
|
11
|
-
disableOnlineFeatures?: boolean;
|
|
12
11
|
}) => ({
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
searchTerms: string[];
|
|
15
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
image: string;
|
|
17
|
+
command: ({ editor, range }: CommandProps) => void;
|
|
18
|
+
isDisabled: boolean;
|
|
19
|
+
} | {
|
|
13
20
|
title: string;
|
|
14
21
|
description: string;
|
|
15
22
|
searchTerms: string[];
|
|
@@ -24,6 +31,6 @@ export declare const getSuggestionItems: ({ query, onError, isConnected, ipfsIma
|
|
|
24
31
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
25
32
|
image: string;
|
|
26
33
|
isDisabled: boolean | undefined;
|
|
27
|
-
command: ({ editor, range }: CommandProps) =>
|
|
34
|
+
command: ({ editor, range }: CommandProps) => true | undefined;
|
|
28
35
|
})[];
|
|
29
36
|
export declare const updateScrollView: (container: HTMLElement, item: HTMLElement) => void;
|
package/dist/package/types.d.ts
CHANGED
|
@@ -164,7 +164,6 @@ export interface DdocProps extends CommentAccountProps {
|
|
|
164
164
|
onUnMergedUpdates?: (state: boolean) => void;
|
|
165
165
|
onCollabError?: (error: any) => void;
|
|
166
166
|
isExistingCollabSession?: boolean;
|
|
167
|
-
disableOnlineFeatures?: boolean;
|
|
168
167
|
}
|
|
169
168
|
export interface IEditorSelectionData {
|
|
170
169
|
from: number;
|
|
@@ -4,7 +4,7 @@ import { IpfsImageUploadResponse } from '../types';
|
|
|
4
4
|
|
|
5
5
|
declare const UploadImagesPlugin: () => Plugin<DecorationSet>;
|
|
6
6
|
export default UploadImagesPlugin;
|
|
7
|
-
export declare function startImageUpload(file: File, view: EditorView, pos: number, ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse
|
|
7
|
+
export declare function startImageUpload(file: File, view: EditorView, pos: number, ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse>): Promise<void>;
|
|
8
8
|
export declare const uploadFn: (image: File) => Promise<string>;
|
|
9
9
|
export declare const uploadSecureImage: (url: string, image: File, publicKey: ArrayBuffer) => Promise<any>;
|
|
10
10
|
export declare const handleDecryptImage: (url: string, encryptedKey: string, privateKey: string, iv: string) => Promise<string | undefined>;
|