@leafer-ui/interface 1.10.0 → 1.10.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 +2 -2
- package/src/IUI.ts +2 -1
- package/src/type/IComputedType.ts +2 -6
- package/src/type/IType.ts +2 -2
- package/types/index.d.ts +5 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.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.10.
|
|
25
|
+
"@leafer/interface": "1.10.1"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/IUI.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { ILeafer } from './app/ILeafer'
|
|
|
15
15
|
import { IEditorConfig } from './editor/IEditor'
|
|
16
16
|
import { IColorString } from './type/IStringType'
|
|
17
17
|
import { IScroller, IScrollConfig } from './IScroller'
|
|
18
|
+
import { ILeafPaint } from './type/IComputedType'
|
|
18
19
|
|
|
19
20
|
// Line
|
|
20
21
|
export interface ILine extends ILineAttrData, IUI {
|
|
@@ -427,7 +428,7 @@ export interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICorne
|
|
|
427
428
|
__drawAfterFill?(canvas: ILeaferCanvas, options: IRenderOptions): void
|
|
428
429
|
__drawContent?(canvas: ILeaferCanvas, options: IRenderOptions): void
|
|
429
430
|
|
|
430
|
-
drawImagePlaceholder(image:
|
|
431
|
+
drawImagePlaceholder(image: ILeafPaint, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
|
|
431
432
|
|
|
432
433
|
animate(keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], options?: ITransition, type?: IAnimateType, isTemp?: boolean): IAnimate
|
|
433
434
|
killAnimate(type?: IAnimateType, nextStyle?: IUIInputData): void
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IBlendMode, IDirection, ILeaferImage, IMatrixData, IPointData, IScaleFixed, ITaskItem } from '@leafer/interface'
|
|
2
2
|
|
|
3
3
|
import { IColorString } from './IStringType'
|
|
4
|
-
import { IStrokeAlign, IStrokeJoin, IStrokeCap, IImagePaintMode, IImageFilters } from './IType'
|
|
4
|
+
import { IStrokeAlign, IStrokeJoin, IStrokeCap, IImagePaintMode, IImageFilters, IPaint } from './IType'
|
|
5
5
|
import { IPaintType } from './IType'
|
|
6
6
|
import { IStrokeComputedStyle } from '../ICommonAttr'
|
|
7
7
|
|
|
@@ -12,18 +12,14 @@ export interface ILeafPaint {
|
|
|
12
12
|
style?: ILeafPaintColor
|
|
13
13
|
strokeStyle?: IStrokeComputedStyle // 子描边样式选项
|
|
14
14
|
transform?: IMatrixData // 存在时表示pattern自身不能应用transform
|
|
15
|
-
blendMode?: IBlendMode
|
|
16
15
|
image?: ILeaferImage
|
|
17
16
|
level?: number
|
|
18
17
|
loadId?: number
|
|
19
18
|
patternId?: string
|
|
20
19
|
patternTask?: ITaskItem
|
|
21
|
-
changeful?: boolean // 会频繁变化,不生成图案(有特殊性能优化,一般用于游戏精灵、动图场景)
|
|
22
|
-
sync?: boolean // 同步显示图片,不走任务列表生成图案
|
|
23
20
|
isTransparent?: boolean // 是否为透明色
|
|
24
21
|
data?: ILeafPaintPatternData
|
|
25
|
-
|
|
26
|
-
scaleFixed?: IScaleFixed // 平铺图片不跟随画布缩放
|
|
22
|
+
originPaint?: IPaint // 原始paint对象
|
|
27
23
|
}
|
|
28
24
|
|
|
29
25
|
export interface ILeafPaintPatternData {
|
package/src/type/IType.ts
CHANGED
|
@@ -20,6 +20,7 @@ export interface IPaintBase {
|
|
|
20
20
|
|
|
21
21
|
style?: IStrokeStyle
|
|
22
22
|
editing?: boolean // 标记编辑中
|
|
23
|
+
scaleFixed?: IScaleFixed // 不跟随画布缩放
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export type IPaintType =
|
|
@@ -94,11 +95,10 @@ export interface IImagePaint extends IPaintBase {
|
|
|
94
95
|
|
|
95
96
|
repeat?: IRepeat
|
|
96
97
|
gap?: IGap | IPointGap
|
|
97
|
-
scaleFixed?: IScaleFixed // 平铺图片不跟随画布缩放
|
|
98
98
|
|
|
99
99
|
changeful?: boolean // 会频繁变化,不生成图案(有特殊性能优化,一般用于游戏精灵、动图场景)
|
|
100
100
|
sync?: boolean // 同步显示,不走任务列表生成图案
|
|
101
|
-
showProgress?: boolean // 是否显示进度
|
|
101
|
+
showProgress?: boolean | IColorString // 是否显示进度
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
export interface IStrokeImagePaint extends IImagePaint { }
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBlendMode, IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, IOptionSizeData, ISizeData, IGap, IPointGap,
|
|
1
|
+
import { IBlendMode, IScaleFixed, IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, IOptionSizeData, ISizeData, IGap, IPointGap, IPathCommandData, IAxis, 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, 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
|
|
|
@@ -25,6 +25,7 @@ interface IPaintBase {
|
|
|
25
25
|
opacity?: number;
|
|
26
26
|
style?: IStrokeStyle;
|
|
27
27
|
editing?: boolean;
|
|
28
|
+
scaleFixed?: IScaleFixed;
|
|
28
29
|
}
|
|
29
30
|
type IPaintType = 'image' | 'solid' | IGradientType;
|
|
30
31
|
type IGradientType = 'linear' | 'radial' | 'angular';
|
|
@@ -74,10 +75,9 @@ interface IImagePaint extends IPaintBase {
|
|
|
74
75
|
clipSize?: ISizeData;
|
|
75
76
|
repeat?: IRepeat;
|
|
76
77
|
gap?: IGap | IPointGap;
|
|
77
|
-
scaleFixed?: IScaleFixed;
|
|
78
78
|
changeful?: boolean;
|
|
79
79
|
sync?: boolean;
|
|
80
|
-
showProgress?: boolean;
|
|
80
|
+
showProgress?: boolean | IColorString;
|
|
81
81
|
}
|
|
82
82
|
interface IStrokeImagePaint extends IImagePaint {
|
|
83
83
|
}
|
|
@@ -168,18 +168,14 @@ interface ILeafPaint {
|
|
|
168
168
|
style?: ILeafPaintColor;
|
|
169
169
|
strokeStyle?: IStrokeComputedStyle;
|
|
170
170
|
transform?: IMatrixData;
|
|
171
|
-
blendMode?: IBlendMode;
|
|
172
171
|
image?: ILeaferImage;
|
|
173
172
|
level?: number;
|
|
174
173
|
loadId?: number;
|
|
175
174
|
patternId?: string;
|
|
176
175
|
patternTask?: ITaskItem;
|
|
177
|
-
changeful?: boolean;
|
|
178
|
-
sync?: boolean;
|
|
179
176
|
isTransparent?: boolean;
|
|
180
177
|
data?: ILeafPaintPatternData;
|
|
181
|
-
|
|
182
|
-
scaleFixed?: IScaleFixed;
|
|
178
|
+
originPaint?: IPaint;
|
|
183
179
|
}
|
|
184
180
|
interface ILeafPaintPatternData {
|
|
185
181
|
scaleX?: number;
|
|
@@ -1025,7 +1021,7 @@ interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICornerRadius
|
|
|
1025
1021
|
__drawPathByBox(drawer: IPathDrawer): void;
|
|
1026
1022
|
__drawAfterFill?(canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
1027
1023
|
__drawContent?(canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
1028
|
-
drawImagePlaceholder(image:
|
|
1024
|
+
drawImagePlaceholder(image: ILeafPaint, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
|
|
1029
1025
|
animate(keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], options?: ITransition, type?: IAnimateType, isTemp?: boolean): IAnimate;
|
|
1030
1026
|
killAnimate(type?: IAnimateType, nextStyle?: IUIInputData): void;
|
|
1031
1027
|
export(filename: string, options?: IExportOptions | number | boolean): Promise<IExportResult>;
|