@fileverse-dev/ddoc 3.1.6-patch-001 → 3.1.6-patch-002
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 +35447 -35952
- package/dist/package/components/editor-toolbar.d.ts +2 -1
- package/dist/package/components/editor-utils.d.ts +2 -1
- 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-section.d.ts +1 -1
- package/dist/package/components/inline-comment/comment-username.d.ts +1 -1
- package/dist/package/components/inline-comment/context/comment-context.d.ts +4 -0
- package/dist/package/components/inline-comment/context/types.d.ts +89 -46
- package/dist/package/components/inline-comment/empty-comments.d.ts +1 -4
- package/dist/package/components/inline-comment/types.d.ts +0 -22
- 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 +2 -1
- package/dist/package/components/tabs/document-tabs-sidebar.d.ts +1 -2
- package/dist/package/context/editor-context.d.ts +3 -3
- package/dist/package/extensions/comment/comment.d.ts +0 -27
- package/dist/package/extensions/custom-link/index.d.ts +19 -0
- package/dist/package/extensions/default-extension.d.ts +1 -1
- package/dist/package/extensions/odt-export/index.d.ts +30 -0
- 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 +3 -5
- package/dist/package/hooks/use-tab-manager.d.ts +2 -1
- package/dist/package/sync-local/SyncManager.d.ts +12 -0
- package/dist/package/sync-local/types/index.d.ts +4 -0
- package/dist/package/types.d.ts +7 -17
- package/dist/package/use-ddoc-editor.d.ts +0 -1
- package/dist/package/utils/colors.d.ts +3 -1
- package/dist/package/utils/document-styling.d.ts +3 -3
- package/dist/package/utils/heading-link.d.ts +23 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/package/components/inline-comment/comment-floating-container.d.ts +0 -1
- package/dist/package/components/inline-comment/comment-floating-layout.d.ts +0 -31
- package/dist/package/components/inline-comment/comment-input-field.d.ts +0 -3
- package/dist/package/components/inline-comment/comment-reply-input.d.ts +0 -7
- package/dist/package/components/inline-comment/constants.d.ts +0 -1
- package/dist/package/components/inline-comment/delete-confirm-overlay.d.ts +0 -10
- package/dist/package/components/inline-comment/floating-comment/comment-floating-container.d.ts +0 -3
- package/dist/package/components/inline-comment/floating-comment/draft-floating-card.d.ts +0 -3
- package/dist/package/components/inline-comment/floating-comment/floating-auth-prompt.d.ts +0 -1
- package/dist/package/components/inline-comment/floating-comment/floating-card-shell.d.ts +0 -3
- package/dist/package/components/inline-comment/floating-comment/index.d.ts +0 -1
- package/dist/package/components/inline-comment/floating-comment/thread-floating-card.d.ts +0 -3
- package/dist/package/components/inline-comment/floating-comment/types.d.ts +0 -32
- package/dist/package/components/inline-comment/floating-comment-layout-utils.d.ts +0 -78
- package/dist/package/components/inline-comment/resize-inline-comment-textarea.d.ts +0 -1
- package/dist/package/components/inline-comment/use-anchor-registry.d.ts +0 -34
- package/dist/package/components/inline-comment/use-comment-card.d.ts +0 -29
- package/dist/package/components/inline-comment/use-comment-list-container.d.ts +0 -17
- package/dist/package/components/inline-comment/use-ens-status.d.ts +0 -3
- package/dist/package/components/inline-comment/use-floating-card-state.d.ts +0 -36
- package/dist/package/components/inline-comment/use-floating-comment-card-layout.d.ts +0 -23
- package/dist/package/components/inline-comment/use-floating-comment-card-state.d.ts +0 -13
- package/dist/package/components/inline-comment/use-floating-layout-engine.d.ts +0 -26
- package/dist/package/extensions/comment/comment-decoration-plugin.d.ts +0 -67
- package/dist/package/stores/comment-store-provider.d.ts +0 -50
- package/dist/package/stores/comment-store.d.ts +0 -185
package/dist/package/types.d.ts
CHANGED
|
@@ -19,21 +19,10 @@ export type InlineCommentData = {
|
|
|
19
19
|
highlightedTextContent: string;
|
|
20
20
|
handleClick: boolean;
|
|
21
21
|
};
|
|
22
|
-
export type CommentMutationType = 'create' | '
|
|
22
|
+
export type CommentMutationType = 'create' | 'resolve' | 'unresolve' | 'delete';
|
|
23
23
|
export interface CommentMutationMeta {
|
|
24
24
|
type: CommentMutationType;
|
|
25
|
-
updateChunk
|
|
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;
|
|
25
|
+
updateChunk: string;
|
|
37
26
|
}
|
|
38
27
|
export interface CommentAccountProps {
|
|
39
28
|
isConnected?: boolean;
|
|
@@ -51,9 +40,12 @@ export interface CustomModel {
|
|
|
51
40
|
apiKey: string;
|
|
52
41
|
systemPrompt: string;
|
|
53
42
|
}
|
|
43
|
+
export type ThemeKey = 'light' | 'dark' | 'theme-sepia' | 'theme-pink' | 'theme-green';
|
|
54
44
|
export interface ThemeVariantValue {
|
|
55
45
|
light: string;
|
|
56
46
|
dark: string;
|
|
47
|
+
sepia?: string;
|
|
48
|
+
[key: string]: string | undefined;
|
|
57
49
|
}
|
|
58
50
|
export type DocumentStylingValue = string | ThemeVariantValue;
|
|
59
51
|
/**
|
|
@@ -115,12 +107,9 @@ export interface DdocProps extends CommentAccountProps {
|
|
|
115
107
|
commentDrawerOpen?: boolean;
|
|
116
108
|
setCommentDrawerOpen?: React.Dispatch<SetStateAction<boolean>>;
|
|
117
109
|
initialComments?: IComment[];
|
|
118
|
-
initialCommentAnchors?: SerializedCommentAnchor[];
|
|
119
110
|
setInitialComments?: React.Dispatch<SetStateAction<IComment[]>>;
|
|
120
111
|
onCommentReply?: (activeCommentId: string, reply: IComment) => void;
|
|
121
112
|
onNewComment?: (newComment: IComment, meta?: CommentMutationMeta) => void;
|
|
122
|
-
onEditComment?: (activeCommentId: string, meta?: CommentMutationMeta) => void;
|
|
123
|
-
onEditReply?: (activeCommentId: string, replyId: string, meta?: CommentMutationMeta) => void;
|
|
124
113
|
onResolveComment?: (activeCommentId: string, meta?: CommentMutationMeta) => void;
|
|
125
114
|
onUnresolveComment?: (activeCommentId: string, meta?: CommentMutationMeta) => void;
|
|
126
115
|
onDeleteComment?: (activeCommentId: string, meta?: CommentMutationMeta) => void;
|
|
@@ -133,7 +122,7 @@ export interface DdocProps extends CommentAccountProps {
|
|
|
133
122
|
setIsCommentSectionOpen?: React.Dispatch<SetStateAction<boolean>>;
|
|
134
123
|
inlineCommentData?: InlineCommentData;
|
|
135
124
|
setInlineCommentData?: React.Dispatch<React.SetStateAction<InlineCommentData>>;
|
|
136
|
-
theme?:
|
|
125
|
+
theme?: ThemeKey;
|
|
137
126
|
zoomLevel: string;
|
|
138
127
|
setZoomLevel: React.Dispatch<SetStateAction<string>>;
|
|
139
128
|
isNavbarVisible: boolean;
|
|
@@ -179,6 +168,7 @@ export interface DdocProps extends CommentAccountProps {
|
|
|
179
168
|
onPdfExport?: () => void;
|
|
180
169
|
onHtmlExport?: () => void;
|
|
181
170
|
onTxtExport?: () => void;
|
|
171
|
+
onOdtExport?: () => void;
|
|
182
172
|
onDocxImport?: () => void;
|
|
183
173
|
sharedSlidesLink?: string;
|
|
184
174
|
documentName?: string;
|
|
@@ -38,5 +38,4 @@ 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[]>;
|
|
42
41
|
};
|
|
@@ -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;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Heading links have the form `<origin>/<path>#heading=<slug>-<uuid8>`.
|
|
3
|
+
* They're created by the copy-heading-link button in the TOC and the
|
|
4
|
+
* block handle menu. Consumers of a dDoc paste these URLs expecting
|
|
5
|
+
* same-page scroll behavior; but the same URL shape is also used for
|
|
6
|
+
* cross-document heading links, which we need to detect and warn about.
|
|
7
|
+
*/
|
|
8
|
+
export interface ParsedHeadingLink {
|
|
9
|
+
/** The raw `heading` hash param value (e.g. `my-heading-a1b2c3d4`). */
|
|
10
|
+
headingParam: string;
|
|
11
|
+
/** The short id suffix used to locate the heading in the DOM. */
|
|
12
|
+
id: string;
|
|
13
|
+
/** The heading element in the current document, if present. */
|
|
14
|
+
headingEl: HTMLHeadingElement | undefined;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Parses a URL and, if it's a heading link pointing at the current origin,
|
|
18
|
+
* returns the heading param, id, and the matching DOM element (if any).
|
|
19
|
+
*
|
|
20
|
+
* Returns `null` when the URL is not parseable, is cross-origin, has no
|
|
21
|
+
* hash, or does not carry a `heading=` param.
|
|
22
|
+
*/
|
|
23
|
+
export declare const parseHeadingLink: (rawUrl: string) => ParsedHeadingLink | null;
|