ketcher-react 2.3.1 → 2.4.1

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 (238) hide show
  1. package/dist/Editor.d.ts +2 -2
  2. package/dist/contexts/appContext.d.ts +17 -1
  3. package/dist/{script/editor/operations/FragmentStereoFlag.d.ts → contexts/errorsContext.d.ts} +5 -7
  4. package/dist/contexts/formContext.d.ts +15 -0
  5. package/dist/contexts/index.d.ts +19 -3
  6. package/dist/contexts/settingsContext.d.ts +15 -0
  7. package/dist/hooks/index.d.ts +16 -0
  8. package/dist/hooks/useAppContext.d.ts +15 -0
  9. package/dist/hooks/useFormContext.d.ts +15 -0
  10. package/dist/{script/ui/dialog/template/TemplateLib.d.ts → hooks/useInterval.d.ts} +1 -8
  11. package/dist/hooks/useSettingsContext.d.ts +15 -0
  12. package/dist/icons/index.d.ts +15 -0
  13. package/dist/index.css +1 -3
  14. package/dist/index.css.map +1 -1
  15. package/dist/index.d.ts +0 -1
  16. package/dist/index.js +15846 -19664
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.modern.js +15741 -19576
  19. package/dist/index.modern.js.map +1 -1
  20. package/dist/script/builders/ketcher/ButtonName.d.ts +1 -1
  21. package/dist/script/builders/ketcher/KetcherBuilder.d.ts +2 -5
  22. package/dist/script/editor/Editor.d.ts +7 -4
  23. package/dist/script/editor/index.d.ts +15 -0
  24. package/dist/script/editor/shared/utils.d.ts +2 -4
  25. package/dist/script/editor/tool/apoint.d.ts +5 -1
  26. package/dist/script/editor/tool/atom.d.ts +4 -0
  27. package/dist/script/editor/tool/attach.d.ts +5 -1
  28. package/dist/script/editor/tool/bond.d.ts +6 -2
  29. package/dist/script/editor/tool/chain.d.ts +6 -2
  30. package/dist/script/editor/tool/charge.d.ts +5 -1
  31. package/dist/script/editor/tool/enhanced-stereo.d.ts +15 -0
  32. package/dist/script/editor/tool/eraser.d.ts +4 -0
  33. package/dist/script/editor/tool/helper/lasso.d.ts +1 -0
  34. package/dist/script/editor/tool/paste.d.ts +7 -7
  35. package/dist/script/editor/tool/reactionarrow.d.ts +3 -4
  36. package/dist/script/editor/tool/rgroupatom.d.ts +4 -1
  37. package/dist/script/editor/tool/rgroupfragment.d.ts +5 -1
  38. package/dist/script/editor/tool/rotate.d.ts +1 -1
  39. package/dist/script/editor/tool/select.d.ts +23 -12
  40. package/dist/script/editor/tool/sgroup.d.ts +4 -0
  41. package/dist/script/editor/tool/template.d.ts +6 -1
  42. package/dist/script/editor/utils/customOnChangeHandler.d.ts +15 -0
  43. package/dist/script/index.d.ts +3 -2
  44. package/dist/script/ui/App/App.container.d.ts +17 -1
  45. package/dist/script/ui/App/AppHidden/AppHidden.container.d.ts +17 -1
  46. package/dist/script/ui/App/AppHidden/AppHidden.d.ts +15 -0
  47. package/dist/script/ui/App/initApp.d.ts +1 -5
  48. package/dist/script/ui/Portal/Portal.d.ts +1 -1
  49. package/dist/script/ui/action/action.types.d.ts +1 -1
  50. package/dist/script/ui/action/copyAs.d.ts +1 -0
  51. package/dist/script/ui/action/copyImageToClipboard.d.ts +2 -0
  52. package/dist/script/ui/action/debug.d.ts +2 -0
  53. package/dist/script/{editor/operations/rxn/RxnArrowMove.d.ts → ui/action/functionalGroups.d.ts} +12 -11
  54. package/dist/script/ui/action/index.d.ts +196 -10
  55. package/dist/script/ui/action/isHidden.d.ts +18 -0
  56. package/dist/script/ui/action/templates.d.ts +2 -0
  57. package/dist/script/ui/action/tools.d.ts +134 -4
  58. package/dist/script/ui/action/zoom.d.ts +6 -0
  59. package/dist/script/ui/component/ContextMenu/ContextMenu.d.ts +2 -0
  60. package/dist/script/ui/component/{cliparea.d.ts → cliparea/cliparea.d.ts} +3 -3
  61. package/dist/script/ui/component/form/buttonlist.d.ts +2 -1
  62. package/dist/script/ui/component/form/colorPicker/ColorPicker.d.ts +15 -0
  63. package/dist/script/ui/component/form/{combobox.d.ts → combobox/combobox.d.ts} +2 -2
  64. package/dist/script/ui/component/form/form/form.d.ts +20 -0
  65. package/dist/script/ui/component/form/input.d.ts +2 -2
  66. package/dist/script/ui/component/form/measure-input.d.ts +2 -2
  67. package/dist/script/ui/component/form/select.d.ts +17 -1
  68. package/dist/script/ui/component/structrender.d.ts +3 -3
  69. package/dist/script/ui/component/view/Tabs/Tabs.d.ts +2 -2
  70. package/dist/script/ui/component/view/openbutton.d.ts +2 -2
  71. package/dist/script/ui/data/schema/struct-schema.d.ts +22 -0
  72. package/dist/script/ui/dialog/index.d.ts +1 -61
  73. package/dist/script/ui/dialog/template/EmptySearchResult.d.ts +19 -0
  74. package/dist/script/ui/dialog/template/TemplateDialog.d.ts +43 -0
  75. package/dist/script/ui/dialog/template/TemplateTable.d.ts +6 -7
  76. package/dist/script/ui/dialog/template/template-attach.d.ts +1 -1
  77. package/dist/script/ui/dialog/toolbox/enhancedStereo/enhancedStereo.d.ts +42 -0
  78. package/dist/script/ui/dialog/toolbox/labeledit.d.ts +2 -1
  79. package/dist/script/ui/dialog/toolbox/rgroup/rgroup.d.ts +15 -0
  80. package/dist/script/ui/dialog/toolbox/sdata.d.ts +18 -1
  81. package/dist/script/ui/dialog/toolbox/sgroup.d.ts +8 -1
  82. package/dist/script/ui/state/action/index.d.ts +4 -2
  83. package/dist/script/ui/state/editor/index.d.ts +1 -0
  84. package/dist/script/{editor/operations/bond/BondMove.d.ts → ui/state/functionalGroups/index.d.ts} +7 -10
  85. package/dist/script/ui/state/functionalGroups/selectors/index.d.ts +17 -0
  86. package/dist/script/ui/state/hotkeys.d.ts +0 -2
  87. package/dist/script/ui/state/modal/form.d.ts +8 -0
  88. package/dist/script/ui/state/modal/index.d.ts +1 -1
  89. package/dist/script/ui/state/options/index.d.ts +1 -0
  90. package/dist/script/ui/state/templates/index.d.ts +2 -0
  91. package/dist/script/ui/state/templates/init-lib.d.ts +2 -1
  92. package/dist/script/ui/utils/index.d.ts +3 -0
  93. package/dist/script/ui/views/AppClipArea.d.ts +2 -1
  94. package/dist/script/ui/views/Editor.d.ts +2 -1
  95. package/dist/script/ui/views/components/Dialog/Dialog.d.ts +2 -2
  96. package/dist/script/ui/views/components/FunctionalGroups/FunctionalGroups.d.ts +23 -0
  97. package/dist/script/{editor/operations/rgroup → ui/views/components/FunctionalGroups}/index.d.ts +1 -2
  98. package/dist/script/ui/views/components/StructEditor/StructEditor.d.ts +4 -4
  99. package/dist/script/ui/views/components/index.d.ts +1 -1
  100. package/dist/script/ui/views/modal/Modal.container.d.ts +3 -1
  101. package/dist/script/ui/views/modal/components/PeriodTable/PeriodTable.d.ts +31 -1
  102. package/dist/script/ui/views/modal/components/PeriodTable/components/ElementsTable/ElementsTable.d.ts +2 -2
  103. package/dist/script/ui/views/modal/components/PeriodTable/components/index.d.ts +2 -2
  104. package/dist/script/ui/views/modal/components/Text/FontControl/FontControl.d.ts +21 -0
  105. package/dist/script/ui/views/modal/components/{meta/Help → Text/FontControl}/index.d.ts +1 -1
  106. package/dist/script/ui/views/modal/components/Text/Text.d.ts +8 -1
  107. package/dist/script/ui/views/modal/components/Text/TextButton/TextButton.d.ts +15 -0
  108. package/dist/script/ui/views/modal/components/Text/TextButton/index.d.ts +15 -0
  109. package/dist/script/ui/views/modal/components/document/Open/Open.container.d.ts +4 -2
  110. package/dist/script/ui/views/modal/components/document/Open/Open.d.ts +1 -1
  111. package/dist/script/ui/views/modal/components/document/Save/Save.d.ts +33 -1
  112. package/dist/script/ui/views/modal/components/meta/About/About.d.ts +2 -1
  113. package/dist/script/ui/views/modal/components/meta/Settings/Settings.d.ts +21 -1
  114. package/dist/script/ui/views/modal/components/meta/index.d.ts +1 -2
  115. package/dist/script/ui/views/modal/components/process/Analyse/Analyse.d.ts +6 -1
  116. package/dist/script/ui/views/modal/components/process/Analyse/components/FrozenInput/FrozenInput.d.ts +15 -0
  117. package/dist/script/ui/views/modal/components/process/Check/Check.d.ts +2 -1
  118. package/dist/script/ui/views/modal/components/process/Check/components/ErrorsCheck.d.ts +15 -0
  119. package/dist/script/ui/views/modal/components/process/Miew/Miew.d.ts +9 -1
  120. package/dist/script/ui/views/modal/components/process/Recognize/Recognize.d.ts +2 -1
  121. package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.container.d.ts +2 -4
  122. package/dist/script/ui/views/modal/components/toolbox/Atom/ElementNumber/ElementNumber.d.ts +15 -0
  123. package/dist/script/ui/views/modal/components/toolbox/Attach/Attach.container.d.ts +1 -4
  124. package/dist/script/ui/views/modal/components/toolbox/Attach/Attach.d.ts +1 -1
  125. package/dist/script/ui/views/modal/components/toolbox/Automap/Automap.container.d.ts +2 -4
  126. package/dist/script/ui/views/modal/components/toolbox/Automap/Automap.d.ts +1 -1
  127. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.container.d.ts +1 -4
  128. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.d.ts +16 -1
  129. package/dist/script/{editor/operations/calcimplicitH.d.ts → ui/views/modal/components/toolbox/FG/RemoveFG.d.ts} +7 -7
  130. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/RgroupLogic.container.d.ts +1 -4
  131. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/RgroupLogic.d.ts +2 -1
  132. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/components/IfThenSelect/IfThenSelect.d.ts +1 -1
  133. package/dist/script/ui/views/modal/components/toolbox/index.d.ts +1 -1
  134. package/dist/script/ui/views/toolbars/ArrowScroll/ArrowScroll.d.ts +23 -0
  135. package/dist/script/ui/views/toolbars/ArrowScroll/index.d.ts +2 -0
  136. package/dist/script/ui/views/toolbars/BottomToolbar/BottomToolbar.container.d.ts +1 -1
  137. package/dist/script/ui/views/toolbars/BottomToolbar/BottomToolbar.d.ts +15 -0
  138. package/dist/script/ui/views/toolbars/BottomToolbar/TemplatesList/TemplatesList.d.ts +15 -0
  139. package/dist/script/ui/views/toolbars/LeftToolbar/Bond/Bond.d.ts +15 -0
  140. package/dist/script/ui/views/toolbars/LeftToolbar/LeftToolbar.container.d.ts +2 -4
  141. package/dist/script/ui/views/toolbars/LeftToolbar/Transform/Transform.d.ts +15 -0
  142. package/dist/script/ui/views/toolbars/LeftToolbar/leftToolbarOptions.d.ts +9 -0
  143. package/dist/script/ui/views/toolbars/RightToolbar/AtomsList/AtomsList.d.ts +17 -2
  144. package/dist/script/ui/views/toolbars/RightToolbar/RightToolbar.container.d.ts +1 -1
  145. package/dist/script/ui/views/toolbars/RightToolbar/RightToolbar.d.ts +15 -0
  146. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ActionButton/ActionButton.d.ts +15 -0
  147. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ActionButton/index.d.ts +15 -0
  148. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarGroupItem.d.ts +16 -0
  149. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/ToolbarMultiToolItem.d.ts +19 -3
  150. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/usePortalOpening.d.ts +15 -0
  151. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/variants/DefaultMultiTool/DefaultMultiTool.d.ts +15 -0
  152. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/variants/GroupedMultiTool/GroupedMultiTool.d.ts +15 -0
  153. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/variants/chooseMultiTool.d.ts +1 -1
  154. package/dist/script/ui/views/toolbars/TopToolbar/HelpLink/HelpLink.d.ts +19 -0
  155. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.container.d.ts +2 -4
  156. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.d.ts +15 -0
  157. package/dist/script/ui/views/toolbars/TopToolbar/ZoomList/ZoomList.d.ts +15 -0
  158. package/dist/script/ui/views/toolbars/shortcutStr.d.ts +15 -0
  159. package/dist/script/ui/views/toolbars/toolbar.types.d.ts +3 -3
  160. package/package.json +33 -28
  161. package/dist/index.test.d.ts +0 -1
  162. package/dist/overlay.svg +0 -1
  163. package/dist/script/editor/actions/aromatic-fusing.d.ts +0 -15
  164. package/dist/script/editor/actions/atom.d.ts +0 -20
  165. package/dist/script/editor/actions/basic.d.ts +0 -3
  166. package/dist/script/editor/actions/bond.d.ts +0 -24
  167. package/dist/script/editor/actions/chain.d.ts +0 -5
  168. package/dist/script/editor/actions/closely-fusing.d.ts +0 -14
  169. package/dist/script/editor/actions/erase.d.ts +0 -4
  170. package/dist/script/editor/actions/fragment.d.ts +0 -10
  171. package/dist/script/editor/actions/paste.d.ts +0 -5
  172. package/dist/script/editor/actions/reaction.d.ts +0 -5
  173. package/dist/script/editor/actions/rgroup.d.ts +0 -4
  174. package/dist/script/editor/actions/rotate.d.ts +0 -4
  175. package/dist/script/editor/actions/sgroup.d.ts +0 -9
  176. package/dist/script/editor/actions/simpleobject.d.ts +0 -4
  177. package/dist/script/editor/actions/template.d.ts +0 -13
  178. package/dist/script/editor/actions/text.d.ts +0 -6
  179. package/dist/script/editor/actions/utils.d.ts +0 -15
  180. package/dist/script/editor/operations/CanvasLoad.d.ts +0 -26
  181. package/dist/script/editor/operations/EnhancedFlagMove.d.ts +0 -11
  182. package/dist/script/editor/operations/LoopMove.d.ts +0 -26
  183. package/dist/script/editor/operations/OperationType.d.ts +0 -62
  184. package/dist/script/editor/operations/Text/TextCreateDelete.d.ts +0 -41
  185. package/dist/script/editor/operations/Text/TextMove.d.ts +0 -29
  186. package/dist/script/editor/operations/Text/TextUpdate.d.ts +0 -29
  187. package/dist/script/editor/operations/Text/index.d.ts +0 -3
  188. package/dist/script/editor/operations/atom/AtomAttr.d.ts +0 -31
  189. package/dist/script/editor/operations/atom/AtomMove.d.ts +0 -28
  190. package/dist/script/editor/operations/atom/index.d.ts +0 -22
  191. package/dist/script/editor/operations/base.d.ts +0 -36
  192. package/dist/script/editor/operations/bond/BondAttr.d.ts +0 -31
  193. package/dist/script/editor/operations/bond/index.d.ts +0 -38
  194. package/dist/script/editor/operations/descriptors.d.ts +0 -15
  195. package/dist/script/editor/operations/fragment.d.ts +0 -15
  196. package/dist/script/editor/operations/fragmentStereoAtom.d.ts +0 -34
  197. package/dist/script/editor/operations/ifThen.d.ts +0 -35
  198. package/dist/script/editor/operations/index.d.ts +0 -32
  199. package/dist/script/editor/operations/rgroup/RGroupAttr.d.ts +0 -31
  200. package/dist/script/editor/operations/rgroup/RGroupFragment.d.ts +0 -29
  201. package/dist/script/editor/operations/rxn/index.d.ts +0 -38
  202. package/dist/script/editor/operations/rxn/plus/RxnPlusMove.d.ts +0 -27
  203. package/dist/script/editor/operations/rxn/plus/index.d.ts +0 -20
  204. package/dist/script/editor/operations/sgroup/SGroupAttr.d.ts +0 -27
  205. package/dist/script/editor/operations/sgroup/SGroupDataMove.d.ts +0 -26
  206. package/dist/script/editor/operations/sgroup/index.d.ts +0 -39
  207. package/dist/script/editor/operations/sgroup/sgroupAtom.d.ts +0 -34
  208. package/dist/script/editor/operations/sgroup/sgroupHierarchy.d.ts +0 -35
  209. package/dist/script/editor/operations/simpleObject.d.ts +0 -69
  210. package/dist/script/editor/shared/action.d.ts +0 -26
  211. package/dist/script/editor/shared/constants.d.ts +0 -7
  212. package/dist/script/ketcher.d.ts +0 -44
  213. package/dist/script/raphael-ext.d.ts +0 -1
  214. package/dist/script/render/draw.d.ts +0 -63
  215. package/dist/script/render/index.d.ts +0 -28
  216. package/dist/script/render/options.d.ts +0 -2
  217. package/dist/script/render/restruct/GeneralEnumTypes.d.ts +0 -35
  218. package/dist/script/render/restruct/ReEnhancedFlag.d.ts +0 -28
  219. package/dist/script/render/restruct/ReObject.d.ts +0 -32
  220. package/dist/script/render/restruct/ReSimpleObject.d.ts +0 -40
  221. package/dist/script/render/restruct/ReStruct.d.ts +0 -110
  222. package/dist/script/render/restruct/ReText.d.ts +0 -38
  223. package/dist/script/render/restruct/index.d.ts +0 -13
  224. package/dist/script/render/restruct/reatom.d.ts +0 -46
  225. package/dist/script/render/restruct/rebond.d.ts +0 -40
  226. package/dist/script/render/restruct/redatasgroupdata.d.ts +0 -8
  227. package/dist/script/render/restruct/refrag.d.ts +0 -12
  228. package/dist/script/render/restruct/reloop.d.ts +0 -12
  229. package/dist/script/render/restruct/rergroup.d.ts +0 -15
  230. package/dist/script/render/restruct/rerxnarrow.d.ts +0 -9
  231. package/dist/script/render/restruct/rerxnplus.d.ts +0 -9
  232. package/dist/script/render/restruct/resgroup.d.ts +0 -9
  233. package/dist/script/render/restruct/visel.d.ts +0 -12
  234. package/dist/script/render/util.d.ts +0 -22
  235. package/dist/script/ui/component/form/form.d.ts +0 -4
  236. package/dist/script/ui/dialog/toolbox/enhancedStereo.d.ts +0 -2
  237. package/dist/script/ui/dialog/toolbox/rgroup.d.ts +0 -2
  238. package/dist/script/ui/views/modal/components/meta/Help/Help.d.ts +0 -2
