@hufe921/canvas-editor 0.9.81 → 0.9.82

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.
@@ -74,6 +74,7 @@ export declare class Command {
74
74
  executeSetPaperMargin: CommandAdapt['setPaperMargin'];
75
75
  executeInsertElementList: CommandAdapt['insertElementList'];
76
76
  executeAppendElementList: CommandAdapt['appendElementList'];
77
+ executeUpdateElementById: CommandAdapt['updateElementById'];
77
78
  executeSetValue: CommandAdapt['setValue'];
78
79
  executeRemoveControl: CommandAdapt['removeControl'];
79
80
  executeSetLocale: CommandAdapt['setLocale'];
@@ -10,7 +10,7 @@ import { DeepRequired } from '../../interface/Common';
10
10
  import { IGetControlValueOption, IGetControlValueResult, ISetControlExtensionOption, ISetControlHighlightOption, ISetControlProperties, ISetControlValueOption } from '../../interface/Control';
11
11
  import { IAppendElementListOption, IDrawImagePayload, IForceUpdateOption, IGetImageOption, IGetValueOption, IPainterOption } from '../../interface/Draw';
12
12
  import { IEditorData, IEditorHTML, IEditorOption, IEditorResult, IEditorText, IUpdateOption } from '../../interface/Editor';
13
- import { IElement } from '../../interface/Element';
13
+ import { IElement, IUpdateElementByIdOption } from '../../interface/Element';
14
14
  import { IPasteOption } from '../../interface/Event';
15
15
  import { IMargin } from '../../interface/Margin';
16
16
  import { IRange, RangeContext } from '../../interface/Range';
@@ -121,6 +121,7 @@ export declare class CommandAdapt {
121
121
  setPaperMargin(payload: IMargin): void;
122
122
  insertElementList(payload: IElement[]): void;
123
123
  appendElementList(elementList: IElement[], options?: IAppendElementListOption): void;
124
+ updateElementById(payload: IUpdateElementByIdOption): void;
124
125
  setValue(payload: Partial<IEditorData>): void;
125
126
  removeControl(): void;
126
127
  setLocale(payload: string): void;
@@ -25,6 +25,7 @@ export declare class Control {
25
25
  getIsRangeCanCaptureEvent(): boolean;
26
26
  getIsRangeInPostfix(): boolean;
27
27
  getIsRangeWithinControl(): boolean;
28
+ getIsElementListContainFullControl(elementList: IElement[]): boolean;
28
29
  getIsDisabledControl(): boolean;
29
30
  getContainer(): HTMLDivElement;
30
31
  getElementList(): IElement[];
@@ -1,4 +1,5 @@
1
1
  export declare class Override {
2
2
  paste: ((evt?: ClipboardEvent) => void) | undefined;
3
3
  copy: (() => void) | undefined;
4
+ drop: ((evt: DragEvent) => void) | undefined;
4
5
  }
@@ -137,3 +137,7 @@ export interface IElementFillRect {
137
137
  width: number;
138
138
  height: number;
139
139
  }
140
+ export interface IUpdateElementByIdOption {
141
+ id: string;
142
+ properties: Omit<IElement, 'id'>;
143
+ }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@hufe921/canvas-editor",
3
3
  "author": "Hufe",
4
4
  "license": "MIT",
5
- "version": "0.9.81",
5
+ "version": "0.9.82",
6
6
  "description": "rich text editor by canvas/svg",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/",