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

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.
@@ -3140,7 +3140,7 @@ function load(struct, options) {
3140
3140
  }));
3141
3141
  }
3142
3142
  } else {
3143
- editor.struct(parsedStruct, method === 'layout' || method === 'toggleExplicitHydrogens');
3143
+ editor.struct(parsedStruct, method === 'layout');
3144
3144
  }
3145
3145
  editor.zoomAccordingContent(parsedStruct);
3146
3146
  isIndigoFunctionCalled = !!method;
@@ -3595,7 +3595,7 @@ var zoom = {
3595
3595
 
3596
3596
  var openHelpLink = function openHelpLink() {
3597
3597
  var _window$open;
3598
- 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();
3598
+ return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.18.0-rc.9\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3599
3599
  };
3600
3600
  var help = {
3601
3601
  help: {
@@ -9194,15 +9194,27 @@ var shams = function hasToStringTagShams() {
9194
9194
  return shams$1() && !!Symbol.toStringTag;
9195
9195
  };
9196
9196
 
9197
+ /** @type {import('.')} */
9198
+ var esErrors = Error;
9199
+
9200
+ /** @type {import('./eval')} */
9201
+ var _eval = EvalError;
9202
+
9197
9203
  /** @type {import('./range')} */
9198
9204
  var range = RangeError;
9199
9205
 
9206
+ /** @type {import('./ref')} */
9207
+ var ref = ReferenceError;
9208
+
9200
9209
  /** @type {import('./syntax')} */
9201
9210
  var syntax = SyntaxError;
9202
9211
 
9203
9212
  /** @type {import('./type')} */
9204
9213
  var type = TypeError;
9205
9214
 
9215
+ /** @type {import('./uri')} */
9216
+ var uri = URIError;
9217
+
9206
9218
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
9207
9219
 
9208
9220
 
@@ -9216,13 +9228,17 @@ var hasSymbols$3 = function hasNativeSymbols() {
9216
9228
  };
9217
9229
 
9218
9230
  var test = {
9231
+ __proto__: null,
9219
9232
  foo: {}
9220
9233
  };
9221
9234
 
9222
9235
  var $Object = Object;
9223
9236
 
9237
+ /** @type {import('.')} */
9224
9238
  var hasProto$1 = function hasProto() {
9225
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
9239
+ // @ts-expect-error: TS errors on an inherited property for some reason
9240
+ return { __proto__: test }.foo === test.foo
9241
+ && !(test instanceof $Object);
9226
9242
  };
9227
9243
 
9228
9244
  /* eslint no-invalid-this: 1 */
@@ -9314,14 +9330,26 @@ var call = Function.prototype.call;
9314
9330
  var $hasOwn = Object.prototype.hasOwnProperty;
9315
9331
 
9316
9332
 
9317
- /** @type {(o: {}, p: PropertyKey) => p is keyof o} */
9333
+ /** @type {import('.')} */
9318
9334
  var hasown = functionBind.call(call, $hasOwn);
9319
9335
 
9336
+ var $Error = esErrors;
9337
+
9338
+ var $EvalError = _eval;
9339
+
9320
9340
  var $RangeError = range;
9321
9341
 
9322
- var $SyntaxError$1 = syntax;
9342
+ var $ReferenceError = ref;
9343
+
9344
+ var $SyntaxError = syntax;
9323
9345
 
9324
- var $TypeError$2 = type;
9346
+ var $TypeError = type;
9347
+
9348
+ var $URIError = uri;
9349
+
9350
+ var require$$1 = hasProto$1;
9351
+
9352
+ var hasOwn = hasown;
9325
9353
 
9326
9354
  var undefined$1;
9327
9355
 
@@ -9329,6 +9357,10 @@ var undefined$1;
9329
9357
 
9330
9358
 
9331
9359
 
9360
+
9361
+
9362
+
9363
+
9332
9364
  var $Function = Function;
9333
9365
 
9334
9366
  // eslint-disable-next-line consistent-return
@@ -9348,7 +9380,7 @@ if ($gOPD$1) {
9348
9380
  }
9349
9381
 
9350
9382
  var throwTypeError = function () {
9351
- throw new $TypeError$2();
9383
+ throw new $TypeError();
9352
9384
  };
9353
9385
  var ThrowTypeError = $gOPD$1
9354
9386
  ? (function () {
@@ -9368,7 +9400,7 @@ var ThrowTypeError = $gOPD$1
9368
9400
  : throwTypeError;
9369
9401
 
9370
9402
  var hasSymbols$2 = hasSymbols$3();
9371
- var hasProto = hasProto$1();
9403
+ var hasProto = require$$1();
9372
9404
 
9373
9405
  var getProto$1 = Object.getPrototypeOf || (
9374
9406
  hasProto
@@ -9402,9 +9434,9 @@ var INTRINSICS = {
9402
9434
  '%decodeURIComponent%': decodeURIComponent,
9403
9435
  '%encodeURI%': encodeURI,
9404
9436
  '%encodeURIComponent%': encodeURIComponent,
9405
- '%Error%': Error,
9437
+ '%Error%': $Error,
9406
9438
  '%eval%': eval, // eslint-disable-line no-eval
9407
- '%EvalError%': EvalError,
9439
+ '%EvalError%': $EvalError,
9408
9440
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
9409
9441
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
9410
9442
  '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
@@ -9427,7 +9459,7 @@ var INTRINSICS = {
9427
9459
  '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
9428
9460
  '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
9429
9461
  '%RangeError%': $RangeError,
9430
- '%ReferenceError%': ReferenceError,
9462
+ '%ReferenceError%': $ReferenceError,
9431
9463
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
9432
9464
  '%RegExp%': RegExp,
9433
9465
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
@@ -9436,15 +9468,15 @@ var INTRINSICS = {
9436
9468
  '%String%': String,
9437
9469
  '%StringIteratorPrototype%': hasSymbols$2 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$1,
9438
9470
  '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
9439
- '%SyntaxError%': $SyntaxError$1,
9471
+ '%SyntaxError%': $SyntaxError,
9440
9472
  '%ThrowTypeError%': ThrowTypeError,
9441
9473
  '%TypedArray%': TypedArray,
9442
- '%TypeError%': $TypeError$2,
9474
+ '%TypeError%': $TypeError,
9443
9475
  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
9444
9476
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
9445
9477
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
9446
9478
  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
9447
- '%URIError%': URIError,
9479
+ '%URIError%': $URIError,
9448
9480
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
9449
9481
  '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
9450
9482
  '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
@@ -9555,9 +9587,9 @@ var stringToPath = function stringToPath(string) {
9555
9587
  var first = $strSlice(string, 0, 1);
9556
9588
  var last = $strSlice(string, -1);
9557
9589
  if (first === '%' && last !== '%') {
9558
- throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
9590
+ throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
9559
9591
  } else if (last === '%' && first !== '%') {
9560
- throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
9592
+ throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
9561
9593
  }
9562
9594
  var result = [];
9563
9595
  $replace(string, rePropName, function (match, number, quote, subString) {
@@ -9570,18 +9602,18 @@ var stringToPath = function stringToPath(string) {
9570
9602
  var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
9571
9603
  var intrinsicName = name;
9572
9604
  var alias;
9573
- if (hasown(LEGACY_ALIASES, intrinsicName)) {
9605
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
9574
9606
  alias = LEGACY_ALIASES[intrinsicName];
9575
9607
  intrinsicName = '%' + alias[0] + '%';
9576
9608
  }
9577
9609
 
9578
- if (hasown(INTRINSICS, intrinsicName)) {
9610
+ if (hasOwn(INTRINSICS, intrinsicName)) {
9579
9611
  var value = INTRINSICS[intrinsicName];
9580
9612
  if (value === needsEval) {
9581
9613
  value = doEval(intrinsicName);
9582
9614
  }
9583
9615
  if (typeof value === 'undefined' && !allowMissing) {
9584
- throw new $TypeError$2('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
9616
+ throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
9585
9617
  }
9586
9618
 
9587
9619
  return {
@@ -9591,19 +9623,19 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
9591
9623
  };
9592
9624
  }
9593
9625
 
9594
- throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
9626
+ throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
9595
9627
  };
9596
9628
 
9597
9629
  var getIntrinsic = function GetIntrinsic(name, allowMissing) {
9598
9630
  if (typeof name !== 'string' || name.length === 0) {
9599
- throw new $TypeError$2('intrinsic name must be a non-empty string');
9631
+ throw new $TypeError('intrinsic name must be a non-empty string');
9600
9632
  }
9601
9633
  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
9602
- throw new $TypeError$2('"allowMissing" argument must be a boolean');
9634
+ throw new $TypeError('"allowMissing" argument must be a boolean');
9603
9635
  }
9604
9636
 
9605
9637
  if ($exec(/^%?[^%]*%?$/, name) === null) {
9606
- throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
9638
+ throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
9607
9639
  }
9608
9640
  var parts = stringToPath(name);
9609
9641
  var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
@@ -9630,7 +9662,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
9630
9662
  )
9631
9663
  && first !== last
9632
9664
  ) {
9633
- throw new $SyntaxError$1('property names with quotes must have matching quotes');
9665
+ throw new $SyntaxError('property names with quotes must have matching quotes');
9634
9666
  }
9635
9667
  if (part === 'constructor' || !isOwn) {
9636
9668
  skipFurtherCaching = true;
@@ -9639,12 +9671,12 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
9639
9671
  intrinsicBaseName += '.' + part;
9640
9672
  intrinsicRealName = '%' + intrinsicBaseName + '%';
9641
9673
 
9642
- if (hasown(INTRINSICS, intrinsicRealName)) {
9674
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
9643
9675
  value = INTRINSICS[intrinsicRealName];
9644
9676
  } else if (value != null) {
9645
9677
  if (!(part in value)) {
9646
9678
  if (!allowMissing) {
9647
- throw new $TypeError$2('base intrinsic for ' + name + ' exists, but the property is not available.');
9679
+ throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
9648
9680
  }
9649
9681
  return void undefined$1;
9650
9682
  }
@@ -9665,7 +9697,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
9665
9697
  value = value[part];
9666
9698
  }
9667
9699
  } else {
9668
- isOwn = hasown(value, part);
9700
+ isOwn = hasOwn(value, part);
9669
9701
  value = value[part];
9670
9702
  }
9671
9703
 
@@ -9679,35 +9711,18 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
9679
9711
 
9680
9712
  var GetIntrinsic = getIntrinsic;
9681
9713
 
9682
- var $defineProperty$1 = GetIntrinsic('%Object.defineProperty%', true);
9683
-
9684
- var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
9685
- if ($defineProperty$1) {
9686
- try {
9687
- $defineProperty$1({}, 'a', { value: 1 });
9688
- return true;
9689
- } catch (e) {
9690
- // IE 8 has a broken defineProperty
9691
- return false;
9692
- }
9693
- }
9694
- return false;
9695
- };
9696
-
9697
- hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
9698
- // node v0.6 has a bug where array lengths can be Set but not Defined
9699
- if (!hasPropertyDescriptors$1()) {
9700
- return null;
9701
- }
9714
+ /** @type {import('.')} */
9715
+ var $defineProperty$1 = GetIntrinsic('%Object.defineProperty%', true) || false;
9716
+ if ($defineProperty$1) {
9702
9717
  try {
9703
- return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
9718
+ $defineProperty$1({}, 'a', { value: 1 });
9704
9719
  } catch (e) {
9705
- // In Firefox 4-22, defining length on an array throws an exception.
9706
- return true;
9720
+ // IE 8 has a broken defineProperty
9721
+ $defineProperty$1 = false;
9707
9722
  }
9708
- };
9723
+ }
9709
9724
 
9710
- var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
9725
+ var esDefineProperty = $defineProperty$1;
9711
9726
 
9712
9727
  var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
9713
9728
 
@@ -9722,52 +9737,33 @@ if ($gOPD) {
9722
9737
 
9723
9738
  var gopd = $gOPD;
9724
9739
 
9725
- var require$$0$1 = hasPropertyDescriptors_1;
9740
+ var $defineProperty = esDefineProperty;
9726
9741
 
9727
9742
  var gOPD = gopd;
9728
9743
 
9729
- var hasPropertyDescriptors = require$$0$1();
9730
-
9731
-
9732
-
9733
- var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);
9734
- if ($defineProperty) {
9735
- try {
9736
- $defineProperty({}, 'a', { value: 1 });
9737
- } catch (e) {
9738
- // IE 8 has a broken defineProperty
9739
- $defineProperty = false;
9740
- }
9741
- }
9742
-
9743
- var $SyntaxError = GetIntrinsic('%SyntaxError%');
9744
- var $TypeError$1 = GetIntrinsic('%TypeError%');
9745
-
9746
-
9747
-
9748
- /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
9744
+ /** @type {import('.')} */
9749
9745
  var defineDataProperty$1 = function defineDataProperty(
9750
9746
  obj,
9751
9747
  property,
9752
9748
  value
9753
9749
  ) {
9754
9750
  if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
9755
- throw new $TypeError$1('`obj` must be an object or a function`');
9751
+ throw new $TypeError('`obj` must be an object or a function`');
9756
9752
  }
9757
9753
  if (typeof property !== 'string' && typeof property !== 'symbol') {
9758
- throw new $TypeError$1('`property` must be a string or a symbol`');
9754
+ throw new $TypeError('`property` must be a string or a symbol`');
9759
9755
  }
9760
9756
  if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
9761
- throw new $TypeError$1('`nonEnumerable`, if provided, must be a boolean or null');
9757
+ throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
9762
9758
  }
9763
9759
  if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
9764
- throw new $TypeError$1('`nonWritable`, if provided, must be a boolean or null');
9760
+ throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
9765
9761
  }
9766
9762
  if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
9767
- throw new $TypeError$1('`nonConfigurable`, if provided, must be a boolean or null');
9763
+ throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
9768
9764
  }
9769
9765
  if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
9770
- throw new $TypeError$1('`loose`, if provided, must be a boolean');
9766
+ throw new $TypeError('`loose`, if provided, must be a boolean');
9771
9767
  }
9772
9768
 
9773
9769
  var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
@@ -9793,12 +9789,33 @@ var defineDataProperty$1 = function defineDataProperty(
9793
9789
  }
9794
9790
  };
9795
9791
 
9792
+ var hasPropertyDescriptors = function hasPropertyDescriptors() {
9793
+ return !!$defineProperty;
9794
+ };
9795
+
9796
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
9797
+ // node v0.6 has a bug where array lengths can be Set but not Defined
9798
+ if (!$defineProperty) {
9799
+ return null;
9800
+ }
9801
+ try {
9802
+ return $defineProperty([], 'length', { value: 1 }).length !== 1;
9803
+ } catch (e) {
9804
+ // In Firefox 4-22, defining length on an array throws an exception.
9805
+ return true;
9806
+ }
9807
+ };
9808
+
9809
+ var hasPropertyDescriptors_1 = hasPropertyDescriptors;
9810
+
9796
9811
  var defineDataProperty = defineDataProperty$1;
9797
9812
 
9813
+ var require$$0$1 = hasPropertyDescriptors_1;
9814
+
9798
9815
  var hasDescriptors = require$$0$1();
9799
9816
 
9800
9817
 
9801
- var $TypeError = GetIntrinsic('%TypeError%');
9818
+
9802
9819
  var $floor = GetIntrinsic('%Math.floor%');
9803
9820
 
9804
9821
  /** @typedef {(...args: unknown[]) => unknown} Func */
@@ -9844,22 +9861,13 @@ var callBind = createCommonjsModule(function (module) {
9844
9861
 
9845
9862
 
9846
9863
 
9847
- var $TypeError = GetIntrinsic('%TypeError%');
9864
+
9848
9865
  var $apply = GetIntrinsic('%Function.prototype.apply%');
9849
9866
  var $call = GetIntrinsic('%Function.prototype.call%');
9850
9867
  var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
9851
9868
 
9852
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
9853
- var $max = GetIntrinsic('%Math.max%');
9854
9869
 
9855
- if ($defineProperty) {
9856
- try {
9857
- $defineProperty({}, 'a', { value: 1 });
9858
- } catch (e) {
9859
- // IE 8 has a broken defineProperty
9860
- $defineProperty = null;
9861
- }
9862
- }
9870
+ var $max = GetIntrinsic('%Math.max%');
9863
9871
 
9864
9872
  module.exports = function callBind(originalFunction) {
9865
9873
  if (typeof originalFunction !== 'function') {
@@ -10122,20 +10130,23 @@ var forEach = function forEach(list, iterator, thisArg) {
10122
10130
 
10123
10131
  var forEach_1 = forEach;
10124
10132
 
10125
- var /** @type {ReturnType<import('.')>} */ possibleNames = [
10126
- 'BigInt64Array',
10127
- 'BigUint64Array',
10133
+ /** @type {import('.')} */
10134
+ var possibleTypedArrayNames = [
10128
10135
  'Float32Array',
10129
10136
  'Float64Array',
10137
+ 'Int8Array',
10130
10138
  'Int16Array',
10131
10139
  'Int32Array',
10132
- 'Int8Array',
10140
+ 'Uint8Array',
10141
+ 'Uint8ClampedArray',
10133
10142
  'Uint16Array',
10134
10143
  'Uint32Array',
10135
- 'Uint8Array',
10136
- 'Uint8ClampedArray'
10144
+ 'BigInt64Array',
10145
+ 'BigUint64Array'
10137
10146
  ];
10138
10147
 
10148
+ var possibleNames = possibleTypedArrayNames;
10149
+
10139
10150
  var g$1 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
10140
10151
 
10141
10152
  /** @type {import('.')} */
@@ -32781,8 +32792,8 @@ var KetcherBuilder = function () {
32781
32792
  initApp(element, appRoot, staticResourcesUrl, {
32782
32793
  buttons: buttons || {},
32783
32794
  errorHandler: errorHandler || null,
32784
- version: "2.18.0-rc.7" ,
32785
- buildDate: "2024-02-16T18:39:46" ,
32795
+ version: "2.18.0-rc.9" ,
32796
+ buildDate: "2024-02-27T15:52:48" ,
32786
32797
  buildNumber: ''
32787
32798
  }, structService, resolve, togglerComponent);
32788
32799
  });