@leafer-ui/interface 2.0.2 → 2.0.3
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 +2 -2
- package/src/IUI.ts +34 -6
- package/src/index.ts +2 -2
- package/src/module/IPaint.ts +5 -1
- package/src/module/IPathArrow.ts +4 -2
- package/src/type/IType.ts +21 -9
- package/types/index.d.ts +43 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
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": "2.0.
|
|
25
|
+
"@leafer/interface": "2.0.3"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/ICommonAttr.ts
CHANGED
|
@@ -53,7 +53,7 @@ export interface IStrokeInputData extends IStrokeStyle {
|
|
|
53
53
|
export interface IStrokeStyle {
|
|
54
54
|
strokeAlign?: IStrokeAlign
|
|
55
55
|
strokeWidth?: IFourNumber | IStrokeWidthString
|
|
56
|
-
|
|
56
|
+
strokeScaleFixed?: IScaleFixed
|
|
57
57
|
strokeCap?: IStrokeCap
|
|
58
58
|
strokeJoin?: IStrokeJoin
|
|
59
59
|
dashPattern?: INumber[] | IDashPatternString
|
|
@@ -72,7 +72,7 @@ export interface IStrokeComputedStyle {
|
|
|
72
72
|
strokeAlign?: IStrokeAlign
|
|
73
73
|
strokeWidth?: number
|
|
74
74
|
strokeWidths?: number[]
|
|
75
|
-
|
|
75
|
+
strokeScaleFixed?: IScaleFixed
|
|
76
76
|
strokeCap?: IStrokeCap
|
|
77
77
|
strokeJoin?: IStrokeJoin
|
|
78
78
|
dashPattern?: number[]
|
package/src/IUI.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILeaf, ILeafComputedData, ILeafData, ILeafInputData, ILeaferCanvas, IRenderOptions, IExportOptions, IExportResult, IPathDrawer, IPointData, IPathCommandData, IBoundsData, IObject, IPathString, ILeaferImage, IPathCreator, IAnswer, IPickOptions, IPickResult, IValue, ICanvasContext2DSettings, IFourNumber, IFindCondition, IBoolean, ICanvasContext2D, IJSONOptions, IMatrixData, ISizeData, ITransition, IAround, IMultimediaType } from '@leafer/interface'
|
|
1
|
+
import { ILeaf, ILeafComputedData, ILeafData, ILeafInputData, ILeaferCanvas, IRenderOptions, IExportOptions, IExportResult, IPathDrawer, IPointData, IPathCommandData, IBoundsData, IObject, IPathString, ILeaferImage, IPathCreator, IAnswer, IPickOptions, IPickResult, IValue, ICanvasContext2DSettings, IFourNumber, IFindCondition, IBoolean, ICanvasContext2D, IJSONOptions, IMatrixData, ISizeData, ITransition, IAround, IMultimediaType, IDirection4, IOptionPointData, IDirection } from '@leafer/interface'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
IFillAttrData, IFillInputData, IFillComputedData,
|
|
@@ -44,21 +44,43 @@ export interface IArrowInputData extends IArrowAttrData, ILineInputData { }
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
// Linker
|
|
47
|
-
export interface ILinker extends
|
|
47
|
+
export interface ILinker extends ILine {
|
|
48
48
|
__: ILinkerData
|
|
49
|
+
|
|
50
|
+
startNode: IUI
|
|
51
|
+
endNode: IUI
|
|
52
|
+
|
|
53
|
+
startData: ILinkerComputedPointData
|
|
54
|
+
endData: ILinkerComputedPointData
|
|
55
|
+
|
|
56
|
+
createLinkerPoint(worldPoint: IPointData, node: IUI, options?: ILinkerPointOptions): ILinkerPointData
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
export interface ILinkerPointData {
|
|
52
|
-
id
|
|
60
|
+
id?: string | IUI,
|
|
61
|
+
direction?: IDirection4 | 'center'
|
|
53
62
|
point?: IAround,
|
|
63
|
+
offset?: IOptionPointData
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ILinkerPointOptions {
|
|
67
|
+
snapRadius?: number
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export type ILinkerPointType = 'start' | 'end'
|
|
71
|
+
|
|
72
|
+
export interface ILinkerComputedPointData {
|
|
73
|
+
auto: boolean
|
|
74
|
+
direction: IDirection
|
|
75
|
+
point: IPointData
|
|
54
76
|
}
|
|
55
77
|
|
|
56
78
|
interface ILinkerAttrData {
|
|
57
79
|
startPoint?: ILinkerPointData | IUI | string
|
|
58
80
|
endPoint?: ILinkerPointData | IUI | string
|
|
59
81
|
}
|
|
60
|
-
export interface ILinkerData extends ILinkerAttrData,
|
|
61
|
-
export interface ILinkerInputData extends ILinkerAttrData,
|
|
82
|
+
export interface ILinkerData extends ILinkerAttrData, ILineData { }
|
|
83
|
+
export interface ILinkerInputData extends ILinkerAttrData, ILineInputData { }
|
|
62
84
|
|
|
63
85
|
|
|
64
86
|
// Flow
|
|
@@ -257,6 +279,7 @@ export interface ICanvasInputData extends ICanvasAttrData, IUIBaseInputData { }
|
|
|
257
279
|
// Film
|
|
258
280
|
export interface IFilm extends IFilmAttrData, IPlayerMethods, IImage {
|
|
259
281
|
__: IFilmData
|
|
282
|
+
seekFrame(frameIndex: number): void
|
|
260
283
|
}
|
|
261
284
|
interface IFilmAttrData {
|
|
262
285
|
url?: string
|
|
@@ -424,6 +447,9 @@ export interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICorne
|
|
|
424
447
|
|
|
425
448
|
children?: IUI[]
|
|
426
449
|
|
|
450
|
+
startLinker?: ILinker[]
|
|
451
|
+
endLinker?: ILinker[]
|
|
452
|
+
|
|
427
453
|
__box?: IUI // 背景box, 一般用于文本背景框
|
|
428
454
|
__animate?: IAnimate
|
|
429
455
|
|
|
@@ -446,6 +472,7 @@ export interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICorne
|
|
|
446
472
|
|
|
447
473
|
getPath(curve?: boolean, pathForRender?: boolean): IPathCommandData
|
|
448
474
|
getPathString(curve?: boolean, pathForRender?: boolean): IPathString
|
|
475
|
+
asPath(curve?: boolean, pathForRender?: boolean): void
|
|
449
476
|
|
|
450
477
|
load(): void
|
|
451
478
|
|
|
@@ -514,8 +541,9 @@ export interface IUIData extends IUIAttrData, IUIComputedData, ILeafData {
|
|
|
514
541
|
__isFills?: boolean
|
|
515
542
|
__isStrokes?: boolean
|
|
516
543
|
|
|
517
|
-
readonly __strokeWidth: number // 会受
|
|
544
|
+
readonly __strokeWidth: number // 会受 strokeScaleFixed 影响
|
|
518
545
|
readonly __maxStrokeWidth: number
|
|
546
|
+
__strokeWidthCache?: number // 一般用于固定线宽的箭头做缓存对比
|
|
519
547
|
__hasMultiStrokeStyle?: number // 是否存在多个不同的描述样式(同时存储多个描边样式中的最大宽度用于运算)
|
|
520
548
|
readonly __hasMultiPaint?: boolean
|
|
521
549
|
|
package/src/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { ILeafer } from './app/ILeafer'
|
|
|
6
6
|
export {
|
|
7
7
|
ILine, ILineInputData, ILineData,
|
|
8
8
|
IArrow, IArrowInputData, IArrowData,
|
|
9
|
-
ILinker, ILinkerInputData, ILinkerData, ILinkerPointData,
|
|
9
|
+
ILinker, ILinkerInputData, ILinkerData, ILinkerPointData, ILinkerPointOptions, ILinkerComputedPointData, ILinkerPointType,
|
|
10
10
|
IRect, IRectInputData, IRectData,
|
|
11
11
|
IEllipse, IEllipseInputData, IEllipseData,
|
|
12
12
|
IPolygon, IPolygonInputData, IPolygonData,
|
|
@@ -29,7 +29,7 @@ export {
|
|
|
29
29
|
IUITag, IUIInputData, IUIJSONData, IStateStyle, IStates, IStateName
|
|
30
30
|
} from './IUI'
|
|
31
31
|
|
|
32
|
-
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
|
+
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, IImageFilter, IImageFilterType, IPathDataArrowOffset, ISolidPaint, IPaintBase } from './type/IType'
|
|
33
33
|
export { ICornerRadiusString, IStrokeWidthString, IPaintString, IShadowString, IPercent, IDashPatternString, IColorString } from './type/IStringType'
|
|
34
34
|
export { ILeafFill, ILeafPaint, ILeafPaintPatternData, ILeafPaintColor, ILeafStrokePaint, ILeafShadowEffect } from './type/IComputedType'
|
|
35
35
|
export { IStrokeAttrData, IStrokeInputData, IStrokeComputedData, IStrokeComputedStyle, IStrokeStyle, ITextStyleAttrData, ITextStyleInputData, ITextStyleComputedData, IEffectAttrData, IEffectInputData, IEffectComputedData } from './ICommonAttr'
|
package/src/module/IPaint.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ILeaferCanvas, IRenderOptions, IBooleanMap, IBoundsData, ILeaferImage,
|
|
|
3
3
|
import { ILeafPaint, ILeafStrokePaint, ILeafPaintPatternData } from '../type/IComputedType'
|
|
4
4
|
import { IUI, IUIData } from '../IUI'
|
|
5
5
|
import { ICachedShape } from '../ICachedShape'
|
|
6
|
-
import { IGradientPaint, IImagePaint, IPaintAttr } from '../type/IType'
|
|
6
|
+
import { IGradientPaint, IImageFilters, IImagePaint, IPaintAttr } from '../type/IType'
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
export interface IPaintModule {
|
|
@@ -45,6 +45,10 @@ export interface IPaintImageModule {
|
|
|
45
45
|
createData(leafPaint: ILeafPaint, image: ILeaferImage, paint: IImagePaint, box: IBoundsData): void
|
|
46
46
|
getPatternData(paint: IImagePaint, box: IBoundsData, image: ILeaferImage): ILeafPaintPatternData
|
|
47
47
|
|
|
48
|
+
//@leafer-in/image-filter will rewrite
|
|
49
|
+
applyFilter?(leafPaint: ILeafPaint, image: ILeaferImage, filter: IImageFilters, ui: IUI): void
|
|
50
|
+
recycleFilter?(image: ILeaferImage, ui: IUI): void
|
|
51
|
+
|
|
48
52
|
stretchMode(data: ILeafPaintPatternData, box: IBoundsData, scaleX: number, scaleY: number): void
|
|
49
53
|
fillOrFitMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void
|
|
50
54
|
clipMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number, skew: IPointData, clipScaleX?: number, clipScaleY?: number): void
|
package/src/module/IPathArrow.ts
CHANGED
|
@@ -4,7 +4,9 @@ import { IUI } from '../IUI'
|
|
|
4
4
|
|
|
5
5
|
export interface IPathArrowModule {
|
|
6
6
|
list: IPathDataArrowMap
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
fillList: IPathDataArrowMap
|
|
8
|
+
addArrows(ui: IUI, updateCache?: boolean): void
|
|
9
|
+
updateArrow(ui: IUI): void
|
|
10
|
+
register(name: string, data: IPathDataArrow, fillData?: IPathDataArrow): void
|
|
9
11
|
get(name: string): IPathDataArrow
|
|
10
12
|
}
|
package/src/type/IType.ts
CHANGED
|
@@ -79,7 +79,7 @@ export interface IImagePaint extends IPaintBase, IFilmOptions {
|
|
|
79
79
|
mode?: IImagePaintMode
|
|
80
80
|
format?: IExportFileType
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
filter?: IImageFilters
|
|
83
83
|
|
|
84
84
|
padding?: IFourNumber
|
|
85
85
|
|
|
@@ -105,15 +105,25 @@ export interface IImagePaint extends IPaintBase, IFilmOptions {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
export interface IStrokeImagePaint extends IImagePaint { }
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
108
|
+
|
|
109
|
+
export type IImageFilterType =
|
|
110
|
+
| 'exposure' // 曝光
|
|
111
|
+
| 'contrast' // 对比度
|
|
112
|
+
| 'saturation' // 饱和度
|
|
113
|
+
| 'temperature' // 色温
|
|
114
|
+
| 'tint' // 色调
|
|
115
|
+
| 'highlights' // 高光
|
|
116
|
+
| 'shadows' // 阴影
|
|
117
|
+
| (string & {})
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
export interface IImageFilter {
|
|
121
|
+
type: IImageFilterType
|
|
122
|
+
value: number // -1 ~ 1
|
|
116
123
|
}
|
|
124
|
+
|
|
125
|
+
export type IImageFilters = IImageFilter[]
|
|
126
|
+
|
|
117
127
|
export type IImagePaintMode = 'normal' | 'cover' | 'fit' | 'stretch' | 'clip' | 'repeat'
|
|
118
128
|
export type IRepeat = boolean | 'x' | 'y' | IPointData
|
|
119
129
|
|
|
@@ -129,6 +139,7 @@ export type IArrowStyle = IPathDataArrow | IArrowType | IArrowTypeData
|
|
|
129
139
|
export interface IArrowTypeData {
|
|
130
140
|
type: IArrowType
|
|
131
141
|
scale?: number
|
|
142
|
+
rotation?: number
|
|
132
143
|
}
|
|
133
144
|
|
|
134
145
|
export interface IPathDataArrowMap {
|
|
@@ -140,6 +151,7 @@ export interface IPathDataArrow {
|
|
|
140
151
|
offset?: IPathDataArrowOffset // 箭头偏移距离,与末端对齐
|
|
141
152
|
path: IPathCommandData
|
|
142
153
|
dashPath?: IPathCommandData // 采用虚线时,需增加填充的内容
|
|
154
|
+
fill?: boolean // 是否进行fill,性能会差一点
|
|
143
155
|
}
|
|
144
156
|
|
|
145
157
|
export interface IPathDataArrowOffset {
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IMultimediaType, IBlendMode, IScaleFixed, IAlign, IUnitPointData, IFilmOptions, IImageLOD, IExportFileType, IFourNumber, IPointData, IOptionSizeData, ISizeData, IGap, IPointGap, IPercentData, IInterlace, IPathCommandData, IAxis, IAxisReverse, IDirection, IWindingRule, IFilter, IFilmPlayOptions, 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,
|
|
1
|
+
import { IMultimediaType, IBlendMode, IScaleFixed, IAlign, IUnitPointData, IFilmOptions, IImageLOD, IExportFileType, IFourNumber, IPointData, IOptionSizeData, ISizeData, IGap, IPointGap, IPercentData, IInterlace, IPathCommandData, IAxis, IAxisReverse, IDirection, IWindingRule, IFilter, IFilmPlayOptions, 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, IDirection4 as IDirection4$1, IAround, IOptionPointData, 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
|
|
|
@@ -65,7 +65,7 @@ interface IImagePaint extends IPaintBase, IFilmOptions {
|
|
|
65
65
|
lod?: IImageLOD;
|
|
66
66
|
mode?: IImagePaintMode;
|
|
67
67
|
format?: IExportFileType;
|
|
68
|
-
|
|
68
|
+
filter?: IImageFilters;
|
|
69
69
|
padding?: IFourNumber;
|
|
70
70
|
align?: IAlign;
|
|
71
71
|
offset?: IPointData;
|
|
@@ -84,15 +84,12 @@ interface IImagePaint extends IPaintBase, IFilmOptions {
|
|
|
84
84
|
}
|
|
85
85
|
interface IStrokeImagePaint extends IImagePaint {
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
temperature?: number;
|
|
92
|
-
tint?: number;
|
|
93
|
-
highlights?: number;
|
|
94
|
-
shadows?: number;
|
|
87
|
+
type IImageFilterType = 'exposure' | 'contrast' | 'saturation' | 'temperature' | 'tint' | 'highlights' | 'shadows' | (string & {});
|
|
88
|
+
interface IImageFilter {
|
|
89
|
+
type: IImageFilterType;
|
|
90
|
+
value: number;
|
|
95
91
|
}
|
|
92
|
+
type IImageFilters = IImageFilter[];
|
|
96
93
|
type IImagePaintMode = 'normal' | 'cover' | 'fit' | 'stretch' | 'clip' | 'repeat';
|
|
97
94
|
type IRepeat = boolean | 'x' | 'y' | IPointData;
|
|
98
95
|
type IStrokeAlign = 'inside' | 'outside' | 'center';
|
|
@@ -103,6 +100,7 @@ type IArrowStyle = IPathDataArrow | IArrowType | IArrowTypeData;
|
|
|
103
100
|
interface IArrowTypeData {
|
|
104
101
|
type: IArrowType;
|
|
105
102
|
scale?: number;
|
|
103
|
+
rotation?: number;
|
|
106
104
|
}
|
|
107
105
|
interface IPathDataArrowMap {
|
|
108
106
|
[name: string]: IPathDataArrow;
|
|
@@ -112,6 +110,7 @@ interface IPathDataArrow {
|
|
|
112
110
|
offset?: IPathDataArrowOffset;
|
|
113
111
|
path: IPathCommandData;
|
|
114
112
|
dashPath?: IPathCommandData;
|
|
113
|
+
fill?: boolean;
|
|
115
114
|
}
|
|
116
115
|
interface IPathDataArrowOffset {
|
|
117
116
|
x?: number;
|
|
@@ -255,7 +254,7 @@ interface IStrokeInputData extends IStrokeStyle {
|
|
|
255
254
|
interface IStrokeStyle {
|
|
256
255
|
strokeAlign?: IStrokeAlign;
|
|
257
256
|
strokeWidth?: IFourNumber | IStrokeWidthString;
|
|
258
|
-
|
|
257
|
+
strokeScaleFixed?: IScaleFixed;
|
|
259
258
|
strokeCap?: IStrokeCap;
|
|
260
259
|
strokeJoin?: IStrokeJoin;
|
|
261
260
|
dashPattern?: INumber[] | IDashPatternString;
|
|
@@ -271,7 +270,7 @@ interface IStrokeComputedStyle {
|
|
|
271
270
|
strokeAlign?: IStrokeAlign;
|
|
272
271
|
strokeWidth?: number;
|
|
273
272
|
strokeWidths?: number[];
|
|
274
|
-
|
|
273
|
+
strokeScaleFixed?: IScaleFixed;
|
|
275
274
|
strokeCap?: IStrokeCap;
|
|
276
275
|
strokeJoin?: IStrokeJoin;
|
|
277
276
|
dashPattern?: number[];
|
|
@@ -717,20 +716,36 @@ interface IArrowData extends IArrowAttrData, ILineData {
|
|
|
717
716
|
}
|
|
718
717
|
interface IArrowInputData extends IArrowAttrData, ILineInputData {
|
|
719
718
|
}
|
|
720
|
-
interface ILinker extends
|
|
719
|
+
interface ILinker extends ILine {
|
|
721
720
|
__: ILinkerData;
|
|
721
|
+
startNode: IUI;
|
|
722
|
+
endNode: IUI;
|
|
723
|
+
startData: ILinkerComputedPointData;
|
|
724
|
+
endData: ILinkerComputedPointData;
|
|
725
|
+
createLinkerPoint(worldPoint: IPointData, node: IUI, options?: ILinkerPointOptions): ILinkerPointData;
|
|
722
726
|
}
|
|
723
727
|
interface ILinkerPointData {
|
|
724
|
-
id
|
|
728
|
+
id?: string | IUI;
|
|
729
|
+
direction?: IDirection4$1 | 'center';
|
|
725
730
|
point?: IAround;
|
|
731
|
+
offset?: IOptionPointData;
|
|
732
|
+
}
|
|
733
|
+
interface ILinkerPointOptions {
|
|
734
|
+
snapRadius?: number;
|
|
735
|
+
}
|
|
736
|
+
type ILinkerPointType = 'start' | 'end';
|
|
737
|
+
interface ILinkerComputedPointData {
|
|
738
|
+
auto: boolean;
|
|
739
|
+
direction: IDirection;
|
|
740
|
+
point: IPointData;
|
|
726
741
|
}
|
|
727
742
|
interface ILinkerAttrData {
|
|
728
743
|
startPoint?: ILinkerPointData | IUI | string;
|
|
729
744
|
endPoint?: ILinkerPointData | IUI | string;
|
|
730
745
|
}
|
|
731
|
-
interface ILinkerData extends ILinkerAttrData,
|
|
746
|
+
interface ILinkerData extends ILinkerAttrData, ILineData {
|
|
732
747
|
}
|
|
733
|
-
interface ILinkerInputData extends ILinkerAttrData,
|
|
748
|
+
interface ILinkerInputData extends ILinkerAttrData, ILineInputData {
|
|
734
749
|
}
|
|
735
750
|
interface IFlow extends IBox {
|
|
736
751
|
__: IFlowData;
|
|
@@ -900,6 +915,7 @@ interface ICanvasInputData extends ICanvasAttrData, IUIBaseInputData {
|
|
|
900
915
|
}
|
|
901
916
|
interface IFilm extends IFilmAttrData, IPlayerMethods, IImage {
|
|
902
917
|
__: IFilmData;
|
|
918
|
+
seekFrame(frameIndex: number): void;
|
|
903
919
|
}
|
|
904
920
|
interface IFilmAttrData {
|
|
905
921
|
url?: string;
|
|
@@ -1028,6 +1044,8 @@ interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICornerRadius
|
|
|
1028
1044
|
animation?: IAnimation | IAnimation[];
|
|
1029
1045
|
animationOut?: IAnimation | IAnimation[];
|
|
1030
1046
|
children?: IUI[];
|
|
1047
|
+
startLinker?: ILinker[];
|
|
1048
|
+
endLinker?: ILinker[];
|
|
1031
1049
|
__box?: IUI;
|
|
1032
1050
|
__animate?: IAnimate;
|
|
1033
1051
|
readonly pen: IPathCreator;
|
|
@@ -1043,6 +1061,7 @@ interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICornerRadius
|
|
|
1043
1061
|
findId(id: number | string): IUI | undefined;
|
|
1044
1062
|
getPath(curve?: boolean, pathForRender?: boolean): IPathCommandData;
|
|
1045
1063
|
getPathString(curve?: boolean, pathForRender?: boolean): IPathString;
|
|
1064
|
+
asPath(curve?: boolean, pathForRender?: boolean): void;
|
|
1046
1065
|
load(): void;
|
|
1047
1066
|
__drawPathByData(drawer: IPathDrawer, data: IPathCommandData, ignoreCornerRadius?: boolean): void;
|
|
1048
1067
|
__drawPathByBox(drawer: IPathDrawer, ignoreCornerRadius?: boolean): void;
|
|
@@ -1089,6 +1108,7 @@ interface IUIData extends IUIAttrData, IUIComputedData, ILeafData {
|
|
|
1089
1108
|
__isStrokes?: boolean;
|
|
1090
1109
|
readonly __strokeWidth: number;
|
|
1091
1110
|
readonly __maxStrokeWidth: number;
|
|
1111
|
+
__strokeWidthCache?: number;
|
|
1092
1112
|
__hasMultiStrokeStyle?: number;
|
|
1093
1113
|
readonly __hasMultiPaint?: boolean;
|
|
1094
1114
|
__isAlphaPixelFill?: boolean;
|
|
@@ -1184,8 +1204,10 @@ type IUIHitModule = ILeafHit & ThisType<IUI>;
|
|
|
1184
1204
|
|
|
1185
1205
|
interface IPathArrowModule {
|
|
1186
1206
|
list: IPathDataArrowMap;
|
|
1187
|
-
|
|
1188
|
-
|
|
1207
|
+
fillList: IPathDataArrowMap;
|
|
1208
|
+
addArrows(ui: IUI, updateCache?: boolean): void;
|
|
1209
|
+
updateArrow(ui: IUI): void;
|
|
1210
|
+
register(name: string, data: IPathDataArrow, fillData?: IPathDataArrow): void;
|
|
1189
1211
|
get(name: string): IPathDataArrow;
|
|
1190
1212
|
}
|
|
1191
1213
|
|
|
@@ -1275,6 +1297,8 @@ interface IPaintImageModule {
|
|
|
1275
1297
|
getPatternFixScale(paint: ILeafPaint, imageScaleX: number, imageScaleY: number): number;
|
|
1276
1298
|
createData(leafPaint: ILeafPaint, image: ILeaferImage, paint: IImagePaint, box: IBoundsData): void;
|
|
1277
1299
|
getPatternData(paint: IImagePaint, box: IBoundsData, image: ILeaferImage): ILeafPaintPatternData;
|
|
1300
|
+
applyFilter?(leafPaint: ILeafPaint, image: ILeaferImage, filter: IImageFilters, ui: IUI): void;
|
|
1301
|
+
recycleFilter?(image: ILeaferImage, ui: IUI): void;
|
|
1278
1302
|
stretchMode(data: ILeafPaintPatternData, box: IBoundsData, scaleX: number, scaleY: number): void;
|
|
1279
1303
|
fillOrFitMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void;
|
|
1280
1304
|
clipMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number, skew: IPointData, clipScaleX?: number, clipScaleY?: number): void;
|
|
@@ -1315,4 +1339,4 @@ interface IFilterFunction {
|
|
|
1315
1339
|
(filter: IFilter, ui: IUI, bounds: IMatrixWithBoundsScaleData, currentCanvas: ILeaferCanvas, originCanvas: ILeaferCanvas, shape: ICachedShape): void;
|
|
1316
1340
|
}
|
|
1317
1341
|
|
|
1318
|
-
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, IFilm, IFilmData, IFilmInputData, IFilterFunction, IFilterModule, IFilterProcessor, IFindUIMethod, IFlow, IFlowData, IFlowInputData, IFontWeight, IFontWeightNumer, IFontWeightString, IFrame, IFrameData, IFrameInputData, IFrameRenderModule, 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, ILinker, ILinkerData, ILinkerInputData, ILinkerPointData, 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 };
|
|
1342
|
+
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, IFilm, IFilmData, IFilmInputData, IFilterFunction, IFilterModule, IFilterProcessor, IFindUIMethod, IFlow, IFlowData, IFlowInputData, IFontWeight, IFontWeightNumer, IFontWeightString, IFrame, IFrameData, IFrameInputData, IFrameRenderModule, IGradientPaint, IGradientType, IGrayscaleEffect, IGroup, IGroupData, IGroupInputData, IGroupRenderModule, IImage, IImageData, IImageFilter, IImageFilterType, IImageFilters, IImageInputData, IImagePaint, IImagePaintMode, IImageRenderModule, IKeyframe, IKeyframeId, IKeyframesAnimation, ILeafFill, ILeafPaint, ILeafPaintColor, ILeafPaintPatternData, ILeafShadowEffect, ILeafStrokePaint, ILeafer, ILeaferData, ILeaferInputData, ILine, ILineData, ILineInputData, ILinker, ILinkerComputedPointData, ILinkerData, ILinkerInputData, ILinkerPointData, ILinkerPointOptions, ILinkerPointType, 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 };
|