@hufe921/canvas-editor 0.9.125 → 0.9.127
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 +33 -0
- package/README.md +4 -0
- package/dist/canvas-editor.es.js +105 -171
- 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 +2 -0
- package/dist/src/editor/core/command/CommandAdapt.d.ts +2 -0
- package/dist/src/editor/core/draw/particle/ListParticle.d.ts +2 -0
- package/dist/src/editor/dataset/constant/List.d.ts +2 -0
- package/dist/src/editor/interface/Editor.d.ts +2 -1
- package/dist/src/editor/interface/Element.d.ts +3 -0
- package/package.json +1 -1
|
@@ -114,6 +114,7 @@ export declare class Command {
|
|
|
114
114
|
executeUpdateOptions: CommandAdapt['updateOptions'];
|
|
115
115
|
executeInsertTitle: CommandAdapt['insertTitle'];
|
|
116
116
|
executeFocus: CommandAdapt['focus'];
|
|
117
|
+
executeComputeElementListHeight: CommandAdapt['computeElementListHeight'];
|
|
117
118
|
getCatalog: CommandAdapt['getCatalog'];
|
|
118
119
|
getImage: CommandAdapt['getImage'];
|
|
119
120
|
getOptions: CommandAdapt['getOptions'];
|
|
@@ -124,6 +125,7 @@ export declare class Command {
|
|
|
124
125
|
getText: CommandAdapt['getText'];
|
|
125
126
|
getWordCount: CommandAdapt['getWordCount'];
|
|
126
127
|
getCursorPosition: CommandAdapt['getCursorPosition'];
|
|
128
|
+
getRemainingContentHeight: CommandAdapt['getRemainingContentHeight'];
|
|
127
129
|
getRange: CommandAdapt['getRange'];
|
|
128
130
|
getRangeText: CommandAdapt['getRangeText'];
|
|
129
131
|
getRangeContext: CommandAdapt['getRangeContext'];
|
|
@@ -123,6 +123,8 @@ export declare class CommandAdapt {
|
|
|
123
123
|
getText(): IEditorText;
|
|
124
124
|
getWordCount(): Promise<number>;
|
|
125
125
|
getCursorPosition(): IElementPosition | null;
|
|
126
|
+
getRemainingContentHeight(): number;
|
|
127
|
+
computeElementListHeight(elementList: IElement[]): number;
|
|
126
128
|
getRange(): IRange;
|
|
127
129
|
getRangeText(): string;
|
|
128
130
|
getRangeContext(): RangeContext | null;
|
|
@@ -13,6 +13,8 @@ export declare class ListParticle {
|
|
|
13
13
|
setList(listType: ListType | null, listStyle?: ListStyle): void;
|
|
14
14
|
unsetList(): void;
|
|
15
15
|
computeListStyle(ctx: CanvasRenderingContext2D, elementList: IElement[]): Map<string, number>;
|
|
16
|
+
private findStyledElement;
|
|
17
|
+
private getListFontStyle;
|
|
16
18
|
getListStyleWidth(ctx: CanvasRenderingContext2D, listElementList: IElement[]): number;
|
|
17
19
|
drawListStyle(ctx: CanvasRenderingContext2D, row: IRow, position: IElementPosition): void;
|
|
18
20
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ListStyle, ListType, UlStyle } from '../enum/List';
|
|
2
|
+
import { IListOption } from '../../interface/Element';
|
|
3
|
+
export declare const defaultListOption: Readonly<Required<IListOption>>;
|
|
2
4
|
export declare const ulStyleMapping: Record<UlStyle, string>;
|
|
3
5
|
export declare const listTypeElementMapping: Record<ListType, string>;
|
|
4
6
|
export declare const listStyleCSSMapping: Record<ListStyle, string>;
|
|
@@ -8,7 +8,7 @@ import { IFooter } from './Footer';
|
|
|
8
8
|
import { IGroup } from './Group';
|
|
9
9
|
import { IHeader } from './Header';
|
|
10
10
|
import { ILabelOption } from './Label';
|
|
11
|
-
import { IImgCaptionOption } from './Element';
|
|
11
|
+
import { IImgCaptionOption, IListOption } from './Element';
|
|
12
12
|
import { ILineBreakOption } from './LineBreak';
|
|
13
13
|
import { IMargin } from './Margin';
|
|
14
14
|
import { IPageBreak } from './PageBreak';
|
|
@@ -103,6 +103,7 @@ export interface IEditorOption {
|
|
|
103
103
|
graffiti?: IGraffitiOption;
|
|
104
104
|
label?: ILabelOption;
|
|
105
105
|
imgCaption?: IImgCaptionOption;
|
|
106
|
+
list?: IListOption;
|
|
106
107
|
}
|
|
107
108
|
export interface IEditorResult {
|
|
108
109
|
version: string;
|
package/package.json
CHANGED