@asdf-overlay/core 1.2.1 → 1.2.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.
Binary file
package/addon-x64.node CHANGED
Binary file
Binary file
Binary file
Binary file
package/lib/index.d.ts CHANGED
@@ -44,6 +44,7 @@ export type OverlayEventEmitter = EventEmitter<{
44
44
  export declare class Overlay {
45
45
  readonly event: OverlayEventEmitter;
46
46
  readonly [idSym]: unknown;
47
+ private destroyed;
47
48
  private constructor();
48
49
  /**
49
50
  * Update overlay position relative to window
package/lib/index.js CHANGED
@@ -35,6 +35,7 @@ const idSym = Symbol('id');
35
35
  export class Overlay {
36
36
  event = new EventEmitter();
37
37
  [idSym];
38
+ destroyed = false;
38
39
  constructor(id) {
39
40
  this[idSym] = id;
40
41
  void (async () => {
@@ -128,6 +129,9 @@ export class Overlay {
128
129
  * Destroy overlay
129
130
  */
130
131
  destroy() {
132
+ if (this.destroyed)
133
+ return;
134
+ this.destroyed = true;
131
135
  addon.overlayDestroy(this[idSym]);
132
136
  this.event.emit('disconnected');
133
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asdf-overlay/core",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Asdf overlay core Node addon",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
@@ -41,7 +41,7 @@
41
41
  "asdf_overlay-aarch64.dll"
42
42
  ],
43
43
  "devDependencies": {
44
- "@types/node": "^25.5.0",
44
+ "@types/node": "^25.6.0",
45
45
  "typescript": "^5.9.3"
46
46
  },
47
47
  "scripts": {