@leafer-ui/data 1.10.0 → 1.11.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/data",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "@leafer-ui/data",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,11 +22,11 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.10.0",
26
- "@leafer-ui/external": "1.10.0"
25
+ "@leafer/core": "1.11.0",
26
+ "@leafer-ui/external": "1.11.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@leafer/interface": "1.10.0",
30
- "@leafer-ui/interface": "1.10.0"
29
+ "@leafer/interface": "1.11.0",
30
+ "@leafer-ui/interface": "1.11.0"
31
31
  }
32
32
  }
package/src/UIData.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { INumber, IValue, IBoolean, IPathCommandData, IPathString, IPointData, IPathCommandObject, IObject, IFilter } from '@leafer/interface'
1
+ import { INumber, IValue, IBoolean, IPathCommandData, IPathString, IPointData, IPathCommandObject, IObject, IFilter, IPathCommandNode } from '@leafer/interface'
2
2
  import { PathConvert, DataHelper, LeafData, Debug, isArray, isObject, isString, isUndefined } from '@leafer/core'
3
3
 
4
4
  import { IUI, IUIData, ILeafPaint, IStrokeComputedStyle } from '@leafer-ui/interface'
@@ -7,7 +7,7 @@ import { Paint, PaintImage, ColorConvert } from '@leafer-ui/external'
7
7
 
8
8
  const { parse, objectToCanvasData } = PathConvert
9
9
  const { stintSet } = DataHelper, { hasTransparent } = ColorConvert
10
- const emptyPaint: ILeafPaint = {}
10
+ const emptyPaint: ILeafPaint = { originPaint: {} as any }
11
11
  const debug = Debug.get('UIData')
12
12
  export class UIData extends LeafData implements IUIData {
13
13
 
@@ -104,7 +104,7 @@ export class UIData extends LeafData implements IUIData {
104
104
  }
105
105
 
106
106
 
107
- protected setPath(value: IPathCommandData | IPathCommandObject[] | IPathString) {
107
+ protected setPath(value: IPathCommandData | IPathCommandNode[] | IPathCommandObject[] | IPathString) {
108
108
  const isStr = isString(value)
109
109
  if (isStr || (value && isObject(value[0]))) {
110
110
  this.__setInput('path', value)
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { INumber, IPointData, IBoolean, IValue, IPathCommandData, IPathCommandObject, IPathString } from '@leafer/interface';
1
+ import { INumber, IPointData, IBoolean, IValue, IPathCommandData, IPathCommandNode, IPathCommandObject, IPathString } from '@leafer/interface';
2
2
  import { LeafData } from '@leafer/core';
3
3
  import { IUIData, IUI, IStrokeComputedStyle, IGroupData, IBoxData, ILeaferData, IObject, IJSONOptions, IFrameData, ILineData, IRectData, IEllipseData, IPolygonData, IStarData, IPathData, IPenData, ITextData, IBackgroundBoxStyle, IFontWeight, IImageData, IImage, ICanvasData } from '@leafer-ui/interface';
4
4
 
@@ -36,7 +36,7 @@ declare class UIData extends LeafData implements IUIData {
36
36
  protected setHeight(value: INumber): void;
37
37
  protected setFill(value: IValue): void;
38
38
  protected setStroke(value: IValue): void;
39
- protected setPath(value: IPathCommandData | IPathCommandObject[] | IPathString): void;
39
+ protected setPath(value: IPathCommandData | IPathCommandNode[] | IPathCommandObject[] | IPathString): void;
40
40
  protected setShadow(value: IValue): void;
41
41
  protected setInnerShadow(value: IValue): void;
42
42
  protected setFilter(value: IValue): void;