@fileverse-dev/ddoc 3.0.83 → 3.0.85
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/index.es.js +19879 -19721
- package/dist/package/components/editor-toolbar.d.ts +2 -1
- package/dist/package/components/fullscreen-toolbar.d.ts +14 -0
- package/dist/package/constants/canvas-dimensions.d.ts +12 -12
- package/dist/package/constants/zoom.d.ts +4 -0
- package/dist/package/context/editor-context.d.ts +2 -0
- package/dist/package/hooks/use-focus-mode.d.ts +8 -0
- package/dist/package/types.d.ts +1 -0
- package/dist/package/utils/get-editor-scroll-container.d.ts +5 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { IpfsImageFetchPayload, IpfsImageUploadResponse } from '../types';
|
|
|
4
4
|
import { Tab } from './tabs/utils/tab-utils';
|
|
5
5
|
|
|
6
6
|
import * as Y from 'yjs';
|
|
7
|
-
declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavbarVisible, setIsNavbarVisible, ipfsImageUploadFn, onMarkdownExport, onMarkdownImport, onPdfExport, onHtmlExport, onTxtExport, onDocxImport, isLoading, ipfsImageFetchFn, fetchV1ImageFn, isConnected, tabs, ydoc, onRegisterExportTrigger, }: {
|
|
7
|
+
declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavbarVisible, setIsNavbarVisible, ipfsImageUploadFn, onMarkdownExport, onMarkdownImport, onPdfExport, onHtmlExport, onTxtExport, onDocxImport, isLoading, ipfsImageFetchFn, fetchV1ImageFn, isConnected, tabs, ydoc, onRegisterExportTrigger, toggleFocusMode, }: {
|
|
8
8
|
editor: Editor | null;
|
|
9
9
|
onError?: (errorString: string) => void;
|
|
10
10
|
zoomLevel: string;
|
|
@@ -27,6 +27,7 @@ declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavb
|
|
|
27
27
|
isConnected?: boolean;
|
|
28
28
|
tabs: Tab[];
|
|
29
29
|
ydoc: Y.Doc;
|
|
30
|
+
toggleFocusMode?: () => void;
|
|
30
31
|
onRegisterExportTrigger?: ((trigger: ((format?: string, name?: string) => void) | null) => void) | undefined;
|
|
31
32
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
32
33
|
export default TiptapToolBar;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { DdocProps } from '../types';
|
|
3
|
+
|
|
4
|
+
type FullScreenToolbarProps = {
|
|
5
|
+
dropdownOpen: boolean;
|
|
6
|
+
setDropdownOpen: Dispatch<SetStateAction<boolean>>;
|
|
7
|
+
zoomLevel: DdocProps['zoomLevel'];
|
|
8
|
+
setZoomLevel: DdocProps['setZoomLevel'];
|
|
9
|
+
showTOC: DdocProps['showTOC'];
|
|
10
|
+
setShowTOC: DdocProps['setShowTOC'];
|
|
11
|
+
toggleFocusMode: () => Promise<void>;
|
|
12
|
+
};
|
|
13
|
+
export declare const FullScreenToolbar: ({ dropdownOpen, setDropdownOpen, zoomLevel, setZoomLevel, showTOC, setShowTOC, toggleFocusMode, }: FullScreenToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -40,16 +40,16 @@ export declare const CANVAS_DIMENSIONS: {
|
|
|
40
40
|
readonly minHeight: "100%";
|
|
41
41
|
};
|
|
42
42
|
readonly '1.4': {
|
|
43
|
-
readonly width:
|
|
44
|
-
readonly minHeight: "
|
|
43
|
+
readonly width: 1190;
|
|
44
|
+
readonly minHeight: "140%";
|
|
45
45
|
};
|
|
46
46
|
readonly '1.5': {
|
|
47
|
-
readonly width:
|
|
48
|
-
readonly minHeight: "
|
|
47
|
+
readonly width: 1275;
|
|
48
|
+
readonly minHeight: "150%";
|
|
49
49
|
};
|
|
50
50
|
readonly '2': {
|
|
51
|
-
readonly width:
|
|
52
|
-
readonly minHeight:
|
|
51
|
+
readonly width: 1700;
|
|
52
|
+
readonly minHeight: "200%";
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
readonly landscape: {
|
|
@@ -66,16 +66,16 @@ export declare const CANVAS_DIMENSIONS: {
|
|
|
66
66
|
readonly minHeight: "100%";
|
|
67
67
|
};
|
|
68
68
|
readonly '1.4': {
|
|
69
|
-
readonly width:
|
|
70
|
-
readonly minHeight: "
|
|
69
|
+
readonly width: 1666;
|
|
70
|
+
readonly minHeight: "140%";
|
|
71
71
|
};
|
|
72
72
|
readonly '1.5': {
|
|
73
|
-
readonly width:
|
|
74
|
-
readonly minHeight: "
|
|
73
|
+
readonly width: 1785;
|
|
74
|
+
readonly minHeight: "150%";
|
|
75
75
|
};
|
|
76
76
|
readonly '2': {
|
|
77
|
-
readonly width:
|
|
78
|
-
readonly minHeight:
|
|
77
|
+
readonly width: 2380;
|
|
78
|
+
readonly minHeight: "200%";
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
};
|
|
@@ -4,6 +4,7 @@ import { DocumentStyling } from '../types';
|
|
|
4
4
|
interface EditorContextType {
|
|
5
5
|
documentStyling?: DocumentStyling;
|
|
6
6
|
theme: 'light' | 'dark';
|
|
7
|
+
isFocusMode: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const EditorContext: React.Context<EditorContextType | null>;
|
|
9
10
|
export declare const useEditorContext: () => EditorContextType;
|
|
@@ -11,5 +12,6 @@ export declare const EditorProvider: React.FC<{
|
|
|
11
12
|
children: ReactNode;
|
|
12
13
|
documentStyling?: DocumentStyling;
|
|
13
14
|
theme?: 'light' | 'dark';
|
|
15
|
+
isFocusMode?: boolean;
|
|
14
16
|
}>;
|
|
15
17
|
export {};
|
package/dist/package/types.d.ts
CHANGED
|
@@ -158,6 +158,7 @@ export interface DdocProps extends CommentAccountProps {
|
|
|
158
158
|
setIsPresentationMode?: React.Dispatch<SetStateAction<boolean>>;
|
|
159
159
|
onComment?: () => void;
|
|
160
160
|
onInlineComment?: () => void;
|
|
161
|
+
onFocusMode?: (isFocusMode: boolean) => void;
|
|
161
162
|
onMarkdownExport?: () => void;
|
|
162
163
|
onMarkdownImport?: () => void;
|
|
163
164
|
onPdfExport?: () => void;
|