ketcher-react 3.12.0-rc.1 → 3.12.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.
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
- import { Action, Atom, AtomLabel, AttachmentPointName, Editor as KetcherEditor, FloatingToolsParams, IKetMonomerTemplate, MonomerCreationState, MULTITAIL_ARROW_KEY, Render, Struct, KetMonomerClass, RnaPresetComponentKey } from 'ketcher-core';
16
+ import { Action, Atom, AtomLabel, AttachmentPointName, Editor as KetcherEditor, FloatingToolsParams, IKetMonomerTemplate, MonomerCreationState, MULTITAIL_ARROW_KEY, Render, Struct, Vec2, KetMonomerClass, RnaPresetComponentKey } from 'ketcher-core';
17
17
  import { PipelineSubscription, Subscription } from 'subscription';
18
18
  import { Highlighter } from './highlighter';
19
19
  import { ContextMenuInfo } from '../ui/views/components/ContextMenu/contextMenu.types';
@@ -117,7 +117,7 @@ declare class Editor implements KetcherEditor {
117
117
  assignConnectionPointAtom(atomId: number, attachmentPointName?: AttachmentPointName, assignedAttachmentPointsByMonomer?: Map<AttachmentPointName, [
118
118
  number,
119
119
  number
120
- ]>, monomerStructure?: Selection, forceAddNewLeavingGroupAtom?: boolean, leavingAtomLabel?: AtomLabel): void;
120
+ ]>, monomerStructure?: Selection, forceAddNewLeavingGroupAtom?: boolean, leavingAtomLabel?: AtomLabel, leavingAtomPosition?: Vec2): void;
121
121
  closeMonomerCreationWizard(restoreOriginalStruct?: boolean): void;
122
122
  saveNewMonomer(data: any): {
123
123
  monomer: import("ketcher-core").Chem | import("ketcher-core").Sugar | import("ketcher-core").Peptide | import("ketcher-core").RNABase | import("ketcher-core").Phosphate;
package/dist/index.js CHANGED
@@ -8473,7 +8473,7 @@ var zoom = {
8473
8473
 
8474
8474
  var openHelpLink = function openHelpLink() {
8475
8475
  var _window$open;
8476
- return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.12.0-rc.1\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
8476
+ return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.12.0\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
8477
8477
  };
8478
8478
  var help = {
8479
8479
  help: {
@@ -26235,6 +26235,7 @@ var Editor$3 = function () {
26235
26235
  var _this2 = this;
26236
26236
  var forceAddNewLeavingGroupAtom = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
26237
26237
  var leavingAtomLabel = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : AtomLabel.H;
26238
+ var leavingAtomPosition = arguments.length > 6 ? arguments[6] : undefined;
26238
26239
  assert_1(this.monomerCreationState);
26239
26240
  var potentialLeavingAtoms = this.monomerCreationState.potentialAttachmentPoints.get(atomId);
26240
26241
  var leavingAtomId;
@@ -26264,7 +26265,7 @@ var Editor$3 = function () {
26264
26265
  stereo: Bond$2.PATTERN.STEREO.NONE
26265
26266
  }, atomId, {
26266
26267
  label: leavingAtomLabel
26267
- }),
26268
+ }, undefined, leavingAtomPosition),
26268
26269
  _fromBondAddition2 = _slicedToArray$1(_fromBondAddition, 4),
26269
26270
  bondAdditionAction = _fromBondAddition2[0],
26270
26271
  endAtomId = _fromBondAddition2[2],
@@ -32425,14 +32426,18 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
32425
32426
  });
32426
32427
  var bondBetweenSugarAndBase = _toConsumableArray(bondsBetweenSugarAndBase.values())[0];
32427
32428
  var bondBetweenSugarAndPhosphate = _toConsumableArray(bondsBetweenSugarAndPhosphate.values())[0];
