@leafer-ui/interface 1.9.6 → 1.9.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/interface",
3
- "version": "1.9.6",
3
+ "version": "1.9.7",
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.6"
25
+ "@leafer/interface": "1.9.7"
26
26
  }
27
27
  }
@@ -1,12 +1,13 @@
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'
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'
2
2
 
3
3
  export interface IEditorBase extends IGroup, ISelectorProxy, ITransformTool {
4
4
  config: IEditorConfig
5
5
  readonly mergeConfig: IEditorConfig // 实际使用,合并了选中元素、默认editBox上的editConfig,频繁访问会消耗性能
6
6
  readonly mergedConfig: IEditorConfig // 合并之后的缓存配置
7
7
 
8
- hoverTarget?: IUI
9
8
  target?: IUI | IUI[]
9
+ hoverTarget?: IUI
10
+ dimTarget?: IGroup | IGroup[] // 需要淡化的容器
10
11
 
11
12
  readonly list: IUI[]
12
13
  leafList: ILeafList
@@ -48,6 +49,9 @@ export interface IEditorBase extends IGroup, ISelectorProxy, ITransformTool {
48
49
  addItem(item: IUI): void
49
50
  removeItem(item: IUI): void
50
51
 
52
+ setDimOthers(value: boolean | number): void
53
+ setBright(value: boolean): void
54
+
51
55
  update(): void
52
56
  updateEditBox(): void
53
57
  updateEditTool(): void
@@ -101,10 +105,14 @@ export interface IEditorConfig extends IObject {
101
105
 
102
106
  point?: IEditPointInputData | IEditPointInputData[]
103
107
  middlePoint?: IEditPointInputData | IEditPointInputData[]
108
+ resizeLine?: IEditPointInputData
104
109
 
105
110
  rect?: IBoxInputData
106
111
  area?: IRectInputData
112
+
107
113
  mask?: boolean | IColorString
114
+ dimOthers?: boolean | number // 是否弱化其他内容,突出显示选中元素
115
+ bright?: boolean // 仅突出显示选中元素
108
116
 
109
117
  circle?: IEditPointInputData
110
118
  circleDirection?: IDirection4
@@ -236,7 +244,7 @@ export interface IEditPoint extends IBox {
236
244
  pointType: IEditPointType
237
245
  }
238
246
 
239
- export type IEditPointType = 'resize' | 'rotate' | 'skew' | 'resize-rotate' | 'button'
247
+ export type IEditPointType = 'move' | 'resize' | 'rotate' | 'skew' | 'resize-rotate' | 'button'
240
248
 
241
249
  export interface IEditBoxBase extends IGroup {
242
250
 
@@ -253,7 +261,7 @@ export interface IEditBoxBase extends IGroup {
253
261
  view: IGroup // 放置默认编辑工具控制点
254
262
 
255
263
  circle: IEditPoint
256
- rect: IRect
264
+ rect: IEditPoint
257
265
 
258
266
  buttons: IGroup
259
267
 
package/types/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
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
- 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';
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
 
5
5
  type IPercent = string;
6
6
  type IColorString = string;
@@ -422,8 +422,9 @@ interface IEditorBase extends IGroup$1, ISelectorProxy, ITransformTool {
422
422
  config: IEditorConfig;
423
423
  readonly mergeConfig: IEditorConfig;
424
424
  readonly mergedConfig: IEditorConfig;
425
- hoverTarget?: IUI$1;
426
425
  target?: IUI$1 | IUI$1[];
426
+ hoverTarget?: IUI$1;
427
+ dimTarget?: IGroup$1 | IGroup$1[];
427
428
  readonly list: IUI$1[];
428
429
  leafList: ILeafList;
429
430
  openedGroupList: ILeafList;
@@ -453,6 +454,8 @@ interface IEditorBase extends IGroup$1, ISelectorProxy, ITransformTool {
453
454
  shiftItem(item: IUI$1): void;
454
455
  addItem(item: IUI$1): void;
455
456
  removeItem(item: IUI$1): void;
457
+ setDimOthers(value: boolean | number): void;
458
+ setBright(value: boolean): void;
456
459
  update(): void;
457
460
  updateEditBox(): void;
458
461
  updateEditTool(): void;
@@ -492,9 +495,12 @@ interface IEditorConfig extends IObject$1 {
492
495
  pointRadius?: number;
493
496
  point?: IEditPointInputData | IEditPointInputData[];
494
497
  middlePoint?: IEditPointInputData | IEditPointInputData[];
498
+ resizeLine?: IEditPointInputData;
495
499
  rect?: IBoxInputData$1;
496
500
  area?: IRectInputData$1;
497
501
  mask?: boolean | IColorString$1;
502
+ dimOthers?: boolean | number;
503
+ bright?: boolean;
498
504
  circle?: IEditPointInputData;
499
505
  circleDirection?: IDirection4;
500
506
  circleMargin?: number;
@@ -596,7 +602,7 @@ interface IEditPoint extends IBox$1 {
596
602
  direction: number;
597
603
  pointType: IEditPointType;
598
604
  }
599
- type IEditPointType = 'resize' | 'rotate' | 'skew' | 'resize-rotate' | 'button';
605
+ type IEditPointType = 'move' | 'resize' | 'rotate' | 'skew' | 'resize-rotate' | 'button';
600
606
  interface IEditBoxBase extends IGroup$1 {
601
607
  editor: IEditorBase;
602
608
  dragging: boolean;
@@ -607,7 +613,7 @@ interface IEditBoxBase extends IGroup$1 {
607
613
  skewing: boolean;
608
614
  view: IGroup$1;
609
615
  circle: IEditPoint;
610
- rect: IRect$1;
616
+ rect: IEditPoint;
611
617
  buttons: IGroup$1;
612
618
  resizePoints: IEditPoint[];
613
619
  rotatePoints: IEditPoint[];