@ones-editor/editor 0.0.5 → 0.0.6-beta.11
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/code-block/src/code-block/languages.d.ts +8 -8
- package/@ones-editor/comments/src/comments/comments.d.ts +1 -0
- package/@ones-editor/comments/src/comments-list/comments-list.d.ts +1 -0
- package/@ones-editor/comments/src/comments-list/group-item.d.ts +1 -0
- package/@ones-editor/comments/src/comments-list/group-list.d.ts +3 -0
- package/@ones-editor/comments/src/comments-list/handler.d.ts +1 -1
- package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts +1 -0
- package/@ones-editor/core/src/core/blocks/common/block-dom.d.ts +1 -0
- package/@ones-editor/core/src/core/containers/root-container.d.ts +0 -1
- package/@ones-editor/core/src/i18n/i18n.d.ts +2 -3
- package/@ones-editor/drop-target/src/drop-indicator.d.ts +1 -0
- package/@ones-editor/heading-collapse/src/heading-collapse-button/heading-block-collapse-button-render.d.ts +1 -0
- package/@ones-editor/image-embed/src/types.d.ts +1 -1
- package/@ones-editor/input-handlers/src/enforce-with-document-title/enforce-with-document-title-handler.d.ts +2 -1
- package/@ones-editor/input-handlers/src/enforce-with-document-title/types.d.ts +1 -0
- package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +0 -16
- package/@ones-editor/mention/src/types.d.ts +0 -1
- package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +1 -0
- package/@ones-editor/table-block/src/table-block/cell-menu/table-cell-dom.d.ts +0 -1
- package/@ones-editor/table-block/src/table-block/doc-table-data.d.ts +1 -1
- package/@ones-editor/to-docx/src/doc2other/image.d.ts +1 -0
- package/@ones-editor/toc/src/index.d.ts +0 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +0 -1
- package/@ones-editor/ui-base/src/list/filterable-list.d.ts +1 -0
- package/dist/index.js +253 -236
- package/dist/types.d.ts +2 -2
- package/package.json +2 -2
- package/@ones-editor/graph-embed/assets/index.d.ts +0 -2
- package/@ones-editor/toc/src/types.d.ts +0 -3
|
@@ -68,10 +68,6 @@ import 'prismjs/components/prism-visual-basic';
|
|
|
68
68
|
import 'prismjs/components/prism-wasm';
|
|
69
69
|
import 'prismjs/components/prism-yaml';
|
|
70
70
|
declare const SUPPORTED_LANGUAGES: {
|
|
71
|
-
plain: {
|
|
72
|
-
name: string;
|
|
73
|
-
aliases: string[];
|
|
74
|
-
};
|
|
75
71
|
abap: {
|
|
76
72
|
name: string;
|
|
77
73
|
aliases: string[];
|
|
@@ -172,6 +168,10 @@ declare const SUPPORTED_LANGUAGES: {
|
|
|
172
168
|
name: string;
|
|
173
169
|
aliases: string[];
|
|
174
170
|
};
|
|
171
|
+
markup: {
|
|
172
|
+
name: string;
|
|
173
|
+
aliases: string[];
|
|
174
|
+
};
|
|
175
175
|
java: {
|
|
176
176
|
name: string;
|
|
177
177
|
aliases: string[];
|
|
@@ -220,10 +220,6 @@ declare const SUPPORTED_LANGUAGES: {
|
|
|
220
220
|
name: string;
|
|
221
221
|
aliases: string[];
|
|
222
222
|
};
|
|
223
|
-
markup: {
|
|
224
|
-
name: string;
|
|
225
|
-
aliases: string[];
|
|
226
|
-
};
|
|
227
223
|
matlab: {
|
|
228
224
|
name: string;
|
|
229
225
|
aliases: string[];
|
|
@@ -256,6 +252,10 @@ declare const SUPPORTED_LANGUAGES: {
|
|
|
256
252
|
name: string;
|
|
257
253
|
aliases: string[];
|
|
258
254
|
};
|
|
255
|
+
plain: {
|
|
256
|
+
name: string;
|
|
257
|
+
aliases: string[];
|
|
258
|
+
};
|
|
259
259
|
powershell: {
|
|
260
260
|
name: string;
|
|
261
261
|
aliases: string[];
|
|
@@ -12,6 +12,7 @@ export default class OnesEditorComments {
|
|
|
12
12
|
destroy(): void;
|
|
13
13
|
private showComment;
|
|
14
14
|
showCommentList: (groupId?: string) => void;
|
|
15
|
+
isEditing(): boolean;
|
|
15
16
|
mount(containers: CommentRoot): void;
|
|
16
17
|
private handleCommentListClose;
|
|
17
18
|
private handleOnSelectComment;
|
|
@@ -18,6 +18,7 @@ export default class CommentsList extends TypedEmitter<CommentsListEvents> imple
|
|
|
18
18
|
onDeleteComment(commentId: string, local: boolean): void;
|
|
19
19
|
onUpdateComment(commentId: string, local: boolean): void;
|
|
20
20
|
createList(): CommentGroupList;
|
|
21
|
+
isEditing(): boolean;
|
|
21
22
|
handleSelectionOnComment: () => void;
|
|
22
23
|
updateCommentCount: () => void;
|
|
23
24
|
handleActiveItemChanged: (index: number, direction?: 'prev' | 'next') => void;
|
|
@@ -35,6 +35,7 @@ export declare class CommentGroupItem extends TypedEmitter<CommentGroupItemEvent
|
|
|
35
35
|
deleteMainComment(commentId: OnesEditorComment['id']): void;
|
|
36
36
|
handleReadonlyChanged: (editor: OnesEditor) => void;
|
|
37
37
|
edit(): void;
|
|
38
|
+
getCommentEditor: () => import("../comment-editor").CommentEditor;
|
|
38
39
|
destroy(): void;
|
|
39
40
|
private handleResize;
|
|
40
41
|
}
|
|
@@ -21,6 +21,8 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
|
|
|
21
21
|
insertItem(data: CommentWithChildren, options?: {
|
|
22
22
|
active: boolean;
|
|
23
23
|
}): CommentGroupItem | null;
|
|
24
|
+
isEditing(): boolean;
|
|
25
|
+
closeEditing: (groupId: string) => void;
|
|
24
26
|
setActiveItem(index: number, direction?: 'prev' | 'next'): void;
|
|
25
27
|
get activeIndex(): number;
|
|
26
28
|
get activeItem(): CommentGroupItem | null;
|
|
@@ -29,6 +31,7 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
|
|
|
29
31
|
handleDeleteComment(commentId: string): void;
|
|
30
32
|
handleUpdateComment(comment: OnesEditorComment): void;
|
|
31
33
|
handleContainerClick: (event: MouseEvent) => void;
|
|
34
|
+
handleDocumentClick: (event: MouseEvent) => void;
|
|
32
35
|
handleSelectionChanged: () => void;
|
|
33
36
|
handleEditorResize: () => void;
|
|
34
37
|
handleDocChanged: () => void;
|
|
@@ -14,7 +14,7 @@ export declare class CommentGroupItemHandlers {
|
|
|
14
14
|
private handleCommentItemReply;
|
|
15
15
|
private handleCommentItemMore;
|
|
16
16
|
private handleCommentItemOk;
|
|
17
|
-
|
|
17
|
+
handleCommentItemCancel: (groupItem: CommentGroupItem, commentId: string | null) => void;
|
|
18
18
|
handleCommentItemEdit: (commentItem: CommentItem) => void;
|
|
19
19
|
handleCommentItemDelete: (commentItem: CommentItem) => void;
|
|
20
20
|
execute: (element: HTMLElement, groupItem: CommentGroupItem, commentId: string | null, itemIndex: number) => void;
|
package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare class MobileCommentsList extends TypedEmitter<MobileCommentsListE
|
|
|
23
23
|
private hidePullInfo;
|
|
24
24
|
private handleReachBottom;
|
|
25
25
|
private handleReachTop;
|
|
26
|
+
isEditing(): boolean;
|
|
26
27
|
show: (groupId?: string) => void;
|
|
27
28
|
hide: () => void;
|
|
28
29
|
destroy(): void;
|
|
@@ -34,3 +34,4 @@ export declare function getNextVisibleBlock(block: BlockElement): BlockElement |
|
|
|
34
34
|
export declare function getBlockIndex(block: BlockElement): number;
|
|
35
35
|
export declare function isInBlock(target: EventTarget | null): boolean;
|
|
36
36
|
export declare function isInBlockTools(target: EventTarget | null): boolean;
|
|
37
|
+
export declare function isTitleBlock(block: BlockElement): boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export type LANGS = keyof typeof langs;
|
|
2
1
|
declare const langs: {
|
|
3
2
|
'en-US': {
|
|
4
3
|
name: string;
|
|
@@ -58,8 +57,8 @@ declare const langs: {
|
|
|
58
57
|
};
|
|
59
58
|
};
|
|
60
59
|
};
|
|
61
|
-
export declare function setLang(lang?:
|
|
60
|
+
export declare function setLang(lang?: string | null | undefined): void;
|
|
62
61
|
export declare function mergeLang(l: any): void;
|
|
63
62
|
export declare function t(key: string, args?: Record<string, string>): string;
|
|
64
|
-
export
|
|
63
|
+
export type LANGS = keyof typeof langs;
|
|
65
64
|
export {};
|
|
@@ -3,6 +3,7 @@ export declare class HeadingBlockCollapseButton implements OnesEditorCustom {
|
|
|
3
3
|
private editor;
|
|
4
4
|
constructor(editor: OnesEditor);
|
|
5
5
|
handleLoad: () => void;
|
|
6
|
+
handleReadonlyChanged: () => void;
|
|
6
7
|
handleHoverBlock: (hoveringBlock: BlockElement | null, oldHoveringBlock: BlockElement | null) => void;
|
|
7
8
|
handleClick: (editor: OnesEditor, event: MouseEvent) => void;
|
|
8
9
|
showCollapseButtons(): void;
|
|
@@ -10,7 +10,8 @@ declare class EnforceWithDocumentTitleHandler implements OnesEditorInputHandler
|
|
|
10
10
|
handleRemoteChanged(editor: OnesEditor): void;
|
|
11
11
|
handleUpdateCompositionText(editor: OnesEditor): void;
|
|
12
12
|
handleSelectionChange: (editor: OnesEditor) => void;
|
|
13
|
+
private reload;
|
|
13
14
|
private applyPlaceholder;
|
|
14
|
-
private
|
|
15
|
+
private isDocumentTitleBlock;
|
|
15
16
|
}
|
|
16
17
|
export default EnforceWithDocumentTitleHandler;
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
|
-
import { AbstractCommandBar, Popup } from '../../../../@ones-editor/ui-base';
|
|
3
1
|
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
4
2
|
export type OnEditChange = (tex: string, end: boolean) => void;
|
|
5
|
-
export default class MathjaxEditor {
|
|
6
|
-
editMathjaxPopup: Popup | null;
|
|
7
|
-
onChange: OnEditChange | null;
|
|
8
|
-
tex: string;
|
|
9
|
-
private observer;
|
|
10
|
-
editMathjax(elem: HTMLElement, tex: string, onChange: OnEditChange): void;
|
|
11
|
-
handleClose: (commandBar: AbstractCommandBar) => void;
|
|
12
|
-
handleKeyup: (event: KeyboardEvent) => void;
|
|
13
|
-
handleChange: import("lodash").DebouncedFunc<(text: string) => void>;
|
|
14
|
-
createPopupContent(tex: string): HTMLTextAreaElement;
|
|
15
|
-
textareaWatcher(textarea: HTMLTextAreaElement): void;
|
|
16
|
-
getTextarea(): HTMLTextAreaElement;
|
|
17
|
-
destroy(): void;
|
|
18
|
-
}
|
|
19
3
|
export declare function editMathjax(editor: OnesEditor, elem: HTMLElement, tex: string, onChange: OnEditChange): void;
|
|
@@ -5,4 +5,3 @@ export declare function updateBarsDangerStatus(editor: OnesEditor, tableBlock: B
|
|
|
5
5
|
export declare function updateCellsDangerStatus(editor: OnesEditor, tableBlock: BlockElement, isDanger?: boolean, isCol?: boolean): void;
|
|
6
6
|
export declare function updateCellBarsDangerStatus(editor: OnesEditor, tableBlock: BlockElement, isDanger?: boolean, isCol?: boolean): void;
|
|
7
7
|
export declare function createEntireRowAndColumnRange(editor: OnesEditor, tableBlock: BlockElement, isCol: boolean): import("@ones-editor/core").EditorSimpleSelectionRange | import("@ones-editor/core").EditorComplexSelectionRange;
|
|
8
|
-
export declare function getHandlerContainers(editor: OnesEditor, block: BlockElement): import("@ones-editor/core").ContainerElement[];
|