@hufe921/canvas-editor 0.9.87 → 0.9.88

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.
@@ -9,7 +9,7 @@ import { ICatalog } from '../../interface/Catalog';
9
9
  import { DeepRequired } from '../../interface/Common';
10
10
  import { IGetControlValueOption, IGetControlValueResult, ISetControlExtensionOption, ISetControlHighlightOption, ISetControlProperties, ISetControlValueOption } from '../../interface/Control';
11
11
  import { IAppendElementListOption, IDrawImagePayload, IForceUpdateOption, IGetImageOption, IGetValueOption, IPainterOption } from '../../interface/Draw';
12
- import { IEditorData, IEditorHTML, IEditorOption, IEditorResult, IEditorText, IUpdateOption } from '../../interface/Editor';
12
+ import { IEditorData, IEditorHTML, IEditorOption, IEditorResult, IEditorText, ISetValueOption, IUpdateOption } from '../../interface/Editor';
13
13
  import { IElement, IUpdateElementByIdOption } from '../../interface/Element';
14
14
  import { IPasteOption, IPositionContextByEvent } from '../../interface/Event';
15
15
  import { IMargin } from '../../interface/Margin';
@@ -123,7 +123,7 @@ export declare class CommandAdapt {
123
123
  insertElementList(payload: IElement[]): void;
124
124
  appendElementList(elementList: IElement[], options?: IAppendElementListOption): void;
125
125
  updateElementById(payload: IUpdateElementByIdOption): void;
126
- setValue(payload: Partial<IEditorData>): void;
126
+ setValue(payload: Partial<IEditorData>, options?: ISetValueOption): void;
127
127
  removeControl(): void;
128
128
  setLocale(payload: string): void;
129
129
  getLocale(): string;
@@ -1,5 +1,5 @@
1
1
  import { IAppendElementListOption, IComputeRowListPayload, IDrawOption, IDrawRowPayload, IGetImageOption, IGetValueOption, IPainterOption } from '../../interface/Draw';
2
- import { IEditorData, IEditorOption, IEditorResult } from '../../interface/Editor';
2
+ import { IEditorData, IEditorOption, IEditorResult, ISetValueOption } from '../../interface/Editor';
3
3
  import { IElement, IElementStyle } from '../../interface/Element';
4
4
  import { IRow } from '../../interface/Row';
5
5
  import { Cursor } from '../cursor/Cursor';
@@ -104,6 +104,7 @@ export declare class Draw {
104
104
  getMode(): EditorMode;
105
105
  setMode(payload: EditorMode): void;
106
106
  isReadonly(): boolean;
107
+ isDisabled(): boolean;
107
108
  getOriginalWidth(): number;
108
109
  getOriginalHeight(): number;
109
110
  getWidth(): number;
@@ -193,7 +194,7 @@ export declare class Draw {
193
194
  setPaperDirection(payload: PaperDirection): void;
194
195
  setPaperMargin(payload: IMargin): void;
195
196
  getValue(options?: IGetValueOption): IEditorResult;
196
- setValue(payload: Partial<IEditorData>): void;
197
+ setValue(payload: Partial<IEditorData>, options?: ISetValueOption): void;
197
198
  setEditorData(payload: Partial<IEditorData>): void;
198
199
  private _wrapContainer;
199
200
  private _formatContainer;
@@ -4,4 +4,5 @@ export interface IBackgroundOption {
4
4
  image?: string;
5
5
  size?: BackgroundSize;
6
6
  repeat?: BackgroundRepeat;
7
+ applyPageNumbers?: number[];
7
8
  }
@@ -94,3 +94,6 @@ export interface IEditorHTML {
94
94
  }
95
95
  export type IEditorText = IEditorHTML;
96
96
  export type IUpdateOption = Omit<IEditorOption, 'mode' | 'width' | 'height' | 'scale' | 'pageGap' | 'pageMode' | 'paperDirection' | 'historyMaxRecordCount' | 'scrollContainerSelector'>;
97
+ export interface ISetValueOption {
98
+ isSetCursor?: boolean;
99
+ }
@@ -11,6 +11,7 @@ export interface ITitleSizeOption {
11
11
  export type ITitleOption = ITitleSizeOption & {};
12
12
  export interface ITitleRule {
13
13
  deletable?: boolean;
14
+ disabled?: boolean;
14
15
  }
15
16
  export type ITitle = ITitleRule & {
16
17
  conceptId?: string;
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.87",
5
+ "version": "0.9.88",
6
6
  "description": "rich text editor by canvas/svg",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/",