@fileverse-dev/ddoc 2.4.4-patch-3 → 2.4.5
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-BEIslHaS.mjs → ccip-DOMRiw_F.mjs} +1 -1
- package/dist/{index-Z43mtLly.mjs → index-Dp20dCiD.mjs} +56358 -39977
- package/dist/index.es.js +1 -1
- package/dist/package/components/editor-bubble-menu/props.d.ts +0 -1
- package/dist/package/components/editor-bubble-menu/types.d.ts +0 -1
- package/dist/package/components/editor-toolbar.d.ts +2 -2
- package/dist/package/components/editor-utils.d.ts +2 -2
- package/dist/package/components/mobile-toolbar.d.ts +1 -2
- package/dist/package/components/presentation-mode/presentation-mode.d.ts +1 -2
- package/dist/package/components/secure-image.d.ts +0 -1
- package/dist/package/extensions/default-extension.d.ts +1 -2
- package/dist/package/extensions/docx/docx-import.d.ts +15 -0
- package/dist/package/extensions/html-export/index.d.ts +1 -1
- package/dist/package/extensions/iframe/iframe.d.ts +0 -1
- package/dist/package/extensions/mardown-paste-handler/index.d.ts +3 -3
- package/dist/package/extensions/resizable-media/resizable-media-node-view.d.ts +1 -1
- package/dist/package/extensions/resizable-media/resizable-media.d.ts +0 -1
- package/dist/package/sync-local/actions/index.d.ts +0 -1
- package/dist/package/sync-local/types/index.d.ts +0 -2
- package/dist/package/sync-local/useSyncMachine.d.ts +3 -1
- package/dist/package/types.d.ts +1 -1
- package/dist/package/use-ddoc-editor.d.ts +1 -1
- package/dist/package/utils/md-to-slides.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
package/dist/index.es.js
CHANGED
@@ -59,7 +59,6 @@ export declare const bubbleMenuProps: (props: EditorBubbleMenuProps) => {
|
|
59
59
|
url: string;
|
60
60
|
file: File;
|
61
61
|
}>;
|
62
|
-
fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
|
63
62
|
onReminderCreate?: (reminder: import('../../..').Reminder, type: string) => void;
|
64
63
|
isConnected?: boolean;
|
65
64
|
isCollabDocOwner?: boolean;
|
@@ -29,7 +29,6 @@ export type EditorBubbleMenuProps = Omit<BubbleMenuProps, 'children'> & {
|
|
29
29
|
url: string;
|
30
30
|
file: File;
|
31
31
|
}>;
|
32
|
-
fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
|
33
32
|
onReminderCreate?: (reminder: Reminder, type: string) => void;
|
34
33
|
isConnected?: boolean;
|
35
34
|
isCollabDocOwner?: boolean;
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
3
3
|
import { IpfsImageFetchPayload, IpfsImageUploadResponse } from '../types';
|
4
4
|
|
5
|
-
declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavbarVisible, setIsNavbarVisible, ipfsImageUploadFn, onMarkdownExport, onMarkdownImport, onPdfExport, onHtmlExport, onTxtExport, isLoading, ipfsImageFetchFn,
|
5
|
+
declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavbarVisible, setIsNavbarVisible, ipfsImageUploadFn, onMarkdownExport, onMarkdownImport, onPdfExport, onHtmlExport, onTxtExport, onDocxImport, isLoading, ipfsImageFetchFn, }: {
|
6
6
|
editor: Editor | null;
|
7
7
|
onError?: (errorString: string) => void;
|
8
8
|
zoomLevel: string;
|
@@ -15,8 +15,8 @@ declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavb
|
|
15
15
|
onPdfExport?: () => void;
|
16
16
|
onHtmlExport?: () => void;
|
17
17
|
onTxtExport?: () => void;
|
18
|
+
onDocxImport?: () => void;
|
18
19
|
isLoading: boolean;
|
19
|
-
fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
|
20
20
|
ipfsImageFetchFn?: (_data: IpfsImageFetchPayload) => Promise<{
|
21
21
|
url: string;
|
22
22
|
file: File;
|
@@ -38,7 +38,7 @@ export declare const IMG_UPLOAD_SETTINGS: {
|
|
38
38
|
errorMsg: string;
|
39
39
|
};
|
40
40
|
};
|
41
|
-
export declare const useEditorToolbar: ({ editor, onError, ipfsImageUploadFn, onMarkdownExport, onMarkdownImport, onPdfExport, onHtmlExport, onTxtExport, ipfsImageFetchFn,
|
41
|
+
export declare const useEditorToolbar: ({ editor, onError, ipfsImageUploadFn, onMarkdownExport, onMarkdownImport, onPdfExport, onHtmlExport, onTxtExport, ipfsImageFetchFn, onDocxImport, }: {
|
42
42
|
editor: Editor | null;
|
43
43
|
onError?: (errorString: string) => void;
|
44
44
|
ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse>;
|
@@ -51,7 +51,7 @@ export declare const useEditorToolbar: ({ editor, onError, ipfsImageUploadFn, on
|
|
51
51
|
url: string;
|
52
52
|
file: File;
|
53
53
|
}>;
|
54
|
-
|
54
|
+
onDocxImport?: () => void;
|
55
55
|
}) => {
|
56
56
|
undoRedoTools: (IEditorToolElement | null)[];
|
57
57
|
toolbar: (IEditorToolElement | null)[];
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
2
2
|
import { IpfsImageFetchPayload, IpfsImageUploadResponse } from '../types';
|
3
3
|
|
4
|
-
declare const MobileToolbar: ({ editor, onError, isKeyboardVisible, isNavbarVisible, setIsNavbarVisible, ipfsImageUploadFn, isLoading, ipfsImageFetchFn,
|
4
|
+
declare const MobileToolbar: ({ editor, onError, isKeyboardVisible, isNavbarVisible, setIsNavbarVisible, ipfsImageUploadFn, isLoading, ipfsImageFetchFn, }: {
|
5
5
|
editor: Editor | null;
|
6
6
|
onError?: (errorString: string) => void;
|
7
7
|
isKeyboardVisible: boolean;
|
@@ -13,6 +13,5 @@ declare const MobileToolbar: ({ editor, onError, isKeyboardVisible, isNavbarVisi
|
|
13
13
|
url: string;
|
14
14
|
file: File;
|
15
15
|
}>;
|
16
|
-
fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
|
17
16
|
}) => import("react/jsx-runtime").JSX.Element;
|
18
17
|
export default MobileToolbar;
|
@@ -21,7 +21,6 @@ interface PresentationModeProps {
|
|
21
21
|
file: File;
|
22
22
|
}>;
|
23
23
|
documentStyling?: DdocProps['documentStyling'];
|
24
|
-
fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
|
25
24
|
}
|
26
|
-
export declare const PresentationMode: ({ editor, onClose, isFullscreen, setIsFullscreen, onError, setCommentDrawerOpen, sharedSlidesLink, isPreviewMode, documentName, onSlidesShare, slides, setSlides, renderThemeToggle, isContentLoading, ipfsImageFetchFn, documentStyling,
|
25
|
+
export declare const PresentationMode: ({ editor, onClose, isFullscreen, setIsFullscreen, onError, setCommentDrawerOpen, sharedSlidesLink, isPreviewMode, documentName, onSlidesShare, slides, setSlides, renderThemeToggle, isContentLoading, ipfsImageFetchFn, documentStyling, }: PresentationModeProps) => import("react/jsx-runtime").JSX.Element | null;
|
27
26
|
export {};
|
@@ -8,7 +8,6 @@ type Props = {
|
|
8
8
|
height?: string;
|
9
9
|
className?: string;
|
10
10
|
caption?: string;
|
11
|
-
fetchV1ImageFn: (url: string) => Promise<ArrayBuffer | undefined>;
|
12
11
|
};
|
13
12
|
export declare const SecureImage: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLImageElement>>;
|
14
13
|
export {};
|
@@ -2,7 +2,7 @@ import { NodeType } from '@tiptap/pm/model';
|
|
2
2
|
import { InputRule } from '@tiptap/core';
|
3
3
|
import { IpfsImageFetchPayload, IpfsImageUploadResponse } from '../types';
|
4
4
|
|
5
|
-
export declare const defaultExtensions: ({ ipfsImageFetchFn, onError, metadataProxyUrl, onCopyHeadingLink, ipfsImageUploadFn,
|
5
|
+
export declare const defaultExtensions: ({ ipfsImageFetchFn, onError, metadataProxyUrl, onCopyHeadingLink, ipfsImageUploadFn, }: {
|
6
6
|
ipfsImageFetchFn?: (_data: IpfsImageFetchPayload) => Promise<{
|
7
7
|
url: string;
|
8
8
|
file: File;
|
@@ -11,6 +11,5 @@ export declare const defaultExtensions: ({ ipfsImageFetchFn, onError, metadataPr
|
|
11
11
|
ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse>;
|
12
12
|
metadataProxyUrl?: string;
|
13
13
|
onCopyHeadingLink?: (link: string) => void;
|
14
|
-
fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
|
15
14
|
}) => (import('@tiptap/core').Extension<any, any> | import('@tiptap/core').Node<any, any> | import('@tiptap/core').Mark<any, any>)[];
|
16
15
|
export declare const createInputRule: (pattern: RegExp, data: string, type: NodeType) => InputRule;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
2
|
+
import { IpfsImageUploadResponse } from '../../types';
|
3
|
+
|
4
|
+
declare module '@tiptap/core' {
|
5
|
+
interface Commands {
|
6
|
+
uploadDocxFile: {
|
7
|
+
/**
|
8
|
+
* Import a DOCX file and insert its content into the editor.
|
9
|
+
* Automatically handles embedded images via IPFS secure image upload.
|
10
|
+
*/
|
11
|
+
uploadDocxFile: (ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse>, onError?: (error: string) => void, onDocxImport?: () => void) => any;
|
12
|
+
};
|
13
|
+
}
|
14
|
+
}
|
15
|
+
export declare const DocxFileHandler: Extension<any, any>;
|
@@ -13,5 +13,5 @@ declare module '@tiptap/core' {
|
|
13
13
|
declare const HtmlExportExtension: (ipfsImageFetchFn?: (_data: IpfsImageFetchPayload) => Promise<{
|
14
14
|
url: string;
|
15
15
|
file: File;
|
16
|
-
}
|
16
|
+
}>) => Extension<any, any>;
|
17
17
|
export default HtmlExportExtension;
|
@@ -7,7 +7,7 @@ export declare const turndownService: TurndownService;
|
|
7
7
|
declare module '@tiptap/core' {
|
8
8
|
interface Commands {
|
9
9
|
uploadMarkdownFile: {
|
10
|
-
uploadMarkdownFile: (ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse
|
10
|
+
uploadMarkdownFile: (ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse>, onError?: (error: string) => void) => any;
|
11
11
|
};
|
12
12
|
exportMarkdownFile: {
|
13
13
|
exportMarkdownFile: (props?: {
|
@@ -20,11 +20,11 @@ declare module '@tiptap/core' {
|
|
20
20
|
declare const MarkdownPasteHandler: (ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse>, ipfsImageFetchFn?: (_data: IpfsImageFetchPayload) => Promise<{
|
21
21
|
url: string;
|
22
22
|
file: File;
|
23
|
-
}
|
23
|
+
}>) => Extension<any, any>;
|
24
24
|
export declare const stripFrontmatter: (markdown: string) => string;
|
25
25
|
export declare function handleMarkdownContent(view: any, content: string, ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse>): Promise<void>;
|
26
26
|
export default MarkdownPasteHandler;
|
27
27
|
export declare function searchForSecureImageNodeAndEmbedImageContent(originalDoc: PMNode, ipfsImageFetchFn?: (_data: IpfsImageFetchPayload) => Promise<{
|
28
28
|
url: string;
|
29
29
|
file: File;
|
30
|
-
}
|
30
|
+
}>): Promise<PMNode>;
|
@@ -4,4 +4,4 @@ import { IpfsImageFetchPayload } from '../../types.ts';
|
|
4
4
|
export declare const getResizableMediaNodeView: (ipfsImageFetchFn: (_data: IpfsImageFetchPayload) => Promise<{
|
5
5
|
url: string;
|
6
6
|
file: File;
|
7
|
-
}
|
7
|
+
}>) => ({ node, updateAttributes, deleteNode }: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -26,7 +26,6 @@ export declare const websocketInitializer: (context: SyncMachineContext, event:
|
|
26
26
|
onFetchCommitContent: (cid: string) => Promise<any>;
|
27
27
|
onSessionTerminated: () => void;
|
28
28
|
onUnMergedUpdates: (state: boolean) => void;
|
29
|
-
onLocalUpdate: ((updatedDocContent: import('../../types').Data["editorJSONData"], updateChunk: string) => void) | undefined;
|
30
29
|
};
|
31
30
|
export declare const yjsUpdateHandler: (context: SyncMachineContext, event: SyncMachinEvent) => {
|
32
31
|
uncommittedUpdatesIdList?: undefined;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { Data } from '../../types';
|
2
1
|
import { SocketClient } from '../socketClient';
|
3
2
|
|
4
3
|
import * as Y from 'yjs';
|
@@ -67,7 +66,6 @@ export interface SyncMachineContext {
|
|
67
66
|
onFetchCommitContent: (cid: string) => Promise<any>;
|
68
67
|
onSessionTerminated: () => void;
|
69
68
|
onUnMergedUpdates: (state: boolean) => void;
|
70
|
-
onLocalUpdate?: (updatedDocContent: Data['editorJSONData'], updateChunk: string) => void;
|
71
69
|
}
|
72
70
|
export interface ErrorResponseMessage {
|
73
71
|
status: boolean;
|
@@ -20,7 +20,9 @@ export declare const useSyncMachine: (config: Partial<SyncMachineContext>) => {
|
|
20
20
|
connect: (connectConfig: IConnectConf) => void;
|
21
21
|
disconnect: () => void;
|
22
22
|
isConnected: any;
|
23
|
-
isReady:
|
23
|
+
isReady: any;
|
24
|
+
getYjsEncodedState: () => string;
|
25
|
+
applyYjsEncodedState: (update: string) => void;
|
24
26
|
error: any;
|
25
27
|
terminateSession: () => void;
|
26
28
|
awareness: any;
|
package/dist/package/types.d.ts
CHANGED
@@ -69,7 +69,6 @@ export interface DdocProps extends CommentAccountProps {
|
|
69
69
|
url: string;
|
70
70
|
file: File;
|
71
71
|
}>;
|
72
|
-
fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
|
73
72
|
disableInlineComment?: boolean;
|
74
73
|
commentDrawerOpen?: boolean;
|
75
74
|
setCommentDrawerOpen?: React.Dispatch<SetStateAction<boolean>>;
|
@@ -134,6 +133,7 @@ export interface DdocProps extends CommentAccountProps {
|
|
134
133
|
onPdfExport?: () => void;
|
135
134
|
onHtmlExport?: () => void;
|
136
135
|
onTxtExport?: () => void;
|
136
|
+
onDocxImport?: () => void;
|
137
137
|
sharedSlidesLink?: string;
|
138
138
|
documentName?: string;
|
139
139
|
onInvalidContentError?: (e: unknown) => void;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { DdocProps } from './types';
|
2
2
|
|
3
3
|
import * as Y from 'yjs';
|
4
|
-
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, onChange, onCollaboratorChange, onCommentInteraction, onError, setCharacterCount, setWordCount, ipfsImageUploadFn, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, proExtensions, metadataProxyUrl, extensions: externalExtensions, onCopyHeadingLink, ipfsImageFetchFn,
|
4
|
+
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, onChange, onCollaboratorChange, onCommentInteraction, onError, setCharacterCount, setWordCount, ipfsImageUploadFn, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, proExtensions, metadataProxyUrl, extensions: externalExtensions, onCopyHeadingLink, ipfsImageFetchFn, isConnected, activeModel, maxTokens, isAIAgentEnabled, collabConfig, ...rest }: Partial<DdocProps>) => {
|
5
5
|
editor: import('@tiptap/core').Editor | null;
|
6
6
|
isContentLoading: boolean;
|
7
7
|
ref: import('react').RefObject<HTMLDivElement>;
|
@@ -13,6 +13,6 @@ export declare const md: MarkdownIt;
|
|
13
13
|
export declare const convertToMarkdown: (editor: Editor, ipfsImageFetchFn?: (_data: IpfsImageFetchPayload) => Promise<{
|
14
14
|
url: string;
|
15
15
|
file: File;
|
16
|
-
}
|
16
|
+
}>) => Promise<string>;
|
17
17
|
export declare const processMarkdownContent: (markdown: string) => Slides;
|
18
18
|
export {};
|