@fileverse-dev/ddoc 3.1.5 → 3.1.6-patch-001
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 +38295 -37789
- package/dist/package/components/editor-toolbar.d.ts +1 -2
- package/dist/package/components/editor-utils.d.ts +1 -2
- package/dist/package/components/inline-comment/comment-card.d.ts +1 -1
- package/dist/package/components/inline-comment/comment-drawer.d.ts +1 -1
- package/dist/package/components/inline-comment/comment-dropdown.d.ts +1 -1
- package/dist/package/components/inline-comment/comment-floating-container.d.ts +1 -0
- package/dist/package/components/inline-comment/comment-floating-layout.d.ts +31 -0
- package/dist/package/components/inline-comment/comment-input-field.d.ts +3 -0
- package/dist/package/components/inline-comment/comment-reply-input.d.ts +7 -0
- package/dist/package/components/inline-comment/comment-section.d.ts +1 -1
- package/dist/package/components/inline-comment/comment-username.d.ts +1 -1
- package/dist/package/components/inline-comment/constants.d.ts +1 -0
- package/dist/package/components/inline-comment/context/types.d.ts +46 -89
- package/dist/package/components/inline-comment/delete-confirm-overlay.d.ts +10 -0
- package/dist/package/components/inline-comment/empty-comments.d.ts +4 -1
- package/dist/package/components/inline-comment/floating-comment/comment-floating-container.d.ts +3 -0
- package/dist/package/components/inline-comment/floating-comment/draft-floating-card.d.ts +3 -0
- package/dist/package/components/inline-comment/floating-comment/floating-auth-prompt.d.ts +1 -0
- package/dist/package/components/inline-comment/floating-comment/floating-card-shell.d.ts +3 -0
- package/dist/package/components/inline-comment/floating-comment/index.d.ts +1 -0
- package/dist/package/components/inline-comment/floating-comment/thread-floating-card.d.ts +3 -0
- package/dist/package/components/inline-comment/floating-comment/types.d.ts +32 -0
- package/dist/package/components/inline-comment/floating-comment-layout-utils.d.ts +78 -0
- package/dist/package/components/inline-comment/resize-inline-comment-textarea.d.ts +1 -0
- package/dist/package/components/inline-comment/types.d.ts +22 -0
- package/dist/package/components/inline-comment/use-anchor-registry.d.ts +34 -0
- package/dist/package/components/inline-comment/use-comment-card.d.ts +29 -0
- package/dist/package/components/inline-comment/use-comment-list-container.d.ts +17 -0
- package/dist/package/components/inline-comment/use-ens-status.d.ts +3 -0
- package/dist/package/components/inline-comment/use-floating-card-state.d.ts +36 -0
- package/dist/package/components/inline-comment/use-floating-comment-card-layout.d.ts +23 -0
- package/dist/package/components/inline-comment/use-floating-comment-card-state.d.ts +13 -0
- package/dist/package/components/inline-comment/use-floating-layout-engine.d.ts +26 -0
- 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/components/preview-export-trigger.d.ts +1 -2
- package/dist/package/components/tabs/document-tabs-sidebar.d.ts +2 -1
- package/dist/package/context/editor-context.d.ts +3 -3
- package/dist/package/extensions/comment/comment-decoration-plugin.d.ts +67 -0
- package/dist/package/extensions/comment/comment.d.ts +27 -0
- package/dist/package/extensions/default-extension.d.ts +1 -1
- package/dist/package/hooks/use-ddoc-export.d.ts +1 -1
- package/dist/package/hooks/use-export-headless-editor-content.d.ts +1 -1
- package/dist/package/hooks/use-tab-editor.d.ts +5 -3
- package/dist/package/hooks/use-tab-manager.d.ts +1 -2
- package/dist/package/stores/comment-store-provider.d.ts +50 -0
- package/dist/package/stores/comment-store.d.ts +185 -0
- package/dist/package/sync-local/SyncManager.d.ts +0 -12
- package/dist/package/sync-local/types/index.d.ts +0 -4
- package/dist/package/types.d.ts +17 -7
- package/dist/package/use-ddoc-editor.d.ts +1 -0
- package/dist/package/utils/colors.d.ts +1 -3
- package/dist/package/utils/document-styling.d.ts +3 -3
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/package/components/inline-comment/context/comment-context.d.ts +0 -4
- package/dist/package/extensions/custom-link/index.d.ts +0 -19
- package/dist/package/extensions/odt-export/index.d.ts +0 -30
- package/dist/package/utils/heading-link.d.ts +0 -23
package/dist/package/types.d.ts
CHANGED
|
@@ -19,10 +19,21 @@ export type InlineCommentData = {
|
|
|
19
19
|
highlightedTextContent: string;
|
|
20
20
|
handleClick: boolean;
|
|
21
21
|
};
|
|
22
|
-
export type CommentMutationType = 'create' | 'resolve' | 'unresolve' | 'delete';
|
|
22
|
+
export type CommentMutationType = 'create' | 'edit' | 'resolve' | 'unresolve' | 'delete';
|
|
23
23
|
export interface CommentMutationMeta {
|
|
24
24
|
type: CommentMutationType;
|
|
25
|
-
updateChunk
|
|
25
|
+
updateChunk?: string;
|
|
26
|
+
anchorFrom?: string;
|
|
27
|
+
anchorTo?: string;
|
|
28
|
+
selectedContent?: string;
|
|
29
|
+
content?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface SerializedCommentAnchor {
|
|
32
|
+
id: string;
|
|
33
|
+
anchorFrom: string;
|
|
34
|
+
anchorTo: string;
|
|
35
|
+
resolved: boolean;
|
|
36
|
+
deleted: boolean;
|
|
26
37
|
}
|
|
27
38
|
export interface CommentAccountProps {
|
|
28
39
|
isConnected?: boolean;
|
|
@@ -40,12 +51,9 @@ export interface CustomModel {
|
|
|
40
51
|
apiKey: string;
|
|
41
52
|
systemPrompt: string;
|
|
42
53
|
}
|
|
43
|
-
export type ThemeKey = 'light' | 'dark' | 'theme-sepia' | 'theme-pink';
|
|
44
54
|
export interface ThemeVariantValue {
|
|
45
55
|
light: string;
|
|
46
56
|
dark: string;
|
|
47
|
-
sepia?: string;
|
|
48
|
-
[key: string]: string | undefined;
|
|
49
57
|
}
|
|
50
58
|
export type DocumentStylingValue = string | ThemeVariantValue;
|
|
51
59
|
/**
|
|
@@ -107,9 +115,12 @@ export interface DdocProps extends CommentAccountProps {
|
|
|
107
115
|
commentDrawerOpen?: boolean;
|
|
108
116
|
setCommentDrawerOpen?: React.Dispatch<SetStateAction<boolean>>;
|
|
109
117
|
initialComments?: IComment[];
|
|
118
|
+
initialCommentAnchors?: SerializedCommentAnchor[];
|
|
110
119
|
setInitialComments?: React.Dispatch<SetStateAction<IComment[]>>;
|
|
111
120
|
onCommentReply?: (activeCommentId: string, reply: IComment) => void;
|
|
112
121
|
onNewComment?: (newComment: IComment, meta?: CommentMutationMeta) => void;
|
|
122
|
+
onEditComment?: (activeCommentId: string, meta?: CommentMutationMeta) => void;
|
|
123
|
+
onEditReply?: (activeCommentId: string, replyId: string, meta?: CommentMutationMeta) => void;
|
|
113
124
|
onResolveComment?: (activeCommentId: string, meta?: CommentMutationMeta) => void;
|
|
114
125
|
onUnresolveComment?: (activeCommentId: string, meta?: CommentMutationMeta) => void;
|
|
115
126
|
onDeleteComment?: (activeCommentId: string, meta?: CommentMutationMeta) => void;
|
|
@@ -122,7 +133,7 @@ export interface DdocProps extends CommentAccountProps {
|
|
|
122
133
|
setIsCommentSectionOpen?: React.Dispatch<SetStateAction<boolean>>;
|
|
123
134
|
inlineCommentData?: InlineCommentData;
|
|
124
135
|
setInlineCommentData?: React.Dispatch<React.SetStateAction<InlineCommentData>>;
|
|
125
|
-
theme?:
|
|
136
|
+
theme?: 'dark' | 'light';
|
|
126
137
|
zoomLevel: string;
|
|
127
138
|
setZoomLevel: React.Dispatch<SetStateAction<string>>;
|
|
128
139
|
isNavbarVisible: boolean;
|
|
@@ -168,7 +179,6 @@ export interface DdocProps extends CommentAccountProps {
|
|
|
168
179
|
onPdfExport?: () => void;
|
|
169
180
|
onHtmlExport?: () => void;
|
|
170
181
|
onTxtExport?: () => void;
|
|
171
|
-
onOdtExport?: () => void;
|
|
172
182
|
onDocxImport?: () => void;
|
|
173
183
|
sharedSlidesLink?: string;
|
|
174
184
|
documentName?: string;
|
|
@@ -38,4 +38,5 @@ export declare const useDdocEditor: ({ isPreviewMode, initialContent, versionHis
|
|
|
38
38
|
activeCommentId: string | null;
|
|
39
39
|
setActiveCommentId: import('react').Dispatch<import('react').SetStateAction<string | null>>;
|
|
40
40
|
focusCommentWithActiveId: (id: string) => void;
|
|
41
|
+
commentAnchorsRef: import('react').MutableRefObject<import('./extensions/comment/comment-decoration-plugin').CommentAnchor[]>;
|
|
41
42
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { ThemeKey } from '../types';
|
|
2
|
-
|
|
3
1
|
export declare const colors: {
|
|
4
2
|
color: string;
|
|
5
3
|
code: string;
|
|
@@ -9,4 +7,4 @@ export declare const textColors: {
|
|
|
9
7
|
light: string;
|
|
10
8
|
dark: string;
|
|
11
9
|
}[];
|
|
12
|
-
export declare const getResponsiveColor: (color?: string, theme?:
|
|
10
|
+
export declare const getResponsiveColor: (color?: string, theme?: "light" | "dark") => string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentStylingValue,
|
|
1
|
+
import { DocumentStylingValue, 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?: "light" | "dark") => string | undefined;
|
|
5
|
+
export declare const getResponsiveThemeTextColor: (value?: DocumentStylingValue, theme?: "light" | "dark") => string | undefined;
|