@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.
@@ -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;
@@ -131,6 +131,9 @@ export interface IImgCaptionOption {
131
131
  size?: number;
132
132
  top?: number;
133
133
  }
134
+ export interface IListOption {
135
+ inheritStyle?: boolean;
136
+ }
134
137
  export interface IImageBasic {
135
138
  imgDisplay?: ImageDisplay;
136
139
  imgFloatPosition?: {
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.125",
5
+ "version": "0.9.127",
6
6
  "description": "rich text editor by canvas/svg",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/",