@fileverse-dev/ddoc 2.1.9 → 2.2.0-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/dist/{ccip-DNN7CnqE.mjs → ccip-DFPUQauP.mjs} +1 -1
- package/dist/{index-B7SE6hWE.mjs → index-CYe21jbr.mjs} +51168 -50896
- package/dist/index.es.js +1 -1
- package/dist/package/components/editor-toolbar.d.ts +3 -2
- package/dist/package/components/editor-utils.d.ts +3 -3
- package/dist/package/components/mobile-toolbar.d.ts +3 -2
- package/dist/package/extensions/d-block/dblock-node-view.d.ts +1 -3
- package/dist/package/extensions/d-block/dblock.d.ts +1 -0
- package/dist/package/extensions/default-extension.d.ts +1 -1
- package/dist/package/extensions/mardown-paste-handler/index.d.ts +5 -3
- package/dist/package/types.d.ts +1 -0
- package/dist/package/use-ddoc-editor.d.ts +1 -1
- package/dist/package/utils/heading-to-slug.d.ts +1 -0
- package/dist/package/utils/md-to-slides.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { default as React } from 'react';
|
2
2
|
import { Editor } from '@tiptap/react';
|
3
3
|
|
4
|
-
declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavbarVisible, setIsNavbarVisible, secureImageUploadUrl, onMarkdownExport, onMarkdownImport, onPdfExport, }: {
|
5
|
-
editor: Editor;
|
4
|
+
declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavbarVisible, setIsNavbarVisible, secureImageUploadUrl, onMarkdownExport, onMarkdownImport, onPdfExport, isLoading, }: {
|
5
|
+
editor: Editor | null;
|
6
6
|
onError?: (errorString: string) => void;
|
7
7
|
zoomLevel: string;
|
8
8
|
setZoomLevel: (zoom: string) => void;
|
@@ -12,5 +12,6 @@ declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavb
|
|
12
12
|
onMarkdownExport?: () => void;
|
13
13
|
onMarkdownImport?: () => void;
|
14
14
|
onPdfExport?: () => void;
|
15
|
+
isLoading: boolean;
|
15
16
|
}) => import("react/jsx-runtime").JSX.Element;
|
16
17
|
export default TiptapToolBar;
|
@@ -28,7 +28,7 @@ export declare const IMG_UPLOAD_SETTINGS: {
|
|
28
28
|
};
|
29
29
|
};
|
30
30
|
export declare const useEditorToolbar: ({ editor, onError, secureImageUploadUrl, onMarkdownExport, onMarkdownImport, onPdfExport, }: {
|
31
|
-
editor: Editor;
|
31
|
+
editor: Editor | null;
|
32
32
|
onError?: (errorString: string) => void;
|
33
33
|
secureImageUploadUrl?: string;
|
34
34
|
onMarkdownExport?: () => void;
|
@@ -98,7 +98,7 @@ export declare const ScriptsPopup: ({ elementRef, editor, }: {
|
|
98
98
|
editor: Editor;
|
99
99
|
}) => import("react/jsx-runtime").JSX.Element;
|
100
100
|
export declare const TextColor: ({ editor, setVisibility, elementRef, }: {
|
101
|
-
editor: Editor;
|
101
|
+
editor: Editor | null;
|
102
102
|
elementRef: React.RefObject<HTMLDivElement>;
|
103
103
|
setVisibility: Dispatch<SetStateAction<IEditorTool>>;
|
104
104
|
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -108,7 +108,7 @@ export declare const TextHeading: ({ editor, setVisibility, elementRef, }: {
|
|
108
108
|
setVisibility: Dispatch<SetStateAction<IEditorTool>>;
|
109
109
|
}) => import("react/jsx-runtime").JSX.Element;
|
110
110
|
export declare const TextFormatingPopup: ({ editor, isOpen, setIsOpen, setToolVisibility, }: {
|
111
|
-
editor: Editor;
|
111
|
+
editor: Editor | null;
|
112
112
|
isOpen: boolean;
|
113
113
|
setIsOpen: (open: boolean) => void;
|
114
114
|
setToolVisibility: Dispatch<SetStateAction<IEditorTool>>;
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
2
2
|
|
3
|
-
declare const MobileToolbar: ({ editor, onError, isKeyboardVisible, isNavbarVisible, setIsNavbarVisible, secureImageUploadUrl, }: {
|
4
|
-
editor: Editor;
|
3
|
+
declare const MobileToolbar: ({ editor, onError, isKeyboardVisible, isNavbarVisible, setIsNavbarVisible, secureImageUploadUrl, isLoading, }: {
|
4
|
+
editor: Editor | null;
|
5
5
|
onError?: (errorString: string) => void;
|
6
6
|
isKeyboardVisible: boolean;
|
7
7
|
isNavbarVisible: boolean;
|
8
8
|
setIsNavbarVisible: React.Dispatch<React.SetStateAction<boolean>>;
|
9
9
|
secureImageUploadUrl?: string;
|
10
|
+
isLoading: boolean;
|
10
11
|
}) => import("react/jsx-runtime").JSX.Element;
|
11
12
|
export default MobileToolbar;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { NodeType } from '@tiptap/pm/model';
|
2
2
|
import { InputRule } from '@tiptap/core';
|
3
3
|
|
4
|
-
export declare const defaultExtensions: (onError: (error: string) => void, secureImageUploadUrl?: string, metadataProxyUrl?: string) => (import('@tiptap/core').Extension<any, any> | import('@tiptap/core').Node<any, any> | import('@tiptap/core').Mark<any, any>)[];
|
4
|
+
export declare const defaultExtensions: (onError: (error: string) => void, secureImageUploadUrl?: string, metadataProxyUrl?: string, onCopyHeadingLink?: (link: string) => void) => (import('@tiptap/core').Extension<any, any> | import('@tiptap/core').Node<any, any> | import('@tiptap/core').Mark<any, any>)[];
|
5
5
|
export declare const createInputRule: (pattern: RegExp, data: string, type: NodeType) => InputRule;
|
@@ -1,16 +1,18 @@
|
|
1
|
-
import { Extension
|
1
|
+
import { Extension } from '@tiptap/core';
|
2
|
+
import { Node as PMNode } from 'prosemirror-model';
|
2
3
|
import { default as TurndownService } from 'turndown';
|
3
4
|
|
4
5
|
export declare const turndownService: TurndownService;
|
5
6
|
declare module '@tiptap/core' {
|
6
7
|
interface Commands {
|
7
8
|
uploadMarkdownFile: {
|
8
|
-
uploadMarkdownFile: () =>
|
9
|
+
uploadMarkdownFile: (secureImageUploadUrl?: string) => any;
|
9
10
|
};
|
10
11
|
exportMarkdownFile: {
|
11
12
|
exportMarkdownFile: () => any;
|
12
13
|
};
|
13
14
|
}
|
14
15
|
}
|
15
|
-
declare const MarkdownPasteHandler: Extension<any, any>;
|
16
|
+
declare const MarkdownPasteHandler: (secureImageUploadUrl?: string) => Extension<any, any>;
|
16
17
|
export default MarkdownPasteHandler;
|
18
|
+
export declare function searchForSecureImageNodeAndEmbedImageContent(originalDoc: PMNode): Promise<PMNode>;
|
package/dist/package/types.d.ts
CHANGED
@@ -94,6 +94,7 @@ export interface DdocProps extends CommentAccountProps {
|
|
94
94
|
onSlidesShare?: () => void;
|
95
95
|
renderThemeToggle?: () => JSX.Element;
|
96
96
|
metadataProxyUrl?: string;
|
97
|
+
onCopyHeadingLink?: (link: string) => void;
|
97
98
|
}
|
98
99
|
export interface IEditorSelectionData {
|
99
100
|
from: number;
|
@@ -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, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, ensResolutionUrl, onError, setCharacterCount, setWordCount, secureImageUploadUrl, scrollPosition, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, proExtensions, metadataProxyUrl, }: Partial<DdocProps>) => {
|
4
|
+
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, ensResolutionUrl, onError, setCharacterCount, setWordCount, secureImageUploadUrl, scrollPosition, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, proExtensions, metadataProxyUrl, onCopyHeadingLink, }: Partial<DdocProps>) => {
|
5
5
|
editor: import('@tiptap/core').Editor | null;
|
6
6
|
isContentLoading: boolean;
|
7
7
|
ref: import('react').RefObject<HTMLDivElement>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function headingToSlug(heading: string): string;
|
@@ -9,6 +9,6 @@ export interface Slides {
|
|
9
9
|
[key: number]: SlideContent[];
|
10
10
|
}
|
11
11
|
export declare const md: MarkdownIt;
|
12
|
-
export declare const convertToMarkdown: (editor: Editor) => string
|
12
|
+
export declare const convertToMarkdown: (editor: Editor) => Promise<string>;
|
13
13
|
export declare const processMarkdownContent: (markdown: string) => Slides;
|
14
14
|
export {};
|