@hufe921/canvas-editor 0.9.90 → 0.9.91

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.
@@ -87,6 +87,7 @@ export declare class Draw {
87
87
  private listParticle;
88
88
  private lineBreakParticle;
89
89
  private control;
90
+ private pageBorder;
90
91
  private workerManager;
91
92
  private scrollObserver;
92
93
  private selectionObserver;
@@ -0,0 +1,9 @@
1
+ import { Draw } from '../Draw';
2
+ export declare class PageBorder {
3
+ private draw;
4
+ private header;
5
+ private footer;
6
+ private options;
7
+ constructor(draw: Draw);
8
+ render(ctx: CanvasRenderingContext2D): void;
9
+ }
@@ -1,3 +1,7 @@
1
1
  import { CanvasEvent } from '../CanvasEvent';
2
+ import { IElement } from '../../../interface/Element';
3
+ import { Draw } from '../../draw/Draw';
2
4
  export declare function setRangeCache(host: CanvasEvent): void;
5
+ export declare function hitCheckbox(element: IElement, draw: Draw): void;
6
+ export declare function hitRadio(element: IElement, draw: Draw): void;
3
7
  export declare function mousedown(evt: MouseEvent, host: CanvasEvent): void;
@@ -0,0 +1,2 @@
1
+ import { IPageBorderOption } from '../../interface/PageBorder';
2
+ export declare const defaultPageBorderOption: Readonly<Required<IPageBorderOption>>;
@@ -19,6 +19,7 @@ import { IZoneOption } from './Zone';
19
19
  import { ISeparatorOption } from './Separator';
20
20
  import { ITableOption } from './table/Table';
21
21
  import { ILineNumberOption } from './LineNumber';
22
+ import { IPageBorderOption } from './PageBorder';
22
23
  export interface IEditorData {
23
24
  header?: IElement[];
24
25
  main: IElement[];
@@ -83,6 +84,7 @@ export interface IEditorOption {
83
84
  lineBreak?: ILineBreakOption;
84
85
  separator?: ISeparatorOption;
85
86
  lineNumber?: ILineNumberOption;
87
+ pageBorder?: IPageBorderOption;
86
88
  }
87
89
  export interface IEditorResult {
88
90
  version: string;
@@ -0,0 +1,7 @@
1
+ import { IPadding } from './Common';
2
+ export interface IPageBorderOption {
3
+ color?: string;
4
+ lineWidth?: number;
5
+ padding?: IPadding;
6
+ disabled?: boolean;
7
+ }
@@ -3,6 +3,7 @@ import { DeepRequired } from '../interface/Common';
3
3
  export declare function unzipElementList(elementList: IElement[]): IElement[];
4
4
  interface IFormatElementListOption {
5
5
  isHandleFirstElement?: boolean;
6
+ isForceCompensation?: boolean;
6
7
  editorOptions: DeepRequired<IEditorOption>;
7
8
  }
8
9
  export declare function formatElementList(elementList: IElement[], options: IFormatElementListOption): void;
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.90",
5
+ "version": "0.9.91",
6
6
  "description": "rich text editor by canvas/svg",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/",