@leafer-ui/interface 2.0.8 → 2.0.9
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 +4 -1
- package/src/module/IPaint.ts +1 -0
- package/types/index.d.ts +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
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.9"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/ICommonAttr.ts
CHANGED
|
@@ -130,8 +130,8 @@ export interface ITextStyleComputedData {
|
|
|
130
130
|
italic?: boolean
|
|
131
131
|
textCase?: ITextCase
|
|
132
132
|
textDecoration?: ITextDecoration
|
|
133
|
-
letterSpacing?: number
|
|
134
|
-
lineHeight?: number
|
|
133
|
+
letterSpacing?: number | IUnitData
|
|
134
|
+
lineHeight?: number | IUnitData
|
|
135
135
|
|
|
136
136
|
paraIndent?: number
|
|
137
137
|
paraSpacing?: 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, IDirection4, IOptionPointData, IDirection } 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, IPathCommandDataWithWindingRule } from '@leafer/interface'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
IFillAttrData, IFillInputData, IFillComputedData,
|
|
@@ -129,6 +129,7 @@ export interface IPolygon extends IPolygonAttrData, IUI {
|
|
|
129
129
|
}
|
|
130
130
|
interface IPolygonAttrData {
|
|
131
131
|
sides?: number
|
|
132
|
+
startAngle?: number
|
|
132
133
|
points?: number[] | IPointData[]
|
|
133
134
|
curve?: boolean | number
|
|
134
135
|
}
|
|
@@ -143,6 +144,7 @@ export interface IStar extends IStarAttrData, IUI {
|
|
|
143
144
|
interface IStarAttrData {
|
|
144
145
|
corners?: number
|
|
145
146
|
innerRadius?: number
|
|
147
|
+
startAngle?: number
|
|
146
148
|
}
|
|
147
149
|
|
|
148
150
|
export interface IStarData extends IStarAttrData, IUIData { }
|
|
@@ -619,6 +621,7 @@ export interface IUIData extends IUIAttrData, IUIComputedData, ILeafData {
|
|
|
619
621
|
__blendLayer?: boolean
|
|
620
622
|
|
|
621
623
|
__boxStroke?: boolean // box闭合描边,可不用计算miterLimit造成的渲染包围盒变化
|
|
624
|
+
__pathForStroke?: IPathCommandDataWithWindingRule // 笔触的填充路径,一般用于多个strokeWidth的矩形
|
|
622
625
|
|
|
623
626
|
// text
|
|
624
627
|
__font?: string
|
package/src/module/IPaint.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface IPaintModule {
|
|
|
18
18
|
stroke(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
|
|
19
19
|
strokes(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
|
|
20
20
|
|
|
21
|
+
fillStroke?(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
|
|
21
22
|
strokeText(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
|
|
22
23
|
strokeArrow?(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
|
|
23
24
|
drawStrokesStyle(strokes: ILeafStrokePaint[], strokeWidthScale: number, isText: boolean, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
|
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, 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';
|
|
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, IPathCommandDataWithWindingRule, 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
|
|
|
@@ -321,8 +321,8 @@ interface ITextStyleComputedData {
|
|
|
321
321
|
italic?: boolean;
|
|
322
322
|
textCase?: ITextCase;
|
|
323
323
|
textDecoration?: ITextDecoration;
|
|
324
|
-
letterSpacing?: number;
|
|
325
|
-
lineHeight?: number;
|
|
324
|
+
letterSpacing?: number | IUnitData;
|
|
325
|
+
lineHeight?: number | IUnitData;
|
|
326
326
|
paraIndent?: number;
|
|
327
327
|
paraSpacing?: number;
|
|
328
328
|
writingMode?: IWritingMode;
|
|
@@ -792,6 +792,7 @@ interface IPolygon extends IPolygonAttrData, IUI {
|
|
|
792
792
|
}
|
|
793
793
|
interface IPolygonAttrData {
|
|
794
794
|
sides?: number;
|
|
795
|
+
startAngle?: number;
|
|
795
796
|
points?: number[] | IPointData[];
|
|
796
797
|
curve?: boolean | number;
|
|
797
798
|
}
|
|
@@ -805,6 +806,7 @@ interface IStar extends IStarAttrData, IUI {
|
|
|
805
806
|
interface IStarAttrData {
|
|
806
807
|
corners?: number;
|
|
807
808
|
innerRadius?: number;
|
|
809
|
+
startAngle?: number;
|
|
808
810
|
}
|
|
809
811
|
interface IStarData extends IStarAttrData, IUIData {
|
|
810
812
|
}
|
|
@@ -1176,6 +1178,7 @@ interface IUIData extends IUIAttrData, IUIComputedData, ILeafData {
|
|
|
1176
1178
|
readonly __hasSurface?: boolean;
|
|
1177
1179
|
__blendLayer?: boolean;
|
|
1178
1180
|
__boxStroke?: boolean;
|
|
1181
|
+
__pathForStroke?: IPathCommandDataWithWindingRule;
|
|
1179
1182
|
__font?: string;
|
|
1180
1183
|
__textDrawData?: ITextDrawData;
|
|
1181
1184
|
__needComputePaint?: boolean;
|
|
@@ -1330,6 +1333,7 @@ interface IPaintModule {
|
|
|
1330
1333
|
fillText(ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
|
|
1331
1334
|
stroke(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
|
|
1332
1335
|
strokes(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
|
|
1336
|
+
fillStroke?(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
|
|
1333
1337
|
strokeText(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
|
|
1334
1338
|
strokeArrow?(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
|
|
1335
1339
|
drawStrokesStyle(strokes: ILeafStrokePaint[], strokeWidthScale: number, isText: boolean, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
|