ketcher-react 2.3.3 → 2.4.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.
Files changed (239) hide show
  1. package/LICENSE +201 -0
  2. package/dist/Editor.d.ts +2 -2
  3. package/dist/contexts/appContext.d.ts +17 -1
  4. package/dist/{script/editor/operations/FragmentStereoFlag.d.ts → contexts/errorsContext.d.ts} +5 -7
  5. package/dist/contexts/formContext.d.ts +15 -0
  6. package/dist/contexts/index.d.ts +19 -3
  7. package/dist/contexts/settingsContext.d.ts +15 -0
  8. package/dist/hooks/index.d.ts +16 -0
  9. package/dist/hooks/useAppContext.d.ts +15 -0
  10. package/dist/hooks/useFormContext.d.ts +15 -0
  11. package/dist/{script/ui/dialog/template/TemplateLib.d.ts → hooks/useInterval.d.ts} +1 -8
  12. package/dist/hooks/useSettingsContext.d.ts +15 -0
  13. package/dist/icons/index.d.ts +15 -0
  14. package/dist/index.css +1 -3
  15. package/dist/index.css.map +1 -1
  16. package/dist/index.d.ts +0 -1
  17. package/dist/index.js +15840 -19663
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.modern.js +15723 -19563
  20. package/dist/index.modern.js.map +1 -1
  21. package/dist/script/builders/ketcher/ButtonName.d.ts +1 -1
  22. package/dist/script/builders/ketcher/KetcherBuilder.d.ts +2 -5
  23. package/dist/script/editor/Editor.d.ts +7 -4
  24. package/dist/script/editor/index.d.ts +15 -0
  25. package/dist/script/editor/shared/utils.d.ts +2 -4
  26. package/dist/script/editor/tool/apoint.d.ts +5 -1
  27. package/dist/script/editor/tool/atom.d.ts +4 -0
  28. package/dist/script/editor/tool/attach.d.ts +5 -1
  29. package/dist/script/editor/tool/bond.d.ts +6 -2
  30. package/dist/script/editor/tool/chain.d.ts +6 -2
  31. package/dist/script/editor/tool/charge.d.ts +5 -1
  32. package/dist/script/editor/tool/enhanced-stereo.d.ts +15 -0
  33. package/dist/script/editor/tool/eraser.d.ts +4 -0
  34. package/dist/script/editor/tool/helper/lasso.d.ts +1 -0
  35. package/dist/script/editor/tool/paste.d.ts +7 -7
  36. package/dist/script/editor/tool/reactionarrow.d.ts +3 -4
  37. package/dist/script/editor/tool/rgroupatom.d.ts +4 -1
  38. package/dist/script/editor/tool/rgroupfragment.d.ts +5 -1
  39. package/dist/script/editor/tool/rotate.d.ts +1 -1
  40. package/dist/script/editor/tool/select.d.ts +23 -12
  41. package/dist/script/editor/tool/sgroup.d.ts +4 -0
  42. package/dist/script/editor/tool/template.d.ts +6 -1
  43. package/dist/script/editor/utils/customOnChangeHandler.d.ts +15 -0
  44. package/dist/script/index.d.ts +3 -2
  45. package/dist/script/ui/App/App.container.d.ts +17 -1
  46. package/dist/script/ui/App/AppHidden/AppHidden.container.d.ts +17 -1
  47. package/dist/script/ui/App/AppHidden/AppHidden.d.ts +15 -0
  48. package/dist/script/ui/App/initApp.d.ts +1 -5
  49. package/dist/script/ui/Portal/Portal.d.ts +1 -1
  50. package/dist/script/ui/action/action.types.d.ts +1 -1
  51. package/dist/script/ui/action/copyAs.d.ts +1 -0
  52. package/dist/script/ui/action/copyImageToClipboard.d.ts +2 -0
  53. package/dist/script/ui/action/debug.d.ts +2 -0
  54. package/dist/script/{editor/operations/rxn/RxnArrowMove.d.ts → ui/action/functionalGroups.d.ts} +12 -11
  55. package/dist/script/ui/action/index.d.ts +196 -10
  56. package/dist/script/ui/action/isHidden.d.ts +18 -0
  57. package/dist/script/ui/action/templates.d.ts +2 -0
  58. package/dist/script/ui/action/tools.d.ts +134 -4
  59. package/dist/script/ui/action/zoom.d.ts +6 -0
  60. package/dist/script/ui/component/ContextMenu/ContextMenu.d.ts +2 -0
  61. package/dist/script/ui/component/{cliparea.d.ts → cliparea/cliparea.d.ts} +3 -3
  62. package/dist/script/ui/component/form/buttonlist.d.ts +2 -1
  63. package/dist/script/ui/component/form/colorPicker/ColorPicker.d.ts +15 -0
  64. package/dist/script/ui/component/form/{combobox.d.ts → combobox/combobox.d.ts} +2 -2
  65. package/dist/script/ui/component/form/form/form.d.ts +20 -0
  66. package/dist/script/ui/component/form/input.d.ts +2 -2
  67. package/dist/script/ui/component/form/measure-input.d.ts +2 -2
  68. package/dist/script/ui/component/form/select.d.ts +17 -1
  69. package/dist/script/ui/component/structrender.d.ts +3 -3
  70. package/dist/script/ui/component/view/Tabs/Tabs.d.ts +2 -2
  71. package/dist/script/ui/component/view/openbutton.d.ts +2 -2
  72. package/dist/script/ui/data/schema/struct-schema.d.ts +22 -0
  73. package/dist/script/ui/dialog/index.d.ts +1 -61
  74. package/dist/script/ui/dialog/template/EmptySearchResult.d.ts +19 -0
  75. package/dist/script/ui/dialog/template/TemplateDialog.d.ts +43 -0
  76. package/dist/script/ui/dialog/template/TemplateTable.d.ts +6 -7
  77. package/dist/script/ui/dialog/template/template-attach.d.ts +1 -1
  78. package/dist/script/ui/dialog/toolbox/enhancedStereo/enhancedStereo.d.ts +42 -0
  79. package/dist/script/ui/dialog/toolbox/labeledit.d.ts +2 -1
  80. package/dist/script/ui/dialog/toolbox/rgroup/rgroup.d.ts +15 -0
  81. package/dist/script/ui/dialog/toolbox/sdata.d.ts +18 -1
  82. package/dist/script/ui/dialog/toolbox/sgroup.d.ts +8 -1
  83. package/dist/script/ui/state/action/index.d.ts +4 -2
  84. package/dist/script/ui/state/editor/index.d.ts +1 -0
  85. package/dist/script/{editor/operations/bond/BondMove.d.ts → ui/state/functionalGroups/index.d.ts} +7 -10
  86. package/dist/script/ui/state/functionalGroups/selectors/index.d.ts +17 -0
  87. package/dist/script/ui/state/hotkeys.d.ts +0 -2
  88. package/dist/script/ui/state/modal/form.d.ts +8 -0
  89. package/dist/script/ui/state/modal/index.d.ts +1 -1
  90. package/dist/script/ui/state/options/index.d.ts +1 -0
  91. package/dist/script/ui/state/templates/index.d.ts +2 -0
  92. package/dist/script/ui/state/templates/init-lib.d.ts +2 -1
  93. package/dist/script/ui/utils/index.d.ts +3 -0
  94. package/dist/script/ui/views/AppClipArea.d.ts +2 -1
  95. package/dist/script/ui/views/Editor.d.ts +2 -1
  96. package/dist/script/ui/views/components/Dialog/Dialog.d.ts +2 -2
  97. package/dist/script/ui/views/components/FunctionalGroups/FunctionalGroups.d.ts +23 -0
  98. package/dist/script/{editor/operations/rgroup → ui/views/components/FunctionalGroups}/index.d.ts +1 -2
  99. package/dist/script/ui/views/components/StructEditor/StructEditor.d.ts +4 -4
  100. package/dist/script/ui/views/components/index.d.ts +1 -1
  101. package/dist/script/ui/views/modal/Modal.container.d.ts +3 -1
  102. package/dist/script/ui/views/modal/components/PeriodTable/PeriodTable.d.ts +31 -1
  103. package/dist/script/ui/views/modal/components/PeriodTable/components/ElementsTable/ElementsTable.d.ts +2 -2
  104. package/dist/script/ui/views/modal/components/PeriodTable/components/index.d.ts +2 -2
  105. package/dist/script/ui/views/modal/components/Text/FontControl/FontControl.d.ts +21 -0
  106. package/dist/script/ui/views/modal/components/{meta/Help → Text/FontControl}/index.d.ts +1 -1
  107. package/dist/script/ui/views/modal/components/Text/Text.d.ts +8 -1
  108. package/dist/script/ui/views/modal/components/Text/TextButton/TextButton.d.ts +15 -0
  109. package/dist/script/ui/views/modal/components/Text/TextButton/index.d.ts +15 -0
  110. package/dist/script/ui/views/modal/components/document/Open/Open.container.d.ts +4 -2
  111. package/dist/script/ui/views/modal/components/document/Open/Open.d.ts +1 -1
  112. package/dist/script/ui/views/modal/components/document/Save/Save.d.ts +33 -1
  113. package/dist/script/ui/views/modal/components/meta/About/About.d.ts +2 -1
  114. package/dist/script/ui/views/modal/components/meta/Settings/Settings.d.ts +21 -1
  115. package/dist/script/ui/views/modal/components/meta/index.d.ts +1 -2
  116. package/dist/script/ui/views/modal/components/process/Analyse/Analyse.d.ts +6 -1
  117. package/dist/script/ui/views/modal/components/process/Analyse/components/FrozenInput/FrozenInput.d.ts +15 -0
  118. package/dist/script/ui/views/modal/components/process/Check/Check.d.ts +2 -1
  119. package/dist/script/ui/views/modal/components/process/Check/components/ErrorsCheck.d.ts +15 -0
  120. package/dist/script/ui/views/modal/components/process/Miew/Miew.d.ts +9 -1
  121. package/dist/script/ui/views/modal/components/process/Recognize/Recognize.d.ts +2 -1
  122. package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.container.d.ts +2 -4
  123. package/dist/script/ui/views/modal/components/toolbox/Atom/ElementNumber/ElementNumber.d.ts +15 -0
  124. package/dist/script/ui/views/modal/components/toolbox/Attach/Attach.container.d.ts +1 -4
  125. package/dist/script/ui/views/modal/components/toolbox/Attach/Attach.d.ts +1 -1
  126. package/dist/script/ui/views/modal/components/toolbox/Automap/Automap.container.d.ts +2 -4
  127. package/dist/script/ui/views/modal/components/toolbox/Automap/Automap.d.ts +1 -1
  128. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.container.d.ts +1 -4
  129. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.d.ts +16 -1
  130. package/dist/script/{editor/operations/calcimplicitH.d.ts → ui/views/modal/components/toolbox/FG/RemoveFG.d.ts} +7 -7
  131. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/RgroupLogic.container.d.ts +1 -4
  132. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/RgroupLogic.d.ts +2 -1
  133. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/components/IfThenSelect/IfThenSelect.d.ts +1 -1
  134. package/dist/script/ui/views/modal/components/toolbox/index.d.ts +1 -1
  135. package/dist/script/ui/views/toolbars/ArrowScroll/ArrowScroll.d.ts +23 -0
  136. package/dist/script/ui/views/toolbars/ArrowScroll/index.d.ts +2 -0
  137. package/dist/script/ui/views/toolbars/BottomToolbar/BottomToolbar.container.d.ts +1 -1
  138. package/dist/script/ui/views/toolbars/BottomToolbar/BottomToolbar.d.ts +15 -0
  139. package/dist/script/ui/views/toolbars/BottomToolbar/TemplatesList/TemplatesList.d.ts +15 -0
  140. package/dist/script/ui/views/toolbars/LeftToolbar/Bond/Bond.d.ts +15 -0
  141. package/dist/script/ui/views/toolbars/LeftToolbar/LeftToolbar.container.d.ts +2 -4
  142. package/dist/script/ui/views/toolbars/LeftToolbar/Transform/Transform.d.ts +15 -0
  143. package/dist/script/ui/views/toolbars/LeftToolbar/leftToolbarOptions.d.ts +9 -0
  144. package/dist/script/ui/views/toolbars/RightToolbar/AtomsList/AtomsList.d.ts +17 -2
  145. package/dist/script/ui/views/toolbars/RightToolbar/RightToolbar.container.d.ts +1 -1
  146. package/dist/script/ui/views/toolbars/RightToolbar/RightToolbar.d.ts +15 -0
  147. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ActionButton/ActionButton.d.ts +15 -0
  148. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ActionButton/index.d.ts +15 -0
  149. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarGroupItem.d.ts +16 -0
  150. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/ToolbarMultiToolItem.d.ts +19 -3
  151. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/usePortalOpening.d.ts +15 -0
  152. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/variants/DefaultMultiTool/DefaultMultiTool.d.ts +15 -0
  153. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/variants/GroupedMultiTool/GroupedMultiTool.d.ts +15 -0
  154. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/variants/chooseMultiTool.d.ts +1 -1
  155. package/dist/script/ui/views/toolbars/TopToolbar/HelpLink/HelpLink.d.ts +19 -0
  156. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.container.d.ts +2 -4
  157. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.d.ts +15 -0
  158. package/dist/script/ui/views/toolbars/TopToolbar/ZoomList/ZoomList.d.ts +15 -0
  159. package/dist/script/ui/views/toolbars/shortcutStr.d.ts +15 -0
  160. package/dist/script/ui/views/toolbars/toolbar.types.d.ts +3 -3
  161. package/package.json +32 -25
  162. package/dist/index.test.d.ts +0 -1
  163. package/dist/overlay.svg +0 -1
  164. package/dist/script/editor/actions/aromatic-fusing.d.ts +0 -15
  165. package/dist/script/editor/actions/atom.d.ts +0 -20
  166. package/dist/script/editor/actions/basic.d.ts +0 -3
  167. package/dist/script/editor/actions/bond.d.ts +0 -24
  168. package/dist/script/editor/actions/chain.d.ts +0 -5
  169. package/dist/script/editor/actions/closely-fusing.d.ts +0 -14
  170. package/dist/script/editor/actions/erase.d.ts +0 -4
  171. package/dist/script/editor/actions/fragment.d.ts +0 -10
  172. package/dist/script/editor/actions/paste.d.ts +0 -5
  173. package/dist/script/editor/actions/reaction.d.ts +0 -5
  174. package/dist/script/editor/actions/rgroup.d.ts +0 -4
  175. package/dist/script/editor/actions/rotate.d.ts +0 -4
  176. package/dist/script/editor/actions/sgroup.d.ts +0 -9
  177. package/dist/script/editor/actions/simpleobject.d.ts +0 -4
  178. package/dist/script/editor/actions/template.d.ts +0 -13
  179. package/dist/script/editor/actions/text.d.ts +0 -6
  180. package/dist/script/editor/actions/utils.d.ts +0 -15
  181. package/dist/script/editor/operations/CanvasLoad.d.ts +0 -26
  182. package/dist/script/editor/operations/EnhancedFlagMove.d.ts +0 -11
  183. package/dist/script/editor/operations/LoopMove.d.ts +0 -26
  184. package/dist/script/editor/operations/OperationType.d.ts +0 -62
  185. package/dist/script/editor/operations/Text/TextCreateDelete.d.ts +0 -41
  186. package/dist/script/editor/operations/Text/TextMove.d.ts +0 -29
  187. package/dist/script/editor/operations/Text/TextUpdate.d.ts +0 -29
  188. package/dist/script/editor/operations/Text/index.d.ts +0 -3
  189. package/dist/script/editor/operations/atom/AtomAttr.d.ts +0 -31
  190. package/dist/script/editor/operations/atom/AtomMove.d.ts +0 -28
  191. package/dist/script/editor/operations/atom/index.d.ts +0 -22
  192. package/dist/script/editor/operations/base.d.ts +0 -36
  193. package/dist/script/editor/operations/bond/BondAttr.d.ts +0 -31
  194. package/dist/script/editor/operations/bond/index.d.ts +0 -38
  195. package/dist/script/editor/operations/descriptors.d.ts +0 -15
  196. package/dist/script/editor/operations/fragment.d.ts +0 -15
  197. package/dist/script/editor/operations/fragmentStereoAtom.d.ts +0 -34
  198. package/dist/script/editor/operations/ifThen.d.ts +0 -35
  199. package/dist/script/editor/operations/index.d.ts +0 -32
  200. package/dist/script/editor/operations/rgroup/RGroupAttr.d.ts +0 -31
  201. package/dist/script/editor/operations/rgroup/RGroupFragment.d.ts +0 -29
  202. package/dist/script/editor/operations/rxn/index.d.ts +0 -38
  203. package/dist/script/editor/operations/rxn/plus/RxnPlusMove.d.ts +0 -27
  204. package/dist/script/editor/operations/rxn/plus/index.d.ts +0 -20
  205. package/dist/script/editor/operations/sgroup/SGroupAttr.d.ts +0 -27
  206. package/dist/script/editor/operations/sgroup/SGroupDataMove.d.ts +0 -26
  207. package/dist/script/editor/operations/sgroup/index.d.ts +0 -39
  208. package/dist/script/editor/operations/sgroup/sgroupAtom.d.ts +0 -34
  209. package/dist/script/editor/operations/sgroup/sgroupHierarchy.d.ts +0 -35
  210. package/dist/script/editor/operations/simpleObject.d.ts +0 -69
  211. package/dist/script/editor/shared/action.d.ts +0 -26
  212. package/dist/script/editor/shared/constants.d.ts +0 -7
  213. package/dist/script/ketcher.d.ts +0 -44
  214. package/dist/script/raphael-ext.d.ts +0 -1
  215. package/dist/script/render/draw.d.ts +0 -63
  216. package/dist/script/render/index.d.ts +0 -28
  217. package/dist/script/render/options.d.ts +0 -2
  218. package/dist/script/render/restruct/GeneralEnumTypes.d.ts +0 -35
  219. package/dist/script/render/restruct/ReEnhancedFlag.d.ts +0 -28
  220. package/dist/script/render/restruct/ReObject.d.ts +0 -32
  221. package/dist/script/render/restruct/ReSimpleObject.d.ts +0 -40
  222. package/dist/script/render/restruct/ReStruct.d.ts +0 -110
  223. package/dist/script/render/restruct/ReText.d.ts +0 -38
  224. package/dist/script/render/restruct/index.d.ts +0 -13
  225. package/dist/script/render/restruct/reatom.d.ts +0 -46
  226. package/dist/script/render/restruct/rebond.d.ts +0 -40
  227. package/dist/script/render/restruct/redatasgroupdata.d.ts +0 -8
  228. package/dist/script/render/restruct/refrag.d.ts +0 -12
  229. package/dist/script/render/restruct/reloop.d.ts +0 -12
  230. package/dist/script/render/restruct/rergroup.d.ts +0 -15
  231. package/dist/script/render/restruct/rerxnarrow.d.ts +0 -9
  232. package/dist/script/render/restruct/rerxnplus.d.ts +0 -9
  233. package/dist/script/render/restruct/resgroup.d.ts +0 -9
  234. package/dist/script/render/restruct/visel.d.ts +0 -12
  235. package/dist/script/render/util.d.ts +0 -22
  236. package/dist/script/ui/component/form/form.d.ts +0 -4
  237. package/dist/script/ui/dialog/toolbox/enhancedStereo.d.ts +0 -2
  238. package/dist/script/ui/dialog/toolbox/rgroup.d.ts +0 -2
  239. package/dist/script/ui/views/modal/components/meta/Help/Help.d.ts +0 -2
