@hufe921/canvas-editor 0.9.83 → 0.9.84
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/CHANGELOG.md +16 -0
- package/dist/canvas-editor.es.js +99 -73
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +39 -39
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/event/handlers/copy.d.ts +1 -1
- package/dist/src/editor/core/event/handlers/drop.d.ts +1 -1
- package/dist/src/editor/core/event/handlers/paste.d.ts +1 -1
- package/dist/src/editor/core/override/Override.d.ts +6 -3
- package/dist/src/editor/interface/Previewer.d.ts +1 -0
- package/dist/src/editor/interface/contextmenu/ContextMenu.d.ts +3 -0
- package/dist/src/editor/interface/table/Td.d.ts +2 -0
- package/dist/src/editor/utils/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
export declare function copy(host: CanvasEvent): void
|
|
2
|
+
export declare function copy(host: CanvasEvent): Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
export declare function drop(evt: DragEvent, host: CanvasEvent): void
|
|
2
|
+
export declare function drop(evt: DragEvent, host: CanvasEvent): Promise<void>;
|
|
@@ -4,5 +4,5 @@ import { CanvasEvent } from '../CanvasEvent';
|
|
|
4
4
|
export declare function pasteElement(host: CanvasEvent, elementList: IElement[]): void;
|
|
5
5
|
export declare function pasteHTML(host: CanvasEvent, htmlText: string): void;
|
|
6
6
|
export declare function pasteImage(host: CanvasEvent, file: File | Blob): void;
|
|
7
|
-
export declare function pasteByEvent(host: CanvasEvent, evt: ClipboardEvent): void
|
|
7
|
+
export declare function pasteByEvent(host: CanvasEvent, evt: ClipboardEvent): Promise<void>;
|
|
8
8
|
export declare function pasteByApi(host: CanvasEvent, options?: IPasteOption): Promise<void>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
export interface IOverrideResult {
|
|
2
|
+
preventDefault?: boolean;
|
|
3
|
+
}
|
|
1
4
|
export declare class Override {
|
|
2
|
-
paste: ((evt?: ClipboardEvent) => void) | undefined;
|
|
3
|
-
copy: (() => void) | undefined;
|
|
4
|
-
drop: ((evt: DragEvent) => void) | undefined;
|
|
5
|
+
paste: ((evt?: ClipboardEvent) => void | Promise<void> | IOverrideResult | Promise<IOverrideResult>) | undefined;
|
|
6
|
+
copy: (() => void | Promise<void> | IOverrideResult | Promise<IOverrideResult>) | undefined;
|
|
7
|
+
drop: ((evt: DragEvent) => void | Promise<void> | IOverrideResult | Promise<IOverrideResult>) | undefined;
|
|
5
8
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Command } from '../../core/command/Command';
|
|
2
2
|
import { EditorZone } from '../../dataset/enum/Editor';
|
|
3
|
+
import { DeepRequired } from '../Common';
|
|
4
|
+
import { IEditorOption } from '../Editor';
|
|
3
5
|
import { IElement } from '../Element';
|
|
4
6
|
export interface IContextMenuContext {
|
|
5
7
|
startElement: IElement | null;
|
|
@@ -13,6 +15,7 @@ export interface IContextMenuContext {
|
|
|
13
15
|
trIndex: number | null;
|
|
14
16
|
tdIndex: number | null;
|
|
15
17
|
tableElement: IElement | null;
|
|
18
|
+
options: DeepRequired<IEditorOption>;
|
|
16
19
|
}
|
|
17
20
|
export interface IRegisterContextMenu {
|
|
18
21
|
key?: string;
|
|
@@ -20,3 +20,4 @@ export declare function convertStringToBase64(input: string): string;
|
|
|
20
20
|
export declare function findScrollContainer(element: HTMLElement): HTMLElement;
|
|
21
21
|
export declare function isArrayEqual(arr1: unknown[], arr2: unknown[]): boolean;
|
|
22
22
|
export declare function isObjectEqual(obj1: unknown, obj2: unknown): boolean;
|
|
23
|
+
export declare function isPromiseFunction(fn: Function): boolean;
|