@leafer/interface 1.0.0-bate → 1.0.0-beta.2
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 +1 -1
- package/src/app/ILeafer.ts +6 -3
- package/src/data/IData.ts +3 -0
- package/src/index.ts +2 -2
- package/src/layout/ILeafLayout.ts +2 -2
- package/src/plugin/IPlugin.ts +5 -8
package/package.json
CHANGED
package/src/app/ILeafer.ts
CHANGED
|
@@ -57,12 +57,16 @@ export interface ILeafer extends IZoomView, IControl {
|
|
|
57
57
|
__eventIds: IEventListenerId[]
|
|
58
58
|
|
|
59
59
|
init(userConfig?: ILeaferConfig, parentApp?: IApp): void
|
|
60
|
-
|
|
61
60
|
forceFullRender(): void
|
|
62
|
-
|
|
63
61
|
resize(size: IScreenSizeData): void
|
|
64
62
|
}
|
|
65
63
|
|
|
64
|
+
export interface ILeaferTypeCreator {
|
|
65
|
+
list: ILeaferTypeList
|
|
66
|
+
register(name: string, fn: ILeaferTypeFunction): void
|
|
67
|
+
run(name: string, leafer: ILeafer): void
|
|
68
|
+
}
|
|
69
|
+
|
|
66
70
|
export interface ILeaferTypeFunction {
|
|
67
71
|
(leafer: ILeafer): void
|
|
68
72
|
}
|
|
@@ -71,7 +75,6 @@ export interface ILeaferTypeList {
|
|
|
71
75
|
[key: string]: ILeaferTypeFunction
|
|
72
76
|
}
|
|
73
77
|
|
|
74
|
-
|
|
75
78
|
export interface ICreator {
|
|
76
79
|
image?(options?: ILeaferImageConfig): ILeaferImage
|
|
77
80
|
canvas?(options?: ILeaferCanvasConfig, manager?: ICanvasManager): ILeaferCanvas
|
package/src/data/IData.ts
CHANGED
|
@@ -4,6 +4,9 @@ export type __String = string // string | other will convert to string
|
|
|
4
4
|
export type __Object = IObject // will convert to object
|
|
5
5
|
export type __Value = __Number | __Boolean | __String | __Object //
|
|
6
6
|
export type ITimer = any
|
|
7
|
+
|
|
8
|
+
export type IPathString = string
|
|
9
|
+
|
|
7
10
|
export interface IObject {
|
|
8
11
|
[name: string]: any
|
|
9
12
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { IApp } from './app/IApp'
|
|
2
|
-
export { ILeafer, ILeaferType, ILeaferTypeFunction, ILeaferTypeList, ILeaferConfig, ICreator, IUICreator } from './app/ILeafer'
|
|
2
|
+
export { ILeafer, ILeaferType, ILeaferTypeCreator, ILeaferTypeFunction, ILeaferTypeList, ILeaferConfig, ICreator, IUICreator } from './app/ILeafer'
|
|
3
3
|
export { ILeaf, ILeafAttrData, ILeafComputedData, ILeafInputData, ICachedLeaf, IHitType, IBlendMode } from './display/ILeaf'
|
|
4
4
|
export { IBranch } from './display/IBranch'
|
|
5
5
|
export { IZoomView } from './display/IView'
|
|
@@ -44,7 +44,7 @@ export { IUIEvent, IPointerEvent, PointerType, IDragEvent, IDropEvent, ISwipeEve
|
|
|
44
44
|
export { IInteraction, IInteractionCanvas, IInteractionConfig, IWheelConfig, IPointerConfig } from './interaction/IInteraction'
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
export { __Number, __Boolean, __String, __Object, __Value, ITimer, IObject, INumberMap, IStringMap, IBooleanMap, IDataTypeHandle } from './data/IData'
|
|
47
|
+
export { __Number, __Boolean, __String, __Object, __Value, IPathString, ITimer, IObject, INumberMap, IStringMap, IBooleanMap, IDataTypeHandle } from './data/IData'
|
|
48
48
|
export { ILeafList, ILeafArrayMap, ILeafMap, ILeafLevelList, ILeafListItemCallback } from './data/IList'
|
|
49
49
|
export { IPoint, IPointData, IRadiusPointData, ISize, ISizeData, IScreenSizeData, IBounds, IBoundsData, IBoundsDataHandle, IOffsetBoundsData, ITwoPointBounds, ITwoPointBoundsData, IAutoBounds, IAutoBoundsData, IMatrix, IMatrixData, IMatrixWithBoundsData, IMatrixDecompositionData, IMatrixDecompositionAttr } from './math/IMath'
|
|
50
50
|
export { IFunction } from './function/IFunction'
|
package/src/plugin/IPlugin.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { IObject } from '../data/IData'
|
|
2
2
|
|
|
3
|
-
export interface IPlugin {
|
|
4
|
-
name
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
description: string
|
|
9
|
-
dependencies: string[]
|
|
10
|
-
run(params: IObject): void
|
|
3
|
+
export interface IPlugin extends IObject {
|
|
4
|
+
name?: string
|
|
5
|
+
importVersion: string
|
|
6
|
+
import: string[]
|
|
7
|
+
run(LeaferUI: IObject): void
|
|
11
8
|
}
|