@leafer-ui/interface 1.0.0-bate → 1.0.0-beta.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.0.0-bate",
3
+ "version": "1.0.0-beta.2",
4
4
  "description": "@leafer-ui/interface",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -19,6 +19,6 @@
19
19
  "leaferjs"
20
20
  ],
21
21
  "dependencies": {
22
- "@leafer/interface": "1.0.0-bate"
22
+ "@leafer/interface": "1.0.0-beta.2"
23
23
  }
24
24
  }
@@ -1,6 +1,6 @@
1
1
  import { IPaint, IStrokeAlign, IStrokeCap, IStrokeJoin, IBlurEffect, IFontWeight, ITextCase, ITextDecoration, IShadowEffect, IGrayscaleEffect, ITextAlign, IVerticalAlign, IOverflow, IUnitData } from './type/IType'
2
2
  import { ILeafStrokePaint, ILeafShadowEffect, ILeafPaint } from './type/IComputedType'
3
- import { IPaintString, IDashPatternString, IShadowString, IStringColor, IStrokeWidthString, ICornerRadiusString } from './type/IStringType'
3
+ import { IPaintString, IDashPatternString, IShadowString, IColorString, IStrokeWidthString, ICornerRadiusString } from './type/IStringType'
4
4
 
5
5
  // corner---
