ketcher-react 2.18.0-rc.7 → 2.18.0-rc.8

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/dist/index.js CHANGED
@@ -3205,7 +3205,7 @@ function load(struct, options) {
3205
3205
  }));
3206
3206
  }
3207
3207
  } else {
3208
- editor.struct(parsedStruct, method === 'layout' || method === 'toggleExplicitHydrogens');
3208
+ editor.struct(parsedStruct, method === 'layout');
3209
3209
  }
3210
3210
  editor.zoomAccordingContent(parsedStruct);
3211
3211
  isIndigoFunctionCalled = !!method;
@@ -3660,7 +3660,7 @@ var zoom = {
3660
3660
 
3661
3661
  var openHelpLink = function openHelpLink() {
3662
3662
  var _window$open;
3663
- return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.18.0-rc.7\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3663
+ return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.18.0-rc.8\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3664
3664
  };
3665
3665
  var help = {
3666
3666
  help: {
@@ -9259,15 +9259,27 @@ var shams = function hasToStringTagShams() {
9259
9259
  return shams$1() && !!Symbol.toStringTag;
9260
9260
  };
9261
9261
 
9262
+ /** @type {import('.')} */
9263
+ var esErrors = Error;
9264
+
9265
+ /** @type {import('./eval')} */
9266
+ var _eval = EvalError;
9267
+
9262
9268
  /** @type {import('./range')} */
9263
9269
  var range = RangeError;
9264
9270
 
9271
+ /** @type {import('./ref')} */
9272
+ var ref = ReferenceError;
9273
+
9265
9274
  /** @type {import('./syntax')} */
9266
9275
  var syntax = SyntaxError;
9267
9276
 
9268
9277
  /** @type {import('./type')} */
9269
9278
  var type = TypeError;
9270
9279
 
9280
+ /** @type {import('./uri')} */
9281
+ var uri = URIError;
9282
+
9271
9283
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
9272
9284
 
9273
9285
 
@@ -9281,13 +9293,17 @@ var hasSymbols$3 = function hasNativeSymbols() {
9281
9293
  };
9282
9294
 
9283
9295
  var test = {
9296
+ __proto__: null,
9284
9297
  foo: {}
9285
9298
  };
9286
9299
 
9287
9300
  var $Object = Object;
9288
9301
 
9302
+ /** @type {import('.')} */
9289
9303
  var hasProto$1 = function hasProto() {
9290
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
9304
+ // @ts-expect-error: TS errors on an inherited property for some reason
9305
+ return { __proto__: test }.foo === test.foo
9306
+ && !(test instanceof $Object);
9291
9307
  };
9292
9308
 
9293
9309
  /* eslint no-invalid-this: 1 */
@@ -9379,14 +9395,26 @@ var call = Function.prototype.call;
9379
9395
  var $hasOwn = Object.prototype.hasOwnProperty;
9380
9396
 
9381
9397
 
9382
- /** @type {(o: {}, p: PropertyKey) => p is keyof o} */
9398
+ /** @type {import('.')} */
9383
9399
  var hasown = functionBind.call(call, $hasOwn);
9384
9400
 
9401
+ var $Error = esErrors;
9402
+
9403
+ var $EvalError = _eval;
9404
+
9385
9405
  var $RangeError = range;
9386
9406
 
9387
- var $SyntaxError$1 = syntax;
9407
+ var $ReferenceError = ref;
9408
+
9409
+ var $SyntaxError = syntax;
9388
9410
 
9389
- var $TypeError$2 = type;
9411
+ var $TypeError = type;
9412
+
9413
+ var $URIError = uri;
9414
+
9415
+ var require$$1 = hasProto$1;
9416
+
9417
+ var hasOwn = hasown;
9390
9418
 
9391
9419
  var undefined$1;
9392
9420
 
@@ -9394,6 +9422,10 @@ var undefined$1;
9394
9422
 
9395
9423
 
9396
9424
 
9425
+
9426
+
9427
+
9428
+
9397
9429
  var $Function = Function;
9398
9430
 
9399
9431
  // eslint-disable-next-line consistent-return
@@ -9413,7 +9445,7 @@ if ($gOPD$1) {
9413
9445
  }
9414
9446
 
9415
9447
  var throwTypeError = function () {
9416
- throw new $TypeError$2();
9448
+ throw new $TypeError();
9417
9449
  };
9418
9450
  var ThrowTypeError = $gOPD$1
9419
9451
  ? (function () {
@@ -9433,7 +9465,7 @@ var ThrowTypeError = $gOPD$1
9433
9465
  : throwTypeError;
9434
9466
 
9435
9467
  var hasSymbols$2 = hasSymbols$3();
9436
- var hasProto = hasProto$1();
9468
+ var hasProto = require$$1();
9437
9469
 
9438
9470
  var getProto$1 = Object.getPrototypeOf || (
9439
9471
  hasProto
@@ -9467,9 +9499,9 @@ var INTRINSICS = {
9467
9499
  '%decodeURIComponent%': decodeURIComponent,
9468
9500
  '%encodeURI%': encodeURI,
9469
9501
  '%encodeURIComponent%': encodeURIComponent,
9470
- '%Error%': Error,
9502
+ '%Error%': $Error,
9471
9503
  '%eval%': eval, // eslint-disable-line no-eval
9472
- '%EvalError%': EvalError,
9504
+ '%EvalError%': $EvalError,
9473
9505
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
9474
9506
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
9475
9507
  '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
@@ -9492,7 +9524,7 @@ var INTRINSICS = {
9492
9524
  '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
9493
9525
  '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
9494
9526
  '%RangeError%': $RangeError,
9495
- '%ReferenceError%': ReferenceError,
9527
+ '%ReferenceError%': $ReferenceError,
9496
9528
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
9497
9529
  '%RegExp%': RegExp,
9498
9530
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
@@ -9501,15 +9533,15 @@ var INTRINSICS = {
9501
9533
  '%String%': String,
9502
9534
  '%StringIteratorPrototype%': hasSymbols$2 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$1,
9503
9535
  '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
9504
- '%SyntaxError%': $SyntaxError$1,
9536
+ '%SyntaxError%': $SyntaxError,
9505
9537
  '%ThrowTypeError%': ThrowTypeError,
9506
9538
  '%TypedArray%': TypedArray,
9507
- '%TypeError%': $TypeError$2,
9539
+ '%TypeError%': $TypeError,
9508
9540
  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
9509
9541
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
9510
9542
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
9511
9543
  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
9512
- '%URIError%': URIError,
9544
+ '%URIError%': $URIError,
9513
9545
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
9514
9546
  '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
9515
9547
  '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
@@ -9620,9 +9652,9 @@ var stringToPath = function stringToPath(string) {
9620
9652
  var first = $strSlice(string, 0, 1);
9621
9653
  var last = $strSlice(string, -1);
9622
9654
  if (first === '%' && last !== '%') {
9623
- throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
9655
+ throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
9624
9656
  } else if (last === '%' && first !== '%') {
9625
- throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
9657
+ throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
9626
9658
  }
9627
9659
  var result = [];
9628
9660
  $replace(string, rePropName, function (match, number, quote, subString) {
@@ -9635,18 +9667,18 @@ var stringToPath = function stringToPath(string) {
9635
9667
  var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
9636
9668
  var intrinsicName = name;
9637
9669
  var alias;
9638
- if (hasown(LEGACY_ALIASES, intrinsicName)) {
9670
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
9639
9671
  alias = LEGACY_ALIASES[intrinsicName];
9640
9672
  intrinsicName = '%' + alias[0] + '%';
9641
9673
  }
9642
9674
 
9643
- if (hasown(INTRINSICS, intrinsicName)) {
9675
+ if (hasOwn(INTRINSICS, intrinsicName)) {
9644
9676
  var value = INTRINSICS[intrinsicName];
9645
9677
  if (value === needsEval) {
9646
9678
  value = doEval(intrinsicName);
9647
9679
  }
9648
9680
  if (typeof value === 'undefined' && !allowMissing) {
9649
- throw new $TypeError$2('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
9681
+ throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
9650
9682
  }
9651
9683
 
9652
9684
  return {
@@ -9656,19 +9688,19 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
9656
9688
  };
9657
9689
  }
9658
9690
 
9659
- throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
9691
+ throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
9660
9692
  };
9661
9693
 
9662
9694
  var getIntrinsic = function GetIntrinsic(name, allowMissing) {
9663
9695
  if (typeof name !== 'string' || name.length === 0) {
9664
- throw new $TypeError$2('intrinsic name must be a non-empty string');
9696
+ throw new $TypeError('intrinsic name must be a non-empty string');
9665
9697
  }
9666
9698
  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
9667
- throw new $TypeError$2('"allowMissing" argument must be a boolean');
9699
+ throw new $TypeError('"allowMissing" argument must be a boolean');
9668
9700
  }
9669
9701
 
9670
9702
  if ($exec(/^%?[^%]*%?$/, name) === null) {
9671
- throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
9703
+ throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
9672
9704
  }
9673
9705
  var parts = stringToPath(name);
9674
9706
  var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
@@ -9695,7 +9727,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
9695
9727
  )
9696
9728
  && first !== last
9697
9729
  ) {
9698
- throw new $SyntaxError$1('property names with quotes must have matching quotes');
9730
+ throw new $SyntaxError('property names with quotes must have matching quotes');
9699
9731
  }
9700
9732
  if (part === 'constructor' || !isOwn) {
9701
9733
  skipFurtherCaching = true;
@@ -9704,12 +9736,12 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
9704
9736
  intrinsicBaseName += '.' + part;
9705
9737
  intrinsicRealName = '%' + intrinsicBaseName + '%';
9706
9738
 
9707
- if (hasown(INTRINSICS, intrinsicRealName)) {
9739
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
9708
9740
  value = INTRINSICS[intrinsicRealName];
9709
9741
  } else if (value != null) {
9710
9742
  if (!(part in value)) {
9711
9743
  if (!allowMissing) {
9712
- throw new $TypeError$2('base intrinsic for ' + name + ' exists, but the property is not available.');
9744
+ throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
9713
9745
  }
9714
9746
  return void undefined$1;
9715
9747
  }
@@ -9730,7 +9762,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
9730
9762
  value = value[part];
9731
9763
  }
9732
9764
  } else {
9733
- isOwn = hasown(value, part);
9765
+ isOwn = hasOwn(value, part);
9734
9766
  value = value[part];
9735
9767
  }
9736
9768
 
@@ -9744,35 +9776,18 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
9744
9776
 
9745
9777
  var GetIntrinsic = getIntrinsic;
9746
9778
 
9747
- var $defineProperty$1 = GetIntrinsic('%Object.defineProperty%', true);
9748
-
9749
- var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
9750
- if ($defineProperty$1) {
9751
- try {
9752
- $defineProperty$1({}, 'a', { value: 1 });
9753
- return true;
9754
- } catch (e) {
9755
- // IE 8 has a broken defineProperty
9756
- return false;
9757
- }
9758
- }
9759
- return false;
9760
- };
9761
-
9762
- hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
9763
- // node v0.6 has a bug where array lengths can be Set but not Defined
9764
- if (!hasPropertyDescriptors$1()) {
9765
- return null;
9766
- }
9779
+ /** @type {import('.')} */
9780
+ var $defineProperty$1 = GetIntrinsic('%Object.defineProperty%', true) || false;
9781
+ if ($defineProperty$1) {
9767
9782
  try {
9768
- return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
9783
+ $defineProperty$1({}, 'a', { value: 1 });
9769
9784
  } catch (e) {
9770
- // In Firefox 4-22, defining length on an array throws an exception.
9771
- return true;
9785
+ // IE 8 has a broken defineProperty
9786
+ $defineProperty$1 = false;
9772
9787
  }
9773
- };
9788
+ }
9774
9789
 
9775
- var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
9790
+ var esDefineProperty = $defineProperty$1;
9776
9791
 
9777
9792
  var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
9778
9793
 
@@ -9787,52 +9802,33 @@ if ($gOPD) {
9787
9802
 
9788
9803
  var gopd = $gOPD;
9789
9804
 
9790
- var require$$0$1 = hasPropertyDescriptors_1;
9805
+ var $defineProperty = esDefineProperty;
9791
9806
 
9792
9807
  var gOPD = gopd;
9793
9808
 
9794
- var hasPropertyDescriptors = require$$0$1();
9795
-
9796
-
9797
-
9798
- var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);
9799
- if ($defineProperty) {
9800
- try {
9801
- $defineProperty({}, 'a', { value: 1 });
9802
- } catch (e) {
9803
- // IE 8 has a broken defineProperty
9804
- $defineProperty = false;
9805
- }
9806
- }
9807
-
9808
- var $SyntaxError = GetIntrinsic('%SyntaxError%');
9809
- var $TypeError$1 = GetIntrinsic('%TypeError%');
9810
-
9811
-
9812
-
9813
- /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
9809
+ /** @type {import('.')} */
9814
9810
  var defineDataProperty$1 = function defineDataProperty(
9815
9811
  obj,
9816
9812
  property,
9817
9813
  value
9818
9814
  ) {
9819
9815
  if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
9820
- throw new $TypeError$1('`obj` must be an object or a function`');
9816
+ throw new $TypeError('`obj` must be an object or a function`');
9821
9817
  }
9822
9818
  if (typeof property !== 'string' && typeof property !== 'symbol') {
9823
- throw new $TypeError$1('`property` must be a string or a symbol`');
9819
+ throw new $TypeError('`property` must be a string or a symbol`');
9824
9820
  }
9825
9821
  if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
9826
- throw new $TypeError$1('`nonEnumerable`, if provided, must be a boolean or null');
9822
+ throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
9827
9823
  }
9828
9824
  if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
9829
- throw new $TypeError$1('`nonWritable`, if provided, must be a boolean or null');
9825
+ throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
9830
9826
  }
9831
9827
  if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
9832
- throw new $TypeError$1('`nonConfigurable`, if provided, must be a boolean or null');
9828
+ throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
9833
9829
  }
9834
9830
  if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
9835
- throw new $TypeError$1('`loose`, if provided, must be a boolean');
9831
+ throw new $TypeError('`loose`, if provided, must be a boolean');
9836
9832
  }
9837
9833
 
9838
9834
  var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
@@ -9858,12 +9854,33 @@ var defineDataProperty$1 = function defineDataProperty(
9858
9854
  }
9859
9855
  };
9860
9856
 
9857
+ var hasPropertyDescriptors = function hasPropertyDescriptors() {
9858
+ return !!$defineProperty;
9859
+ };
9860
+
9861
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
9862
+ // node v0.6 has a bug where array lengths can be Set but not Defined
9863
+ if (!$defineProperty) {
9864
+ return null;
9865
+ }
9866
+ try {
9867
+ return $defineProperty([], 'length', { value: 1 }).length !== 1;
9868
+ } catch (e) {
9869
+ // In Firefox 4-22, defining length on an array throws an exception.
9870
+ return true;
9871
+ }
9872
+ };
9873
+
9874
+ var hasPropertyDescriptors_1 = hasPropertyDescriptors;
9875
+
9861
9876
  var defineDataProperty = defineDataProperty$1;
9862
9877
 
9878
+ var require$$0$1 = hasPropertyDescriptors_1;
9879
+
9863
9880
  var hasDescriptors = require$$0$1();
9864
9881
 
9865
9882
 
9866
- var $TypeError = GetIntrinsic('%TypeError%');
9883
+
9867
9884
  var $floor = GetIntrinsic('%Math.floor%');
9868
9885
 
9869
9886
  /** @typedef {(...args: unknown[]) => unknown} Func */
@@ -9909,22 +9926,13 @@ var callBind = createCommonjsModule(function (module) {
9909
9926
 
9910
9927
 
9911
9928
 
9912
- var $TypeError = GetIntrinsic('%TypeError%');
9929
+
9913
9930
  var $apply = GetIntrinsic('%Function.prototype.apply%');
9914
9931
  var $call = GetIntrinsic('%Function.prototype.call%');
9915
9932
  var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
9916
9933
 
9917
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
9918
- var $max = GetIntrinsic('%Math.max%');
9919
9934
 
9920
- if ($defineProperty) {
9921
- try {
9922
- $defineProperty({}, 'a', { value: 1 });
9923
- } catch (e) {
9924
- // IE 8 has a broken defineProperty
9925
- $defineProperty = null;
9926
- }
9927
- }
9935
+ var $max = GetIntrinsic('%Math.max%');
9928
9936
 
9929
9937
  module.exports = function callBind(originalFunction) {
9930
9938
  if (typeof originalFunction !== 'function') {
@@ -10187,20 +10195,23 @@ var forEach = function forEach(list, iterator, thisArg) {
10187
10195
 
10188
10196
  var forEach_1 = forEach;
10189
10197
 
10190
- var /** @type {ReturnType<import('.')>} */ possibleNames = [
10191
- 'BigInt64Array',
10192
- 'BigUint64Array',
10198
+ /** @type {import('.')} */
10199
+ var possibleTypedArrayNames = [
10193
10200
  'Float32Array',
10194
10201
  'Float64Array',
10202
+ 'Int8Array',
10195
10203
  'Int16Array',
10196
10204
  'Int32Array',
10197
- 'Int8Array',
10205
+ 'Uint8Array',
10206
+ 'Uint8ClampedArray',
10198
10207
  'Uint16Array',
10199
10208
  'Uint32Array',
10200
- 'Uint8Array',
10201
- 'Uint8ClampedArray'
10209
+ 'BigInt64Array',
10210
+ 'BigUint64Array'
10202
10211
  ];
10203
10212
 
10213
+ var possibleNames = possibleTypedArrayNames;
10214
+
10204
10215
  var g$1 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
10205
10216
 
10206
10217
  /** @type {import('.')} */
@@ -32846,8 +32857,8 @@ var KetcherBuilder = function () {
32846
32857
  initApp(element, appRoot, staticResourcesUrl, {
32847
32858
  buttons: buttons || {},
32848
32859
  errorHandler: errorHandler || null,
32849
- version: "2.18.0-rc.7" ,
32850
- buildDate: "2024-02-16T18:39:46" ,
32860
+ version: "2.18.0-rc.8" ,
32861
+ buildDate: "2024-02-22T17:37:07" ,
32851
32862
  buildNumber: ''
32852
32863
  }, structService, resolve, togglerComponent);
32853
32864
  });