@leafer-ui/interface 1.9.1 → 1.9.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 +4 -4
- package/src/IScroller.ts +46 -0
- package/src/IUI.ts +7 -3
- package/src/editor/IEditor.ts +21 -1
- package/src/index.ts +3 -2
- package/src/type/IType.ts +3 -1
- package/types/index.d.ts +58 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.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": "1.9.
|
|
25
|
+
"@leafer/interface": "1.9.3"
|
|
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,
|
|
2
|
+
import { IStrokeAlign, IStrokeCap, IStrokeJoin, IBlurEffect, IFontWeight, ITextCase, ITextDecoration, IShadowEffect, IGrayscaleEffect, ITextAlign, IVerticalAlign, ITextWrap, IStroke, IFill, IArrowType, 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
|
|
|
@@ -100,7 +100,7 @@ export interface ITextStyleAttrData {
|
|
|
100
100
|
autoSizeAlign?: IBoolean
|
|
101
101
|
|
|
102
102
|
textWrap?: ITextWrap
|
|
103
|
-
textOverflow?:
|
|
103
|
+
textOverflow?: ITextOverflow
|
|
104
104
|
}
|
|
105
105
|
export interface ITextStyleInputData {
|
|
106
106
|
fontFamily?: IString
|
|
@@ -121,7 +121,7 @@ export interface ITextStyleInputData {
|
|
|
121
121
|
autoSizeAlign?: IBoolean
|
|
122
122
|
|
|
123
123
|
textWrap?: ITextWrap
|
|
124
|
-
textOverflow?:
|
|
124
|
+
textOverflow?: ITextOverflow
|
|
125
125
|
}
|
|
126
126
|
export interface ITextStyleComputedData {
|
|
127
127
|
fontFamily?: string
|
|
@@ -142,7 +142,7 @@ export interface ITextStyleComputedData {
|
|
|
142
142
|
autoSizeAlign?: boolean // 自动宽高的文本,是否仍进行整体对齐操作
|
|
143
143
|
|
|
144
144
|
textWrap?: ITextWrap
|
|
145
|
-
textOverflow?:
|
|
145
|
+
textOverflow?: ITextOverflow
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
// effect---
|
package/src/IScroller.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { IScaleFixed, IBounds } from '@leafer/interface'
|
|
2
|
+
|
|
3
|
+
import { IBoxInputData, IGroup, IBox } from './IUI'
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export interface IScrollConfig {
|
|
7
|
+
theme?: IScrollTheme // 主题
|
|
8
|
+
style?: IBoxInputData // 滚动条样式
|
|
9
|
+
size?: number // 滚动条的size
|
|
10
|
+
cornerRadius?: number // 默认取size的一半
|
|
11
|
+
endsMargin?: number // 滚动条两端的间距
|
|
12
|
+
sideMargin?: number // 滚动条两侧的间距
|
|
13
|
+
minSize?: number // 最小显示size
|
|
14
|
+
scaleFixed?: IScaleFixed
|
|
15
|
+
scrollType?: 'drag' | 'move' | 'both' // 滚动类型
|
|
16
|
+
stopDefault?: boolean, // 阻止自身之外的默认滚动
|
|
17
|
+
hideOnActionEnd?: boolean | 'hover' | 'scroll' // 操作结束时自动隐藏
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type IScrollTheme = 'light' | 'dark' | (string & {})
|
|
21
|
+
|
|
22
|
+
export interface IScroller extends IGroup {
|
|
23
|
+
config: IScrollConfig
|
|
24
|
+
mergedConfig: IScrollConfig
|
|
25
|
+
|
|
26
|
+
// 滚动条
|
|
27
|
+
scrollXBar: IBox
|
|
28
|
+
scrollYBar: IBox
|
|
29
|
+
|
|
30
|
+
// 滚动范围
|
|
31
|
+
scrollXBounds: IBounds
|
|
32
|
+
scrollYBounds: IBounds
|
|
33
|
+
|
|
34
|
+
// 滚动区域 / 内容区域
|
|
35
|
+
scrollRatioX: number
|
|
36
|
+
scrollRatioY: number
|
|
37
|
+
|
|
38
|
+
// viewport 区域 / 内容区域
|
|
39
|
+
ratioX: number
|
|
40
|
+
ratioY: number
|
|
41
|
+
|
|
42
|
+
dragScrolling: boolean
|
|
43
|
+
|
|
44
|
+
updateConfig(): void
|
|
45
|
+
update(check: boolean): void
|
|
46
|
+
}
|
package/src/IUI.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { IAnimation, IAnimate, IKeyframe, IKeyframeId, IAnimateType } from './IA
|
|
|
14
14
|
import { ILeafer } from './app/ILeafer'
|
|
15
15
|
import { IEditorConfig } from './editor/IEditor'
|
|
16
16
|
import { IColorString } from './type/IStringType'
|
|
17
|
+
import { IScroller, IScrollConfig } from './IScroller'
|
|
17
18
|
|
|
18
19
|
// Line
|
|
19
20
|
export interface ILine extends ILineAttrData, IUI {
|
|
@@ -340,14 +341,17 @@ export interface IFrameInputData extends IBoxInputData {
|
|
|
340
341
|
// Box
|
|
341
342
|
export interface IBox extends IBoxAttrData, IGroup {
|
|
342
343
|
__: IBoxData
|
|
343
|
-
|
|
344
|
-
|
|
344
|
+
scroller?: IScroller
|
|
345
|
+
hasScroller?: boolean
|
|
346
|
+
__checkScroll(): void
|
|
347
|
+
__updateScroll(): void
|
|
345
348
|
__updateRectRenderBounds(): void
|
|
346
349
|
__renderGroup(canvas: ILeaferCanvas, options: IRenderOptions): void
|
|
347
350
|
}
|
|
348
351
|
|
|
349
352
|
interface IBoxAttrData {
|
|
350
353
|
overflow?: IOverflow
|
|
354
|
+
scrollConfig?: IScrollConfig
|
|
351
355
|
resizeChildren?: IBoolean
|
|
352
356
|
textBox?: IBoolean // 编辑器中,textBox双击会直接进入编辑文本状态,如便利贴文本
|
|
353
357
|
}
|
|
@@ -547,7 +551,7 @@ export type IUITag =
|
|
|
547
551
|
| 'Video'
|
|
548
552
|
|
|
549
553
|
|
|
550
|
-
export interface IUIInputData extends IRectInputData, IEllipseInputData, IPolygonInputData, IStarInputData, ILineInputData, IPathInputData, ITextInputData, IImageInputData, IGroupInputData, IFrameInputData, IArrowInputData, IGIFInputData, IVideoInputData, IRobotInputData, IUIBaseInputData, IObject {
|
|
554
|
+
export interface IUIInputData extends IRectInputData, IEllipseInputData, IPolygonInputData, IStarInputData, ILineInputData, IPathInputData, ITextInputData, IImageInputData, IGroupInputData, IBoxInputData, IFrameInputData, IFlowInputData, IArrowInputData, IGIFInputData, IVideoInputData, IRobotInputData, IUIBaseInputData, IObject {
|
|
551
555
|
children?: IUIInputData[]
|
|
552
556
|
}
|
|
553
557
|
|
package/src/editor/IEditor.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IGroup, IUI, IBox, IRectInputData, ISelectorProxy, IEditSize, ICursorType, IAlign, IUnitPointData, IDragEvent, IMoveEvent, IRotateEvent, IStroke, IFill, ILeaf, ILeafList, IObject, IBoxInputData, IGroupInputData, IImageCursor, IRect, IKeyEvent, IUIInputData, IZoomEvent, IColorString, IDirection4, IPointData, IScaleData, ISkewData, ILayoutBoundsData, ITransition, IFourNumber, IShortcutKeys, IShortcutKeysCheck, IUIEvent } from '@leafer-ui/interface'
|
|
1
|
+
import { IGroup, IUI, IBox, IRectInputData, ISelectorProxy, IEditSize, ICursorType, IAlign, IUnitPointData, IDragEvent, IMoveEvent, IRotateEvent, IStroke, IFill, ILeaf, ILeafList, IObject, IBoxInputData, IGroupInputData, IImageCursor, IRect, IKeyEvent, IUIInputData, IZoomEvent, IColorString, IDirection4, IPointData, IScaleData, ISkewData, ILayoutBoundsData, ITransition, IFourNumber, IShortcutKeys, IShortcutKeysCheck, IUIEvent, ILeafer } from '@leafer-ui/interface'
|
|
2
2
|
|
|
3
3
|
export interface IEditorBase extends IGroup, ISelectorProxy, ITransformTool {
|
|
4
4
|
config: IEditorConfig
|
|
@@ -38,6 +38,8 @@ export interface IEditorBase extends IGroup, ISelectorProxy, ITransformTool {
|
|
|
38
38
|
innerEditor?: IObject
|
|
39
39
|
editMask: IUI
|
|
40
40
|
|
|
41
|
+
readonly targetLeafer: ILeafer
|
|
42
|
+
|
|
41
43
|
select(target: IUI | IUI[]): void
|
|
42
44
|
cancel(): void
|
|
43
45
|
|
|
@@ -151,6 +153,9 @@ export interface IEditorConfig extends IObject {
|
|
|
151
153
|
rotateKey?: IShortcutKeysCheck | IShortcutKeys
|
|
152
154
|
|
|
153
155
|
beforeSelect?: IEditorBeforeSelect
|
|
156
|
+
beforeEditOuter?: IEditorBeforeEditOuter
|
|
157
|
+
beforeEditInner?: IEditorBeforeEditInner
|
|
158
|
+
|
|
154
159
|
beforeMove?: IEditorBeforeMove
|
|
155
160
|
beforeScale?: IEditorBeforeScale
|
|
156
161
|
beforeRotate?: IEditorBeforeRotate
|
|
@@ -166,6 +171,13 @@ export interface IEditorSelectData {
|
|
|
166
171
|
target: IUI | IUI[]
|
|
167
172
|
}
|
|
168
173
|
|
|
174
|
+
export interface IEditorEditOuterData {
|
|
175
|
+
target: IUI
|
|
176
|
+
name: string
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export type IEditorEditInnerData = IEditorEditOuterData
|
|
180
|
+
|
|
169
181
|
export interface IEditorMoveData extends IPointData, IObject {
|
|
170
182
|
target: IUI
|
|
171
183
|
}
|
|
@@ -190,6 +202,14 @@ export interface IEditorBeforeSelect {
|
|
|
190
202
|
(data: IEditorSelectData): IUI | IUI[] | boolean | void
|
|
191
203
|
}
|
|
192
204
|
|
|
205
|
+
export interface IEditorBeforeEditOuter {
|
|
206
|
+
(data: IEditorEditOuterData): string | boolean | void
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface IEditorBeforeEditInner {
|
|
210
|
+
(data: IEditorEditInnerData): string | boolean | void
|
|
211
|
+
}
|
|
212
|
+
|
|
193
213
|
export interface IEditorBeforeMove {
|
|
194
214
|
(data: IEditorMoveData): IPointData | boolean | void
|
|
195
215
|
}
|
package/src/index.ts
CHANGED
|
@@ -28,12 +28,13 @@ 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, ITextWrap, IRepeat, IGradientType, IPaintType, IImageFilters, IPathDataArrowOffset, ISolidPaint, IPaintBase } from './type/IType'
|
|
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'
|
|
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'
|
|
35
35
|
|
|
36
36
|
export { IAnimation, IAnimate, IAnimateList, IAnimateType, IKeyframe, IKeyframeId, IAnimateKeyframe, IComputedKeyframe, IStyleAnimation, IKeyframesAnimation } from './IAnimation'
|
|
37
|
+
export { IScroller, IScrollConfig, IScrollTheme } from './IScroller'
|
|
37
38
|
|
|
38
39
|
export { IUIRenderModule, IRectRenderModule, IImageRenderModule, ITextRenderModule, IGroupRenderModule, IFrameRenderModule } from './module/IUIRender'
|
|
39
40
|
export { IUIBoundsModule } from './module/IUIBounds'
|
|
@@ -50,4 +51,4 @@ export { IEffectModule } from './module/IEffect'
|
|
|
50
51
|
export { IFilterModule, IFilterProcessor, IFilterFunction } from './module/IFilter'
|
|
51
52
|
export { ICachedShape } from './ICachedShape'
|
|
52
53
|
|
|
53
|
-
export { IEditorBase, IEditorConfig, ITransformTool, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditorDragStartData, IEditToolFunction, IEditorConfigFunction, IEditorBeforeSelect, IEditorBeforeMove, IEditorBeforeScale, IEditorBeforeRotate, IEditorBeforeSkew, IEditorSelectData, IEditorMoveData, IEditorScaleData, IEditorRotationData, IEditorSkewData } from './editor/IEditor'
|
|
54
|
+
export { IEditorBase, IEditorConfig, ITransformTool, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditorDragStartData, IEditToolFunction, IEditorConfigFunction, IEditorBeforeSelect, IEditorBeforeEditOuter, IEditorBeforeEditInner, IEditorBeforeMove, IEditorBeforeScale, IEditorBeforeRotate, IEditorBeforeSkew, IEditorSelectData, IEditorEditOuterData, IEditorEditInnerData, IEditorMoveData, IEditorScaleData, IEditorRotationData, IEditorSkewData } from './editor/IEditor'
|
package/src/type/IType.ts
CHANGED
|
@@ -199,4 +199,6 @@ export interface IEffect extends IFilter {
|
|
|
199
199
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
export type IOverflow = 'show' | 'hide' | 'scroll'
|
|
202
|
+
export type IOverflow = 'show' | 'hide' | 'scroll' | 'x-scroll' | 'y-scroll'
|
|
203
|
+
|
|
204
|
+
export type ITextOverflow = 'show' | 'hide' | 'ellipsis' | (string & {})
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, 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, 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
|
-
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, 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';
|
|
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
|
|
|
5
5
|
type IPercent = string;
|
|
6
6
|
type IColorString = string;
|
|
@@ -149,7 +149,8 @@ interface IGrayscaleEffect {
|
|
|
149
149
|
}
|
|
150
150
|
interface IEffect extends IFilter {
|
|
151
151
|
}
|
|
152
|
-
type IOverflow = 'show' | 'hide' | 'scroll';
|
|
152
|
+
type IOverflow = 'show' | 'hide' | 'scroll' | 'x-scroll' | 'y-scroll';
|
|
153
|
+
type ITextOverflow = 'show' | 'hide' | 'ellipsis' | (string & {});
|
|
153
154
|
|
|
154
155
|
type ILeafPaintColor = IColorString | CanvasGradient | CanvasPattern;
|
|
155
156
|
interface ILeafPaint {
|
|
@@ -278,7 +279,7 @@ interface ITextStyleAttrData {
|
|
|
278
279
|
verticalAlign?: IVerticalAlign;
|
|
279
280
|
autoSizeAlign?: IBoolean;
|
|
280
281
|
textWrap?: ITextWrap;
|
|
281
|
-
textOverflow?:
|
|
282
|
+
textOverflow?: ITextOverflow;
|
|
282
283
|
}
|
|
283
284
|
interface ITextStyleInputData {
|
|
284
285
|
fontFamily?: IString;
|
|
@@ -296,7 +297,7 @@ interface ITextStyleInputData {
|
|
|
296
297
|
verticalAlign?: IVerticalAlign;
|
|
297
298
|
autoSizeAlign?: IBoolean;
|
|
298
299
|
textWrap?: ITextWrap;
|
|
299
|
-
textOverflow?:
|
|
300
|
+
textOverflow?: ITextOverflow;
|
|
300
301
|
}
|
|
301
302
|
interface ITextStyleComputedData {
|
|
302
303
|
fontFamily?: string;
|
|
@@ -314,7 +315,7 @@ interface ITextStyleComputedData {
|
|
|
314
315
|
verticalAlign?: IVerticalAlign;
|
|
315
316
|
autoSizeAlign?: boolean;
|
|
316
317
|
textWrap?: ITextWrap;
|
|
317
|
-
textOverflow?:
|
|
318
|
+
textOverflow?: ITextOverflow;
|
|
318
319
|
}
|
|
319
320
|
interface IEffectAttrData {
|
|
320
321
|
shadow?: IShadowEffect | IShadowEffect[] | IShadowString;
|
|
@@ -431,6 +432,7 @@ interface IEditorBase extends IGroup$1, ISelectorProxy, ITransformTool {
|
|
|
431
432
|
editTool?: IObject$1;
|
|
432
433
|
innerEditor?: IObject$1;
|
|
433
434
|
editMask: IUI$1;
|
|
435
|
+
readonly targetLeafer: ILeafer$1;
|
|
434
436
|
select(target: IUI$1 | IUI$1[]): void;
|
|
435
437
|
cancel(): void;
|
|
436
438
|
hasItem(item: IUI$1): boolean;
|
|
@@ -517,6 +519,8 @@ interface IEditorConfig extends IObject$1 {
|
|
|
517
519
|
multipleSelectKey?: IShortcutKeysCheck | IShortcutKeys;
|
|
518
520
|
rotateKey?: IShortcutKeysCheck | IShortcutKeys;
|
|
519
521
|
beforeSelect?: IEditorBeforeSelect;
|
|
522
|
+
beforeEditOuter?: IEditorBeforeEditOuter;
|
|
523
|
+
beforeEditInner?: IEditorBeforeEditInner;
|
|
520
524
|
beforeMove?: IEditorBeforeMove;
|
|
521
525
|
beforeScale?: IEditorBeforeScale;
|
|
522
526
|
beforeRotate?: IEditorBeforeRotate;
|
|
@@ -528,6 +532,11 @@ interface IEditorConfig extends IObject$1 {
|
|
|
528
532
|
interface IEditorSelectData {
|
|
529
533
|
target: IUI$1 | IUI$1[];
|
|
530
534
|
}
|
|
535
|
+
interface IEditorEditOuterData {
|
|
536
|
+
target: IUI$1;
|
|
537
|
+
name: string;
|
|
538
|
+
}
|
|
539
|
+
type IEditorEditInnerData = IEditorEditOuterData;
|
|
531
540
|
interface IEditorMoveData extends IPointData$1, IObject$1 {
|
|
532
541
|
target: IUI$1;
|
|
533
542
|
}
|
|
@@ -547,6 +556,12 @@ interface IEditorSkewData extends ISkewData, IObject$1 {
|
|
|
547
556
|
interface IEditorBeforeSelect {
|
|
548
557
|
(data: IEditorSelectData): IUI$1 | IUI$1[] | boolean | void;
|
|
549
558
|
}
|
|
559
|
+
interface IEditorBeforeEditOuter {
|
|
560
|
+
(data: IEditorEditOuterData): string | boolean | void;
|
|
561
|
+
}
|
|
562
|
+
interface IEditorBeforeEditInner {
|
|
563
|
+
(data: IEditorEditInnerData): string | boolean | void;
|
|
564
|
+
}
|
|
550
565
|
interface IEditorBeforeMove {
|
|
551
566
|
(data: IEditorMoveData): IPointData$1 | boolean | void;
|
|
552
567
|
}
|
|
@@ -621,6 +636,36 @@ interface IEditToolFunction {
|
|
|
621
636
|
(ui: any): string;
|
|
622
637
|
}
|
|
623
638
|
|
|
639
|
+
interface IScrollConfig {
|
|
640
|
+
theme?: IScrollTheme;
|
|
641
|
+
style?: IBoxInputData;
|
|
642
|
+
size?: number;
|
|
643
|
+
cornerRadius?: number;
|
|
644
|
+
endsMargin?: number;
|
|
645
|
+
sideMargin?: number;
|
|
646
|
+
minSize?: number;
|
|
647
|
+
scaleFixed?: IScaleFixed;
|
|
648
|
+
scrollType?: 'drag' | 'move' | 'both';
|
|
649
|
+
stopDefault?: boolean;
|
|
650
|
+
hideOnActionEnd?: boolean | 'hover' | 'scroll';
|
|
651
|
+
}
|
|
652
|
+
type IScrollTheme = 'light' | 'dark' | (string & {});
|
|
653
|
+
interface IScroller extends IGroup {
|
|
654
|
+
config: IScrollConfig;
|
|
655
|
+
mergedConfig: IScrollConfig;
|
|
656
|
+
scrollXBar: IBox;
|
|
657
|
+
scrollYBar: IBox;
|
|
658
|
+
scrollXBounds: IBounds;
|
|
659
|
+
scrollYBounds: IBounds;
|
|
660
|
+
scrollRatioX: number;
|
|
661
|
+
scrollRatioY: number;
|
|
662
|
+
ratioX: number;
|
|
663
|
+
ratioY: number;
|
|
664
|
+
dragScrolling: boolean;
|
|
665
|
+
updateConfig(): void;
|
|
666
|
+
update(check: boolean): void;
|
|
667
|
+
}
|
|
668
|
+
|
|
624
669
|
interface ILine extends ILineAttrData, IUI {
|
|
625
670
|
__: ILineData;
|
|
626
671
|
}
|
|
@@ -885,13 +930,16 @@ interface IFrameInputData extends IBoxInputData {
|
|
|
885
930
|
}
|
|
886
931
|
interface IBox extends IBoxAttrData, IGroup {
|
|
887
932
|
__: IBoxData;
|
|
888
|
-
|
|
889
|
-
|
|
933
|
+
scroller?: IScroller;
|
|
934
|
+
hasScroller?: boolean;
|
|
935
|
+
__checkScroll(): void;
|
|
936
|
+
__updateScroll(): void;
|
|
890
937
|
__updateRectRenderBounds(): void;
|
|
891
938
|
__renderGroup(canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
892
939
|
}
|
|
893
940
|
interface IBoxAttrData {
|
|
894
941
|
overflow?: IOverflow;
|
|
942
|
+
scrollConfig?: IScrollConfig;
|
|
895
943
|
resizeChildren?: IBoolean;
|
|
896
944
|
textBox?: IBoolean;
|
|
897
945
|
}
|
|
@@ -1020,7 +1068,7 @@ interface IUIBaseInputData extends IUIAttrData, IFillInputData, IStrokeInputData
|
|
|
1020
1068
|
children?: IUIInputData[];
|
|
1021
1069
|
}
|
|
1022
1070
|
type IUITag = 'App' | 'Leafer' | 'Rect' | 'Ellipse' | 'Polygon' | 'Star' | 'Line' | 'Path' | 'Pen' | 'Text' | 'Image' | 'Canvas' | 'Group' | 'Frame' | 'Box' | 'Arrow' | 'Robot' | 'GIF' | 'Video';
|
|
1023
|
-
interface IUIInputData extends IRectInputData, IEllipseInputData, IPolygonInputData, IStarInputData, ILineInputData, IPathInputData, ITextInputData, IImageInputData, IGroupInputData, IFrameInputData, IArrowInputData, IGIFInputData, IVideoInputData, IRobotInputData, IUIBaseInputData, IObject {
|
|
1071
|
+
interface IUIInputData extends IRectInputData, IEllipseInputData, IPolygonInputData, IStarInputData, ILineInputData, IPathInputData, ITextInputData, IImageInputData, IGroupInputData, IBoxInputData, IFrameInputData, IFlowInputData, IArrowInputData, IGIFInputData, IVideoInputData, IRobotInputData, IUIBaseInputData, IObject {
|
|
1024
1072
|
children?: IUIInputData[];
|
|
1025
1073
|
}
|
|
1026
1074
|
interface IUIJSONData extends IUIInputData {
|
|
@@ -1202,4 +1250,4 @@ interface IFilterFunction {
|
|
|
1202
1250
|
(filter: IFilter, ui: IUI, bounds: IMatrixWithBoundsScaleData, currentCanvas: ILeaferCanvas, originCanvas: ILeaferCanvas, shape: ICachedShape): void;
|
|
1203
1251
|
}
|
|
1204
1252
|
|
|
1205
|
-
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, IEditorBeforeMove, IEditorBeforeRotate, IEditorBeforeScale, IEditorBeforeSelect, IEditorBeforeSkew, IEditorConfig, IEditorConfigFunction, IEditorDragStartData, 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, 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, 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 };
|
|
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 };
|