@ones-editor/editor 1.1.16 → 1.1.17-beta.2
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 +1 -0
- package/@ones-editor/context-menu/src/menu/index.d.ts +1 -0
- package/@ones-editor/core/src/core/blocks/complex-blocks/complex-block-helper.d.ts +2 -1
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +1 -0
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +1 -0
- package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +3 -1
- package/@ones-editor/core/src/core/types.d.ts +2 -0
- package/@ones-editor/core/src/utils/dom.d.ts +3 -0
- package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +195 -195
- package/package.json +2 -1
|
@@ -12,6 +12,7 @@ declare class OnesEditorContextMenu implements OnesEditorCustom {
|
|
|
12
12
|
private isInEditor;
|
|
13
13
|
private handleContextMenuShown;
|
|
14
14
|
private handleContextMenuClick;
|
|
15
|
+
private handleContextMenuClose;
|
|
15
16
|
private handleImageEmbedAction;
|
|
16
17
|
}
|
|
17
18
|
export default OnesEditorContextMenu;
|
|
@@ -2,8 +2,9 @@ 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 complexBlockGetFirstSimpleChild(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;
|
|
7
8
|
export declare function findPrevSimpleBlockBeforeChildContainer(editor: OnesEditor, childContainer: ContainerElement, options?: GetChildContainerOptions): BlockElement | null;
|
|
8
9
|
export declare function complexBlockGetTopChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
|
|
9
10
|
export declare function complexBlockGetBottomChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
|
|
@@ -27,6 +27,7 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
27
27
|
callbacks: EditorInputCallbacks;
|
|
28
28
|
inputElement: HTMLInputElement;
|
|
29
29
|
constructor(editor: OnesEditor, callbacks: EditorInputCallbacks);
|
|
30
|
+
private isInCommandbar;
|
|
30
31
|
destroy(): void;
|
|
31
32
|
getInput(): HTMLInputElement;
|
|
32
33
|
focus(): void;
|
|
@@ -34,6 +34,7 @@ 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;
|
|
37
38
|
uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
|
|
38
39
|
addResources(resourceIds: string[]): Promise<string[]>;
|
|
39
40
|
buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
import { EditorInputCallbacks } from '../composition/editor-input';
|
|
2
3
|
import { OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, RemoteChangeType, PasteOptions } from '../types';
|
|
3
4
|
import { DocObject } from '../doc';
|
|
@@ -18,7 +19,8 @@ export declare class EditorInputHandlers implements EditorInputCallbacks {
|
|
|
18
19
|
onPaste(event: ClipboardEvent): void;
|
|
19
20
|
onPasteText: (text: string, options?: PasteOptions) => Promise<void>;
|
|
20
21
|
onFocus(): void;
|
|
21
|
-
onBlur()
|
|
22
|
+
onBlur: import("lodash").DebouncedFunc<() => void>;
|
|
23
|
+
removeActiveForBlur: import("lodash").DebouncedFunc<() => void>;
|
|
22
24
|
addHandler(handler: OnesEditorInputHandler): void;
|
|
23
25
|
removeHandler(handler: OnesEditorInputHandler): void;
|
|
24
26
|
handleBeforeInsertText(containerId: string, blockIndex: number, offset: number, text: string): boolean;
|
|
@@ -398,6 +398,7 @@ export interface OnesEditorOptionalOptions {
|
|
|
398
398
|
colors?: string[];
|
|
399
399
|
scrollContainer?: HTMLElement;
|
|
400
400
|
enableComments?: boolean;
|
|
401
|
+
enableContextMenu?: boolean;
|
|
401
402
|
settingsProvider?: OnesEditorSettingsProvider;
|
|
402
403
|
}
|
|
403
404
|
export interface OnesEditorOptions {
|
|
@@ -406,6 +407,7 @@ export interface OnesEditorOptions {
|
|
|
406
407
|
[index: string]: unknown;
|
|
407
408
|
};
|
|
408
409
|
enableComments?: boolean;
|
|
410
|
+
enableContextMenu?: boolean;
|
|
409
411
|
scrollContainer?: HTMLElement;
|
|
410
412
|
}
|
|
411
413
|
export interface OnesEditorComponents {
|
|
@@ -33,4 +33,7 @@ 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;
|
|
36
39
|
export {};
|