ketcher-react 2.2.0 → 2.3.2

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.
Files changed (200) hide show
  1. package/LICENSE +1 -1
  2. package/dist/Editor.d.ts +3 -0
  3. package/dist/contexts/appContext.d.ts +6 -0
  4. package/dist/contexts/index.d.ts +3 -2
  5. package/dist/hooks/index.d.ts +1 -0
  6. package/dist/hooks/useAppContext.d.ts +1 -0
  7. package/dist/hooks/useResizeObserver.d.ts +1 -1
  8. package/dist/hooks/useSettingsContext.d.ts +1 -1
  9. package/dist/index.css +3 -2
  10. package/dist/index.css.map +1 -1
  11. package/dist/index.d.ts +2 -0
  12. package/dist/index.js +16256 -21706
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.modern.js +16169 -21618
  15. package/dist/index.modern.js.map +1 -1
  16. package/dist/script/api.d.ts +2 -2
  17. package/dist/script/builders/ketcher/KetcherBuilder.d.ts +1 -1
  18. package/dist/script/editor/Editor.d.ts +11 -4
  19. package/dist/script/editor/actions/bond.d.ts +24 -24
  20. package/dist/script/editor/actions/reaction.d.ts +1 -1
  21. package/dist/script/editor/actions/text.d.ts +6 -0
  22. package/dist/script/editor/actions/utils.d.ts +1 -2
  23. package/dist/script/editor/operations/CanvasLoad.d.ts +1 -1
  24. package/dist/script/editor/operations/EnhancedFlagMove.d.ts +1 -1
  25. package/dist/script/editor/operations/FragmentStereoFlag.d.ts +3 -5
  26. package/dist/script/editor/operations/LoopMove.d.ts +1 -1
  27. package/dist/script/editor/operations/OperationType.d.ts +5 -0
  28. package/dist/script/editor/operations/Text/TextCreateDelete.d.ts +41 -0
  29. package/dist/script/{chem/struct/simpleObject.d.ts → editor/operations/Text/TextMove.d.ts} +12 -15
  30. package/dist/script/{util/pool.d.ts → editor/operations/Text/TextUpdate.d.ts} +14 -10
  31. package/dist/script/editor/operations/Text/index.d.ts +3 -0
  32. package/dist/script/editor/operations/atom/AtomAttr.d.ts +1 -1
  33. package/dist/script/editor/operations/atom/AtomMove.d.ts +1 -1
  34. package/dist/script/editor/operations/base.d.ts +2 -2
  35. package/dist/script/editor/operations/bond/BondAttr.d.ts +1 -1
  36. package/dist/script/editor/operations/bond/BondMove.d.ts +1 -1
  37. package/dist/script/editor/operations/bond/index.d.ts +15 -0
  38. package/dist/script/{util/pile.d.ts → editor/operations/calcimplicitH.d.ts} +8 -10
  39. package/dist/script/editor/operations/fragment.d.ts +1 -1
  40. package/dist/script/editor/operations/fragmentStereoAtom.d.ts +1 -1
  41. package/dist/script/editor/operations/index.d.ts +2 -0
  42. package/dist/script/editor/operations/rxn/index.d.ts +18 -1
  43. package/dist/script/editor/operations/rxn/plus/RxnPlusMove.d.ts +1 -1
  44. package/dist/script/editor/operations/sgroup/index.d.ts +1 -1
  45. package/dist/script/editor/operations/sgroup/sgroupHierarchy.d.ts +0 -2
  46. package/dist/script/editor/operations/simpleObject.d.ts +9 -11
  47. package/dist/script/editor/shared/action.d.ts +2 -2
  48. package/dist/script/editor/shared/utils.d.ts +2 -2
  49. package/dist/script/editor/tool/attach.d.ts +4 -1
  50. package/dist/script/editor/tool/enhanced-stereo.d.ts +2 -1
  51. package/dist/script/editor/tool/helper/lasso.d.ts +3 -0
  52. package/dist/script/editor/tool/helper/locate.d.ts +2 -0
  53. package/dist/script/editor/tool/index.d.ts +2 -0
  54. package/dist/script/editor/tool/reactionarrow.d.ts +4 -4
  55. package/dist/script/editor/tool/rotate.d.ts +1 -1
  56. package/dist/script/editor/tool/text.d.ts +27 -0
  57. package/dist/script/editor/utils/elementOffset.d.ts +1 -1
  58. package/dist/script/index.d.ts +1 -1
  59. package/dist/script/ketcher.d.ts +1 -2
  60. package/dist/script/render/draw.d.ts +13 -7
  61. package/dist/script/render/index.d.ts +5 -5
  62. package/dist/script/render/restruct/GeneralEnumTypes.d.ts +35 -0
  63. package/dist/script/render/restruct/ReEnhancedFlag.d.ts +28 -0
  64. package/dist/script/render/restruct/ReObject.d.ts +32 -0
  65. package/dist/script/render/restruct/ReSimpleObject.d.ts +40 -0
  66. package/dist/script/render/restruct/ReStruct.d.ts +110 -0
  67. package/dist/script/render/restruct/ReText.d.ts +38 -0
  68. package/dist/script/render/restruct/index.d.ts +5 -84
  69. package/dist/script/render/restruct/reatom.d.ts +41 -17
  70. package/dist/script/render/restruct/rebond.d.ts +36 -26
  71. package/dist/script/render/restruct/redatasgroupdata.d.ts +3 -7
  72. package/dist/script/render/restruct/refrag.d.ts +3 -7
  73. package/dist/script/render/restruct/reloop.d.ts +4 -8
  74. package/dist/script/render/restruct/rergroup.d.ts +4 -7
  75. package/dist/script/render/restruct/rerxnarrow.d.ts +3 -7
  76. package/dist/script/render/restruct/rerxnplus.d.ts +3 -7
  77. package/dist/script/render/restruct/resgroup.d.ts +3 -6
  78. package/dist/script/render/restruct/visel.d.ts +1 -2
  79. package/dist/script/render/util.d.ts +1 -1
  80. package/dist/script/ui/action/action.types.d.ts +1 -1
  81. package/dist/script/ui/action/atoms.d.ts +1 -1
  82. package/dist/script/ui/action/debug.d.ts +2 -2
  83. package/dist/script/ui/action/index.d.ts +392 -2
  84. package/dist/script/ui/action/templates.d.ts +10 -1
  85. package/dist/script/ui/action/tools.d.ts +16 -1
  86. package/dist/script/ui/component/form/colorPicker/ColorPicker.d.ts +12 -0
  87. package/dist/script/{chem/molfile/molfile.test.d.ts → ui/component/form/colorPicker/ColorPicker.test.d.ts} +0 -0
  88. package/dist/script/ui/component/view/savebutton.d.ts +1 -5
  89. package/dist/script/ui/data/convert/structConverter.d.ts +3 -3
  90. package/dist/script/ui/data/convert/structconv.d.ts +6 -4
  91. package/dist/script/ui/data/schema/options-schema.d.ts +25 -167
  92. package/dist/script/ui/data/schema/struct-schema.d.ts +20 -2
  93. package/dist/script/ui/data/templates.d.ts +1 -1
  94. package/dist/script/ui/dialog/index.d.ts +43 -7
  95. package/dist/script/ui/dialog/template/TemplateLib.d.ts +1 -1
  96. package/dist/script/ui/dialog/template/TemplateTable.d.ts +1 -1
  97. package/dist/script/ui/dialog/toolbox/enhancedStereo.d.ts +2 -0
  98. package/dist/script/ui/state/constants.d.ts +7 -0
  99. package/dist/script/ui/state/editor/index.d.ts +1 -2
  100. package/dist/script/ui/state/modal/form.d.ts +10 -2
  101. package/dist/script/ui/state/options/index.d.ts +4 -3
  102. package/dist/script/ui/state/shared.d.ts +1 -1
  103. package/dist/script/ui/views/components/Dialog/Dialog.d.ts +6 -8
  104. package/dist/script/ui/views/components/Dialog/index.d.ts +1 -1
  105. package/dist/script/ui/views/components/index.d.ts +1 -2
  106. package/dist/script/ui/views/modal/Modal.d.ts +4 -7
  107. package/dist/script/{format/chemGraph/toGraph/simpleObjectToGraph.d.ts → ui/views/modal/components/Text/Text.d.ts} +4 -5
  108. package/dist/script/ui/views/modal/components/Text/TextButton/TextButton.d.ts +14 -0
  109. package/dist/script/ui/views/modal/components/Text/TextButton/index.d.ts +1 -0
  110. package/dist/script/{util/scale.d.ts → ui/views/modal/components/Text/index.d.ts} +2 -8
  111. package/dist/script/ui/views/modal/components/document/Open/Open.container.d.ts +18 -0
  112. package/dist/script/ui/views/modal/components/document/Open/Open.d.ts +24 -2
  113. package/dist/script/ui/views/modal/components/document/Open/index.d.ts +1 -1
  114. package/dist/script/ui/views/modal/components/document/Save/SaveImageTab.d.ts +4 -0
  115. package/dist/script/ui/views/modal/components/meta/Settings/Settings.d.ts +16 -1
  116. package/dist/script/ui/views/modal/components/meta/Settings/components/Accordion/Accordion.d.ts +35 -13
  117. package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.container.d.ts +20 -0
  118. package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.d.ts +36 -0
  119. package/dist/script/ui/views/modal/components/toolbox/Atom/ElementNumber/ElementNumber.d.ts +6 -0
  120. package/dist/script/ui/views/modal/components/toolbox/Atom/ElementNumber/index.d.ts +16 -0
  121. package/dist/script/ui/views/modal/components/toolbox/Atom/index.d.ts +16 -0
  122. package/dist/script/ui/views/modal/components/toolbox/Attach/Attach.container.d.ts +20 -0
  123. package/dist/script/ui/views/modal/components/toolbox/Attach/Attach.d.ts +24 -0
  124. package/dist/script/ui/views/modal/components/toolbox/Attach/index.d.ts +16 -0
  125. package/dist/script/ui/views/modal/components/toolbox/Automap/Automap.container.d.ts +20 -0
  126. package/dist/script/ui/views/modal/components/toolbox/Automap/Automap.d.ts +32 -0
  127. package/dist/script/ui/views/modal/components/toolbox/Automap/index.d.ts +16 -0
  128. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.container.d.ts +20 -0
  129. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.d.ts +10 -0
  130. package/dist/script/ui/views/modal/components/toolbox/Bond/index.d.ts +16 -0
  131. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/RgroupLogic.container.d.ts +20 -0
  132. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/RgroupLogic.d.ts +28 -0
  133. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/components/IfThenSelect/IfThenSelect.d.ts +19 -0
  134. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/components/IfThenSelect/index.d.ts +16 -0
  135. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/components/index.d.ts +16 -0
  136. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/index.d.ts +16 -0
  137. package/dist/script/ui/views/modal/components/toolbox/index.d.ts +21 -0
  138. package/dist/script/ui/views/modal/modal.types.d.ts +28 -0
  139. package/dist/script/ui/views/toolbars/LeftToolbar/Bond/options.d.ts +2 -1
  140. package/dist/script/ui/views/toolbars/LeftToolbar/LeftToolbar.container.d.ts +1 -1
  141. package/dist/script/ui/views/toolbars/LeftToolbar/LeftToolbar.d.ts +15 -1
  142. package/dist/script/ui/views/toolbars/LeftToolbar/RGroup/RGroup.d.ts +15 -0
  143. package/dist/script/ui/views/toolbars/LeftToolbar/Shape/Shape.d.ts +15 -0
  144. package/dist/script/ui/views/toolbars/mediaSizes.d.ts +0 -1
  145. package/dist/script/ui/views/toolbars/toolbar.types.d.ts +3 -3
  146. package/package.json +7 -3
  147. package/dist/script/chem/element-color.d.ts +0 -2
  148. package/dist/script/chem/element.d.ts +0 -57
  149. package/dist/script/chem/generics.d.ts +0 -5
  150. package/dist/script/chem/molfile/common.d.ts +0 -34
  151. package/dist/script/chem/molfile/index.d.ts +0 -10
  152. package/dist/script/chem/molfile/molfile.d.ts +0 -47
  153. package/dist/script/chem/molfile/molfileFormat.d.ts +0 -1
  154. package/dist/script/chem/molfile/parseSGroup.d.ts +0 -42
  155. package/dist/script/chem/molfile/utils.d.ts +0 -66
  156. package/dist/script/chem/molfile/v2000.d.ts +0 -10
  157. package/dist/script/chem/molfile/v3000.d.ts +0 -10
  158. package/dist/script/chem/sdf.d.ts +0 -10
  159. package/dist/script/chem/smiles/cis_trans.d.ts +0 -25
  160. package/dist/script/chem/smiles/dfs.d.ts +0 -53
  161. package/dist/script/chem/smiles/index.d.ts +0 -5
  162. package/dist/script/chem/smiles/stereocenters.d.ts +0 -26
  163. package/dist/script/chem/struct/atom.d.ts +0 -66
  164. package/dist/script/chem/struct/atomlist.d.ts +0 -10
  165. package/dist/script/chem/struct/bond.d.ts +0 -72
  166. package/dist/script/chem/struct/fragment.d.ts +0 -50
  167. package/dist/script/chem/struct/index.d.ts +0 -137
  168. package/dist/script/chem/struct/rgroup.d.ts +0 -19
  169. package/dist/script/chem/struct/sgforest.d.ts +0 -42
  170. package/dist/script/chem/struct/sgroup.d.ts +0 -68
  171. package/dist/script/format/chemGraph/convertStruct.d.ts +0 -2
  172. package/dist/script/format/chemGraph/fromGraph/moleculeToStruct.d.ts +0 -10
  173. package/dist/script/format/chemGraph/fromGraph/rgroupToStruct.d.ts +0 -3
  174. package/dist/script/format/chemGraph/fromGraph/rxnToStruct.d.ts +0 -1
  175. package/dist/script/format/chemGraph/fromGraph/simpleObjectToStruct.d.ts +0 -1
  176. package/dist/script/format/chemGraph/index.d.ts +0 -13
  177. package/dist/script/format/chemGraph/toGraph/headerToGraph.d.ts +0 -1
  178. package/dist/script/format/chemGraph/toGraph/moleculeToGraph.d.ts +0 -4
  179. package/dist/script/format/chemGraph/toGraph/prepare.d.ts +0 -14
  180. package/dist/script/format/chemGraph/toGraph/rgroupToGraph.d.ts +0 -5
  181. package/dist/script/format/chemGraph/toGraph/rxnToGraph.d.ts +0 -10
  182. package/dist/script/format/graphValidator.d.ts +0 -1
  183. package/dist/script/format/schemes/moleculeSchema.d.ts +0 -596
  184. package/dist/script/format/schemes/rgroupSchema.d.ts +0 -60
  185. package/dist/script/format/schemes/rootSchema.d.ts +0 -102
  186. package/dist/script/format/schemes/rxnSchemas.d.ts +0 -58
  187. package/dist/script/format/schemes/simpleObjectSchema.d.ts +0 -45
  188. package/dist/script/format/utils.d.ts +0 -1
  189. package/dist/script/render/restruct/reenhancedflag.d.ts +0 -15
  190. package/dist/script/render/restruct/reobject.d.ts +0 -15
  191. package/dist/script/render/restruct/resimpleobject.d.ts +0 -23
  192. package/dist/script/ui/dialog/toolbox/atom.d.ts +0 -2
  193. package/dist/script/ui/dialog/toolbox/attach.d.ts +0 -2
  194. package/dist/script/ui/dialog/toolbox/automap.d.ts +0 -18
  195. package/dist/script/ui/dialog/toolbox/bond.d.ts +0 -2
  196. package/dist/script/ui/dialog/toolbox/enhanced-stereo.d.ts +0 -2
  197. package/dist/script/ui/dialog/toolbox/rgroup-logic.d.ts +0 -2
  198. package/dist/script/util/banner.d.ts +0 -0
  199. package/dist/script/util/box2abs.d.ts +0 -23
  200. package/dist/script/util/vec2.d.ts +0 -75
