@leafer-ui/interface 1.0.0-rc.20 → 1.0.0-rc.22

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.20",
3
+ "version": "1.0.0-rc.22",
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.20"
25
+ "@leafer/interface": "1.0.0-rc.22"
26
26
  }
27
27
  }
@@ -1,4 +1,4 @@
1
- import { INumber, IBoolean, IString } from '@leafer/interface'
1
+ import { INumber, IBoolean, IString, IFourNumber } from '@leafer/interface'
2
2
  import { IStrokeAlign, IStrokeCap, IStrokeJoin, IBlurEffect, IFontWeight, ITextCase, ITextDecoration, IShadowEffect, IGrayscaleEffect, ITextAlign, IVerticalAlign, IOverflow, IUnitData, ITextWrap, IStroke, IFill, IArrowType } from './type/IType'
3
3
  import { ILeafStrokePaint, ILeafShadowEffect, ILeafPaint } from './type/IComputedType'
4
4
  import { IDashPatternString, IShadowString, IColorString, IStrokeWidthString, ICornerRadiusString } from './type/IStringType'
@@ -6,11 +6,11 @@ import { IDashPatternString, IShadowString, IColorString, IStrokeWidthString, IC
6
6
 
7
7
  // corner---
8
8
  export interface ICornerRadiusAttrData {
9
- cornerRadius: INumber | INumber[] | ICornerRadiusString
9
+ cornerRadius: IFourNumber | ICornerRadiusString
10
10
  cornerSmoothing: INumber
11
11
  }
12
12
  export interface ICornerRadiusInputData {
13
- cornerRadius?: INumber | INumber[] | ICornerRadiusString
13
+ cornerRadius?: IFourNumber | ICornerRadiusString
14
14
  cornerSmoothing?: INumber
15
15
  }
16
16
  export interface ICornerRadiusComputedData {
@@ -40,7 +40,7 @@ export interface IStrokeAttrData {
40
40
  stroke: IStroke
41
41
 
42
42
  strokeAlign: IStrokeAlign
43
- strokeWidth: INumber | INumber[] | IStrokeWidthString
43
+ strokeWidth: IFourNumber | IStrokeWidthString
44
44
  strokeWidthFixed: IBoolean
45
45
  strokeCap: IStrokeCap
46
46
  strokeJoin: IStrokeJoin
@@ -55,7 +55,7 @@ export interface IStrokeInputData {
55
55
  stroke?: IStroke
56
56
 
57
57
  strokeAlign?: IStrokeAlign
58
- strokeWidth?: INumber | INumber[] | IStrokeWidthString
58
+ strokeWidth?: IFourNumber | IStrokeWidthString
59
59
  strokeWidthFixed?: IBoolean
60
60
  strokeCap?: IStrokeCap
61
61
  strokeJoin?: IStrokeJoin
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 } 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 } from '@leafer/interface'
2
2
 
3
3
  import {
4
4
  IFillAttrData, IFillInputData, IFillComputedData,
@@ -122,9 +122,11 @@ export interface IPenInputData extends IGroupInputData { }
122
122
  export interface IText extends ITextStyleAttrData, IUI {
123
123
  __: ITextData
124
124
  text: string
125
+ padding: IFourNumber
125
126
  }
126
127
  interface ITextAttrData {
127
128
  text?: string
129
+ padding?: IFourNumber
128
130
  }
129
131
 
130
132
  export interface ITextData extends ITextAttrData, ITextStyleComputedData, IUIData {
@@ -293,7 +295,9 @@ export interface IUI extends IFillAttrData, IStrokeAttrData, ICornerRadiusAttrDa
293
295
  selectedStyle: IUIInputData
294
296
  disabledStyle: IUIInputData
295
297
 
296
- editorStyle: IEditorConfig
298
+ editConfig: IEditorConfig
299
+ editOuter: string
300
+ editInner: string
297
301
 
298
302
  children?: IUI[]
299
303
 
@@ -334,8 +338,6 @@ export interface IUIData extends IUIComputedData, ILeafData {
334
338
  selectedStyle?: IUIInputData
335
339
  disabledStyle?: IUIInputData
336
340
 
337
- editorStyle?: IEditorConfig
338
-
339
341
  // 非数据属性, 自动计算的缓存数据
340
342
  __isFills?: boolean
341
343
  __isStrokes?: boolean
@@ -383,8 +385,6 @@ export interface IUIBaseInputData extends IFillInputData, IStrokeInputData, ITex
383
385
  selectedStyle?: IUIInputData
384
386
  disabledStyle?: IUIInputData
385
387
 
386
- editorStyle?: IEditorConfig
387
-
388
388
  children?: IUIInputData[]
389
389
  }
390
390
 
@@ -1,14 +1,20 @@
1
- import { IGroup, IUI, IRectInputData, ISelectorProxy, IEditSize, ICursorType, IAround, IDragEvent, IRotateEvent, IStroke, IFill, ILeaf, IObject, IBoxInputData, IGroupInputData, IImageCursor } from '@leafer-ui/interface'
1
+ import { IGroup, IUI, IBox, IRectInputData, ISelectorProxy, IEditSize, ICursorType, IAround, IDragEvent, IRotateEvent, IStroke, IFill, ILeaf, ILeafList, IObject, IBoxInputData, IGroupInputData, IImageCursor, IRect, IBoundsData, IKeyEvent, IUIInputData } from '@leafer-ui/interface'
2
2
 
3
3
  export interface IEditorBase extends IGroup, ISelectorProxy {
4
4
  config: IEditorConfig
5
+ mergeConfig: IEditorConfig // 实际使用,合并了选中元素上的editConfig
5
6
 
6
7
  hoverTarget: IUI
7
8
  target: IUI | IUI[]
8
9
 
9
10
  readonly list: IUI[]
11
+ leafList: ILeafList
12
+ openedGroupList: ILeafList
13
+
14
+ readonly editing: boolean
15
+ innerEditing: boolean
16
+ readonly groupOpening: boolean
10
17
 
11
- readonly hasTarget: boolean
12
18
  readonly multiple: boolean
13
19
  readonly single: boolean
14
20
 
@@ -18,8 +24,9 @@ export interface IEditorBase extends IGroup, ISelectorProxy {
18
24
  buttons: IGroup
19
25
 
20
26
  selector: IGroup
21
- editBox: IGroup
27
+ editBox: IEditBoxBase
22
28
  editTool: IObject
29
+ innerEditor: IObject
23
30
 
24
31
  hasItem(item: IUI): boolean
25
32
  shiftItem(item: IUI): void
@@ -38,6 +45,11 @@ export interface IEditorBase extends IGroup, ISelectorProxy {
38
45
 
39
46
  group(group?: IGroup | IGroupInputData): IGroup
40
47
  ungroup(): IUI[]
48
+ openGroup(group: IGroup): void
49
+ closeGroup(group: IGroup): void
50
+
51
+ openInnerEditor(): void
52
+ closeInnerEditor(): void
41
53
 
42
54
  lock(): void
43
55
  unlock(): void
@@ -84,12 +96,64 @@ export interface IEditorConfig {
84
96
 
85
97
  selector?: boolean
86
98
  hover?: boolean
99
+ hoverStyle?: IUIInputData
87
100
  select?: 'press' | 'tap'
88
101
  boxSelect?: boolean
89
102
  continuousSelect?: boolean // 点击可以连续选择
103
+ openInner?: 'double' | 'long' // 双击/长按打开内部
90
104
 
91
105
  moveable?: boolean
92
106
  rotateable?: boolean
93
107
  resizeable?: boolean
94
108
  skewable?: boolean
95
- }
109
+ }
110
+
111
+ export interface IEditPoint extends IBox {
112
+ direction: number
113
+ pointType: IEditPointType
114
+ }
115
+
116
+ export type IEditPointType = 'rotate' | 'resize'
117
+
118
+ export interface IEditBoxBase extends IGroup {
119
+ editor: IEditorBase
120
+ dragging: boolean
121
+ moving: boolean
122
+
123
+ view: IGroup // 放置默认编辑工具控制点
124
+
125
+ circle: IEditPoint
126
+ rect: IRect
127
+
128
+ buttons: IGroup
129
+
130
+ resizePoints: IEditPoint[]
131
+ rotatePoints: IEditPoint[]
132
+ resizeLines: IEditPoint[]
133
+
134
+ readonly flipped: boolean
135
+ readonly flippedX: boolean
136
+ readonly flippedY: boolean
137
+ readonly flippedOne: boolean
138
+
139
+ enterPoint: IEditPoint
140
+
141
+ getPointStyle(userStyle?: IBoxInputData): IBoxInputData
142
+ getPointsStyle(): IBoxInputData[]
143
+ getMiddlePointsStyle(): IBoxInputData[]
144
+
145
+ load(): void
146
+ update(bounds: IBoundsData): void
147
+ unload(): void
148
+
149
+ onArrow(e: IKeyEvent): void
150
+
151
+ }
152
+
153
+ export interface IEditorConfigFunction {
154
+ (ui: any): IEditorConfig
155
+ }
156
+
157
+ export interface IEditToolFunction {
158
+ (ui: any): string
159
+ }
package/src/index.ts CHANGED
@@ -41,4 +41,4 @@ export { IPaintModule, IPaintImageModule, IPaintGradientModule } from './module/
41
41
  export { IEffectModule } from './module/IEffect'
42
42
  export { ICachedShape } from './ICachedShape'
43
43
 
44
- export { IEditorBase, IEditorConfig } from './editor/IEditor'
44
+ export { IEditorBase, IEditorConfig, IEditBoxBase, IEditPoint, IEditPointType, IEditToolFunction, IEditorConfigFunction } from './editor/IEditor'
@@ -1,9 +1,9 @@
1
- import { ILeaferCanvas, IRenderOptions, IBooleanMap, IBoundsData, ILeaferImage } from '@leafer/interface'
1
+ import { ILeaferCanvas, IRenderOptions, IBooleanMap, IBoundsData, ILeaferImage, IAround } from '@leafer/interface'
2
2
 
3
3
  import { ILeafPaint, ILeafPaintPatternData } from '../type/IComputedType'
4
4
  import { IUI, IUIData } from '../IUI'
5
5
  import { ICachedShape } from '../ICachedShape'
6
- import { IGradientPaint, IImagePaint, IImagePaintMode, IPaintAttr } from '../type/IType'
6
+ import { IGradientPaint, IImagePaint, IPaintAttr } from '../type/IType'
7
7
 
8
8
  export interface IPaintModule {
9
9
  compute(attrName: IPaintAttr, ui: IUI): void
@@ -30,9 +30,9 @@ export interface IPaintImageModule {
30
30
  recycleImage(attrName: IPaintAttr, data: IUIData): IBooleanMap
31
31
 
32
32
  createData(leafPaint: ILeafPaint, image: ILeaferImage, paint: IImagePaint, box: IBoundsData): void
33
- fillOrFitMode(data: ILeafPaintPatternData, mode: IImagePaintMode, box: IBoundsData, width: number, height: number, rotation: number): void
33
+ fillOrFitMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void
34
34
  clipMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void
35
- repeatMode(data: ILeafPaintPatternData, box: IBoundsData, width: number, height: number, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void
35
+ repeatMode(data: ILeafPaintPatternData, box: IBoundsData, width: number, height: number, x: number, y: number, scaleX: number, scaleY: number, rotation: number, around: IAround): void
36
36
  }
37
37
 
38
38
  export interface IPaintGradientModule {
package/src/type/IType.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IPointData, IPathCommandData, IWindingRule, IBlendMode, IExportFileType, ISizeData, IFourNumber } from '@leafer/interface'
1
+ import { IPointData, IPathCommandData, IWindingRule, IBlendMode, IExportFileType, ISizeData, IFourNumber, IDirection } from '@leafer/interface'
2
2
  import { IColorString, IPaintString } from './IStringType'
3
3
 
4
4
  export interface IUnitData {
@@ -72,7 +72,10 @@ export interface IImagePaint extends IPaintBase {
72
72
  filters?: IImageFilters
73
73
 
74
74
  padding?: IFourNumber
75
+
76
+ around?: IDirection
75
77
  offset?: IPointData
78
+
76
79
  size?: number | ISizeData
77
80
  scale?: number | IPointData
78
81
  rotation?: number
@@ -88,7 +91,7 @@ export interface IImageFilters {
88
91
  highlights?: number // 高光
89
92
  shadows?: number // 阴影
90
93
  }
91
- export type IImagePaintMode = 'cover' | 'fit' | 'strench' | 'clip' | 'repeat'
94
+ export type IImagePaintMode = 'normal' | 'cover' | 'fit' | 'strench' | 'clip' | 'repeat'
92
95
  export type IRepeat = boolean | 'x' | 'y'
93
96
 
94
97
  // 描边
package/types/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { IPointData, IExportFileType, IFourNumber, ISizeData, IPathCommandData, IWindingRule, IBlendMode, IMatrixData, ILeaferImage, ITaskItem, INumber, IBoolean, IString, IPathCreator, IBoundsData, ILeaferImageConfig, ICanvasContext2DSettings, ILeaferCanvas, IRenderOptions, IPickOptions, IPickResult, ILeaf as ILeaf$1, IValue, IPathString, IPathDrawer, IExportOptions, IExportResult, IAnswer, ILeafData, ILeafComputedData, ILeafInputData, IObject as IObject$1, ILeaferAttrData, IControl, ILeaferConfig, ILeaferType, ILeafRender, ILeafBounds, ILeafHit, IStateStyleType, ICachedLeaf, IBooleanMap } from '@leafer/interface';
1
+ import { IPointData, IExportFileType, IFourNumber, IDirection, ISizeData, IPathCommandData, IWindingRule, IBlendMode, IMatrixData, ILeaferImage, ITaskItem, INumber, IBoolean, IString, IPathCreator, IBoundsData as IBoundsData$1, ILeaferImageConfig, ICanvasContext2DSettings, ILeaferCanvas, IRenderOptions, IPickOptions, IPickResult, ILeaf as ILeaf$1, IValue, IPathString, IPathDrawer, IExportOptions, IExportResult, IAnswer, ILeafData, ILeafComputedData, ILeafInputData, IObject as IObject$1, ILeaferAttrData, IControl, ILeaferConfig, ILeaferType, ILeafRender, ILeafBounds, ILeafHit, IStateStyleType, ICachedLeaf, IBooleanMap, IAround as IAround$1 } from '@leafer/interface';
2
2
  export * from '@leafer/interface';
3
- import { IGroup as IGroup$1, ISelectorProxy, IUI as IUI$1, IObject, ILeaf, IEditSize, IDragEvent, IRotateEvent, IGroupInputData as IGroupInputData$1, IStroke as IStroke$1, IFill as IFill$1, IBoxInputData as IBoxInputData$1, IRectInputData as IRectInputData$1, ICursorType, IImageCursor, IAround } from '@leafer-ui/interface';
3
+ import { IGroup as IGroup$1, ISelectorProxy, IUI as IUI$1, ILeafList, IObject, ILeaf, IEditSize, IDragEvent, IRotateEvent, IGroupInputData as IGroupInputData$1, IStroke as IStroke$1, IFill as IFill$1, IBoxInputData as IBoxInputData$1, IRectInputData as IRectInputData$1, ICursorType, IImageCursor, IAround, 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;
@@ -61,6 +61,7 @@ interface IImagePaint extends IPaintBase {
61
61
  format?: IExportFileType;
62
62
  filters?: IImageFilters;
63
63
  padding?: IFourNumber;
64
+ around?: IDirection;
64
65
  offset?: IPointData;
65
66
  size?: number | ISizeData;
66
67
  scale?: number | IPointData;
@@ -76,7 +77,7 @@ interface IImageFilters {
76
77
  highlights?: number;
77
78
  shadows?: number;
78
79
  }
79
- type IImagePaintMode = 'cover' | 'fit' | 'strench' | 'clip' | 'repeat';
80
+ type IImagePaintMode = 'normal' | 'cover' | 'fit' | 'strench' | 'clip' | 'repeat';
80
81
  type IRepeat = boolean | 'x' | 'y';
81
82
  type IStrokeAlign = 'inside' | 'outside' | 'center';
82
83
  type IStrokeCap = 'none' | 'round' | 'square';
@@ -170,11 +171,11 @@ interface ILeafShadowEffect {
170
171
  }
171
172
 
172
173
  interface ICornerRadiusAttrData {
173
- cornerRadius: INumber | INumber[] | ICornerRadiusString;
174
+ cornerRadius: IFourNumber | ICornerRadiusString;
174
175
  cornerSmoothing: INumber;
175
176
  }
176
177
  interface ICornerRadiusInputData {
177
- cornerRadius?: INumber | INumber[] | ICornerRadiusString;
178
+ cornerRadius?: IFourNumber | ICornerRadiusString;
178
179
  cornerSmoothing?: INumber;
179
180
  }
180
181
  interface ICornerRadiusComputedData {
@@ -197,7 +198,7 @@ interface IBorderComputedData {
197
198
  interface IStrokeAttrData {
198
199
  stroke: IStroke;
199
200
  strokeAlign: IStrokeAlign;
200
- strokeWidth: INumber | INumber[] | IStrokeWidthString;
201
+ strokeWidth: IFourNumber | IStrokeWidthString;
201
202
  strokeWidthFixed: IBoolean;
202
203
  strokeCap: IStrokeCap;
203
204
  strokeJoin: IStrokeJoin;
@@ -210,7 +211,7 @@ interface IStrokeAttrData {
210
211
  interface IStrokeInputData {
211
212
  stroke?: IStroke;
212
213
  strokeAlign?: IStrokeAlign;
213
- strokeWidth?: INumber | INumber[] | IStrokeWidthString;
214
+ strokeWidth?: IFourNumber | IStrokeWidthString;
214
215
  strokeWidthFixed?: IBoolean;
215
216
  strokeCap?: IStrokeCap;
216
217
  strokeJoin?: IStrokeJoin;
@@ -306,18 +307,24 @@ interface IEffectComputedData {
306
307
 
307
308
  interface IEditorBase extends IGroup$1, ISelectorProxy {
308
309
  config: IEditorConfig;
310
+ mergeConfig: IEditorConfig;
309
311
  hoverTarget: IUI$1;
310
312
  target: IUI$1 | IUI$1[];
311
313
  readonly list: IUI$1[];
312
- readonly hasTarget: boolean;
314
+ leafList: ILeafList;
315
+ openedGroupList: ILeafList;
316
+ readonly editing: boolean;
317
+ innerEditing: boolean;
318
+ readonly groupOpening: boolean;
313
319
  readonly multiple: boolean;
314
320
  readonly single: boolean;
315
321
  readonly dragging: boolean;
316
322
  element: IUI$1;
317
323
  buttons: IGroup$1;
318
324
  selector: IGroup$1;
319
- editBox: IGroup$1;
325
+ editBox: IEditBoxBase;
320
326
  editTool: IObject;
327
+ innerEditor: IObject;
321
328
  hasItem(item: IUI$1): boolean;
322
329
  shiftItem(item: IUI$1): void;
323
330
  addItem(item: IUI$1): void;
@@ -331,6 +338,10 @@ interface IEditorBase extends IGroup$1, ISelectorProxy {
331
338
  onSkew(e: IDragEvent): void;
332
339
  group(group?: IGroup$1 | IGroupInputData$1): IGroup$1;
333
340
  ungroup(): IUI$1[];
341
+ openGroup(group: IGroup$1): void;
342
+ closeGroup(group: IGroup$1): void;
343
+ openInnerEditor(): void;
344
+ closeInnerEditor(): void;
334
345
  lock(): void;
335
346
  unlock(): void;
336
347
  toTop(): void;
@@ -365,14 +376,51 @@ interface IEditorConfig {
365
376
  rotateGap?: number;
366
377
  selector?: boolean;
367
378
  hover?: boolean;
379
+ hoverStyle?: IUIInputData$1;
368
380
  select?: 'press' | 'tap';
369
381
  boxSelect?: boolean;
370
382
  continuousSelect?: boolean;
383
+ openInner?: 'double' | 'long';
371
384
  moveable?: boolean;
372
385
  rotateable?: boolean;
373
386
  resizeable?: boolean;
374
387
  skewable?: boolean;
375
388
  }
389
+ interface IEditPoint extends IBox$1 {
390
+ direction: number;
391
+ pointType: IEditPointType;
392
+ }
393
+ type IEditPointType = 'rotate' | 'resize';
394
+ interface IEditBoxBase extends IGroup$1 {
395
+ editor: IEditorBase;
396
+ dragging: boolean;
397
+ moving: boolean;
398
+ view: IGroup$1;
399
+ circle: IEditPoint;
400
+ rect: IRect$1;
401
+ buttons: IGroup$1;
402
+ resizePoints: IEditPoint[];
403
+ rotatePoints: IEditPoint[];
404
+ resizeLines: IEditPoint[];
405
+ readonly flipped: boolean;
406
+ readonly flippedX: boolean;
407
+ readonly flippedY: boolean;
408
+ readonly flippedOne: boolean;
409
+ enterPoint: IEditPoint;
410
+ getPointStyle(userStyle?: IBoxInputData$1): IBoxInputData$1;
411
+ getPointsStyle(): IBoxInputData$1[];
412
+ getMiddlePointsStyle(): IBoxInputData$1[];
413
+ load(): void;
414
+ update(bounds: IBoundsData): void;
415
+ unload(): void;
416
+ onArrow(e: IKeyEvent): void;
417
+ }
418
+ interface IEditorConfigFunction {
419
+ (ui: any): IEditorConfig;
420
+ }
421
+ interface IEditToolFunction {
422
+ (ui: any): string;
423
+ }
376
424
 
377
425
  interface ILine extends IUI {
378
426
  __: ILineData;
@@ -469,9 +517,11 @@ interface IPenInputData extends IGroupInputData {
469
517
  interface IText extends ITextStyleAttrData, IUI {
470
518
  __: ITextData;
471
519
  text: string;
520
+ padding: IFourNumber;
472
521
  }
473
522
  interface ITextAttrData {
474
523
  text?: string;
524
+ padding?: IFourNumber;
475
525
  }
476
526
  interface ITextData extends ITextAttrData, ITextStyleComputedData, IUIData {
477
527
  __baseLine?: number;
@@ -479,7 +529,7 @@ interface ITextData extends ITextAttrData, ITextStyleComputedData, IUIData {
479
529
  __letterSpacing?: number;
480
530
  __padding?: number[];
481
531
  __clipText?: boolean;
482
- __textBoxBounds?: IBoundsData;
532
+ __textBoxBounds?: IBoundsData$1;
483
533
  }
484
534
  interface ITextInputData extends ITextAttrData, ITextStyleInputData, IUIBaseInputData {
485
535
  }
@@ -513,7 +563,7 @@ interface ITextCharData {
513
563
  char?: string;
514
564
  }
515
565
  interface ITextDrawData {
516
- bounds: IBoundsData;
566
+ bounds: IBoundsData$1;
517
567
  rows: ITextRowData[];
518
568
  paraNumber: number;
519
569
  font: string;
@@ -609,7 +659,9 @@ interface IUI extends IFillAttrData, IStrokeAttrData, ICornerRadiusAttrData, IEf
609
659
  focusStyle: IUIInputData;
610
660
  selectedStyle: IUIInputData;
611
661
  disabledStyle: IUIInputData;
612
- editorStyle: IEditorConfig;
662
+ editConfig: IEditorConfig;
663
+ editOuter: string;
664
+ editInner: string;
613
665
  children?: IUI[];
614
666
  reset(data?: IUIInputData): void;
615
667
  set(data: IUIInputData): void;
@@ -637,7 +689,6 @@ interface IUIData extends IUIComputedData, ILeafData {
637
689
  focusStyle?: IUIInputData;
638
690
  selectedStyle?: IUIInputData;
639
691
  disabledStyle?: IUIInputData;
640
- editorStyle?: IEditorConfig;
641
692
  __isFills?: boolean;
642
693
  __isStrokes?: boolean;
643
694
  readonly __strokeWidth: number;
@@ -670,7 +721,6 @@ interface IUIBaseInputData extends IFillInputData, IStrokeInputData, ITextStyleI
670
721
  focusStyle?: IUIInputData;
671
722
  selectedStyle?: IUIInputData;
672
723
  disabledStyle?: IUIInputData;
673
- editorStyle?: IEditorConfig;
674
724
  children?: IUIInputData[];
675
725
  }
676
726
  type IUITag = 'App' | 'Leafer' | 'Rect' | 'Ellipse' | 'Polygon' | 'Star' | 'Line' | 'Path' | 'Pen' | 'Text' | 'Image' | 'Canvas' | 'Group' | 'Frame' | 'Box';
@@ -759,7 +809,7 @@ interface IStateModule {
759
809
 
760
810
  interface ICachedShape extends ICachedLeaf {
761
811
  worldCanvas?: ILeaferCanvas;
762
- shapeBounds: IBoundsData;
812
+ shapeBounds: IBoundsData$1;
763
813
  scaleX: number;
764
814
  scaleY: number;
765
815
  }
@@ -776,19 +826,19 @@ interface IPaintModule {
776
826
  shape(ui: IUI, current: ILeaferCanvas, renderOptions: IRenderOptions): ICachedShape;
777
827
  }
778
828
  interface IPaintImageModule {
779
- image(ui: IUI, attrName: string, paint: IImagePaint, boxBounds: IBoundsData, firstUse: boolean): ILeafPaint;
829
+ image(ui: IUI, attrName: string, paint: IImagePaint, boxBounds: IBoundsData$1, firstUse: boolean): ILeafPaint;
780
830
  checkImage(ui: IUI, canvas: ILeaferCanvas, paint: ILeafPaint, allowPaint?: boolean): boolean;
781
831
  createPattern(ui: IUI, paint: ILeafPaint, pixelRatio: number): boolean;
782
832
  recycleImage(attrName: IPaintAttr, data: IUIData): IBooleanMap;
783
- createData(leafPaint: ILeafPaint, image: ILeaferImage, paint: IImagePaint, box: IBoundsData): void;
784
- fillOrFitMode(data: ILeafPaintPatternData, mode: IImagePaintMode, box: IBoundsData, width: number, height: number, rotation: number): void;
785
- clipMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void;
786
- repeatMode(data: ILeafPaintPatternData, box: IBoundsData, width: number, height: number, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void;
833
+ createData(leafPaint: ILeafPaint, image: ILeaferImage, paint: IImagePaint, box: IBoundsData$1): void;
834
+ fillOrFitMode(data: ILeafPaintPatternData, box: IBoundsData$1, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void;
835
+ clipMode(data: ILeafPaintPatternData, box: IBoundsData$1, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void;
836
+ repeatMode(data: ILeafPaintPatternData, box: IBoundsData$1, width: number, height: number, x: number, y: number, scaleX: number, scaleY: number, rotation: number, around: IAround$1): void;
787
837
  }
788
838
  interface IPaintGradientModule {
789
- linearGradient(paint: IGradientPaint, box: IBoundsData): ILeafPaint;
790
- radialGradient(paint: IGradientPaint, box: IBoundsData): ILeafPaint;
791
- conicGradient(paint: IGradientPaint, box: IBoundsData): ILeafPaint;
839
+ linearGradient(paint: IGradientPaint, box: IBoundsData$1): ILeafPaint;
840
+ radialGradient(paint: IGradientPaint, box: IBoundsData$1): ILeafPaint;
841
+ conicGradient(paint: IGradientPaint, box: IBoundsData$1): ILeafPaint;
792
842
  }
793
843
 
794
844
  interface IEffectModule {
@@ -798,4 +848,4 @@ interface IEffectModule {
798
848
  backgroundBlur(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void;
799
849
  }
800
850
 
801
- export type { IApp, IAppConfig, IAppData, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, ICornerRadiusString, IDashPatternString, IEditorBase, IEditorConfig, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IFill, IFindUIMethod, 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, IStrokeCap, IStrokeJoin, IStrokeWidthString, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDrawData, ITextInputData, ITextRenderModule, ITextRowData, ITextWordData, ITextWrap, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIRenderModule, IUITag, IUnitData, IVectorPath, IVerticalAlign };
851
+ 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, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IFill, IFindUIMethod, 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, IStrokeCap, IStrokeJoin, IStrokeWidthString, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDrawData, ITextInputData, ITextRenderModule, ITextRowData, ITextWordData, ITextWrap, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIRenderModule, IUITag, IUnitData, IVectorPath, IVerticalAlign };