@leafer-ui/interface 1.12.4 → 2.0.1

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.12.4",
3
+ "version": "2.0.1",
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.12.4"
25
+ "@leafer/interface": "2.0.1"
26
26
  }
27
27
  }
package/src/IUI.ts CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  ITextStyleAttrData, ITextStyleInputData, ITextStyleComputedData,
10
10
  IStrokeComputedStyle
11
11
  } from './ICommonAttr'
12
- import { IOverflow } from './type/IType'
12
+ import { IFill, IOverflow } from './type/IType'
13
13
  import { IAnimation, IAnimate, IKeyframe, IKeyframeId, IAnimateType } from './IAnimation'
14
14
  import { ILeafer } from './app/ILeafer'
15
15
  import { IEditorConfig } from './editor/IEditor'
@@ -309,6 +309,8 @@ export interface IImage extends IImageAttrData, IRect {
309
309
  }
310
310
  interface IImageAttrData {
311
311
  url?: string
312
+ foreground?: IFill
313
+ background?: IFill
312
314
  }
313
315
  export interface IImageData extends IImageAttrData, IRectData {
314
316
  __setImageFill(value: string): void
@@ -571,6 +573,7 @@ export type IUITag =
571
573
  | 'Robot'
572
574
  | 'GIF'
573
575
  | 'Video'
576
+ | (string & {})
574
577
 
575
578
 
576
579
  export interface IUIInputData extends IRectInputData, IEllipseInputData, IPolygonInputData, IStarInputData, ILineInputData, IPathInputData, ITextInputData, IImageInputData, IGroupInputData, IBoxInputData, IFrameInputData, IFlowInputData, IArrowInputData, IGIFInputData, IVideoInputData, IRobotInputData, IUIBaseInputData, IObject {
@@ -1,4 +1,4 @@
1
- import { IBlendMode, IDirection, ILeaferImage, IMatrixData, IPointData, IScaleFixed, ITaskItem } from '@leafer/interface'
1
+ import { IBlendMode, IDirection, IInterlace, ILeaferImage, IMatrixData, IPointData, IScaleFixed, ITaskItem } from '@leafer/interface'
2
2
 
3
3
  import { IColorString } from './IStringType'
4
4
  import { IStrokeAlign, IStrokeJoin, IStrokeCap, IImagePaintMode, IImageFilters, IPaint } from './IType'
@@ -36,6 +36,7 @@ export interface ILeafPaintPatternData {
36
36
  filters?: IImageFilters
37
37
  mode?: IImagePaintMode
38
38
  repeat?: 'repeat' | 'repeat-x' | 'repeat-y'
39
+ interlace?: IInterlace
39
40
  }
40
41
 
41
42
  export type ILeafFill = ILeafPaint
package/src/type/IType.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IPointData, IPathCommandData, IWindingRule, IBlendMode, IExportFileType, IFourNumber, IAlign, IUnitPointData, IAxis, IAxisReverse, IFilter, IOptionSizeData, ISizeData, IGap, IPointGap, IScaleFixed, IDirection, IImageLOD } from '@leafer/interface'
1
+ import { IPointData, IPathCommandData, IWindingRule, IBlendMode, IExportFileType, IFourNumber, IAlign, IUnitPointData, IAxis, IAxisReverse, IInterlace, IFilter, IOptionSizeData, ISizeData, IGap, IPointGap, IScaleFixed, IDirection, IImageLOD, IPercentData } from '@leafer/interface'
2
2
  import { IColorString, IPaintString } from './IStringType'
3
3
  import { IStrokeStyle } from '../ICommonAttr'
4
4
 
@@ -66,6 +66,7 @@ export interface IStrokeGradientPaint extends IGradientPaint { }
66
66
  export interface IColorStop {
67
67
  offset: number
68
68
  color: IColor
69
+ selected?: boolean
69
70
  }
70
71
 
71
72
  // ---
@@ -96,7 +97,7 @@ export interface IImagePaint extends IPaintBase {
96
97
 
97
98
  repeat?: IRepeat
98
99
  gap?: IGap | IPointGap
99
- interlace?: number | IInterlace // 平铺图案交错排列
100
+ interlace?: number | IPercentData | IInterlace // 平铺图案交错排列
100
101
 
101
102
  changeful?: boolean // 会频繁变化,不生成图案(有特殊性能优化,一般用于游戏精灵、动图场景)
102
103
  sync?: boolean // 同步显示,不走任务列表生成图案
@@ -115,10 +116,6 @@ export interface IImageFilters {
115
116
  }
116
117
  export type IImagePaintMode = 'normal' | 'cover' | 'fit' | 'stretch' | 'clip' | 'repeat'
117
118
  export type IRepeat = boolean | 'x' | 'y' | IPointData
118
- export interface IInterlace {
119
- type: IAxis
120
- offset: number
121
- }
122
119
 
123
120
  // 描边
124
121
  export type IStrokeAlign = 'inside' | 'outside' | 'center'
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IBlendMode, IScaleFixed, IAlign, IUnitPointData, IImageLOD, IExportFileType, IFourNumber, IPointData, IOptionSizeData, ISizeData, IGap, IPointGap, IAxis, IPathCommandData, IAxisReverse, IDirection, IWindingRule, IFilter, IMatrixData, ILeaferImage, ITaskItem, INumber, IString, IBoolean, IUnitData, IAnimateOptions, IAnimateEasing, IEventer, IObject, IEventParamsMap, IAnimateEasingFunction, IAnimateEnding, ITransition, IPercentData, IBounds, ILeafInputData, ILeaf as ILeaf$1, ILeafComputedData, ILeafData, IBoundsData, IValue, IPathCreator, IJSONOptions, IFindCondition, IAnswer, IPathString, IPathDrawer, ILeaferCanvas, IRenderOptions, IExportOptions, IExportResult, IPickOptions, IPickResult, IAround, ICanvasContext2DSettings, ICanvasContext2D, ILeaferAttrData, IControl, ILeaferType, ILeaferConfig, ILeafRender, ILeafBounds, ILeafHit, ICachedLeaf, IScaleData as IScaleData$1, IBooleanMap, IFunction, IMatrixWithBoundsScaleData } from '@leafer/interface';
1
+ import { IBlendMode, IScaleFixed, IAlign, IUnitPointData, IImageLOD, IExportFileType, IFourNumber, IPointData, IOptionSizeData, ISizeData, IGap, IPointGap, IPercentData, IInterlace, IPathCommandData, IAxis, IAxisReverse, IDirection, IWindingRule, IFilter, IMatrixData, ILeaferImage, ITaskItem, INumber, IString, IBoolean, IUnitData, IAnimateOptions, IAnimateEasing, IEventer, IObject, IEventParamsMap, IAnimateEasingFunction, IAnimateEnding, ITransition, IBounds, ILeafInputData, ILeaf as ILeaf$1, ILeafComputedData, ILeafData, IBoundsData, IValue, IPathCreator, IJSONOptions, IFindCondition, IAnswer, IPathString, IPathDrawer, ILeaferCanvas, IRenderOptions, IExportOptions, IExportResult, IPickOptions, IPickResult, IAround, ICanvasContext2DSettings, ICanvasContext2D, ILeaferAttrData, IControl, ILeaferType, ILeaferConfig, ILeafRender, ILeafBounds, ILeafHit, ICachedLeaf, IScaleData as IScaleData$1, IBooleanMap, IFunction, IMatrixWithBoundsScaleData } from '@leafer/interface';
2
2
  export * from '@leafer/interface';
3
3
  import { IObject as IObject$1, IEditSize, IStroke as IStroke$1, IFourNumber as IFourNumber$1, IFill as IFill$1, IBoxInputData as IBoxInputData$1, IRectInputData as IRectInputData$1, IColorString as IColorString$1, IDirection4, ICursorType, IImageCursor, IAlign as IAlign$1, IUnitPointData as IUnitPointData$1, IUIInputData as IUIInputData$1, IShortcutKeysCheck, IShortcutKeys, IUI as IUI$1, IPointData as IPointData$1, IScaleData, ISkewData, IGroup as IGroup$1, ISelectorProxy, IBox as IBox$1, ILayoutBoundsData, IKeyEvent, IUIEvent, IDragEvent, IMoveEvent, IZoomEvent, IRotateEvent, ITransition as ITransition$1, ILeafList, ILeafer as ILeafer$1, ILeaf, IGroupInputData as IGroupInputData$1, IStateName as IStateName$1, IString as IString$1, IBoolean as IBoolean$1, IStateStyle as IStateStyle$1 } from '@leafer-ui/interface';
4
4
 
@@ -57,6 +57,7 @@ interface IStrokeGradientPaint extends IGradientPaint {
57
57
  interface IColorStop {
58
58
  offset: number;
59
59
  color: IColor;
60
+ selected?: boolean;
60
61
  }
61
62
  interface IImagePaint extends IPaintBase {
62
63
  type: "image";
@@ -76,7 +77,7 @@ interface IImagePaint extends IPaintBase {
76
77
  clipSize?: ISizeData;
77
78
  repeat?: IRepeat;
78
79
  gap?: IGap | IPointGap;
79
- interlace?: number | IInterlace;
80
+ interlace?: number | IPercentData | IInterlace;
80
81
  changeful?: boolean;
81
82
  sync?: boolean;
82
83
  showProgress?: boolean | IColorString;
@@ -94,10 +95,6 @@ interface IImageFilters {
94
95
  }
95
96
  type IImagePaintMode = 'normal' | 'cover' | 'fit' | 'stretch' | 'clip' | 'repeat';
96
97
  type IRepeat = boolean | 'x' | 'y' | IPointData;
97
- interface IInterlace {
98
- type: IAxis;
99
- offset: number;
100
- }
101
98
  type IStrokeAlign = 'inside' | 'outside' | 'center';
102
99
  type IStrokeCap = 'none' | 'round' | 'square';
103
100
  type IStrokeJoin = 'bevel' | 'round' | 'miter';
@@ -194,6 +191,7 @@ interface ILeafPaintPatternData {
194
191
  filters?: IImageFilters;
195
192
  mode?: IImagePaintMode;
196
193
  repeat?: 'repeat' | 'repeat-x' | 'repeat-y';
194
+ interlace?: IInterlace;
197
195
  }
198
196
  type ILeafFill = ILeafPaint;
199
197
  interface ILeafStrokePaint extends ILeafPaint {
@@ -939,6 +937,8 @@ interface IImage extends IImageAttrData, IRect {
939
937
  }
940
938
  interface IImageAttrData {
941
939
  url?: string;
940
+ foreground?: IFill;
941
+ background?: IFill;
942
942
  }
943
943
  interface IImageData extends IImageAttrData, IRectData {
944
944
  __setImageFill(value: string): void;
@@ -1115,7 +1115,7 @@ interface IUIComputedData extends IUIAttrData, IFillComputedData, IBorderCompute
1115
1115
  interface IUIBaseInputData extends IUIAttrData, IFillInputData, IStrokeInputData, ITextStyleInputData, ICornerRadiusInputData, IEffectInputData, ILeafInputData {
1116
1116
  children?: IUIInputData[];
1117
1117
  }
1118
- type IUITag = 'App' | 'Leafer' | 'Rect' | 'Ellipse' | 'Polygon' | 'Star' | 'Line' | 'Path' | 'Pen' | 'Text' | 'Image' | 'Canvas' | 'Group' | 'Frame' | 'Box' | 'Arrow' | 'Robot' | 'GIF' | 'Video';
1118
+ type IUITag = 'App' | 'Leafer' | 'Rect' | 'Ellipse' | 'Polygon' | 'Star' | 'Line' | 'Path' | 'Pen' | 'Text' | 'Image' | 'Canvas' | 'Group' | 'Frame' | 'Box' | 'Arrow' | 'Robot' | 'GIF' | 'Video' | (string & {});
1119
1119
  interface IUIInputData extends IRectInputData, IEllipseInputData, IPolygonInputData, IStarInputData, ILineInputData, IPathInputData, ITextInputData, IImageInputData, IGroupInputData, IBoxInputData, IFrameInputData, IFlowInputData, IArrowInputData, IGIFInputData, IVideoInputData, IRobotInputData, IUIBaseInputData, IObject {
1120
1120
  children?: IUIInputData[];
1121
1121
  }