@ones-editor/editor 1.1.17-beta.2 → 1.1.17-beta.3
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/comment-quick-reply/index.d.ts +0 -1
- package/@ones-editor/comments/src/comments-list/mini-comment/mini-comments-list.d.ts +1 -1
- package/@ones-editor/context-menu/src/menu/index.d.ts +0 -1
- package/@ones-editor/core/src/core/blocks/complex-blocks/complex-block-helper.d.ts +1 -2
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +0 -1
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +0 -1
- package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +1 -3
- package/@ones-editor/core/src/core/types.d.ts +0 -2
- package/@ones-editor/core/src/utils/dom.d.ts +0 -3
- package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +0 -1
- package/@ones-editor/to-docx/src/doc2other/core.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +185 -185
- package/dist/types.d.ts +1 -0
- package/package.json +1 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnesEditor } from '../../../../../@ones-editor/core';
|
|
2
2
|
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
3
|
-
import { OnesEditorCommentsEvents, OnesEditorCommentsProvider } from '
|
|
3
|
+
import type { OnesEditorCommentsEvents, OnesEditorCommentsProvider } from '../../types';
|
|
4
4
|
import { MiniGroupList } from './group-list';
|
|
5
5
|
interface MiniCommentsListEvents {
|
|
6
6
|
onMiniCommentClose: () => void;
|
|
@@ -12,7 +12,6 @@ declare class OnesEditorContextMenu implements OnesEditorCustom {
|
|
|
12
12
|
private isInEditor;
|
|
13
13
|
private handleContextMenuShown;
|
|
14
14
|
private handleContextMenuClick;
|
|
15
|
-
private handleContextMenuClose;
|
|
16
15
|
private handleImageEmbedAction;
|
|
17
16
|
}
|
|
18
17
|
export default OnesEditorContextMenu;
|
|
@@ -2,9 +2,8 @@ import { OnesEditor, BlockElement, BlockPosition, ContainerElement, ComplexBlock
|
|
|
2
2
|
export declare function complexBlockGetAllChildContainers(editor: OnesEditor, block: BlockElement, options?: GetChildContainerOptions): ContainerElement[];
|
|
3
3
|
export declare function complexBlockGetSelectedContainers(editor: OnesEditor, block: BlockElement, start: BlockPosition, end: BlockPosition): ContainerElement[];
|
|
4
4
|
export declare function isFirstChildBlockInComplexBlock(editor: OnesEditor, childBlock: BlockElement): boolean;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function complexBlockGeFirstSimpleChild(editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions): BlockElement | null;
|
|
6
6
|
export declare function complexBlockGetLastSimpleChild(editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions): BlockElement | null;
|
|
7
|
-
export declare function complexBlockGetDeepFirstChild(editor: OnesEditor, container: ContainerElement): BlockElement | null;
|
|
8
7
|
export declare function findPrevSimpleBlockBeforeChildContainer(editor: OnesEditor, childContainer: ContainerElement, options?: GetChildContainerOptions): BlockElement | null;
|
|
9
8
|
export declare function complexBlockGetTopChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
|
|
10
9
|
export declare function complexBlockGetBottomChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
|
|
@@ -27,7 +27,6 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
27
27
|
callbacks: EditorInputCallbacks;
|
|
28
28
|
inputElement: HTMLInputElement;
|
|
29
29
|
constructor(editor: OnesEditor, callbacks: EditorInputCallbacks);
|
|
30
|
-
private isInCommandbar;
|
|
31
30
|
destroy(): void;
|
|
32
31
|
getInput(): HTMLInputElement;
|
|
33
32
|
focus(): void;
|
|
@@ -34,7 +34,6 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
|
|
|
34
34
|
onCustomMessage(msg: unknown): void;
|
|
35
35
|
onStatusChanged(status: OnesEditorDocStatus): void;
|
|
36
36
|
onError(error: Error): void;
|
|
37
|
-
onAuthRecover(): void;
|
|
38
37
|
uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
|
|
39
38
|
addResources(resourceIds: string[]): Promise<string[]>;
|
|
40
39
|
buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
import { EditorInputCallbacks } from '../composition/editor-input';
|
|
3
2
|
import { OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, RemoteChangeType, PasteOptions } from '../types';
|
|
4
3
|
import { DocObject } from '../doc';
|
|
@@ -19,8 +18,7 @@ export declare class EditorInputHandlers implements EditorInputCallbacks {
|
|
|
19
18
|
onPaste(event: ClipboardEvent): void;
|
|
20
19
|
onPasteText: (text: string, options?: PasteOptions) => Promise<void>;
|
|
21
20
|
onFocus(): void;
|
|
22
|
-
onBlur
|
|
23
|
-
removeActiveForBlur: import("lodash").DebouncedFunc<() => void>;
|
|
21
|
+
onBlur(): void;
|
|
24
22
|
addHandler(handler: OnesEditorInputHandler): void;
|
|
25
23
|
removeHandler(handler: OnesEditorInputHandler): void;
|
|
26
24
|
handleBeforeInsertText(containerId: string, blockIndex: number, offset: number, text: string): boolean;
|
|
@@ -398,7 +398,6 @@ export interface OnesEditorOptionalOptions {
|
|
|
398
398
|
colors?: string[];
|
|
399
399
|
scrollContainer?: HTMLElement;
|
|
400
400
|
enableComments?: boolean;
|
|
401
|
-
enableContextMenu?: boolean;
|
|
402
401
|
settingsProvider?: OnesEditorSettingsProvider;
|
|
403
402
|
}
|
|
404
403
|
export interface OnesEditorOptions {
|
|
@@ -407,7 +406,6 @@ export interface OnesEditorOptions {
|
|
|
407
406
|
[index: string]: unknown;
|
|
408
407
|
};
|
|
409
408
|
enableComments?: boolean;
|
|
410
|
-
enableContextMenu?: boolean;
|
|
411
409
|
scrollContainer?: HTMLElement;
|
|
412
410
|
}
|
|
413
411
|
export interface OnesEditorComponents {
|
|
@@ -33,7 +33,4 @@ export declare function findTarget(event: Event, cssSelector: string): Element |
|
|
|
33
33
|
export declare function findEventTargetBlock(event: Event): Element | null;
|
|
34
34
|
export declare function isElementVisible(element: Element | null): boolean;
|
|
35
35
|
export declare function getElementScale(element: Element): number;
|
|
36
|
-
export declare function getElementFromPoint(x: number, y: number, options?: {
|
|
37
|
-
noFilter: boolean;
|
|
38
|
-
}): Element;
|
|
39
36
|
export {};
|
|
@@ -18,6 +18,7 @@ export interface BlocksGenerator {
|
|
|
18
18
|
addHyperlinkParagraph(link: string | undefined, title?: string): void;
|
|
19
19
|
addOtherEmbedBlock(embedType: string, embedData: any): Promise<void>;
|
|
20
20
|
addTableMatrix(colsWidth: number[], matrix: CalcCell[][], data: DocObject): Promise<void>;
|
|
21
|
+
addVirtualBlock(blockId: string, data: DocObject, maxWidth: number): Promise<void>;
|
|
21
22
|
addEmptyParagraph(): void;
|
|
22
23
|
}
|
|
23
24
|
export declare function convertBlocksOfDoc(parent: string, // 父节点,暂时只有list block需要这个
|