@leafer-ui/interface 1.9.3 → 1.9.5
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/ICommonAttr.ts +7 -7
- package/src/IScroller.ts +1 -1
- package/src/IUI.ts +1 -2
- package/src/index.ts +1 -1
- package/src/module/IPathArrow.ts +4 -2
- package/src/type/IComputedType.ts +3 -0
- package/src/type/IType.ts +11 -2
- package/types/index.d.ts +22 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.5",
|
|
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.9.
|
|
25
|
+
"@leafer/interface": "1.9.5"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/ICommonAttr.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { INumber, IBoolean, IString, IFourNumber, IUnitData, IScaleFixed } from '@leafer/interface'
|
|
2
|
-
import { IStrokeAlign, IStrokeCap, IStrokeJoin, IBlurEffect, IFontWeight, ITextCase, ITextDecoration, IShadowEffect, IGrayscaleEffect, ITextAlign, IVerticalAlign, ITextWrap, IStroke, IFill,
|
|
2
|
+
import { IStrokeAlign, IStrokeCap, IStrokeJoin, IBlurEffect, IFontWeight, ITextCase, ITextDecoration, IShadowEffect, IGrayscaleEffect, ITextAlign, IVerticalAlign, ITextWrap, IStroke, IFill, IArrowStyle, IWritingMode, ITextOverflow } from './type/IType'
|
|
3
3
|
import { ILeafStrokePaint, ILeafShadowEffect, ILeafPaint } from './type/IComputedType'
|
|
4
4
|
import { IDashPatternString, IShadowString, IColorString, IStrokeWidthString, ICornerRadiusString } from './type/IStringType'
|
|
5
5
|
|
|
@@ -39,15 +39,15 @@ export interface IBorderComputedData {
|
|
|
39
39
|
export interface IStrokeAttrData extends IStrokeStyle {
|
|
40
40
|
stroke?: IStroke
|
|
41
41
|
|
|
42
|
-
startArrow?:
|
|
43
|
-
endArrow?:
|
|
42
|
+
startArrow?: IArrowStyle
|
|
43
|
+
endArrow?: IArrowStyle
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export interface IStrokeInputData extends IStrokeStyle {
|
|
47
47
|
stroke?: IStroke
|
|
48
48
|
|
|
49
|
-
startArrow?:
|
|
50
|
-
endArrow?:
|
|
49
|
+
startArrow?: IArrowStyle
|
|
50
|
+
endArrow?: IArrowStyle
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
export interface IStrokeStyle {
|
|
@@ -64,8 +64,8 @@ export interface IStrokeStyle {
|
|
|
64
64
|
export interface IStrokeComputedData extends IStrokeComputedStyle {
|
|
65
65
|
stroke?: IColorString | ILeafStrokePaint[]
|
|
66
66
|
|
|
67
|
-
startArrow?:
|
|
68
|
-
endArrow?:
|
|
67
|
+
startArrow?: IArrowStyle
|
|
68
|
+
endArrow?: IArrowStyle
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export interface IStrokeComputedStyle {
|
package/src/IScroller.ts
CHANGED
package/src/IUI.ts
CHANGED
|
@@ -343,8 +343,7 @@ export interface IBox extends IBoxAttrData, IGroup {
|
|
|
343
343
|
__: IBoxData
|
|
344
344
|
scroller?: IScroller
|
|
345
345
|
hasScroller?: boolean
|
|
346
|
-
__checkScroll(): void
|
|
347
|
-
__updateScroll(): void
|
|
346
|
+
__checkScroll(isScrollMode: boolean): void
|
|
348
347
|
__updateRectRenderBounds(): void
|
|
349
348
|
__renderGroup(canvas: ILeaferCanvas, options: IRenderOptions): void
|
|
350
349
|
}
|
package/src/index.ts
CHANGED
|
@@ -28,7 +28,7 @@ export {
|
|
|
28
28
|
IUITag, IUIInputData, IUIJSONData, IStateStyle, IStates, IStateName
|
|
29
29
|
} from './IUI'
|
|
30
30
|
|
|
31
|
-
export { IVectorPath, IShadowEffect, IBlurEffect, IGrayscaleEffect, IEffect, IFill, IStroke, IPaintAttr, IStrokeAlign, IStrokeJoin, IStrokeCap, IArrowType, IPathDataArrow, IPathDataArrowMap, IRGB, IRGBA, IColor, IColorStop, IPaint, IStrokePaint, IStrokeSolidPaint, IGradientPaint, IStrokeGradientPaint, IImagePaint, IStrokeImagePaint, IImagePaintMode, IFontWeight, IFontWeightNumer, IFontWeightString, ITextCase, ITextDecoration, ITextDecorationType, ITextDecorationData, IWritingMode, ITextAlign, IVerticalAlign, IOverflow, ITextOverflow, ITextWrap, IRepeat, IGradientType, IPaintType, IImageFilters, IPathDataArrowOffset, ISolidPaint, IPaintBase } from './type/IType'
|
|
31
|
+
export { IVectorPath, IShadowEffect, IBlurEffect, IGrayscaleEffect, IEffect, IFill, IStroke, IPaintAttr, IStrokeAlign, IStrokeJoin, IStrokeCap, IArrowStyle, IArrowType, IArrowTypeData, IPathDataArrow, IPathDataArrowMap, IRGB, IRGBA, IColor, IColorStop, IPaint, IStrokePaint, IStrokeSolidPaint, IGradientPaint, IStrokeGradientPaint, IImagePaint, IStrokeImagePaint, IImagePaintMode, IFontWeight, IFontWeightNumer, IFontWeightString, ITextCase, ITextDecoration, ITextDecorationType, ITextDecorationData, IWritingMode, ITextAlign, IVerticalAlign, IOverflow, ITextOverflow, ITextWrap, IRepeat, IGradientType, IPaintType, IImageFilters, IPathDataArrowOffset, ISolidPaint, IPaintBase } from './type/IType'
|
|
32
32
|
export { ICornerRadiusString, IStrokeWidthString, IPaintString, IShadowString, IPercent, IDashPatternString, IColorString } from './type/IStringType'
|
|
33
33
|
export { ILeafFill, ILeafPaint, ILeafPaintPatternData, ILeafPaintColor, ILeafStrokePaint, ILeafShadowEffect } from './type/IComputedType'
|
|
34
34
|
export { IStrokeAttrData, IStrokeInputData, IStrokeComputedData, IStrokeComputedStyle, IStrokeStyle, ITextStyleAttrData, ITextStyleInputData, ITextStyleComputedData, IEffectAttrData, IEffectInputData, IEffectComputedData } from './ICommonAttr'
|
package/src/module/IPathArrow.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { IPathDataArrowMap } from '../type/IType'
|
|
1
|
+
import { IPathDataArrow, IPathDataArrowMap } from '../type/IType'
|
|
2
2
|
import { IUI } from '../IUI'
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
export interface IPathArrowModule {
|
|
6
6
|
list: IPathDataArrowMap
|
|
7
|
-
addArrows(ui: IUI
|
|
7
|
+
addArrows(ui: IUI): void
|
|
8
|
+
register(name: string, data: IPathDataArrow): void
|
|
9
|
+
get(name: string): IPathDataArrow
|
|
8
10
|
}
|
package/src/type/IType.ts
CHANGED
|
@@ -86,7 +86,7 @@ export interface IImagePaint extends IPaintBase {
|
|
|
86
86
|
size?: number | IOptionSizeData
|
|
87
87
|
scale?: number | IPointData
|
|
88
88
|
rotation?: number
|
|
89
|
-
skew?:
|
|
89
|
+
skew?: IPointData
|
|
90
90
|
|
|
91
91
|
freeTransform?: boolean // 平铺模式下是否进行自由变换,默认90度、缩放会进行特殊处理
|
|
92
92
|
|
|
@@ -120,7 +120,13 @@ export type IStrokeCap = 'none' | 'round' | 'square'
|
|
|
120
120
|
export type IStrokeJoin = 'bevel' | 'round' | 'miter'
|
|
121
121
|
|
|
122
122
|
// 箭头
|
|
123
|
-
export type IArrowType =
|
|
123
|
+
export type IArrowType = 'none' | 'angle' | 'angle-side' | 'arrow' | 'triangle' | 'triangle-flip' | 'circle' | 'circle-line' | 'square' | 'square-line' | 'diamond' | 'diamond-line' | 'mark' | (string & {})
|
|
124
|
+
export type IArrowStyle = IPathDataArrow | IArrowType | IArrowTypeData
|
|
125
|
+
|
|
126
|
+
export interface IArrowTypeData {
|
|
127
|
+
type: IArrowType
|
|
128
|
+
scale?: number
|
|
129
|
+
}
|
|
124
130
|
|
|
125
131
|
export interface IPathDataArrowMap {
|
|
126
132
|
[name: string]: IPathDataArrow
|
|
@@ -183,6 +189,9 @@ export interface IShadowEffect {
|
|
|
183
189
|
visible?: boolean
|
|
184
190
|
box?: boolean
|
|
185
191
|
scaleFixed?: IScaleFixed
|
|
192
|
+
|
|
193
|
+
skew?: IPointData // 倾斜阴影
|
|
194
|
+
rotation?: number // 旋转阴影
|
|
186
195
|
}
|
|
187
196
|
|
|
188
197
|
export interface IBlurEffect {
|
package/types/index.d.ts
CHANGED
|
@@ -95,7 +95,12 @@ type IRepeat = boolean | 'x' | 'y' | IPointData;
|
|
|
95
95
|
type IStrokeAlign = 'inside' | 'outside' | 'center';
|
|
96
96
|
type IStrokeCap = 'none' | 'round' | 'square';
|
|
97
97
|
type IStrokeJoin = 'bevel' | 'round' | 'miter';
|
|
98
|
-
type IArrowType =
|
|
98
|
+
type IArrowType = 'none' | 'angle' | 'angle-side' | 'arrow' | 'triangle' | 'triangle-flip' | 'circle' | 'circle-line' | 'square' | 'square-line' | 'diamond' | 'diamond-line' | 'mark' | (string & {});
|
|
99
|
+
type IArrowStyle = IPathDataArrow | IArrowType | IArrowTypeData;
|
|
100
|
+
interface IArrowTypeData {
|
|
101
|
+
type: IArrowType;
|
|
102
|
+
scale?: number;
|
|
103
|
+
}
|
|
99
104
|
interface IPathDataArrowMap {
|
|
100
105
|
[name: string]: IPathDataArrow;
|
|
101
106
|
}
|
|
@@ -138,6 +143,8 @@ interface IShadowEffect {
|
|
|
138
143
|
visible?: boolean;
|
|
139
144
|
box?: boolean;
|
|
140
145
|
scaleFixed?: IScaleFixed;
|
|
146
|
+
skew?: IPointData;
|
|
147
|
+
rotation?: number;
|
|
141
148
|
}
|
|
142
149
|
interface IBlurEffect {
|
|
143
150
|
blur: number;
|
|
@@ -200,6 +207,8 @@ interface ILeafShadowEffect {
|
|
|
200
207
|
blendMode?: IBlendMode;
|
|
201
208
|
box?: boolean;
|
|
202
209
|
scaleFixed?: IScaleFixed;
|
|
210
|
+
skew?: IPointData;
|
|
211
|
+
rotation?: number;
|
|
203
212
|
}
|
|
204
213
|
|
|
205
214
|
interface ICornerRadiusAttrData {
|
|
@@ -229,13 +238,13 @@ interface IBorderComputedData {
|
|
|
229
238
|
}
|
|
230
239
|
interface IStrokeAttrData extends IStrokeStyle {
|
|
231
240
|
stroke?: IStroke;
|
|
232
|
-
startArrow?:
|
|
233
|
-
endArrow?:
|
|
241
|
+
startArrow?: IArrowStyle;
|
|
242
|
+
endArrow?: IArrowStyle;
|
|
234
243
|
}
|
|
235
244
|
interface IStrokeInputData extends IStrokeStyle {
|
|
236
245
|
stroke?: IStroke;
|
|
237
|
-
startArrow?:
|
|
238
|
-
endArrow?:
|
|
246
|
+
startArrow?: IArrowStyle;
|
|
247
|
+
endArrow?: IArrowStyle;
|
|
239
248
|
}
|
|
240
249
|
interface IStrokeStyle {
|
|
241
250
|
strokeAlign?: IStrokeAlign;
|
|
@@ -249,8 +258,8 @@ interface IStrokeStyle {
|
|
|
249
258
|
}
|
|
250
259
|
interface IStrokeComputedData extends IStrokeComputedStyle {
|
|
251
260
|
stroke?: IColorString | ILeafStrokePaint[];
|
|
252
|
-
startArrow?:
|
|
253
|
-
endArrow?:
|
|
261
|
+
startArrow?: IArrowStyle;
|
|
262
|
+
endArrow?: IArrowStyle;
|
|
254
263
|
}
|
|
255
264
|
interface IStrokeComputedStyle {
|
|
256
265
|
strokeAlign?: IStrokeAlign;
|
|
@@ -663,7 +672,7 @@ interface IScroller extends IGroup {
|
|
|
663
672
|
ratioY: number;
|
|
664
673
|
dragScrolling: boolean;
|
|
665
674
|
updateConfig(): void;
|
|
666
|
-
update(check
|
|
675
|
+
update(check?: boolean): void;
|
|
667
676
|
}
|
|
668
677
|
|
|
669
678
|
interface ILine extends ILineAttrData, IUI {
|
|
@@ -932,8 +941,7 @@ interface IBox extends IBoxAttrData, IGroup {
|
|
|
932
941
|
__: IBoxData;
|
|
933
942
|
scroller?: IScroller;
|
|
934
943
|
hasScroller?: boolean;
|
|
935
|
-
__checkScroll(): void;
|
|
936
|
-
__updateScroll(): void;
|
|
944
|
+
__checkScroll(isScrollMode: boolean): void;
|
|
937
945
|
__updateRectRenderBounds(): void;
|
|
938
946
|
__renderGroup(canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
939
947
|
}
|
|
@@ -1134,7 +1142,9 @@ type IUIHitModule = ILeafHit & ThisType<IUI>;
|
|
|
1134
1142
|
|
|
1135
1143
|
interface IPathArrowModule {
|
|
1136
1144
|
list: IPathDataArrowMap;
|
|
1137
|
-
addArrows(ui: IUI
|
|
1145
|
+
addArrows(ui: IUI): void;
|
|
1146
|
+
register(name: string, data: IPathDataArrow): void;
|
|
1147
|
+
get(name: string): IPathDataArrow;
|
|
1138
1148
|
}
|
|
1139
1149
|
|
|
1140
1150
|
interface ITransitionModule {
|
|
@@ -1250,4 +1260,4 @@ interface IFilterFunction {
|
|
|
1250
1260
|
(filter: IFilter, ui: IUI, bounds: IMatrixWithBoundsScaleData, currentCanvas: ILeaferCanvas, originCanvas: ILeaferCanvas, shape: ICachedShape): void;
|
|
1251
1261
|
}
|
|
1252
1262
|
|
|
1253
|
-
export type { IAnimate, IAnimateKeyframe, IAnimateList, IAnimateType, IAnimation, IApp, IAppConfig, IAppData, IAppForEachFunction, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBackgroundBoxStyle, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, IComputedKeyframe, ICornerRadiusString, IDashPatternString, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditToolFunction, IEditorBase, IEditorBeforeEditInner, IEditorBeforeEditOuter, IEditorBeforeMove, IEditorBeforeRotate, IEditorBeforeScale, IEditorBeforeSelect, IEditorBeforeSkew, IEditorConfig, IEditorConfigFunction, IEditorDragStartData, IEditorEditInnerData, IEditorEditOuterData, IEditorMoveData, IEditorRotationData, IEditorScaleData, IEditorSelectData, IEditorSkewData, IEffect, IEffectAttrData, IEffectComputedData, IEffectInputData, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IFill, IFilterFunction, IFilterModule, IFilterProcessor, IFindUIMethod, IFlow, IFlowData, IFlowInputData, IFontWeight, IFontWeightNumer, IFontWeightString, IFrame, IFrameData, IFrameInputData, IFrameRenderModule, IGIF, IGIFData, IGIFInputData, IGradientPaint, IGradientType, IGrayscaleEffect, IGroup, IGroupData, IGroupInputData, IGroupRenderModule, IImage, IImageData, IImageFilters, IImageInputData, IImagePaint, IImagePaintMode, IImageRenderModule, IKeyframe, IKeyframeId, IKeyframesAnimation, ILeafFill, ILeafPaint, ILeafPaintColor, ILeafPaintPatternData, ILeafShadowEffect, ILeafStrokePaint, ILeafer, ILeaferData, ILeaferInputData, ILine, ILineData, ILineInputData, IOverflow, IPaint, IPaintAttr, IPaintBase, IPaintGradientModule, IPaintImageModule, IPaintModule, IPaintString, IPaintType, IPath, IPathArrowModule, IPathData, IPathDataArrow, IPathDataArrowMap, IPathDataArrowOffset, IPathInputData, IPen, IPenData, IPenInputData, IPercent, IPolygon, IPolygonData, IPolygonInputData, IRGB, IRGBA, IRect, IRectData, IRectInputData, IRectRenderModule, IRepeat, IRobot, IRobotActionName, IRobotActions, IRobotAnimation, IRobotComputedKeyframe, IRobotData, IRobotInputData, IRobotKeyframe, IScrollConfig, IScrollTheme, IScroller, IShadowEffect, IShadowString, ISolidPaint, IStar, IStarData, IStarInputData, IStateModule, IStateName, IStateStyle, IStates, IStroke, IStrokeAlign, IStrokeAttrData, IStrokeCap, IStrokeComputedData, IStrokeComputedStyle, IStrokeGradientPaint, IStrokeImagePaint, IStrokeInputData, IStrokeJoin, IStrokePaint, IStrokeSolidPaint, IStrokeStyle, IStrokeWidthString, IStyleAnimation, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDecorationData, ITextDecorationType, ITextDrawData, ITextInputData, ITextOverflow, ITextRenderModule, ITextRowData, ITextStyleAttrData, ITextStyleComputedData, ITextStyleInputData, ITextWordData, ITextWrap, ITransformTool, ITransitionFunction, ITransitionMap, ITransitionModule, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIJSONData, IUIRenderModule, IUITag, IVectorPath, IVerticalAlign, IVideo, IVideoData, IVideoInputData, IWritingMode };
|
|
1263
|
+
export type { IAnimate, IAnimateKeyframe, IAnimateList, IAnimateType, IAnimation, IApp, IAppConfig, IAppData, IAppForEachFunction, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowStyle, IArrowType, IArrowTypeData, IBackgroundBoxStyle, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, IComputedKeyframe, ICornerRadiusString, IDashPatternString, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditToolFunction, IEditorBase, IEditorBeforeEditInner, IEditorBeforeEditOuter, IEditorBeforeMove, IEditorBeforeRotate, IEditorBeforeScale, IEditorBeforeSelect, IEditorBeforeSkew, IEditorConfig, IEditorConfigFunction, IEditorDragStartData, IEditorEditInnerData, IEditorEditOuterData, IEditorMoveData, IEditorRotationData, IEditorScaleData, IEditorSelectData, IEditorSkewData, IEffect, IEffectAttrData, IEffectComputedData, IEffectInputData, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IFill, IFilterFunction, IFilterModule, IFilterProcessor, IFindUIMethod, IFlow, IFlowData, IFlowInputData, IFontWeight, IFontWeightNumer, IFontWeightString, IFrame, IFrameData, IFrameInputData, IFrameRenderModule, IGIF, IGIFData, IGIFInputData, IGradientPaint, IGradientType, IGrayscaleEffect, IGroup, IGroupData, IGroupInputData, IGroupRenderModule, IImage, IImageData, IImageFilters, IImageInputData, IImagePaint, IImagePaintMode, IImageRenderModule, IKeyframe, IKeyframeId, IKeyframesAnimation, ILeafFill, ILeafPaint, ILeafPaintColor, ILeafPaintPatternData, ILeafShadowEffect, ILeafStrokePaint, ILeafer, ILeaferData, ILeaferInputData, ILine, ILineData, ILineInputData, IOverflow, IPaint, IPaintAttr, IPaintBase, IPaintGradientModule, IPaintImageModule, IPaintModule, IPaintString, IPaintType, IPath, IPathArrowModule, IPathData, IPathDataArrow, IPathDataArrowMap, IPathDataArrowOffset, IPathInputData, IPen, IPenData, IPenInputData, IPercent, IPolygon, IPolygonData, IPolygonInputData, IRGB, IRGBA, IRect, IRectData, IRectInputData, IRectRenderModule, IRepeat, IRobot, IRobotActionName, IRobotActions, IRobotAnimation, IRobotComputedKeyframe, IRobotData, IRobotInputData, IRobotKeyframe, IScrollConfig, IScrollTheme, IScroller, IShadowEffect, IShadowString, ISolidPaint, IStar, IStarData, IStarInputData, IStateModule, IStateName, IStateStyle, IStates, IStroke, IStrokeAlign, IStrokeAttrData, IStrokeCap, IStrokeComputedData, IStrokeComputedStyle, IStrokeGradientPaint, IStrokeImagePaint, IStrokeInputData, IStrokeJoin, IStrokePaint, IStrokeSolidPaint, IStrokeStyle, IStrokeWidthString, IStyleAnimation, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDecorationData, ITextDecorationType, ITextDrawData, ITextInputData, ITextOverflow, ITextRenderModule, ITextRowData, ITextStyleAttrData, ITextStyleComputedData, ITextStyleInputData, ITextWordData, ITextWrap, ITransformTool, ITransitionFunction, ITransitionMap, ITransitionModule, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIJSONData, IUIRenderModule, IUITag, IVectorPath, IVerticalAlign, IVideo, IVideoData, IVideoInputData, IWritingMode };
|