@leafer-ui/interface 1.0.10 → 1.1.0

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.0.10",
3
+ "version": "1.1.0",
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.0.10"
25
+ "@leafer/interface": "1.1.0"
26
26
  }
27
27
  }
package/src/IUI.ts CHANGED
@@ -100,7 +100,7 @@ interface IRobotAttrData {
100
100
  action?: IRobotActionName
101
101
  now?: number
102
102
  FPS?: number
103
- loop?: boolean
103
+ loop?: boolean | number
104
104
  }
105
105
 
106
106
  export interface IRobotActions {
@@ -108,9 +108,9 @@ export interface IRobotActions {
108
108
  }
109
109
 
110
110
  export interface IRobotAnimation {
111
- keys: IKeyframeId[]
111
+ keyframes: IKeyframeId[]
112
112
  loop?: boolean | number
113
- speed?: number
113
+ FPS?: number
114
114
  }
115
115
 
116
116
  export type IRobotActionName = string
@@ -206,7 +206,7 @@ export interface IText extends ITextAttrData, ITextStyleAttrData, IUI {
206
206
  __: ITextData
207
207
  }
208
208
  interface ITextAttrData {
209
- text?: string
209
+ text?: string | number
210
210
  padding?: IFourNumber
211
211
  resizeFontSize?: boolean
212
212
  }
@@ -387,7 +387,7 @@ export interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICorne
387
387
 
388
388
  reset(data?: IUIInputData): void
389
389
 
390
- set(data: IUIInputData, isTemp?: boolean): void
390
+ set(data: IUIInputData, transition?: ITransition | 'temp'): void
391
391
  toJSON(options?: IJSONOptions): IUIJSONData
392
392
 
393
393
  get(name?: string | string[] | IUIInputData): IUIInputData | IValue
@@ -64,7 +64,7 @@ export interface IEditorBase extends IGroup, ISelectorProxy {
64
64
  toBottom(): void
65
65
  }
66
66
 
67
- export interface IEditorConfig {
67
+ export interface IEditorConfig extends IObject {
68
68
  editSize?: IEditSize
69
69
  dualEvent?: boolean
70
70
  keyEvent?: boolean
@@ -117,6 +117,9 @@ export interface IEditorConfig {
117
117
  flipable?: boolean
118
118
  rotateable?: boolean | 'rotate'
119
119
  skewable?: boolean
120
+
121
+ textEditor?: IObject
122
+ pathEditor?: IObject
120
123
  }
121
124
 
122
125
  export interface IEditPointInputData extends IBoxInputData {
@@ -1,5 +1,5 @@
1
1
  import { ITextData, ITextDrawData } from '../IUI'
2
2
 
3
3
  export interface ITextConvertModule {
4
- getDrawData(content: string, style: ITextData): ITextDrawData
4
+ getDrawData(content: string | number, style: ITextData): ITextDrawData
5
5
  }
package/src/type/IType.ts CHANGED
@@ -105,6 +105,7 @@ export interface IPathDataArrow {
105
105
  connect?: IPathDataArrowOffset // 箭头与线条的连接点位置
106
106
  offset?: IPathDataArrowOffset // 箭头偏移距离,与末端对齐
107
107
  path: IPathCommandData
108
+ dashPath?: IPathCommandData // 采用虚线时,需增加填充的内容
108
109
  }
109
110
 
110
111
  export interface IPathDataArrowOffset {
package/types/index.d.ts CHANGED
@@ -87,6 +87,7 @@ interface IPathDataArrow {
87
87
  connect?: IPathDataArrowOffset;
88
88
  offset?: IPathDataArrowOffset;
89
89
  path: IPathCommandData;
90
+ dashPath?: IPathCommandData;
90
91
  }
91
92
  interface IPathDataArrowOffset {
92
93
  x?: number;
@@ -453,7 +454,7 @@ interface IEditorBase extends IGroup$1, ISelectorProxy {
453
454
  toTop(): void;
454
455
  toBottom(): void;
455
456
  }
456
- interface IEditorConfig {
457
+ interface IEditorConfig extends IObject$1 {
457
458
  editSize?: IEditSize;
458
459
  dualEvent?: boolean;
459
460
  keyEvent?: boolean;
@@ -495,6 +496,8 @@ interface IEditorConfig {
495
496
  flipable?: boolean;
496
497
  rotateable?: boolean | 'rotate';
497
498
  skewable?: boolean;
499
+ textEditor?: IObject$1;
500
+ pathEditor?: IObject$1;
498
501
  }
499
502
  interface IEditPointInputData extends IBoxInputData$1 {
500
503
  direction?: number;
@@ -605,15 +608,15 @@ interface IRobotAttrData {
605
608
  action?: IRobotActionName;
606
609
  now?: number;
607
610
  FPS?: number;
608
- loop?: boolean;
611
+ loop?: boolean | number;
609
612
  }
610
613
  interface IRobotActions {
611
614
  [name: string]: IKeyframeId | IKeyframeId[] | IRobotAnimation;
612
615
  }
613
616
  interface IRobotAnimation {
614
- keys: IKeyframeId[];
617
+ keyframes: IKeyframeId[];
615
618
  loop?: boolean | number;
616
- speed?: number;
619
+ FPS?: number;
617
620
  }
618
621
  type IRobotActionName = string;
619
622
  interface IRobotKeyframe {
@@ -694,7 +697,7 @@ interface IText extends ITextAttrData, ITextStyleAttrData, IUI {
694
697
  __: ITextData;
695
698
  }
696
699
  interface ITextAttrData {
697
- text?: string;
700
+ text?: string | number;
698
701
  padding?: IFourNumber;
699
702
  resizeFontSize?: boolean;
700
703
  }
@@ -840,7 +843,7 @@ interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICornerRadius
840
843
  __animate?: IAnimate;
841
844
  readonly pen: IPathCreator;
842
845
  reset(data?: IUIInputData): void;
843
- set(data: IUIInputData, isTemp?: boolean): void;
846
+ set(data: IUIInputData, transition?: ITransition | 'temp'): void;
844
847
  toJSON(options?: IJSONOptions): IUIJSONData;
845
848
  get(name?: string | string[] | IUIInputData): IUIInputData | IValue;
846
849
  createProxyData(): IUIInputData;
@@ -992,7 +995,7 @@ interface ITransitionFunction {
992
995
  }
993
996
 
994
997
  interface ITextConvertModule {
995
- getDrawData(content: string, style: ITextData): ITextDrawData;
998
+ getDrawData(content: string | number, style: ITextData): ITextDrawData;
996
999
  }
997
1000
 
998
1001
  interface IColorConvertModule {