@leafer-ui/interface 1.9.8 → 1.9.10
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/IUI.ts +3 -1
- package/src/editor/IEditor.ts +3 -0
- package/src/module/IPaint.ts +2 -0
- package/src/type/IComputedType.ts +7 -7
- package/src/type/IType.ts +7 -7
- package/types/index.d.ts +17 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.10",
|
|
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.9.
|
|
25
|
+
"@leafer/interface": "1.9.10"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/IUI.ts
CHANGED
|
@@ -406,7 +406,9 @@ export interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICorne
|
|
|
406
406
|
set(data: IUIInputData, transition?: ITransition | 'temp'): void
|
|
407
407
|
toJSON(options?: IJSONOptions): IUIJSONData
|
|
408
408
|
|
|
409
|
-
get
|
|
409
|
+
get<K extends keyof this>(name: K): this[K]
|
|
410
|
+
get<K extends keyof this>(name?: K[] | IUIInputData): IUIInputData
|
|
411
|
+
|
|
410
412
|
createProxyData(): IUIInputData
|
|
411
413
|
|
|
412
414
|
find(condition: number | string | IFindCondition | IFindUIMethod, options?: any): IUI[]
|
package/src/editor/IEditor.ts
CHANGED
|
@@ -108,6 +108,8 @@ export interface IEditorConfig extends IObject {
|
|
|
108
108
|
resizeLine?: IEditPointInputData
|
|
109
109
|
|
|
110
110
|
rect?: IBoxInputData
|
|
111
|
+
rectThrough?: boolean // 是否穿透rect(穿透后,可以拾取到rect下面的元素,默认单选元素时穿透)
|
|
112
|
+
|
|
111
113
|
area?: IRectInputData
|
|
112
114
|
|
|
113
115
|
mask?: boolean | IColorString
|
|
@@ -138,6 +140,7 @@ export interface IEditorConfig extends IObject {
|
|
|
138
140
|
rotateGap?: number
|
|
139
141
|
lockRatio?: boolean | 'corner'
|
|
140
142
|
dragLimitAnimate?: boolean | number // 限制拖动范围的元素,可在拖拽结束时进行动画归位,默认采用 app.config.pointer.dragLimitAnimate 的值
|
|
143
|
+
ignorePixelSnap?: boolean
|
|
141
144
|
|
|
142
145
|
selector?: boolean
|
|
143
146
|
editBox?: boolean
|
package/src/module/IPaint.ts
CHANGED
|
@@ -34,6 +34,8 @@ export interface IPaintImageModule {
|
|
|
34
34
|
|
|
35
35
|
createData(leafPaint: ILeafPaint, image: ILeaferImage, paint: IImagePaint, box: IBoundsData): void
|
|
36
36
|
getPatternData(paint: IImagePaint, box: IBoundsData, image: ILeaferImage): ILeafPaintPatternData
|
|
37
|
+
|
|
38
|
+
stretchMode(data: ILeafPaintPatternData, box: IBoundsData, scaleX: number, scaleY: number): void
|
|
37
39
|
fillOrFitMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void
|
|
38
40
|
clipMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number, skew: IPointData, clipScaleX?: number, clipScaleY?: number): void
|
|
39
41
|
repeatMode(data: ILeafPaintPatternData, box: IBoundsData, width: number, height: number, x: number, y: number, scaleX: number, scaleY: number, rotation: number, skew: IPointData, align: IAlign, freeTransform?: boolean): void
|
|
@@ -50,18 +50,18 @@ export interface ILeafStrokePaint extends ILeafPaint {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export interface ILeafShadowEffect {
|
|
53
|
-
x
|
|
54
|
-
y
|
|
55
|
-
blur
|
|
53
|
+
x?: number
|
|
54
|
+
y?: number
|
|
55
|
+
blur?: number
|
|
56
56
|
spread?: number
|
|
57
|
-
color
|
|
57
|
+
color?: IColorString
|
|
58
58
|
blendMode?: IBlendMode
|
|
59
59
|
box?: boolean
|
|
60
60
|
scaleFixed?: IScaleFixed
|
|
61
61
|
|
|
62
|
-
//
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
// 斜切、缩放、旋转阴影
|
|
63
|
+
skew?: IPointData
|
|
64
|
+
scale?: IPointData
|
|
65
65
|
rotation?: number
|
|
66
66
|
origin?: IDirection // 斜切、旋转原点方位,相对元素的box包围盒,默认为 bottom
|
|
67
67
|
}
|
package/src/type/IType.ts
CHANGED
|
@@ -181,19 +181,19 @@ export interface IVectorPath {
|
|
|
181
181
|
|
|
182
182
|
// 特效
|
|
183
183
|
export interface IShadowEffect {
|
|
184
|
-
x
|
|
185
|
-
y
|
|
186
|
-
blur
|
|
184
|
+
x?: number
|
|
185
|
+
y?: number
|
|
186
|
+
blur?: number
|
|
187
187
|
spread?: number
|
|
188
|
-
color
|
|
188
|
+
color?: IColorString | IColor
|
|
189
189
|
blendMode?: IBlendMode
|
|
190
190
|
visible?: boolean
|
|
191
191
|
box?: boolean
|
|
192
192
|
scaleFixed?: IScaleFixed
|
|
193
193
|
|
|
194
|
-
//
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
// 斜切、缩放、旋转阴影
|
|
195
|
+
skew?: IPointData
|
|
196
|
+
scale?: IPointData
|
|
197
197
|
rotation?: number
|
|
198
198
|
origin?: IDirection // 斜切、旋转原点方位,相对元素的box包围盒,默认为 bottom
|
|
199
199
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -135,17 +135,17 @@ interface IVectorPath {
|
|
|
135
135
|
data: string | IPathCommandData;
|
|
136
136
|
}
|
|
137
137
|
interface IShadowEffect {
|
|
138
|
-
x
|
|
139
|
-
y
|
|
140
|
-
blur
|
|
138
|
+
x?: number;
|
|
139
|
+
y?: number;
|
|
140
|
+
blur?: number;
|
|
141
141
|
spread?: number;
|
|
142
|
-
color
|
|
142
|
+
color?: IColorString | IColor;
|
|
143
143
|
blendMode?: IBlendMode;
|
|
144
144
|
visible?: boolean;
|
|
145
145
|
box?: boolean;
|
|
146
146
|
scaleFixed?: IScaleFixed;
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
skew?: IPointData;
|
|
148
|
+
scale?: IPointData;
|
|
149
149
|
rotation?: number;
|
|
150
150
|
origin?: IDirection;
|
|
151
151
|
}
|
|
@@ -202,16 +202,16 @@ interface ILeafStrokePaint extends ILeafPaint {
|
|
|
202
202
|
miterLimit?: number;
|
|
203
203
|
}
|
|
204
204
|
interface ILeafShadowEffect {
|
|
205
|
-
x
|
|
206
|
-
y
|
|
207
|
-
blur
|
|
205
|
+
x?: number;
|
|
206
|
+
y?: number;
|
|
207
|
+
blur?: number;
|
|
208
208
|
spread?: number;
|
|
209
|
-
color
|
|
209
|
+
color?: IColorString;
|
|
210
210
|
blendMode?: IBlendMode;
|
|
211
211
|
box?: boolean;
|
|
212
212
|
scaleFixed?: IScaleFixed;
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
skew?: IPointData;
|
|
214
|
+
scale?: IPointData;
|
|
215
215
|
rotation?: number;
|
|
216
216
|
origin?: IDirection;
|
|
217
217
|
}
|
|
@@ -497,6 +497,7 @@ interface IEditorConfig extends IObject$1 {
|
|
|
497
497
|
middlePoint?: IEditPointInputData | IEditPointInputData[];
|
|
498
498
|
resizeLine?: IEditPointInputData;
|
|
499
499
|
rect?: IBoxInputData$1;
|
|
500
|
+
rectThrough?: boolean;
|
|
500
501
|
area?: IRectInputData$1;
|
|
501
502
|
mask?: boolean | IColorString$1;
|
|
502
503
|
dimOthers?: boolean | number;
|
|
@@ -521,6 +522,7 @@ interface IEditorConfig extends IObject$1 {
|
|
|
521
522
|
rotateGap?: number;
|
|
522
523
|
lockRatio?: boolean | 'corner';
|
|
523
524
|
dragLimitAnimate?: boolean | number;
|
|
525
|
+
ignorePixelSnap?: boolean;
|
|
524
526
|
selector?: boolean;
|
|
525
527
|
editBox?: boolean;
|
|
526
528
|
hover?: boolean;
|
|
@@ -1007,7 +1009,8 @@ interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICornerRadius
|
|
|
1007
1009
|
reset(data?: IUIInputData): void;
|
|
1008
1010
|
set(data: IUIInputData, transition?: ITransition | 'temp'): void;
|
|
1009
1011
|
toJSON(options?: IJSONOptions): IUIJSONData;
|
|
1010
|
-
get
|
|
1012
|
+
get<K extends keyof this>(name: K): this[K];
|
|
1013
|
+
get<K extends keyof this>(name?: K[] | IUIInputData): IUIInputData;
|
|
1011
1014
|
createProxyData(): IUIInputData;
|
|
1012
1015
|
find(condition: number | string | IFindCondition | IFindUIMethod, options?: any): IUI[];
|
|
1013
1016
|
findTag(tag: string | string[]): IUI[];
|
|
@@ -1240,6 +1243,7 @@ interface IPaintImageModule {
|
|
|
1240
1243
|
recycleImage(attrName: IPaintAttr, data: IUIData): IBooleanMap;
|
|
1241
1244
|
createData(leafPaint: ILeafPaint, image: ILeaferImage, paint: IImagePaint, box: IBoundsData): void;
|
|
1242
1245
|
getPatternData(paint: IImagePaint, box: IBoundsData, image: ILeaferImage): ILeafPaintPatternData;
|
|
1246
|
+
stretchMode(data: ILeafPaintPatternData, box: IBoundsData, scaleX: number, scaleY: number): void;
|
|
1243
1247
|
fillOrFitMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void;
|
|
1244
1248
|
clipMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number, skew: IPointData, clipScaleX?: number, clipScaleY?: number): void;
|
|
1245
1249
|
repeatMode(data: ILeafPaintPatternData, box: IBoundsData, width: number, height: number, x: number, y: number, scaleX: number, scaleY: number, rotation: number, skew: IPointData, align: IAlign, freeTransform?: boolean): void;
|