@fileverse-dev/ddoc 3.4.6-mp-fixes-17 → 3.4.6-mp-fixes-20
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 +22767 -22694
- package/dist/package/extensions/d-block/dblock-collapse.d.ts +7 -2
- package/dist/package/hooks/use-tab-editor-cache.d.ts +24 -0
- package/dist/package/hooks/use-tab-editor.d.ts +1 -6
- package/dist/package/use-ddoc-editor.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/package/extensions/d-block/use-heading-collapse.d.ts +0 -17
|
@@ -19,6 +19,10 @@ export interface DBlockRenderMeta {
|
|
|
19
19
|
headingAlignment?: string;
|
|
20
20
|
isTable: boolean;
|
|
21
21
|
}
|
|
22
|
+
interface DBlockCollapsePluginState {
|
|
23
|
+
decorations: DecorationSet;
|
|
24
|
+
structureSignature: string;
|
|
25
|
+
}
|
|
22
26
|
export declare const getDBlockRenderMeta: (node: ProseMirrorNode, pos: number) => DBlockRenderMeta;
|
|
23
27
|
export declare const getHeadingAlignmentClass: (alignment?: string) => "justify-center" | "justify-end" | "justify-start";
|
|
24
28
|
export declare const getHeadingLinkSlug: (node: ProseMirrorNode, pos: number) => string | null;
|
|
@@ -28,5 +32,6 @@ export declare const findEndOfCollapsedContent: (doc: ProseMirrorNode, headingPo
|
|
|
28
32
|
export declare const buildToggleHeadingCollapseTransaction: (state: EditorState, position: number) => Transaction | null;
|
|
29
33
|
export declare const toggleHeadingCollapse: (editor: Editor, position: number) => boolean;
|
|
30
34
|
export declare const expandHeadingContent: (editor: Editor, nodePos: number) => boolean;
|
|
31
|
-
export declare const dBlockCollapsePluginKey: PluginKey<
|
|
32
|
-
export declare const createDBlockCollapsePlugin: () => Plugin<
|
|
35
|
+
export declare const dBlockCollapsePluginKey: PluginKey<DBlockCollapsePluginState>;
|
|
36
|
+
export declare const createDBlockCollapsePlugin: () => Plugin<DBlockCollapsePluginState>;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { Editor } from '@tiptap/react';
|
|
3
|
+
|
|
4
|
+
export interface CachedTabEditorRenderEntry {
|
|
5
|
+
tabId: string;
|
|
6
|
+
editor: Editor;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface UseTabEditorCacheArgs {
|
|
10
|
+
activeTabId: string;
|
|
11
|
+
tabIds?: string[];
|
|
12
|
+
activeTabIdRef: MutableRefObject<string>;
|
|
13
|
+
activeEditorRef: MutableRefObject<Editor | null>;
|
|
14
|
+
editorRef?: MutableRefObject<Editor | null>;
|
|
15
|
+
readyState: boolean;
|
|
16
|
+
createEditorForTab: (tabId: string) => Editor;
|
|
17
|
+
destroyEditor: (editor: Editor) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const useTabEditorCache: ({ activeTabId, tabIds, activeTabIdRef, activeEditorRef, editorRef, readyState, createEditorForTab, destroyEditor, }: UseTabEditorCacheArgs) => {
|
|
20
|
+
editor: Editor | null;
|
|
21
|
+
cachedEditorEntries: CachedTabEditorRenderEntry[];
|
|
22
|
+
destroyAllCachedEditors: () => void;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -7,11 +7,6 @@ import { ToCItemType } from '../components/toc/types';
|
|
|
7
7
|
import { CollabConnectionConfig, CollaborationProps } from '../sync-local/types';
|
|
8
8
|
|
|
9
9
|
import * as Y from 'yjs';
|
|
10
|
-
export interface CachedTabEditorRenderEntry {
|
|
11
|
-
tabId: string;
|
|
12
|
-
editor: Editor;
|
|
13
|
-
isActive: boolean;
|
|
14
|
-
}
|
|
15
10
|
interface UseTabEditorArgs {
|
|
16
11
|
ydoc: Y.Doc;
|
|
17
12
|
isVersionMode?: boolean;
|
|
@@ -62,7 +57,7 @@ interface UseTabEditorArgs {
|
|
|
62
57
|
}
|
|
63
58
|
export declare const useTabEditor: ({ ydoc, isVersionMode, hasTabState, versionId, isPreviewMode, viewerMode, initialContent, collaboration, isReady, isSyncing, awareness, disableInlineComment, isFocusMode, onCommentInteraction, onError, ipfsImageUploadFn, metadataProxyUrl, onCopyHeadingLink, ipfsImageFetchFn, fetchV1ImageFn, isConnected, activeModel, maxTokens, isAIAgentEnabled, setCharacterCount, setWordCount, setPageCount, setIsContentLoading, setIsCollabContentLoading, unFocused, zoomLevel, isPresentationMode, onInvalidContentError, ignoreCorruptedData, onCollaboratorChange, onConnect, hasCollabContentInitialised, initialiseYjsIndexedDbProvider, externalExtensions, isContentLoading, activeTabId, tabIds, theme, editorRef, initialCommentAnchors, dBlockRuntimeStateRef, }: UseTabEditorArgs) => {
|
|
64
59
|
editor: Editor | null;
|
|
65
|
-
cachedEditorEntries: CachedTabEditorRenderEntry[];
|
|
60
|
+
cachedEditorEntries: import('./use-tab-editor-cache').CachedTabEditorRenderEntry[];
|
|
66
61
|
ref: import('react').RefObject<HTMLDivElement>;
|
|
67
62
|
slides: string[];
|
|
68
63
|
setSlides: Dispatch<SetStateAction<string[]>>;
|
|
@@ -36,7 +36,7 @@ export declare const useDdocEditor: ({ isPreviewMode, viewerMode, initialContent
|
|
|
36
36
|
flushPendingUpdate: () => void;
|
|
37
37
|
collabState: import('./types').CollabState;
|
|
38
38
|
editor: Editor | null;
|
|
39
|
-
cachedEditorEntries: import('./hooks/use-tab-editor').CachedTabEditorRenderEntry[];
|
|
39
|
+
cachedEditorEntries: import('./hooks/use-tab-editor-cache').CachedTabEditorRenderEntry[];
|
|
40
40
|
ref: import('react').RefObject<HTMLDivElement>;
|
|
41
41
|
slides: string[];
|
|
42
42
|
setSlides: import('react').Dispatch<import('react').SetStateAction<string[]>>;
|