@leafer-ui/display 1.0.2 → 1.0.4

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/display",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "@leafer-ui/display",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,14 +22,14 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.0.2",
26
- "@leafer-ui/data": "1.0.2",
27
- "@leafer-ui/display-module": "1.0.2",
28
- "@leafer-ui/decorator": "1.0.2",
29
- "@leafer-ui/external": "1.0.2"
25
+ "@leafer/core": "1.0.4",
26
+ "@leafer-ui/data": "1.0.4",
27
+ "@leafer-ui/display-module": "1.0.4",
28
+ "@leafer-ui/decorator": "1.0.4",
29
+ "@leafer-ui/external": "1.0.4"
30
30
  },
31
31
  "devDependencies": {
32
- "@leafer/interface": "1.0.2",
33
- "@leafer-ui/interface": "1.0.2"
32
+ "@leafer/interface": "1.0.4",
33
+ "@leafer-ui/interface": "1.0.4"
34
34
  }
35
35
  }
package/src/Canvas.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ILeaferCanvas, ILeaferCanvasConfig, INumber, IRenderOptions, IPointData, ICanvasContext2D, ICanvasContext2DSettings, IScreenSizeData, ISizeData } from '@leafer/interface'
1
+ import { ILeaferCanvas, ILeaferCanvasConfig, INumber, IRenderOptions, IPointData, ICanvasContext2D, ICanvasContext2DSettings, IScreenSizeData } from '@leafer/interface'
2
2
  import { Creator, ImageEvent, LeaferImage, Matrix, dataProcessor, registerUI } from '@leafer/core'
3
3
 
4
4
  import { ICanvas, ICanvasData, ICanvasInputData, IUI } from '@leafer-ui/interface'