@@ -13,4 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
- export declare type ButtonName = 'layout' | 'clean' | 'arom' | 'dearom' | 'cip' | 'check' | 'analyse' | 'recognize' | 'miew';
16
+ export declare type ButtonName = 'layout' | 'clean' | 'arom' | 'dearom' | 'cip' | 'check' | 'analyse' | 'recognize' | 'miew' | 'settings' | 'help' | 'about' | 'sgroup' | 'sgroup-data' | 'reaction-plus' | 'arrows' | 'reaction-arrow-open-angle' | 'reaction-arrow-filled-triangle' | 'reaction-arrow-filled-bow' | 'reaction-arrow-dashed-open-angle' | 'reaction-arrow-failed' | 'reaction-arrow-both-ends-filled-triangle' | 'reaction-arrow-equilibrium-filled-half-bow' | 'reaction-arrow-equilibrium-filled-triangle' | 'reaction-arrow-equilibrium-open-angle' | 'reaction-arrow-unbalanced-equilibrium-filled-half-bow' | 'reaction-arrow-unbalanced-equilibrium-open-half-angle' | 'reaction-arrow-unbalanced-equilibrium-large-filled-half-bow' | 'reaction-arrow-unbalanced-equilibrium-filled-half-triangle' | 'reaction-mapping-tools' | 'reaction-automap' | 'reaction-map' | 'reaction-unmap' | 'rgroup' | 'rgroup-label' | 'rgroup-fragment' | 'rgroup-attpoints' | 'shape' | 'shape-ellipse' | 'shape-rectangle' | 'shape-line' | 'text' | 'enhanced-stereo';
@@ -13,20 +13,17 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
- import { ServiceMode, StructServiceProvider } from 'ketcher-core';
17
- import { Ketcher } from '../../ketcher';
16
+ import { Ketcher, ServiceMode, StructServiceProvider } from 'ketcher-core';
18
17
  import { ButtonsConfig } from './ButtonsConfig';