@@ -1,42 +0,0 @@
1
- declare namespace _default {
2
- export { readKeyValuePairs };
3
- export { readKeyMultiValuePairs };
4
- export { loadSGroup };
5
- export { initSGroup };
6
- export { applySGroupProp };
7
- export { applySGroupArrayProp };
8
- export { applyDataSGroupName };
9
- export { applyDataSGroupQuery };
10
- export { applyDataSGroupQueryOp };
11
- export { applyDataSGroupDesc };
12
- export { applyDataSGroupInfo };
13
- export { applyDataSGroupData };
14
- export { applyDataSGroupInfoLine };
15
- export { applyDataSGroupDataLine };
16
- }
17
- export default _default;
18
- /**
19
- * @param str { string }
20
- * @param valueString { boolean }
21
- * @returns { Pool }
22
- */
23
- declare function readKeyValuePairs(str: string, valueString: boolean): Pool;
24
- /**
25
- * @param str { string }
26
- * @param valueString { boolean }
27
- * @returns { Array }
28
- */
29
- declare function readKeyMultiValuePairs(str: string, valueString: boolean): any[];
30
- declare function loadSGroup(mol: any, sg: any, atomMap: any): any;
31
- declare function initSGroup(sGroups: any, propData: any): void;
32
- declare function applySGroupProp(sGroups: any, propName: any, propData: any, numeric: any, core: any): void;
33
- declare function applySGroupArrayProp(sGroups: any, propName: any, propData: any, shift: any): void;
34
- declare function applyDataSGroupName(sg: any, name: any): void;
35
- declare function applyDataSGroupQuery(sg: any, query: any): void;
36
- declare function applyDataSGroupQueryOp(sg: any, queryOp: any): void;
37
- declare function applyDataSGroupDesc(sGroups: any, propData: any): void;
38
- declare function applyDataSGroupInfo(sg: any, propData: any): void;
39
- declare function applyDataSGroupData(sg: any, data: any, finalize: any): void;
40
- declare function applyDataSGroupInfoLine(sGroups: any, propData: any): void;
41
- declare function applyDataSGroupDataLine(sGroups: any, propData: any, finalize: any): void;
42
- import Pool from "../../util/pool";
@@ -1,66 +0,0 @@
1
- declare namespace _default {
2
- export { fmtInfo };
3
- export { paddedNum };
4
- export { parseDecimalInt };
5
- export { partitionLine };
6
- export { partitionLineFixed };
7
- export { rxnMerge };
8
- }
9
- export default _default;
10
- declare namespace fmtInfo {
11
- const bondTypeMap: {
12
- 1: number;
13
- 2: number;
14
- 3: number;
15
- 4: number;
16
- 5: number;
17
- 6: number;
18
- 7: number;
19
- 8: number;
20
- };
21
- const bondStereoMap: {
22
- 0: number;
23
- 1: number;
24
- 4: number;
25
- 6: number;
26
- 3: number;
27
- };
28
- const v30bondStereoMap: {
29
- 0: number;
30
- 1: number;
31
- 2: number;
32
- 3: number;
33
- };
34
- const bondTopologyMap: {
35
- 0: number;
36
- 1: number;
37
- 2: number;
38
- };
39
- const countsLinePartition: number[];
40
- const atomLinePartition: number[];
41
- const bondLinePartition: number[];
42
- const atomListHeaderPartition: number[];
43
- const atomListHeaderLength: number;
44
- const atomListHeaderItemLength: number;
45
- const chargeMap: number[];
46
- const valenceMap: (number | undefined)[];
47
- const implicitHydrogenMap: (number | undefined)[];
48
- namespace v30atomPropMap {
49
- const CHG: string;
50
- const RAD: string;
51
- const MASS: string;
52
- const VAL: string;
53
- const HCOUNT: string;
54
- const INVRET: string;
55
- const SUBST: string;
56
- const UNSAT: string;
57
- const RBCNT: string;
58
- }
59
- const rxnItemsPartition: number[];
60
- }
61
- declare function paddedNum(number: any, width: any, precision: any): any;
62
- declare function parseDecimalInt(str: any): number;
63
- declare function partitionLine(str: any, parts: any, withspace: any): any[];
64
- declare function partitionLineFixed(str: any, itemLength: any, withspace: any): any[];
65
- declare function rxnMerge(mols: any, nReactants: any, nProducts: any, nAgents: any, shouldReactionRelayout: any): Struct;
66
- import Struct from "../struct";
@@ -1,10 +0,0 @@
1
- declare namespace _default {
2
- export { parseCTabV2000 };
3
- export { parseRg2000 };
4
- export { parseRxn2000 };
5
- }
6
- export default _default;
7
- declare function parseCTabV2000(ctabLines: any, countsSplit: any): Struct;
8
- declare function parseRg2000(ctabLines: any): Struct;
9
- declare function parseRxn2000(ctabLines: any, shouldReactionRelayout: any): Struct;
10
- import Struct from "../struct";
@@ -1,10 +0,0 @@
1
- declare namespace _default {
2
- export { parseCTabV3000 };
3
- export { readRGroups3000 };
4
- export { parseRxn3000 };
5
- }
6
- export default _default;
7
- declare function parseCTabV3000(ctabLines: any, norgroups: any): Struct;
8
- declare function readRGroups3000(ctab: any, ctabLines: any): void;
9
- declare function parseRxn3000(ctabLines: any, shouldReactionRelayout: any): Struct;
10
- import Struct from "../struct";
@@ -1,10 +0,0 @@
1
- declare namespace _default {
2
- export { stringify };
3
- export { parse };
4
- }
5
- export default _default;
6
- declare function stringify(items: any, options: any): any;
7
- declare function parse(str: any, options: any): {
8
- struct: any;
9
- props: {};
10
- }[];
@@ -1,25 +0,0 @@
1
- export default CisTrans;
2
- declare function CisTrans(mol: any, neighborsFunc: any, context: any): void;
3
- declare class CisTrans {
4
- constructor(mol: any, neighborsFunc: any, context: any);
5
- molecule: any;
6
- bonds: Pool<any>;
7
- getNeighbors: any;
8
- context: any;
9
- each(func: any): void;
10
- getParity(idx: any): any;
11
- getSubstituents(idx: any): any;
12
- sameside(beg: any, end: any, neiBeg: any, neiEnd: any): 0 | 1 | -1;
13
- samesides(iBeg: any, iEnd: any, iNeiBeg: any, iNeiEnd: any): 0 | 1 | -1;
14
- sortSubstituents(substituents: any): boolean;
15
- isGeomStereoBond(bondIdx: any, substituents: any): boolean;
16
- build(excludeBonds: any): void;
17
- }
18
- declare namespace CisTrans {
19
- namespace PARITY {
20
- const NONE: number;
21
- const CIS: number;
22
- const TRANS: number;
23
- }
24
- }
25
- import Pool from "../../util/pool";
@@ -1,53 +0,0 @@
1
- export default Dfs;
2
- /****************************************************************************
3
- * Copyright 2020 EPAM Systems
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- ***************************************************************************/
17
- declare function Dfs(mol: any, atomData: any, components: any, nReactants: any): void;
18
- declare class Dfs {
19
- /****************************************************************************
20
- * Copyright 2020 EPAM Systems
21
- *
22
- * Licensed under the Apache License, Version 2.0 (the "License");
23
- * you may not use this file except in compliance with the License.
24
- * You may obtain a copy of the License at
25
- *
26
- * http://www.apache.org/licenses/LICENSE-2.0
27
- *
28
- * Unless required by applicable law or agreed to in writing, software
29
- * distributed under the License is distributed on an "AS IS" BASIS,
30
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31
- * See the License for the specific language governing permissions and
32
- * limitations under the License.
33
- ***************************************************************************/
34
- constructor(mol: any, atomData: any, components: any, nReactants: any);
35
- molecule: any;
36
- atom_data: any;
37
- components: any;
38
- nComponentsInReactants: number;
39
- nReactants: any;
40
- vertices: any[];
41
- edges: any[];
42
- v_seq: any[];
43
- walk(): void;
44
- edgeClosingCycle(eIdx: any): boolean;
45
- numBranches(vIdx: any): any;
46
- numOpeningCycles(eIdx: any): any;
47
- toString(): string;
48
- }
49
- declare namespace Dfs {
50
- function VertexDesc(): void;
51
- function EdgeDesc(): void;
52
- function SeqElem(vIdx: any, parVertex: any, parEdge: any): void;
53
- }
@@ -1,5 +0,0 @@
1
- declare namespace _default {
2
- function stringify(struct: any, options: any): string;
3
- function stringify(struct: any, options: any): string;
4
- }
5
- export default _default;
@@ -1,26 +0,0 @@
1
- export default Stereocenters;
2
- declare function Stereocenters(mol: any, neighborsFunc: any, context: any): void;
3
- declare class Stereocenters {
4
- constructor(mol: any, neighborsFunc: any, context: any);
5
- molecule: any;
6
- atoms: Pool<any>;
7
- getNeighbors: any;
8
- context: any;
9
- each(func: any, context: any): void;
10
- buildFromBonds(ignoreErrors: any): void;
11
- buildOneCenter(atomIdx: any): void;
12
- getBondStereo(centerIdx: any, edgeIdx: any): any;
13
- }
14
- declare namespace Stereocenters {
15
- const allowed_stereocenters: {
16
- elem: string;
17
- charge: number;
18
- degree: number;
19
- n_double_bonds: number;
20
- implicit_degree: number;
21
- }[];
22
- function xyzzy(v1: any, v2: any, u: any): 1 | 8 | 2 | 4;
23
- function sign(v1: any, v2: any, v3: any): 1 | -1;
24
- function isPyramidMappingRigid(mapping: any): boolean;
25
- }
26
- import Pool from "../../util/pool";
@@ -1,66 +0,0 @@
1
- export function radicalElectrons(radical: any): void | 0 | 1 | 2;
2
- export default Atom;
3
- declare function Atom(params: any): void;
4
- declare class Atom {
5
- constructor(params: any);
6
- label: any;
7
- fragment: any;
8
- valence: number;
9
- implicitH: number;
10
- pp: Vec2;
11
- sgs: Pile;
12
- atomList: AtomList | null;
13
- /** @type {number[]} */
14
- neighbors: number[];
15
- badConn: boolean;
16
- clone(fidMap: Map<number, number>): Atom;
17
- isQuery(): any;
18
- pureHydrogen(): boolean;
19
- isPlainCarbon(): boolean;
20
- isPseudo(): boolean;
21
- hasRxnProps(): boolean;
22
- calcValence(conn: any): boolean;
23
- calcValenceMinusHyd(conn: any): any;
24
- }
25
- declare namespace Atom {
26
- function getAttrHash(atom: any): {};
27
- function attrGetDefault(attr: any): any;
28
- namespace PATTERN {
29
- namespace RADICAL {
30
- const NONE: number;
31
- const SINGLET: number;
32
- const DOUPLET: number;
33
- const TRIPLET: number;
34
- }
35
- namespace STEREO_PARITY {
36
- const NONE_1: number;
37
- export { NONE_1 as NONE };
38
- export const ODD: number;
39
- export const EVEN: number;
40
- export const EITHER: number;
41
- }
42
- }
43
- namespace attrlist {
44
- const alias: null;
45
- const label: string;
46
- const isotope: number;
47
- const radical: number;
48
- const charge: number;
49
- const explicitValence: number;
50
- const ringBondCount: number;
51
- const substitutionCount: number;
52
- const unsaturatedAtom: number;
53
- const hCount: number;
54
- const atomList: null;
55
- const invRet: number;
56
- const exactChangeFlag: number;
57
- const rglabel: null;
58
- const attpnt: null;
59
- const aam: number;
60
- const stereoLabel: null;
61
- const stereoParity: number;
62
- }
63
- }
64
- import Vec2 from "../../util/vec2";
65
- import Pile from "../../util/pile";
66
- import AtomList from "./atomlist";
@@ -1,10 +0,0 @@
1
- export default AtomList;
2
- declare function AtomList(params: any): void;
3
- declare class AtomList {
4
- constructor(params: any);
5
- notList: any;
6
- ids: any;
7
- labelList(): string[];
8
- label(): string;
9
- equals(x: any): boolean;
10
- }
@@ -1,72 +0,0 @@
1
- export default Bond;
2
- declare function Bond(params: any): void;
3
- declare class Bond {
4
- constructor(params: any);
5
- begin: any;
6
- end: any;
7
- type: any;
8
- xxx: any;
9
- stereo: any;
10
- topology: any;
11
- reactingCenterStatus: any;
12
- hb1: any;
13
- hb2: any;
14
- len: number;
15
- sb: number;
16
- sa: number;
17
- angle: number;
18
- center: Vec2;
19
- hasRxnProps(): boolean;
20
- getCenter(struct: any): Vec2;
21
- getDir(struct: any): any;
22
- clone(aidMap: Map<number, number>): Bond;
23
- }
24
- declare namespace Bond {
25
- namespace PATTERN {
26
- namespace TYPE {
27
- const SINGLE: number;
28
- const DOUBLE: number;
29
- const TRIPLE: number;
30
- const AROMATIC: number;
31
- const SINGLE_OR_DOUBLE: number;
32
- const SINGLE_OR_AROMATIC: number;
33
- const DOUBLE_OR_AROMATIC: number;
34
- const ANY: number;
35
- }
36
- namespace STEREO {
37
- const NONE: number;
38
- const UP: number;
39
- const EITHER: number;
40
- const DOWN: number;
41
- const CIS_TRANS: number;
42
- }
43
- namespace TOPOLOGY {
44
- const EITHER_1: number;
45
- export { EITHER_1 as EITHER };
46
- export const RING: number;
47
- export const CHAIN: number;
48
- }
49
- namespace REACTING_CENTER {
50
- const NOT_CENTER: number;
51
- const UNMARKED: number;
52
- const CENTER: number;
53
- const UNCHANGED: number;
54
- const MADE_OR_BROKEN: number;
55
- const ORDER_CHANGED: number;
56
- const MADE_OR_BROKEN_AND_CHANGED: number;
57
- }
58
- }
59
- namespace attrlist {
60
- import type = SINGLE;
61
- export { type };
62
- import stereo = NONE;
63
- export { stereo };
64
- import topology = EITHER;
65
- export { topology };
66
- import reactingCenterStatus = UNMARKED;
67
- export { reactingCenterStatus };
68
- }
69
- function getAttrHash(bond: any): {};
70
- function attrGetDefault(attr: any): any;
71
- }
72
- import Vec2 from "../../util/vec2";
@@ -1,50 +0,0 @@
1
- export default Fragment;
2
- /****************************************************************************
3
- * Copyright 2020 EPAM Systems
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- ***************************************************************************/
17
- declare function Fragment(flag?: any): void;
18
- declare class Fragment {
19
- /****************************************************************************
20
- * Copyright 2020 EPAM Systems
21
- *
22
- * Licensed under the Apache License, Version 2.0 (the "License");
23
- * you may not use this file except in compliance with the License.
24
- * You may obtain a copy of the License at
25
- *
26
- * http://www.apache.org/licenses/LICENSE-2.0
27
- *
28
- * Unless required by applicable law or agreed to in writing, software
29
- * distributed under the License is distributed on an "AS IS" BASIS,
30
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31
- * See the License for the specific language governing permissions and
32
- * limitations under the License.
33
- ***************************************************************************/
34
- constructor(flag?: any);
35
- stereoAtoms: any[];
36
- enhancedStereoFlag: any;
37
- clone(aidMap: any): Fragment;
38
- updateStereoFlag(struct: any, flag?: boolean): any;
39
- updateStereoAtom(struct: any, aid: any, isAdd: any): void;
40
- }
41
- declare namespace Fragment {
42
- namespace STEREO_FLAG {
43
- export const Mixed: string;
44
- export const abs: string;
45
- export const and: string;
46
- export const or: string;
47
- const _null: null;
48
- export { _null as null };
49
- }
50
- }
@@ -1,137 +0,0 @@
1
- export default Struct;
2
- /** @returns {import('ketcher-core').Struct} */
3
- export function Struct(): import('ketcher-core').Struct;
4
- export class Struct {
5
- atoms: Pool<any>;
6
- bonds: Pool<any>;
7
- sgroups: Pool<any>;
8
- /** @type {Pool<HalfBond>} */
9
- halfBonds: Pool<HalfBond>;
10
- loops: Pool<any>;
11
- isReaction: boolean;
12
- rxnArrows: Pool<any>;
13
- rxnPluses: Pool<any>;
14
- frags: Pool<any>;
15
- rgroups: Pool<any>;
16
- name: string;
17
- sGroupForest: SGroupForest;
18
- simpleObjects: Pool<any>;
19
- hasRxnProps(): number | null;
20
- hasRxnArrow(): boolean;
21
- isBlank(): boolean;
22
- clone(atomSet?: any, bondSet?: any, dropRxnSymbols?: boolean | undefined, aidMap?: Map<number, number> | null | undefined, simpleObjectsSet?: any): Struct;
23
- getScaffold(): Struct;
24
- getFragmentIds(fid: any): Pile;
25
- getFragment(fid: any): Struct;
26
- mergeInto(cp: import('ketcher-core').Struct, atomSet?: any, bondSet?: any, dropRxnSymbols?: boolean | undefined, keepAllRGroups?: boolean | undefined, aidMap?: Map<number, number> | undefined, simpleObjectsSet?: any): import('ketcher-core').Struct;
27
- findBondId(begin: number, end: number): number | null;
28
- initNeighbors(): void;
29
- bondInitHalfBonds(bid: any, bond: any): void;
30
- halfBondUpdate(hbid: any): void;
31
- initHalfBonds(): void;
32
- setHbNext(hbid: any, next: any): void;
33
- halfBondSetAngle(hbid: any, left: any): void;
34
- atomAddNeighbor(hbid: any): void;
35
- atomSortNeighbors(aid: any): void;
36
- sortNeighbors(list: any): void;
37
- atomUpdateHalfBonds(aid: any): void;
38
- updateHalfBonds(list: any): void;
39
- sGroupsRecalcCrossBonds(): void;
40
- sGroupDelete(sgid: any): void;
41
- atomSetPos(id: any, pp: any): void;
42
- rxnPlusSetPos(id: any, pp: any): void;
43
- rxnArrowSetPos(id: any, pp: any): void;
44
- simpleObjectSetPos(id: any, pos: any): void;
45
- getCoordBoundingBox(atomSet?: any): any;
46
- getCoordBoundingBoxObj(): null;
47
- getBondLengthData(): {
48
- cnt: number;
49
- totalLength: number;
50
- };
51
- getAvgBondLength(): number;
52
- getAvgClosestAtomDistance(): number;
53
- checkBondExists(begin: any, end: any): boolean;
54
- findConnectedComponent(firstaid: number): any;
55
- findConnectedComponents(discardExistingFragments: any): any[];
56
- markFragment(idSet: any): void;
57
- markFragments(): void;
58
- scale(scale: any): void;
59
- rescale(): void;
60
- loopHasSelfIntersections(hbs: any): boolean;
61
- partitionLoop(loop: any): any[];
62
- halfBondAngle(hbid1: any, hbid2: any): number;
63
- loopIsConvex(loop: any): any;
64
- loopIsInner(loop: any): boolean;
65
- findLoops(): {
66
- newLoops: Array<number>;
67
- bondsToMark: Array<number>;
68
- };
69
- prepareLoopStructure(): void;
70
- atomAddToSGroup(sgid: number, aid: number): void;
71
- calcConn(atom: any): [number, boolean];
72
- calcImplicitHydrogen(aid: any): void;
73
- setImplicitHydrogen(list: any): void;
74
- getComponents(): {
75
- reactants: Array<Pile<number>>;
76
- products: Array<Pile<number>>;
77
- };
78
- defineRxnFragmentTypeForAtomset(atomset: any, arrowpos: number): 1 | 2;
79
- getBondFragment(bid: number): number;
80
- }
81
- import Atom from "./atom";
82
- import AtomList from "./atomlist";
83
- import Bond from "./bond";
84
- import Fragment from "./fragment";
85
- import SGroup from "./sgroup";
86
- import SGroupForest from "./sgforest";
87
- import RGroup from "./rgroup";
88
- export function RxnPlus(params: any): void;
89
- export class RxnPlus {
90
- constructor(params: any);
91
- pp: Vec2;
92
- clone(): RxnPlus;
93
- }
94
- export function RxnArrow(params: any): void;
95
- export class RxnArrow {
96
- constructor(params: any);
97
- pp: Vec2;
98
- clone(): RxnArrow;
99
- }
100
- import { SimpleObject } from "./simpleObject";
101
- import { SimpleObjectMode } from "./simpleObject";
102
- import Pool from "../../util/pool";
103
- /**
104
- * @param begin [ number }
105
- * @param end { number }
106
- * @param bid { number }
107
- * @constructor
108
- */
109
- declare function HalfBond(begin: any, end: number, bid: number, ...args: any[]): void;
110
- declare class HalfBond {
111
- /**
112
- * @param begin [ number }
113
- * @param end { number }
114
- * @param bid { number }
115
- * @constructor
116
- */
117
- constructor(begin: any, end: number, bid: number, ...args: any[]);
118
- begin: any;
119
- end: number;
120
- bid: number;
121
- dir: Vec2;
122
- norm: Vec2;
123
- ang: number;
124
- p: Vec2;
125
- loop: number;
126
- contra: number;
127
- next: number;
128
- leftSin: number;
129
- leftCos: number;
130
- leftNeighbor: number;
131
- rightSin: number;
132
- rightCos: number;
133
- rightNeighbor: number;
134
- }
135
- import Pile from "../../util/pile";
136
- import Vec2 from "../../util/vec2";
137
- export { Atom, AtomList, Bond, Fragment, SGroup, SGroupForest, RGroup, SimpleObject, SimpleObjectMode };
@@ -1,19 +0,0 @@
1
- export default RGroup;
2
- declare function RGroup(logic: any): void;
3
- declare class RGroup {
4
- constructor(logic: any);
5
- frags: Pile;
6
- resth: any;
7
- range: any;
8
- ifthen: any;
9
- getAttrs(): {
10
- resth: any;
11
- range: any;
12
- ifthen: any;
13
- };
14
- clone(fidMap: Map<number, number>): RGroup;
15
- }
16
- declare namespace RGroup {
17
- function findRGroupByFragment(rgroups: any, frid: number): any;
18
- }
19
- import Pile from "../../util/pile";
@@ -1,42 +0,0 @@
1
- /****************************************************************************
2
- * Copyright 2020 EPAM Systems
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- ***************************************************************************/
16
- import { SGroupForest as ISGroupForest } from 'ketcher-core';
17
- declare class SGroupForest implements ISGroupForest {
18
- /** node id -> parent id */
19
- parent: Map<number, number>;
20
- /** node id -> list of child ids */
21
- children: Map<number, number[]>;
22
- atomSets: Map<number, any>;
23
- constructor();
24
- /** returns an array or s-group ids in the order of breadth-first search */
25
- getSGroupsBFS(): number[];
26
- getAtomSetRelations(newId: any, atoms: any): {
27
- children: number[];
28
- parent: number;
29
- };
30
- getPathToRoot(sgid: any): number[];
31
- insert({ id, atoms }: {
32
- id: any;
33
- atoms: any;
34
- }, parent?: number, children?: number[]): {
35
- parent: number;
36
- children: number[];
37
- };
38
- private resetParentLink;
39
- remove(id: any): void;
40
- }
41
- export declare function checkOverlapping(struct: any, atoms: any): boolean;
42
- export default SGroupForest;