@leafer-ui/interface 1.9.5 → 1.9.6
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/module/IEffect.ts +7 -1
- package/src/type/IComputedType.ts +6 -3
- package/src/type/IType.ts +7 -3
- package/types/index.d.ts +11 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.6",
|
|
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.6"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/module/IEffect.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ILeaferCanvas } from '@leafer/interface'
|
|
1
|
+
import { ILeaferCanvas, IBoundsData } from '@leafer/interface'
|
|
2
2
|
|
|
3
3
|
import { IUI } from '../IUI'
|
|
4
4
|
import { ICachedShape } from '../ICachedShape'
|
|
5
|
+
import { ILeafShadowEffect } from '../type/IComputedType'
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
export interface IEffectModule {
|
|
@@ -9,4 +10,9 @@ export interface IEffectModule {
|
|
|
9
10
|
innerShadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void
|
|
10
11
|
blur(ui: IUI, current: ILeaferCanvas, origin: ILeaferCanvas): void
|
|
11
12
|
backgroundBlur(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void
|
|
13
|
+
|
|
14
|
+
// shadow
|
|
15
|
+
getShadowSpread(ui: IUI, shadow: ILeafShadowEffect[]): number
|
|
16
|
+
isTransformShadow(shadow: ILeafShadowEffect): boolean
|
|
17
|
+
renderTransformShadow?(ui: IUI, current: ILeaferCanvas, fromCanvas: ILeaferCanvas, fromWorld: IBoundsData, shadow: ILeafShadowEffect): void
|
|
12
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBlendMode, ILeaferImage, IMatrixData, IPointData, IScaleFixed, ITaskItem } from '@leafer/interface'
|
|
1
|
+
import { IBlendMode, IDirection, ILeaferImage, IMatrixData, IPointData, IScaleFixed, ITaskItem } from '@leafer/interface'
|
|
2
2
|
|
|
3
3
|
import { IColorString } from './IStringType'
|
|
4
4
|
import { IStrokeAlign, IStrokeJoin, IStrokeCap, IImagePaintMode, IImageFilters } from './IType'
|
|
@@ -59,6 +59,9 @@ export interface ILeafShadowEffect {
|
|
|
59
59
|
box?: boolean
|
|
60
60
|
scaleFixed?: IScaleFixed
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
// 斜切、旋转阴影
|
|
63
|
+
skewX?: number
|
|
64
|
+
skewY?: number
|
|
65
|
+
rotation?: number
|
|
66
|
+
origin?: IDirection // 斜切、旋转原点方位,相对元素的box包围盒,默认为 bottom
|
|
64
67
|
}
|
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 } from '@leafer/interface'
|
|
1
|
+
import { IPointData, IPathCommandData, IWindingRule, IBlendMode, IExportFileType, IFourNumber, IAlign, IUnitPointData, IAxis, IAxisReverse, IFilter, IOptionSizeData, ISizeData, IGap, IPointGap, IScaleFixed, IDirection } from '@leafer/interface'
|
|
2
2
|
import { IColorString, IPaintString } from './IStringType'
|
|
3
3
|
import { IStrokeStyle } from '../ICommonAttr'
|
|
4
4
|
|
|
@@ -167,6 +167,7 @@ export type ITextDecorationType = 'none' | 'under' | 'delete' | 'under-delete'
|
|
|
167
167
|
export interface ITextDecorationData {
|
|
168
168
|
type: ITextDecorationType
|
|
169
169
|
color: IColor
|
|
170
|
+
offset?: number
|
|
170
171
|
}
|
|
171
172
|
|
|
172
173
|
export type ITextWrap = 'normal' | 'none' | 'break'
|
|
@@ -190,8 +191,11 @@ export interface IShadowEffect {
|
|
|
190
191
|
box?: boolean
|
|
191
192
|
scaleFixed?: IScaleFixed
|
|
192
193
|
|
|
193
|
-
|
|
194
|
-
|
|
194
|
+
// 斜切、旋转阴影
|
|
195
|
+
skewX?: number
|
|
196
|
+
skewY?: number
|
|
197
|
+
rotation?: number
|
|
198
|
+
origin?: IDirection // 斜切、旋转原点方位,相对元素的box包围盒,默认为 bottom
|
|
195
199
|
}
|
|
196
200
|
|
|
197
201
|
export interface IBlurEffect {
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBlendMode, IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, IOptionSizeData, ISizeData, IGap, IPointGap, IScaleFixed, IPathCommandData, IAxis, IAxisReverse, 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, IBooleanMap, IMatrixWithBoundsScaleData } from '@leafer/interface';
|
|
1
|
+
import { IBlendMode, IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, IOptionSizeData, ISizeData, IGap, IPointGap, IScaleFixed, 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, IBooleanMap, 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, IRect as IRect$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
|
|
|
@@ -126,6 +126,7 @@ type ITextDecorationType = 'none' | 'under' | 'delete' | 'under-delete';
|
|
|
126
126
|
interface ITextDecorationData {
|
|
127
127
|
type: ITextDecorationType;
|
|
128
128
|
color: IColor;
|
|
129
|
+
offset?: number;
|
|
129
130
|
}
|
|
130
131
|
type ITextWrap = 'normal' | 'none' | 'break';
|
|
131
132
|
type IWritingMode = IAxis | IAxisReverse;
|
|
@@ -143,8 +144,10 @@ interface IShadowEffect {
|
|
|
143
144
|
visible?: boolean;
|
|
144
145
|
box?: boolean;
|
|
145
146
|
scaleFixed?: IScaleFixed;
|
|
146
|
-
|
|
147
|
+
skewX?: number;
|
|
148
|
+
skewY?: number;
|
|
147
149
|
rotation?: number;
|
|
150
|
+
origin?: IDirection;
|
|
148
151
|
}
|
|
149
152
|
interface IBlurEffect {
|
|
150
153
|
blur: number;
|
|
@@ -207,8 +210,10 @@ interface ILeafShadowEffect {
|
|
|
207
210
|
blendMode?: IBlendMode;
|
|
208
211
|
box?: boolean;
|
|
209
212
|
scaleFixed?: IScaleFixed;
|
|
210
|
-
|
|
213
|
+
skewX?: number;
|
|
214
|
+
skewY?: number;
|
|
211
215
|
rotation?: number;
|
|
216
|
+
origin?: IDirection;
|
|
212
217
|
}
|
|
213
218
|
|
|
214
219
|
interface ICornerRadiusAttrData {
|
|
@@ -1241,6 +1246,9 @@ interface IEffectModule {
|
|
|
1241
1246
|
innerShadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void;
|
|
1242
1247
|
blur(ui: IUI, current: ILeaferCanvas, origin: ILeaferCanvas): void;
|
|
1243
1248
|
backgroundBlur(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void;
|
|
1249
|
+
getShadowSpread(ui: IUI, shadow: ILeafShadowEffect[]): number;
|
|
1250
|
+
isTransformShadow(shadow: ILeafShadowEffect): boolean;
|
|
1251
|
+
renderTransformShadow?(ui: IUI, current: ILeaferCanvas, fromCanvas: ILeaferCanvas, fromWorld: IBoundsData, shadow: ILeafShadowEffect): void;
|
|
1244
1252
|
}
|
|
1245
1253
|
|
|
1246
1254
|
interface IFilterModule {
|