ketcher-react 2.9.0-rc.3 → 2.9.0-rc.5
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/index.js +165 -114
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +165 -114
- package/dist/index.modern.js.map +1 -1
- package/dist/script/editor/Editor.d.ts +5 -4
- package/dist/script/editor/HoverIcon.d.ts +31 -0
- package/dist/script/editor/tool/atom.d.ts +0 -2
- package/dist/script/editor/tool/template.d.ts +2 -3
- package/dist/script/ui/state/modal/atoms.d.ts +3 -3
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ import { Action, Editor as KetcherEditor, Render, Struct } from 'ketcher-core';
|
|
|
17
17
|
import { PipelineSubscription, Subscription } from 'subscription';
|
|
18
18
|
import { Highlighter } from './highlighter';
|
|
19
19
|
import { contextMenuInfo } from '../ui/views/components/ContextMenu/contextMenu.types';
|
|
20
|
+
import { HoverIcon } from './HoverIcon';
|
|
20
21
|
export interface Selection {
|
|
21
22
|
atoms?: Array<number>;
|
|
22
23
|
bonds?: Array<number>;
|
|
@@ -33,7 +34,7 @@ declare class Editor implements KetcherEditor {
|
|
|
33
34
|
historyPtr: any;
|
|
34
35
|
errorHandler: ((message: string) => void) | null;
|
|
35
36
|
highlights: Highlighter;
|
|
36
|
-
hoverIcon:
|
|
37
|
+
hoverIcon: HoverIcon;
|
|
37
38
|
lastCursorPosition: {
|
|
38
39
|
x: number;
|
|
39
40
|
y: number;
|
|
@@ -64,8 +65,6 @@ declare class Editor implements KetcherEditor {
|
|
|
64
65
|
isDitrty(): boolean;
|
|
65
66
|
setOrigin(): void;
|
|
66
67
|
tool(name?: any, opts?: any): any;
|
|
67
|
-
updateHoverIconPosition(): void;
|
|
68
|
-
createHoverIcon(): void;
|
|
69
68
|
clear(): void;
|
|
70
69
|
renderAndRecoordinateStruct(struct: Struct): Struct;
|
|
71
70
|
struct(value?: Struct): Struct;
|
|
@@ -75,7 +74,9 @@ declare class Editor implements KetcherEditor {
|
|
|
75
74
|
zoom(value?: any): any;
|
|
76
75
|
selection(ci?: any): Selection | null;
|
|
77
76
|
hover(ci: any, newTool?: any, event?: PointerEvent): void;
|
|
78
|
-
update(action: Action | true, ignoreHistory?: boolean
|
|
77
|
+
update(action: Action | true, ignoreHistory?: boolean, options?: {
|
|
78
|
+
extendCanvas: boolean;
|
|
79
|
+
}): void;
|
|
79
80
|
historySize(): {
|
|
80
81
|
undo: any;
|
|
81
82
|
redo: number;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ElementLabel, AtomColor } from 'ketcher-core';
|
|
2
|
+
import Editor from './Editor';
|
|
3
|
+
export declare class HoverIcon {
|
|
4
|
+
element: any;
|
|
5
|
+
_fill: AtomColor | '';
|
|
6
|
+
_label: ElementLabel | '';
|
|
7
|
+
isShown: boolean;
|
|
8
|
+
/**
|
|
9
|
+
Is required for the case, when mouse moved outside the canvas, then loading of structure
|
|
10
|
+
happens and icon needs to be shown above loader.
|
|
11
|
+
*/
|
|
12
|
+
shouldBeShownWhenMouseBack: boolean;
|
|
13
|
+
editor: Editor;
|
|
14
|
+
constructor(editor: Editor);
|
|
15
|
+
set fill(fillColor: AtomColor | '');
|
|
16
|
+
get fill(): AtomColor | '';
|
|
17
|
+
set label(label: ElementLabel | '');
|
|
18
|
+
get label(): ElementLabel | '';
|
|
19
|
+
isOverLoader(event: MouseEvent): boolean;
|
|
20
|
+
onMouseMove(event: MouseEvent): void;
|
|
21
|
+
onMouseLeave(event: MouseEvent): void;
|
|
22
|
+
updatePosition(): void;
|
|
23
|
+
show(): void;
|
|
24
|
+
hide(): void;
|
|
25
|
+
initialize(): {
|
|
26
|
+
element: any;
|
|
27
|
+
fill: AtomColor | '';
|
|
28
|
+
label: ElementLabel | '';
|
|
29
|
+
};
|
|
30
|
+
create(): void;
|
|
31
|
+
}
|
|
@@ -24,10 +24,9 @@ declare class TemplateTool {
|
|
|
24
24
|
dragCtx: any;
|
|
25
25
|
targetGroupsIds: Array<number>;
|
|
26
26
|
isSaltOrSolvent: boolean;
|
|
27
|
-
|
|
28
|
-
constructor(editor: any, tmpl: any);
|
|
27
|
+
constructor(editor: Editor, tmpl: any);
|
|
29
28
|
mousedown(event: any): void;
|
|
30
|
-
mousemove(event: any):
|
|
29
|
+
mousemove(event: any): boolean;
|
|
31
30
|
mouseup(event: any): true | undefined;
|
|
32
31
|
cancel(e: any): void;
|
|
33
32
|
mouseleave(e: any): void;
|
|
@@ -5,9 +5,9 @@ declare type somePropertiesOfAtom = Partial<{
|
|
|
5
5
|
}>;
|
|
6
6
|
export declare function generateCommonProperties(selectedElements: Atom[]): somePropertiesOfAtom;
|
|
7
7
|
export declare function updateOnlyChangedProperties(atomId: any, userChangedAtom: any, molecule: any): {};
|
|
8
|
-
export declare function updateSelectedAtoms({
|
|
9
|
-
|
|
10
|
-
changeAtomPromise: any;
|
|
8
|
+
export declare function updateSelectedAtoms({ atoms, changeAtomPromise, editor }: {
|
|
9
|
+
atoms: number[];
|
|
11
10
|
editor: any;
|
|
11
|
+
changeAtomPromise: Promise<Atom>;
|
|
12
12
|
}): void;
|
|
13
13
|
export {};
|