@leafer-ui/interface 1.3.1 → 1.3.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 +14 -1
- package/src/IUI.ts +3 -1
- package/src/index.ts +1 -1
- package/src/type/IType.ts +1 -1
- package/types/index.d.ts +14 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.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.3.
|
|
25
|
+
"@leafer/interface": "1.3.3"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/IAnimation.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface IAnimateOptions {
|
|
|
25
25
|
ending?: IAnimateEnding
|
|
26
26
|
|
|
27
27
|
reverse?: boolean
|
|
28
|
-
swing?: boolean
|
|
28
|
+
swing?: boolean | number
|
|
29
29
|
|
|
30
30
|
loop?: boolean | number
|
|
31
31
|
loopDelay?: number
|
|
@@ -51,6 +51,9 @@ export interface IAnimateKeyframe {
|
|
|
51
51
|
delay?: number
|
|
52
52
|
duration?: number
|
|
53
53
|
|
|
54
|
+
swing?: number
|
|
55
|
+
loop?: number
|
|
56
|
+
|
|
54
57
|
autoDelay?: number
|
|
55
58
|
autoDuration?: number
|
|
56
59
|
}
|
|
@@ -65,6 +68,9 @@ export interface IComputedKeyframe {
|
|
|
65
68
|
delay?: number
|
|
66
69
|
duration?: number
|
|
67
70
|
|
|
71
|
+
swing?: number
|
|
72
|
+
loop?: number
|
|
73
|
+
|
|
68
74
|
autoDelay?: number
|
|
69
75
|
autoDuration?: number
|
|
70
76
|
|
|
@@ -165,5 +171,12 @@ export interface IAnimate extends IAnimateOptions, IEventer {
|
|
|
165
171
|
seek(time: number | IPercentData): void
|
|
166
172
|
kill(complete?: boolean, killStyle?: IUIInputData): void
|
|
167
173
|
|
|
174
|
+
|
|
175
|
+
|
|
168
176
|
destroy(complete?: boolean): void
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface IAnimateList extends IAnimate {
|
|
180
|
+
list: IAnimate[]
|
|
181
|
+
updateList(animation?: IAnimation[] | IAnimate[], isTemp?: boolean): void
|
|
169
182
|
}
|
package/src/IUI.ts
CHANGED
|
@@ -410,7 +410,7 @@ export interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICorne
|
|
|
410
410
|
__drawContent?(canvas: ILeaferCanvas, options: IRenderOptions): void
|
|
411
411
|
|
|
412
412
|
animate(keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], options?: ITransition, type?: IAnimateType, isTemp?: boolean): IAnimate
|
|
413
|
-
killAnimate(type?: IAnimateType,
|
|
413
|
+
killAnimate(type?: IAnimateType, nextStyle?: IUIInputData): void
|
|
414
414
|
|
|
415
415
|
export(filename: string, options?: IExportOptions | number | boolean): Promise<IExportResult>
|
|
416
416
|
clone(data?: IUIInputData): IUI
|
|
@@ -445,6 +445,7 @@ interface IUIAttrData {
|
|
|
445
445
|
focusStyle?: IStateStyle
|
|
446
446
|
selectedStyle?: IStateStyle
|
|
447
447
|
disabledStyle?: IStateStyle
|
|
448
|
+
placeholderStyle?: IStateStyle
|
|
448
449
|
}
|
|
449
450
|
|
|
450
451
|
export interface IFindUIMethod {
|
|
@@ -474,6 +475,7 @@ export interface IUIData extends IUIAttrData, IUIComputedData, ILeafData {
|
|
|
474
475
|
|
|
475
476
|
__drawAfterFill?: boolean
|
|
476
477
|
readonly __clipAfterFill?: boolean
|
|
478
|
+
readonly __hasSurface?: boolean
|
|
477
479
|
|
|
478
480
|
__isOverflow?: boolean
|
|
479
481
|
__blendLayer?: boolean
|
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, ITransition, IAnimate, IAnimateType, IKeyframe, IKeyframeId, IAnimateEasing, ICubicBezierEasing, IStepsEasing, IAnimateEasingFunction, IAnimateEasingName, IAnimateEnding, IAnimateEvents, IAnimateEventFunction, ICustomEasingFunction, IAnimateKeyframe, IComputedKeyframe, IStyleAnimation, IKeyframesAnimation, IAnimateOptions } from './IAnimation'
|
|
36
|
+
export { IAnimation, ITransition, IAnimate, IAnimateList, IAnimateType, IKeyframe, IKeyframeId, IAnimateEasing, ICubicBezierEasing, IStepsEasing, IAnimateEasingFunction, IAnimateEasingName, IAnimateEnding, IAnimateEvents, IAnimateEventFunction, ICustomEasingFunction, IAnimateKeyframe, IComputedKeyframe, IStyleAnimation, IKeyframesAnimation, IAnimateOptions } from './IAnimation'
|
|
37
37
|
|
|
38
38
|
export { IUIRenderModule, IRectRenderModule, IImageRenderModule, ITextRenderModule, IGroupRenderModule, IFrameRenderModule } from './module/IUIRender'
|
|
39
39
|
export { IUIBoundsModule } from './module/IUIBounds'
|
package/src/type/IType.ts
CHANGED
|
@@ -115,7 +115,7 @@ export interface IPathDataArrowOffset {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
// 文本
|
|
118
|
-
export type ITextAlign = 'left' | 'center' | 'right' | 'justify'
|
|
118
|
+
export type ITextAlign = 'left' | 'center' | 'right' | 'justify' | 'both'
|
|
119
119
|
export type IVerticalAlign = 'top' | 'middle' | 'bottom'
|
|
120
120
|
export type ITextCase = | 'upper' | 'lower' | 'title' | 'none' | 'small-caps'
|
|
121
121
|
export type IFontWeight = IFontWeightNumer | IFontWeightString
|
package/types/index.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ interface IPathDataArrowOffset {
|
|
|
94
94
|
bevelJoin?: number;
|
|
95
95
|
roundJoin?: number;
|
|
96
96
|
}
|
|
97
|
-
type ITextAlign = 'left' | 'center' | 'right' | 'justify';
|
|
97
|
+
type ITextAlign = 'left' | 'center' | 'right' | 'justify' | 'both';
|
|
98
98
|
type IVerticalAlign = 'top' | 'middle' | 'bottom';
|
|
99
99
|
type ITextCase = 'upper' | 'lower' | 'title' | 'none' | 'small-caps';
|
|
100
100
|
type IFontWeight = IFontWeightNumer | IFontWeightString;
|
|
@@ -327,7 +327,7 @@ interface IAnimateOptions {
|
|
|
327
327
|
duration?: number;
|
|
328
328
|
ending?: IAnimateEnding;
|
|
329
329
|
reverse?: boolean;
|
|
330
|
-
swing?: boolean;
|
|
330
|
+
swing?: boolean | number;
|
|
331
331
|
loop?: boolean | number;
|
|
332
332
|
loopDelay?: number;
|
|
333
333
|
speed?: number;
|
|
@@ -343,6 +343,8 @@ interface IAnimateKeyframe {
|
|
|
343
343
|
easing?: IAnimateEasing;
|
|
344
344
|
delay?: number;
|
|
345
345
|
duration?: number;
|
|
346
|
+
swing?: number;
|
|
347
|
+
loop?: number;
|
|
346
348
|
autoDelay?: number;
|
|
347
349
|
autoDuration?: number;
|
|
348
350
|
}
|
|
@@ -353,6 +355,8 @@ interface IComputedKeyframe {
|
|
|
353
355
|
easingFn?: IAnimateEasingFunction;
|
|
354
356
|
delay?: number;
|
|
355
357
|
duration?: number;
|
|
358
|
+
swing?: number;
|
|
359
|
+
loop?: number;
|
|
356
360
|
autoDelay?: number;
|
|
357
361
|
autoDuration?: number;
|
|
358
362
|
totalTime?: number;
|
|
@@ -411,6 +415,10 @@ interface IAnimate extends IAnimateOptions, IEventer {
|
|
|
411
415
|
kill(complete?: boolean, killStyle?: IUIInputData): void;
|
|
412
416
|
destroy(complete?: boolean): void;
|
|
413
417
|
}
|
|
418
|
+
interface IAnimateList extends IAnimate {
|
|
419
|
+
list: IAnimate[];
|
|
420
|
+
updateList(animation?: IAnimation[] | IAnimate[], isTemp?: boolean): void;
|
|
421
|
+
}
|
|
414
422
|
|
|
415
423
|
interface IEditorBase extends IGroup$1, ISelectorProxy {
|
|
416
424
|
config: IEditorConfig;
|
|
@@ -865,7 +873,7 @@ interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICornerRadius
|
|
|
865
873
|
__drawAfterFill?(canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
866
874
|
__drawContent?(canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
867
875
|
animate(keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], options?: ITransition, type?: IAnimateType, isTemp?: boolean): IAnimate;
|
|
868
|
-
killAnimate(type?: IAnimateType,
|
|
876
|
+
killAnimate(type?: IAnimateType, nextStyle?: IUIInputData): void;
|
|
869
877
|
export(filename: string, options?: IExportOptions | number | boolean): Promise<IExportResult>;
|
|
870
878
|
clone(data?: IUIInputData): IUI;
|
|
871
879
|
}
|
|
@@ -887,6 +895,7 @@ interface IUIAttrData {
|
|
|
887
895
|
focusStyle?: IStateStyle;
|
|
888
896
|
selectedStyle?: IStateStyle;
|
|
889
897
|
disabledStyle?: IStateStyle;
|
|
898
|
+
placeholderStyle?: IStateStyle;
|
|
890
899
|
}
|
|
891
900
|
interface IFindUIMethod {
|
|
892
901
|
(leaf: IUI, options?: any): IAnswer;
|
|
@@ -905,6 +914,7 @@ interface IUIData extends IUIAttrData, IUIComputedData, ILeafData {
|
|
|
905
914
|
__opacityStroke?: boolean;
|
|
906
915
|
__drawAfterFill?: boolean;
|
|
907
916
|
readonly __clipAfterFill?: boolean;
|
|
917
|
+
readonly __hasSurface?: boolean;
|
|
908
918
|
__isOverflow?: boolean;
|
|
909
919
|
__blendLayer?: boolean;
|
|
910
920
|
__boxStroke?: boolean;
|
|
@@ -1074,4 +1084,4 @@ interface IEffectModule {
|
|
|
1074
1084
|
backgroundBlur(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void;
|
|
1075
1085
|
}
|
|
1076
1086
|
|
|
1077
|
-
export type { IAnimate, IAnimateEasing, IAnimateEasingFunction, IAnimateEasingName, IAnimateEnding, IAnimateEventFunction, IAnimateEvents, IAnimateKeyframe, IAnimateOptions, IAnimateType, IAnimation, IApp, IAppConfig, IAppData, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, IComputedKeyframe, ICornerRadiusString, ICubicBezierEasing, ICustomEasingFunction, IDashPatternString, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditToolFunction, IEditorBase, IEditorConfig, IEditorConfigFunction, IEffect, IEffectAttrData, IEffectComputedData, IEffectInputData, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IFill, 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, IStepsEasing, 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, ITransition, ITransitionFunction, ITransitionMap, ITransitionModule, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIJSONData, IUIRenderModule, IUITag, IVectorPath, IVerticalAlign, IVideo, IVideoData, IVideoInputData, IWritingMode };
|
|
1087
|
+
export type { IAnimate, IAnimateEasing, IAnimateEasingFunction, IAnimateEasingName, IAnimateEnding, IAnimateEventFunction, IAnimateEvents, IAnimateKeyframe, IAnimateList, IAnimateOptions, IAnimateType, IAnimation, IApp, IAppConfig, IAppData, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, IComputedKeyframe, ICornerRadiusString, ICubicBezierEasing, ICustomEasingFunction, IDashPatternString, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditToolFunction, IEditorBase, IEditorConfig, IEditorConfigFunction, IEffect, IEffectAttrData, IEffectComputedData, IEffectInputData, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IFill, 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, IStepsEasing, 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, ITransition, ITransitionFunction, ITransitionMap, ITransitionModule, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIJSONData, IUIRenderModule, IUITag, IVectorPath, IVerticalAlign, IVideo, IVideoData, IVideoInputData, IWritingMode };
|