ketcher-react 2.25.0 → 2.26.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.
- package/dist/components/Buttons/IconButton/IconButton.d.ts +1 -2
- package/dist/components/Buttons/IconButton/IconButtonBase.d.ts +17 -0
- package/dist/components/Buttons/IconButton/IconButtonCustomIcon.d.ts +17 -0
- package/dist/components/Buttons/IconButton/index.d.ts +1 -0
- package/dist/components/Buttons/IconButton/styles.d.ts +4 -0
- package/dist/components/Buttons/IconButton/types.d.ts +11 -3
- package/dist/components/Icon/utils/iconNameToIcon.d.ts +7 -1
- package/dist/components/MonomerPreview/AmbiguousMonomerPreview/AmbiguousMonomerPreview.d.ts +2 -4
- package/dist/constants.d.ts +20 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +2047 -1399
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2046 -1400
- package/dist/index.modern.js.map +1 -1
- package/dist/script/builders/ketcher/CustomButtons.d.ts +5 -0
- package/dist/script/builders/ketcher/KetcherBuilder.d.ts +2 -1
- package/dist/script/editor/Editor.d.ts +4 -1
- package/dist/script/editor/tool/helper/dropAndMerge.d.ts +1 -1
- package/dist/script/editor/tool/select/index.d.ts +7 -0
- package/dist/script/editor/tool/{select.d.ts → select/select.d.ts} +7 -12
- package/dist/script/editor/tool/select/select.helpers.d.ts +17 -0
- package/dist/script/editor/tool/select/select.types.d.ts +1 -0
- package/dist/script/editor/tool/select/selectViewOnly.d.ts +14 -0
- package/dist/script/index.d.ts +3 -1
- package/dist/script/ui/action/action.types.d.ts +5 -4
- package/dist/script/ui/action/createCopyOfSelected.d.ts +14 -0
- package/dist/script/ui/action/fullscreen.d.ts +1 -0
- package/dist/script/ui/action/help.d.ts +1 -0
- package/dist/script/ui/action/highlightColors/HighlightColors.d.ts +6 -0
- package/dist/script/ui/action/highlightColors/style.d.ts +25 -0
- package/dist/script/ui/action/index.d.ts +19 -705
- package/dist/script/ui/action/server.d.ts +3 -0
- package/dist/script/ui/action/tools.d.ts +3 -0
- package/dist/script/ui/action/zoom.d.ts +4 -0
- package/dist/script/ui/component/view/savebutton.d.ts +2 -3
- package/dist/script/ui/state/options/index.d.ts +38 -2
- package/dist/script/ui/views/components/ContextMenu/contextMenu.types.d.ts +7 -2
- package/dist/script/ui/views/components/ContextMenu/hooks/useChangeBondDirection.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/hooks/useMonomerExpansionHandlers.d.ts +4 -0
- package/dist/script/ui/views/components/ContextMenu/menuItems/MacromoleculeMenuItems.d.ts +3 -0
- package/dist/script/ui/views/modal/components/meta/Settings/Settings.d.ts +1 -0
- package/dist/script/ui/views/modal/components/meta/Settings/fieldGroups.d.ts +1 -1
- package/dist/script/ui/views/toolbars/BottomToolbar/TemplatesList/TemplatesList.d.ts +2 -1
- package/dist/script/ui/views/toolbars/RightToolbar/AtomsList/AtomsList.d.ts +2 -1
- package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarGroupItem.d.ts +2 -4
- package/dist/script/ui/views/toolbars/TopToolbar/CustomButtons.d.ts +8 -0
- package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.container.d.ts +1 -1
- package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.d.ts +3 -1
- package/dist/script/ui/views/toolbars/TopToolbar/TopToolbarIconButton.d.ts +3 -0
- package/package.json +1 -1
|
@@ -47,6 +47,7 @@ declare const config: {
|
|
|
47
47
|
};
|
|
48
48
|
check: {
|
|
49
49
|
shortcut: string;
|
|
50
|
+
enabledInViewOnly: boolean;
|
|
50
51
|
title: string;
|
|
51
52
|
action: {
|
|
52
53
|
dialog: string;
|
|
@@ -56,6 +57,7 @@ declare const config: {
|
|
|
56
57
|
};
|
|
57
58
|
analyse: {
|
|
58
59
|
shortcut: string;
|
|
60
|
+
enabledInViewOnly: boolean;
|
|
59
61
|
title: string;
|
|
60
62
|
action: {
|
|
61
63
|
dialog: string;
|
|
@@ -73,6 +75,7 @@ declare const config: {
|
|
|
73
75
|
};
|
|
74
76
|
miew: {
|
|
75
77
|
title: string;
|
|
78
|
+
enabledInViewOnly: boolean;
|
|
76
79
|
action: {
|
|
77
80
|
dialog: string;
|
|
78
81
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
hand: {
|
|
3
3
|
title: string;
|
|
4
|
+
enabledInViewOnly: boolean;
|
|
4
5
|
shortcut: string;
|
|
5
6
|
action: {
|
|
6
7
|
tool: string;
|
|
@@ -9,6 +10,7 @@ declare const _default: {
|
|
|
9
10
|
};
|
|
10
11
|
'select-rectangle': {
|
|
11
12
|
title: string;
|
|
13
|
+
enabledInViewOnly: boolean;
|
|
12
14
|
shortcut: string[];
|
|
13
15
|
action: {
|
|
14
16
|
tool: string;
|
|
@@ -18,6 +20,7 @@ declare const _default: {
|
|
|
18
20
|
};
|
|
19
21
|
'select-lasso': {
|
|
20
22
|
title: string;
|
|
23
|
+
enabledInViewOnly: boolean;
|
|
21
24
|
shortcut: string[];
|
|
22
25
|
action: {
|
|
23
26
|
tool: string;
|
|
@@ -2,6 +2,7 @@ export const zoomList: number[];
|
|
|
2
2
|
declare const _default: {
|
|
3
3
|
zoom: {
|
|
4
4
|
shortcut: string[];
|
|
5
|
+
enabledInViewOnly: boolean;
|
|
5
6
|
selected: (editor: any) => any;
|
|
6
7
|
action: (editor: any) => void;
|
|
7
8
|
hidden: (options: any) => boolean;
|
|
@@ -9,6 +10,7 @@ declare const _default: {
|
|
|
9
10
|
'zoom-out': {
|
|
10
11
|
shortcut: string[];
|
|
11
12
|
title: string;
|
|
13
|
+
enabledInViewOnly: boolean;
|
|
12
14
|
disabled: (editor: any) => boolean;
|
|
13
15
|
action: (event: any) => (editor: any) => void;
|
|
14
16
|
hidden: (options: any) => boolean;
|
|
@@ -16,11 +18,13 @@ declare const _default: {
|
|
|
16
18
|
'zoom-in': {
|
|
17
19
|
shortcut: string[];
|
|
18
20
|
title: string;
|
|
21
|
+
enabledInViewOnly: boolean;
|
|
19
22
|
disabled: (editor: any) => boolean;
|
|
20
23
|
action: (event: any) => (editor: any) => void;
|
|
21
24
|
hidden: (options: any) => boolean;
|
|
22
25
|
};
|
|
23
26
|
'zoom-list': {
|
|
27
|
+
enabledInViewOnly: boolean;
|
|
24
28
|
hidden: (options: any) => boolean;
|
|
25
29
|
};
|
|
26
30
|
};
|
|
@@ -13,16 +13,15 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import {
|
|
16
|
+
import { GenerateImageOptions } from 'ketcher-core';
|
|
17
17
|
import { PropsWithChildren } from 'react';
|
|
18
18
|
declare type Props = {
|
|
19
19
|
server?: any;
|
|
20
20
|
filename: string;
|
|
21
|
-
outputFormat?: OutputFormatType;
|
|
22
|
-
bondThickness?: number;
|
|
23
21
|
data: any;
|
|
24
22
|
type?: string;
|
|
25
23
|
mode?: string;
|
|
24
|
+
options?: GenerateImageOptions;
|
|
26
25
|
onSave?: () => void;
|
|
27
26
|
onError?: (err: any) => void;
|
|
28
27
|
className?: string;
|
|
@@ -61,8 +61,44 @@ export namespace initOptionsState {
|
|
|
61
61
|
const version: null;
|
|
62
62
|
}
|
|
63
63
|
const settings: Record<string, any> & Record<string, string>;
|
|
64
|
-
function getServerSettings():
|
|
65
|
-
|
|
64
|
+
function getServerSettings(): {
|
|
65
|
+
'render-coloring': any;
|
|
66
|
+
'render-font-size': any;
|
|
67
|
+
'render-font-size-unit': any;
|
|
68
|
+
'render-font-size-sub': any;
|
|
69
|
+
'render-font-size-sub-unit': any;
|
|
70
|
+
'image-resolution': number;
|
|
71
|
+
'bond-length': any;
|
|
72
|
+
'bond-length-unit': any;
|
|
73
|
+
'render-bond-thickness': any;
|
|
74
|
+
'render-bond-thickness-unit': any;
|
|
75
|
+
'render-bond-spacing': number;
|
|
76
|
+
'render-stereo-bond-width': any;
|
|
77
|
+
'render-stereo-bond-width-unit': any;
|
|
78
|
+
'render-hash-spacing': any;
|
|
79
|
+
'render-hash-spacing-unit': any;
|
|
80
|
+
'reaction-component-margin-size': any;
|
|
81
|
+
'reaction-component-margin-size-unit': any;
|
|
82
|
+
};
|
|
83
|
+
function getServerSettings(): {
|
|
84
|
+
'render-coloring': any;
|
|
85
|
+
'render-font-size': any;
|
|
86
|
+
'render-font-size-unit': any;
|
|
87
|
+
'render-font-size-sub': any;
|
|
88
|
+
'render-font-size-sub-unit': any;
|
|
89
|
+
'image-resolution': number;
|
|
90
|
+
'bond-length': any;
|
|
91
|
+
'bond-length-unit': any;
|
|
92
|
+
'render-bond-thickness': any;
|
|
93
|
+
'render-bond-thickness-unit': any;
|
|
94
|
+
'render-bond-spacing': number;
|
|
95
|
+
'render-stereo-bond-width': any;
|
|
96
|
+
'render-stereo-bond-width-unit': any;
|
|
97
|
+
'render-hash-spacing': any;
|
|
98
|
+
'render-hash-spacing-unit': any;
|
|
99
|
+
'reaction-component-margin-size': any;
|
|
100
|
+
'reaction-component-margin-size-unit': any;
|
|
101
|
+
};
|
|
66
102
|
}
|
|
67
103
|
export default optionsReducer;
|
|
68
104
|
declare function optionsReducer(state: {} | undefined, action: any): {};
|
|
@@ -7,7 +7,8 @@ export declare enum CONTEXT_MENU_ID {
|
|
|
7
7
|
FOR_SELECTION = "context-menu-for-selection",
|
|
8
8
|
FOR_FUNCTIONAL_GROUPS = "context-menu-for-functional-groups",
|
|
9
9
|
FOR_R_GROUP_ATTACHMENT_POINT = "context-menu-for-rgroup-attachment-point",
|
|
10
|
-
FOR_MULTITAIL_ARROW = "context-menu-for-multiple-arrowed"
|
|
10
|
+
FOR_MULTITAIL_ARROW = "context-menu-for-multiple-arrowed",
|
|
11
|
+
FOR_MACROMOLECULE = "context-menu-for-macromolecule"
|
|
11
12
|
}
|
|
12
13
|
export declare type ItemData = unknown;
|
|
13
14
|
interface BaseContextMenuProps {
|
|
@@ -31,6 +32,10 @@ export interface FunctionalGroupsContextMenuProps extends BaseContextMenuProps {
|
|
|
31
32
|
id: CONTEXT_MENU_ID.FOR_FUNCTIONAL_GROUPS;
|
|
32
33
|
functionalGroups: FunctionalGroup[];
|
|
33
34
|
}
|
|
35
|
+
export interface MacromoleculeContextMenuProps extends BaseContextMenuProps {
|
|
36
|
+
id: CONTEXT_MENU_ID.FOR_MACROMOLECULE;
|
|
37
|
+
functionalGroups: FunctionalGroup[];
|
|
38
|
+
}
|
|
34
39
|
export interface RGroupAttachmentPointContextMenuProps extends BaseContextMenuProps, WithExtraItems {
|
|
35
40
|
id: CONTEXT_MENU_ID.FOR_R_GROUP_ATTACHMENT_POINT;
|
|
36
41
|
rgroupAttachmentPoints: Array<number>;
|
|
@@ -41,7 +46,7 @@ export interface MultitailArrowContextMenuProps {
|
|
|
41
46
|
itemId: number;
|
|
42
47
|
tailId: number | null;
|
|
43
48
|
}
|
|
44
|
-
export declare type ContextMenuProps = BondsContextMenuProps | AtomContextMenuProps | SelectionContextMenuProps | FunctionalGroupsContextMenuProps | RGroupAttachmentPointContextMenuProps | MultitailArrowContextMenuProps;
|
|
49
|
+
export declare type ContextMenuProps = BondsContextMenuProps | AtomContextMenuProps | SelectionContextMenuProps | FunctionalGroupsContextMenuProps | RGroupAttachmentPointContextMenuProps | MultitailArrowContextMenuProps | MacromoleculeContextMenuProps;
|
|
45
50
|
export interface MenuItemsProps<T extends ContextMenuProps> {
|
|
46
51
|
triggerEvent?: TriggerEvent;
|
|
47
52
|
propsFromTrigger?: T;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ItemEventParams, MacromoleculeContextMenuProps } from '../contextMenu.types';
|
|
2
|
+
declare type Params = ItemEventParams<MacromoleculeContextMenuProps>;
|
|
3
|
+
declare const useMonomerExpansionHandlers: () => readonly [({ props }: Params, toExpand: boolean) => void, ({ props }: Params, toExpand: boolean) => boolean];
|
|
4
|
+
export default useMonomerExpansionHandlers;
|
|
@@ -31,6 +31,7 @@ interface SettingsProps extends BaseProps {
|
|
|
31
31
|
interface SettingsCallProps extends BaseCallProps {
|
|
32
32
|
onOpenFile: (any: any) => void;
|
|
33
33
|
onReset: () => void;
|
|
34
|
+
onACSStyle: (result: any) => void;
|
|
34
35
|
}
|
|
35
36
|
declare type Props = SettingsProps & SettingsCallProps;
|
|
36
37
|
declare const Settings: import("react-redux").ConnectedComponent<(props: Props) => import("react/jsx-runtime").JSX.Element, any>;
|
|
@@ -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 { UiActionAction } from '../../../../action';
|
|
16
|
+
import { Tools, UiActionAction } from '../../../../action';
|
|
17
17
|
interface TemplatesListProps {
|
|
18
18
|
active?: {
|
|
19
19
|
tool?: string;
|
|
@@ -23,6 +23,7 @@ interface TemplatesListProps {
|
|
|
23
23
|
};
|
|
24
24
|
disableableButtons: string[];
|
|
25
25
|
indigoVerification: boolean;
|
|
26
|
+
status: Tools;
|
|
26
27
|
}
|
|
27
28
|
interface TemplatesListCallProps {
|
|
28
29
|
onAction: (action: UiActionAction) => void;
|
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
16
|
/// <reference types="react" />
|
|
17
|
-
import { UiActionAction } from '../../../../action';
|
|
17
|
+
import { Tools, UiActionAction } from '../../../../action';
|
|
18
18
|
interface AtomsListProps {
|
|
19
19
|
atoms: string[];
|
|
20
|
+
status: Tools;
|
|
20
21
|
active?: {
|
|
21
22
|
tool?: string;
|
|
22
23
|
opts: {
|
|
@@ -13,12 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import {
|
|
16
|
+
import { Tools, UiActionAction } from '../../../action';
|
|
17
17
|
import { ToolbarItem } from '../toolbar.types';
|
|
18
18
|
interface ToolbarGroupItemProps extends ToolbarItem {
|
|
19
|
-
status:
|
|
20
|
-
[key in string]?: UiAction;
|
|
21
|
-
};
|
|
19
|
+
status: Tools;
|
|
22
20
|
opened: string | null;
|
|
23
21
|
disableableButtons: string[];
|
|
24
22
|
indigoVerification: boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CustomButton } from '../../../../builders/ketcher/CustomButtons';
|
|
2
|
+
interface CustomButtonsProps {
|
|
3
|
+
customButtons: Array<CustomButton>;
|
|
4
|
+
isCollapsed: boolean;
|
|
5
|
+
onCustomAction: (name: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const CustomButtons: ({ isCollapsed, customButtons, onCustomAction, }: CustomButtonsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
declare const TopToolbarContainer: import("react-redux").ConnectedComponent<({ className, disabledButtons, indigoVerification, hiddenButtons, shortcuts, onClear, onFileOpen, onSave, onUndo, onRedo, onCopy, onCopyMol, onCopyKet, onCopyImage, onCut, onPaste, currentZoom, onZoom, onZoomIn, onZoomOut, onSettingsOpen, onLayout, onClean, onAromatize, onDearomatize, onCalculate, onCheck, onAnalyse, onMiew, onToggleExplicitHydrogens, onFullscreen, onAbout, onHelp, togglerComponent, }: import("./TopToolbar").PanelProps) => import("react/jsx-runtime").JSX.Element, import("react-redux").Omit<import("./TopToolbar").PanelProps, "disabledButtons" | "indigoVerification" | "hiddenButtons" | "shortcuts" | "onClear" | "onFileOpen" | "onSave" | "onUndo" | "onRedo" | "onCopy" | "onCopyMol" | "onCopyKet" | "onCopyImage" | "onCut" | "onPaste" | "currentZoom" | "onZoom" | "onZoomIn" | "onZoomOut" | "onSettingsOpen" | "onLayout" | "onClean" | "onAromatize" | "onDearomatize" | "onCalculate" | "onCheck" | "onAnalyse" | "onMiew" | "onToggleExplicitHydrogens" | "onFullscreen" | "onAbout" | "onHelp">>;
|
|
16
|
+
declare const TopToolbarContainer: import("react-redux").ConnectedComponent<({ className, disabledButtons, indigoVerification, hiddenButtons, shortcuts, onClear, onFileOpen, onSave, onUndo, onRedo, onCopy, onCopyMol, onCopyKet, onCopyImage, onCut, onPaste, currentZoom, onZoom, onZoomIn, onZoomOut, onSettingsOpen, onLayout, onClean, onAromatize, onDearomatize, onCalculate, onCheck, onAnalyse, onMiew, onToggleExplicitHydrogens, onFullscreen, onAbout, onHelp, togglerComponent, customButtons, }: import("./TopToolbar").PanelProps) => import("react/jsx-runtime").JSX.Element, import("react-redux").Omit<import("./TopToolbar").PanelProps, "disabledButtons" | "indigoVerification" | "hiddenButtons" | "shortcuts" | "onClear" | "onFileOpen" | "onSave" | "onUndo" | "onRedo" | "onCopy" | "onCopyMol" | "onCopyKet" | "onCopyImage" | "onCut" | "onPaste" | "currentZoom" | "onZoom" | "onZoomIn" | "onZoomOut" | "onSettingsOpen" | "onLayout" | "onClean" | "onAromatize" | "onDearomatize" | "onCalculate" | "onCheck" | "onAnalyse" | "onMiew" | "onToggleExplicitHydrogens" | "onFullscreen" | "onAbout" | "onHelp" | "customButtons">>;
|
|
17
17
|
export { TopToolbarContainer };
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
16
|
/// <reference types="react" />
|
|
17
|
+
import { CustomButton } from '../../../../builders/ketcher/CustomButtons';
|
|
17
18
|
declare type VoidFunction = () => void;
|
|
18
19
|
export interface PanelProps {
|
|
19
20
|
className: string;
|
|
@@ -52,6 +53,7 @@ export interface PanelProps {
|
|
|
52
53
|
onAbout: VoidFunction;
|
|
53
54
|
onHelp: VoidFunction;
|
|
54
55
|
togglerComponent?: JSX.Element;
|
|
56
|
+
customButtons: Array<CustomButton>;
|
|
55
57
|
}
|
|
56
|
-
export declare const TopToolbar: ({ className, disabledButtons, indigoVerification, hiddenButtons, shortcuts, onClear, onFileOpen, onSave, onUndo, onRedo, onCopy, onCopyMol, onCopyKet, onCopyImage, onCut, onPaste, currentZoom, onZoom, onZoomIn, onZoomOut, onSettingsOpen, onLayout, onClean, onAromatize, onDearomatize, onCalculate, onCheck, onAnalyse, onMiew, onToggleExplicitHydrogens, onFullscreen, onAbout, onHelp, togglerComponent, }: PanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare const TopToolbar: ({ className, disabledButtons, indigoVerification, hiddenButtons, shortcuts, onClear, onFileOpen, onSave, onUndo, onRedo, onCopy, onCopyMol, onCopyKet, onCopyImage, onCut, onPaste, currentZoom, onZoom, onZoomIn, onZoomOut, onSettingsOpen, onLayout, onClean, onAromatize, onDearomatize, onCalculate, onCheck, onAnalyse, onMiew, onToggleExplicitHydrogens, onFullscreen, onAbout, onHelp, togglerComponent, customButtons, }: PanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
57
59
|
export {};
|
|
@@ -16,3 +16,6 @@
|
|
|
16
16
|
export declare const TopToolbarIconButton: import("@emotion/styled").StyledComponent<import("../../../../../components/Buttons/IconButton/types").IIconButtonProps & {
|
|
17
17
|
theme?: import("@emotion/react").Theme | undefined;
|
|
18
18
|
}, {}, {}>;
|
|
19
|
+
export declare const TopToolbarCustomIconButton: import("@emotion/styled").StyledComponent<import("../../../../../components/Buttons/IconButton/types").IIconButtonCustomIconProps & {
|
|
20
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
21
|
+
}, {}, {}>;
|