32428
- var sugarR3AttachmentPointAtom = sugarStructure !== null && sugarStructure !== void 0 && (_sugarStructure$atoms5 = sugarStructure.atoms) !== null && _sugarStructure$atoms5 !== void 0 && _sugarStructure$atoms5.includes(bondBetweenSugarAndBase.begin) ? bondBetweenSugarAndBase.begin : bondBetweenSugarAndBase.end;
32429
- var sugarR2AttachmentPointAtom = sugarStructure !== null && sugarStructure !== void 0 && (_sugarStructure$atoms6 = sugarStructure.atoms) !== null && _sugarStructure$atoms6 !== void 0 && _sugarStructure$atoms6.includes(bondBetweenSugarAndPhosphate.begin) ? bondBetweenSugarAndPhosphate.begin : bondBetweenSugarAndPhosphate.end;
32430
- var baseR1AttachmentPointAtom = baseStructure !== null && baseStructure !== void 0 && (_baseStructure$atoms3 = baseStructure.atoms) !== null && _baseStructure$atoms3 !== void 0 && _baseStructure$atoms3.includes(bondBetweenSugarAndBase.begin) ? bondBetweenSugarAndBase.begin : bondBetweenSugarAndBase.end;
32431
- var phosphateR1AttachmentPointAtom = phosphateStructure !== null && phosphateStructure !== void 0 && (_phosphateStructure$a3 = phosphateStructure.atoms) !== null && _phosphateStructure$a3 !== void 0 && _phosphateStructure$a3.includes(bondBetweenSugarAndPhosphate.begin) ? bondBetweenSugarAndPhosphate.begin : bondBetweenSugarAndPhosphate.end;
32432
- editor.assignConnectionPointAtom(baseR1AttachmentPointAtom, AttachmentPointName.R1, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.base), rnaPresetWizardState.base.structure, true, getLeavingAtomForAttachmentPoint(KetMonomerClass.Base, AttachmentPointName.R1));
32433
- editor.assignConnectionPointAtom(sugarR2AttachmentPointAtom, AttachmentPointName.R2, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.sugar), rnaPresetWizardState.sugar.structure, true, getLeavingAtomForAttachmentPoint(KetMonomerClass.Sugar, AttachmentPointName.R2));
32434
- editor.assignConnectionPointAtom(sugarR3AttachmentPointAtom, AttachmentPointName.R3, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.sugar), rnaPresetWizardState.sugar.structure, true, getLeavingAtomForAttachmentPoint(KetMonomerClass.Sugar, AttachmentPointName.R3));
32435
- editor.assignConnectionPointAtom(phosphateR1AttachmentPointAtom, AttachmentPointName.R1, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.phosphate), rnaPresetWizardState.phosphate.structure, true, getLeavingAtomForAttachmentPoint(KetMonomerClass.Phosphate, AttachmentPointName.R1));
32429
+ var sugarR3AttachmentPointAtomId = sugarStructure !== null && sugarStructure !== void 0 && (_sugarStructure$atoms5 = sugarStructure.atoms) !== null && _sugarStructure$atoms5 !== void 0 && _sugarStructure$atoms5.includes(bondBetweenSugarAndBase.begin) ? bondBetweenSugarAndBase.begin : bondBetweenSugarAndBase.end;
32430
+ var sugarR3AttachmentAtom = struct.atoms.get(sugarR3AttachmentPointAtomId);
32431
+ var sugarR2AttachmentPointAtomId = sugarStructure !== null && sugarStructure !== void 0 && (_sugarStructure$atoms6 = sugarStructure.atoms) !== null && _sugarStructure$atoms6 !== void 0 && _sugarStructure$atoms6.includes(bondBetweenSugarAndPhosphate.begin) ? bondBetweenSugarAndPhosphate.begin : bondBetweenSugarAndPhosphate.end;
32432
+ var sugarR2AttachmentAtom = struct.atoms.get(sugarR2AttachmentPointAtomId);
32433
+ var baseR1AttachmentPointAtomId = baseStructure !== null && baseStructure !== void 0 && (_baseStructure$atoms3 = baseStructure.atoms) !== null && _baseStructure$atoms3 !== void 0 && _baseStructure$atoms3.includes(bondBetweenSugarAndBase.begin) ? bondBetweenSugarAndBase.begin : bondBetweenSugarAndBase.end;
32434
+ var baseR1AttachmentAtom = struct.atoms.get(baseR1AttachmentPointAtomId);
32435
+ var phosphateR1AttachmentPointAtomId = phosphateStructure !== null && phosphateStructure !== void 0 && (_phosphateStructure$a3 = phosphateStructure.atoms) !== null && _phosphateStructure$a3 !== void 0 && _phosphateStructure$a3.includes(bondBetweenSugarAndPhosphate.begin) ? bondBetweenSugarAndPhosphate.begin : bondBetweenSugarAndPhosphate.end;
32436
+ var phosphateR1AttachmentAtom = struct.atoms.get(phosphateR1AttachmentPointAtomId);
32437
+ editor.assignConnectionPointAtom(baseR1AttachmentPointAtomId, AttachmentPointName.R1, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.base), rnaPresetWizardState.base.structure, true, getLeavingAtomForAttachmentPoint(KetMonomerClass.Base, AttachmentPointName.R1), sugarR3AttachmentAtom === null || sugarR3AttachmentAtom === void 0 ? void 0 : sugarR3AttachmentAtom.pp);
32438
+ editor.assignConnectionPointAtom(sugarR2AttachmentPointAtomId, AttachmentPointName.R2, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.sugar), rnaPresetWizardState.sugar.structure, true, getLeavingAtomForAttachmentPoint(KetMonomerClass.Sugar, AttachmentPointName.R2), phosphateR1AttachmentAtom === null || phosphateR1AttachmentAtom === void 0 ? void 0 : phosphateR1AttachmentAtom.pp);
32439
+ editor.assignConnectionPointAtom(sugarR3AttachmentPointAtomId, AttachmentPointName.R3, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.sugar), rnaPresetWizardState.sugar.structure, true, getLeavingAtomForAttachmentPoint(KetMonomerClass.Sugar, AttachmentPointName.R3), baseR1AttachmentAtom === null || baseR1AttachmentAtom === void 0 ? void 0 : baseR1AttachmentAtom.pp);
32440
+ editor.assignConnectionPointAtom(phosphateR1AttachmentPointAtomId, AttachmentPointName.R1, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.phosphate), rnaPresetWizardState.phosphate.structure, true, getLeavingAtomForAttachmentPoint(KetMonomerClass.Phosphate, AttachmentPointName.R1), sugarR2AttachmentAtom === null || sugarR2AttachmentAtom === void 0 ? void 0 : sugarR2AttachmentAtom.pp);
32436
32441
  }
32437
32442
  monomersToSave.forEach(function (monomerToSave) {
32438
32443
  var atomIdMap = new Map();
@@ -40914,8 +40919,8 @@ var KetcherBuilder = function () {
40914
40919
  cleanup = initApp(prevKetcherId, ketcherId, element, appRoot, staticResourcesUrl, {
40915
40920
  buttons: buttons || {},
40916
40921
  errorHandler: errorHandler || null,
40917
- version: "3.12.0-rc.1" ,
40918
- buildDate: "2026-01-08T17:45:33" ,
40922
+ version: "3.12.0" ,
40923
+ buildDate: "2026-03-04T11:10:15" ,
40919
40924
  buildNumber: '',
40920
40925
  customButtons: customButtons || []
40921
40926
  }, structService, resolve, togglerComponent);
@@ -41216,7 +41221,7 @@ var ModeControl = function ModeControl(_ref3) {
41216
41221
  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; }
41217
41222
  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$1(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; }
41218
41223
  var MacromoleculesEditorComponent = lazy(function () {
41219
- return import('./index.modern-521d26f9.js');
41224
+ return import('./index.modern-b9db71c5.js');
41220
41225
  });
41221
41226
  var Editor = function Editor(props) {
41222
41227
  var _useState = useState(false),