6
6
  export interface ICornerRadiusAttrData {
@@ -24,7 +24,7 @@ export interface IFillInputData {
24
24
  fill?: IPaint | IPaint[] | IPaintString
25
25
  }
26
26
  export interface IFillComputedData {
27
- fill?: IStringColor | ILeafPaint[]
27
+ fill?: IColorString | ILeafPaint[]
28
28
  }
29
29
 
30
30
  // border
@@ -57,7 +57,7 @@ export interface IStrokeInputData {
57
57
  miterLimit?: number
58
58
  }
59
59
  export interface IStrokeComputedData {
60
- stroke?: IStringColor | ILeafStrokePaint[]
60
+ stroke?: IColorString | ILeafStrokePaint[]
61
61
 
62
62
  strokeAlign?: IStrokeAlign
63
63
  strokeWidth?: number
package/src/IUI.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { ILeaf, ILeafComputedData, ILeafData, ILeafInputData, ILeaferCanvas, IRenderOptions, IPathDrawer, IPointData, IPath2D, IPathCommandData, IWindingRule, ILeaferImageConfig, IBoundsData, IObject, __Number, ILeaferImage } from '@leafer/interface'
1
+ import { ILeaf, ILeafComputedData, ILeafData, ILeafInputData, ILeaferCanvas, IRenderOptions, IPathDrawer, IPointData, IPath2D, IPathCommandData, IWindingRule, ILeaferImageConfig, IBoundsData, IObject, __Number, IPathString, ILeaferImage } from '@leafer/interface'
2
2
 
3
- import { IPathString, IVectorPathString } from './type/IStringType'
4
- import { IOverflow, IVectorPath } from './type/IType'
3
+ import { IOverflow } from './type/IType'
5
4
 
6
5
  import {
7
6
  IFillAttrData, IFillInputData, IFillComputedData,
@@ -117,18 +116,6 @@ export interface IPen extends IGroup {
117
116
  export interface IPenData extends IGroupData { }
118
117
  export interface IPenInputData extends IGroupInputData { }
119
118
 
120
- // Vector
121
- export interface IVector extends IUI {
122
- __: IVectorData
123
- paths: IVectorPath[] | IVectorPathString
124
- }
125
- export interface IVectorData extends IUIData {
126
- paths?: IVectorPath[]
127
- }
128
- export interface IVectorInputData extends IUIInputData {
129
- paths?: IVectorPath[] | IVectorPathString
130
- }
131
-
132
119
 
133
120
  // Text
134
121
  export interface IText extends ITextStyleAttrData, IUI {
@@ -306,6 +293,8 @@ export interface IUIData extends IUIComputedData, ILeafData {
306
293
  __pathForRender?: IPathCommandData
307
294
  __path2DForRender?: IPath2D
308
295
 
296
+ __boxStroke?: boolean
297
+
309
298
  // text
310
299
  __font?: string
311
300
  __textDrawData?: ITextDrawData
@@ -329,10 +318,13 @@ export type IUITag =
329
318
  | 'Star'
330
319
  | 'Line'
331
320
  | 'Path'
321
+ | 'Pen'
332
322
  | 'Text'
333
323
  | 'Image'
324
+ | 'Canvas'
334
325
  | 'Group'
335
326
  | 'Frame'
327
+ | 'Box'
336
328
 
337
329
 
338
330
  export interface IUITagInputData extends IRectInputData, IEllipseInputData, IPolygonInputData, IStarInputData, ILineInputData, IPathInputData, ITextInputData, IImageInputData, IGroupInputData, IFrameInputData, IObject {
package/src/index.ts CHANGED
@@ -8,7 +8,6 @@ export {
8
8
  IStar, IStarInputData, IStarData,
9
9
  IPath, IPathInputData, IPathData,
10
10
  IPen, IPenInputData, IPenData,
11
- IVector, IVectorInputData, IVectorData,
12
11
  IText, ITextInputData, ITextData, ITextRowData, ITextWordData, ITextCharData, ITextDrawData,
13
12
  IImage, IImageInputData, IImageData,
14
13
  ICanvas, ICanvasInputData, ICanvasData,
@@ -20,7 +19,7 @@ export {
20
19
  IUITag, IUITagInputData
21
20
  } from './IUI'
22
21
  export { IUnitData, IVectorPath, IShadowEffect, IBlurEffect, IGrayscaleEffect, IStrokeAlign, IStrokeJoin, IStrokeCap, IRGB, IRGBA, IColor, IColorStop, IPaint, IGradientPaint, IImagePaint, IImagePaintMode, IFontWeight, ITextCase, ITextDecoration, ITextAlign, IVerticalAlign, IOverflow } from './type/IType'
23
- export { ICornerRadiusString, IStrokeWidthString, IPaintString, IShadowString, IPercent, IDashPatternString, IPathString, IVectorPathString, IStringColor } from './type/IStringType'
22
+ export { ICornerRadiusString, IStrokeWidthString, IPaintString, IShadowString, IPercent, IDashPatternString, IColorString as IStringColor } from './type/IStringType'
24
23
  export { ILeafFill, ILeafPaint, ILeafPaintColor, ILeafStrokePaint, ILeafShadowEffect } from './type/IComputedType'
25
24
 
26
25
  export { IUIRenderModule, IRectRenderModule, IImageRenderModule, ITextRenderModule, IGroupRenderModule, IFrameRenderModule } from './module/IUIRender'
@@ -1,10 +1,10 @@
1
1
  import { IBlendMode, IMatrixData } from '@leafer/interface'
2
2
 
3
- import { IStringColor } from './IStringType'
3
+ import { IColorString } from './IStringType'
4
4
  import { IStrokeAlign, IStrokeJoin, IStrokeCap } from './IType'
5
5
  import { IPaintType } from './IType'
6
6
 
7
- export type ILeafPaintColor = IStringColor | CanvasGradient | CanvasPattern
7
+ export type ILeafPaintColor = IColorString | CanvasGradient | CanvasPattern
8
8
 
9
9
  export interface ILeafPaint {
10
10
  type: IPaintType
@@ -30,7 +30,7 @@ export interface ILeafShadowEffect {
30
30
  y: number
31
31
  blur: number
32
32
  spread?: number
33
- color: IStringColor
33
+ color: IColorString
34
34
  blendMode?: IBlendMode
35
35
  box?: boolean
36
36
  }
@@ -1,12 +1,9 @@
1
1
  export type IPercent = string
2
-
3
- export type IStringColor = string
2
+ export type IColorString = string
4
3
 
5
4
  export type ICornerRadiusString = string
6
5
  export type IStrokeWidthString = string
7
6
  export type IDashPatternString = string
8
- export type IVectorPathString = string
9
- export type IPathString = string
10
7
 
11
8
  export type IPaintString = ISolidPaintString | IGradientPaintString | IImagePaintString
12
9
  export type ISolidPaintString = string
package/src/type/IType.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { IPointData, IPathCommandData, IWindingRule, IBlendMode } from '@leafer/interface'
2
- import { IStringColor } from './IStringType'
2
+ import { IColorString } from './IStringType'
3
3
 
4
4
  export interface IUnitData {
5
5
  type: 'percent' | 'px'
@@ -32,7 +32,7 @@ export interface ISolidPaint extends IPaintBase {
32
32
  color: IColor
33
33
  }
34
34
 
35
- export type IColor = IStringColor | IRGB | IRGBA
35
+ export type IColor = IColorString | IRGB | IRGBA
36
36
  export interface IRGB {
37
37
  r: number
38
38
  g: number
@@ -114,7 +114,7 @@ export interface IShadowEffect {
114
114
  y: number
115
115
  blur: number
116
116
  spread?: number
117
- color: IStringColor | IColor
117
+ color: IColorString | IColor
118
118
  blendMode?: IBlendMode
119
119
  visible?: boolean
120
120
  box?: boolean