@@ -37,7 +37,7 @@ export class Canvas extends Rect implements ICanvas {
37
37
 
38
38
  public get ready(): boolean { return !this.url }
39
39
 
40
- protected url?: string // 用于临时加载canvas的base64数据,完成后会置空
40
+ public url?: string // 用于临时加载canvas的base64数据,完成后会置空
41
41
 
42
42
  constructor(data?: ICanvasInputData) {
43
43
  super(data)
@@ -72,19 +72,18 @@ export class Canvas extends Rect implements ICanvas {
72
72
  }
73
73
 
74
74
  public paint(): void {
75
- this.forceUpdate('fill')
75
+ this.forceRender()
76
76
  }
77
77
 
78
78
  public __drawAfterFill(canvas: ILeaferCanvas, _options: IRenderOptions): void {
79
- const origin = this.canvas.view as ISizeData
80
- const { width, height } = this
81
- if (this.__.cornerRadius || this.pathInputed) {
79
+ const { width, height, cornerRadius } = this.__, { view } = this.canvas
80
+ if (cornerRadius || this.pathInputed) {
82
81
  canvas.save()
83
82
  canvas.clip()
84
- canvas.drawImage(this.canvas.view as any, 0, 0, origin.width, origin.height, 0, 0, width, height)
83
+ canvas.drawImage(view, 0, 0, view.width, view.height, 0, 0, width, height)
85
84
  canvas.restore()
86
85
  } else {
87
- canvas.drawImage(this.canvas.view as any, 0, 0, origin.width, origin.height, 0, 0, width, height)
86
+ canvas.drawImage(view, 0, 0, view.width, view.height, 0, 0, width, height)
88
87
  }
89
88
  }
90
89
 
package/src/Group.ts CHANGED
@@ -36,7 +36,7 @@ export class Group extends UI implements IGroup { // tip: rewrited Box
36
36
 
37
37
  // data
38
38
 
39
- public set(data: IUIInputData): void {
39
+ public set(data: IUIInputData, isTemp?: boolean): void {
40
40
  if (data.children) {
41
41
  const { children } = data
42
42
  delete data.children
@@ -47,7 +47,7 @@ export class Group extends UI implements IGroup { // tip: rewrited Box
47
47
  this.clear()
48
48
  }
49
49
 
50
- super.set(data)
50
+ super.set(data, isTemp)
51
51
 
52
52
  let child: IUI
53
53
  children.forEach(childData => {
@@ -58,7 +58,7 @@ export class Group extends UI implements IGroup { // tip: rewrited Box
58
58
  data.children = children
59
59
 
60
60
  } else {
61
- super.set(data)
61
+ super.set(data, isTemp)
62
62
  }
63
63
  }
64
64
 
package/src/Leafer.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { ILeaferCanvas, IRenderer, ILayouter, ISelector, IWatcher, IInteraction, ILeaferConfig, ICanvasManager, IHitCanvasManager, IAutoBounds, IScreenSizeData, IResizeEvent, IEventListenerId, ITimer, IValue, IObject, IControl, IPointData, ILeaferType, ICursorType, IBoundsData, INumber, IZoomType, IFourNumber, IBounds, IClientPointData } from '@leafer/interface'
2
- import { AutoBounds, LayoutEvent, ResizeEvent, LeaferEvent, CanvasManager, ImageManager, DataHelper, Creator, Run, Debug, RenderEvent, registerUI, boundsType, canvasSizeAttrs, dataProcessor, WaitHelper, WatchEvent, Bounds, LeafList } from '@leafer/core'
2
+ import { AutoBounds, LayoutEvent, ResizeEvent, LeaferEvent, CanvasManager, ImageManager, DataHelper, Creator, Run, Debug, RenderEvent, registerUI, boundsType, canvasSizeAttrs, dataProcessor, WaitHelper, WatchEvent, Bounds, LeafList, needPlugin } from '@leafer/core'
3
3
 
4
4
  import { ILeaferInputData, ILeaferData, IFunction, IUIInputData, ILeafer, IApp, IEditorBase } from '@leafer-ui/interface'
5
5
  import { LeaferData } from '@leafer-ui/data'
6
+
6
7
  import { Group } from './Group'
7
8
 
8
9
 
@@ -372,7 +373,7 @@ export class Leafer extends Group implements ILeafer {
372
373
 
373
374
  // need view plugin
374
375
  public zoom(_zoomType: IZoomType, _padding?: IFourNumber, _fixedScale?: boolean): IBoundsData {
375
- return debug.error('need @leafer-in/view') as undefined
376
+ return needPlugin('view')
376
377
  }
377
378
 
378
379
 
package/src/UI.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { ILeaferCanvas, IPathDrawer, IPathCommandData, IHitType, INumber, IBoolean, IString, IPathString, IExportFileType, IPointData, ICursorType, IMaskType, IEraserType, IValue, IWindingRule, IPathCreator, IFourNumber, IBoundsData, IFlowType, IGap, IFlowWrap, IAxis, IConstraint, IAutoBoxData, IFlowBoxType, IPointGap, IFlowAlign, IFlowAxisAlign, IFindCondition, IAutoSize, IRangeSize, IAlign, IUnitPointData, IObject } from '@leafer/interface'
2
- import { Leaf, PathDrawer, surfaceType, dataType, positionType, boundsType, pathType, scaleType, rotationType, opacityType, visibleType, sortType, maskType, dataProcessor, registerUI, useModule, rewrite, rewriteAble, UICreator, PathCorner, hitType, strokeType, PathConvert, eraserType, cursorType, autoLayoutType, pen, naturalBoundsType, pathInputType } from '@leafer/core'
1
+ import { ILeaferCanvas, IPathDrawer, IPathCommandData, IHitType, INumber, IBoolean, IString, IPathString, IExportFileType, IPointData, ICursorType, IMaskType, IEraserType, IValue, IWindingRule, IPathCreator, IFourNumber, IBoundsData, IFlowType, IGap, IFlowWrap, IAxis, IConstraint, IAutoBoxData, IFlowBoxType, IPointGap, IFlowAlign, IFlowAxisAlign, IFindCondition, IAutoSize, IRangeSize, IAlign, IUnitPointData, IObject, IScaleData, IUnitData } from '@leafer/interface'
2
+ import { Leaf, PathDrawer, surfaceType, dataType, positionType, boundsType, pathType, scaleType, rotationType, opacityType, visibleType, sortType, maskType, dataProcessor, registerUI, useModule, rewrite, rewriteAble, UICreator, PathCorner, hitType, strokeType, PathConvert, eraserType, cursorType, autoLayoutType, pen, naturalBoundsType, pathInputType, MathHelper, needPlugin } from '@leafer/core'
3
3
 
4
- import { IUI, IShadowEffect, IBlurEffect, IStrokeAlign, IStrokeJoin, IStrokeCap, IBlendMode, IDashPatternString, IShadowString, IGrayscaleEffect, IUIData, IGroup, IStrokeWidthString, ICornerRadiusString, IUIInputData, IExportOptions, IExportResult, IFill, IStroke, IArrowType, IFindUIMethod, ILeafer, IEditorConfig, IEditorConfigFunction, IEditToolFunction } from '@leafer-ui/interface'
5
- import { arrowType, effectType, stateType, zoomLayerType } from '@leafer-ui/decorator'
4
+ import { IUI, IShadowEffect, IBlurEffect, IStrokeAlign, IStrokeJoin, IStrokeCap, IBlendMode, IDashPatternString, IShadowString, IGrayscaleEffect, IUIData, IGroup, IStrokeWidthString, ICornerRadiusString, IUIInputData, IExportOptions, IExportResult, IFill, IStroke, IArrowType, IFindUIMethod, ILeafer, IEditorConfig, IEditorConfigFunction, IEditToolFunction, IKeyframe, IAnimation, IAnimate, IStates, IStateName, ITransition, IAnimateType } from '@leafer-ui/interface'
5
+ import { effectType, zoomLayerType } from '@leafer-ui/decorator'
6
6
 
7
7
  import { UIData } from '@leafer-ui/data'
8
8
  import { UIBounds, UIRender } from '@leafer-ui/display-module'
@@ -57,12 +57,6 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
57
57
  public visible?: IBoolean | 0
58
58
 
59
59
 
60
- @stateType(false)
61
- public selected?: IBoolean
62
-
63
- @stateType(false)
64
- public disabled?: IBoolean
65
-
66
60
  @surfaceType(false)
67
61
  public locked?: IBoolean
68
62
 
@@ -153,46 +147,34 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
153
147
  public closed?: boolean
154
148
 
155
149
 
156
- // auto layout
157
- @autoLayoutType(false)
150
+ // @leafer-in/flow rewrite
158
151
  public flow?: IFlowType
159
152
 
160
153
  @boundsType(0)
161
154
  public padding?: IFourNumber
162
155
 
163
- @boundsType(0)
164
156
  public gap?: IGap | IPointGap
165
157
 
166
- @boundsType('top-left')
167
158
  public flowAlign?: IFlowAlign | IFlowAxisAlign
168
159
 
169
- @boundsType(false)
170
160
  public flowWrap?: IFlowWrap
171
161
 
172
- @boundsType('box')
173
- public itemBox?: IFlowBoxType
174
162
 
163
+ public itemBox?: IFlowBoxType
175
164
 
176
- @boundsType(true)
177
165
  public inFlow?: IBoolean
178
166
 
179
- @boundsType() // rewrite in flow
167
+
180
168
  public autoWidth?: IAutoSize
181
169
 
182
- @boundsType() // rewrite in flow
183
170
  public autoHeight?: IAutoSize
184
171
 
185
- @boundsType()
186
172
  public lockRatio?: IBoolean
187
173
 
188
- @boundsType()
189
174
  public autoBox?: IAutoBoxData | IConstraint
190
175
 
191
-
192
- @boundsType()
193
176
  public widthRange?: IRangeSize
194
177
 
195
- @boundsType()
196
178
  public heightRange?: IRangeSize
197
179
 
198
180
 
@@ -271,12 +253,10 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
271
253
  public miterLimit?: INumber
272
254
 
273
255
 
274
- // arrow
256
+ // @leafer-in/arrow rewrite
275
257
 
276
- @arrowType('none')
277
258
  public startArrow?: IArrowType
278
259
 
279
- @arrowType('none')
280
260
  public endArrow?: IArrowType
281
261
 
282
262
  // corner
@@ -305,45 +285,64 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
305
285
  public grayscale?: INumber | IGrayscaleEffect
306
286
 
307
287
 
308
- // states
288
+ // @leafer-in/animate rewrite
309
289
 
310
- @dataType()
311
- public normalStyle?: IUIInputData // auto restore hover / press / focus / selected / disabled style
290
+ public animation?: IAnimation
291
+
292
+ public animationOut?: IAnimation
293
+
294
+
295
+ public transition?: ITransition
296
+
297
+ public transitionOut?: ITransition
298
+
299
+
300
+ // @leafer-in/motion-path rewrite
301
+
302
+ public motionPath?: boolean
303
+
304
+ public motion?: INumber | IUnitData
305
+
306
+ public motionRotation?: INumber | IBoolean
307
+
308
+
309
+ // @leafer-in/state rewrite
310
+
311
+ public states?: IStates
312
+
313
+ public state?: IStateName
314
+
315
+
316
+ public selected?: IBoolean
317
+
318
+ public disabled?: IBoolean
319
+
320
+
321
+ public normalStyle?: IUIInputData
312
322
 
313
- @dataType()
314
323
  public hoverStyle?: IUIInputData
315
324
 
316
- @dataType()
317
325
  public pressStyle?: IUIInputData
318
326
 
319
- @dataType()
320
327
  public focusStyle?: IUIInputData
321
328
 
322
- @dataType()
323
329
  public selectedStyle?: IUIInputData
324
330
 
325
- @dataType()
326
331
  public disabledStyle?: IUIInputData
327
332
 
328
333
 
334
+ public button?: IBoolean
335
+
336
+
329
337
  // 预留给用户使用的数据对象
330
338
  @dataType({})
331
339
  public data: IObject
332
340
 
333
341
 
334
- public set scale(value: INumber | IPointData) {
335
- if (typeof value === 'number') {
336
- this.scaleX = this.scaleY = value
337
- } else {
338
- this.scaleX = value.x
339
- this.scaleY = value.y
340
- }
341
- }
342
+ public set scale(value: INumber | IPointData) { MathHelper.assignScale(this as IScaleData, value) }
343
+ public get scale(): INumber | IPointData { return this.__.scale }
342
344
 
343
- public get scale(): INumber | IPointData {
344
- const { scaleX, scaleY } = this
345
- return scaleX !== scaleY ? { x: scaleX, y: scaleY } : scaleX
346
- }
345
+ public __animate?: IAnimate
347
346
 
348
347
  public get pen(): IPathCreator {
349
348
  const { path } = this.__
@@ -373,8 +372,14 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
373
372
  public reset(_data?: IUIInputData): void { }
374
373
 
375
374
 
376
- public set(data: IUIInputData): void {
377
- Object.assign(this, data)
375
+ public set(data: IUIInputData, isTemp?: boolean): void {
376
+ if (isTemp) {
377
+ this.lockNormalStyle = true
378
+ Object.assign(this, data)
379
+ this.lockNormalStyle = false
380
+ } else {
381
+ Object.assign(this, data)
382
+ }
378
383
  }
379
384
 
380
385
  public get(name?: string | string[] | IUIInputData): IUIInputData | IValue {
@@ -456,6 +461,14 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
456
461
  }
457
462
  }
458
463
 
464
+ // @leafer-in/animate rewrite
465
+
466
+ public animate(_keyframe?: IUIInputData | IKeyframe[] | IAnimation, _options?: ITransition, _type?: IAnimateType, _isTemp?: boolean): IAnimate {
467
+ return needPlugin('animate')
468
+ }
469
+
470
+ public killAnimate(_type?: IAnimateType): void { }
471
+
459
472
 
460
473
  // create
461
474
 
@@ -463,8 +476,10 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
463
476
  return Export.export(this, filename, options)
464
477
  }
465
478
 
466
- public clone(): IUI {
467
- return UI.one(this.toJSON())
479
+ public clone(data?: IUIInputData): IUI {
480
+ const json = this.toJSON()
481
+ if (data) Object.assign(json, data)
482
+ return UI.one(json)
468
483
  }
469
484
 
470
485
  static one(data: IUIInputData, x?: number, y?: number, width?: number, height?: number): IUI {
@@ -491,6 +506,7 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
491
506
 
492
507
  public destroy(): void {
493
508
  this.fill = this.stroke = null
509
+ if (this.__animate) this.killAnimate()
494
510
  super.destroy()
495
511
  }
496
512
 
package/types/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { IString, INumber, IBoolean, IMaskType, IEraserType, IAlign, IUnitPointData, IPathCommandData, IPathString, IWindingRule, IFlowType, IFourNumber, IGap, IPointGap, IFlowAlign, IFlowAxisAlign, IFlowWrap, IFlowBoxType, IAutoSize, IAutoBoxData, IConstraint, IRangeSize, IAxis, IBoundsData, IHitType, ICursorType, IObject, IPointData, IPathCreator, IValue, IFindCondition, ILeaferCanvas, IPathDrawer, IExportFileType, IJSONOptions, IPickOptions, IPickResult, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent, IZoomType, IClientPointData, IRenderOptions, ILeaferImage, ICanvasContext2DSettings, ICanvasContext2D, IUnitData } from '@leafer/interface';
1
+ import { IString, INumber, IBoolean, IMaskType, IEraserType, IAlign, IUnitPointData, IPathCommandData, IPathString, IWindingRule, IFlowType, IFourNumber, IGap, IPointGap, IFlowAlign, IFlowAxisAlign, IFlowWrap, IFlowBoxType, IAutoSize, IAutoBoxData, IConstraint, IRangeSize, IAxis, IBoundsData, IHitType, ICursorType, IUnitData, IObject, IPointData, IPathCreator, IValue, IFindCondition, ILeaferCanvas, IPathDrawer, IExportFileType, IJSONOptions, IPickOptions, IPickResult, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent, IZoomType, IClientPointData, IRenderOptions, ILeaferImage, ICanvasContext2DSettings, ICanvasContext2D } from '@leafer/interface';
2
2
  import { Leaf, LeafList } from '@leafer/core';
3
- import { IUI, IUIData, IUIInputData, ILeafer, IGroup, IBlendMode, IFill, IStroke, IStrokeAlign, IStrokeWidthString, IStrokeCap, IStrokeJoin, IDashPatternString, IArrowType, ICornerRadiusString, IShadowEffect, IShadowString, IBlurEffect, IGrayscaleEffect, IEditorConfig, IFindUIMethod, IExportOptions, IExportResult, IEditorConfigFunction, IEditToolFunction, IGroupData, IGroupInputData, IUIJSONData, ILeaferData, IApp, IEditorBase, IFunction, ILeaferInputData, IBox, IBoxData, IOverflow, IBoxInputData, IFrame, IFrameData, IFrameInputData, IRect, IRectData, IRectInputData, IEllipse, IEllipseData, IEllipseInputData, IPolygon, IPolygonData, IPolygonInputData, IStar, IStarData, IStarInputData, ILine, ILineData, ILineInputData, IImage, IImageData, IImageInputData, ICanvas, ICanvasData, ICanvasInputData, IText, ITextData, IHitType as IHitType$1, IFontWeight, ITextCase, ITextDecoration, ITextAlign, IVerticalAlign, ITextWrap, ITextDrawData, ITextInputData, IPath, IPathData, IPathInputData, IPen, IPenData, IPathCommandData as IPathCommandData$1, IPenInputData } from '@leafer-ui/interface';
3
+ import { IUI, IUIData, IUIInputData, ILeafer, IGroup, IBlendMode, IFill, IStroke, IStrokeAlign, IStrokeWidthString, IStrokeCap, IStrokeJoin, IDashPatternString, IArrowType, ICornerRadiusString, IShadowEffect, IShadowString, IBlurEffect, IGrayscaleEffect, IAnimation, ITransition, IStates, IStateName, IAnimate, IEditorConfig, IFindUIMethod, IKeyframe, IAnimateType, IExportOptions, IExportResult, IEditorConfigFunction, IEditToolFunction, IGroupData, IGroupInputData, IUIJSONData, ILeaferData, IApp, IEditorBase, IFunction, ILeaferInputData, IBox, IBoxData, IOverflow, IBoxInputData, IFrame, IFrameData, IFrameInputData, IRect, IRectData, IRectInputData, IEllipse, IEllipseData, IEllipseInputData, IPolygon, IPolygonData, IPolygonInputData, IStar, IStarData, IStarInputData, ILine, ILineData, ILineInputData, IImage, IImageData, IImageInputData, ICanvas, ICanvasData, ICanvasInputData, IText, ITextData, IHitType as IHitType$1, IFontWeight, ITextCase, ITextDecoration, ITextAlign, IVerticalAlign, ITextWrap, ITextDrawData, ITextInputData, IPath, IPathData, IPathInputData, IPen, IPenData, IPathCommandData as IPathCommandData$1, IPenInputData } from '@leafer-ui/interface';
4
4
 
5
5
  declare class UI extends Leaf implements IUI {
6
6
  __: IUIData;
@@ -18,8 +18,6 @@ declare class UI extends Leaf implements IUI {
18
18
  blendMode?: IBlendMode;
19
19
  opacity?: INumber;
20
20
  visible?: IBoolean | 0;
21
- selected?: IBoolean;
22
- disabled?: IBoolean;
23
21
  locked?: IBoolean;
24
22
  zIndex?: INumber;
25
23
  mask?: IBoolean | IMaskType;
@@ -87,22 +85,35 @@ declare class UI extends Leaf implements IUI {
87
85
  blur?: INumber | IBlurEffect;
88
86
  backgroundBlur?: INumber | IBlurEffect;
89
87
  grayscale?: INumber | IGrayscaleEffect;
88
+ animation?: IAnimation;
89
+ animationOut?: IAnimation;
90
+ transition?: ITransition;
91
+ transitionOut?: ITransition;
92
+ motionPath?: boolean;
93
+ motion?: INumber | IUnitData;
94
+ motionRotation?: INumber | IBoolean;
95
+ states?: IStates;
96
+ state?: IStateName;
97
+ selected?: IBoolean;
98
+ disabled?: IBoolean;
90
99
  normalStyle?: IUIInputData;
91
100
  hoverStyle?: IUIInputData;
92
101
  pressStyle?: IUIInputData;
93
102
  focusStyle?: IUIInputData;
94
103
  selectedStyle?: IUIInputData;
95
104
  disabledStyle?: IUIInputData;
105
+ button?: IBoolean;
96
106
  data: IObject;
97
107
  set scale(value: INumber | IPointData);
98
108
  get scale(): INumber | IPointData;
109
+ __animate?: IAnimate;
99
110
  get pen(): IPathCreator;
100
111
  get editConfig(): IEditorConfig;
101
112
  get editOuter(): string;
102
113
  get editInner(): string;
103
114
  constructor(data?: IUIInputData);
104
115
  reset(_data?: IUIInputData): void;
105
- set(data: IUIInputData): void;
116
+ set(data: IUIInputData, isTemp?: boolean): void;
106
117
  get(name?: string | string[] | IUIInputData): IUIInputData | IValue;
107
118
  createProxyData(): IUIInputData;
108
119
  find(_condition: number | string | IFindCondition | IFindUIMethod, _options?: any): IUI[];
@@ -118,8 +129,10 @@ declare class UI extends Leaf implements IUI {
118
129
  __drawPath(canvas: ILeaferCanvas): void;
119
130
  __drawPathByData(drawer: IPathDrawer, data: IPathCommandData): void;
120
131
  __drawPathByBox(drawer: IPathDrawer): void;
132
+ animate(_keyframe?: IUIInputData | IKeyframe[] | IAnimation, _options?: ITransition, _type?: IAnimateType, _isTemp?: boolean): IAnimate;
133
+ killAnimate(_type?: IAnimateType): void;
121
134
  export(filename: IExportFileType | string, options?: IExportOptions | number | boolean): Promise<IExportResult>;
122
- clone(): IUI;
135
+ clone(data?: IUIInputData): IUI;
123
136
  static one(data: IUIInputData, x?: number, y?: number, width?: number, height?: number): IUI;
124
137
  static registerUI(): void;
125
138
  static registerData(data: IUIData): void;
@@ -137,7 +150,7 @@ declare class Group extends UI implements IGroup {
137
150
  constructor(data?: IGroupInputData);
138
151
  reset(data?: IGroupInputData): void;
139
152
  __setBranch(): void;
140
- set(data: IUIInputData): void;
153
+ set(data: IUIInputData, isTemp?: boolean): void;
141
154
  toJSON(options?: IJSONOptions): IUIJSONData;
142
155
  pick(_hitPoint: IPointData, _options?: IPickOptions): IPickResult;
143
156
  addAt(child: IUI, index: number): void;
@@ -349,7 +362,7 @@ declare class Canvas extends Rect implements ICanvas {
349
362
  canvas?: ILeaferCanvas;
350
363
  context?: ICanvasContext2D;
351
364
  get ready(): boolean;
352
- protected url?: string;
365
+ url?: string;
353
366
  constructor(data?: ICanvasInputData);
354
367
  drawImage(url: string): void;
355
368
  draw(ui: IUI, offset?: IPointData, scale?: number | IPointData, rotation?: number): void;