@fileverse-dev/ddoc 3.0.81 → 3.0.82-focus-mode-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.
@@ -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: "70%";
44
- readonly minHeight: "200%";
43
+ readonly width: 1190;
44
+ readonly minHeight: "140%";
45
45
  };
46
46
  readonly '1.5': {
47
- readonly width: 1062.5;
48
- readonly minHeight: "100%";
47
+ readonly width: 1275;
48
+ readonly minHeight: "150%";
49
49
  };
50
50
  readonly '2': {
51
- readonly width: 1548;
52
- readonly minHeight: undefined;
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: "90%";
70
- readonly minHeight: "200%";
69
+ readonly width: 1666;
70
+ readonly minHeight: "140%";
71
71
  };
72
72
  readonly '1.5': {
73
- readonly width: 1487.5;
74
- readonly minHeight: "100%";
73
+ readonly width: 1785;
74
+ readonly minHeight: "150%";
75
75
  };
76
76
  readonly '2': {
77
- readonly width: 2166;
78
- readonly minHeight: undefined;
77
+ readonly width: 2380;
78
+ readonly minHeight: "200%";
79
79
  };
80
80
  };
81
81
  };
@@ -0,0 +1,4 @@
1
+ export declare const zoomLevels: {
2
+ title: string;
3
+ value: string;
4
+ }[];
@@ -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 {};
@@ -0,0 +1,8 @@
1
+ type UseFocusModeOptions = {
2
+ onFocusMode?: (isFocusMode: boolean) => void;
3
+ };
4
+ export declare const useFocusMode: ({ onFocusMode }?: UseFocusModeOptions) => {
5
+ isFocusMode: boolean;
6
+ toggleFocusMode: () => Promise<void>;
7
+ };
8
+ export {};
@@ -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;
@@ -0,0 +1,5 @@
1
+ export declare const getEditorScrollContainer: ({ targetElement, editorRoot, }: {
2
+ targetElement: HTMLElement;
3
+ editorRoot?: HTMLElement | null;
4
+ }) => HTMLElement | null;
5
+ export default getEditorScrollContainer;