@hufe921/canvas-editor 0.9.49 → 0.9.51
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 +43 -0
- package/README.md +20 -8
- package/dist/canvas-editor.es.js +182 -23
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +18 -18
- 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 +2 -1
- package/dist/src/editor/core/draw/Draw.d.ts +1 -0
- package/dist/src/editor/core/draw/frame/Background.d.ts +1 -0
- package/dist/src/editor/core/draw/particle/table/TableParticle.d.ts +1 -0
- package/dist/src/editor/core/event/CanvasEvent.d.ts +1 -0
- package/dist/src/editor/core/position/Position.d.ts +1 -0
- package/dist/src/editor/dataset/enum/table/Table.d.ts +4 -0
- package/dist/src/editor/index.d.ts +2 -2
- package/dist/src/editor/interface/Editor.d.ts +1 -0
- package/dist/src/editor/interface/Range.d.ts +3 -1
- package/dist/src/editor/interface/table/Td.d.ts +2 -1
- package/dist/src/editor/utils/ua.d.ts +1 -0
- package/package.json +1 -1
|
@@ -42,6 +42,7 @@ export declare class Command {
|
|
|
42
42
|
executeTableTdVerticalAlign: CommandAdapt['tableTdVerticalAlign'];
|
|
43
43
|
executeTableBorderType: CommandAdapt['tableBorderType'];
|
|
44
44
|
executeTableTdBorderType: CommandAdapt['tableTdBorderType'];
|
|
45
|
+
executeTableTdSlashType: CommandAdapt['tableTdSlashType'];
|
|
45
46
|
executeTableTdBackgroundColor: CommandAdapt['tableTdBackgroundColor'];
|
|
46
47
|
executeTableSelectAll: CommandAdapt['tableSelectAll'];
|
|
47
48
|
executeImage: CommandAdapt['image'];
|
|
@@ -2,7 +2,7 @@ import { ImageDisplay } from '../../dataset/enum/Control';
|
|
|
2
2
|
import { EditorMode, PageMode, PaperDirection } from '../../dataset/enum/Editor';
|
|
3
3
|
import { ListStyle, ListType } from '../../dataset/enum/List';
|
|
4
4
|
import { RowFlex } from '../../dataset/enum/Row';
|
|
5
|
-
import { TableBorder, TdBorder } from '../../dataset/enum/table/Table';
|
|
5
|
+
import { TableBorder, TdBorder, TdSlash } from '../../dataset/enum/table/Table';
|
|
6
6
|
import { TitleLevel } from '../../dataset/enum/Title';
|
|
7
7
|
import { VerticalAlign } from '../../dataset/enum/VerticalAlign';
|
|
8
8
|
import { ICatalog } from '../../interface/Catalog';
|
|
@@ -71,6 +71,7 @@ export declare class CommandAdapt {
|
|
|
71
71
|
tableTdVerticalAlign(payload: VerticalAlign): void;
|
|
72
72
|
tableBorderType(payload: TableBorder): void;
|
|
73
73
|
tableTdBorderType(payload: TdBorder): void;
|
|
74
|
+
tableTdSlashType(payload: TdSlash): void;
|
|
74
75
|
tableTdBackgroundColor(payload: string): void;
|
|
75
76
|
tableSelectAll(): void;
|
|
76
77
|
hyperlink(payload: IElement): void;
|
|
@@ -111,6 +111,7 @@ export declare class Draw {
|
|
|
111
111
|
getMargins(): IMargin;
|
|
112
112
|
getOriginalMargins(): number[];
|
|
113
113
|
getPageGap(): number;
|
|
114
|
+
getOriginalPageGap(): number;
|
|
114
115
|
getPageNumberBottom(): number;
|
|
115
116
|
getMarginIndicatorSize(): number;
|
|
116
117
|
getDefaultBasicRowMarginHeight(): number;
|
|
@@ -10,6 +10,7 @@ export declare class TableParticle {
|
|
|
10
10
|
getTrListGroupByCol(payload: ITr[]): ITr[];
|
|
11
11
|
getRangeRowCol(): ITd[][] | null;
|
|
12
12
|
private _drawOuterBorder;
|
|
13
|
+
private _drawSlash;
|
|
13
14
|
private _drawBorder;
|
|
14
15
|
private _drawBackgroundColor;
|
|
15
16
|
computeRowColInfo(element: IElement): void;
|
|
@@ -14,6 +14,7 @@ export declare class Position {
|
|
|
14
14
|
getMainPositionList(): IElementPosition[];
|
|
15
15
|
getOriginalPositionList(): IElementPosition[];
|
|
16
16
|
getOriginalMainPositionList(): IElementPosition[];
|
|
17
|
+
getSelectionPositionList(): IElementPosition[] | null;
|
|
17
18
|
setPositionList(payload: IElementPosition[]): void;
|
|
18
19
|
computePageRowPosition(payload: IComputePageRowPositionPayload): IComputePageRowPositionResult;
|
|
19
20
|
computePositionList(): void;
|
|
@@ -17,7 +17,7 @@ import { BlockType } from './dataset/enum/Block';
|
|
|
17
17
|
import { IBlock } from './interface/Block';
|
|
18
18
|
import { ILang } from './interface/i18n/I18n';
|
|
19
19
|
import { VerticalAlign } from './dataset/enum/VerticalAlign';
|
|
20
|
-
import { TableBorder, TdBorder } from './dataset/enum/table/Table';
|
|
20
|
+
import { TableBorder, TdBorder, TdSlash } from './dataset/enum/table/Table';
|
|
21
21
|
import { MaxHeightRatio, NumberType } from './dataset/enum/Common';
|
|
22
22
|
import { TitleLevel } from './dataset/enum/Title';
|
|
23
23
|
import { ListStyle, ListType } from './dataset/enum/List';
|
|
@@ -38,5 +38,5 @@ export default class Editor {
|
|
|
38
38
|
use: UsePlugin;
|
|
39
39
|
constructor(container: HTMLDivElement, data: IEditorData | IElement[], options?: IEditorOption);
|
|
40
40
|
}
|
|
41
|
-
export { EDITOR_COMPONENT, LETTER_CLASS, Editor, RowFlex, VerticalAlign, EditorZone, EditorMode, ElementType, ControlType, EditorComponent, PageMode, ImageDisplay, Command, KeyMap, BlockType, PaperDirection, TableBorder, TdBorder, MaxHeightRatio, NumberType, TitleLevel, ListType, ListStyle, WordBreak };
|
|
41
|
+
export { EDITOR_COMPONENT, LETTER_CLASS, Editor, RowFlex, VerticalAlign, EditorZone, EditorMode, ElementType, ControlType, EditorComponent, PageMode, ImageDisplay, Command, KeyMap, BlockType, PaperDirection, TableBorder, TdBorder, TdSlash, MaxHeightRatio, NumberType, TitleLevel, ListType, ListStyle, WordBreak };
|
|
42
42
|
export type { IElement, IEditorData, IEditorOption, IEditorResult, IContextMenuContext, IRegisterContextMenu, IWatermark, INavigateInfo, IBlock, ILang, ICatalog, ICatalogItem, IRangeStyle };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditorZone } from '../dataset/enum/Editor';
|
|
2
|
-
import { IElement } from './Element';
|
|
2
|
+
import { IElement, IElementFillRect } from './Element';
|
|
3
3
|
export interface IRange {
|
|
4
4
|
startIndex: number;
|
|
5
5
|
endIndex: number;
|
|
@@ -13,10 +13,12 @@ export interface IRange {
|
|
|
13
13
|
}
|
|
14
14
|
export declare type RangeRowArray = Map<number, number[]>;
|
|
15
15
|
export declare type RangeRowMap = Map<number, Set<number>>;
|
|
16
|
+
export declare type RangeRect = IElementFillRect;
|
|
16
17
|
export declare type RangeContext = {
|
|
17
18
|
isCollapsed: boolean;
|
|
18
19
|
startElement: IElement;
|
|
19
20
|
endElement: IElement;
|
|
20
21
|
startPageNo: number;
|
|
21
22
|
endPageNo: number;
|
|
23
|
+
rangeRects: RangeRect[];
|
|
22
24
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VerticalAlign } from '../../dataset/enum/VerticalAlign';
|
|
2
|
-
import { TdBorder } from '../../dataset/enum/table/Table';
|
|
2
|
+
import { TdBorder, TdSlash } from '../../dataset/enum/table/Table';
|
|
3
3
|
import { IElement, IElementPosition } from '../Element';
|
|
4
4
|
import { IRow } from '../Row';
|
|
5
5
|
export interface ITd {
|
|
@@ -21,6 +21,7 @@ export interface ITd {
|
|
|
21
21
|
verticalAlign?: VerticalAlign;
|
|
22
22
|
backgroundColor?: string;
|
|
23
23
|
borderType?: TdBorder;
|
|
24
|
+
slashType?: TdSlash;
|
|
24
25
|
mainHeight?: number;
|
|
25
26
|
realHeight?: number;
|
|
26
27
|
realMinHeight?: number;
|