@@ -1,69 +0,0 @@
1
- /****************************************************************************
2
- * Copyright 2021 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 { SimpleObjectMode, Vec2 } from 'ketcher-core';
17
- import Base from './base';
18
- interface SimpleObjectAddData {
19
- id?: number;
20
- pos: Array<Vec2>;
21
- mode: SimpleObjectMode;
22
- toCircle: boolean;
23
- }
24
- export declare class SimpleObjectAdd extends Base {
25
- data: SimpleObjectAddData;
26
- constructor(pos?: Array<Vec2>, mode?: SimpleObjectMode, toCircle?: boolean, id?: number);
27
- execute(restruct: any): void;
28
- invert(): Base;
29
- }
30
- interface SimpleObjectDeleteData {
31
- id: number;
32
- pos?: Array<Vec2>;
33
- mode?: SimpleObjectMode;
34
- toCircle?: boolean;
35
- }
36
- export declare class SimpleObjectDelete extends Base {
37
- data: SimpleObjectDeleteData;
38
- performed: boolean;
39
- constructor(id: number);
40
- execute(restruct: any): void;
41
- invert(): Base;
42
- }
43
- interface SimpleObjectMoveData {
44
- id: number;
45
- d: any;
46
- noinvalidate: boolean;
47
- }
48
- export declare class SimpleObjectMove extends Base {
49
- data: SimpleObjectMoveData;
50
- constructor(id: number, d: any, noinvalidate: boolean);
51
- execute(restruct: any): void;
52
- invert(): Base;
53
- }
54
- interface SimpleObjectResizeData {
55
- id: number;
56
- d: any;
57
- current: Vec2;
58
- anchor: Vec2;
59
- noinvalidate: boolean;
60
- toCircle: boolean;
61
- }
62
- export declare class SimpleObjectResize extends Base {
63
- data: SimpleObjectResizeData;
64
- constructor(id: number, d: any, current: Vec2, anchor: any, noinvalidate: boolean, toCircle: boolean);
65
- execute(restruct: any): void;
66
- invert(): Base;
67
- }
68
- export declare function makeCircleFromEllipse(position0: Vec2, position1: Vec2): Vec2;
69
- export {};
@@ -1,26 +0,0 @@
1
- import { BaseOperation } from '../operations/base';
2
- /****************************************************************************
3
- * Copyright 2021 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
- import Restruct from '../../render/restruct';
18
- declare class Action {
19
- operations: BaseOperation[];
20
- constructor(operations?: never[]);
21
- addOp(operation: BaseOperation, restruct?: Restruct): BaseOperation;
22
- mergeWith(action: any): this;
23
- perform(restruct: Restruct): Action;
24
- isDummy(restruct?: Restruct): boolean;
25
- }
26
- export default Action;
@@ -1,7 +0,0 @@
1
- export namespace SgContexts {
2
- const Fragment: string;
3
- const Multifragment: string;
4
- const Bond: string;
5
- const Atom: string;
6
- const Group: string;
7
- }
@@ -1,44 +0,0 @@
1
- /****************************************************************************
2
- * Copyright 2018 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 { FormatterFactory, GenerateImageOptions, MolfileFormat, Struct, StructService } from 'ketcher-core';
17
- import Editor from './editor';
18
- import Render from './render';
19
- interface UI {
20
- load: (structStr: string | null, options?: any) => undefined;
21
- loadStruct: (struct: Struct) => any;
22
- }
23
- declare class Ketcher {
24
- readonly editor: Editor;
25
- readonly server: StructService;
26
- readonly ui: UI;
27
- private readonly formatterFactory;
28
- private origin;
29
- constructor(editor: Editor, server: StructService, // todo: remove
30
- ui: UI, formatterFactory: FormatterFactory);
31
- getSmilesAsync(isExtended?: boolean): Promise<string>;
32
- getMolfileAsync(molfileFormat?: MolfileFormat): Promise<string>;
33
- getGraphAsync(): Promise<string>;
34
- containsReaction(): boolean;
35
- getRxnAsync(molfileFormat?: MolfileFormat): Promise<string>;
36
- setMolecule(molString: string, rescale?: boolean): void;
37
- addFragment(molString: string): void;
38
- showMolfile(clientArea: any, molString: string, options: any): Render;
39
- isDirty(): boolean;
40
- setOrigin(): void;
41
- generateImageAsync(data: string, options?: GenerateImageOptions): Promise<Blob>;
42
- }
43
- export type { UI };
44
- export { Ketcher };
@@ -1 +0,0 @@
1
- export default Raphael;
@@ -1,63 +0,0 @@
1
- declare namespace _default {
2
- export { recenterText };
3
- export { arrow };
4
- export { equilibriumArrow };
5
- export { plus };
6
- export { aromaticBondPaths };
7
- export { bondSingle };
8
- export { bondSingleUp };
9
- export { bondSingleStereoBold };
10
- export { bondDoubleStereoBold };
11
- export { bondSingleDown };
12
- export { bondSingleEither };
13
- export { bondDouble };
14
- export { bondSingleOrDouble };
15
- export { bondTriple };
16
- export { bondAromatic };
17
- export { bondAny };
18
- export { bondHydrogen };
19
- export { bondDative };
20
- export { reactingCenter };
21
- export { topologyMark };
22
- export { radicalCap };
23
- export { radicalBullet };
24
- export { bracket };
25
- export { selectionRectangle };
26
- export { selectionPolygon };
27
- export { selectionLine };
28
- export { ellipse };
29
- export { rectangle };
30
- export { polyline };
31
- export { line };
32
- }
33
- export default _default;
34
- declare function recenterText(path: any, rbb: any): void;
35
- declare function arrow(paper: any, a: any, b: any, options: any): any;
36
- declare function equilibriumArrow(paper: any, a: any, b: any, options: any): any;
37
- declare function plus(paper: any, c: any, options: any): any;
38
- declare function aromaticBondPaths(a2: any, a3: any, b2: any, b3: any, mask: any, dash: any): string[];
39
- declare function bondSingle(paper: any, hb1: any, hb2: any, options: any, color?: string): any;
40
- declare function bondSingleUp(paper: any, a: any, b2: any, b3: any, options: any, color?: string): any;
41
- declare function bondSingleStereoBold(paper: any, a1: any, a2: any, a3: any, a4: any, options: any, color?: string): any;
42
- declare function bondDoubleStereoBold(paper: any, sgBondPath: any, b1: any, b2: any, options: any, color?: string): any;
43
- declare function bondSingleDown(paper: any, hb1: any, d: any, nlines: any, step: any, options: any, color?: string): any;
44
- declare function bondSingleEither(paper: any, hb1: any, d: any, nlines: any, step: any, options: any, color?: string): any;
45
- declare function bondDouble(paper: any, a1: any, a2: any, b1: any, b2: any, cisTrans: any, options: any): any;
46
- declare function bondSingleOrDouble(paper: any, hb1: any, hb2: any, nSect: any, options: any): any;
47
- declare function bondTriple(paper: any, hb1: any, hb2: any, options: any, color?: string): any;
48
- declare function bondAromatic(paper: any, paths: any, bondShift: any, options: any): any;
49
- declare function bondAny(paper: any, hb1: any, hb2: any, options: any): any;
50
- declare function bondHydrogen(paper: any, hb1: any, hb2: any, options: any): any;
51
- declare function bondDative(paper: any, hb1: any, hb2: any, options: any): any;
52
- declare function reactingCenter(paper: any, p: any, options: any): any;
53
- declare function topologyMark(paper: any, p: any, mark: any, options: any): any;
54
- declare function radicalCap(paper: any, p: any, options: any): any;
55
- declare function radicalBullet(paper: any, p: any, options: any): any;
56
- declare function bracket(paper: any, d: any, n: any, c: any, bracketWidth: any, bracketHeight: any, options: any): any;
57
- declare function selectionRectangle(paper: any, p0: any, p1: any, options: any): any;
58
- declare function selectionPolygon(paper: any, r: any, options: any): any;
59
- declare function selectionLine(paper: any, p0: any, p1: any, options: any): any;
60
- declare function ellipse(paper: any, pos: any, options: any): any;
61
- declare function rectangle(paper: any, pos: any, options: any): any;
62
- declare function polyline(paper: any, pos: any, options: any): any;
63
- declare function line(paper: any, pos: any, options: any): any;
@@ -1,28 +0,0 @@
1
- export default Render;
2
- declare function Render(clientArea: any, opt: any): void;
3
- declare class Render {
4
- constructor(clientArea: any, opt: any);
5
- userOpts: any;
6
- clientArea: any;
7
- paper: any;
8
- sz: Vec2;
9
- ctab: ReStruct;
10
- options: any;
11
- view2obj(p: any, isRelative: any): Vec2;
12
- obj2view(v: any, isRelative: any): Vec2;
13
- scrollPos(): Vec2;
14
- page2obj(pagePos: any): Vec2;
15
- setPaperSize(sz: any): void;
16
- setOffset(newoffset: any): void;
17
- setZoom(zoom: any): void;
18
- setScrollOffset(x: any, y: any): void;
19
- setScale(z: any): void;
20
- setViewBox(z: any): void;
21
- setMolecule(ctab: any): void;
22
- update(force: any, viewSz: any): void;
23
- oldCb: Box2Abs | undefined;
24
- oldBb: Box2Abs | undefined;
25
- }
26
- import { Vec2 } from "ketcher-core/dist/domain/entities/Vec2";
27
- import ReStruct from "./restruct";
28
- import { Box2Abs } from "ketcher-core/dist/domain/entities/Box2Abs";
@@ -1,2 +0,0 @@
1
- export default defaultOptions;
2
- declare function defaultOptions(opt: any): any;
@@ -1,35 +0,0 @@
1
- /****************************************************************************
2
- * Copyright 2021 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
- export declare enum LayerMap {
17
- background = "background",
18
- selectionPlate = "selectionPlate",
19
- highlighting = "highlighting",
20
- warnings = "warnings",
21
- data = "data",
22
- indices = "indices"
23
- }
24
- export declare enum StereoColoringType {
25
- LabelsOnly = "LabelsOnly",
26
- BondsOnly = "BondsOnly",
27
- LabelsAndBonds = "LabelsAndBonds",
28
- Off = "Off"
29
- }
30
- export declare enum StereLabelStyleType {
31
- IUPAC = "Iupac",
32
- Classic = "Classic",
33
- On = "On",
34
- Off = "Off"
35
- }
@@ -1,28 +0,0 @@
1
- /****************************************************************************
2
- * Copyright 2021 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 ReObject from './ReObject';
17
- import ReStruct from './index';
18
- import Render from '..';
19
- declare class ReEnhancedFlag extends ReObject {
20
- #private;
21
- constructor();
22
- static isSelectable(): boolean;
23
- highlightPath(render: Render): any;
24
- drawHighlight(render: Render): any;
25
- makeSelectionPlate(restruct: ReStruct, paper: any, options: any): any;
26
- show(restruct: ReStruct, fragmentId: number, options: any): void;
27
- }
28
- export default ReEnhancedFlag;
@@ -1,32 +0,0 @@
1
- /****************************************************************************
2
- * Copyright 2021 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 { Box2Abs } from 'ketcher-core';
17
- import ReStruct from './index';
18
- import Render from '..';
19
- import Visel from './visel';
20
- declare class ReObject {
21
- visel: Visel;
22
- highlight: boolean;
23
- highlighting: any;
24
- selected: boolean;
25
- selectionPlate: any;
26
- constructor(viselType: string);
27
- getVBoxObj(render: Render): Box2Abs | null;
28
- setHighlight(highLight: boolean, render: Render): void;
29
- drawHighlight(render: Render): any;
30
- makeSelectionPlate(restruct: ReStruct, paper: any, styles: any): any;
31
- }
32
- export default ReObject;
@@ -1,40 +0,0 @@
1
- /****************************************************************************
2
- * Copyright 2021 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 { Vec2 } from 'ketcher-core';
17
- import ReObject from './ReObject';
18
- import ReStruct from './index';
19
- import Render from '..';
20
- interface MinDistanceWithReferencePoint {
21
- minDist: number;
22
- refPoint: Vec2 | null;
23
- }
24
- interface StyledPath {
25
- path: any;
26
- stylesApplied: boolean;
27
- }
28
- declare class ReSimpleObject extends ReObject {
29
- private item;
30
- constructor(simpleObject: any);
31
- static isSelectable(): boolean;
32
- calcDistance(p: Vec2, s: any): MinDistanceWithReferencePoint;
33
- getReferencePointDistance(p: Vec2): MinDistanceWithReferencePoint;
34
- getReferencePoints(onlyOnObject?: boolean): Array<Vec2>;
35
- highlightPath(render: Render): Array<StyledPath>;
36
- drawHighlight(render: Render): Array<any>;
37
- makeSelectionPlate(restruct: ReStruct, paper: any, styles: any): any;
38
- show(restruct: ReStruct, options: any): void;
39
- }
40
- export default ReSimpleObject;
@@ -1,110 +0,0 @@
1
- import { Box2Abs, Pile, Pool, Struct, Vec2 } from 'ketcher-core';
2
- import { LayerMap } from './GeneralEnumTypes';
3
- /****************************************************************************
4
- * Copyright 2021 EPAM Systems
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- ***************************************************************************/
18
- import ReAtom from './reatom';
19
- import ReBond from './rebond';
20
- import ReDataSGroupData from './redatasgroupdata';
21
- import ReEnhancedFlag from './ReEnhancedFlag';
22
- import ReFrag from './refrag';
23
- import ReLoop from './reloop';
24
- import ReRGroup from './rergroup';
25
- import ReRxnArrow from './rerxnarrow';
26
- import ReRxnPlus from './rerxnplus';
27
- import ReSGroup from './resgroup';
28
- import ReSimpleObject from './ReSimpleObject';
29
- import ReText from './ReText';
30
- import Render from '..';
31
- import Visel from './visel';
32
- declare class ReStruct {
33
- static maps: {
34
- atoms: typeof ReAtom;
35
- bonds: typeof ReBond;
36
- rxnPluses: typeof ReRxnPlus;
37
- rxnArrows: typeof ReRxnArrow;
38
- frags: typeof ReFrag;
39
- rgroups: typeof ReRGroup;
40
- sgroupData: typeof ReDataSGroupData;
41
- enhancedFlags: typeof ReEnhancedFlag;
42
- sgroups: typeof ReSGroup;
43
- reloops: typeof ReLoop;
44
- simpleObjects: typeof ReSimpleObject;
45
- texts: typeof ReText;
46
- };
47
- render: Render;
48
- molecule: Struct;
49
- atoms: Map<number, ReAtom>;
50
- bonds: Map<number, ReBond>;
51
- reloops: Map<number, ReLoop>;
52
- rxnPluses: Map<number, ReRxnPlus>;
53
- rxnArrows: Map<number, ReRxnArrow>;
54
- frags: Pool;
55
- rgroups: Pool;
56
- sgroups: Map<number, ReSGroup>;
57
- sgroupData: Map<number, ReDataSGroupData>;
58
- enhancedFlags: Map<number, ReEnhancedFlag>;
59
- private simpleObjects;
60
- texts: Map<number, ReText>;
61
- private initialized;
62
- private layers;
63
- connectedComponents: Pool;
64
- private ccFragmentType;
65
- private structChanged;
66
- private atomsChanged;
67
- private simpleObjectsChanged;
68
- private rxnArrowsChanged;
69
- private rxnPlusesChanged;
70
- private enhancedFlagsChanged;
71
- private bondsChanged;
72
- private textsChanged;
73
- constructor(molecule: any, render: Render);
74
- connectedComponentRemoveAtom(aid: number, reAtom?: ReAtom): void;
75
- clearConnectedComponents(): void;
76
- getConnectedComponent(aid: Array<number> | number, adjacentComponents: Pile): Pile;
77
- addConnectedComponent(idSet: Pile<number>): number;
78
- removeConnectedComponent(ccid: number): boolean;
79
- assignConnectedComponents(): void;
80
- initLayers(): void;
81
- addReObjectPath(group: LayerMap, visel: Visel, path: any, pos?: Vec2 | null, visible?: boolean): void;
82
- clearMarks(): void;
83
- markItemRemoved(): void;
84
- markBond(bid: number, mark: number): void;
85
- markAtom(aid: number, mark: number): void;
86
- markItem(map: string, id: number, mark: number): void;
87
- clearVisel(visel: Visel): void;
88
- eachItem(func: any): void;
89
- getVBoxObj(selection: any): Box2Abs | null;
90
- translate(d: any): void;
91
- scale(s: number): void;
92
- clearVisels(): void;
93
- update(force: boolean): boolean;
94
- updateLoops(): void;
95
- showLoops(): void;
96
- showSimpleObjects(): void;
97
- showTexts(): void;
98
- showReactionSymbols(): void;
99
- showSGroups(): void;
100
- showFragments(): void;
101
- showRGroups(): void;
102
- loopRemove(loopId: number): void;
103
- verifyLoops(): void;
104
- showLabels(): void;
105
- showEnhancedFlags(): void;
106
- showBonds(): void;
107
- setSelection(selection: any): void;
108
- showItemSelection(item: any, selected: any): void;
109
- }
110
- export default ReStruct;
@@ -1,38 +0,0 @@
1
- /****************************************************************************
2
- * Copyright 2021 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 { RawDraftContentBlock } from 'draft-js';
17
- import { Text, Vec2 } from 'ketcher-core';
18
- import ReObject from './ReObject';
19
- import ReStruct from './ReStruct';
20
- declare class ReText extends ReObject {
21
- private item;
22
- paths: Array<Array<any>>;
23
- constructor(text: Text);
24
- static isSelectable(): boolean;
25
- getReferencePoints(): Array<Vec2>;
26
- highlightPath(render: any): any;
27
- getRelBox(paths: Array<Array<any>>): {
28
- p0: Vec2;
29
- p1: Vec2;
30
- };
31
- getRowWidth(row: Array<any>): number;
32
- drawHighlight(render: any): any;
33
- makeSelectionPlate(restruct: ReStruct, paper: any, options: any): any;
34
- show(restruct: ReStruct, _id: number, options: any): void;
35
- getRanges(block: RawDraftContentBlock, options: any): Array<[number, number, Record<string, any>]>;
36
- getStyles(block: RawDraftContentBlock, index: number, options: any): Record<string, string>;
37
- }
38
- export default ReText;
@@ -1,13 +0,0 @@
1
- export default ReStruct;
2
- import ReStruct from "./ReStruct";
3
- import ReAtom from "./reatom";
4
- import ReBond from "./rebond";
5
- import ReRxnPlus from "./rerxnplus";
6
- import ReRxnArrow from "./rerxnarrow";
7
- import ReFrag from "./refrag";
8
- import ReRGroup from "./rergroup";
9
- import ReEnhancedFlag from "./ReEnhancedFlag";
10
- import ReSGroup from "./resgroup";
11
- import ReSimpleObject from "./ReSimpleObject";
12
- import ReText from "./ReText";
13
- export { ReAtom, ReBond, ReRxnPlus, ReRxnArrow, ReFrag, ReRGroup, ReEnhancedFlag, ReSGroup, ReSimpleObject, ReText };
@@ -1,46 +0,0 @@
1
- /****************************************************************************
2
- * Copyright 2021 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 { Atom, Box2Abs } from 'ketcher-core';
17
- import ReObject from './ReObject';
18
- import ReStruct from './ReStruct';
19
- import Render from '..';
20
- interface ElemAttr {
21
- text: string;
22
- path: any;
23
- rbb: {
24
- x: number;
25
- y: number;
26
- width: number;
27
- height: number;
28
- };
29
- }
30
- declare class ReAtom extends ReObject {
31
- a: Atom;
32
- showLabel: boolean;
33
- hydrogenOnTheLeft: boolean;
34
- color: string;
35
- component: number;
36
- label?: ElemAttr;
37
- constructor(atom: Atom);
38
- static isSelectable(): true;
39
- getVBoxObj(render: Render): Box2Abs | null;
40
- drawHighlight(render: Render): any;
41
- makeHighlightPlate(render: Render): any;
42
- makeSelectionPlate(restruct: ReStruct, paper: any, styles: any): any;
43
- show(restruct: ReStruct, aid: number, options: any): void;
44
- }
45
- export declare function getColorFromStereoLabel(options: any, stereoLabel: any): any;
46
- export default ReAtom;
@@ -1,40 +0,0 @@
1
- /****************************************************************************
2
- * Copyright 2021 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 { Bond } from 'ketcher-core';
17
- import ReObject from './ReObject';
18
- import ReStruct from './ReStruct';
19
- import Render from '..';
20
- declare class ReBond extends ReObject {
21
- b: Bond;
22
- doubleBondShift: number;
23
- path: any;
24
- neihbid1: number;
25
- neihbid2: number;
26
- boldStereo?: boolean;
27
- rbb?: {
28
- x: number;
29
- y: number;
30
- width: number;
31
- height: number;
32
- };
33
- constructor(bond: Bond);
34
- static isSelectable(): boolean;
35
- drawHighlight(render: Render): any;
36
- makeHighlightPlate(render: Render): any;
37
- makeSelectionPlate(restruct: ReStruct, paper: any, options: any): any;
38
- show(restruct: ReStruct, bid: number, options: any): void;
39
- }
40
- export default ReBond;
@@ -1,8 +0,0 @@
1
- export default ReDataSGroupData;
2
- declare class ReDataSGroupData extends ReObject {
3
- static isSelectable(): boolean;
4
- constructor(sgroup: any);
5
- sgroup: any;
6
- highlightPath(render: any): any;
7
- }
8
- import ReObject from "./ReObject";
@@ -1,12 +0,0 @@
1
- export default ReFrag;
2
- declare class ReFrag extends ReObject {
3
- static isSelectable(): boolean;
4
- constructor(frag: any);
5
- item: any;
6
- fragGetAtoms(restruct: any, fid: any): any[];
7
- fragGetBonds(restruct: any, fid: any): any[];
8
- calcBBox(restruct: any, fid: any, render: any): undefined;
9
- _draw(render: any, fid: any, attrs: any): any;
10
- draw(render: any): null;
11
- }
12
- import ReObject from "./ReObject";