@leafer-ui/interface 1.0.0-beta.11 → 1.0.0-beta.15

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/src/type/IType.ts DELETED
@@ -1,133 +0,0 @@
1
- import { IPointData, IPathCommandData, IWindingRule, IBlendMode } from '@leafer/interface'
2
- import { IColorString } from './IStringType'
3
-
4
- export interface IUnitData {
5
- type: 'percent' | 'px'
6
- value: number
7
- }
8
-
9
- export type IPaint = ISolidPaint | IGradientPaint | IImagePaint
10
-
11
- export interface IPaintBase {
12
- type: IPaintType
13
- blendMode?: IBlendMode
14
- visible?: boolean
15
- opacity?: number
16
-
17
- }
18
-
19
- export type IPaintType =
20
- | 'image'
21
- | 'solid'
22
- | IGradientType
23
-
24
- export type IGradientType =
25
- | 'linear'
26
- | 'radial'
27
- | 'angular'
28
-
29
- // ---
30
- export interface ISolidPaint extends IPaintBase {
31
- type: 'solid'
32
- color: IColor
33
- }
34
-
35
- export type IColor = IColorString | IRGB | IRGBA
36
- export interface IRGB {
37
- r: number
38
- g: number
39
- b: number
40
- a?: number
41
- }
42
- export interface IRGBA extends IRGB {
43
- a: number
44
- }
45
-
46
- // ---
47
- export interface IGradientPaint extends IPaintBase {
48
- type: IGradientType
49
- from?: IPointData
50
- to?: IPointData
51
- stretch?: number
52
- stops: IColorStop[]
53
- }
54
- export interface IColorStop {
55
- offset: number
56
- color: IColor
57
- }
58
-
59
- // ---
60
- export interface IImagePaint extends IPaintBase {
61
- type: "image"
62
- url: string
63
- mode?: IImagePaintMode
64
-
65
- filters?: IImageFilters
66
-
67
- offset?: IPointData
68
- scale?: number | IPointData
69
- rotation?: number
70
- }
71
- export interface IImageFilters {
72
- exposure?: number // 曝光
73
- contrast?: number // 对比度
74
- saturation?: number // 饱和度
75
- temperature?: number // 色温
76
- tint?: number // 色调
77
- highlights?: number // 高光
78
- shadows?: number // 阴影
79
- }
80
- export type IImagePaintMode = 'cover' | 'fit' | 'strench' | 'clip' | 'repeat'
81
-
82
- // 描边
83
- export type IStrokeAlign = 'inside' | 'outside' | 'center'
84
- export type IStrokeCap = 'none' | 'round' | 'square' | 'arrow-lines' | 'arrow-equilateral'
85
- export type IStrokeJoin = 'bevel' | 'round' | 'miter'
86
-
87
- // 文本
88
- export type ITextAlign = 'left' | 'center' | 'right' | 'justify'
89
- export type IVerticalAlign = 'top' | 'middle' | 'bottom'
90
- export type ITextCase = | 'upper' | 'lower' | 'title' | 'none' | 'small-caps'
91
- export type IFontWeight = IFontWeightNumer | IFontWeightString
92
- export type IFontWeightNumer = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
93
- export type IFontWeightString =
94
- | 'thin'
95
- | 'extra-light'
96
- | 'light'
97
- | 'normal'
98
- | 'medium'
99
- | 'semi-bold'
100
- | 'bold'
101
- | 'extra-bold'
102
- | 'black'
103
- export type ITextDecoration = 'none' | 'under' | 'delete'
104
-
105
- // 路径
106
- export interface IVectorPath {
107
- rule?: IWindingRule,
108
- data: string | IPathCommandData
109
- }
110
-
111
- // 特效
112
- export interface IShadowEffect {
113
- x: number
114
- y: number
115
- blur: number
116
- spread?: number
117
- color: IColorString | IColor
118
- blendMode?: IBlendMode
119
- visible?: boolean
120
- box?: boolean
121
- }
122
-
123
- export interface IBlurEffect {
124
- blur: number
125
- visible?: boolean
126
- }
127
-
128
- export interface IGrayscaleEffect {
129
- grayscale: number
130
- visible?: boolean
131
- }
132
-
133
- export type IOverflow = 'show' | 'hide'