@hatiolab/things-scene 3.1.2 → 3.1.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
@@ -6,6 +6,7 @@ declare module '@hatiolab/things-scene' {
6
6
  type Properties = { [key: string]: any }
7
7
  type State = Properties
8
8
  type Style = Properties
9
+ type Decorator = (component: Component, context: CanvasRenderingContext2D) => boolean
9
10
 
10
11
  type ChangeFunction = (selector: string, value: any, self: any) => Component[]
11
12
 
@@ -276,6 +277,7 @@ declare module '@hatiolab/things-scene' {
276
277
  customObjToVal?: (obj: any) => any
277
278
  ): () => string | undefined
278
279
  static reposition(component: Component): void
280
+ static registerDecorator(name: string, decorator: Decorator): void
279
281
 
280
282
  state: Properties
281
283
  bounds: BOUNDS
@@ -313,6 +315,8 @@ declare module '@hatiolab/things-scene' {
313
315
  get hasTextProperty(): boolean
314
316
  get textSubstitutor(): () => string
315
317
 
318
+ get decorators(): Array<string | Decorator>
319
+
316
320
  isRootModel(): boolean
317
321
  isContainer(): boolean
318
322
  isLine(): boolean