@leafer-ui/interface 1.5.2 → 1.5.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/editor/IEditor.ts +8 -0
- package/src/index.ts +1 -1
- package/types/index.d.ts +9 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.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.5.
|
|
25
|
+
"@leafer/interface": "1.5.3"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/editor/IEditor.ts
CHANGED
|
@@ -120,6 +120,7 @@ export interface IEditorConfig extends IObject {
|
|
|
120
120
|
rotateable?: boolean | 'rotate'
|
|
121
121
|
skewable?: boolean
|
|
122
122
|
|
|
123
|
+
beforeSelect?: IEditorBeforeSelect
|
|
123
124
|
beforeMove?: IEditorBeforeMove
|
|
124
125
|
beforeScale?: IEditorBeforeScale
|
|
125
126
|
beforeRotate?: IEditorBeforeRotate
|
|
@@ -129,6 +130,10 @@ export interface IEditorConfig extends IObject {
|
|
|
129
130
|
pathEditor?: IObject
|
|
130
131
|
}
|
|
131
132
|
|
|
133
|
+
export interface IEditorSelectData {
|
|
134
|
+
target: IUI | IUI[]
|
|
135
|
+
}
|
|
136
|
+
|
|
132
137
|
export interface IEditorMoveData extends IPointData, IObject {
|
|
133
138
|
target: IUI
|
|
134
139
|
}
|
|
@@ -149,6 +154,9 @@ export interface IEditorSkewData extends ISkewData, IObject {
|
|
|
149
154
|
origin: IPointData | IAlign
|
|
150
155
|
}
|
|
151
156
|
|
|
157
|
+
export interface IEditorBeforeSelect {
|
|
158
|
+
(data: IEditorSelectData): IUI | IUI[] | boolean | void
|
|
159
|
+
}
|
|
152
160
|
|
|
153
161
|
export interface IEditorBeforeMove {
|
|
154
162
|
(data: IEditorMoveData): IPointData | boolean | void
|
package/src/index.ts
CHANGED
|
@@ -50,4 +50,4 @@ export { IEffectModule } from './module/IEffect'
|
|
|
50
50
|
export { IFilterModule, IFilterProcessor, IFilterFunction } from './module/IFilter'
|
|
51
51
|
export { ICachedShape } from './ICachedShape'
|
|
52
52
|
|
|
53
|
-
export { IEditorBase, IEditorConfig, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditorDragStartData, IEditToolFunction, IEditorConfigFunction, IEditorBeforeMove, IEditorBeforeScale, IEditorBeforeRotate, IEditorBeforeSkew, IEditorMoveData, IEditorScaleData, IEditorRotationData, IEditorSkewData } from './editor/IEditor'
|
|
53
|
+
export { IEditorBase, IEditorConfig, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditorDragStartData, IEditToolFunction, IEditorConfigFunction, IEditorBeforeSelect, IEditorBeforeMove, IEditorBeforeScale, IEditorBeforeRotate, IEditorBeforeSkew, IEditorSelectData, IEditorMoveData, IEditorScaleData, IEditorRotationData, IEditorSkewData } from './editor/IEditor'
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IBlendMode, IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, IOptionSizeData, IPathCommandData, IAxis, IAxisReverse, IWindingRule, IFilter, IMatrixData, ILeaferImage, ITaskItem, IBoolean, INumber, IString, IUnitData, IAnimateOptions, IAnimateEasing, IEventer, IObject, IEventMap, IAnimateEasingFunction, IAnimateEnding, ITransition, IPercentData, ILeafInputData, ISizeData, ILeaf as ILeaf$1, ILeafComputedData, ILeafData, IBoundsData as IBoundsData$1, IPathCreator, IJSONOptions, IValue, IFindCondition, IAnswer, IPathString, IPathDrawer, ILeaferCanvas, IRenderOptions, IExportOptions, IExportResult, IPickOptions, IPickResult, ICanvasContext2DSettings, ICanvasContext2D, ILeaferAttrData, IControl, ILeaferType, ILeaferConfig, ILeafRender, ILeafBounds, ILeafHit, ICachedLeaf, IBooleanMap, IAround, IMatrixWithBoundsScaleData } from '@leafer/interface';
|
|
2
2
|
export * from '@leafer/interface';
|
|
3
|
-
import { IObject as IObject$1, IEditSize, IStroke as IStroke$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,
|
|
3
|
+
import { IObject as IObject$1, IEditSize, IStroke as IStroke$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, IUI as IUI$1, IPointData as IPointData$1, IScaleData, ISkewData, IGroup as IGroup$1, ISelectorProxy, ILeafList, IBox as IBox$1, IRect as IRect$1, ILayoutBoundsData, IBoundsData, IKeyEvent, ILeaf, IDragEvent, IZoomEvent, IRotateEvent, 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;
|
|
@@ -473,6 +473,7 @@ interface IEditorConfig extends IObject$1 {
|
|
|
473
473
|
flipable?: boolean;
|
|
474
474
|
rotateable?: boolean | 'rotate';
|
|
475
475
|
skewable?: boolean;
|
|
476
|
+
beforeSelect?: IEditorBeforeSelect;
|
|
476
477
|
beforeMove?: IEditorBeforeMove;
|
|
477
478
|
beforeScale?: IEditorBeforeScale;
|
|
478
479
|
beforeRotate?: IEditorBeforeRotate;
|
|
@@ -480,6 +481,9 @@ interface IEditorConfig extends IObject$1 {
|
|
|
480
481
|
textEditor?: IObject$1;
|
|
481
482
|
pathEditor?: IObject$1;
|
|
482
483
|
}
|
|
484
|
+
interface IEditorSelectData {
|
|
485
|
+
target: IUI$1 | IUI$1[];
|
|
486
|
+
}
|
|
483
487
|
interface IEditorMoveData extends IPointData$1, IObject$1 {
|
|
484
488
|
target: IUI$1;
|
|
485
489
|
}
|
|
@@ -496,6 +500,9 @@ interface IEditorSkewData extends ISkewData, IObject$1 {
|
|
|
496
500
|
target: IUI$1;
|
|
497
501
|
origin: IPointData$1 | IAlign$1;
|
|
498
502
|
}
|
|
503
|
+
interface IEditorBeforeSelect {
|
|
504
|
+
(data: IEditorSelectData): IUI$1 | IUI$1[] | boolean | void;
|
|
505
|
+
}
|
|
499
506
|
interface IEditorBeforeMove {
|
|
500
507
|
(data: IEditorMoveData): IPointData$1 | boolean | void;
|
|
501
508
|
}
|
|
@@ -1109,4 +1116,4 @@ interface IFilterFunction {
|
|
|
1109
1116
|
(filter: IFilter, ui: IUI, bounds: IMatrixWithBoundsScaleData, currentCanvas: ILeaferCanvas, originCanvas: ILeaferCanvas, shape: ICachedShape): void;
|
|
1110
1117
|
}
|
|
1111
1118
|
|
|
1112
|
-
export type { IAnimate, IAnimateKeyframe, IAnimateList, IAnimateType, IAnimation, IApp, IAppConfig, IAppData, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, IComputedKeyframe, ICornerRadiusString, IDashPatternString, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditToolFunction, IEditorBase, IEditorBeforeMove, IEditorBeforeRotate, IEditorBeforeScale, IEditorBeforeSkew, IEditorConfig, IEditorConfigFunction, IEditorDragStartData, IEditorMoveData, IEditorRotationData, IEditorScaleData, 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, IStrokeInputData, IStrokeJoin, IStrokeWidthString, IStyleAnimation, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDecorationData, ITextDecorationType, ITextDrawData, ITextInputData, ITextRenderModule, ITextRowData, ITextStyleAttrData, ITextStyleComputedData, ITextStyleInputData, ITextWordData, ITextWrap, ITransitionFunction, ITransitionMap, ITransitionModule, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIJSONData, IUIRenderModule, IUITag, IVectorPath, IVerticalAlign, IVideo, IVideoData, IVideoInputData, IWritingMode };
|
|
1119
|
+
export type { IAnimate, IAnimateKeyframe, IAnimateList, IAnimateType, IAnimation, IApp, IAppConfig, IAppData, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, 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, IStrokeInputData, IStrokeJoin, IStrokeWidthString, IStyleAnimation, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDecorationData, ITextDecorationType, ITextDrawData, ITextInputData, ITextRenderModule, ITextRowData, ITextStyleAttrData, ITextStyleComputedData, ITextStyleInputData, ITextWordData, ITextWrap, ITransitionFunction, ITransitionMap, ITransitionModule, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIJSONData, IUIRenderModule, IUITag, IVectorPath, IVerticalAlign, IVideo, IVideoData, IVideoInputData, IWritingMode };
|