@leafer-ui/interface 1.0.0-alpha.7 → 1.0.0-alpha.9
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 +5 -13
- package/src/IUI.ts +9 -9
- package/src/index.ts +2 -2
- package/src/type/IStringType.ts +2 -2
- package/src/type/IType.ts +1 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.9",
|
|
4
4
|
"description": "@leafer-ui/interface",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
"leaferjs"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@leafer/interface": "1.0.0-alpha.
|
|
22
|
+
"@leafer/interface": "1.0.0-alpha.9"
|
|
23
23
|
}
|
|
24
24
|
}
|
package/src/ICommonAttr.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { IPaint, IStrokeAlign, IStrokeCap, IStrokeJoin, IBlurEffect, IFontWeight, ITextCase, ITextDecoration, IShadowEffect, IGrayscaleEffect } from './type/IType'
|
|
2
2
|
import { ILeafStrokePaint, ILeafShadowEffect, ILeafPaint } from './type/IComputedType'
|
|
3
|
-
import { IPaintString, IDashPatternString, IPercent, IShadowString, IStringColor,
|
|
3
|
+
import { IPaintString, IDashPatternString, IPercent, IShadowString, IStringColor, IStrokeWidthString, ICornerRadiusString } from './type/IStringType'
|
|
4
4
|
|
|
5
5
|
// corner---
|
|
6
6
|
export interface ICornerRadiusAttrData {
|
|
7
|
-
cornerRadius: number
|
|
7
|
+
cornerRadius: number | number[] | ICornerRadiusString
|
|
8
8
|
cornerSmoothing: number
|
|
9
9
|
}
|
|
10
10
|
export interface ICornerRadiusInputData {
|
|
11
|
-
cornerRadius?: number
|
|
11
|
+
cornerRadius?: number | number[] | ICornerRadiusString
|
|
12
12
|
cornerSmoothing?: number
|
|
13
13
|
}
|
|
14
14
|
export interface ICornerRadiusComputedData {
|
|
@@ -28,14 +28,6 @@ export interface IFillComputedData {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
// border
|
|
31
|
-
export interface IBorderAttrData {
|
|
32
|
-
borderWidth: number | number[] | IBorderWidthString
|
|
33
|
-
borderRadius: number | number[] | IBorderRadiusString
|
|
34
|
-
}
|
|
35
|
-
export interface IBorderInputData {
|
|
36
|
-
borderWidth?: number | number[]
|
|
37
|
-
borderRadius?: number | number[]
|
|
38
|
-
}
|
|
39
31
|
export interface IBorderComputedData {
|
|
40
32
|
borderWidth?: number | number[]
|
|
41
33
|
borderRadius?: number | number[]
|
|
@@ -46,7 +38,7 @@ export interface IStrokeAttrData {
|
|
|
46
38
|
stroke: IPaint | IPaint[] | IPaintString
|
|
47
39
|
|
|
48
40
|
strokeAlign: IStrokeAlign
|
|
49
|
-
strokeWidth: number
|
|
41
|
+
strokeWidth: number | number[] | IStrokeWidthString
|
|
50
42
|
strokeCap: IStrokeCap
|
|
51
43
|
strokeJoin: IStrokeJoin
|
|
52
44
|
dashPattern: number[] | IDashPatternString
|
|
@@ -57,7 +49,7 @@ export interface IStrokeInputData {
|
|
|
57
49
|
stroke?: IPaint | IPaint[] | IPaintString
|
|
58
50
|
|
|
59
51
|
strokeAlign?: IStrokeAlign
|
|
60
|
-
strokeWidth?: number
|
|
52
|
+
strokeWidth?: number | number[] | IStrokeWidthString
|
|
61
53
|
strokeCap?: IStrokeCap
|
|
62
54
|
strokeJoin?: IStrokeJoin
|
|
63
55
|
dashPattern?: number[] | IDashPatternString
|
package/src/IUI.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ILeaf, ILeafComputedData, ILeafData, ILeafInputData, ILeaferCanvas, IRenderOptions,
|
|
1
|
+
import { ILeaf, ILeafComputedData, ILeafData, ILeafInputData, ILeaferCanvas, IRenderOptions, IPathDrawer, IPointData, IPath2D, IPathCommandData, IWindingRule, IBranch, ILeaferImageConfig, IMatrixData, IBoundsData, __Number } from '@leafer/interface'
|
|
2
2
|
|
|
3
3
|
import { IPathString, IVectorPathString } from './type/IStringType'
|
|
4
|
-
import { IBlendMode
|
|
4
|
+
import { IBlendMode } from './type/IType'
|
|
5
5
|
import { IVectorPath } from './type/IType'
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
IFillAttrData, IFillInputData, IFillComputedData,
|
|
9
|
-
IBorderComputedData,
|
|
9
|
+
IBorderComputedData,
|
|
10
10
|
ICornerRadiusAttrData, ICornerRadiusInputData, ICornerRadiusComputedData,
|
|
11
11
|
IStrokeAttrData, IStrokeComputedData, IStrokeInputData,
|
|
12
12
|
IEffectAttrData, IEffectInputData, IEffectComputedData,
|
|
13
|
-
ITextStyleAttrData, ITextStyleInputData, ITextStyleComputedData
|
|
13
|
+
ITextStyleAttrData, ITextStyleInputData, ITextStyleComputedData
|
|
14
14
|
} from './ICommonAttr'
|
|
15
15
|
|
|
16
16
|
|
|
@@ -165,7 +165,7 @@ export interface IGroupData extends IUIData { }
|
|
|
165
165
|
export interface IGroupInputData extends IUIInputData { }
|
|
166
166
|
|
|
167
167
|
// UI
|
|
168
|
-
export interface IUI extends IFillAttrData,
|
|
168
|
+
export interface IUI extends IFillAttrData, IStrokeAttrData, ICornerRadiusAttrData, IEffectAttrData, ILeaf {
|
|
169
169
|
__: IUIData
|
|
170
170
|
root?: IGroup
|
|
171
171
|
parent?: IGroup
|
|
@@ -173,7 +173,7 @@ export interface IUI extends IFillAttrData, IBorderAttrData, IStrokeAttrData, IC
|
|
|
173
173
|
readonly relativeTransform: IMatrixData
|
|
174
174
|
readonly worldBoxBounds: IBoundsData
|
|
175
175
|
readonly worldRenderBounds: IBoundsData
|
|
176
|
-
__drawPathByData(drawer:
|
|
176
|
+
__drawPathByData(drawer: IPathDrawer, data: IPathCommandData): void
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
export interface IUIData extends IUIComputedData, ILeafData {
|
|
@@ -190,8 +190,8 @@ export interface IUIData extends IUIComputedData, ILeafData {
|
|
|
190
190
|
path?: IPathCommandData
|
|
191
191
|
windingRule?: IWindingRule
|
|
192
192
|
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
__pathForRender?: IPathCommandData
|
|
194
|
+
__path2DForRender?: IPath2D
|
|
195
195
|
|
|
196
196
|
__strokeOuterWidth?: number // boxBounds外面的笔触宽度
|
|
197
197
|
}
|
|
@@ -201,7 +201,7 @@ export interface IUIComputedData extends IFillComputedData, IBorderComputedData,
|
|
|
201
201
|
locked?: boolean
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
export interface IUIInputData extends IFillInputData,
|
|
204
|
+
export interface IUIInputData extends IFillInputData, IStrokeInputData, ICornerRadiusInputData, IEffectInputData, ILeafInputData {
|
|
205
205
|
blendMode?: IBlendMode
|
|
206
206
|
mask?: boolean
|
|
207
207
|
locked?: boolean
|
package/src/index.ts
CHANGED
|
@@ -14,8 +14,8 @@ export {
|
|
|
14
14
|
IGroup, IGroupInputData, IGroupData,
|
|
15
15
|
IUI, IUIInputData, IUIData
|
|
16
16
|
} from './IUI'
|
|
17
|
-
export { IBlendMode, IVectorPath,
|
|
18
|
-
export {
|
|
17
|
+
export { IBlendMode, IVectorPath, IShadowEffect, IBlurEffect, IGrayscaleEffect, IStrokeAlign, IStrokeJoin, IStrokeCap, IColor, IPaint, IGradientPaint, IImagePaint, IImagePaintMode, IFontWeight, ITextCase, ITextDecoration } from './type/IType'
|
|
18
|
+
export { ICornerRadiusString, IStrokeWidthString, IPaintString, IShadowString, IPercent, IDashPatternString, IPathString, IVectorPathString, IStringColor } from './type/IStringType'
|
|
19
19
|
export { ILeafFill, ILeafPaint, ILeafPaintColor, ILeafStrokePaint, ILeafShadowEffect } from './type/IComputedType'
|
|
20
20
|
|
|
21
21
|
export { IUIRenderModule, IRectRenderModule, IGroupRenderModule, IFrameRenderModule } from './module/IUIRender'
|
package/src/type/IStringType.ts
CHANGED
|
@@ -2,8 +2,8 @@ export type IPercent = string
|
|
|
2
2
|
|
|
3
3
|
export type IStringColor = string
|
|
4
4
|
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
5
|
+
export type ICornerRadiusString = string
|
|
6
|
+
export type IStrokeWidthString = string
|
|
7
7
|
export type IDashPatternString = string
|
|
8
8
|
export type IVectorPathString = string
|
|
9
9
|
export type IPathString = string
|
package/src/type/IType.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IMatrixData, IPointData, IPathCommandData } from '@leafer/interface'
|
|
1
|
+
import { IMatrixData, IPointData, IPathCommandData, IWindingRule } from '@leafer/interface'
|
|
2
2
|
import { IStringColor } from './IStringType'
|
|
3
3
|
|
|
4
4
|
export type IBlendMode =
|
|
@@ -118,8 +118,6 @@ export interface IVectorPath {
|
|
|
118
118
|
rule?: IWindingRule,
|
|
119
119
|
data: string | IPathCommandData
|
|
120
120
|
}
|
|
121
|
-
export type IWindingRule = 'nonzero' | 'evenodd'
|
|
122
|
-
|
|
123
121
|
|
|
124
122
|
// 特效
|
|
125
123
|
export interface IShadowEffect {
|