@leafer-in/interface 1.0.3 → 1.0.5

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-in/interface",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "@leafer-in/interface",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -13,10 +13,10 @@
13
13
  ],
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "https://github.com/leaferjs/in.git"
16
+ "url": "https://github.com/leaferjs/leafer-in.git"
17
17
  },
18
- "homepage": "https://github.com/leaferjs/in/tree/main/packages/interface",
19
- "bugs": "https://github.com/leaferjs/in/issues",
18
+ "homepage": "https://github.com/leaferjs/leafer-in/tree/main/packages/interface",
19
+ "bugs": "https://github.com/leaferjs/leafer-in/issues",
20
20
  "keywords": [
21
21
  "leafer-in interface",
22
22
  "leafer-in",
@@ -25,7 +25,7 @@
25
25
  "leaferjs"
26
26
  ],
27
27
  "dependencies": {
28
- "@leafer-ui/interface": "^1.0.3",
29
- "@leafer/interface": "^1.0.3"
28
+ "@leafer-ui/interface": "^1.0.5",
29
+ "@leafer/interface": "^1.0.5"
30
30
  }
31
31
  }
@@ -2,10 +2,11 @@ import { IUI, IPointData, IAround, IDragEvent, IEvent, IEventListenerId, IMatrix
2
2
 
3
3
  import { IEditBox } from './IEditBox'
4
4
  import { IEditSelect } from './IEditSelect'
5
+ import { ISimulateElement } from './ISimulateTarget'
5
6
 
6
7
 
7
8
  export interface IEditor extends IEditorBase {
8
- simulateTarget: IUI
9
+ simulateTarget: ISimulateElement
9
10
 
10
11
  selector: IEditSelect
11
12
  editBox: IEditBox
@@ -0,0 +1,8 @@
1
+ import { IFunction, IRect, IMatrix } from '@leafer-ui/interface'
2
+
3
+ export interface ISimulateElement extends IRect {
4
+ checkChange: boolean
5
+ canChange: boolean
6
+ changedTransform: IMatrix // 直接修改属性得到的变化
7
+ safeChange(fn: IFunction): void
8
+ }
package/src/index.ts CHANGED
@@ -6,6 +6,7 @@ export { IStroker } from './editor/IStroker'
6
6
  export { IEditBox } from './editor/IEditBox'
7
7
  export { ISelectArea } from './editor/ISelectArea'
8
8
  export { IEditSelect } from './editor/IEditSelect'
9
+ export { ISimulateElement } from './editor/ISimulateTarget'
9
10
 
10
11
  // html
11
12
 
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IEditBoxBase, IUI, IRectInputData, IGroup, IBoundsData, IBounds, IPointerEvent, IEditorBase, IPointData, ILayoutBoundsData, IEventListenerId, IObject, IEvent, IMatrixData, IAround, IDragEvent, IImageData, IImageInputData, IFourNumber, IBoxInputData, IAxisAlign, IFlowWrap, IGap, IFlowAlign } from '@leafer-ui/interface';
1
+ import { IEditBoxBase, IUI, IRectInputData, IGroup, IBoundsData, IBounds, IPointerEvent, IRect, IMatrix, IFunction, IEditorBase, IPointData, ILayoutBoundsData, IEventListenerId, IObject, IEvent, IMatrixData, IAround, IDragEvent, IImageData, IImageInputData, IFourNumber, IBoxInputData, IAxisAlign, IFlowWrap, IGap, IFlowAlign } from '@leafer-ui/interface';
2
2
  export * from '@leafer-ui/interface';
3
3
 
4
4
  interface IEditBox extends IEditBoxBase {
@@ -28,8 +28,15 @@ interface IEditSelect extends IGroup {
28
28
  update(): void;
29
29
  }
30
30
 
31
+ interface ISimulateElement extends IRect {
32
+ checkChange: boolean;
33
+ canChange: boolean;
34
+ changedTransform: IMatrix;
35
+ safeChange(fn: IFunction): void;
36
+ }
37
+
31
38
  interface IEditor extends IEditorBase {
32
- simulateTarget: IUI;
39
+ simulateTarget: ISimulateElement;
33
40
  selector: IEditSelect;
34
41
  editBox: IEditBox;
35
42
  editTool?: IEditTool;
@@ -157,4 +164,4 @@ interface IFlowParseData {
157
164
  rowYAlign: IAxisAlign;
158
165
  }
159
166
 
160
- export type { IEditBox, IEditSelect, IEditTool, IEditor, IEditorEvent, IEditorGroupEvent, IEditorMoveEvent, IEditorRotateEvent, IEditorScaleEvent, IEditorSkewEvent, IFlowAlignToAxisAlignMap, IFlowDrawData, IFlowParseData, IFlowWrapDrawData, IGapBoundsData, IHTMLTextData, IHTMLTextInputData, IInnerEditor, IInnerEditorEvent, IScrollBar, IScrollBarConfig, IScrollBarTheme, ISelectArea, IStroker };
167
+ export type { IEditBox, IEditSelect, IEditTool, IEditor, IEditorEvent, IEditorGroupEvent, IEditorMoveEvent, IEditorRotateEvent, IEditorScaleEvent, IEditorSkewEvent, IFlowAlignToAxisAlignMap, IFlowDrawData, IFlowParseData, IFlowWrapDrawData, IGapBoundsData, IHTMLTextData, IHTMLTextInputData, IInnerEditor, IInnerEditorEvent, IScrollBar, IScrollBarConfig, IScrollBarTheme, ISelectArea, ISimulateElement, IStroker };
File without changes