@leafer-ui/interface 1.0.0-rc.28 → 1.0.0-rc.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/interface",
3
- "version": "1.0.0-rc.28",
3
+ "version": "1.0.0-rc.30",
4
4
  "description": "@leafer-ui/interface",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,6 +22,6 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/interface": "1.0.0-rc.28"
25
+ "@leafer/interface": "1.0.0-rc.30"
26
26
  }
27
27
  }
@@ -6,8 +6,8 @@ import { IDashPatternString, IShadowString, IColorString, IStrokeWidthString, IC
6
6
 
7
7
  // corner---
8
8
  export interface ICornerRadiusAttrData {
9
- cornerRadius: IFourNumber | ICornerRadiusString
10
- cornerSmoothing: INumber
9
+ cornerRadius?: IFourNumber | ICornerRadiusString
10
+ cornerSmoothing?: INumber
11
11
  }
12
12
  export interface ICornerRadiusInputData {
13
13
  cornerRadius?: IFourNumber | ICornerRadiusString
@@ -20,7 +20,7 @@ export interface ICornerRadiusComputedData {
20
20
 
21
21
  // fill---
22
22
  export interface IFillAttrData {
23
- fill: IFill
23
+ fill?: IFill
24
24
  }
25
25
  export interface IFillInputData {
26
26
  fill?: IFill
@@ -37,19 +37,19 @@ export interface IBorderComputedData {
37
37
 
38
38
  // stroke---
39
39
  export interface IStrokeAttrData {
40
- stroke: IStroke
40
+ stroke?: IStroke
41
41
 
42
- strokeAlign: IStrokeAlign
43
- strokeWidth: IFourNumber | IStrokeWidthString
44
- strokeWidthFixed: IBoolean
45
- strokeCap: IStrokeCap
46
- strokeJoin: IStrokeJoin
47
- dashPattern: INumber[] | IDashPatternString
48
- dashOffset: INumber
49
- miterLimit: INumber
42
+ strokeAlign?: IStrokeAlign
43
+ strokeWidth?: IFourNumber | IStrokeWidthString
44
+ strokeWidthFixed?: IBoolean
45
+ strokeCap?: IStrokeCap
46
+ strokeJoin?: IStrokeJoin
47
+ dashPattern?: INumber[] | IDashPatternString
48
+ dashOffset?: INumber
49
+ miterLimit?: INumber
50
50
 
51
- startArrow: IArrowType
52
- endArrow: IArrowType
51
+ startArrow?: IArrowType
52
+ endArrow?: IArrowType
53
53
  }
54
54
  export interface IStrokeInputData {
55
55
  stroke?: IStroke
@@ -85,23 +85,23 @@ export interface IStrokeComputedData {
85
85
 
86
86
  // text---
87
87
  export interface ITextStyleAttrData {
88
- fontFamily: IString
89
- fontSize: INumber
90
- fontWeight: IFontWeight
91
- italic: IBoolean
92
- textCase: ITextCase
93
- textDecoration: ITextDecoration
94
- letterSpacing: INumber | IUnitData
95
- lineHeight: INumber | IUnitData
88
+ fontFamily?: IString
89
+ fontSize?: INumber
90
+ fontWeight?: IFontWeight
91
+ italic?: IBoolean
92
+ textCase?: ITextCase
93
+ textDecoration?: ITextDecoration
94
+ letterSpacing?: INumber | IUnitData
95
+ lineHeight?: INumber | IUnitData
96
96
 
97
- paraIndent: INumber
98
- paraSpacing: INumber
97
+ paraIndent?: INumber
98
+ paraSpacing?: INumber
99
99
 
100
- textAlign: ITextAlign
101
- verticalAlign: IVerticalAlign
100
+ textAlign?: ITextAlign
101
+ verticalAlign?: IVerticalAlign
102
102
 
103
- textWrap: ITextWrap
104
- textOverflow: IOverflow | string
103
+ textWrap?: ITextWrap
104
+ textOverflow?: IOverflow | string
105
105
  }
106
106
  export interface ITextStyleInputData {
107
107
  fontFamily?: IString
@@ -144,11 +144,11 @@ export interface ITextStyleComputedData {
144
144
 
145
145
  // effect---
146
146
  export interface IEffectAttrData {
147
- shadow: IShadowEffect | IShadowEffect[] | IShadowString
148
- innerShadow: IShadowEffect | IShadowEffect[] | IShadowString
149
- blur: INumber | IBlurEffect
150
- backgroundBlur: INumber | IBlurEffect
151
- grayscale: INumber | IGrayscaleEffect
147
+ shadow?: IShadowEffect | IShadowEffect[] | IShadowString
148
+ innerShadow?: IShadowEffect | IShadowEffect[] | IShadowString
149
+ blur?: INumber | IBlurEffect
150
+ backgroundBlur?: INumber | IBlurEffect
151
+ grayscale?: INumber | IGrayscaleEffect
152
152
  }
153
153
  export interface IEffectInputData {
154
154
  shadow?: IShadowEffect | IShadowEffect[] | IShadowString
package/src/IUI.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ILeaf, ILeafComputedData, ILeafData, ILeafInputData, ILeaferCanvas, IRenderOptions, IExportOptions, IExportResult, IPathDrawer, IPointData, IPathCommandData, ILeaferImageConfig, IBoundsData, IObject, IPathString, ILeaferImage, IPathCreator, IAnswer, IPickOptions, IPickResult, IValue, ICanvasContext2DSettings, IFourNumber, IFindCondition, IBoolean } from '@leafer/interface'
1
+ import { ILeaf, ILeafComputedData, ILeafData, ILeafInputData, ILeaferCanvas, IRenderOptions, IExportOptions, IExportResult, IPathDrawer, IPointData, IPathCommandData, ILeaferImageConfig, IBoundsData, IObject, IPathString, ILeaferImage, IPathCreator, IAnswer, IPickOptions, IPickResult, IValue, ICanvasContext2DSettings, IFourNumber, IFindCondition, IBoolean, ICanvasContext2D, IJSONOptions, IMatrixData } from '@leafer/interface'
2
2
 
3
3
  import {
4
4
  IFillAttrData, IFillInputData, IFillComputedData,
@@ -15,9 +15,9 @@ import { IEditorConfig } from './editor/IEditor'
15
15
  // Line
16
16
  export interface ILine extends IUI {
17
17
  __: ILineData
18
- toPoint: IPointData
19
- points: number[]
20
- curve: boolean | number
18
+ toPoint?: IPointData
19
+ points?: number[]
20
+ curve?: boolean | number
21
21
  }
22
22
 
23
23
  interface ILineAttrData {
@@ -63,9 +63,9 @@ export interface IRectInputData extends IUIBaseInputData { }
63
63
  // Ellipse
64
64
  export interface IEllipse extends IUI {
65
65
  __: IEllipseData
66
- startAngle: number
67
- endAngle: number
68
- innerRadius: number
66
+ startAngle?: number
67
+ endAngle?: number
68
+ innerRadius?: number
69
69
  }
70
70
  interface IEllipseAttrData {
71
71
  startAngle?: number
@@ -79,9 +79,9 @@ export interface IEllipseInputData extends IEllipseAttrData, IUIBaseInputData {
79
79
  // Polygon
80
80
  export interface IPolygon extends IUI {
81
81
  __: IPolygonData
82
- sides: number
83
- points: number[]
84
- curve: boolean | number
82
+ sides?: number
83
+ points?: number[]
84
+ curve?: boolean | number
85
85
  }
86
86
  interface IPolygonAttrData {
87
87
  sides?: number
@@ -95,8 +95,8 @@ export interface IPolygonInputData extends IPolygonAttrData, IUIBaseInputData {
95
95
  // Star
96
96
  export interface IStar extends IUI {
97
97
  __: IStarData
98
- corners: number
99
- innerRadius: number
98
+ corners?: number
99
+ innerRadius?: number
100
100
  }
101
101
  interface IStarAttrData {
102
102
  corners?: number
@@ -132,9 +132,9 @@ export interface IPenInputData extends IGroupInputData { }
132
132
  // Text
133
133
  export interface IText extends ITextStyleAttrData, IUI {
134
134
  __: ITextData
135
- text: string
136
- padding: IFourNumber
137
- resizeFontSize: IBoolean
135
+ text?: string
136
+ padding?: IFourNumber
137
+ resizeFontSize?: IBoolean
138
138
  }
139
139
  interface ITextAttrData {
140
140
  text?: string
@@ -215,9 +215,10 @@ export interface IImageInputData extends IImageAttrData, IUIBaseInputData { }
215
215
 
216
216
  export interface ICanvas extends IRect {
217
217
  __: ICanvasData
218
- smooth: boolean
219
- contextSettings: ICanvasContext2DSettings
220
- canvas: ILeaferCanvas
218
+ smooth?: boolean
219
+ contextSettings?: ICanvasContext2DSettings
220
+ canvas?: ILeaferCanvas
221
+ context?: ICanvasContext2D
221
222
  __updateSize(): void
222
223
  }
223
224
  interface ICanvasAttrData {
@@ -259,8 +260,8 @@ export interface IFrameInputData extends IBoxInputData {
259
260
  // Box
260
261
  export interface IBox extends IGroup {
261
262
  __: IBoxData
262
- resizeChildren: IBoolean
263
- overflow: IOverflow
263
+ resizeChildren?: IBoolean
264
+ overflow?: IOverflow
264
265
  __updateRectRenderBounds(): void
265
266
  __renderGroup(canvas: ILeaferCanvas, options: IRenderOptions): void
266
267
  }
@@ -301,17 +302,17 @@ export interface IUI extends IFillAttrData, IStrokeAttrData, ICornerRadiusAttrDa
301
302
  zoomLayer?: IGroup
302
303
  readonly isFrame?: boolean
303
304
 
304
- proxyData: IUIInputData
305
+ proxyData?: IUIInputData
305
306
  __proxyData?: IUIInputData
306
307
 
307
- normalStyle: IUIInputData
308
- hoverStyle: IUIInputData
309
- pressStyle: IUIInputData
310
- focusStyle: IUIInputData
311
- selectedStyle: IUIInputData
312
- disabledStyle: IUIInputData
308
+ normalStyle?: IUIInputData
309
+ hoverStyle?: IUIInputData
310
+ pressStyle?: IUIInputData
311
+ focusStyle?: IUIInputData
312
+ selectedStyle?: IUIInputData
313
+ disabledStyle?: IUIInputData
313
314
 
314
- editConfig: IEditorConfig
315
+ editConfig?: IEditorConfig
315
316
  editOuter: string
316
317
  editInner: string
317
318
 
@@ -322,7 +323,7 @@ export interface IUI extends IFillAttrData, IStrokeAttrData, ICornerRadiusAttrDa
322
323
  reset(data?: IUIInputData): void
323
324
 
324
325
  set(data: IUIInputData): void
325
- toJSON(): IUIInputData
326
+ toJSON(options?: IJSONOptions): IUIJSONData
326
327
 
327
328
  get(name?: string | string[] | IUIInputData): IUIInputData | IValue
328
329
  createProxyData(): IUIInputData
@@ -427,4 +428,8 @@ export type IUITag =
427
428
 
428
429
  export interface IUIInputData extends IRectInputData, IEllipseInputData, IPolygonInputData, IStarInputData, ILineInputData, IPathInputData, ITextInputData, IImageInputData, IGroupInputData, IFrameInputData, IUIBaseInputData, IObject {
429
430
  children?: IUIInputData[]
431
+ }
432
+
433
+ export interface IUIJSONData extends IUIInputData {
434
+ matrix?: IMatrixData
430
435
  }
@@ -1,11 +1,11 @@
1
- import { IGroup, IUI, IBox, IRectInputData, ISelectorProxy, IEditSize, ICursorType, IAlign, IUnitPointData, IDragEvent, IRotateEvent, IStroke, IFill, ILeaf, ILeafList, IObject, IBoxInputData, IGroupInputData, IImageCursor, IRect, IBoundsData, IKeyEvent, IUIInputData, IZoomEvent } from '@leafer-ui/interface'
1
+ import { IGroup, IUI, IBox, IRectInputData, ISelectorProxy, IEditSize, ICursorType, IAlign, IUnitPointData, IDragEvent, IRotateEvent, IStroke, IFill, ILeaf, ILeafList, IObject, IBoxInputData, IGroupInputData, IImageCursor, IRect, IBoundsData, IKeyEvent, IUIInputData, IZoomEvent, IColorString } from '@leafer-ui/interface'
2
2
 
3
3
  export interface IEditorBase extends IGroup, ISelectorProxy {
4
4
  config: IEditorConfig
5
5
  readonly mergeConfig: IEditorConfig // 实际使用,合并了选中元素上的editConfig
6
6
 
7
- hoverTarget: IUI
8
- target: IUI | IUI[]
7
+ hoverTarget?: IUI
8
+ target?: IUI | IUI[]
9
9
 
10
10
  readonly list: IUI[]
11
11
  leafList: ILeafList
@@ -20,13 +20,13 @@ export interface IEditorBase extends IGroup, ISelectorProxy {
20
20
 
21
21
  readonly dragging: boolean
22
22
 
23
- element: IUI
23
+ element?: IUI
24
24
  buttons: IGroup
25
25
 
26
26
  selector: IGroup
27
27
  editBox: IEditBoxBase
28
- editTool: IObject
29
- innerEditor: IObject
28
+ editTool?: IObject
29
+ innerEditor?: IObject
30
30
 
31
31
  select(target: IUI | IUI[]): void
32
32
  cancel(): void
@@ -80,6 +80,7 @@ export interface IEditorConfig {
80
80
 
81
81
  rect?: IBoxInputData
82
82
  area?: IRectInputData
83
+ mask?: IColorString
83
84
 
84
85
  buttonsDirection?: 'top' | 'right' | 'bottom' | 'left'
85
86
  buttonsFixed?: boolean
package/src/index.ts CHANGED
@@ -22,7 +22,7 @@ export {
22
22
  ILeaferInputData, ILeaferData,
23
23
  IAppInputData, IAppData,
24
24
  IUI, IUIBaseInputData, IUIData, IFindUIMethod,
25
- IUITag, IUIInputData
25
+ IUITag, IUIInputData, IUIJSONData
26
26
  } from './IUI'
27
27
 
28
28
  export { IVectorPath, IShadowEffect, IBlurEffect, IGrayscaleEffect, IFill, IStroke, IPaintAttr, IStrokeAlign, IStrokeJoin, IStrokeCap, IArrowType, IPathDataArrow, IPathDataArrowMap, IRGB, IRGBA, IColor, IColorStop, IPaint, IGradientPaint, IImagePaint, IImagePaintMode, IFontWeight, ITextCase, ITextDecoration, ITextAlign, IVerticalAlign, IOverflow, ITextWrap, IRepeat } from './type/IType'
package/types/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, ISizeData, IPathCommandData, IWindingRule, IBlendMode, IMatrixData, ILeaferImage, ITaskItem, IBoolean, INumber, IString, IUnitData, IPathCreator, IBoundsData as IBoundsData$1, ILeaferImageConfig, ICanvasContext2DSettings, ILeaferCanvas, IRenderOptions, IPickOptions, IPickResult, ILeaf as ILeaf$1, IValue, IFindCondition, IPathString, IPathDrawer, IExportOptions, IExportResult, IAnswer, ILeafData, ILeafComputedData, ILeafInputData, IObject as IObject$1, ILeaferAttrData, IControl, ILeaferConfig, ILeaferType, ILeafRender, ILeafBounds, ILeafHit, IStateStyleType, ICachedLeaf, IBooleanMap, IAround } from '@leafer/interface';
1
+ import { IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, ISizeData, IPathCommandData, IWindingRule, IBlendMode, IMatrixData, ILeaferImage, ITaskItem, IBoolean, INumber, IString, IUnitData, IPathCreator, IBoundsData as IBoundsData$1, ILeaferImageConfig, ICanvasContext2DSettings, ILeaferCanvas, ICanvasContext2D, IRenderOptions, IPickOptions, IPickResult, ILeaf as ILeaf$1, IJSONOptions, IValue, IFindCondition, IPathString, IPathDrawer, IExportOptions, IExportResult, IAnswer, ILeafData, ILeafComputedData, ILeafInputData, IObject as IObject$1, ILeaferAttrData, IControl, ILeaferConfig, ILeaferType, ILeafRender, ILeafBounds, ILeafHit, IStateStyleType, ICachedLeaf, IBooleanMap, IAround } from '@leafer/interface';
2
2
  export * from '@leafer/interface';
3
- import { IGroup as IGroup$1, ISelectorProxy, IUI as IUI$1, ILeafList, IObject, ILeaf, IEditSize, IDragEvent, IZoomEvent, IRotateEvent, IGroupInputData as IGroupInputData$1, IStroke as IStroke$1, IFill as IFill$1, IBoxInputData as IBoxInputData$1, IRectInputData as IRectInputData$1, ICursorType, IImageCursor, IAlign as IAlign$1, IUnitPointData as IUnitPointData$1, IUIInputData as IUIInputData$1, IBox as IBox$1, IRect as IRect$1, IBoundsData, IKeyEvent } from '@leafer-ui/interface';
3
+ import { IGroup as IGroup$1, ISelectorProxy, IUI as IUI$1, ILeafList, IObject, ILeaf, IEditSize, IDragEvent, IZoomEvent, IRotateEvent, IGroupInputData as IGroupInputData$1, IStroke as IStroke$1, IFill as IFill$1, IBoxInputData as IBoxInputData$1, IRectInputData as IRectInputData$1, IColorString as IColorString$1, ICursorType, IImageCursor, IAlign as IAlign$1, IUnitPointData as IUnitPointData$1, IUIInputData as IUIInputData$1, IBox as IBox$1, IRect as IRect$1, IBoundsData, IKeyEvent } from '@leafer-ui/interface';
4
4
 
5
5
  type IPercent = string;
6
6
  type IColorString = string;
@@ -167,8 +167,8 @@ interface ILeafShadowEffect {
167
167
  }
168
168
 
169
169
  interface ICornerRadiusAttrData {
170
- cornerRadius: IFourNumber | ICornerRadiusString;
171
- cornerSmoothing: INumber;
170
+ cornerRadius?: IFourNumber | ICornerRadiusString;
171
+ cornerSmoothing?: INumber;
172
172
  }
173
173
  interface ICornerRadiusInputData {
174
174
  cornerRadius?: IFourNumber | ICornerRadiusString;
@@ -179,7 +179,7 @@ interface ICornerRadiusComputedData {
179
179
  cornerSmoothing?: number;
180
180
  }
181
181
  interface IFillAttrData {
182
- fill: IFill;
182
+ fill?: IFill;
183
183
  }
184
184
  interface IFillInputData {
185
185
  fill?: IFill;
@@ -192,17 +192,17 @@ interface IBorderComputedData {
192
192
  borderRadius?: number | number[];
193
193
  }
194
194
  interface IStrokeAttrData {
195
- stroke: IStroke;
196
- strokeAlign: IStrokeAlign;
197
- strokeWidth: IFourNumber | IStrokeWidthString;
198
- strokeWidthFixed: IBoolean;
199
- strokeCap: IStrokeCap;
200
- strokeJoin: IStrokeJoin;
201
- dashPattern: INumber[] | IDashPatternString;
202
- dashOffset: INumber;
203
- miterLimit: INumber;
204
- startArrow: IArrowType;
205
- endArrow: IArrowType;
195
+ stroke?: IStroke;
196
+ strokeAlign?: IStrokeAlign;
197
+ strokeWidth?: IFourNumber | IStrokeWidthString;
198
+ strokeWidthFixed?: IBoolean;
199
+ strokeCap?: IStrokeCap;
200
+ strokeJoin?: IStrokeJoin;
201
+ dashPattern?: INumber[] | IDashPatternString;
202
+ dashOffset?: INumber;
203
+ miterLimit?: INumber;
204
+ startArrow?: IArrowType;
205
+ endArrow?: IArrowType;
206
206
  }
207
207
  interface IStrokeInputData {
208
208
  stroke?: IStroke;
@@ -232,20 +232,20 @@ interface IStrokeComputedData {
232
232
  endArrow?: IArrowType;
233
233
  }
234
234
  interface ITextStyleAttrData {
235
- fontFamily: IString;
236
- fontSize: INumber;
237
- fontWeight: IFontWeight;
238
- italic: IBoolean;
239
- textCase: ITextCase;
240
- textDecoration: ITextDecoration;
241
- letterSpacing: INumber | IUnitData;
242
- lineHeight: INumber | IUnitData;
243
- paraIndent: INumber;
244
- paraSpacing: INumber;
245
- textAlign: ITextAlign;
246
- verticalAlign: IVerticalAlign;
247
- textWrap: ITextWrap;
248
- textOverflow: IOverflow | string;
235
+ fontFamily?: IString;
236
+ fontSize?: INumber;
237
+ fontWeight?: IFontWeight;
238
+ italic?: IBoolean;
239
+ textCase?: ITextCase;
240
+ textDecoration?: ITextDecoration;
241
+ letterSpacing?: INumber | IUnitData;
242
+ lineHeight?: INumber | IUnitData;
243
+ paraIndent?: INumber;
244
+ paraSpacing?: INumber;
245
+ textAlign?: ITextAlign;
246
+ verticalAlign?: IVerticalAlign;
247
+ textWrap?: ITextWrap;
248
+ textOverflow?: IOverflow | string;
249
249
  }
250
250
  interface ITextStyleInputData {
251
251
  fontFamily?: IString;
@@ -280,11 +280,11 @@ interface ITextStyleComputedData {
280
280
  textOverflow?: IOverflow | string;
281
281
  }
282
282
  interface IEffectAttrData {
283
- shadow: IShadowEffect | IShadowEffect[] | IShadowString;
284
- innerShadow: IShadowEffect | IShadowEffect[] | IShadowString;
285
- blur: INumber | IBlurEffect;
286
- backgroundBlur: INumber | IBlurEffect;
287
- grayscale: INumber | IGrayscaleEffect;
283
+ shadow?: IShadowEffect | IShadowEffect[] | IShadowString;
284
+ innerShadow?: IShadowEffect | IShadowEffect[] | IShadowString;
285
+ blur?: INumber | IBlurEffect;
286
+ backgroundBlur?: INumber | IBlurEffect;
287
+ grayscale?: INumber | IGrayscaleEffect;
288
288
  }
289
289
  interface IEffectInputData {
290
290
  shadow?: IShadowEffect | IShadowEffect[] | IShadowString;
@@ -304,8 +304,8 @@ interface IEffectComputedData {
304
304
  interface IEditorBase extends IGroup$1, ISelectorProxy {
305
305
  config: IEditorConfig;
306
306
  readonly mergeConfig: IEditorConfig;
307
- hoverTarget: IUI$1;
308
- target: IUI$1 | IUI$1[];
307
+ hoverTarget?: IUI$1;
308
+ target?: IUI$1 | IUI$1[];
309
309
  readonly list: IUI$1[];
310
310
  leafList: ILeafList;
311
311
  openedGroupList: ILeafList;
@@ -315,12 +315,12 @@ interface IEditorBase extends IGroup$1, ISelectorProxy {
315
315
  readonly multiple: boolean;
316
316
  readonly single: boolean;
317
317
  readonly dragging: boolean;
318
- element: IUI$1;
318
+ element?: IUI$1;
319
319
  buttons: IGroup$1;
320
320
  selector: IGroup$1;
321
321
  editBox: IEditBoxBase;
322
- editTool: IObject;
323
- innerEditor: IObject;
322
+ editTool?: IObject;
323
+ innerEditor?: IObject;
324
324
  select(target: IUI$1 | IUI$1[]): void;
325
325
  cancel(): void;
326
326
  hasItem(item: IUI$1): boolean;
@@ -360,6 +360,7 @@ interface IEditorConfig {
360
360
  rotatePoint?: IBoxInputData$1;
361
361
  rect?: IBoxInputData$1;
362
362
  area?: IRectInputData$1;
363
+ mask?: IColorString$1;
363
364
  buttonsDirection?: 'top' | 'right' | 'bottom' | 'left';
364
365
  buttonsFixed?: boolean;
365
366
  buttonsMargin?: number;
@@ -422,9 +423,9 @@ interface IEditToolFunction {
422
423
 
423
424
  interface ILine extends IUI {
424
425
  __: ILineData;
425
- toPoint: IPointData;
426
- points: number[];
427
- curve: boolean | number;
426
+ toPoint?: IPointData;
427
+ points?: number[];
428
+ curve?: boolean | number;
428
429
  }
429
430
  interface ILineAttrData {
430
431
  toPoint?: IPointData;
@@ -462,9 +463,9 @@ interface IRectInputData extends IUIBaseInputData {
462
463
  }
463
464
  interface IEllipse extends IUI {
464
465
  __: IEllipseData;
465
- startAngle: number;
466
- endAngle: number;
467
- innerRadius: number;
466
+ startAngle?: number;
467
+ endAngle?: number;
468
+ innerRadius?: number;
468
469
  }
469
470
  interface IEllipseAttrData {
470
471
  startAngle?: number;
@@ -477,9 +478,9 @@ interface IEllipseInputData extends IEllipseAttrData, IUIBaseInputData {
477
478
  }
478
479
  interface IPolygon extends IUI {
479
480
  __: IPolygonData;
480
- sides: number;
481
- points: number[];
482
- curve: boolean | number;
481
+ sides?: number;
482
+ points?: number[];
483
+ curve?: boolean | number;
483
484
  }
484
485
  interface IPolygonAttrData {
485
486
  sides?: number;
@@ -492,8 +493,8 @@ interface IPolygonInputData extends IPolygonAttrData, IUIBaseInputData {
492
493
  }
493
494
  interface IStar extends IUI {
494
495
  __: IStarData;
495
- corners: number;
496
- innerRadius: number;
496
+ corners?: number;
497
+ innerRadius?: number;
497
498
  }
498
499
  interface IStarAttrData {
499
500
  corners?: number;
@@ -523,9 +524,9 @@ interface IPenInputData extends IGroupInputData {
523
524
  }
524
525
  interface IText extends ITextStyleAttrData, IUI {
525
526
  __: ITextData;
526
- text: string;
527
- padding: IFourNumber;
528
- resizeFontSize: IBoolean;
527
+ text?: string;
528
+ padding?: IFourNumber;
529
+ resizeFontSize?: IBoolean;
529
530
  }
530
531
  interface ITextAttrData {
531
532
  text?: string;
@@ -596,9 +597,10 @@ interface IImageInputData extends IImageAttrData, IUIBaseInputData {
596
597
  }
597
598
  interface ICanvas extends IRect {
598
599
  __: ICanvasData;
599
- smooth: boolean;
600
- contextSettings: ICanvasContext2DSettings;
601
- canvas: ILeaferCanvas;
600
+ smooth?: boolean;
601
+ contextSettings?: ICanvasContext2DSettings;
602
+ canvas?: ILeaferCanvas;
603
+ context?: ICanvasContext2D;
602
604
  __updateSize(): void;
603
605
  }
604
606
  interface ICanvasAttrData {
@@ -626,8 +628,8 @@ interface IFrameInputData extends IBoxInputData {
626
628
  }
627
629
  interface IBox extends IGroup {
628
630
  __: IBoxData;
629
- resizeChildren: IBoolean;
630
- overflow: IOverflow;
631
+ resizeChildren?: IBoolean;
632
+ overflow?: IOverflow;
631
633
  __updateRectRenderBounds(): void;
632
634
  __renderGroup(canvas: ILeaferCanvas, options: IRenderOptions): void;
633
635
  }
@@ -663,22 +665,22 @@ interface IUI extends IFillAttrData, IStrokeAttrData, ICornerRadiusAttrData, IEf
663
665
  parent?: IGroup;
664
666
  zoomLayer?: IGroup;
665
667
  readonly isFrame?: boolean;
666
- proxyData: IUIInputData;
668
+ proxyData?: IUIInputData;
667
669
  __proxyData?: IUIInputData;
668
- normalStyle: IUIInputData;
669
- hoverStyle: IUIInputData;
670
- pressStyle: IUIInputData;
671
- focusStyle: IUIInputData;
672
- selectedStyle: IUIInputData;
673
- disabledStyle: IUIInputData;
674
- editConfig: IEditorConfig;
670
+ normalStyle?: IUIInputData;
671
+ hoverStyle?: IUIInputData;
672
+ pressStyle?: IUIInputData;
673
+ focusStyle?: IUIInputData;
674
+ selectedStyle?: IUIInputData;
675
+ disabledStyle?: IUIInputData;
676
+ editConfig?: IEditorConfig;
675
677
  editOuter: string;
676
678
  editInner: string;
677
679
  children?: IUI[];
678
680
  readonly pen: IPathCreator;
679
681
  reset(data?: IUIInputData): void;
680
682
  set(data: IUIInputData): void;
681
- toJSON(): IUIInputData;
683
+ toJSON(options?: IJSONOptions): IUIJSONData;
682
684
  get(name?: string | string[] | IUIInputData): IUIInputData | IValue;
683
685
  createProxyData(): IUIInputData;
684
686
  find(condition: number | string | IFindCondition | IFindUIMethod, options?: any): IUI[];
@@ -740,6 +742,9 @@ type IUITag = 'App' | 'Leafer' | 'Rect' | 'Ellipse' | 'Polygon' | 'Star' | 'Line
740
742
  interface IUIInputData extends IRectInputData, IEllipseInputData, IPolygonInputData, IStarInputData, ILineInputData, IPathInputData, ITextInputData, IImageInputData, IGroupInputData, IFrameInputData, IUIBaseInputData, IObject$1 {
741
743
  children?: IUIInputData[];
742
744
  }
745
+ interface IUIJSONData extends IUIInputData {
746
+ matrix?: IMatrixData;
747
+ }
743
748
 
744
749
  interface ILeafer extends IGroup, ILeaferAttrData, IControl {
745
750
  readonly isApp: boolean;
@@ -863,4 +868,4 @@ interface IEffectModule {
863
868
  backgroundBlur(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void;
864
869
  }
865
870
 
866
- export type { IApp, IAppConfig, IAppData, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, ICornerRadiusString, IDashPatternString, IEditBoxBase, IEditPoint, IEditPointType, IEditToolFunction, IEditorBase, IEditorConfig, IEditorConfigFunction, IEffectAttrData, IEffectComputedData, IEffectInputData, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IFill, IFindUIMethod, IFlow, IFlowData, IFlowInputData, IFontWeight, IFrame, IFrameData, IFrameInputData, IFrameRenderModule, IGradientPaint, IGrayscaleEffect, IGroup, IGroupData, IGroupInputData, IGroupRenderModule, IImage, IImageData, IImageInputData, IImagePaint, IImagePaintMode, IImageRenderModule, ILeafFill, ILeafPaint, ILeafPaintColor, ILeafPaintPatternData, ILeafShadowEffect, ILeafStrokePaint, ILeafer, ILeaferData, ILeaferInputData, ILine, ILineData, ILineInputData, IOverflow, IPaint, IPaintAttr, IPaintGradientModule, IPaintImageModule, IPaintModule, IPaintString, IPath, IPathArrowModule, IPathData, IPathDataArrow, IPathDataArrowMap, IPathInputData, IPen, IPenData, IPenInputData, IPercent, IPolygon, IPolygonData, IPolygonInputData, IRGB, IRGBA, IRect, IRectData, IRectInputData, IRectRenderModule, IRepeat, IShadowEffect, IShadowString, IStar, IStarData, IStarInputData, IStateModule, IStroke, IStrokeAlign, IStrokeAttrData, IStrokeCap, IStrokeComputedData, IStrokeInputData, IStrokeJoin, IStrokeWidthString, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDrawData, ITextInputData, ITextRenderModule, ITextRowData, ITextStyleAttrData, ITextStyleComputedData, ITextStyleInputData, ITextWordData, ITextWrap, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIRenderModule, IUITag, IVectorPath, IVerticalAlign };
871
+ export type { IApp, IAppConfig, IAppData, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, ICornerRadiusString, IDashPatternString, IEditBoxBase, IEditPoint, IEditPointType, IEditToolFunction, IEditorBase, IEditorConfig, IEditorConfigFunction, IEffectAttrData, IEffectComputedData, IEffectInputData, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IFill, IFindUIMethod, IFlow, IFlowData, IFlowInputData, IFontWeight, IFrame, IFrameData, IFrameInputData, IFrameRenderModule, IGradientPaint, IGrayscaleEffect, IGroup, IGroupData, IGroupInputData, IGroupRenderModule, IImage, IImageData, IImageInputData, IImagePaint, IImagePaintMode, IImageRenderModule, ILeafFill, ILeafPaint, ILeafPaintColor, ILeafPaintPatternData, ILeafShadowEffect, ILeafStrokePaint, ILeafer, ILeaferData, ILeaferInputData, ILine, ILineData, ILineInputData, IOverflow, IPaint, IPaintAttr, IPaintGradientModule, IPaintImageModule, IPaintModule, IPaintString, IPath, IPathArrowModule, IPathData, IPathDataArrow, IPathDataArrowMap, IPathInputData, IPen, IPenData, IPenInputData, IPercent, IPolygon, IPolygonData, IPolygonInputData, IRGB, IRGBA, IRect, IRectData, IRectInputData, IRectRenderModule, IRepeat, IShadowEffect, IShadowString, IStar, IStarData, IStarInputData, IStateModule, IStroke, IStrokeAlign, IStrokeAttrData, IStrokeCap, IStrokeComputedData, IStrokeInputData, IStrokeJoin, IStrokeWidthString, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDrawData, ITextInputData, ITextRenderModule, ITextRowData, ITextStyleAttrData, ITextStyleComputedData, ITextStyleInputData, ITextWordData, ITextWrap, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIJSONData, IUIRenderModule, IUITag, IVectorPath, IVerticalAlign };