@ones-editor/editor 0.0.3-beta.97 → 0.0.3-beta.98
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/@ones-editor/comments/src/types.d.ts +2 -0
- package/@ones-editor/dividing-line-embed/src/i18n/en-us.d.ts +1 -0
- package/@ones-editor/dividing-line-embed/src/i18n/ja-jp.d.ts +1 -0
- package/@ones-editor/dividing-line-embed/src/i18n/zh-cn.d.ts +1 -0
- package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +1 -1
- package/@ones-editor/graph-embed/src/lang/en-us.d.ts +7 -5
- package/@ones-editor/graph-embed/src/lang/ja-jp.d.ts +10 -0
- package/@ones-editor/graph-embed/src/lang/zh-cn.d.ts +3 -3
- package/@ones-editor/list-block/src/start/fix-start-by-list.d.ts +9 -0
- package/@ones-editor/media-embed/src/core/media.d.ts +2 -0
- package/@ones-editor/mention/src/mention.d.ts +1 -10
- package/@ones-editor/mention/src/types.d.ts +12 -1
- package/@ones-editor/sharedb-doc/src/doc/comments.d.ts +0 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +13 -10
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +3 -1
- package/@ones-editor/ui-base/src/auto-suggest/editor-auto-suggest-menu.d.ts +12 -0
- package/@ones-editor/ui-base/src/command-bar/fixed-toolbar.d.ts +12 -0
- package/@ones-editor/ui-base/src/command-bar/index.d.ts +2 -1
- package/@ones-editor/ui-base/src/command-bar/init-toolbar-item.d.ts +6 -0
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +1 -0
- package/@ones-editor/ui-base/src/dropdown/index.d.ts +41 -0
- package/@ones-editor/ui-base/src/icons/index.d.ts +2 -1
- package/@ones-editor/ui-base/src/index.d.ts +1 -0
- package/@ones-editor/versions/src/history-doc/history-doc.d.ts +4 -4
- package/@ones-editor/versions/src/index.d.ts +1 -1
- package/@ones-editor/versions/src/locale/en-us.d.ts +5 -0
- package/@ones-editor/versions/src/locale/zh-cn.d.ts +5 -0
- package/@ones-editor/versions/src/types.d.ts +3 -6
- package/@ones-editor/versions/src/utils/index.d.ts +2 -2
- package/@ones-editor/versions/src/version-dialog/index.d.ts +20 -4
- package/@ones-editor/versions/src/version-dialog/play-history.d.ts +1 -2
- package/@ones-editor/versions/src/version-dialog/size-limit-textarea.d.ts +21 -0
- package/@ones-editor/versions/src/version-dialog/version-helper.d.ts +3 -0
- package/@ones-editor/versions/src/version-dialog/version-info-header.d.ts +12 -0
- package/@ones-editor/versions/src/version-dialog/version-list.d.ts +14 -9
- package/@ones-editor/versions/src/version-dialog/versions-dropdown.d.ts +25 -0
- package/dist/comments/local-doc-comments-provider.d.ts +1 -0
- package/dist/comments/sharedb-doc-comments-provider.d.ts +1 -0
- package/dist/index.d.ts +3 -4
- package/dist/index.js +157 -154
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/@ones-editor/graph-embed/src/lang/utils.d.ts +0 -3
- package/@ones-editor/versions/src/version-dialog/actions-buttons.d.ts +0 -17
|
@@ -17,6 +17,7 @@ export interface OnesEditorCommentOptions {
|
|
|
17
17
|
pullThreshold?: number;
|
|
18
18
|
onUpdateLayout?: (editor: OnesEditor, data: CommentData) => void;
|
|
19
19
|
onCommentCountChange?: (count: number) => void;
|
|
20
|
+
onCommentEditorClick?: (editor: OnesEditor, event: MouseEvent) => void;
|
|
20
21
|
}
|
|
21
22
|
export interface OnesEditorCommentsEvents {
|
|
22
23
|
onCreateComment: (commentId: string, local: boolean) => void;
|
|
@@ -33,6 +34,7 @@ export interface OnesEditorCommentsProvider {
|
|
|
33
34
|
addListener: (callback: OnesEditorCommentsEvents) => void;
|
|
34
35
|
removeListener: (callback: OnesEditorCommentsEvents) => void;
|
|
35
36
|
createCommentEditor: (parent: HTMLElement, doc: LocalDoc) => OnesEditor;
|
|
37
|
+
allowEdit: (comment: OnesEditorComment) => boolean;
|
|
36
38
|
}
|
|
37
39
|
export interface CommentWithChildren extends OnesEditorComment {
|
|
38
40
|
children: OnesEditorComment[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BlockElement, CommandItem, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
1
|
import { StandardEmbedBlockCommands } from '../../../../@ones-editor/embed-block-helper';
|
|
2
|
+
import type { BlockElement, CommandItem, OnesEditor } from '../../../../@ones-editor/core';
|
|
3
3
|
import type { StandardEmbedBlockProperties } from '../../../../@ones-editor/embed-block-helper';
|
|
4
4
|
export type PresetCommandId = 'edit' | 'help';
|
|
5
5
|
export type GraphType = 'mermaid' | 'flowchart' | 'plantuml';
|
|
@@ -11,3 +11,12 @@ export declare class FixStartByList {
|
|
|
11
11
|
constructor(editor: OnesEditor, list: BlockElement, options?: FixStartByListOptions | undefined);
|
|
12
12
|
fix(): void;
|
|
13
13
|
}
|
|
14
|
+
export declare class FixStartByBlock {
|
|
15
|
+
private editor;
|
|
16
|
+
listStart: number;
|
|
17
|
+
listNextBrothers: BlockElement[];
|
|
18
|
+
constructor(editor: OnesEditor, block: BlockElement, options?: FixStartByListOptions & {
|
|
19
|
+
start: number;
|
|
20
|
+
});
|
|
21
|
+
fix(): void;
|
|
22
|
+
}
|
|
@@ -21,6 +21,8 @@ export declare class Media extends TypedEmitter<MediaEvent> {
|
|
|
21
21
|
handleUploadFile: (file: File) => Promise<void>;
|
|
22
22
|
renderEmpty(blockData: MediaBlockData): void;
|
|
23
23
|
getResourceUrl(url: string): string;
|
|
24
|
+
setFullScreen(): void;
|
|
25
|
+
removeFullScreen(): void;
|
|
24
26
|
render(blockData: MediaBlockData, content: BlockContentElement): void;
|
|
25
27
|
setAbstract(abstract: MediaAbstract): void;
|
|
26
28
|
destroy: () => void;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { CommandItem, OnesEditor, OnesEditorCustom } from '../../../@ones-editor/core';
|
|
2
2
|
import { AutoSuggestAnchor, OnesEditorAutoSuggest } from '../../../@ones-editor/ui-base';
|
|
3
|
-
|
|
4
|
-
userId: string;
|
|
5
|
-
displayName: string;
|
|
6
|
-
avatarUrl: string;
|
|
7
|
-
element?: HTMLElement;
|
|
8
|
-
email?: string;
|
|
9
|
-
};
|
|
10
|
-
export type MentionOptions = {
|
|
11
|
-
queryUsers: (editor: OnesEditor, text: string) => Promise<OnesEditorMentionUser[]>;
|
|
12
|
-
};
|
|
3
|
+
import { MentionOptions } from './types';
|
|
13
4
|
export default class OnesEditorMention implements OnesEditorCustom {
|
|
14
5
|
private editor;
|
|
15
6
|
private options;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import { DocBox } from '../../../@ones-editor/core';
|
|
1
|
+
import { DocBox, OnesEditor } from '../../../@ones-editor/core';
|
|
2
2
|
export interface MentionBoxData extends DocBox {
|
|
3
3
|
iconUrl: string;
|
|
4
4
|
text: string;
|
|
5
5
|
mentionId: string;
|
|
6
6
|
}
|
|
7
|
+
export type OnesEditorMentionUser = {
|
|
8
|
+
userId: string;
|
|
9
|
+
displayName: string;
|
|
10
|
+
avatarUrl: string;
|
|
11
|
+
element?: HTMLElement;
|
|
12
|
+
email?: string;
|
|
13
|
+
};
|
|
14
|
+
export type MentionOptions = {
|
|
15
|
+
enableFirstBlock?: boolean;
|
|
16
|
+
queryUsers: (editor: OnesEditor, text: string) => Promise<OnesEditorMentionUser[]>;
|
|
17
|
+
};
|