@hatiolab/things-scene 2.7.22 → 2.7.23
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/things-scene.d.ts +22 -2
- package/things-scene.mjs +1 -1
package/package.json
CHANGED
package/things-scene.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare module '@hatiolab/things-scene' {
|
|
2
2
|
type Constructor<T = {}> = new (...args: any[]) => T
|
|
3
3
|
type Class = { new (...args: any[]): any }
|
|
4
|
+
type Properties = { [key: string]: any }
|
|
4
5
|
|
|
5
6
|
const MODE_VIEW = 0
|
|
6
7
|
const MODE_EDIT = 1
|
|
@@ -17,7 +18,21 @@ declare module '@hatiolab/things-scene' {
|
|
|
17
18
|
type TRANSLATE = DIMENSION
|
|
18
19
|
type POSITION = DIMENSION
|
|
19
20
|
|
|
20
|
-
type
|
|
21
|
+
type LAYOUT = {
|
|
22
|
+
reflow: (container: Container) => void
|
|
23
|
+
capturables?: (container: Container) => boolean
|
|
24
|
+
drawables?: (container: Container) => boolean
|
|
25
|
+
isStuck?: (component: Container) => boolean
|
|
26
|
+
keyNavigate?: (container: Container, component: Component, e: KeyboardEvent) => Component
|
|
27
|
+
joinType?: boolean
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const AbsoluteLayout: LAYOUT & { ABSOLUTE: boolean }
|
|
31
|
+
const TableLayout: LAYOUT
|
|
32
|
+
const CardLayout: LAYOUT
|
|
33
|
+
const HTMLAbsoluteLayout: LAYOUT
|
|
34
|
+
const LinearHorizontal: LAYOUT
|
|
35
|
+
const LinearVertical: LAYOUT
|
|
21
36
|
|
|
22
37
|
type AnimationConfig = {
|
|
23
38
|
duration?: number
|
|
@@ -76,7 +91,7 @@ declare module '@hatiolab/things-scene' {
|
|
|
76
91
|
}
|
|
77
92
|
|
|
78
93
|
class Model {
|
|
79
|
-
static compile(model: Model, context
|
|
94
|
+
static compile(model: Model, context?: any): Component
|
|
80
95
|
|
|
81
96
|
type: string;
|
|
82
97
|
[key: string]: any
|
|
@@ -200,6 +215,11 @@ declare module '@hatiolab/things-scene' {
|
|
|
200
215
|
indexOf(component: Component): number
|
|
201
216
|
insertComponentAt(target: Component, idx: number): void
|
|
202
217
|
findById(id: string): Component
|
|
218
|
+
|
|
219
|
+
add(components: Component[] | Component): Container
|
|
220
|
+
remove(components: Component[] | Component): Container
|
|
221
|
+
|
|
222
|
+
components: Component[]
|
|
203
223
|
}
|
|
204
224
|
class RootContainer extends Container {}
|
|
205
225
|
|