openchemlib 8.20.2 → 8.21.0

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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * openchemlib - Manipulate molecules
3
- * @version v8.20.2
4
- * @date 2025-04-11T11:53:07.730Z
3
+ * @version v8.21.0
4
+ * @date 2025-04-11T13:53:49.462Z
5
5
  * @link https://github.com/cheminfo/openchemlib-js
6
6
  * @license BSD-3-Clause
7
7
  */
@@ -173,7 +173,7 @@ qsb.jrb=function jrb(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,
173
173
 
174
174
  var toReturn = $wnd["OCL"];
175
175
 
176
- toReturn.version = '8.20.2';
176
+ toReturn.version = '8.21.0';
177
177
 
178
178
  return toReturn;
179
179
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * openchemlib - Manipulate molecules
3
- * @version v8.20.2
4
- * @date 2025-04-11T11:53:07.743Z
3
+ * @version v8.21.0
4
+ * @date 2025-04-11T13:53:49.482Z
5
5
  * @link https://github.com/cheminfo/openchemlib-js
6
6
  * @license BSD-3-Clause
7
7
  */
@@ -195,7 +195,7 @@ _.cAtomParityUnknown=Efc.t3;_.cAtomQFAny=Efc.u3;_.cAtomQFAromState=Efc.v3;_.cAto
195
195
 
196
196
  var toReturn = $wnd["OCL"];
197
197
 
198
- toReturn.version = '8.20.2';
198
+ toReturn.version = '8.21.0';
199
199
 
200
200
  return toReturn;
201
201
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * openchemlib - Manipulate molecules
3
- * @version v8.20.2
4
- * @date 2025-04-11T11:53:12.143Z
3
+ * @version v8.21.0
4
+ * @date 2025-04-11T13:53:58.006Z
5
5
  * @link https://github.com/cheminfo/openchemlib-js
6
6
  * @license BSD-3-Clause
7
7
  */
@@ -101848,7 +101848,7 @@ $gwt && $gwt.permProps && __gwtModuleFunction.__moduleStartupDone($gwt.permProps
101848
101848
 
101849
101849
  var toReturn = $wnd["OCL"];
101850
101850
 
101851
- toReturn.version = '8.20.2';
101851
+ toReturn.version = '8.21.0';
101852
101852
 
101853
101853
  return toReturn;
101854
101854
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * openchemlib - Manipulate molecules
3
- * @version v8.20.2
4
- * @date 2025-04-11T11:53:07.718Z
3
+ * @version v8.21.0
4
+ * @date 2025-04-11T13:53:49.442Z
5
5
  * @link https://github.com/cheminfo/openchemlib-js
6
6
  * @license BSD-3-Clause
7
7
  */
@@ -142,7 +142,7 @@ h9.z8=function z8(a,b,c){var d,e,f,g,h,i,j,k,l;f=0;for(j=0;j<c;){++f;e=a[b+j];if
142
142
 
143
143
  var toReturn = $wnd["OCL"];
144
144
 
145
- toReturn.version = '8.20.2';
145
+ toReturn.version = '8.21.0';
146
146
 
147
147
  return toReturn;
148
148
  }
@@ -105,6 +105,10 @@ function initCanvasEditor(
105
105
  this.#destroy = null;
106
106
  }
107
107
 
108
+ get isDestroyed() {
109
+ return !this.#editorArea;
110
+ }
111
+
108
112
  moleculeChanged() {
109
113
  this.#checkNotDestroyed();
110
114
 
@@ -112,7 +116,7 @@ function initCanvasEditor(
112
116
  }
113
117
 
114
118
  #checkNotDestroyed() {
115
- if (!this.#editorArea) {
119
+ if (this.isDestroyed) {
116
120
  throw new Error('CanvasEditor has been destroyed');
117
121
  }
118
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openchemlib",
3
- "version": "8.20.2",
3
+ "version": "8.21.0",
4
4
  "description": "Manipulate molecules",
5
5
  "keywords": [
6
6
  "chemistry",
package/types.d.ts CHANGED
@@ -3883,6 +3883,11 @@ export declare class CanvasEditor {
3883
3883
  * All methods will throw an error after calling this.
3884
3884
  */
3885
3885
  destroy(): void;
3886
+
3887
+ /**
3888
+ * Returns whether the editor has been destroyed.
3889
+ */
3890
+ get isDestroyed(): boolean;
3886
3891
  }
3887
3892
 
3888
3893
  interface CanvasEditorElementModeEnum {