@ones-editor/editor 1.2.0-beta.7 → 1.2.0-beta.9
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/core/src/core/containers/root-container.d.ts +3 -3
- package/@ones-editor/core/src/core/selection/select-handler.d.ts +2 -2
- package/@ones-editor/core/src/core/types.d.ts +1 -1
- package/@ones-editor/core/src/utils/dom.d.ts +3 -0
- package/@ones-editor/mobile-helper/src/index.d.ts +2 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +114 -30
- package/package.json +1 -1
|
@@ -12,10 +12,10 @@ export declare class RootContainer {
|
|
|
12
12
|
destroy(): void;
|
|
13
13
|
handleContextMenu: (event: MouseEvent) => void;
|
|
14
14
|
handleResize: () => void;
|
|
15
|
-
handleClick: (event: MouseEvent) => void;
|
|
16
|
-
handleBlockClick: (event: MouseEvent, block: BlockElement, elem: Element) => void;
|
|
15
|
+
handleClick: (event: MouseEvent | TouchEvent) => void;
|
|
16
|
+
handleBlockClick: (event: MouseEvent | TouchEvent, block: BlockElement, elem: Element) => void;
|
|
17
17
|
handleDblClick: (event: MouseEvent) => void;
|
|
18
|
-
handleMouseDown: (event: MouseEvent) => void;
|
|
18
|
+
handleMouseDown: (event: TouchEvent | MouseEvent) => void;
|
|
19
19
|
handleMouseMove: (event: MouseEvent) => void;
|
|
20
20
|
handleMouseUp: (event: MouseEvent) => void;
|
|
21
21
|
handleCaptureClick: (event: MouseEvent) => void;
|
|
@@ -4,12 +4,12 @@ export declare class EditorSelectionHandler implements OnesEditorSelectionHandle
|
|
|
4
4
|
editor: OnesEditor;
|
|
5
5
|
startPos: BlockPosition | null;
|
|
6
6
|
lastCaretRect: DOMRect;
|
|
7
|
-
mouseDownEvent: MouseEvent | null;
|
|
7
|
+
mouseDownEvent: TouchEvent | MouseEvent | null;
|
|
8
8
|
autoScroll: AutoScroll | null;
|
|
9
9
|
constructor(editor: OnesEditor);
|
|
10
10
|
isSelecting(): boolean;
|
|
11
11
|
stopSelection(): void;
|
|
12
|
-
handleMouseDown: (event: MouseEvent, options: {
|
|
12
|
+
handleMouseDown: (event: MouseEvent | TouchEvent, options: {
|
|
13
13
|
autoScroll: boolean;
|
|
14
14
|
}) => void;
|
|
15
15
|
handleMouseMove: (event: MouseEvent) => void;
|
|
@@ -601,7 +601,7 @@ export interface OnesEditorInput {
|
|
|
601
601
|
export interface OnesEditorSelectionHandler {
|
|
602
602
|
isSelecting: () => boolean;
|
|
603
603
|
stopSelection: () => void;
|
|
604
|
-
handleMouseDown: (event: MouseEvent, options: {
|
|
604
|
+
handleMouseDown: (event: MouseEvent | TouchEvent, options: {
|
|
605
605
|
autoScroll: boolean;
|
|
606
606
|
}) => void;
|
|
607
607
|
handleMouseMove: (event: MouseEvent) => void;
|
|
@@ -37,4 +37,7 @@ export declare function bindKeyDownEvent(input: HTMLInputElement | HTMLTextAreaE
|
|
|
37
37
|
export declare function getElementFromPoint(x: number, y: number, options?: {
|
|
38
38
|
noFilter: boolean;
|
|
39
39
|
}): Element;
|
|
40
|
+
export declare function ensureIsMobileEvent(events: MouseEvent | TouchEvent): events is TouchEvent;
|
|
41
|
+
export declare function createMouseEventFromTouchEvent(event: TouchEvent, type: 'mousedown' | 'mousemove' | 'mouseup' | 'click'): MouseEvent;
|
|
42
|
+
export declare function bindTouchEnd(elem: HTMLElement | Document, callback: (e: any) => void): void;
|
|
40
43
|
export {};
|
|
@@ -8,6 +8,8 @@ export declare class OnesEditorMobileHelper implements OnesEditorCustom {
|
|
|
8
8
|
destroy(): void;
|
|
9
9
|
handleSelectionChange: () => void;
|
|
10
10
|
handleLongPress: (event: TouchEvent) => void;
|
|
11
|
+
private isMoving;
|
|
12
|
+
handleTouchMove: (event: TouchEvent) => void;
|
|
11
13
|
handleTouchStart: (event: TouchEvent) => void;
|
|
12
14
|
handleTouchEnd: (event: TouchEvent) => void;
|
|
13
15
|
}
|