@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 +2 -2
- package/src/ICommonAttr.ts +33 -33
- package/src/IUI.ts +34 -29
- package/src/editor/IEditor.ts +7 -6
- package/src/index.ts +1 -1
- package/types/index.d.ts +74 -69
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
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.
|
|
25
|
+
"@leafer/interface": "1.0.0-rc.30"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/ICommonAttr.ts
CHANGED
|
@@ -6,8 +6,8 @@ import { IDashPatternString, IShadowString, IColorString, IStrokeWidthString, IC
|
|
|
6
6
|
|
|
7
7
|
// corner---
|
|
8
8
|
export interface ICornerRadiusAttrData {
|
|
9
|
-
cornerRadius
|
|
10
|
-
cornerSmoothing
|
|
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
|
|
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
|
|
40
|
+
stroke?: IStroke
|
|
41
41
|
|
|
42
|
-
strokeAlign
|
|
43
|
-
strokeWidth
|
|
44
|
-
strokeWidthFixed
|
|
45
|
-
strokeCap
|
|
46
|
-
strokeJoin
|
|
47
|
-
dashPattern
|
|
48
|
-
dashOffset
|
|
49
|
-
miterLimit
|
|
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
|
|
52
|
-
endArrow
|
|
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
|
|
89
|
-
fontSize
|
|
90
|
-
fontWeight
|
|
91
|
-
italic
|
|
92
|
-
textCase
|
|
93
|
-
textDecoration
|
|
94
|
-
letterSpacing
|
|
95
|
-
lineHeight
|
|
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
|
|
98
|
-
paraSpacing
|
|
97
|
+
paraIndent?: INumber
|
|
98
|
+
paraSpacing?: INumber
|
|
99
99
|
|
|
100
|
-
textAlign
|
|
101
|
-
verticalAlign
|
|
100
|
+
textAlign?: ITextAlign
|
|
101
|
+
verticalAlign?: IVerticalAlign
|
|
102
102
|
|
|
103
|
-
textWrap
|
|
104
|
-
textOverflow
|
|
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
|
|
148
|
-
innerShadow
|
|
149
|
-
blur
|
|
150
|
-
backgroundBlur
|
|
151
|
-
grayscale
|
|
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
|
|
19
|
-
points
|
|
20
|
-
curve
|
|
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
|
|
67
|
-
endAngle
|
|
68
|
-
innerRadius
|
|
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
|
|
83
|
-
points
|
|
84
|
-
curve
|
|
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
|
|
99
|
-
innerRadius
|
|
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
|
|
136
|
-
padding
|
|
137
|
-
resizeFontSize
|
|
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
|
|
219
|
-
contextSettings
|
|
220
|
-
canvas
|
|
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
|
|
263
|
-
overflow
|
|
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
|
|
305
|
+
proxyData?: IUIInputData
|
|
305
306
|
__proxyData?: IUIInputData
|
|
306
307
|
|
|
307
|
-
normalStyle
|
|
308
|
-
hoverStyle
|
|
309
|
-
pressStyle
|
|
310
|
-
focusStyle
|
|
311
|
-
selectedStyle
|
|
312
|
-
disabledStyle
|
|
308
|
+
normalStyle?: IUIInputData
|
|
309
|
+
hoverStyle?: IUIInputData
|
|
310
|
+
pressStyle?: IUIInputData
|
|
311
|
+
focusStyle?: IUIInputData
|
|
312
|
+
selectedStyle?: IUIInputData
|
|
313
|
+
disabledStyle?: IUIInputData
|
|
313
314
|
|
|
314
|
-
editConfig
|
|
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():
|
|
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
|
}
|
package/src/editor/IEditor.ts
CHANGED
|
@@ -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
|
|
8
|
-
target
|
|
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
|
|
23
|
+
element?: IUI
|
|
24
24
|
buttons: IGroup
|
|
25
25
|
|
|
26
26
|
selector: IGroup
|
|
27
27
|
editBox: IEditBoxBase
|
|
28
|
-
editTool
|
|
29
|
-
innerEditor
|
|
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
|
|
171
|
-
cornerSmoothing
|
|
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
|
|
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
|
|
196
|
-
strokeAlign
|
|
197
|
-
strokeWidth
|
|
198
|
-
strokeWidthFixed
|
|
199
|
-
strokeCap
|
|
200
|
-
strokeJoin
|
|
201
|
-
dashPattern
|
|
202
|
-
dashOffset
|
|
203
|
-
miterLimit
|
|
204
|
-
startArrow
|
|
205
|
-
endArrow
|
|
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
|
|
236
|
-
fontSize
|
|
237
|
-
fontWeight
|
|
238
|
-
italic
|
|
239
|
-
textCase
|
|
240
|
-
textDecoration
|
|
241
|
-
letterSpacing
|
|
242
|
-
lineHeight
|
|
243
|
-
paraIndent
|
|
244
|
-
paraSpacing
|
|
245
|
-
textAlign
|
|
246
|
-
verticalAlign
|
|
247
|
-
textWrap
|
|
248
|
-
textOverflow
|
|
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
|
|
284
|
-
innerShadow
|
|
285
|
-
blur
|
|
286
|
-
backgroundBlur
|
|
287
|
-
grayscale
|
|
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
|
|
308
|
-
target
|
|
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
|
|
318
|
+
element?: IUI$1;
|
|
319
319
|
buttons: IGroup$1;
|
|
320
320
|
selector: IGroup$1;
|
|
321
321
|
editBox: IEditBoxBase;
|
|
322
|
-
editTool
|
|
323
|
-
innerEditor
|
|
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
|
|
426
|
-
points
|
|
427
|
-
curve
|
|
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
|
|
466
|
-
endAngle
|
|
467
|
-
innerRadius
|
|
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
|
|
481
|
-
points
|
|
482
|
-
curve
|
|
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
|
|
496
|
-
innerRadius
|
|
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
|
|
527
|
-
padding
|
|
528
|
-
resizeFontSize
|
|
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
|
|
600
|
-
contextSettings
|
|
601
|
-
canvas
|
|
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
|
|
630
|
-
overflow
|
|
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
|
|
668
|
+
proxyData?: IUIInputData;
|
|
667
669
|
__proxyData?: IUIInputData;
|
|
668
|
-
normalStyle
|
|
669
|
-
hoverStyle
|
|
670
|
-
pressStyle
|
|
671
|
-
focusStyle
|
|
672
|
-
selectedStyle
|
|
673
|
-
disabledStyle
|
|
674
|
-
editConfig
|
|
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():
|
|
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 };
|