@leafer-ui/interface 1.3.3 → 1.4.1
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/IAnimation.ts +1 -88
- package/src/IUI.ts +2 -2
- package/src/index.ts +2 -1
- package/src/module/IFilter.ts +25 -0
- package/src/type/IComputedType.ts +2 -2
- package/src/type/IType.ts +6 -2
- package/types/index.d.ts +23 -50
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
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.
|
|
25
|
+
"@leafer/interface": "1.4.1"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/IAnimation.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { IEventer, IEventMap, IObject, IPercentData } from '@leafer/interface'
|
|
1
|
+
import { IEventer, IEventMap, IObject, IPercentData, ITransition, IAnimateEasing, IAnimateEasingFunction, IAnimateEnding, IAnimateOptions } from '@leafer/interface'
|
|
2
2
|
|
|
3
3
|
import { IUIInputData, IUI } from './IUI'
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
export type IAnimation = IStyleAnimation | IKeyframesAnimation
|
|
7
7
|
|
|
8
|
-
export type ITransition = IAnimateOptions | IAnimateEasingName | number | boolean
|
|
9
|
-
|
|
10
8
|
export type IAnimateType = 'all' | 'animation' | 'transition' | 'animate'
|
|
11
9
|
|
|
12
10
|
export interface IStyleAnimation extends IAnimateOptions {
|
|
@@ -17,28 +15,6 @@ export interface IKeyframesAnimation extends IAnimateOptions {
|
|
|
17
15
|
keyframes: IKeyframe[]
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
export interface IAnimateOptions {
|
|
21
|
-
easing?: IAnimateEasing
|
|
22
|
-
|
|
23
|
-
delay?: number
|
|
24
|
-
duration?: number
|
|
25
|
-
ending?: IAnimateEnding
|
|
26
|
-
|
|
27
|
-
reverse?: boolean
|
|
28
|
-
swing?: boolean | number
|
|
29
|
-
|
|
30
|
-
loop?: boolean | number
|
|
31
|
-
loopDelay?: number
|
|
32
|
-
|
|
33
|
-
speed?: number
|
|
34
|
-
|
|
35
|
-
join?: boolean
|
|
36
|
-
autoplay?: boolean
|
|
37
|
-
|
|
38
|
-
attrs?: string[]
|
|
39
|
-
event?: IAnimateEvents
|
|
40
|
-
}
|
|
41
|
-
|
|
42
18
|
|
|
43
19
|
export type IKeyframe = IUIInputData | IAnimateKeyframe
|
|
44
20
|
|
|
@@ -77,67 +53,6 @@ export interface IComputedKeyframe {
|
|
|
77
53
|
totalTime?: number // 存在delay 时, 才会有这个属性
|
|
78
54
|
}
|
|
79
55
|
|
|
80
|
-
export interface IAnimateEasingFunction {
|
|
81
|
-
(t: number): number
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface ICustomEasingFunction {
|
|
85
|
-
(...arg: any): IAnimateEasingFunction
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
export type IAnimateEasing =
|
|
90
|
-
| IAnimateEasingName
|
|
91
|
-
| ICubicBezierEasing
|
|
92
|
-
| IStepsEasing
|
|
93
|
-
| IObject
|
|
94
|
-
|
|
95
|
-
export interface ICubicBezierEasing {
|
|
96
|
-
name: 'cubic-bezier',
|
|
97
|
-
value: [number, number, number, number]
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface IStepsEasing {
|
|
101
|
-
name: 'steps',
|
|
102
|
-
value: number | [number, 'floor' | 'round' | 'ceil']
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
export type IAnimateEasingName =
|
|
107
|
-
| 'linear'
|
|
108
|
-
| 'ease'
|
|
109
|
-
| 'ease-in' | 'ease-out' | 'ease-in-out'
|
|
110
|
-
| 'sine-in' | 'sine-out' | 'sine-in-out'
|
|
111
|
-
| 'quad-in' | 'quad-out' | 'quad-in-out'
|
|
112
|
-
| 'cubic-in' | 'cubic-out' | 'cubic-in-out'
|
|
113
|
-
| 'quart-in' | 'quart-out' | 'quart-in-out'
|
|
114
|
-
| 'quint-in' | 'quint-out' | 'quint-in-out'
|
|
115
|
-
| 'expo-in' | 'expo-out' | 'expo-in-out'
|
|
116
|
-
| 'circ-in' | 'circ-out' | 'circ-in-out'
|
|
117
|
-
| 'back-in' | 'back-out' | 'back-in-out'
|
|
118
|
-
| 'elastic-in' | 'elastic-out' | 'elastic-in-out'
|
|
119
|
-
| 'bounce-in' | 'bounce-out' | 'bounce-in-out'
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
export type IAnimateEnding = 'auto' | 'from' | 'to'
|
|
123
|
-
|
|
124
|
-
export interface IAnimateEvents {
|
|
125
|
-
created?: IAnimateEventFunction
|
|
126
|
-
|
|
127
|
-
play?: IAnimateEventFunction
|
|
128
|
-
pause?: IAnimateEventFunction
|
|
129
|
-
stop?: IAnimateEventFunction
|
|
130
|
-
seek?: IAnimateEventFunction
|
|
131
|
-
|
|
132
|
-
update?: IAnimateEventFunction
|
|
133
|
-
completed?: IAnimateEventFunction
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export interface IAnimateEventFunction {
|
|
137
|
-
(animate?: IAnimate): any
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
56
|
|
|
142
57
|
export interface IAnimate extends IAnimateOptions, IEventer {
|
|
143
58
|
target: IUI | IObject
|
|
@@ -171,8 +86,6 @@ export interface IAnimate extends IAnimateOptions, IEventer {
|
|
|
171
86
|
seek(time: number | IPercentData): void
|
|
172
87
|
kill(complete?: boolean, killStyle?: IUIInputData): void
|
|
173
88
|
|
|
174
|
-
|
|
175
|
-
|
|
176
89
|
destroy(complete?: boolean): void
|
|
177
90
|
}
|
|
178
91
|
|
package/src/IUI.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILeaf, ILeafComputedData, ILeafData, ILeafInputData, ILeaferCanvas, IRenderOptions, IExportOptions, IExportResult, IPathDrawer, IPointData, IPathCommandData, IBoundsData, IObject, IPathString, ILeaferImage, IPathCreator, IAnswer, IPickOptions, IPickResult, IValue, ICanvasContext2DSettings, IFourNumber, IFindCondition, IBoolean, ICanvasContext2D, IJSONOptions, IMatrixData, ISizeData } from '@leafer/interface'
|
|
1
|
+
import { ILeaf, ILeafComputedData, ILeafData, ILeafInputData, ILeaferCanvas, IRenderOptions, IExportOptions, IExportResult, IPathDrawer, IPointData, IPathCommandData, IBoundsData, IObject, IPathString, ILeaferImage, IPathCreator, IAnswer, IPickOptions, IPickResult, IValue, ICanvasContext2DSettings, IFourNumber, IFindCondition, IBoolean, ICanvasContext2D, IJSONOptions, IMatrixData, ISizeData, ITransition } from '@leafer/interface'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
IFillAttrData, IFillInputData, IFillComputedData,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ITextStyleAttrData, ITextStyleInputData, ITextStyleComputedData
|
|
10
10
|
} from './ICommonAttr'
|
|
11
11
|
import { IOverflow } from './type/IType'
|
|
12
|
-
import { IAnimation, IAnimate, IKeyframe, IKeyframeId,
|
|
12
|
+
import { IAnimation, IAnimate, IKeyframe, IKeyframeId, IAnimateType } from './IAnimation'
|
|
13
13
|
import { ILeafer } from './app/ILeafer'
|
|
14
14
|
import { IEditorConfig } from './editor/IEditor'
|
|
15
15
|
|
package/src/index.ts
CHANGED
|
@@ -33,7 +33,7 @@ export { ICornerRadiusString, IStrokeWidthString, IPaintString, IShadowString, I
|
|
|
33
33
|
export { ILeafFill, ILeafPaint, ILeafPaintPatternData, ILeafPaintColor, ILeafStrokePaint, ILeafShadowEffect } from './type/IComputedType'
|
|
34
34
|
export { IStrokeAttrData, IStrokeInputData, IStrokeComputedData, ITextStyleAttrData, ITextStyleInputData, ITextStyleComputedData, IEffectAttrData, IEffectInputData, IEffectComputedData } from './ICommonAttr'
|
|
35
35
|
|
|
36
|
-
export { IAnimation,
|
|
36
|
+
export { IAnimation, IAnimate, IAnimateList, IAnimateType, IKeyframe, IKeyframeId, IAnimateKeyframe, IComputedKeyframe, IStyleAnimation, IKeyframesAnimation } from './IAnimation'
|
|
37
37
|
|
|
38
38
|
export { IUIRenderModule, IRectRenderModule, IImageRenderModule, ITextRenderModule, IGroupRenderModule, IFrameRenderModule } from './module/IUIRender'
|
|
39
39
|
export { IUIBoundsModule } from './module/IUIBounds'
|
|
@@ -47,6 +47,7 @@ export { IStateModule } from './module/IState'
|
|
|
47
47
|
|
|
48
48
|
export { IPaintModule, IPaintImageModule, IPaintGradientModule } from './module/IPaint'
|
|
49
49
|
export { IEffectModule } from './module/IEffect'
|
|
50
|
+
export { IFilterModule, IFilterProcessor, IFilterFunction } from './module/IFilter'
|
|
50
51
|
export { ICachedShape } from './ICachedShape'
|
|
51
52
|
|
|
52
53
|
export { IEditorBase, IEditorConfig, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditToolFunction, IEditorConfigFunction } from './editor/IEditor'
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IMatrixWithBoundsScaleData, ILeaferCanvas, IFilter } from '@leafer/interface'
|
|
2
|
+
|
|
3
|
+
import { IUI } from '../IUI'
|
|
4
|
+
import { ICachedShape } from '../ICachedShape'
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export interface IFilterModule {
|
|
8
|
+
list: IFilterProcessorMap
|
|
9
|
+
register(name: string, filterProcessor: IFilterProcessor): void
|
|
10
|
+
apply(filters: IFilter[], ui: IUI, bounds: IMatrixWithBoundsScaleData, currentCanvas: ILeaferCanvas, originCanvas: ILeaferCanvas, shape: ICachedShape): void
|
|
11
|
+
getSpread(filters: IFilter[]): number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface IFilterProcessorMap {
|
|
15
|
+
[name: string]: IFilterProcessor
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IFilterProcessor {
|
|
19
|
+
apply: IFilterFunction,
|
|
20
|
+
getSpread(filter: IFilter): number
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface IFilterFunction {
|
|
24
|
+
(filter: IFilter, ui: IUI, bounds: IMatrixWithBoundsScaleData, currentCanvas: ILeaferCanvas, originCanvas: ILeaferCanvas, shape: ICachedShape): void
|
|
25
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IBlendMode, ILeaferImage, IMatrixData, ITaskItem } from '@leafer/interface'
|
|
2
2
|
|
|
3
3
|
import { IColorString } from './IStringType'
|
|
4
|
-
import { IStrokeAlign, IStrokeJoin, IStrokeCap, IImagePaintMode } from './IType'
|
|
4
|
+
import { IStrokeAlign, IStrokeJoin, IStrokeCap, IImagePaintMode, IImageFilters } from './IType'
|
|
5
5
|
import { IPaintType } from './IType'
|
|
6
6
|
|
|
7
7
|
export type ILeafPaintColor = IColorString | CanvasGradient | CanvasPattern
|
|
@@ -11,7 +11,6 @@ export interface ILeafPaint {
|
|
|
11
11
|
style?: ILeafPaintColor
|
|
12
12
|
transform?: IMatrixData
|
|
13
13
|
blendMode?: IBlendMode
|
|
14
|
-
opacity?: number
|
|
15
14
|
image?: ILeaferImage
|
|
16
15
|
loadId?: number
|
|
17
16
|
patternId?: string
|
|
@@ -27,6 +26,7 @@ export interface ILeafPaintPatternData {
|
|
|
27
26
|
scaleY?: number
|
|
28
27
|
opacity?: number
|
|
29
28
|
transform?: IMatrixData
|
|
29
|
+
filters?: IImageFilters
|
|
30
30
|
mode?: IImagePaintMode
|
|
31
31
|
repeat?: 'repeat' | 'repeat-x' | 'repeat-y'
|
|
32
32
|
}
|
package/src/type/IType.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPointData, IPathCommandData, IWindingRule, IBlendMode, IExportFileType, ISizeData, IFourNumber, IAlign, IUnitPointData,
|
|
1
|
+
import { IPointData, IPathCommandData, IWindingRule, IBlendMode, IExportFileType, ISizeData, IFourNumber, IAlign, IUnitPointData, IAxis, IAxisReverse, IFilter } from '@leafer/interface'
|
|
2
2
|
import { IColorString, IPaintString } from './IStringType'
|
|
3
3
|
|
|
4
4
|
export type IPaint = ISolidPaint | IGradientPaint | IImagePaint
|
|
@@ -59,7 +59,9 @@ export interface IColorStop {
|
|
|
59
59
|
// ---
|
|
60
60
|
export interface IImagePaint extends IPaintBase {
|
|
61
61
|
type: "image"
|
|
62
|
+
|
|
62
63
|
url: string
|
|
64
|
+
|
|
63
65
|
mode?: IImagePaintMode
|
|
64
66
|
format?: IExportFileType
|
|
65
67
|
|
|
@@ -162,6 +164,8 @@ export interface IGrayscaleEffect {
|
|
|
162
164
|
visible?: boolean
|
|
163
165
|
}
|
|
164
166
|
|
|
165
|
-
export
|
|
167
|
+
export interface IEffect extends IFilter {
|
|
168
|
+
|
|
169
|
+
}
|
|
166
170
|
|
|
167
171
|
export type IOverflow = 'show' | 'hide'
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IBlendMode, IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, ISizeData, IPathCommandData, IAxis, IAxisReverse, IWindingRule,
|
|
1
|
+
import { IBlendMode, IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, ISizeData, IPathCommandData, IAxis, IAxisReverse, IWindingRule, IFilter, IMatrixData, ILeaferImage, ITaskItem, IBoolean, INumber, IString, IUnitData, IAnimateOptions, IAnimateEasing, IEventer, IObject, IEventMap, IAnimateEasingFunction, IAnimateEnding, ITransition, IPercentData, ILeafInputData, ILeaf as ILeaf$1, ILeafComputedData, ILeafData, IBoundsData as IBoundsData$1, IPathCreator, IJSONOptions, IValue, IFindCondition, IAnswer, IPathString, IPathDrawer, ILeaferCanvas, IRenderOptions, IExportOptions, IExportResult, IPickOptions, IPickResult, ICanvasContext2DSettings, ICanvasContext2D, ILeaferAttrData, IControl, ILeaferType, ILeaferConfig, ILeafRender, ILeafBounds, ILeafHit, ICachedLeaf, IBooleanMap, IAround, IMatrixWithBoundsScaleData } from '@leafer/interface';
|
|
2
2
|
export * from '@leafer/interface';
|
|
3
|
-
import {
|
|
3
|
+
import { IObject as IObject$1, IEditSize, IStroke as IStroke$1, IFill as IFill$1, IBoxInputData as IBoxInputData$1, IRectInputData as IRectInputData$1, IColorString as IColorString$1, IDirection4, ICursorType, IImageCursor, IAlign as IAlign$1, IUnitPointData as IUnitPointData$1, IUIInputData as IUIInputData$1, IGroup as IGroup$1, ISelectorProxy, IUI as IUI$1, ILeafList, IBox as IBox$1, IRect as IRect$1, IBoundsData, IKeyEvent, ILeaf, IDragEvent, IZoomEvent, IRotateEvent, IGroupInputData as IGroupInputData$1, IStateName as IStateName$1, IString as IString$1, IBoolean as IBoolean$1, IStateStyle as IStateStyle$1 } from '@leafer-ui/interface';
|
|
4
4
|
|
|
5
5
|
type IPercent = string;
|
|
6
6
|
type IColorString = string;
|
|
@@ -125,7 +125,8 @@ interface IGrayscaleEffect {
|
|
|
125
125
|
grayscale: number;
|
|
126
126
|
visible?: boolean;
|
|
127
127
|
}
|
|
128
|
-
|
|
128
|
+
interface IEffect extends IFilter {
|
|
129
|
+
}
|
|
129
130
|
type IOverflow = 'show' | 'hide';
|
|
130
131
|
|
|
131
132
|
type ILeafPaintColor = IColorString | CanvasGradient | CanvasPattern;
|
|
@@ -134,7 +135,6 @@ interface ILeafPaint {
|
|
|
134
135
|
style?: ILeafPaintColor;
|
|
135
136
|
transform?: IMatrixData;
|
|
136
137
|
blendMode?: IBlendMode;
|
|
137
|
-
opacity?: number;
|
|
138
138
|
image?: ILeaferImage;
|
|
139
139
|
loadId?: number;
|
|
140
140
|
patternId?: string;
|
|
@@ -149,6 +149,7 @@ interface ILeafPaintPatternData {
|
|
|
149
149
|
scaleY?: number;
|
|
150
150
|
opacity?: number;
|
|
151
151
|
transform?: IMatrixData;
|
|
152
|
+
filters?: IImageFilters;
|
|
152
153
|
mode?: IImagePaintMode;
|
|
153
154
|
repeat?: 'repeat' | 'repeat-x' | 'repeat-y';
|
|
154
155
|
}
|
|
@@ -313,7 +314,6 @@ interface IEffectComputedData {
|
|
|
313
314
|
}
|
|
314
315
|
|
|
315
316
|
type IAnimation = IStyleAnimation | IKeyframesAnimation;
|
|
316
|
-
type ITransition = IAnimateOptions | IAnimateEasingName | number | boolean;
|
|
317
317
|
type IAnimateType = 'all' | 'animation' | 'transition' | 'animate';
|
|
318
318
|
interface IStyleAnimation extends IAnimateOptions {
|
|
319
319
|
style: IUIInputData;
|
|
@@ -321,21 +321,6 @@ interface IStyleAnimation extends IAnimateOptions {
|
|
|
321
321
|
interface IKeyframesAnimation extends IAnimateOptions {
|
|
322
322
|
keyframes: IKeyframe[];
|
|
323
323
|
}
|
|
324
|
-
interface IAnimateOptions {
|
|
325
|
-
easing?: IAnimateEasing;
|
|
326
|
-
delay?: number;
|
|
327
|
-
duration?: number;
|
|
328
|
-
ending?: IAnimateEnding;
|
|
329
|
-
reverse?: boolean;
|
|
330
|
-
swing?: boolean | number;
|
|
331
|
-
loop?: boolean | number;
|
|
332
|
-
loopDelay?: number;
|
|
333
|
-
speed?: number;
|
|
334
|
-
join?: boolean;
|
|
335
|
-
autoplay?: boolean;
|
|
336
|
-
attrs?: string[];
|
|
337
|
-
event?: IAnimateEvents;
|
|
338
|
-
}
|
|
339
324
|
type IKeyframe = IUIInputData | IAnimateKeyframe;
|
|
340
325
|
type IKeyframeId = number;
|
|
341
326
|
interface IAnimateKeyframe {
|
|
@@ -361,35 +346,6 @@ interface IComputedKeyframe {
|
|
|
361
346
|
autoDuration?: number;
|
|
362
347
|
totalTime?: number;
|
|
363
348
|
}
|
|
364
|
-
interface IAnimateEasingFunction {
|
|
365
|
-
(t: number): number;
|
|
366
|
-
}
|
|
367
|
-
interface ICustomEasingFunction {
|
|
368
|
-
(...arg: any): IAnimateEasingFunction;
|
|
369
|
-
}
|
|
370
|
-
type IAnimateEasing = IAnimateEasingName | ICubicBezierEasing | IStepsEasing | IObject;
|
|
371
|
-
interface ICubicBezierEasing {
|
|
372
|
-
name: 'cubic-bezier';
|
|
373
|
-
value: [number, number, number, number];
|
|
374
|
-
}
|
|
375
|
-
interface IStepsEasing {
|
|
376
|
-
name: 'steps';
|
|
377
|
-
value: number | [number, 'floor' | 'round' | 'ceil'];
|
|
378
|
-
}
|
|
379
|
-
type IAnimateEasingName = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'sine-in' | 'sine-out' | 'sine-in-out' | 'quad-in' | 'quad-out' | 'quad-in-out' | 'cubic-in' | 'cubic-out' | 'cubic-in-out' | 'quart-in' | 'quart-out' | 'quart-in-out' | 'quint-in' | 'quint-out' | 'quint-in-out' | 'expo-in' | 'expo-out' | 'expo-in-out' | 'circ-in' | 'circ-out' | 'circ-in-out' | 'back-in' | 'back-out' | 'back-in-out' | 'elastic-in' | 'elastic-out' | 'elastic-in-out' | 'bounce-in' | 'bounce-out' | 'bounce-in-out';
|
|
380
|
-
type IAnimateEnding = 'auto' | 'from' | 'to';
|
|
381
|
-
interface IAnimateEvents {
|
|
382
|
-
created?: IAnimateEventFunction;
|
|
383
|
-
play?: IAnimateEventFunction;
|
|
384
|
-
pause?: IAnimateEventFunction;
|
|
385
|
-
stop?: IAnimateEventFunction;
|
|
386
|
-
seek?: IAnimateEventFunction;
|
|
387
|
-
update?: IAnimateEventFunction;
|
|
388
|
-
completed?: IAnimateEventFunction;
|
|
389
|
-
}
|
|
390
|
-
interface IAnimateEventFunction {
|
|
391
|
-
(animate?: IAnimate): any;
|
|
392
|
-
}
|
|
393
349
|
interface IAnimate extends IAnimateOptions, IEventer {
|
|
394
350
|
target: IUI | IObject;
|
|
395
351
|
keyframes: IKeyframe[];
|
|
@@ -1084,4 +1040,21 @@ interface IEffectModule {
|
|
|
1084
1040
|
backgroundBlur(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void;
|
|
1085
1041
|
}
|
|
1086
1042
|
|
|
1087
|
-
|
|
1043
|
+
interface IFilterModule {
|
|
1044
|
+
list: IFilterProcessorMap;
|
|
1045
|
+
register(name: string, filterProcessor: IFilterProcessor): void;
|
|
1046
|
+
apply(filters: IFilter[], ui: IUI, bounds: IMatrixWithBoundsScaleData, currentCanvas: ILeaferCanvas, originCanvas: ILeaferCanvas, shape: ICachedShape): void;
|
|
1047
|
+
getSpread(filters: IFilter[]): number;
|
|
1048
|
+
}
|
|
1049
|
+
interface IFilterProcessorMap {
|
|
1050
|
+
[name: string]: IFilterProcessor;
|
|
1051
|
+
}
|
|
1052
|
+
interface IFilterProcessor {
|
|
1053
|
+
apply: IFilterFunction;
|
|
1054
|
+
getSpread(filter: IFilter): number;
|
|
1055
|
+
}
|
|
1056
|
+
interface IFilterFunction {
|
|
1057
|
+
(filter: IFilter, ui: IUI, bounds: IMatrixWithBoundsScaleData, currentCanvas: ILeaferCanvas, originCanvas: ILeaferCanvas, shape: ICachedShape): void;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
export type { IAnimate, IAnimateKeyframe, IAnimateList, IAnimateType, IAnimation, IApp, IAppConfig, IAppData, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, IComputedKeyframe, ICornerRadiusString, IDashPatternString, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditToolFunction, IEditorBase, IEditorConfig, IEditorConfigFunction, IEffect, IEffectAttrData, IEffectComputedData, IEffectInputData, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IFill, IFilterFunction, IFilterModule, IFilterProcessor, IFindUIMethod, IFlow, IFlowData, IFlowInputData, IFontWeight, IFontWeightNumer, IFontWeightString, IFrame, IFrameData, IFrameInputData, IFrameRenderModule, IGIF, IGIFData, IGIFInputData, IGradientPaint, IGradientType, IGrayscaleEffect, IGroup, IGroupData, IGroupInputData, IGroupRenderModule, IImage, IImageData, IImageFilters, IImageInputData, IImagePaint, IImagePaintMode, IImageRenderModule, IKeyframe, IKeyframeId, IKeyframesAnimation, ILeafFill, ILeafPaint, ILeafPaintColor, ILeafPaintPatternData, ILeafShadowEffect, ILeafStrokePaint, ILeafer, ILeaferData, ILeaferInputData, ILine, ILineData, ILineInputData, IOverflow, IPaint, IPaintAttr, IPaintBase, IPaintGradientModule, IPaintImageModule, IPaintModule, IPaintString, IPaintType, IPath, IPathArrowModule, IPathData, IPathDataArrow, IPathDataArrowMap, IPathDataArrowOffset, IPathInputData, IPen, IPenData, IPenInputData, IPercent, IPolygon, IPolygonData, IPolygonInputData, IRGB, IRGBA, IRect, IRectData, IRectInputData, IRectRenderModule, IRepeat, IRobot, IRobotActionName, IRobotActions, IRobotAnimation, IRobotComputedKeyframe, IRobotData, IRobotInputData, IRobotKeyframe, IShadowEffect, IShadowString, ISolidPaint, IStar, IStarData, IStarInputData, IStateModule, IStateName, IStateStyle, IStates, IStroke, IStrokeAlign, IStrokeAttrData, IStrokeCap, IStrokeComputedData, IStrokeInputData, IStrokeJoin, IStrokeWidthString, IStyleAnimation, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDrawData, ITextInputData, ITextRenderModule, ITextRowData, ITextStyleAttrData, ITextStyleComputedData, ITextStyleInputData, ITextWordData, ITextWrap, ITransitionFunction, ITransitionMap, ITransitionModule, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIJSONData, IUIRenderModule, IUITag, IVectorPath, IVerticalAlign, IVideo, IVideoData, IVideoInputData, IWritingMode };
|