@fileverse-dev/ddoc 2.0.9-yjs-patch-2 → 2.1.0-patch-1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +38370 -33898
- package/dist/package/components/editor-bubble-menu.d.ts +2 -0
- package/dist/package/components/presentation-mode/presentation-mode.d.ts +11 -0
- package/dist/package/components/presentation-mode/preview-panel.d.ts +12 -0
- package/dist/package/components/tag-input.d.ts +1 -1
- package/dist/package/extensions/mardown-paste-handler/index.d.ts +2 -0
- package/dist/package/types.d.ts +5 -3
- package/dist/package/use-ddoc-editor.d.ts +1 -2
- package/dist/package/utils/handle-print.d.ts +1 -0
- package/dist/package/utils/md-to-html.d.ts +9 -0
- package/dist/package/utils/md-to-slides.d.ts +14 -0
- package/dist/package/utils/template-utils.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +20 -6
- package/dist/package/utils/isJsonString.d.ts +0 -1
@@ -14,6 +14,8 @@ type EditorBubbleMenuProps = Omit<BubbleMenuProps, 'children'> & {
|
|
14
14
|
setIsCommentSectionOpen?: (isOpen: boolean) => void;
|
15
15
|
inlineCommentData?: InlineCommentData;
|
16
16
|
setInlineCommentData?: React.Dispatch<React.SetStateAction<InlineCommentData>>;
|
17
|
+
walletAddress?: string;
|
18
|
+
username?: string;
|
17
19
|
};
|
18
20
|
export declare const EditorBubbleMenu: (props: EditorBubbleMenuProps) => import("react/jsx-runtime").JSX.Element;
|
19
21
|
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Editor } from '@tiptap/react';
|
2
|
+
|
3
|
+
interface PresentationModeProps {
|
4
|
+
editor: Editor;
|
5
|
+
onClose: () => void;
|
6
|
+
isFullscreen: boolean;
|
7
|
+
setIsFullscreen: (isFullscreen: boolean) => void;
|
8
|
+
onError?: (error: string) => void;
|
9
|
+
}
|
10
|
+
export declare const PresentationMode: ({ editor, onClose, isFullscreen, setIsFullscreen, onError, }: PresentationModeProps) => import("react/jsx-runtime").JSX.Element | null;
|
11
|
+
export {};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Editor } from '@tiptap/react';
|
2
|
+
|
3
|
+
interface PreviewPanelProps {
|
4
|
+
slides: string[];
|
5
|
+
currentSlide: number;
|
6
|
+
setCurrentSlide: (index: number) => void;
|
7
|
+
previewEditors: {
|
8
|
+
[key: number]: Editor;
|
9
|
+
};
|
10
|
+
}
|
11
|
+
export declare const PreviewPanel: ({ slides, currentSlide, setCurrentSlide, previewEditors, }: PreviewPanelProps) => import("react/jsx-runtime").JSX.Element;
|
12
|
+
export {};
|
@@ -8,5 +8,5 @@ export interface TagInputProps {
|
|
8
8
|
onAddTag: (tag: TagProps) => void;
|
9
9
|
isPreviewMode: boolean;
|
10
10
|
}
|
11
|
-
declare const TagInput: ({ tags, selectedTags, onAddTag, isPreviewMode }: TagInputProps) => import("react/jsx-runtime").JSX.Element | null;
|
11
|
+
declare const TagInput: ({ tags, selectedTags, onAddTag, isPreviewMode, }: TagInputProps) => import("react/jsx-runtime").JSX.Element | null;
|
12
12
|
export { TagInput };
|
package/dist/package/types.d.ts
CHANGED
@@ -24,14 +24,14 @@ export interface DdocProps {
|
|
24
24
|
setInlineCommentData?: React.Dispatch<React.SetStateAction<InlineCommentData>>;
|
25
25
|
zoomLevel: string;
|
26
26
|
setZoomLevel: React.Dispatch<SetStateAction<string>>;
|
27
|
+
isNavbarVisible: boolean;
|
28
|
+
setIsNavbarVisible: React.Dispatch<SetStateAction<boolean>>;
|
27
29
|
isCommentSectionOpen?: boolean;
|
28
30
|
collaborationId?: string;
|
29
31
|
isPreviewMode: boolean;
|
30
32
|
ensResolutionUrl?: string;
|
31
33
|
secureImageUploadUrl?: string;
|
32
|
-
|
33
|
-
ddocId?: string;
|
34
|
-
initialContent?: JSONContent | string | string[] | null;
|
34
|
+
initialContent?: JSONContent | null;
|
35
35
|
walletAddress?: string | null;
|
36
36
|
username?: string | null;
|
37
37
|
renderNavbar?: ({ editor }: {
|
@@ -54,6 +54,8 @@ export interface DdocProps {
|
|
54
54
|
className?: string;
|
55
55
|
scrollPosition?: number;
|
56
56
|
unFocused?: boolean;
|
57
|
+
isPresentationMode?: boolean;
|
58
|
+
setIsPresentationMode?: React.Dispatch<SetStateAction<boolean>>;
|
57
59
|
}
|
58
60
|
export interface IEditorSelectionData {
|
59
61
|
from: number;
|
@@ -1,11 +1,10 @@
|
|
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,
|
4
|
+
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, ensResolutionUrl, onError, setCharacterCount, setWordCount, secureImageUploadUrl, scrollPosition, unFocused, }: Partial<DdocProps>) => {
|
5
5
|
editor: import('@tiptap/core').Editor | null;
|
6
6
|
isContentLoading: boolean;
|
7
7
|
ref: import('react').RefObject<HTMLDivElement>;
|
8
8
|
connect: (username: string | null | undefined, isEns?: boolean) => () => void;
|
9
9
|
ydoc: Y.Doc;
|
10
|
-
refreshYjsIndexedDbProvider: () => Promise<void>;
|
11
10
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const handlePrint: (slides: string[]) => void;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
interface ConversionOptions {
|
2
|
+
preserveNewlines?: boolean;
|
3
|
+
sanitize?: boolean;
|
4
|
+
maxCharsPerSlide?: number;
|
5
|
+
maxWordsPerSlide?: number;
|
6
|
+
maxLinesPerSlide?: number;
|
7
|
+
}
|
8
|
+
export declare function convertMarkdownToHTML(markdown: string, options?: ConversionOptions): string;
|
9
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { default as MarkdownIt } from 'markdown-it';
|
2
|
+
import { Editor } from '@tiptap/react';
|
3
|
+
|
4
|
+
interface SlideContent {
|
5
|
+
type: 'h1' | 'h2' | 'content' | 'image' | 'table';
|
6
|
+
content: string;
|
7
|
+
}
|
8
|
+
export interface Slides {
|
9
|
+
[key: number]: SlideContent[];
|
10
|
+
}
|
11
|
+
export declare const md: MarkdownIt;
|
12
|
+
export declare const convertToMarkdown: (editor: Editor) => string;
|
13
|
+
export declare const processMarkdownContent: (markdown: string) => Slides;
|
14
|
+
export {};
|
@@ -12,4 +12,4 @@ declare const renderIcon: (icon: IconType, className?: string) => import("react/
|
|
12
12
|
declare const createTemplateButtons: (addTemplate: (template: JSONContent) => void) => TemplateButtonProps;
|
13
13
|
declare const createMoreTemplates: (addTemplate: (template: JSONContent) => void) => TemplateButtonProps;
|
14
14
|
declare const renderTemplateButtons: (templateButtons: TemplateButtonProps, moreTemplates: TemplateButtonProps, visibleTemplateCount: number, toggleAllTemplates: () => void, isExpanded: boolean) => import("react/jsx-runtime").JSX.Element;
|
15
|
-
export { renderIcon, createTemplateButtons, createMoreTemplates, renderTemplateButtons };
|
15
|
+
export { renderIcon, createTemplateButtons, createMoreTemplates, renderTemplateButtons, };
|