@leafer-ui/interface 2.1.3 → 2.1.4
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 +5 -3
- package/types/index.d.ts +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
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.1.
|
|
25
|
+
"@leafer/interface": "2.1.4"
|
|
26
26
|
}
|
|
27
27
|
}
|
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, IKeyEvent, IUIInputData, IZoomEvent, IColorString, IDirection4, IPointData, IScaleData, ISkewData, ILayoutBoundsData, ITransition, IFourNumber, IShortcutKeys, IShortcutKeysCheck, IUIEvent, ILeafer } 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, IKeyEvent, IUIInputData, IZoomEvent, IColorString, IDirection4, IPointData, IScaleData, ISkewData, ILayoutBoundsData, ITransition, IFourNumber, IShortcutKeys, IShortcutKeysCheck, IUIEvent, ILeafer, IBoundsType } from '@leafer-ui/interface'
|
|
2
2
|
|
|
3
3
|
export interface IEditorBase extends IGroup, ISelectorProxy, ITransformTool {
|
|
4
4
|
config: IEditorConfig
|
|
@@ -91,7 +91,7 @@ export interface ITransformTool {
|
|
|
91
91
|
onSkew(e: IDragEvent): void
|
|
92
92
|
|
|
93
93
|
move(x: number | IPointData, y?: number, transition?: ITransition): void
|
|
94
|
-
scaleOf(origin: IPointData | IAlign, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition): void
|
|
94
|
+
scaleOf(origin: IPointData | IAlign, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void
|
|
95
95
|
rotateOf(origin: IPointData | IAlign, rotation: number, transition?: ITransition): void
|
|
96
96
|
skewOf(origin: IPointData | IAlign, skewX: number, skewY?: number, resize?: boolean, transition?: ITransition): void
|
|
97
97
|
}
|
|
@@ -153,12 +153,14 @@ export interface IEditorConfig extends IObject {
|
|
|
153
153
|
|
|
154
154
|
selector?: boolean
|
|
155
155
|
editBox?: boolean
|
|
156
|
+
editBoxType?: IBoundsType
|
|
156
157
|
hover?: boolean
|
|
157
158
|
hoverStyle?: IUIInputData
|
|
159
|
+
hoverPathType?: 'path' | 'render-path' | 'box' | 'stroke'
|
|
158
160
|
select?: 'press' | 'tap'
|
|
159
161
|
selectKeep?: boolean
|
|
160
162
|
selectedStyle?: IUIInputData
|
|
161
|
-
selectedPathType?: 'path' | 'render-path'
|
|
163
|
+
selectedPathType?: 'path' | 'render-path' | 'box' | 'stroke'
|
|
162
164
|
multipleSelect?: boolean
|
|
163
165
|
|
|
164
166
|
boxSelect?: boolean
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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, ILeaferCanvas, ILeaf, INumber, IString, IBoolean, IUnitData, IAnimateOptions, IAnimateEasing, IEventer, IObject, IEventParamsMap, IAnimateEasingFunction, IAnimateEnding, ITransition, IBounds, ILeafInputData, ILeafComputedData, ILeafData, IPathCommandDataWithWindingRule, IBoundsData, IValue, IDirection4 as IDirection4$1, IAround, IOptionPointData, IPathCreator, IJSONOptions, IFindCondition, IAnswer, IPathString, IPathDrawer, 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
|
-
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 as ILeaf$1, 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, IBoundsType, 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 as ILeaf$1, 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;
|
|
@@ -492,7 +492,7 @@ interface ITransformTool {
|
|
|
492
492
|
onRotate(e: IDragEvent | IRotateEvent): void;
|
|
493
493
|
onSkew(e: IDragEvent): void;
|
|
494
494
|
move(x: number | IPointData$1, y?: number, transition?: ITransition$1): void;
|
|
495
|
-
scaleOf(origin: IPointData$1 | IAlign$1, scaleX: number, scaleY?: number | ITransition$1, resize?: boolean, transition?: ITransition$1): void;
|
|
495
|
+
scaleOf(origin: IPointData$1 | IAlign$1, scaleX: number, scaleY?: number | ITransition$1, resize?: boolean, transition?: ITransition$1, boundsType?: IBoundsType): void;
|
|
496
496
|
rotateOf(origin: IPointData$1 | IAlign$1, rotation: number, transition?: ITransition$1): void;
|
|
497
497
|
skewOf(origin: IPointData$1 | IAlign$1, skewX: number, skewY?: number, resize?: boolean, transition?: ITransition$1): void;
|
|
498
498
|
}
|
|
@@ -539,12 +539,14 @@ interface IEditorConfig extends IObject$1 {
|
|
|
539
539
|
ignorePixelSnap?: boolean;
|
|
540
540
|
selector?: boolean;
|
|
541
541
|
editBox?: boolean;
|
|
542
|
+
editBoxType?: IBoundsType;
|
|
542
543
|
hover?: boolean;
|
|
543
544
|
hoverStyle?: IUIInputData$1;
|
|
545
|
+
hoverPathType?: 'path' | 'render-path' | 'box' | 'stroke';
|
|
544
546
|
select?: 'press' | 'tap';
|
|
545
547
|
selectKeep?: boolean;
|
|
546
548
|
selectedStyle?: IUIInputData$1;
|
|
547
|
-
selectedPathType?: 'path' | 'render-path';
|
|
549
|
+
selectedPathType?: 'path' | 'render-path' | 'box' | 'stroke';
|
|
548
550
|
multipleSelect?: boolean;
|
|
549
551
|
boxSelect?: boolean;
|
|
550
552
|
continuousSelect?: boolean;
|