@hatiolab/things-scene 3.0.18 → 3.0.21

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
@@ -143,6 +143,16 @@ declare module '@hatiolab/things-scene' {
143
143
  function warn(...args: any[]): void
144
144
  function debug(...args: any[]): void
145
145
 
146
+ class ReferenceMap {
147
+ constructor(
148
+ creator: (boardId: string, resolve: any, reject: any) => Promise<any>,
149
+ disposer: (id: string, ref: any) => Promise<void>
150
+ )
151
+ get(id: string, createIf?: boolean): Promise<any>
152
+ get ids(): string[]
153
+ add(id: string, target: any): Promise<any>
154
+ }
155
+
146
156
  class ScriptLoader {
147
157
  static load(scripts: string | Array<string>, styles?: string | Array<string>): Promise<void>
148
158
  }
@@ -322,16 +332,16 @@ declare module '@hatiolab/things-scene' {
322
332
  class ContainerAbstract extends MoveHandle(RectPath(Component)) {
323
333
  indexOf(component: Component): number
324
334
  size(): number
325
- addComponent(target: Component): void
326
- removeComponent(target: Component): void
327
- insertComponentAt(target: Component, idx: number): void
335
+ addComponent(target: Component, ghost?: boolean): void
336
+ removeComponent(target: Component, ghost?: boolean): void
337
+ insertComponentAt(target: Component, idx: number, ghost?: boolean): void
328
338
  findById(id: string): Component | undefined
329
339
  getAt(at: number): Component | undefined
330
340
 
331
341
  reflow(): void
332
342
 
333
- add(components: Component[] | Component): Container
334
- remove(components: Component[] | Component): Container
343
+ add(components: Component[] | Component, ghost?: boolean): Container
344
+ remove(components: Component[] | Component, ghost?: boolean): Container
335
345
 
336
346
  components: Component[]
337
347
  }