@fileverse-dev/ddoc 3.0.55-patch-1 → 3.0.55-patch-2
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 +12082 -11990
- package/dist/package/components/editor-toolbar.d.ts +1 -1
- package/dist/package/components/editor-utils.d.ts +1 -1
- package/dist/package/components/import-export-button.d.ts +1 -1
- package/dist/package/components/preview-export-trigger.d.ts +24 -0
- package/dist/package/components/tabs/document-mobile-tab-panel.d.ts +2 -1
- package/dist/package/components/tabs/document-tabs-sidebar.d.ts +4 -2
- package/dist/package/components/tabs/tab-item.d.ts +4 -1
- package/dist/package/components/toc/document-outline.d.ts +1 -1
- package/dist/package/components/toc/types.d.ts +1 -0
- package/dist/package/hooks/use-ddoc-export.d.ts +2 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -27,6 +27,6 @@ declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavb
|
|
|
27
27
|
isConnected?: boolean;
|
|
28
28
|
tabs: Tab[];
|
|
29
29
|
ydoc: Y.Doc;
|
|
30
|
-
onRegisterExportTrigger?: ((trigger: ((format?: string) => void) | null) => void) | undefined;
|
|
30
|
+
onRegisterExportTrigger?: ((trigger: ((format?: string, name?: string) => void) | null) => void) | undefined;
|
|
31
31
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
export default TiptapToolBar;
|
|
@@ -12,6 +12,6 @@ declare const ImportExportButton: ({ fileExportsOpen, setFileExportsOpen, export
|
|
|
12
12
|
editor: Editor | null;
|
|
13
13
|
tabs: Tab[];
|
|
14
14
|
ydoc: Y.Doc;
|
|
15
|
-
onRegisterExportTrigger?: ((trigger: ((format?: string) => void) | null) => void) | undefined;
|
|
15
|
+
onRegisterExportTrigger?: ((trigger: ((format?: string, name?: string) => void) | null) => void) | undefined;
|
|
16
16
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export { ImportExportButton };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/react';
|
|
2
|
+
import { Tab } from './tabs/utils/tab-utils';
|
|
3
|
+
import { DdocProps } from '../types';
|
|
4
|
+
|
|
5
|
+
import * as Y from 'yjs';
|
|
6
|
+
interface PreviewModeExportTriggerProps {
|
|
7
|
+
editor: Editor | null;
|
|
8
|
+
ydoc: Y.Doc;
|
|
9
|
+
tabs: Tab[];
|
|
10
|
+
onRegisterExportTrigger?: (trigger: ((format?: string, name?: string) => void) | null) => void;
|
|
11
|
+
onError?: (errorString: string) => void;
|
|
12
|
+
ipfsImageUploadFn?: DdocProps['ipfsImageUploadFn'];
|
|
13
|
+
onMarkdownExport?: DdocProps['onMarkdownExport'];
|
|
14
|
+
onMarkdownImport?: DdocProps['onMarkdownImport'];
|
|
15
|
+
onPdfExport?: DdocProps['onPdfExport'];
|
|
16
|
+
onHtmlExport?: DdocProps['onHtmlExport'];
|
|
17
|
+
onTxtExport?: DdocProps['onTxtExport'];
|
|
18
|
+
ipfsImageFetchFn?: DdocProps['ipfsImageFetchFn'];
|
|
19
|
+
onDocxImport?: DdocProps['onDocxImport'];
|
|
20
|
+
fetchV1ImageFn?: DdocProps['fetchV1ImageFn'];
|
|
21
|
+
isConnected?: DdocProps['isConnected'];
|
|
22
|
+
}
|
|
23
|
+
declare const PreviewModeExportTrigger: ({ editor, ydoc, tabs, onRegisterExportTrigger, onError, ipfsImageUploadFn, onMarkdownExport, onMarkdownImport, onPdfExport, onHtmlExport, onTxtExport, ipfsImageFetchFn, onDocxImport, fetchV1ImageFn, isConnected, }: PreviewModeExportTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export { PreviewModeExportTrigger };
|
|
@@ -22,5 +22,6 @@ export interface DocumentMobileTabPanelProps {
|
|
|
22
22
|
isPreviewMode: boolean;
|
|
23
23
|
tabConfig?: DocumentOutlineProps['tabConfig'];
|
|
24
24
|
isVersionHistoryMode: boolean;
|
|
25
|
+
isConnected?: boolean;
|
|
25
26
|
}
|
|
26
|
-
export declare const DocumentMobileTabPanel: ({ tabs, activeTabId, setActiveTabId, editor, items, setItems, orientation, renameTab, createTab, duplicateTab, deleteTab, tabCommentCounts, isPreviewMode, tabConfig, isVersionHistoryMode, }: DocumentMobileTabPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const DocumentMobileTabPanel: ({ tabs, activeTabId, setActiveTabId, editor, items, setItems, orientation, renameTab, createTab, duplicateTab, deleteTab, tabCommentCounts, isPreviewMode, tabConfig, isVersionHistoryMode, isConnected, }: DocumentMobileTabPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -30,10 +30,11 @@ export interface DocumentTabsSidebarProps {
|
|
|
30
30
|
isVersionHistoryMode?: boolean;
|
|
31
31
|
tabConfig?: DocumentOutlineProps['tabConfig'];
|
|
32
32
|
deleteTab?: (tabId: string) => void;
|
|
33
|
+
isConnected?: boolean;
|
|
33
34
|
}
|
|
34
35
|
export declare const DocumentTabsSidebar: ({ tabSectionContainer, ...rest }: DocumentTabsSidebarProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
35
|
-
export declare const TabSidebar: ({ tabs, activeTabId, setActiveTabId, showTOC, setShowTOC, hasToC, isPreviewMode, editor, items, setItems, orientation, createTab, renameTab, duplicateTab, orderTab, tabCommentCounts, isVersionHistoryMode, tabConfig, deleteTab, }: DocumentTabsSidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
-
export declare const DdocTab: ({ tab, tabIndex, tabCount, handleEmojiChange, handleNameChange, onClick, editor, tocItem, setTocItems, orientation, activeTabId, duplicateTab, activeDragId, commentCount, moveTabUp, moveTabDown, isPreviewMode, isVersionHistoryMode, tabConfig, onDelete, showOutline, onShowOutlineChange, }: {
|
|
36
|
+
export declare const TabSidebar: ({ tabs, activeTabId, setActiveTabId, showTOC, setShowTOC, hasToC, isPreviewMode, editor, items, setItems, orientation, createTab, renameTab, duplicateTab, orderTab, tabCommentCounts, isVersionHistoryMode, tabConfig, deleteTab, isConnected, }: DocumentTabsSidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare const DdocTab: ({ tab, tabIndex, tabCount, handleEmojiChange, handleNameChange, onClick, editor, tocItem, setTocItems, orientation, activeTabId, duplicateTab, activeDragId, commentCount, moveTabUp, moveTabDown, isPreviewMode, isVersionHistoryMode, tabConfig, onDelete, showOutline, onShowOutlineChange, isConnected, }: {
|
|
37
38
|
tab: Tab;
|
|
38
39
|
tabIndex: number;
|
|
39
40
|
tabCount: number;
|
|
@@ -56,4 +57,5 @@ export declare const DdocTab: ({ tab, tabIndex, tabCount, handleEmojiChange, han
|
|
|
56
57
|
onDelete?: (tab: Tab) => void;
|
|
57
58
|
showOutline: boolean;
|
|
58
59
|
onShowOutlineChange: (value: boolean) => void;
|
|
60
|
+
isConnected?: boolean;
|
|
59
61
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,6 +23,7 @@ export interface TabItemProps {
|
|
|
23
23
|
isVersionHistoryMode?: boolean;
|
|
24
24
|
onCopyLink?: () => void;
|
|
25
25
|
onDelete?: () => void;
|
|
26
|
+
isConnected?: boolean;
|
|
26
27
|
}
|
|
27
28
|
interface SortableTabItemProps extends Omit<TabItemProps, 'dragHandleProps'> {
|
|
28
29
|
id: string;
|
|
@@ -36,6 +37,8 @@ interface TabContextMenuItem {
|
|
|
36
37
|
closeOnSelect?: boolean;
|
|
37
38
|
textClassName?: string;
|
|
38
39
|
iconStroke?: string;
|
|
40
|
+
tooltipText?: string;
|
|
41
|
+
disabled?: boolean;
|
|
39
42
|
}
|
|
40
43
|
interface TabContextMenuProps {
|
|
41
44
|
sections: TabContextMenuItem[][];
|
|
@@ -43,7 +46,7 @@ interface TabContextMenuProps {
|
|
|
43
46
|
popoverClassName?: string;
|
|
44
47
|
}
|
|
45
48
|
export declare const SortableTabItem: (props: SortableTabItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
-
export declare const TabItem: ({ tabId, name, emoji, commentCount, onNameChange, onEmojiChange, onClick, isActive, onDuplicate, dragHandleProps, hideContentMenu, showOutline, handleShowOutline, canMoveUp, canMoveDown, onMoveUp, onMoveDown, isPreviewMode, isVersionHistoryMode, onCopyLink, onDelete, }: TabItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare const TabItem: ({ tabId, name, emoji, commentCount, onNameChange, onEmojiChange, onClick, isActive, onDuplicate, dragHandleProps, hideContentMenu, showOutline, handleShowOutline, canMoveUp, canMoveDown, onMoveUp, onMoveDown, isPreviewMode, isVersionHistoryMode, onCopyLink, onDelete, isConnected, }: TabItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
50
|
export declare const TabDragPreview: ({ name, emoji, }: {
|
|
48
51
|
name: string;
|
|
49
52
|
emoji: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DocumentOutlineProps } from './types';
|
|
2
2
|
|
|
3
|
-
export declare const DocumentOutline: ({ editor, hasToC, items, setItems, showTOC, setShowTOC, isPreviewMode, orientation, tabs, setTabs, activeTabId, setActiveTabId, createTab, renameTab, duplicateTab, orderTab, ydoc, tabCommentCounts, tabSectionContainer, isVersionHistoryMode, tabConfig, deleteTab, }: DocumentOutlineProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const DocumentOutline: ({ editor, hasToC, items, setItems, showTOC, setShowTOC, isPreviewMode, orientation, tabs, setTabs, activeTabId, setActiveTabId, createTab, renameTab, duplicateTab, orderTab, ydoc, tabCommentCounts, tabSectionContainer, isVersionHistoryMode, tabConfig, deleteTab, isConnected, }: DocumentOutlineProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,9 +15,10 @@ declare const useDdocExport: ({ editor, tabs, ydoc, exportOptions, }: UseDdocExp
|
|
|
15
15
|
id: string;
|
|
16
16
|
label: string;
|
|
17
17
|
}[];
|
|
18
|
-
handleExport: ({ format, tab }: {
|
|
18
|
+
handleExport: ({ format, tab, name, }: {
|
|
19
19
|
format: string;
|
|
20
20
|
tab: string;
|
|
21
|
+
name?: string;
|
|
21
22
|
}) => void;
|
|
22
23
|
};
|
|
23
24
|
export { useDdocExport };
|