@leafer-ui/interface 1.6.1 → 1.6.3
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 +2 -2
- package/src/IUI.ts +21 -8
- package/src/app/IApp.ts +2 -2
- package/src/index.ts +1 -1
- package/src/module/IColorConvert.ts +1 -0
- package/src/module/IPaint.ts +3 -1
- package/src/module/IState.ts +1 -0
- package/src/type/IComputedType.ts +1 -0
- package/src/type/IType.ts +2 -1
- package/types/index.d.ts +29 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
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.6.
|
|
25
|
+
"@leafer/interface": "1.6.3"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/IAnimation.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEventer,
|
|
1
|
+
import { IEventer, IEventParamsMap, IObject, IPercentData, ITransition, IAnimateEasing, IAnimateEasingFunction, IAnimateEnding, IAnimateOptions } from '@leafer/interface'
|
|
2
2
|
|
|
3
3
|
import { IUIInputData, IUI } from './IUI'
|
|
4
4
|
|
|
@@ -59,7 +59,7 @@ export interface IAnimate extends IAnimateOptions, IEventer {
|
|
|
59
59
|
|
|
60
60
|
keyframes: IKeyframe[]
|
|
61
61
|
config?: IAnimateOptions
|
|
62
|
-
event?:
|
|
62
|
+
event?: IEventParamsMap
|
|
63
63
|
|
|
64
64
|
readonly frames: IComputedKeyframe[]
|
|
65
65
|
|
package/src/IUI.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { IOverflow } from './type/IType'
|
|
|
12
12
|
import { IAnimation, IAnimate, IKeyframe, IKeyframeId, IAnimateType } from './IAnimation'
|
|
13
13
|
import { ILeafer } from './app/ILeafer'
|
|
14
14
|
import { IEditorConfig } from './editor/IEditor'
|
|
15
|
+
import { IColorString } from './type/IStringType'
|
|
15
16
|
|
|
16
17
|
// Line
|
|
17
18
|
export interface ILine extends ILineAttrData, IUI {
|
|
@@ -207,6 +208,7 @@ export interface IText extends ITextAttrData, ITextStyleAttrData, IUI {
|
|
|
207
208
|
}
|
|
208
209
|
interface ITextAttrData {
|
|
209
210
|
text?: string | number
|
|
211
|
+
placeholder?: string
|
|
210
212
|
padding?: IFourNumber
|
|
211
213
|
resizeFontSize?: boolean
|
|
212
214
|
boxStyle?: IBackgroundBoxStyle
|
|
@@ -223,6 +225,7 @@ export interface ITextData extends ITextAttrData, ITextStyleComputedData, IUIDat
|
|
|
223
225
|
__letterSpacing?: number
|
|
224
226
|
__padding?: number[]
|
|
225
227
|
__clipText?: boolean
|
|
228
|
+
__isPlacehold?: boolean
|
|
226
229
|
__textBoxBounds?: IBoundsData
|
|
227
230
|
}
|
|
228
231
|
export interface ITextInputData extends ITextAttrData, ITextStyleInputData, IUIBaseInputData {
|
|
@@ -278,8 +281,8 @@ export interface ITextDrawData {
|
|
|
278
281
|
// Image
|
|
279
282
|
export interface IImage extends IImageAttrData, IRect {
|
|
280
283
|
__: IImageData
|
|
281
|
-
ready: boolean
|
|
282
|
-
image?: ILeaferImage
|
|
284
|
+
readonly ready: boolean
|
|
285
|
+
readonly image?: ILeaferImage
|
|
283
286
|
}
|
|
284
287
|
interface IImageAttrData {
|
|
285
288
|
url?: string
|
|
@@ -292,7 +295,7 @@ export interface IImageInputData extends IImageAttrData, IUIBaseInputData { }
|
|
|
292
295
|
export interface ICanvas extends ICanvasAttrData, IRect {
|
|
293
296
|
__: ICanvasData
|
|
294
297
|
canvas?: ILeaferCanvas
|
|
295
|
-
context?: ICanvasContext2D
|
|
298
|
+
readonly context?: ICanvasContext2D
|
|
296
299
|
__updateSize(): void
|
|
297
300
|
}
|
|
298
301
|
interface ICanvasAttrData {
|
|
@@ -376,6 +379,7 @@ export interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICorne
|
|
|
376
379
|
zoomLayer?: IGroup
|
|
377
380
|
readonly isFrame?: boolean
|
|
378
381
|
isOverflow?: boolean
|
|
382
|
+
useFastShadow?: boolean // 将忽略 stroke 产生的阴影,只对单个 fill 有效
|
|
379
383
|
|
|
380
384
|
proxyData?: IUIInputData
|
|
381
385
|
__proxyData?: IUIInputData
|
|
@@ -413,6 +417,8 @@ export interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICorne
|
|
|
413
417
|
__drawAfterFill?(canvas: ILeaferCanvas, options: IRenderOptions): void
|
|
414
418
|
__drawContent?(canvas: ILeaferCanvas, options: IRenderOptions): void
|
|
415
419
|
|
|
420
|
+
drawImagePlaceholder(canvas: ILeaferCanvas, image: ILeaferImage): void
|
|
421
|
+
|
|
416
422
|
animate(keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], options?: ITransition, type?: IAnimateType, isTemp?: boolean): IAnimate
|
|
417
423
|
killAnimate(type?: IAnimateType, nextStyle?: IUIInputData): void
|
|
418
424
|
|
|
@@ -451,6 +457,8 @@ interface IUIAttrData {
|
|
|
451
457
|
selectedStyle?: IStateStyle
|
|
452
458
|
disabledStyle?: IStateStyle
|
|
453
459
|
placeholderStyle?: IStateStyle
|
|
460
|
+
placeholderColor?: IColorString
|
|
461
|
+
placeholderDelay?: number
|
|
454
462
|
|
|
455
463
|
editConfig?: IEditorConfig
|
|
456
464
|
editOuter?: string
|
|
@@ -474,15 +482,17 @@ export interface IUIData extends IUIAttrData, IUIComputedData, ILeafData {
|
|
|
474
482
|
readonly __hasHalf: number // 是否存在半逻辑像素渲染(奇数线宽的居中线条),可以半像素为起点绘制,防止模糊
|
|
475
483
|
|
|
476
484
|
|
|
477
|
-
|
|
478
|
-
|
|
485
|
+
__isAlphaPixelFill?: boolean // png / svg / webp
|
|
486
|
+
__isAlphaPixelStroke?: boolean
|
|
487
|
+
|
|
488
|
+
__isTransparentFill?: boolean // 半透明的填充色
|
|
489
|
+
__isTransparentStroke?: boolean
|
|
479
490
|
|
|
480
491
|
__isHitPixel?: boolean
|
|
481
492
|
__isCanvas?: boolean // canvas 等需单独绘制的元素
|
|
493
|
+
__isFastShadow?: boolean // 高性能绘制阴影,需满足一定的条件
|
|
482
494
|
|
|
483
|
-
|
|
484
|
-
__opacityStroke?: boolean
|
|
485
|
-
|
|
495
|
+
__fillAfterStroke?: boolean // 填充在描边之后绘制,一般用于高性能的外描边场景
|
|
486
496
|
__drawAfterFill?: boolean
|
|
487
497
|
readonly __clipAfterFill?: boolean
|
|
488
498
|
readonly __hasSurface?: boolean
|
|
@@ -497,6 +507,9 @@ export interface IUIData extends IUIAttrData, IUIComputedData, ILeafData {
|
|
|
497
507
|
|
|
498
508
|
__needComputePaint?: boolean
|
|
499
509
|
__computePaint(): void
|
|
510
|
+
|
|
511
|
+
__setPaint(attrName: 'fill' | 'stroke', value: IValue): void
|
|
512
|
+
__removePaint(attrName: 'fill' | 'stroke', removeInput?: boolean): void
|
|
500
513
|
}
|
|
501
514
|
export interface IUIComputedData extends IUIAttrData, IFillComputedData, IBorderComputedData, IStrokeComputedData, ITextStyleComputedData, ICornerRadiusComputedData, IEffectComputedData, ILeafComputedData {
|
|
502
515
|
|
package/src/app/IApp.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { IEditorConfig } from '../editor/IEditor'
|
|
|
6
6
|
export interface IApp extends ILeafer {
|
|
7
7
|
children: ILeafer[]
|
|
8
8
|
realCanvas: boolean
|
|
9
|
-
forEach(fn:
|
|
9
|
+
forEach(fn: IAppForEachFunction): void
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface IAppConfig extends ILeaferConfig {
|
|
@@ -16,6 +16,6 @@ export interface IAppConfig extends ILeaferConfig {
|
|
|
16
16
|
editor?: IEditorConfig
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export interface
|
|
19
|
+
export interface IAppForEachFunction {
|
|
20
20
|
(value: ILeafer, index: number, array: ILeafer[]): void
|
|
21
21
|
}
|
package/src/index.ts
CHANGED
package/src/module/IPaint.ts
CHANGED
|
@@ -12,12 +12,14 @@ export interface IPaintModule {
|
|
|
12
12
|
fill(fill: string, ui: IUI, canvas: ILeaferCanvas,): void
|
|
13
13
|
fills(fills: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
|
|
14
14
|
|
|
15
|
+
fillPathOrText(ui: IUI, canvas: ILeaferCanvas): void
|
|
15
16
|
fillText(ui: IUI, canvas: ILeaferCanvas): void
|
|
16
17
|
|
|
17
18
|
stroke(stroke: string, ui: IUI, canvas: ILeaferCanvas): void
|
|
18
19
|
strokes(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
|
|
19
20
|
|
|
20
21
|
strokeText(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
|
|
22
|
+
strokeArrow?(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
|
|
21
23
|
drawTextStroke(ui: IUI, canvas: ILeaferCanvas): void
|
|
22
24
|
|
|
23
25
|
shape(ui: IUI, current: ILeaferCanvas, renderOptions: IRenderOptions): ICachedShape
|
|
@@ -26,7 +28,7 @@ export interface IPaintModule {
|
|
|
26
28
|
|
|
27
29
|
export interface IPaintImageModule {
|
|
28
30
|
image(ui: IUI, attrName: string, paint: IImagePaint, boxBounds: IBoundsData, firstUse: boolean): ILeafPaint
|
|
29
|
-
checkImage(ui: IUI, canvas: ILeaferCanvas, paint: ILeafPaint, allowPaint?: boolean): boolean
|
|
31
|
+
checkImage(ui: IUI, canvas: ILeaferCanvas, paint: ILeafPaint, allowPaint?: boolean): boolean // 返回true表示已进行了原生绘制
|
|
30
32
|
createPattern(ui: IUI, paint: ILeafPaint, pixelRatio: number): boolean
|
|
31
33
|
recycleImage(attrName: IPaintAttr, data: IUIData): IBooleanMap
|
|
32
34
|
|
package/src/module/IState.ts
CHANGED
|
@@ -12,6 +12,7 @@ export interface IStateModule {
|
|
|
12
12
|
isFocus(leaf: ILeaf, button?: ILeaf | boolean): boolean
|
|
13
13
|
isHover(leaf: ILeaf, button?: ILeaf | boolean): boolean
|
|
14
14
|
isPress(leaf: ILeaf, button?: ILeaf | boolean): boolean
|
|
15
|
+
isPlacehold(leaf: ILeaf, button?: ILeaf | boolean): boolean
|
|
15
16
|
|
|
16
17
|
isDrag(leaf: ILeaf, button?: boolean | ILeaf): boolean
|
|
17
18
|
|
package/src/type/IType.ts
CHANGED
|
@@ -80,6 +80,7 @@ export interface IImagePaint extends IPaintBase {
|
|
|
80
80
|
|
|
81
81
|
changeful?: boolean // 会频繁变化,不生成图案(有特殊性能优化,一般用于游戏精灵、动图场景)
|
|
82
82
|
sync?: boolean // 同步显示,不走任务列表生成图案
|
|
83
|
+
showProgress?: boolean // 是否显示进度
|
|
83
84
|
}
|
|
84
85
|
export interface IImageFilters {
|
|
85
86
|
exposure?: number // 曝光
|
|
@@ -177,4 +178,4 @@ export interface IEffect extends IFilter {
|
|
|
177
178
|
|
|
178
179
|
}
|
|
179
180
|
|
|
180
|
-
export type IOverflow = 'show' | 'hide'
|
|
181
|
+
export type IOverflow = 'show' | 'hide' | 'scroll' | 'auto'
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBlendMode, IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, IOptionSizeData, IPathCommandData, IAxis, IAxisReverse, IWindingRule, IFilter, IMatrixData, ILeaferImage, ITaskItem, IBoolean, INumber, IString, IUnitData, IAnimateOptions, IAnimateEasing, IEventer, IObject,
|
|
1
|
+
import { IBlendMode, IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, IOptionSizeData, IPathCommandData, IAxis, IAxisReverse, IWindingRule, IFilter, IMatrixData, ILeaferImage, ITaskItem, IBoolean, INumber, IString, IUnitData, IAnimateOptions, IAnimateEasing, IEventer, IObject, IEventParamsMap, IAnimateEasingFunction, IAnimateEnding, ITransition, IPercentData, ILeafInputData, ISizeData, ILeaf as ILeaf$1, ILeafComputedData, ILeafData, IBoundsData as IBoundsData$1, IValue, IPathCreator, IJSONOptions, 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
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, IUI as IUI$1, IPointData as IPointData$1, IScaleData, ISkewData, IGroup as IGroup$1, ISelectorProxy, ILeafList, IBox as IBox$1, IRect as IRect$1, ILayoutBoundsData, 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
|
|
|
@@ -65,6 +65,7 @@ interface IImagePaint extends IPaintBase {
|
|
|
65
65
|
repeat?: IRepeat;
|
|
66
66
|
changeful?: boolean;
|
|
67
67
|
sync?: boolean;
|
|
68
|
+
showProgress?: boolean;
|
|
68
69
|
}
|
|
69
70
|
interface IImageFilters {
|
|
70
71
|
exposure?: number;
|
|
@@ -133,7 +134,7 @@ interface IGrayscaleEffect {
|
|
|
133
134
|
}
|
|
134
135
|
interface IEffect extends IFilter {
|
|
135
136
|
}
|
|
136
|
-
type IOverflow = 'show' | 'hide';
|
|
137
|
+
type IOverflow = 'show' | 'hide' | 'scroll' | 'auto';
|
|
137
138
|
|
|
138
139
|
type ILeafPaintColor = IColorString | CanvasGradient | CanvasPattern;
|
|
139
140
|
interface ILeafPaint {
|
|
@@ -147,6 +148,7 @@ interface ILeafPaint {
|
|
|
147
148
|
patternTask?: ITaskItem;
|
|
148
149
|
changeful?: boolean;
|
|
149
150
|
sync?: boolean;
|
|
151
|
+
isTransparent?: boolean;
|
|
150
152
|
data?: ILeafPaintPatternData;
|
|
151
153
|
}
|
|
152
154
|
interface ILeafPaintPatternData {
|
|
@@ -357,7 +359,7 @@ interface IAnimate extends IAnimateOptions, IEventer {
|
|
|
357
359
|
target: IUI | IObject;
|
|
358
360
|
keyframes: IKeyframe[];
|
|
359
361
|
config?: IAnimateOptions;
|
|
360
|
-
event?:
|
|
362
|
+
event?: IEventParamsMap;
|
|
361
363
|
readonly frames: IComputedKeyframe[];
|
|
362
364
|
readonly style: IUIInputData;
|
|
363
365
|
readonly fromStyle: IUIInputData;
|
|
@@ -726,6 +728,7 @@ interface IText extends ITextAttrData, ITextStyleAttrData, IUI {
|
|
|
726
728
|
}
|
|
727
729
|
interface ITextAttrData {
|
|
728
730
|
text?: string | number;
|
|
731
|
+
placeholder?: string;
|
|
729
732
|
padding?: IFourNumber;
|
|
730
733
|
resizeFontSize?: boolean;
|
|
731
734
|
boxStyle?: IBackgroundBoxStyle;
|
|
@@ -739,6 +742,7 @@ interface ITextData extends ITextAttrData, ITextStyleComputedData, IUIData {
|
|
|
739
742
|
__letterSpacing?: number;
|
|
740
743
|
__padding?: number[];
|
|
741
744
|
__clipText?: boolean;
|
|
745
|
+
__isPlacehold?: boolean;
|
|
742
746
|
__textBoxBounds?: IBoundsData$1;
|
|
743
747
|
}
|
|
744
748
|
interface ITextInputData extends ITextAttrData, ITextStyleInputData, IUIBaseInputData {
|
|
@@ -785,8 +789,8 @@ interface ITextDrawData {
|
|
|
785
789
|
}
|
|
786
790
|
interface IImage extends IImageAttrData, IRect {
|
|
787
791
|
__: IImageData;
|
|
788
|
-
ready: boolean;
|
|
789
|
-
image?: ILeaferImage;
|
|
792
|
+
readonly ready: boolean;
|
|
793
|
+
readonly image?: ILeaferImage;
|
|
790
794
|
}
|
|
791
795
|
interface IImageAttrData {
|
|
792
796
|
url?: string;
|
|
@@ -799,7 +803,7 @@ interface IImageInputData extends IImageAttrData, IUIBaseInputData {
|
|
|
799
803
|
interface ICanvas extends ICanvasAttrData, IRect {
|
|
800
804
|
__: ICanvasData;
|
|
801
805
|
canvas?: ILeaferCanvas;
|
|
802
|
-
context?: ICanvasContext2D;
|
|
806
|
+
readonly context?: ICanvasContext2D;
|
|
803
807
|
__updateSize(): void;
|
|
804
808
|
}
|
|
805
809
|
interface ICanvasAttrData {
|
|
@@ -866,6 +870,7 @@ interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICornerRadius
|
|
|
866
870
|
zoomLayer?: IGroup;
|
|
867
871
|
readonly isFrame?: boolean;
|
|
868
872
|
isOverflow?: boolean;
|
|
873
|
+
useFastShadow?: boolean;
|
|
869
874
|
proxyData?: IUIInputData;
|
|
870
875
|
__proxyData?: IUIInputData;
|
|
871
876
|
animation?: IAnimation | IAnimation[];
|
|
@@ -890,6 +895,7 @@ interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICornerRadius
|
|
|
890
895
|
__drawPathByBox(drawer: IPathDrawer): void;
|
|
891
896
|
__drawAfterFill?(canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
892
897
|
__drawContent?(canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
898
|
+
drawImagePlaceholder(canvas: ILeaferCanvas, image: ILeaferImage): void;
|
|
893
899
|
animate(keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], options?: ITransition, type?: IAnimateType, isTemp?: boolean): IAnimate;
|
|
894
900
|
killAnimate(type?: IAnimateType, nextStyle?: IUIInputData): void;
|
|
895
901
|
export(filename: string, options?: IExportOptions | number | boolean): Promise<IExportResult>;
|
|
@@ -915,6 +921,8 @@ interface IUIAttrData {
|
|
|
915
921
|
selectedStyle?: IStateStyle;
|
|
916
922
|
disabledStyle?: IStateStyle;
|
|
917
923
|
placeholderStyle?: IStateStyle;
|
|
924
|
+
placeholderColor?: IColorString;
|
|
925
|
+
placeholderDelay?: number;
|
|
918
926
|
editConfig?: IEditorConfig;
|
|
919
927
|
editOuter?: string;
|
|
920
928
|
editInner?: string;
|
|
@@ -929,12 +937,14 @@ interface IUIData extends IUIAttrData, IUIComputedData, ILeafData {
|
|
|
929
937
|
readonly __strokeWidth: number;
|
|
930
938
|
readonly __hasStroke: boolean;
|
|
931
939
|
readonly __hasHalf: number;
|
|
932
|
-
|
|
933
|
-
|
|
940
|
+
__isAlphaPixelFill?: boolean;
|
|
941
|
+
__isAlphaPixelStroke?: boolean;
|
|
942
|
+
__isTransparentFill?: boolean;
|
|
943
|
+
__isTransparentStroke?: boolean;
|
|
934
944
|
__isHitPixel?: boolean;
|
|
935
945
|
__isCanvas?: boolean;
|
|
936
|
-
|
|
937
|
-
|
|
946
|
+
__isFastShadow?: boolean;
|
|
947
|
+
__fillAfterStroke?: boolean;
|
|
938
948
|
__drawAfterFill?: boolean;
|
|
939
949
|
readonly __clipAfterFill?: boolean;
|
|
940
950
|
readonly __hasSurface?: boolean;
|
|
@@ -944,6 +954,8 @@ interface IUIData extends IUIAttrData, IUIComputedData, ILeafData {
|
|
|
944
954
|
__textDrawData?: ITextDrawData;
|
|
945
955
|
__needComputePaint?: boolean;
|
|
946
956
|
__computePaint(): void;
|
|
957
|
+
__setPaint(attrName: 'fill' | 'stroke', value: IValue): void;
|
|
958
|
+
__removePaint(attrName: 'fill' | 'stroke', removeInput?: boolean): void;
|
|
947
959
|
}
|
|
948
960
|
interface IUIComputedData extends IUIAttrData, IFillComputedData, IBorderComputedData, IStrokeComputedData, ITextStyleComputedData, ICornerRadiusComputedData, IEffectComputedData, ILeafComputedData {
|
|
949
961
|
}
|
|
@@ -976,7 +988,7 @@ interface ILeafer extends IGroup, ILeaferAttrData, IControl {
|
|
|
976
988
|
interface IApp extends ILeafer {
|
|
977
989
|
children: ILeafer[];
|
|
978
990
|
realCanvas: boolean;
|
|
979
|
-
forEach(fn:
|
|
991
|
+
forEach(fn: IAppForEachFunction): void;
|
|
980
992
|
}
|
|
981
993
|
interface IAppConfig extends ILeaferConfig {
|
|
982
994
|
ground?: ILeaferConfig;
|
|
@@ -984,7 +996,7 @@ interface IAppConfig extends ILeaferConfig {
|
|
|
984
996
|
sky?: ILeaferConfig;
|
|
985
997
|
editor?: IEditorConfig;
|
|
986
998
|
}
|
|
987
|
-
interface
|
|
999
|
+
interface IAppForEachFunction {
|
|
988
1000
|
(value: ILeafer, index: number, array: ILeafer[]): void;
|
|
989
1001
|
}
|
|
990
1002
|
|
|
@@ -1044,6 +1056,7 @@ interface ITextConvertModule {
|
|
|
1044
1056
|
interface IColorConvertModule {
|
|
1045
1057
|
string(color: IColor, opacity?: number): string;
|
|
1046
1058
|
object(color: IColor, opacity?: number): IRGBA;
|
|
1059
|
+
hasTransparent(color: string): boolean;
|
|
1047
1060
|
}
|
|
1048
1061
|
|
|
1049
1062
|
interface IExportModule {
|
|
@@ -1061,6 +1074,7 @@ interface IStateModule {
|
|
|
1061
1074
|
isFocus(leaf: ILeaf, button?: ILeaf | boolean): boolean;
|
|
1062
1075
|
isHover(leaf: ILeaf, button?: ILeaf | boolean): boolean;
|
|
1063
1076
|
isPress(leaf: ILeaf, button?: ILeaf | boolean): boolean;
|
|
1077
|
+
isPlacehold(leaf: ILeaf, button?: ILeaf | boolean): boolean;
|
|
1064
1078
|
isDrag(leaf: ILeaf, button?: boolean | ILeaf): boolean;
|
|
1065
1079
|
setStyleName(leaf: ILeaf, styleName: IString$1, value: IBoolean$1): void;
|
|
1066
1080
|
set(leaf: ILeaf, stateName: IString$1): void;
|
|
@@ -1080,10 +1094,12 @@ interface IPaintModule {
|
|
|
1080
1094
|
compute(attrName: IPaintAttr, ui: IUI): void;
|
|
1081
1095
|
fill(fill: string, ui: IUI, canvas: ILeaferCanvas): void;
|
|
1082
1096
|
fills(fills: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
|
|
1097
|
+
fillPathOrText(ui: IUI, canvas: ILeaferCanvas): void;
|
|
1083
1098
|
fillText(ui: IUI, canvas: ILeaferCanvas): void;
|
|
1084
1099
|
stroke(stroke: string, ui: IUI, canvas: ILeaferCanvas): void;
|
|
1085
1100
|
strokes(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
|
|
1086
1101
|
strokeText(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
|
|
1102
|
+
strokeArrow?(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
|
|
1087
1103
|
drawTextStroke(ui: IUI, canvas: ILeaferCanvas): void;
|
|
1088
1104
|
shape(ui: IUI, current: ILeaferCanvas, renderOptions: IRenderOptions): ICachedShape;
|
|
1089
1105
|
}
|
|
@@ -1129,4 +1145,4 @@ interface IFilterFunction {
|
|
|
1129
1145
|
(filter: IFilter, ui: IUI, bounds: IMatrixWithBoundsScaleData, currentCanvas: ILeaferCanvas, originCanvas: ILeaferCanvas, shape: ICachedShape): void;
|
|
1130
1146
|
}
|
|
1131
1147
|
|
|
1132
|
-
export type { IAnimate, IAnimateKeyframe, IAnimateList, IAnimateType, IAnimation, IApp, IAppConfig, IAppData,
|
|
1148
|
+
export type { IAnimate, IAnimateKeyframe, IAnimateList, IAnimateType, IAnimation, IApp, IAppConfig, IAppData, IAppForEachFunction, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBackgroundBoxStyle, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, IComputedKeyframe, ICornerRadiusString, IDashPatternString, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditToolFunction, IEditorBase, IEditorBeforeMove, IEditorBeforeRotate, IEditorBeforeScale, IEditorBeforeSelect, IEditorBeforeSkew, IEditorConfig, IEditorConfigFunction, IEditorDragStartData, IEditorMoveData, IEditorRotationData, IEditorScaleData, IEditorSelectData, IEditorSkewData, 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, ITextDecorationData, ITextDecorationType, 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 };
|