ketcher-react 2.11.0-rc.4 → 2.12.0-rc.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 (109) hide show
  1. package/dist/components/Buttons/IconButton/IconButton.d.ts +19 -0
  2. package/dist/{icons → components/Buttons/IconButton}/index.d.ts +1 -1
  3. package/dist/components/Buttons/IconButton/styles.d.ts +24 -0
  4. package/dist/{script/ui/views/toolbars/TopToolbar/IconButton.d.ts → components/Buttons/IconButton/types.d.ts} +10 -6
  5. package/dist/components/Buttons/index.d.ts +16 -0
  6. package/dist/components/Icon/Icon.d.ts +19 -0
  7. package/dist/components/Icon/index.d.ts +19 -0
  8. package/dist/{script/ui/views/toolbars/LeftToolbar/Transform/Transform.d.ts → components/Icon/types.d.ts} +9 -8
  9. package/dist/components/Icon/utils/getIconByName.d.ts +17 -0
  10. package/dist/components/Icon/utils/getIconName.d.ts +17 -0
  11. package/dist/components/Icon/utils/iconNameToIcon.d.ts +209 -0
  12. package/dist/components/index.d.ts +17 -0
  13. package/dist/components/styles/consts.d.ts +46 -0
  14. package/dist/components/styles/index.d.ts +16 -0
  15. package/dist/constants.d.ts +2 -0
  16. package/dist/index.css +1 -1
  17. package/dist/index.css.map +1 -1
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +11755 -7063
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.modern.js +11827 -7142
  22. package/dist/index.modern.js.map +1 -1
  23. package/dist/script/editor/Editor.d.ts +15 -6
  24. package/dist/script/editor/shared/closest.d.ts +3 -3
  25. package/dist/script/editor/shared/utils.d.ts +0 -36
  26. package/dist/script/editor/tool/Tool.d.ts +21 -0
  27. package/dist/script/editor/tool/apoint.d.ts +3 -3
  28. package/dist/script/editor/tool/atom.d.ts +5 -5
  29. package/dist/script/editor/tool/attach.d.ts +4 -4
  30. package/dist/script/editor/tool/bond.d.ts +6 -8
  31. package/dist/script/editor/tool/chain.d.ts +4 -4
  32. package/dist/script/editor/tool/charge.d.ts +4 -4
  33. package/dist/script/editor/tool/enhanced-stereo.d.ts +4 -3
  34. package/dist/script/editor/tool/eraser.d.ts +5 -6
  35. package/dist/script/editor/tool/hand.d.ts +5 -6
  36. package/dist/script/editor/tool/helper/deleteFunctionalGroups.d.ts +2 -0
  37. package/dist/script/editor/tool/helper/filterNotInCollapsedSGroup.d.ts +13 -0
  38. package/dist/script/editor/tool/index.d.ts +17 -47
  39. package/dist/script/editor/tool/paste.d.ts +8 -11
  40. package/dist/script/editor/tool/reactionarrow.d.ts +12 -8
  41. package/dist/script/editor/tool/reactionmap.d.ts +5 -6
  42. package/dist/script/editor/tool/reactionplus.d.ts +4 -4
  43. package/dist/script/editor/tool/reactionunmap.d.ts +3 -3
  44. package/dist/script/editor/tool/rgroupatom.d.ts +3 -3
  45. package/dist/script/editor/tool/rgroupfragment.d.ts +3 -3
  46. package/dist/script/editor/tool/rotate-controller.d.ts +9 -2
  47. package/dist/script/editor/tool/rotate-controller.utils.d.ts +3 -0
  48. package/dist/script/editor/tool/rotate.d.ts +7 -6
  49. package/dist/script/editor/tool/select.d.ts +11 -10
  50. package/dist/script/editor/tool/sgroup.d.ts +4 -4
  51. package/dist/script/editor/tool/simpleobject.d.ts +7 -5
  52. package/dist/script/editor/tool/template.d.ts +19 -21
  53. package/dist/script/editor/tool/text.d.ts +4 -3
  54. package/dist/script/ui/action/index.d.ts +0 -4
  55. package/dist/script/ui/action/tools.d.ts +0 -4
  56. package/dist/script/ui/component/cliparea/cliparea.d.ts +1 -0
  57. package/dist/script/ui/component/view/saveButton.types.d.ts +2 -0
  58. package/dist/script/ui/component/view/saveButton.utils.d.ts +2 -0
  59. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.constants.d.ts +4 -0
  60. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.container.d.ts +17 -0
  61. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.container.test.d.ts +1 -0
  62. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.d.ts +22 -0
  63. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.test.d.ts +1 -0
  64. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.test.utils.d.ts +8 -0
  65. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.types.d.ts +37 -0
  66. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.utils.d.ts +23 -0
  67. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.utils.test.d.ts +16 -0
  68. package/dist/script/ui/dialog/AbbreviationLookup/hooks/useOptions.d.ts +17 -0
  69. package/dist/script/ui/dialog/AbbreviationLookup/hooks/useOptions.test.d.ts +1 -0
  70. package/dist/script/ui/dialog/AbbreviationLookup/index.d.ts +17 -0
  71. package/dist/script/ui/state/abbreviationLookup/abbreviationLookup.types.d.ts +19 -0
  72. package/dist/script/ui/state/abbreviationLookup/index.d.ts +30 -0
  73. package/dist/script/ui/state/abbreviationLookup/index.test.d.ts +1 -0
  74. package/dist/script/ui/{views/toolbars/LeftToolbar/Transform → state/abbreviationLookup/selectors}/index.d.ts +1 -1
  75. package/dist/script/ui/state/abbreviationLookup/selectors/selectors.d.ts +17 -0
  76. package/dist/script/ui/state/common/common.types.d.ts +21 -0
  77. package/dist/script/ui/state/common/index.d.ts +26 -0
  78. package/dist/script/ui/state/common/index.test.d.ts +1 -0
  79. package/dist/script/ui/state/common/selectors/index.d.ts +16 -0
  80. package/dist/script/ui/state/common/selectors/selectors.d.ts +19 -0
  81. package/dist/script/ui/state/constants.d.ts +21 -6
  82. package/dist/script/ui/state/editor/index.d.ts +1 -0
  83. package/dist/script/ui/state/floatingTools/index.d.ts +16 -0
  84. package/dist/script/ui/state/floatingTools/selectors/index.d.ts +5 -0
  85. package/dist/script/ui/state/mouse.d.ts +16 -0
  86. package/dist/script/ui/state/moveSelectedItems.d.ts +5 -0
  87. package/dist/script/ui/state/templates/index.d.ts +38 -23
  88. package/dist/script/ui/state/templates/selectors/index.d.ts +16 -0
  89. package/dist/script/ui/utils/index.d.ts +0 -1
  90. package/dist/script/ui/views/components/ContextMenu/ContextMenuTrigger.utils.d.ts +7 -0
  91. package/dist/script/ui/views/components/StructEditor/StructEditor.d.ts +1 -0
  92. package/dist/script/ui/views/modal/components/Text/TextButton/TextButton.d.ts +2 -1
  93. package/dist/script/ui/views/modal/components/document/Open/components/FileDrop.d.ts +2 -1
  94. package/dist/script/ui/views/modal/components/document/Save/Save.d.ts +1 -1
  95. package/dist/script/ui/views/toolbars/FloatingTools/FloatingTools.container.d.ts +4 -0
  96. package/dist/script/ui/views/toolbars/FloatingTools/FloatingTools.d.ts +20 -0
  97. package/dist/script/ui/views/toolbars/FloatingTools/index.d.ts +1 -0
  98. package/dist/script/ui/views/toolbars/LeftToolbar/leftToolbarOptions.d.ts +1 -2
  99. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ActionButton/ActionButton.d.ts +2 -1
  100. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarGroupItem.d.ts +1 -1
  101. package/dist/script/ui/views/toolbars/TopToolbar/Divider.d.ts +1 -0
  102. package/dist/script/ui/views/toolbars/TopToolbar/FileControls.d.ts +0 -15
  103. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbarIconButton.d.ts +18 -0
  104. package/dist/script/ui/views/toolbars/index.d.ts +1 -0
  105. package/dist/script/ui/views/toolbars/toolbar.types.d.ts +4 -3
  106. package/package.json +6 -3
  107. package/dist/script/editor/tool/helper/getMergeItems.d.ts +0 -2
  108. package/dist/script/ui/component/view/icon.d.ts +0 -5
  109. package/dist/script/ui/utils/renderStruct.d.ts +0 -9
