@fileverse-dev/ddoc 3.1.1 → 3.1.3-patch.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.
- package/dist/index.es.js +4958 -4947
- package/dist/package/components/presentation-mode/presentation-mode.d.ts +2 -2
- package/dist/package/components/presentation-mode/preview-panel.d.ts +2 -2
- package/dist/package/context/editor-context.d.ts +3 -3
- package/dist/package/hooks/use-tab-editor.d.ts +2 -2
- package/dist/package/hooks/use-tab-manager.d.ts +2 -1
- package/dist/package/types.d.ts +4 -1
- package/dist/package/utils/colors.d.ts +3 -1
- package/dist/package/utils/document-styling.d.ts +3 -3
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
|
2
|
-
import { IpfsImageFetchPayload, DdocProps } from '../../types';
|
|
2
|
+
import { IpfsImageFetchPayload, DdocProps, ThemeKey } from '../../types';
|
|
3
3
|
|
|
4
4
|
interface PresentationModeProps {
|
|
5
5
|
editor: Editor;
|
|
@@ -22,7 +22,7 @@ interface PresentationModeProps {
|
|
|
22
22
|
}>;
|
|
23
23
|
documentStyling?: DdocProps['documentStyling'];
|
|
24
24
|
fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
|
|
25
|
-
theme?:
|
|
25
|
+
theme?: ThemeKey;
|
|
26
26
|
}
|
|
27
27
|
export declare const PresentationMode: ({ editor, onClose, isFullscreen, setIsFullscreen, onError, setCommentDrawerOpen, sharedSlidesLink, isPreviewMode, documentName, onSlidesShare, slides, setSlides, renderThemeToggle, isContentLoading, ipfsImageFetchFn, documentStyling, fetchV1ImageFn, theme, }: PresentationModeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
28
28
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DdocProps } from '../../types';
|
|
1
|
+
import { DdocProps, ThemeKey } from '../../types';
|
|
2
2
|
|
|
3
3
|
interface PreviewPanelProps {
|
|
4
4
|
slides: string[];
|
|
5
5
|
currentSlide: number;
|
|
6
6
|
setCurrentSlide: (index: number) => void;
|
|
7
7
|
documentStyling?: DdocProps['documentStyling'];
|
|
8
|
-
theme?:
|
|
8
|
+
theme?: ThemeKey;
|
|
9
9
|
}
|
|
10
10
|
export declare const PreviewPanel: ({ slides, currentSlide, setCurrentSlide, documentStyling, theme, }: PreviewPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import { DocumentStyling } from '../types';
|
|
2
|
+
import { DocumentStyling, ThemeKey } from '../types';
|
|
3
3
|
|
|
4
4
|
interface EditorContextType {
|
|
5
5
|
documentStyling?: DocumentStyling;
|
|
6
|
-
theme:
|
|
6
|
+
theme: ThemeKey;
|
|
7
7
|
isFocusMode: boolean;
|
|
8
8
|
}
|
|
9
9
|
export declare const EditorContext: React.Context<EditorContextType | null>;
|
|
@@ -11,7 +11,7 @@ export declare const useEditorContext: () => EditorContextType;
|
|
|
11
11
|
export declare const EditorProvider: React.FC<{
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
documentStyling?: DocumentStyling;
|
|
14
|
-
theme?:
|
|
14
|
+
theme?: ThemeKey;
|
|
15
15
|
isFocusMode?: boolean;
|
|
16
16
|
}>;
|
|
17
17
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
|
2
|
-
import { DdocProps } from '../types';
|
|
2
|
+
import { DdocProps, ThemeKey } from '../types';
|
|
3
3
|
import { AnyExtension, Editor } from '@tiptap/react';
|
|
4
4
|
import { ToCItemType } from '../components/toc/types';
|
|
5
5
|
import { CollabConnectionConfig, CollaborationProps } from '../sync-local/types';
|
|
@@ -45,7 +45,7 @@ interface UseTabEditorArgs {
|
|
|
45
45
|
externalExtensions?: Record<string, AnyExtension>;
|
|
46
46
|
isContentLoading?: boolean;
|
|
47
47
|
activeTabId: string;
|
|
48
|
-
theme?:
|
|
48
|
+
theme?: ThemeKey;
|
|
49
49
|
editorRef?: MutableRefObject<Editor | null>;
|
|
50
50
|
}
|
|
51
51
|
export declare const useTabEditor: ({ ydoc, isVersionMode, hasTabState, versionId, isPreviewMode, initialContent, collaboration, isReady, isSyncing, awareness, disableInlineComment, 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, theme, editorRef, }: UseTabEditorArgs) => {
|
|
@@ -10,12 +10,13 @@ interface UseTabManagerArgs {
|
|
|
10
10
|
createDefaultTabIfMissing: boolean;
|
|
11
11
|
shouldSyncActiveTab: boolean;
|
|
12
12
|
defaultTabId?: string;
|
|
13
|
+
preferFirstTabOnInit?: boolean;
|
|
13
14
|
onVersionHistoryActiveTabChange?: (tabId: string | null) => void;
|
|
14
15
|
getEditor?: () => Editor | null;
|
|
15
16
|
flushPendingUpdate?: () => void;
|
|
16
17
|
}
|
|
17
18
|
export declare const getNewTabId: () => string;
|
|
18
|
-
export declare const useTabManager: ({ ydoc, initialContent, enableCollaboration, isDDocOwner, createDefaultTabIfMissing, shouldSyncActiveTab, defaultTabId, onVersionHistoryActiveTabChange, flushPendingUpdate, getEditor, }: UseTabManagerArgs) => {
|
|
19
|
+
export declare const useTabManager: ({ ydoc, initialContent, enableCollaboration, isDDocOwner, createDefaultTabIfMissing, shouldSyncActiveTab, defaultTabId, preferFirstTabOnInit, onVersionHistoryActiveTabChange, flushPendingUpdate, getEditor, }: UseTabManagerArgs) => {
|
|
19
20
|
tabs: Tab[];
|
|
20
21
|
hasTabState: boolean;
|
|
21
22
|
activeTabId: string;
|
package/dist/package/types.d.ts
CHANGED
|
@@ -40,9 +40,12 @@ export interface CustomModel {
|
|
|
40
40
|
apiKey: string;
|
|
41
41
|
systemPrompt: string;
|
|
42
42
|
}
|
|
43
|
+
export type ThemeKey = 'light' | 'dark' | 'theme-sepia' | 'theme-pink';
|
|
43
44
|
export interface ThemeVariantValue {
|
|
44
45
|
light: string;
|
|
45
46
|
dark: string;
|
|
47
|
+
sepia?: string;
|
|
48
|
+
[key: string]: string | undefined;
|
|
46
49
|
}
|
|
47
50
|
export type DocumentStylingValue = string | ThemeVariantValue;
|
|
48
51
|
/**
|
|
@@ -119,7 +122,7 @@ export interface DdocProps extends CommentAccountProps {
|
|
|
119
122
|
setIsCommentSectionOpen?: React.Dispatch<SetStateAction<boolean>>;
|
|
120
123
|
inlineCommentData?: InlineCommentData;
|
|
121
124
|
setInlineCommentData?: React.Dispatch<React.SetStateAction<InlineCommentData>>;
|
|
122
|
-
theme?:
|
|
125
|
+
theme?: ThemeKey;
|
|
123
126
|
zoomLevel: string;
|
|
124
127
|
setZoomLevel: React.Dispatch<SetStateAction<string>>;
|
|
125
128
|
isNavbarVisible: boolean;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ThemeKey } from '../types';
|
|
2
|
+
|
|
1
3
|
export declare const colors: {
|
|
2
4
|
color: string;
|
|
3
5
|
code: string;
|
|
@@ -7,4 +9,4 @@ export declare const textColors: {
|
|
|
7
9
|
light: string;
|
|
8
10
|
dark: string;
|
|
9
11
|
}[];
|
|
10
|
-
export declare const getResponsiveColor: (color?: string, theme?:
|
|
12
|
+
export declare const getResponsiveColor: (color?: string, theme?: ThemeKey) => string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentStylingValue, ThemeVariantValue } from '../types';
|
|
1
|
+
import { DocumentStylingValue, ThemeKey, ThemeVariantValue } from '../types';
|
|
2
2
|
|
|
3
3
|
export declare const isThemeVariantValue: (value: DocumentStylingValue | undefined) => value is ThemeVariantValue;
|
|
4
|
-
export declare const getThemeStyle: (value?: DocumentStylingValue, theme?:
|
|
5
|
-
export declare const getResponsiveThemeTextColor: (value?: DocumentStylingValue, theme?:
|
|
4
|
+
export declare const getThemeStyle: (value?: DocumentStylingValue, theme?: ThemeKey) => string | undefined;
|
|
5
|
+
export declare const getResponsiveThemeTextColor: (value?: DocumentStylingValue, theme?: ThemeKey) => string | undefined;
|