@leafer-in/interface 1.6.6 → 1.7.0

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.6.6",
3
+ "version": "1.7.0",
4
4
  "description": "@leafer-in/interface",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "leaferjs"
26
26
  ],
27
27
  "peerDependencies": {
28
- "@leafer-ui/interface": "^1.6.6",
29
- "@leafer/interface": "^1.6.6"
28
+ "@leafer-ui/interface": "^1.7.0",
29
+ "@leafer/interface": "^1.7.0"
30
30
  }
31
31
  }
@@ -31,7 +31,8 @@ export interface IEditTool extends IInnerEditor {
31
31
  }
32
32
 
33
33
  export interface IInnerEditor {
34
- tag: string
34
+ readonly tag: string
35
+ readonly mode: IInnerEditorMode
35
36
  editTarget: IUI
36
37
  config: IObject
37
38
 
@@ -58,6 +59,8 @@ export interface IInnerEditor {
58
59
  destroy(): void
59
60
  }
60
61
 
62
+ export type IInnerEditorMode = 'focus' | 'both'
63
+
61
64
  export interface IEditorEvent extends IEvent {
62
65
  readonly target?: IUI
63
66
  readonly editor?: IEditor
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export * from '@leafer-ui/interface'
2
2
 
3
3
  // editor
4
- export { IEditor, IEditTool, IInnerEditor, IEditorEvent, IInnerEditorEvent, IEditorGroupEvent, IEditorMoveEvent, IEditorScaleEvent, IEditorRotateEvent, IEditorSkewEvent } from './editor/IEditor'
4
+ export { IEditor, IEditTool, IInnerEditor, IInnerEditorMode, IEditorEvent, IInnerEditorEvent, IEditorGroupEvent, IEditorMoveEvent, IEditorScaleEvent, IEditorRotateEvent, IEditorSkewEvent } from './editor/IEditor'
5
5
  export { IStroker } from './editor/IStroker'
6
6
  export { IEditBox } from './editor/IEditBox'
7
7
  export { ISelectArea } from './editor/ISelectArea'
package/types/index.d.ts CHANGED
@@ -55,7 +55,8 @@ interface IEditTool extends IInnerEditor {
55
55
  onSkew(e: IEditorSkewEvent): void;
56
56
  }
57
57
  interface IInnerEditor {
58
- tag: string;
58
+ readonly tag: string;
59
+ readonly mode: IInnerEditorMode;
59
60
  editTarget: IUI;
60
61
  config: IObject;
61
62
  editor: IEditor;
@@ -73,6 +74,7 @@ interface IInnerEditor {
73
74
  onDestroy(): void;
74
75
  destroy(): void;
75
76
  }
77
+ type IInnerEditorMode = 'focus' | 'both';
76
78
  interface IEditorEvent extends IEvent {
77
79
  readonly target?: IUI;
78
80
  readonly editor?: IEditor;
@@ -163,4 +165,4 @@ interface IFlowParseData {
163
165
  rowYAlign: IAxisAlign;
164
166
  }
165
167
 
166
- 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 };
168
+ export type { IEditBox, IEditSelect, IEditTool, IEditor, IEditorEvent, IEditorGroupEvent, IEditorMoveEvent, IEditorRotateEvent, IEditorScaleEvent, IEditorSkewEvent, IFlowAlignToAxisAlignMap, IFlowDrawData, IFlowParseData, IFlowWrapDrawData, IGapBoundsData, IHTMLTextData, IHTMLTextInputData, IInnerEditor, IInnerEditorEvent, IInnerEditorMode, IScrollBar, IScrollBarConfig, IScrollBarTheme, ISelectArea, ISimulateElement, IStroker };