@@ -1,30 +1,47 @@
1
- export function selectTmpl(tmpl: 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 initTmplLib from './init-lib';
17
+ export { initTmplLib };
18
+ export declare function selectTmpl(tmpl: any): {
2
19
  type: string;
3
20
  data: {
4
21
  selected: any;
5
22
  };
6
23
  };
7
- export function changeGroup(group: any): {
24
+ export declare function changeGroup(group: any): {
8
25
  type: string;
9
26
  data: {
10
27
  group: any;
11
28
  selected: null;
12
29
  };
13
30
  };
14
- export function changeFilter(filter: any): {
31
+ export declare function changeFilter(filter: any): {
15
32
  type: string;
16
33
  data: {
17
34
  filter: any;
18
35
  selected: null;
19
36
  };
20
37
  };
21
- export function changeTab(tab: any): {
38
+ export declare function changeTab(tab: any): {
22
39
  type: string;
23
40
  data: {
24
41
  tab: any;
25
42
  };
26
43
  };
27
- export function initAttach(name: any, attach: any): {
44
+ export declare function initAttach(name: any, attach: any): {
28
45
  type: string;
29
46
  data: {
30
47
  name: any;
@@ -32,40 +49,37 @@ export function initAttach(name: any, attach: any): {
32
49
  bondid: any;
33
50
  };
34
51
  };
35
- export function setAttachPoints(attach: any): {
52
+ export declare function setAttachPoints(attach: any): {
36
53
  type: string;
37
54
  data: {
38
55
  atomid: any;
39
56
  bondid: any;
40
57
  };
41
58
  };
42
- export function setTmplName(name: any): {
59
+ export declare function setTmplName(name: any): {
43
60
  type: string;
44
61
  data: {
45
62
  name: any;
46
63
  };
47
64
  };
48
- export function editTmpl(tmpl: any): (dispatch: any, getState: any) => void;
49
- export function deleteUserTmpl(tmpl: any): {
65
+ export declare function editTmpl(tmpl: any): (dispatch: any, getState: any) => void;
66
+ export declare function deleteUserTmpl(tmpl: any): {
50
67
  type: string;
51
68
  data: {
52
69
  tmpl: any;
53
70
  };
54
71
  };
55
- export function deleteTmpl(tmpl: any): (dispatch: any, getState: any) => void;
56
- export function saveUserTmpl(struct: any): (dispatch: any, getState: any) => void;
57
- export { initTmplLib };
58
- export namespace initTmplsState {
59
- const lib: never[];
60
- const selected: null;
61
- const filter: string;
62
- const group: null;
63
- const attach: {};
64
- const mode: string;
65
- const tab: number;
66
- }
67
- export default templatesReducer;
68
- import initTmplLib from "./init-lib";
72
+ export declare function deleteTmpl(tmpl: any): (dispatch: any, getState: any) => void;
73
+ export declare function saveUserTmpl(struct: any): (dispatch: any, getState: any) => void;
74
+ export declare const initTmplsState: {
75
+ lib: never[];
76
+ selected: null;
77
+ filter: string;
78
+ group: null;
79
+ attach: {};
80
+ mode: string;
81
+ tab: number;
82
+ };
69
83
  declare function templatesReducer(state: {
70
84
  lib: never[];
71
85
  selected: null;
@@ -75,3 +89,4 @@ declare function templatesReducer(state: {
75
89
  mode: string;
76
90
  tab: number;
77
91
  } | undefined, action: any): any;
92
+ export default templatesReducer;
@@ -0,0 +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
+ ***************************************************************************/
16
+ export declare const templatesLibSelector: (state: any) => any;
@@ -11,5 +11,4 @@ export declare const getSelectOptionsFromSchema: (schema: any) => Array<Option>;
11
11
  * @returns debounced function, which is not called with previous argument
12
12
  */
13
13
  export declare function memoizedDebounce(func: any, delay?: number, skipArguments?: number[]): (...args: any[]) => void;
14
- export { RenderStruct } from './renderStruct';
15
14
  export { fileOpener } from './fileOpener';
@@ -0,0 +1,7 @@
1
+ import { FunctionalGroup } from 'ketcher-core';
2
+ import Editor from 'src/script/editor';
3
+ import { ClosestItem, ContextMenuShowProps, GetIsItemInSelectionArgs } from './contextMenu.types';
4
+ import { Selection } from '../../../../editor/Editor';
5
+ export declare const getIsItemInSelection: ({ item, selection, selectedSGroupsIds, selectedFunctionalGroups }: GetIsItemInSelectionArgs) => boolean;
6
+ export declare function getMenuPropsForClosestItem(editor: Editor, closestItem: ClosestItem): ContextMenuShowProps | null;
7
+ export declare function getMenuPropsForSelection(selection: Selection | null, selectedFunctionalGroups: Map<number, FunctionalGroup>): ContextMenuShowProps | null;
@@ -8,6 +8,7 @@ declare class StructEditor extends Component<any, any, any> {
8
8
  };
9
9
  editorRef: import("react").RefObject<any>;
10
10
  logRef: import("react").RefObject<any>;
11
+ updateFloatingToolsPositionOnScroll(): void;
11
12
  shouldComponentUpdate(nextProps: any, nextState: any): boolean;
12
13
  UNSAFE_componentWillReceiveProps(props: any): void;
13
14
  componentDidMount(): void;
@@ -15,10 +15,11 @@
15
15
  ***************************************************************************/
16
16
  /// <reference types="react" />
17
17
  import { TextCommand } from 'ketcher-core';
18
+ import { IconName } from 'components';
18
19
  interface TextButtonProps {
19
20
  button: {
20
21
  command: TextCommand;
21
- name: string;
22
+ name: IconName;
22
23
  };
23
24
  active: boolean;
24
25
  }
@@ -15,10 +15,11 @@
15
15
  ***************************************************************************/
16
16
  /// <reference types="react" />
17
17
  import { DropzoneOptions } from 'react-dropzone';
18
+ import { IconName } from 'components';
18
19
  declare type FileDropProps = {
19
20
  buttonLabel: string;
20
21
  textLabel: string;
21
- iconName: string;
22
+ iconName: IconName;
22
23
  disabled?: boolean;
23
24
  disabledText?: string;
24
25
  } & DropzoneOptions;
@@ -1,5 +1,5 @@
1
1
  export default Save;
2
- declare const Save: import("react-redux").ConnectedComponent<typeof SaveDialog, import("react-redux").Omit<any, "options" | "server" | "formState" | "struct" | "checkState" | "onCheck" | "moleculeErrors" | "ignoreChiralFlag" | "onTmplSave" | "onResetForm">>;
2
+ declare const Save: import("react-redux").ConnectedComponent<typeof SaveDialog, import("react-redux").Omit<any, "server" | "options" | "formState" | "struct" | "checkState" | "onCheck" | "moleculeErrors" | "ignoreChiralFlag" | "onTmplSave" | "onResetForm">>;
3
3
  declare class SaveDialog extends Component<any, any, any> {
4
4
  static contextType: import("react").Context<import("../../../../../../../contexts").IErrorsContext>;
5
5
  constructor(props: any);
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { type FloatingToolsCallProps, type FloatingToolsProps } from './FloatingTools';
3
+ declare const FloatingToolContainer: import("react-redux").ConnectedComponent<import("react").FC<FloatingToolsProps & FloatingToolsCallProps>, import("react-redux").Omit<FloatingToolsProps & FloatingToolsCallProps, "visible" | "rotateHandlePosition" | "status" | "indigoVerification" | "onAction">>;
4
+ export { FloatingToolContainer };
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { UiActionAction } from '../../../action';
3
+ export declare type FloatingToolsProps = {
4
+ visible: boolean;
5
+ rotateHandlePosition: {
6
+ x: number;
7
+ y: number;
8
+ };
9
+ status: {
10
+ disabled?: boolean;
11
+ hidden?: boolean;
12
+ };
13
+ indigoVerification: boolean;
14
+ };
15
+ export declare type FloatingToolsCallProps = {
16
+ onAction: (action: UiActionAction) => void;
17
+ };
18
+ declare type Props = FloatingToolsProps & FloatingToolsCallProps;
19
+ export declare const FloatingTools: React.FC<Props>;
20
+ export {};
@@ -0,0 +1 @@
1
+ export * from './FloatingTools.container';
@@ -2,8 +2,7 @@ import { bondCommon, bondQuery, bondSpecial, bondStereo } from './Bond/options';
2
2
  import { ToolbarItem } from '../toolbar.types';
3
3
  declare const rGroupOptions: ToolbarItem[];
4
4
  declare const shapeOptions: ToolbarItem[];
5
- declare const transformOptions: ToolbarItem[];
6
5
  declare const selectOptions: ToolbarItem[];
7
6
  declare const arrowsOptions: ToolbarItem[];
8
7
  declare const mappingOptions: ToolbarItem[];
9
- export { rGroupOptions, bondCommon, bondQuery, bondSpecial, bondStereo, shapeOptions, transformOptions, selectOptions, arrowsOptions, mappingOptions };
8
+ export { rGroupOptions, bondCommon, bondQuery, bondSpecial, bondStereo, shapeOptions, selectOptions, arrowsOptions, mappingOptions };
@@ -15,8 +15,9 @@
15
15
  ***************************************************************************/
16
16
  /// <reference types="react" />
17
17
  import { UiAction, UiActionAction } from '../../../../action';
18
+ import { IconName } from 'components';
18
19
  interface ActionButtonProps {
19
- name: string;
20
+ name: IconName;
20
21
  action?: UiAction;
21
22
  status?: {
22
23
  disabled?: boolean;
@@ -31,6 +31,6 @@ interface ToolbarGroupItemCallProps {
31
31
  onOpen: (menuName: string, isSelected: boolean) => void;
32
32
  }
33
33
  declare type Props = ToolbarGroupItemProps & ToolbarGroupItemCallProps;
34
- declare const ToolbarGroupItem: (props: Props) => JSX.Element;
34
+ declare const ToolbarGroupItem: (props: Props) => JSX.Element | null;
35
35
  export type { ToolbarGroupItemProps, ToolbarGroupItemCallProps };
36
36
  export { ToolbarGroupItem };
@@ -15,3 +15,4 @@
15
15
  ***************************************************************************/
16
16
  /// <reference types="react" />
17
17
  export declare const Divider: () => JSX.Element;
18
+ export declare const HorizontalDivider: () => JSX.Element;
@@ -1,18 +1,3 @@
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
1
  /// <reference types="react" />
17
2
  interface FileControlsProps {
18
3
  onFileOpen: () => void;
@@ -0,0 +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
+ ***************************************************************************/
16
+ export declare const TopToolbarIconButton: import("@emotion/styled").StyledComponent<import("../../../../../components/Buttons/IconButton/types").IIconButtonProps & {
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ }, {}, {}>;
@@ -17,3 +17,4 @@ export * from './BottomToolbar';
17
17
  export * from './LeftToolbar';
18
18
  export * from './RightToolbar';
19
19
  export * from './TopToolbar';
20
+ export * from './FloatingTools';
@@ -19,14 +19,15 @@ declare type BottomGroup = 'template-common' | 'template-lib';
19
19
  declare type RightGroup = 'atom' | 'period-table';
20
20
  declare type ToolbarGroupVariant = TopGroup | LeftGroup | BottomGroup | RightGroup;
21
21
  declare type TopToolbarItemVariant = 'clear' | 'open' | 'save' | 'undo' | 'redo' | 'cut' | 'copies' | 'copy' | 'copy-image' | 'copy-mol' | 'copy-ket' | 'paste' | 'zoom-in' | 'zoom-out' | 'zoom-list' | 'layout' | 'clean' | 'arom' | 'dearom' | 'cip' | 'check' | 'analyse' | 'recognize' | 'miew' | 'settings' | 'help' | 'about';
22
- declare type LeftToolbarItemVariant = 'hand' | 'select' | 'select-lasso' | 'select-rectangle' | 'select-fragment' | 'erase' | 'bonds' | 'bond-common' | 'bond-single' | 'bond-double' | 'bond-triple' | 'bond-dative' | 'bond-stereo' | 'bond-up' | 'bond-down' | 'bond-updown' | 'bond-crossed' | 'bond-query' | 'bond-special' | 'bond-any' | 'bond-hydrogen' | 'bond-aromatic' | 'bond-singledouble' | 'bond-singlearomatic' | 'bond-doublearomatic' | 'chain' | 'charge-plus' | 'charge-minus' | 'transforms' | 'transform-rotate' | 'transform-flip-h' | 'transform-flip-v' | 'sgroup' | '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-arrow-elliptical-arc-arrow-filled-bow' | 'reaction-arrow-elliptical-arc-arrow-filled-triangle' | 'reaction-arrow-elliptical-arc-arrow-open-angle' | 'reaction-arrow-elliptical-arc-arrow-open-half-angle' | 'reaction-mapping-tools' | 'reaction-automap' | 'reaction-map' | 'reaction-unmap' | 'rgroup' | 'rgroup-label' | 'rgroup-fragment' | 'rgroup-attpoints' | 'shapes' | 'shape-ellipse' | 'shape-rectangle' | 'shape-line' | 'text';
22
+ declare type LeftToolbarItemVariant = 'hand' | 'select' | 'select-lasso' | 'select-rectangle' | 'select-fragment' | 'erase' | 'bonds' | 'bond-common' | 'bond-single' | 'bond-double' | 'bond-triple' | 'bond-dative' | 'bond-stereo' | 'bond-up' | 'bond-down' | 'bond-updown' | 'bond-crossed' | 'bond-query' | 'bond-special' | 'bond-any' | 'bond-hydrogen' | 'bond-aromatic' | 'bond-singledouble' | 'bond-singlearomatic' | 'bond-doublearomatic' | 'chain' | 'charge-plus' | 'charge-minus' | 'sgroup' | '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-arrow-elliptical-arc-arrow-filled-bow' | 'reaction-arrow-elliptical-arc-arrow-filled-triangle' | 'reaction-arrow-elliptical-arc-arrow-open-angle' | 'reaction-arrow-elliptical-arc-arrow-open-half-angle' | 'reaction-mapping-tools' | 'reaction-automap' | 'reaction-map' | 'reaction-unmap' | 'rgroup' | 'rgroup-label' | 'rgroup-fragment' | 'rgroup-attpoints' | 'shapes' | 'shape-ellipse' | 'shape-rectangle' | 'shape-line' | 'text';
23
23
  declare type BottomToolbarItemVariant = 'template-common' | 'template-lib' | 'enhanced-stereo' | 'fullscreen';
24
24
  declare type RightToolbarItemVariant = 'atom' | 'freq-atoms' | 'period-table' | 'extended-table' | 'any-atom';
25
- declare type ToolbarItemVariant = TopToolbarItemVariant | LeftToolbarItemVariant | BottomToolbarItemVariant | RightToolbarItemVariant;
25
+ declare type FloatingToolItemVariant = 'transform-flip-h' | 'transform-flip-v' | 'erase';
26
+ declare type ToolbarItemVariant = TopToolbarItemVariant | LeftToolbarItemVariant | BottomToolbarItemVariant | RightToolbarItemVariant | FloatingToolItemVariant;
26
27
  interface ToolbarItem {
27
28
  id: ToolbarItemVariant;
28
29
  options?: ToolbarItem[];
29
30
  }
30
31
  export type { ToolbarGroupVariant };
31
- export type { BottomToolbarItemVariant, LeftToolbarItemVariant, RightToolbarItemVariant, TopToolbarItemVariant, ToolbarItemVariant };
32
+ export type { BottomToolbarItemVariant, LeftToolbarItemVariant, RightToolbarItemVariant, TopToolbarItemVariant, FloatingToolItemVariant, ToolbarItemVariant };
32
33
  export type { ToolbarItem };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ketcher-react",
3
- "version": "2.11.0-rc.4",
3
+ "version": "2.12.0-rc.2",
4
4
  "description": "Web-based molecule sketcher",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "http://lifescience.opensource.epam.com/ketcher",
@@ -31,12 +31,15 @@
31
31
  "scripts": {
32
32
  "build": "cross-env NODE_ENV=production rollup -c -m true",
33
33
  "start": "cross-env NODE_ENV=development rollup -c -m true -w",
34
- "test": "run-s test:prettier test:stylelint test:eslint test:unit",
34
+ "test": "run-s test:prettier test:stylelint test:eslint:quiet test:types test:unit",
35
35
  "test:eslint": "eslint . --ext .ts,.tsx,.js,.jsx",
36
+ "test:eslint:quiet": "npm run test:eslint -- --quiet",
37
+ "test:eslint:fix": "npm run test:eslint -- --fix",
38
+ "test:types": "tsc --noEmit",
36
39
  "test:unit": "jest --passWithNoTests",
37
40
  "test:unit:update": "jest -u",
38
41
  "test:prettier": "prettier --check \"./**/*.{js,jsx,json,ts,tsx}\"",
39
- "test:stylelint": "stylelint \"./**/*.{css,less}\" --formatter verbose",
42
+ "test:stylelint": "stylelint \"./**/*.{css,less}\" --formatter",
40
43
  "prettier:write": "prettier --write \"./**/*.{js,jsx,json,ts,tsx}\"",
41
44
  "stylelint:fix": "stylelint \"./**/*.{css,less}\" --formatter verbose --fix"
42
45
  },
@@ -1,2 +0,0 @@
1
- import Editor from '../../Editor';
2
- export declare function getMergeItems(editor: Editor, items: Record<string, number[]>): Record<string, Map<unknown, unknown>> | null;
@@ -1,5 +0,0 @@
1
- export default Icon;
2
- declare function Icon({ name, ...props }: {
3
- [x: string]: any;
4
- name: any;
5
- }): JSX.Element;
@@ -1,9 +0,0 @@
1
- import { Struct } from 'ketcher-core';
2
- export declare class RenderStruct {
3
- /**
4
- * for S-Groups we want to show expanded structure
5
- * without brackets
6
- */
7
- static prepareStruct(struct: Struct): Struct;
8
- static render(el: HTMLElement | null, struct: Struct | null, options?: any): void;
9
- }