19
18
  declare class KetcherBuilder {
20
19
  private structService;
21
20
  private editor;
22
21
  private serviceMode;
23
22
  private formatterFactory;
24
- private ui;
25
- private tempUIDataContainer;
26
23
  constructor();
27
24
  appendApiAsync(structServiceProvider: StructServiceProvider): Promise<void>;
28
25
  appendServiceMode(mode: ServiceMode): void;
29
- appendUiAsync(element: HTMLDivElement | null, staticResourcesUrl: string, buttons?: ButtonsConfig): Promise<void>;
26
+ appendUiAsync(element: HTMLDivElement | null, staticResourcesUrl: string, errorHandler: (message: string) => void, buttons?: ButtonsConfig): Promise<void>;
30
27
  build(): Ketcher;
31
28
  }
32
29
  export { KetcherBuilder };
@@ -13,10 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
+ import { Action, Editor as KetcherEditor, Render, Struct } from 'ketcher-core';
16
17
  import { PipelineSubscription, Subscription } from 'subscription';
17
- import { Struct } from 'ketcher-core';
18
- import Action from './shared/action';
19
- import Render from '../render';
20
18
  interface Selection {
21
19
  atoms?: Array<number>;
22
20
  bonds?: Array<number>;
@@ -24,12 +22,14 @@ interface Selection {
24
22
  rxnPluses?: Array<number>;
25
23
  rxnArrows?: Array<number>;
26
24
  }
27
- declare class Editor {
25
+ declare class Editor implements KetcherEditor {
26
+ #private;
28
27
  render: Render;
29
28
  _selection: Selection | null;
30
29
  _tool: any;
31
30
  historyStack: any;
32
31
  historyPtr: any;
32
+ errorHandler: ((message: string) => void) | null;
33
33
  event: {
34
34
  message: Subscription;
35
35
  elementEdit: PipelineSubscription;
@@ -39,6 +39,7 @@ declare class Editor {
39
39
  sdataEdit: PipelineSubscription;
40
40
  quickEdit: PipelineSubscription;
41
41
  attachEdit: PipelineSubscription;
42
+ removeFG: PipelineSubscription;
42
43
  change: Subscription;
43
44
  selectionChange: PipelineSubscription;
44
45
  aromatizeStruct: PipelineSubscription;
@@ -47,6 +48,8 @@ declare class Editor {
47
48
  };
48
49
  lastEvent: any;
49
50
  constructor(clientArea: any, options: any);
51
+ isDitrty(): boolean;
52
+ setOrigin(): void;
50
53
  tool(name?: any, opts?: any): any;
51
54
  clear(): void;
52
55
  struct(value?: Struct): Struct;
@@ -1,3 +1,18 @@
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
+ ***************************************************************************/
1
16
  import { Editor } from './Editor';
2
17
  export { Editor };
3
18
  export default Editor;
@@ -3,19 +3,17 @@ declare namespace _default {
3
3
  export { fracAngle };
4
4
  export { calcNewAtomPos };
5
5
  export { degrees };
6
- export { setFracAngle };
7
6
  export { mergeBondsParams };
8
7
  }
9
8
  export default _default;
10
9
  declare function calcAngle(pos0: any, pos1: any): number;
11
- declare function fracAngle(angle: any, angle2: any): number;
10
+ import { fracAngle } from "ketcher-core/dist/application/editor";
12
11
  declare function calcNewAtomPos(pos0: any, pos1: any, ctrlKey: any): Vec2;
13
12
  declare function degrees(angle: any): number;
14
- declare function setFracAngle(angle: any): void;
15
13
  declare function mergeBondsParams(struct1: any, bond1: any, struct2: any, bond2: any): {
16
14
  merged: boolean;
17
15
  angle: number;
18
16
  scale: number;
19
17
  cross: boolean;
20
18
  };
21
- import { Vec2 } from "ketcher-core/dist/domain/entities/Vec2";
19
+ import { Vec2 } from "ketcher-core/dist/domain/entities/vec2";
@@ -3,6 +3,10 @@ declare function APointTool(editor: any): APointTool;
3
3
  declare class APointTool {
4
4
  constructor(editor: any);
5
5
  editor: any;
6
+ sgroups: any;
7
+ struct: any;
8
+ molecule: any;
9
+ functionalGroups: any;
6
10
  mousemove(event: any): void;
7
- click(event: any): boolean;
11
+ click(event: any): true | undefined;
8
12
  }
@@ -5,10 +5,14 @@ declare class AtomTool {
5
5
  constructor(editor: any, atomProps: any);
6
6
  editor: any;
7
7
  atomProps: any;
8
+ struct: any;
8
9
  bondProps: {
9
10
  type: number;
10
11
  stereo: number;
11
12
  } | undefined;
13
+ sgroups: any;
14
+ molecule: any;
15
+ functionalGroups: any;
12
16
  mousedown(event: any): void;
13
17
  dragCtx: {
14
18
  item?: undefined;
@@ -7,6 +7,10 @@ declare class AttachTool {
7
7
  bondid: any;
8
8
  } | undefined;
9
9
  editor: any;
10
+ struct: any;
11
+ sgroups: any;
12
+ molecule: any;
13
+ functionalGroups: any;
10
14
  mousemove(event: any): boolean;
11
- click(event: any): boolean;
15
+ click(event: any): true | undefined;
12
16
  }
@@ -7,11 +7,15 @@ declare class BondTool {
7
7
  label: string;
8
8
  } | undefined;
9
9
  bondProps: any;
10
- mousedown(event: any): boolean;
10
+ struct: any;
11
+ sgroups: any;
12
+ molecule: any;
13
+ functionalGroups: any;
14
+ mousedown(event: any): true | undefined;
11
15
  dragCtx: {
12
16
  xy0: any;
13
17
  item: any;
14
18
  } | undefined;
15
- mousemove(event: any): boolean;
19
+ mousemove(event: any): true | undefined;
16
20
  mouseup(event: any): boolean;
17
21
  }
@@ -3,13 +3,17 @@ declare function ChainTool(editor: any): ChainTool;
3
3
  declare class ChainTool {
4
4
  constructor(editor: any);
5
5
  editor: any;
6
- mousedown(event: any): boolean;
6
+ struct: any;
7
+ sgroups: any;
8
+ molecule: any;
9
+ functionalGroups: any;
10
+ mousedown(event: any): true | undefined;
7
11
  dragCtx: {
8
12
  xy0: any;
9
13
  item: any;
10
14
  } | undefined;
11
15
  mousemove(event: any): boolean;
12
- mouseup(): boolean;
16
+ mouseup(): true | undefined;
13
17
  cancel: any;
14
18
  mouseleave: any;
15
19
  }
@@ -4,6 +4,10 @@ declare class ChargeTool {
4
4
  constructor(editor: any, charge: any);
5
5
  editor: any;
6
6
  charge: any;
7
+ struct: any;
8
+ sgroups: any;
9
+ molecule: any;
10
+ functionalGroups: any;
7
11
  mousemove(event: any): boolean;
8
- click(event: any): boolean;
12
+ click(event: any): true | undefined;
9
13
  }
@@ -1,3 +1,18 @@
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
+ ***************************************************************************/
1
16
  import Editor from '../Editor';
2
17
  declare function EnhancedStereoTool(this: typeof EnhancedStereoTool, editor: Editor): null | void;
3
18
  export default EnhancedStereoTool;
@@ -3,6 +3,10 @@ declare function EraserTool(editor: any, mode: any): EraserTool | null;
3
3
  declare class EraserTool {
4
4
  constructor(editor: any, mode: any);
5
5
  editor: any;
6
+ sgroups: any;
7
+ struct: any;
8
+ molecule: any;
9
+ functionalGroups: any;
6
10
  maps: string[] | undefined;
7
11
  lassoHelper: LassoHelper | undefined;
8
12
  mousedown(event: any): void;
@@ -40,4 +40,5 @@ declare class LassoHelper {
40
40
  simpleObjects: any[];
41
41
  texts: any[];
42
42
  };
43
+ cancel(): void;
43
44
  }
@@ -4,14 +4,14 @@ declare class PasteTool {
4
4
  constructor(editor: any, struct: any);
5
5
  editor: any;
6
6
  struct: any;
7
- action: import("../shared/action").default | {
8
- atoms: never[];
9
- bonds: never[];
10
- } | undefined;
7
+ sgroups: any;
8
+ molecule: any;
9
+ functionalGroups: any;
10
+ action: any;
11
11
  mergeItems: {
12
- atoms: Map<number, number>;
13
- bonds: Map<number, number>;
14
- } | undefined;
12
+ atoms: Map<unknown, unknown>;
13
+ bonds: Map<unknown, unknown>;
14
+ } | null | undefined;
15
15
  mousemove(event: any): void;
16
16
  mouseup(): void;
17
17
  cancel(): void;
@@ -6,10 +6,9 @@ declare class ReactionArrowTool {
6
6
  editor: any;
7
7
  mousedown(event: any): void;
8
8
  dragCtx: {
9
- xy0: any;
10
- action: Action;
9
+ p0: any;
11
10
  } | undefined;
12
11
  mousemove(event: any): void;
13
- mouseup(event: any): void;
12
+ mouseup(event: any): boolean;
13
+ click(event: any): void;
14
14
  }
15
- import Action from "../shared/action";
@@ -3,6 +3,9 @@ declare function RGroupAtomTool(editor: any): RGroupAtomTool;
3
3
  declare class RGroupAtomTool {
4
4
  constructor(editor: any);
5
5
  editor: any;
6
+ struct: any;
7
+ sgroups: any;
8
+ functionalGroups: any;
6
9
  mousemove(event: any): void;
7
- click(event: any): boolean;
10
+ click(event: any): true | undefined;
8
11
  }
@@ -3,7 +3,11 @@ declare function RGroupFragmentTool(editor: any): RGroupFragmentTool;
3
3
  declare class RGroupFragmentTool {
4
4
  constructor(editor: any);
5
5
  editor: any;
6
+ struct: any;
7
+ sgroups: any;
8
+ molecule: any;
9
+ functionalGroups: any;
6
10
  mousemove(event: any): void;
7
- click(event: any): boolean;
11
+ click(event: any): true | undefined;
8
12
  cancel(): void;
9
13
  }
@@ -13,4 +13,4 @@ declare class RotateTool {
13
13
  cancel: any;
14
14
  mouseleave: any;
15
15
  }
16
- import { Vec2 } from "ketcher-core/dist/domain/entities/Vec2";
16
+ import { Vec2 } from "ketcher-core/dist/domain/entities/vec2";
@@ -1,18 +1,29 @@
1
- export default SelectTool;
2
- declare function SelectTool(editor: any, mode: any): SelectTool;
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 { Editor } from '../Editor';
3
17
  declare class SelectTool {
18
+ #private;
19
+ editor: Editor;
20
+ dragCtx: any;
4
21
  constructor(editor: any, mode: any);
5
- editor: any;
6
- lassoHelper: LassoHelper | undefined;
7
22
  mousedown(event: any): boolean;
8
- dragCtx: {
9
- item: any;
10
- xy0: any;
11
- } | undefined;
12
23
  mousemove(event: any): boolean;
13
24
  mouseup(event: any): boolean;
14
- dblclick(event: any): boolean;
15
- cancel(): void;
16
- mouseleave: any;
25
+ dblclick(event: any): true | undefined;
26
+ mouseleave(_: any): void;
17
27
  }
18
- import LassoHelper from "./helper/lasso";
28
+ export declare function selMerge(selection: any, add: any, reversible: boolean): any;
29
+ export default SelectTool;
@@ -4,6 +4,10 @@ declare function SGroupTool(editor: any, type: any): SGroupTool | null;
4
4
  declare class SGroupTool {
5
5
  constructor(editor: any, type: any);
6
6
  editor: any;
7
+ struct: any;
8
+ sgroups: any;
9
+ molecule: any;
10
+ functionalGroups: any;
7
11
  type: any;
8
12
  lassoHelper: LassoHelper | undefined;
9
13
  mousedown(event: any): void;
@@ -3,12 +3,17 @@ declare function TemplateTool(editor: any, tmpl: any): TemplateTool;
3
3
  declare class TemplateTool {
4
4
  constructor(editor: any, tmpl: any);
5
5
  editor: any;
6
+ mode: any;
7
+ struct: any;
8
+ sgroups: any;
9
+ molecule: any;
10
+ functionalGroups: any;
6
11
  template: {
7
12
  aid: number;
8
13
  bid: number;
9
14
  } | undefined;
10
15
  findItems: string[] | undefined;
11
- mousedown(event: any): boolean;
16
+ mousedown(event: any): true | undefined;
12
17
  dragCtx: {
13
18
  xy0: any;
14
19
  item: any;
@@ -1 +1,16 @@
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
+ ***************************************************************************/
1
16
  export declare function customOnChangeHandler(action: any, handler: any): any;
@@ -1,4 +1,3 @@
1
- import { ButtonsConfig } from './builders';
2
1
  /****************************************************************************
3
2
  * Copyright 2021 EPAM Systems
4
3
  *
@@ -14,13 +13,15 @@ import { ButtonsConfig } from './builders';
14
13
  * See the License for the specific language governing permissions and
15
14
  * limitations under the License.
16
15
  ***************************************************************************/
16
+ import { ButtonsConfig } from './builders';
17
17
  import { StructServiceProvider } from 'ketcher-core';
18
18
  interface Config {
19
19
  element: HTMLDivElement | null;
20
20
  staticResourcesUrl: string;
21
21
  structServiceProvider: StructServiceProvider;
22
22
  buttons?: ButtonsConfig;
23
+ errorHandler: (message: string) => void;
23
24
  }
24
- declare function buildKetcherAsync({ element, staticResourcesUrl, structServiceProvider, buttons }: Config): Promise<import("./ketcher").Ketcher>;
25
+ declare function buildKetcherAsync({ element, staticResourcesUrl, structServiceProvider, buttons, errorHandler }: Config): Promise<import("ketcher-core").Ketcher>;
25
26
  export type { Config, ButtonsConfig };
26
27
  export default buildKetcherAsync;
@@ -1,3 +1,19 @@
1
- declare const AppContainer: any;
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 { AppCallProps } from './App';
17
+ declare const AppContainer: import("react-redux").ConnectedComponent<(props: AppCallProps) => JSX.Element, import("react-redux").Omit<AppCallProps, "checkServer">>;
2
18
  export { AppContainer };
3
19
  export default AppContainer;
@@ -1,2 +1,18 @@
1
- declare const AppHiddenContainer: any;
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 { AppHiddenCallProps } from './AppHidden';
17
+ declare const AppHiddenContainer: import("react-redux").ConnectedComponent<(props: AppHiddenCallProps) => JSX.Element, import("react-redux").Omit<AppHiddenCallProps, "onInitTmpls">>;
2
18
  export { AppHiddenContainer };
@@ -1,3 +1,18 @@
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
+ ***************************************************************************/
1
16
  interface AppHiddenCallProps {
2
17
  onInitTmpls: (cacheEl: any, url: any) => void;
3
18
  }
@@ -14,9 +14,5 @@
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
16
  import { StructService } from 'ketcher-core';
17
- import { loadStruct } from '../state/shared';
18
- declare function initApp(element: HTMLDivElement | null, staticResourcesUrl: string, options: any, server: StructService, setEditor: (editor: any) => void): {
19
- load: (structStr: any, opts: any) => any;
20
- loadStruct: typeof loadStruct;
21
- };
17
+ declare function initApp(element: HTMLDivElement | null, staticResourcesUrl: string, options: any, server: StructService, setEditor: (editor: any) => void): void;
22
18
  export { initApp };
@@ -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 { Component, CSSProperties } from 'react';
16
+ import { CSSProperties, Component } from 'react';
17
17
  interface PortalProps {
18
18
  isOpen: boolean;
19
19
  className?: string;
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
16
  import { Dispatch } from 'redux';
17
- declare type ToolVariant = 'about' | 'analyse' | 'arom' | 'bond-any' | 'bond-hydrogen' | 'bond-aromatic' | 'bond-crossed' | 'bond-dative' | 'bond-double' | 'bond-doublearomatic' | 'bond-down' | 'bond-single' | 'bond-singlearomatic' | 'bond-singledouble' | 'bond-triple' | 'bond-up' | 'bond-updown' | 'chain' | 'charge-minus' | 'charge-plus' | 'check' | 'chiral-flag' | 'cip' | 'clean' | 'copy' | 'cut' | 'dearom' | 'dropdown' | 'enhanced-stereo' | 'erase' | 'generic-groups' | 'help' | 'layout' | 'logo' | 'miew' | 'new' | 'open' | 'paste' | 'period-table' | 'reaction-arrow' | 'reaction-automap' | 'reaction-map' | 'reaction-plus' | 'reaction-unmap' | 'recognize' | 'redo' | 'rgroup-attpoints' | 'rgroup-fragment' | 'rgroup-label' | 'save' | 'select-fragment' | 'select-lasso' | 'select-rectangle' | 'settings' | 'sgroup' | 'sgroup-data' | 'template-0' | 'template-1' | 'template-2' | 'template-3' | 'template-4' | 'template-5' | 'template-6' | 'template-7' | 'template-lib' | 'text' | 'transform-flip-h' | 'transform-flip-v' | 'transform-rotate' | 'zoom-in' | 'zoom-out' | 'shape-circle' | 'shape-rectangle' | 'shape-polyline' | 'shape-line' | 'undo';
17
+ declare type ToolVariant = 'about' | 'analyse' | 'arom' | 'bond-any' | 'bond-hydrogen' | 'bond-aromatic' | 'bond-crossed' | 'bond-dative' | 'bond-double' | 'bond-doublearomatic' | 'bond-down' | 'bond-single' | 'bond-singlearomatic' | 'bond-singledouble' | 'bond-triple' | 'bond-up' | 'bond-updown' | 'chain' | 'charge-minus' | 'charge-plus' | 'check' | 'chiral-flag' | 'cip' | 'clean' | 'copy' | 'copy-image' | 'cut' | 'dearom' | 'dropdown' | 'enhanced-stereo' | 'erase' | 'functional-groups' | 'generic-groups' | 'help' | 'layout' | 'logo' | 'miew' | 'clear' | 'open' | 'paste' | 'period-table' | 'reaction-arrow' | 'reaction-automap' | 'reaction-map' | 'reaction-plus' | 'reaction-unmap' | 'recognize' | 'redo' | 'rgroup-attpoints' | 'rgroup-fragment' | 'rgroup-label' | 'save' | 'select-fragment' | 'select-lasso' | 'select-rectangle' | 'settings' | 'sgroup' | 'sgroup-data' | 'template-0' | 'template-1' | 'template-2' | 'template-3' | 'template-4' | 'template-5' | 'template-6' | 'template-7' | 'template-lib' | 'text' | 'transform-flip-h' | 'transform-flip-v' | 'transform-rotate' | 'zoom-in' | 'zoom-out' | 'shape-circle' | 'shape-rectangle' | 'shape-polyline' | 'shape-line' | 'undo';
18
18
  declare type Editor = any;
19
19
  declare type Server = any;
20
20
  declare type Options = any;
@@ -0,0 +1 @@
1
+ export default function copyAs(type: any): null | undefined;
@@ -0,0 +1,2 @@
1
+ export default copyImageToClipboard;
2
+ declare function copyImageToClipboard(): Promise<void>;
@@ -3,9 +3,11 @@ declare const debugObj: {
3
3
  'force-update': {
4
4
  shortcut: string;
5
5
  action: (editor: any) => void;
6
+ hidden: (options: any) => boolean;
6
7
  };
7
8
  'qs-serialize': {
8
9
  shortcut: string;
9
10
  action: (editor: any) => void;
10
11
  };
12
+ hidden: (options: any) => boolean;
11
13
  };
@@ -13,15 +13,16 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
- import { BaseOperation } from '../base';
17
- import Restruct from '../../../render/restruct';
18
- export declare class RxnArrowMove extends BaseOperation {
19
- data: {
20
- id: any;
21
- d: any;
22
- noinvalidate: any;
16
+ declare const functionalGroupsLib: {
17
+ 'functional-groups': {
18
+ shortcut: string;
19
+ title: string;
20
+ action: {
21
+ dialog: string;
22
+ };
23
+ selected: (editor: any) => boolean;
24
+ disabled: (_: any, __: any, options: any) => boolean;
25
+ hidden: (options: any) => boolean;
23
26
  };
24
- constructor(id?: any, d?: any, noinvalidate?: any);
25
- execute(restruct: Restruct): void;
26
- invert(): RxnArrowMove;
27
- }
27
+ };
28
+ export default functionalGroupsLib;