@hatiolab/things-scene 3.2.2 → 3.2.3

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/things-scene.d.ts CHANGED
@@ -7,6 +7,13 @@ declare module '@hatiolab/things-scene' {
7
7
  type State = Properties
8
8
  type Style = Properties
9
9
  type Decorator = (component: Component, context: CanvasRenderingContext2D) => boolean
10
+ type PopupOptions = {
11
+ data: any
12
+ location: 'center' | 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom'
13
+ modal: boolean
14
+ closable: boolean
15
+ output: boolean
16
+ }
10
17
 
11
18
  type ChangeFunction = (selector: string, value: any, self: any) => Component[]
12
19
 
@@ -28,6 +35,7 @@ declare module '@hatiolab/things-scene' {
28
35
  type TRANSLATE = DIMENSION
29
36
  type POSITION = DIMENSION
30
37
  type POINT = DIMENSION
38
+ type LOCATION = DIMENSION
31
39
  type BOUNDS = { left: number; top: number; width: number; height: number }
32
40
 
33
41
  type ComponentNature = {
@@ -110,6 +118,12 @@ declare module '@hatiolab/things-scene' {
110
118
  ondragend?(point: POSITION, index: number, component: Component): void
111
119
  }
112
120
 
121
+ class ScenePopup {
122
+ static hideAll(root: Component): void
123
+ static hide(component: Component): void
124
+ static show(component: Component, ref: string, options: PopupOptions): void
125
+ }
126
+
113
127
  interface Control extends DIMENSION {
114
128
  handler: ControlHandler
115
129
  }
@@ -144,6 +158,8 @@ declare module '@hatiolab/things-scene' {
144
158
  function warn(...args: any[]): void
145
159
  function debug(...args: any[]): void
146
160
 
161
+ function FPS(): number
162
+
147
163
  class ReferenceMap {
148
164
  constructor(
149
165
  creator: (boardId: string, resolve: any, reject: any) => Promise<any>,
@@ -269,7 +285,7 @@ declare module '@hatiolab/things-scene' {
269
285
  /* components */
270
286
 
271
287
  class Component extends MixinEvent(Object) {
272
- static register(type: string, Clazz: typeof Component): void
288
+ static register(type: string, Clazz?: typeof Component): void
273
289
  static memoize(base: any, property: string, needClone: boolean): void
274
290
  static drawStroke(context: CanvasRenderingContext2D, style: Style): void
275
291
  static buildSubstitutor(