@ones-editor/editor 0.0.7-beta.2 → 0.0.7-beta.20
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 +2 -0
- package/@ones-editor/comments/src/comments-list/comments-list.d.ts +2 -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 +5 -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/block-renderers/standard-block-render.d.ts +1 -0
- package/@ones-editor/core/src/core/blocks/common/block-dom.d.ts +2 -1
- package/@ones-editor/core/src/core/containers/root-container.d.ts +0 -2
- package/@ones-editor/core/src/core/doc/doc.d.ts +2 -1
- package/@ones-editor/drop-target/src/drop-indicator.d.ts +1 -0
- package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +1 -1
- package/@ones-editor/heading-collapse/src/heading-collapse-button/heading-block-collapse-button-render.d.ts +1 -0
- package/@ones-editor/input-handlers/src/enforce-with-document-title/enforce-with-document-title-handler.d.ts +1 -0
- package/@ones-editor/paste-special/src/paste-special-button.d.ts +1 -0
- package/@ones-editor/to-docx/src/doc2other/image.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +2 -1
- package/@ones-editor/ui/src/tooltips/index.d.ts +2 -0
- package/@ones-editor/ui-base/src/icons/index.d.ts +2 -1
- package/@ones-editor/ui-base/src/index.d.ts +2 -1
- package/@ones-editor/ui-base/src/list/filterable-list.d.ts +1 -0
- package/dist/index.js +283 -264
- package/package.json +2 -1
|
@@ -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,8 @@ export default class OnesEditorComments {
|
|
|
12
12
|
destroy(): void;
|
|
13
13
|
private showComment;
|
|
14
14
|
showCommentList: (groupId?: string) => void;
|
|
15
|
+
setFirstEditingCommentActive(): void;
|
|
16
|
+
isEditing(): boolean;
|
|
15
17
|
mount(containers: CommentRoot): void;
|
|
16
18
|
private handleCommentListClose;
|
|
17
19
|
private handleOnSelectComment;
|
|
@@ -18,6 +18,8 @@ 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;
|
|
22
|
+
setFirstEditingCommentActive(): void;
|
|
21
23
|
handleSelectionOnComment: () => void;
|
|
22
24
|
updateCommentCount: () => void;
|
|
23
25
|
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,10 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
|
|
|
21
21
|
insertItem(data: CommentWithChildren, options?: {
|
|
22
22
|
active: boolean;
|
|
23
23
|
}): CommentGroupItem | null;
|
|
24
|
+
private findFirstEditingComment;
|
|
25
|
+
isEditing(): boolean;
|
|
26
|
+
closeEditing: (groupId: string) => void;
|
|
27
|
+
setFirstEditingCommentActive: () => void;
|
|
24
28
|
setActiveItem(index: number, direction?: 'prev' | 'next'): void;
|
|
25
29
|
get activeIndex(): number;
|
|
26
30
|
get activeItem(): CommentGroupItem | null;
|
|
@@ -29,6 +33,7 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
|
|
|
29
33
|
handleDeleteComment(commentId: string): void;
|
|
30
34
|
handleUpdateComment(comment: OnesEditorComment): void;
|
|
31
35
|
handleContainerClick: (event: MouseEvent) => void;
|
|
36
|
+
handleDocumentClick: (event: MouseEvent) => void;
|
|
32
37
|
handleSelectionChanged: () => void;
|
|
33
38
|
handleEditorResize: () => void;
|
|
34
39
|
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;
|
|
@@ -7,4 +7,5 @@ export declare class StandardBlockRenderer implements OnesEditorBlockRenderer {
|
|
|
7
7
|
renderText(editor: OnesEditor, path: BlockPath, attributes: AttributeMap): OnesEditorBlockRenderResult;
|
|
8
8
|
renderBlock(editor: OnesEditor, path: BlockPath, blockData: DocBlock): OnesEditorBlockRenderResult;
|
|
9
9
|
updateBlock(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock): void;
|
|
10
|
+
generateCSSCustomProperties(attributes: AttributeMap): OnesEditorBlockRenderResult;
|
|
10
11
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import AttributeMap from 'quill-delta/dist/AttributeMap';
|
|
1
2
|
import { DocBlock, DocBox } from '../../doc';
|
|
2
3
|
import { BlockBackgroundElement, BlockContentElement, BlockElement, BlockPath, BlockToolsElement, BoxContentElement, BoxElement, ContainerElement, InsertionContentElement, InsertionElement, OnesEditor } from '../../types';
|
|
3
4
|
export declare function isBlock(node: Node): node is BlockElement;
|
|
@@ -23,7 +24,7 @@ export declare function getBoxId(box: BoxElement): string;
|
|
|
23
24
|
export declare function getParentBox(node: Node): BoxElement | null;
|
|
24
25
|
export declare function createBoxContentElement(boxElement: BoxElement): BoxContentElement;
|
|
25
26
|
export declare function getBoxContent(box: BoxElement): BoxContentElement;
|
|
26
|
-
export declare function createInsertionElement(type: string, id: string): InsertionElement;
|
|
27
|
+
export declare function createInsertionElement(type: string, id: string, attributes?: AttributeMap): InsertionElement;
|
|
27
28
|
export declare function findInsertionById(editor: OnesEditor, id: string): InsertionElement | null;
|
|
28
29
|
export declare function createInsertionContentElement(insertionElement: InsertionElement): InsertionContentElement;
|
|
29
30
|
export declare function getInsertionContent(insertion: InsertionElement): InsertionContentElement;
|
|
@@ -4,8 +4,6 @@ export declare class RootContainer {
|
|
|
4
4
|
private editor;
|
|
5
5
|
rootContainer: ContainerElement;
|
|
6
6
|
resizeObserver: ResizeObserver;
|
|
7
|
-
private isMouseDown;
|
|
8
|
-
private bindEvent;
|
|
9
7
|
constructor(editor: OnesEditor, rootContainer: ContainerElement);
|
|
10
8
|
private bindEvents;
|
|
11
9
|
private unbindEvents;
|
|
@@ -46,7 +46,8 @@ export interface DocBox {
|
|
|
46
46
|
export interface DocInsertion {
|
|
47
47
|
id: string;
|
|
48
48
|
type: string;
|
|
49
|
-
[index: string]: string | boolean | number;
|
|
49
|
+
[index: string]: string | boolean | number | AttributeMap | undefined;
|
|
50
|
+
attributes?: AttributeMap;
|
|
50
51
|
}
|
|
51
52
|
export interface DocComment {
|
|
52
53
|
id: string;
|
|
@@ -19,7 +19,7 @@ export default abstract class GraphBase {
|
|
|
19
19
|
createEmbedContent(content: BlockContentElement, block: DocEmbedBlock): void;
|
|
20
20
|
updateEmbedContent(content: BlockContentElement, block: DocEmbedBlock): void;
|
|
21
21
|
protected updateImage(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null, err: Error | null): Promise<void>;
|
|
22
|
-
protected errorBoundary(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null, reason: 'imageLoadError' | 'grammarError'): void;
|
|
22
|
+
protected errorBoundary(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null, reason: 'imageLoadError' | 'grammarError', error?: Error): void;
|
|
23
23
|
protected emptyContent(): void;
|
|
24
24
|
protected updateSpecialClasses(embed: HTMLDivElement, code: string | undefined, err: Error | null): void;
|
|
25
25
|
editGraph(content: BlockContentElement): void;
|
|
@@ -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,6 +10,7 @@ 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
15
|
private isDocumentTitleBlock;
|
|
15
16
|
}
|
|
@@ -11,6 +11,7 @@ export default class PasteSpecialButton {
|
|
|
11
11
|
private checkedId;
|
|
12
12
|
constructor(editor: OnesEditor, onPasteSpecial: OnPasteSpecial);
|
|
13
13
|
show(docs: OnesEditorDocs): void;
|
|
14
|
+
private cleaningDoc;
|
|
14
15
|
handlePasteSpecial: (bar: AbstractCommandBar, item: CommandItem) => void;
|
|
15
16
|
handleClose: () => void;
|
|
16
17
|
handleSelectionChange: () => void;
|