ketcher-react 3.8.0-rc.2 → 3.8.0-rc.3

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/cjs/index.js CHANGED
@@ -3850,7 +3850,7 @@ var zoom = {
3850
3850
 
3851
3851
  var openHelpLink = function openHelpLink() {
3852
3852
  var _window$open;
3853
- return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.8.0-rc.2\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3853
+ return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.8.0-rc.3\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3854
3854
  };
3855
3855
  var help = {
3856
3856
  help: {
@@ -24331,8 +24331,9 @@ var HoverIcon = function () {
24331
24331
  }, {
24332
24332
  key: "isOverLoader",
24333
24333
  value: function isOverLoader(event) {
24334
+ var _target$classList;
24334
24335
  var target = (event === null || event === void 0 ? void 0 : event.relatedTarget) || event.target;
24335
- return target === null || target === void 0 ? void 0 : target.classList.contains('loading-spinner');
24336
+ return target === null || target === void 0 || (_target$classList = target.classList) === null || _target$classList === void 0 ? void 0 : _target$classList.contains('loading-spinner');
24336
24337
  }
24337
24338
  }, {
24338
24339
  key: "onMouseMove",
@@ -25406,9 +25407,20 @@ var Editor$3 = function () {
25406
25407
  var selectionInvalid = selection.atoms.some(function (atomId) {
25407
25408
  var atom = _this.render.ctab.molecule.atoms.get(atomId);
25408
25409
  assert_1(atom);
25409
- return atom.sgs.size > 0 || atom.attachmentPoints !== null || atom.rglabel !== null && atom.neighbors.length > 1 || _this.render.ctab.molecule.rgroups.some(function (rgroup) {
25410
+ var sgs = atom.sgs,
25411
+ attachmentPoints = atom.attachmentPoints,
25412
+ rglabel = atom.rglabel,
25413
+ neighbors = atom.neighbors,
25414
+ label = atom.label;
25415
+ var belongsToSGroup = sgs.size > 0;
25416
+ var isAttachmentPoint = attachmentPoints !== null;
25417
+ var isNonTerminalRGroupLabel = rglabel !== null && neighbors.length > 1;
25418
+ var hasMultipleRGroupLabel = rglabel !== null && !ketcherCore.isSingleRGroupAttachmentPoint(Number(rglabel));
25419
+ var belongsToRGroup = _this.render.ctab.molecule.rgroups.some(function (rgroup) {
25410
25420
  return rgroup.frags.has(atom.fragment);
25411
- }) || ketcherCore.genericsList.includes(atom.label);
25421
+ });
25422
+ var isExtendedTableAtom = ketcherCore.genericsList.includes(label);
25423
+ return belongsToSGroup || isAttachmentPoint || isNonTerminalRGroupLabel || hasMultipleRGroupLabel || belongsToRGroup || isExtendedTableAtom;
25412
25424
  });
25413
25425
  if (selectionInvalid) {
25414
25426
  return false;
@@ -25437,11 +25449,24 @@ var Editor$3 = function () {
25437
25449
  potentialLeavingAtoms.push(bond.begin);
25438
25450
  }
25439
25451
  });
25452
+ selectionAtoms.forEach(function (selectionAtomId) {
25453
+ var selectionAtom = currentStruct.atoms.get(selectionAtomId);
25454
+ assert_1(selectionAtom);
25455
+ if (selectionAtom.neighbors.length === 1 && !_.isNumber(selectionAtom.rglabel)) {
25456
+ potentialLeavingAtoms.push(selectionAtomId);
25457
+ }
25458
+ });
25440
25459
  var totalPotentialLeavingAtoms = terminalRGroupAtoms.length + potentialLeavingAtoms.length;
25441
25460
  if (totalPotentialLeavingAtoms > 8) {
25442
25461
  return false;
25443
25462
  }
25444
- this.terminalRGroupAtoms = terminalRGroupAtoms;
25463
+ this.terminalRGroupAtoms = terminalRGroupAtoms.map(function (atomId) {
25464
+ var atom = currentStruct.atoms.get(atomId);
25465
+ assert_1(atom);
25466
+ assert_1(atom.rglabel);
25467
+ var attachmentPointLabel = ketcherCore.getAttachmentPointLabelWithBinaryShift(Number(atom.rglabel));
25468
+ return [atomId, attachmentPointLabel];
25469
+ });
25445
25470
  this.potentialLeavingAtoms = potentialLeavingAtoms;
25446
25471
  return terminalRGroupAtoms.length > 0 || potentialLeavingAtoms.length > 0;
25447
25472
  }
@@ -25466,21 +25491,54 @@ var Editor$3 = function () {
25466
25491
  _this2.selectedToOriginalAtomsIdMap.set(i, atomId);
25467
25492
  });
25468
25493
  var assignedAttachmentPoints = new Map();
25469
- this.terminalRGroupAtoms.forEach(function (atomId, i) {
25494
+ var sideTerminalSGroupAtoms = this.terminalRGroupAtoms.filter(function (_ref) {
25495
+ var _ref2 = _slicedToArray__default["default"](_ref, 2),
25496
+ attachmentPointLabel = _ref2[1];
25497
+ return attachmentPointLabel !== ketcherCore.AttachmentPointName.R1 && attachmentPointLabel !== ketcherCore.AttachmentPointName.R2;
25498
+ });
25499
+ var sideAttachmentPointsNames = [];
25500
+ for (var i = 0; i < sideTerminalSGroupAtoms.length; i++) {
25501
+ var attachmentPointNumber = i + 3;
25502
+ if (attachmentPointNumber > 8) {
25503
+ break;
25504
+ }
25505
+ sideAttachmentPointsNames = sideAttachmentPointsNames.concat(ketcherCore.getAttachmentPointLabel(attachmentPointNumber));
25506
+ }
25507
+ var terminalRGroupAtomsSortedByLabel = _toConsumableArray__default["default"](this.terminalRGroupAtoms).sort(function (_ref3, _ref4) {
25508
+ var _ref5 = _slicedToArray__default["default"](_ref3, 2),
25509
+ labelA = _ref5[1];
25510
+ var _ref6 = _slicedToArray__default["default"](_ref4, 2),
25511
+ labelB = _ref6[1];
25512
+ var labelANumber = ketcherCore.getAttachmentPointNumberFromLabel(labelA);
25513
+ var labelBNumber = ketcherCore.getAttachmentPointNumberFromLabel(labelB);
25514
+ return labelANumber - labelBNumber;
25515
+ });
25516
+ terminalRGroupAtomsSortedByLabel.forEach(function (_ref7) {
25470
25517
  var _selectedStruct$halfB;
25518
+ var _ref8 = _slicedToArray__default["default"](_ref7, 2),
25519
+ atomId = _ref8[0],
25520
+ attachmentPointLabel = _ref8[1];
25471
25521
  var selectedStructLeavingAtomId = originalToSelectedAtomsIdMap.get(atomId);
25472
25522
  assert_1(selectedStructLeavingAtomId !== undefined);
25473
25523
  var selectedStructLeavingAtom = selectedStruct.atoms.get(selectedStructLeavingAtomId);
25474
25524
  assert_1(selectedStructLeavingAtom);
25525
+ assert_1(selectedStructLeavingAtom.rglabel);
25526
+ var attachmentPointName;
25527
+ if (attachmentPointLabel === ketcherCore.AttachmentPointName.R1 || attachmentPointLabel === ketcherCore.AttachmentPointName.R2 || sideAttachmentPointsNames.includes(attachmentPointLabel)) {
25528
+ attachmentPointName = attachmentPointLabel;
25529
+ } else {
25530
+ var assignedAttachmentPointNames = Array.from(assignedAttachmentPoints.keys());
25531
+ attachmentPointName = ketcherCore.getNextFreeAttachmentPoint(assignedAttachmentPointNames, assignedAttachmentPointNames.length < sideAttachmentPointsNames.length);
25532
+ }
25475
25533
  selectedStructLeavingAtom.rglabel = null;
25476
- selectedStructLeavingAtom.label = 'H';
25534
+ selectedStructLeavingAtom.label = ketcherCore.AtomLabel.H;
25477
25535
  var neighborHalfBondId = selectedStructLeavingAtom.neighbors[0];
25478
25536
  var selectedStructAttachmentAtomId = (_selectedStruct$halfB = selectedStruct.halfBonds.get(neighborHalfBondId)) === null || _selectedStruct$halfB === void 0 ? void 0 : _selectedStruct$halfB.end;
25479
- var attachmentPointName = ketcherCore.getAttachmentPointLabel(i + 1);
25480
25537
  assert_1(selectedStructAttachmentAtomId !== undefined);
25481
25538
  assignedAttachmentPoints.set(attachmentPointName, [selectedStructAttachmentAtomId, selectedStructLeavingAtomId]);
25482
25539
  });
25483
- this.potentialLeavingAtoms.forEach(function (atomId, i) {
25540
+ var selectedPotentialLeavingAtoms = new Map();
25541
+ this.potentialLeavingAtoms.forEach(function (atomId) {
25484
25542
  var _selectedStruct$atoms, _selectedStruct$atoms2;
25485
25543
  var leavingAtom = currentStruct.atoms.get(atomId);
25486
25544
  assert_1(leavingAtom);
@@ -25496,7 +25554,20 @@ var Editor$3 = function () {
25496
25554
  if (attachmentAtomId === -1) {
25497
25555
  return;
25498
25556
  }
25499
- var selectedStructLeavingAtom = leavingAtom.clone();
25557
+ var originalLeavingAtomId = originalToSelectedAtomsIdMap.get(atomId);
25558
+ var isLeavingAtomSelected = _.isNumber(originalLeavingAtomId);
25559
+ if (isLeavingAtomSelected) {
25560
+ var originalAttachmentAtomId = originalToSelectedAtomsIdMap.get(attachmentAtomId);
25561
+ if (!_.isNumber(originalAttachmentAtomId)) {
25562
+ return;
25563
+ }
25564
+ selectedPotentialLeavingAtoms.set(originalAttachmentAtomId, originalLeavingAtomId);
25565
+ return;
25566
+ }
25567
+ var selectedStructLeavingAtom = new ketcherCore.Atom({
25568
+ label: ketcherCore.AtomLabel.H,
25569
+ pp: leavingAtom.pp
25570
+ });
25500
25571
  selectedStructLeavingAtom.fragment = (_selectedStruct$atoms = (_selectedStruct$atoms2 = selectedStruct.atoms.get(0)) === null || _selectedStruct$atoms2 === void 0 ? void 0 : _selectedStruct$atoms2.fragment) !== null && _selectedStruct$atoms !== void 0 ? _selectedStruct$atoms : 0;
25501
25572
  var selectedStructLeavingAtomId = selectedStruct.atoms.add(selectedStructLeavingAtom);
25502
25573
  _this2.selectedToOriginalAtomsIdMap.set(selectedStructLeavingAtomId, atomId);
@@ -25509,12 +25580,13 @@ var Editor$3 = function () {
25509
25580
  end: selectedStructLeavingAtomId
25510
25581
  });
25511
25582
  selectedStruct.bonds.add(newBond);
25512
- var attachmentPointName = ketcherCore.getAttachmentPointLabel(_this2.terminalRGroupAtoms.length + i + 1);
25583
+ var assignedAttachmentPointNames = Array.from(assignedAttachmentPoints.keys());
25584
+ var attachmentPointName = ketcherCore.getNextFreeAttachmentPoint(assignedAttachmentPointNames, assignedAttachmentPointNames.length < sideAttachmentPointsNames.length);
25513
25585
  assignedAttachmentPoints.set(attachmentPointName, [selectedStructAttachmentAtomId, selectedStructLeavingAtomId]);
25514
25586
  });
25515
25587
  this.monomerCreationState = {
25516
25588
  assignedAttachmentPoints: assignedAttachmentPoints,
25517
- potentialAttachmentPoints: new Map()
25589
+ potentialAttachmentPoints: selectedPotentialLeavingAtoms
25518
25590
  };
25519
25591
  this.originalStruct = currentStruct;
25520
25592
  this.struct(selectedStruct);
@@ -25582,10 +25654,10 @@ var Editor$3 = function () {
25582
25654
  type = data.type,
25583
25655
  naturalAnalogue = data.naturalAnalogue;
25584
25656
  var attachmentPoints = [];
25585
- this.monomerCreationState.assignedAttachmentPoints.forEach(function (_ref, attachmentPointName) {
25586
- var _ref2 = _slicedToArray__default["default"](_ref, 2),
25587
- attachmentAtomId = _ref2[0],
25588
- leavingAtomId = _ref2[1];
25657
+ this.monomerCreationState.assignedAttachmentPoints.forEach(function (_ref9, attachmentPointName) {
25658
+ var _ref10 = _slicedToArray__default["default"](_ref9, 2),
25659
+ attachmentAtomId = _ref10[0],
25660
+ leavingAtomId = _ref10[1];
25589
25661
  var attachmentPoint = {
25590
25662
  attachmentAtom: attachmentAtomId,
25591
25663
  leavingGroup: {
@@ -25631,7 +25703,7 @@ var Editor$3 = function () {
25631
25703
  var leavingAtom = _this3.struct().atoms.get(leavingAtomId);
25632
25704
  assert_1(leavingAtom);
25633
25705
  var originalLeavingAtomId = _this3.selectedToOriginalAtomsIdMap.get(leavingAtomId);
25634
- assert_1(originalLeavingAtomId);
25706
+ assert_1(_.isNumber(originalLeavingAtomId));
25635
25707
  var originalLeavingAtom = _this3.originalStruct.atoms.get(originalLeavingAtomId);
25636
25708
  assert_1(originalLeavingAtom);
25637
25709
  originalLeavingAtom.rglabel = null;
@@ -25646,9 +25718,19 @@ var Editor$3 = function () {
25646
25718
  }
25647
25719
  });
25648
25720
  var sGroupAttachmentPoints = ketcherCore.MacromoleculesConverter.convertMonomerAttachmentPointsToSGroupAttachmentPoints(monomer, this.selectedToOriginalAtomsIdMap);
25721
+ sGroupAttachmentPoints.forEach(function (ap) {
25722
+ _this3.render.ctab.molecule.bonds.forEach(function (bond) {
25723
+ var _this3$originalSelect, _this3$originalSelect2;
25724
+ if ((bond.begin === ap.atomId || bond.end === ap.atomId) && (!((_this3$originalSelect = _this3.originalSelection.atoms) !== null && _this3$originalSelect !== void 0 && _this3$originalSelect.includes(bond.begin)) || !((_this3$originalSelect2 = _this3.originalSelection.atoms) !== null && _this3$originalSelect2 !== void 0 && _this3$originalSelect2.includes(bond.end)))) {
25725
+ bond.beginSuperatomAttachmentPointNumber = ap.attachmentPointNumber;
25726
+ }
25727
+ });
25728
+ });
25649
25729
  var action = ketcherCore.fromSgroupAddition(this.render.ctab, ketcherCore.SGroup.TYPES.SUP, this.originalSelection.atoms, {
25650
25730
  expanded: true
25651
25731
  }, this.render.ctab.molecule.sgroups.newId(), sGroupAttachmentPoints, monomer.position, true, monomer.monomerItem.props.MonomerName, null, monomer);
25732
+ this.render.ctab.molecule.clearFragments();
25733
+ this.render.ctab.molecule.markFragments();
25652
25734
  this.update(action);
25653
25735
  var templateRoot = monomerTemplate.root,
25654
25736
  templateData = _objectWithoutProperties__default["default"](monomerTemplate, _excluded$p);
@@ -25697,6 +25779,21 @@ var Editor$3 = function () {
25697
25779
  this.monomerCreationState = Object.assign({}, this.monomerCreationState);
25698
25780
  this.render.update(true);
25699
25781
  }
25782
+ }, {
25783
+ key: "cleanupCloseAttachmentPointEditPopup",
25784
+ value: function cleanupCloseAttachmentPointEditPopup() {
25785
+ assert_1(this.monomerCreationState);
25786
+ this.monomerCreationState.clickedAttachmentPoint = null;
25787
+ this.render.update(true);
25788
+ }
25789
+ }, {
25790
+ key: "setProblematicAttachmentPoints",
25791
+ value: function setProblematicAttachmentPoints(problematicPoints) {
25792
+ assert_1(this.monomerCreationState);
25793
+ this.monomerCreationState.problematicAttachmentPoints = problematicPoints;
25794
+ this.monomerCreationState = Object.assign({}, this.monomerCreationState);
25795
+ this.render.update(true);
25796
+ }
25700
25797
  }, {
25701
25798
  key: "selection",
25702
25799
  value: function selection(ci) {
@@ -26116,10 +26213,10 @@ function domEventSetup(editor, clientArea) {
26116
26213
  eventName: 'mouseover',
26117
26214
  toolEventHandler: 'mouseover'
26118
26215
  }];
26119
- trackedDomEvents.forEach(function (_ref3) {
26120
- var target = _ref3.target,
26121
- eventName = _ref3.eventName,
26122
- toolEventHandler = _ref3.toolEventHandler;
26216
+ trackedDomEvents.forEach(function (_ref11) {
26217
+ var target = _ref11.target,
26218
+ eventName = _ref11.eventName,
26219
+ toolEventHandler = _ref11.toolEventHandler;
26123
26220
  editor.event[eventName] = new subscription.DOMSubscription();
26124
26221
  var subs = editor.event[eventName];
26125
26222
  target.addEventListener(eventName, function () {
@@ -26493,7 +26590,7 @@ var useMakeLeavingGroupAtomMenuItem = function useMakeLeavingGroupAtomMenuItem(_
26493
26590
  var attachmentPointName = Array.from(assignedAttachmentPoints.keys()).find(function (key) {
26494
26591
  var atomsPair = assignedAttachmentPoints.get(key);
26495
26592
  assert_1(atomsPair);
26496
- return atomsPair.includes(selectedAtomId);
26593
+ return atomsPair[1] === selectedAtomId;
26497
26594
  });
26498
26595
  var isAtomAssignedAttachmentPoint = Boolean(attachmentPointName);
26499
26596
  if (!isAtomPotentialAttachmentPoint && !isAtomAssignedAttachmentPoint) {
@@ -28654,6 +28751,9 @@ var attachmentPointAtomOptions = [{
28654
28751
  }, {
28655
28752
  value: ketcherCore.AtomLabel.F,
28656
28753
  label: 'F'
28754
+ }, {
28755
+ value: ketcherCore.AtomLabel.C,
28756
+ label: 'CH3'
28657
28757
  }];
28658
28758
  var AttachmentPointEditPopup = function AttachmentPointEditPopup(_ref) {
28659
28759
  var data = _ref.data,
@@ -28745,7 +28845,8 @@ var styles$f = {"attachmentPoint":"AttachmentPoint-module_attachmentPoint__6KD5K
28745
28845
 
28746
28846
  var AttachmentPoint = function AttachmentPoint(_ref) {
28747
28847
  var name = _ref.name,
28748
- atomLabel = _ref.atomLabel;
28848
+ atomLabel = _ref.atomLabel,
28849
+ implicitH = _ref.implicitH;
28749
28850
  return jsxRuntime.jsx("div", {
28750
28851
  className: styles$f.attachmentPoint,
28751
28852
  children: jsxRuntime.jsxs("p", {
@@ -28753,7 +28854,13 @@ var AttachmentPoint = function AttachmentPoint(_ref) {
28753
28854
  children: [jsxRuntime.jsx("span", {
28754
28855
  className: styles$f.attachmentPointIndex,
28755
28856
  children: name
28756
- }), "\xA0(", atomLabel, ")"]
28857
+ }), "\xA0", jsxRuntime.jsxs("span", {
28858
+ children: ["(", implicitH > 1 && jsxRuntime.jsxs(jsxRuntime.Fragment, {
28859
+ children: ["H", jsxRuntime.jsx("sub", {
28860
+ children: implicitH
28861
+ })]
28862
+ }), atomLabel, ")"]
28863
+ })]
28757
28864
  })
28758
28865
  });
28759
28866
  };
@@ -28880,31 +28987,50 @@ var validateInputs = function validateInputs(values) {
28880
28987
  };
28881
28988
  var validateAttachmentPoints = function validateAttachmentPoints(attachmentPoints) {
28882
28989
  var notifications = new Map();
28990
+ var problematicAttachmentPoints = new Set();
28883
28991
  if (attachmentPoints.length === 0) {
28884
28992
  notifications.set('noAttachmentPoints', {
28885
28993
  type: 'error',
28886
28994
  message: NotificationMessages.noAttachmentPoints
28887
28995
  });
28888
- return notifications;
28996
+ return {
28997
+ notifications: notifications,
28998
+ problematicAttachmentPoints: problematicAttachmentPoints
28999
+ };
28889
29000
  }
28890
- var attachmentPointNumbers = attachmentPoints.map(ketcherCore.getAttachmentPointNumberFromLabel);
28891
- attachmentPointNumbers.sort(function (a, b) {
28892
- return a - b;
29001
+ var sideAttachmentPoints = attachmentPoints.filter(function (attachmentPointName) {
29002
+ var pointNumber = ketcherCore.getAttachmentPointNumberFromLabel(attachmentPointName);
29003
+ return pointNumber > 2;
28893
29004
  });
28894
- var startingIndex = 0;
28895
- while (attachmentPointNumbers[startingIndex] <= 2) {
28896
- startingIndex++;
29005
+ if (sideAttachmentPoints.length === 0) {
29006
+ return {
29007
+ notifications: notifications,
29008
+ problematicAttachmentPoints: problematicAttachmentPoints
29009
+ };
28897
29010
  }
28898
- for (var i = startingIndex; i < attachmentPointNumbers.length; i++) {
28899
- if (attachmentPointNumbers[i] - attachmentPointNumbers[i - 1] > 1) {
28900
- notifications.set('incorrectAttachmentPointsOrder', {
28901
- type: 'error',
28902
- message: NotificationMessages.incorrectAttachmentPointsOrder
28903
- });
28904
- break;
29011
+ var expectedSequence = [];
29012
+ for (var i = 3; i < 3 + sideAttachmentPoints.length; i++) {
29013
+ expectedSequence.push(i);
29014
+ }
29015
+ var actualNumbers = sideAttachmentPoints.map(ketcherCore.getAttachmentPointNumberFromLabel).sort(function (a, b) {
29016
+ return a - b;
29017
+ });
29018
+ actualNumbers.forEach(function (actualNumber) {
29019
+ if (!expectedSequence.includes(actualNumber)) {
29020
+ var problematicPointName = ketcherCore.getAttachmentPointLabel(actualNumber);
29021
+ problematicAttachmentPoints.add(problematicPointName);
28905
29022
  }
29023
+ });
29024
+ if (problematicAttachmentPoints.size > 0) {
29025
+ notifications.set('incorrectAttachmentPointsOrder', {
29026
+ type: 'error',
29027
+ message: NotificationMessages.incorrectAttachmentPointsOrder
29028
+ });
28906
29029
  }
28907
- return notifications;
29030
+ return {
29031
+ notifications: notifications,
29032
+ problematicAttachmentPoints: problematicAttachmentPoints
29033
+ };
28908
29034
  };
28909
29035
  var MonomerCreationWizard = function MonomerCreationWizard() {
28910
29036
  var _useAppContext = useAppContext(),
@@ -29001,6 +29127,7 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
29001
29127
  };
29002
29128
  var handleAttachmentPointEditPopupClose = function handleAttachmentPointEditPopupClose() {
29003
29129
  setAttachmentPointEditPopupData(null);
29130
+ editor.cleanupCloseAttachmentPointEditPopup();
29004
29131
  };
29005
29132
  var handleDiscard = function handleDiscard() {
29006
29133
  editor.closeMonomerCreationWizard();
@@ -29025,12 +29152,15 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
29025
29152
  return;
29026
29153
  }
29027
29154
  assert_1(editor.monomerCreationState);
29028
- var attachmentPointsNotifications = validateAttachmentPoints(Array.from(editor.monomerCreationState.assignedAttachmentPoints.keys()));
29155
+ var _validateAttachmentPo = validateAttachmentPoints(Array.from(editor.monomerCreationState.assignedAttachmentPoints.keys())),
29156
+ attachmentPointsNotifications = _validateAttachmentPo.notifications,
29157
+ problematicAttachmentPoints = _validateAttachmentPo.problematicAttachmentPoints;
29029
29158
  if (attachmentPointsNotifications.size > 0) {
29030
29159
  wizardStateDispatch({
29031
29160
  type: 'SetNotifications',
29032
29161
  notifications: attachmentPointsNotifications
29033
29162
  });
29163
+ editor.setProblematicAttachmentPoints(problematicAttachmentPoints);
29034
29164
  return;
29035
29165
  }
29036
29166
  editor.saveNewMonomer({
@@ -29040,6 +29170,7 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
29040
29170
  naturalAnalogue: naturalAnalogue
29041
29171
  });
29042
29172
  resetWizard();
29173
+ editor.setProblematicAttachmentPoints(new Set());
29043
29174
  };
29044
29175
  var monomerCreationState = reactRedux.useSelector(editorMonomerCreationStateSelector);
29045
29176
  if (!monomerCreationState) {
@@ -29055,12 +29186,14 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
29055
29186
  if (!atom) {
29056
29187
  return {
29057
29188
  name: attachmentPointName,
29058
- atomLabel: 'H'
29189
+ atomLabel: 'H',
29190
+ implicitH: 0
29059
29191
  };
29060
29192
  }
29061
29193
  return {
29062
29194
  name: attachmentPointName,
29063
- atomLabel: atom.label
29195
+ atomLabel: atom.label,
29196
+ implicitH: atom.implicitH
29064
29197
  };
29065
29198
  });
29066
29199
  var ketcherEditorRootElement = document.querySelector(KETCHER_ROOT_NODE_CSS_SELECTOR);
@@ -29160,10 +29293,12 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
29160
29293
  className: styles$l.attachmentPoints,
29161
29294
  children: attachmentPointsData.map(function (_ref5) {
29162
29295
  var name = _ref5.name,
29163
- atomLabel = _ref5.atomLabel;
29296
+ atomLabel = _ref5.atomLabel,
29297
+ implicitH = _ref5.implicitH;
29164
29298
  return jsxRuntime.jsx(AttachmentPoint, {
29165
29299
  name: name,
29166
- atomLabel: atomLabel
29300
+ atomLabel: atomLabel,
29301
+ implicitH: implicitH
29167
29302
  }, name);
29168
29303
  })
29169
29304
  })]
@@ -37174,8 +37309,8 @@ var KetcherBuilder = function () {
37174
37309
  cleanup = initApp(prevKetcherId, ketcherId, element, appRoot, staticResourcesUrl, {
37175
37310
  buttons: buttons || {},
37176
37311
  errorHandler: errorHandler || null,
37177
- version: "3.8.0-rc.2" ,
37178
- buildDate: "2025-09-05T18:59:48" ,
37312
+ version: "3.8.0-rc.3" ,
37313
+ buildDate: "2025-09-16T18:11:14" ,
37179
37314
  buildNumber: '',
37180
37315
  customButtons: customButtons || []
37181
37316
  }, structService, resolve, togglerComponent);
@@ -37470,7 +37605,7 @@ var ModeControl = function ModeControl(_ref3) {
37470
37605
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
37471
37606
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
37472
37607
  var MacromoleculesEditorComponent = React.lazy(function () {
37473
- return Promise.resolve().then(function () { return require('./index.modern-30f7e490.js'); });
37608
+ return Promise.resolve().then(function () { return require('./index.modern-38b83c77.js'); });
37474
37609
  });
37475
37610
  var Editor = function Editor(props) {
37476
37611
  var _useState = React.useState(false),