@leafer-ui/interface 1.3.1 → 1.3.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/interface",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
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.1"
25
+ "@leafer/interface": "1.3.2"
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, killStyle?: IUIInputData): void
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
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, killStyle?: IUIInputData): void;
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
  }
@@ -1074,4 +1082,4 @@ interface IEffectModule {
1074
1082
  backgroundBlur(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void;
1075
1083
  }
1076
1084
 
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 };
1085
+ 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 };