@hufe921/canvas-editor 0.9.80 → 0.9.81
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 +29 -0
- package/dist/canvas-editor.es.js +129 -28
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +35 -35
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/command/Command.d.ts +1 -0
- package/dist/src/editor/core/command/CommandAdapt.d.ts +1 -0
- package/dist/src/editor/core/zone/ZoneTip.d.ts +1 -0
- package/dist/src/editor/interface/Editor.d.ts +1 -4
- package/dist/src/editor/interface/PageNumber.d.ts +1 -0
- package/dist/src/editor/interface/Position.d.ts +6 -1
- package/dist/src/editor/interface/Range.d.ts +2 -0
- package/dist/src/editor/utils/element.d.ts +9 -2
- package/package.json +1 -1
|
@@ -88,6 +88,7 @@ export declare class Command {
|
|
|
88
88
|
executeSetControlExtension: CommandAdapt['setControlExtension'];
|
|
89
89
|
executeSetControlProperties: CommandAdapt['setControlProperties'];
|
|
90
90
|
executeSetControlHighlight: CommandAdapt['setControlHighlight'];
|
|
91
|
+
executeLocationControl: CommandAdapt['locationControl'];
|
|
91
92
|
executeUpdateOptions: CommandAdapt['updateOptions'];
|
|
92
93
|
executeInsertTitle: CommandAdapt['insertTitle'];
|
|
93
94
|
getCatalog: CommandAdapt['getCatalog'];
|
|
@@ -141,6 +141,7 @@ export declare class CommandAdapt {
|
|
|
141
141
|
setControlHighlight(payload: ISetControlHighlightOption): void;
|
|
142
142
|
updateOptions(payload: IUpdateOption): void;
|
|
143
143
|
getControlList(): IElement[];
|
|
144
|
+
locationControl(controlId: string): void;
|
|
144
145
|
getContainer(): HTMLDivElement;
|
|
145
146
|
getTitleValue(payload: IGetTitleValueOption): IGetTitleValueResult | null;
|
|
146
147
|
insertTitle(payload: IElement): void;
|
|
@@ -83,11 +83,8 @@ export interface IEditorOption {
|
|
|
83
83
|
}
|
|
84
84
|
export interface IEditorResult {
|
|
85
85
|
version: string;
|
|
86
|
-
width: number;
|
|
87
|
-
height: number;
|
|
88
|
-
margins: IMargin;
|
|
89
|
-
watermark?: IWatermark;
|
|
90
86
|
data: IEditorData;
|
|
87
|
+
options: IEditorOption;
|
|
91
88
|
}
|
|
92
89
|
export interface IEditorHTML {
|
|
93
90
|
header: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IElement, ImageDisplay } from '..';
|
|
1
|
+
import { IElement, ImageDisplay, IRange } from '..';
|
|
2
2
|
import { EditorZone } from '../dataset/enum/Editor';
|
|
3
3
|
import { IElementPosition } from './Element';
|
|
4
4
|
import { IRow } from './Row';
|
|
@@ -85,3 +85,8 @@ export interface IFloatPosition {
|
|
|
85
85
|
tdValueIndex?: number;
|
|
86
86
|
zone?: EditorZone;
|
|
87
87
|
}
|
|
88
|
+
export interface ILocationPosition {
|
|
89
|
+
zone: EditorZone;
|
|
90
|
+
range: IRange;
|
|
91
|
+
positionContext: IPositionContext;
|
|
92
|
+
}
|
|
@@ -26,6 +26,8 @@ export type RangeContext = {
|
|
|
26
26
|
trIndex: number | null;
|
|
27
27
|
tdIndex: number | null;
|
|
28
28
|
tableElement: IElement | null;
|
|
29
|
+
selectionText: string | null;
|
|
30
|
+
selectionElementList: IElement[];
|
|
29
31
|
};
|
|
30
32
|
export interface IRangeParagraphInfo {
|
|
31
33
|
elementList: IElement[];
|
|
@@ -7,8 +7,14 @@ interface IFormatElementListOption {
|
|
|
7
7
|
}
|
|
8
8
|
export declare function formatElementList(elementList: IElement[], options: IFormatElementListOption): void;
|
|
9
9
|
export declare function isSameElementExceptValue(source: IElement, target: IElement): boolean;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
interface IPickElementOption {
|
|
11
|
+
extraPickAttrs?: Array<keyof IElement>;
|
|
12
|
+
}
|
|
13
|
+
export declare function pickElementAttr(payload: IElement, option?: IPickElementOption): IElement;
|
|
14
|
+
interface IZipElementListOption {
|
|
15
|
+
extraPickAttrs?: Array<keyof IElement>;
|
|
16
|
+
}
|
|
17
|
+
export declare function zipElementList(payload: IElement[], options?: IZipElementListOption): IElement[];
|
|
12
18
|
export declare function convertTextAlignToRowFlex(node: HTMLElement): RowFlex;
|
|
13
19
|
export declare function convertRowFlexToTextAlign(rowFlex: RowFlex): RowFlex.LEFT | RowFlex.CENTER | RowFlex.RIGHT | RowFlex.JUSTIFY | "justify";
|
|
14
20
|
export declare function convertRowFlexToJustifyContent(rowFlex: RowFlex): "center" | "flex-start" | "flex-end" | "space-between";
|
|
@@ -34,4 +40,5 @@ export declare function getElementListByHTML(htmlText: string, options: IGetElem
|
|
|
34
40
|
export declare function getTextFromElementList(elementList: IElement[]): string;
|
|
35
41
|
export declare function getSlimCloneElementList(elementList: IElement[]): IElement[];
|
|
36
42
|
export declare function getIsBlockElement(element?: IElement): boolean;
|
|
43
|
+
export declare function replaceHTMLElementTag(oldDom: HTMLElement, tagName: keyof HTMLElementTagNameMap): HTMLElement;
|
|
37
44
|
export {};
|