ketcher-macromolecules 3.20.0-rc.1 → 3.20.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.
- package/dist/index.js +27 -36
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +27 -36
- package/dist/index.modern.js.map +1 -1
- package/dist/state/common/editorSlice.d.ts +2 -2
- package/dist/styledComponents.test.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -788,22 +788,6 @@ function castDraft(value) {
|
|
|
788
788
|
return value;
|
|
789
789
|
}
|
|
790
790
|
|
|
791
|
-
var PreviewType;
|
|
792
|
-
(function (PreviewType) {
|
|
793
|
-
PreviewType["Monomer"] = "monomer";
|
|
794
|
-
PreviewType["Preset"] = "preset";
|
|
795
|
-
PreviewType["Bond"] = "bond";
|
|
796
|
-
PreviewType["AmbiguousMonomer"] = "ambiguousMonomer";
|
|
797
|
-
PreviewType["Text"] = "text";
|
|
798
|
-
})(PreviewType || (PreviewType = {}));
|
|
799
|
-
var PresetPosition;
|
|
800
|
-
(function (PresetPosition) {
|
|
801
|
-
PresetPosition["Library"] = "library";
|
|
802
|
-
PresetPosition["ChainStart"] = "chainStart";
|
|
803
|
-
PresetPosition["ChainMiddle"] = "chainMiddle";
|
|
804
|
-
PresetPosition["ChainEnd"] = "chainEnd";
|
|
805
|
-
})(PresetPosition || (PresetPosition = {}));
|
|
806
|
-
|
|
807
791
|
const SELECT_SUBMENU_ID = 'select-submenu';
|
|
808
792
|
|
|
809
793
|
var MolarMeasurementUnit;
|
|
@@ -825,11 +809,7 @@ const initialState$3 = {
|
|
|
825
809
|
monomerLibraryLoadError: null,
|
|
826
810
|
editorLayoutMode: undefined,
|
|
827
811
|
editorLineLength: ketcherCore.SettingsManager.editorLineLength,
|
|
828
|
-
preview:
|
|
829
|
-
type: PreviewType.Monomer,
|
|
830
|
-
monomer: undefined,
|
|
831
|
-
style: {}
|
|
832
|
-
},
|
|
812
|
+
preview: undefined,
|
|
833
813
|
position: undefined,
|
|
834
814
|
isContextMenuActive: false,
|
|
835
815
|
isDragging: false,
|
|
@@ -840,10 +820,10 @@ const initialState$3 = {
|
|
|
840
820
|
unipositiveIonsValue: 140,
|
|
841
821
|
oligonucleotidesValue: 200,
|
|
842
822
|
app: {
|
|
843
|
-
buildDate: "2026-
|
|
823
|
+
buildDate: "2026-11-17T20:41:53" ,
|
|
844
824
|
indigoVersion: "" ,
|
|
845
825
|
indigoMachine: "" ,
|
|
846
|
-
version: "3.20.0
|
|
826
|
+
version: "3.20.0"
|
|
847
827
|
},
|
|
848
828
|
selectedMenuGroupItems: {}
|
|
849
829
|
};
|
|
@@ -875,7 +855,6 @@ const editorSlice = toolkit.createSlice({
|
|
|
875
855
|
createEditor: (state, action) => {
|
|
876
856
|
state.monomerLibraryLoadError = null;
|
|
877
857
|
const editor = new ketcherCore.CoreEditor({
|
|
878
|
-
ketcherId: action.payload.ketcherId,
|
|
879
858
|
theme: action.payload.theme,
|
|
880
859
|
canvas: action.payload.canvas,
|
|
881
860
|
renderersContainer: new ketcherCore.RenderersManager({
|
|
@@ -892,11 +871,7 @@ const editorSlice = toolkit.createSlice({
|
|
|
892
871
|
state.editor = undefined;
|
|
893
872
|
},
|
|
894
873
|
showPreview: (state, action) => {
|
|
895
|
-
state.preview = castDraft(action.payload
|
|
896
|
-
type: PreviewType.Monomer,
|
|
897
|
-
monomer: undefined,
|
|
898
|
-
style: {}
|
|
899
|
-
});
|
|
874
|
+
state.preview = action.payload ? castDraft(action.payload) : undefined;
|
|
900
875
|
},
|
|
901
876
|
setContextMenuActive: (state, action) => {
|
|
902
877
|
state.isContextMenuActive = action.payload;
|
|
@@ -2022,7 +1997,23 @@ function configureAppStore(preloadedState = {}) {
|
|
|
2022
1997
|
});
|
|
2023
1998
|
return store;
|
|
2024
1999
|
}
|
|
2025
|
-
configureAppStore();
|
|
2000
|
+
const store = configureAppStore();
|
|
2001
|
+
|
|
2002
|
+
var PreviewType;
|
|
2003
|
+
(function (PreviewType) {
|
|
2004
|
+
PreviewType["Monomer"] = "monomer";
|
|
2005
|
+
PreviewType["Preset"] = "preset";
|
|
2006
|
+
PreviewType["Bond"] = "bond";
|
|
2007
|
+
PreviewType["AmbiguousMonomer"] = "ambiguousMonomer";
|
|
2008
|
+
PreviewType["Text"] = "text";
|
|
2009
|
+
})(PreviewType || (PreviewType = {}));
|
|
2010
|
+
var PresetPosition;
|
|
2011
|
+
(function (PresetPosition) {
|
|
2012
|
+
PresetPosition["Library"] = "library";
|
|
2013
|
+
PresetPosition["ChainStart"] = "chainStart";
|
|
2014
|
+
PresetPosition["ChainMiddle"] = "chainMiddle";
|
|
2015
|
+
PresetPosition["ChainEnd"] = "chainEnd";
|
|
2016
|
+
})(PresetPosition || (PresetPosition = {}));
|
|
2026
2017
|
|
|
2027
2018
|
const monomerColors = {
|
|
2028
2019
|
colorA: {
|
|
@@ -4123,7 +4114,7 @@ const RnaPresetGroup = ({
|
|
|
4123
4114
|
if (needSkipPreviewForElement(e.target)) {
|
|
4124
4115
|
return;
|
|
4125
4116
|
}
|
|
4126
|
-
if (preview
|
|
4117
|
+
if (preview?.type === PreviewType.Preset || !e.currentTarget) {
|
|
4127
4118
|
return;
|
|
4128
4119
|
}
|
|
4129
4120
|
const monomers = [preset.sugar, preset.base, preset.phosphate];
|
|
@@ -10361,6 +10352,9 @@ const TogglerComponentWrapper = styled__default["default"].div(() => ({
|
|
|
10361
10352
|
}
|
|
10362
10353
|
}));
|
|
10363
10354
|
const CanvasWrapper = styled__default["default"].svg(() => ({
|
|
10355
|
+
'&[data-drawing-connection] .atomic-bond, &[data-drawing-connection] .atomic-bond *': {
|
|
10356
|
+
pointerEvents: 'none'
|
|
10357
|
+
},
|
|
10364
10358
|
'&.handCursor': {
|
|
10365
10359
|
cursor: `
|
|
10366
10360
|
url('data:image/svg+xml;base64,PHN2ZwogICAgICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAg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ODg3Yy0uODA1IDEuMi0yLjE1MyAxLjgtNC4wMDggMS44LTQuNzY4IDAtOC40ODQtNi40MTItOC41Mi02LjQ3NmEuNjY5LjY2OSAwIDAgMC0uMDktLjEyNmMtLjI5NC0uNDA4IDAtLjY1NS4xMDctLjc0OC4yNjctLjIyNy41NC0uMjM3LjgxLS4wMzFsMS43NyAxLjQ1MmExIDEgMCAwIDAgMS42NDQtLjc2M1Y2LjA4YS4yODcuMjg3IDAgMCAxIC4yOS0uMTQ4LjQ0LjQ0IDAgMCAxIC4zNzIuMTZ2NC43YTEgMSAwIDEgMCAyIDB2LTYuNDVjLjA2OC0uMjQ4LjMtLjI0OC40MjItLjI0OC4yIDAgLjQxNC4wMzIuNDgyLjI1NXY2LjQ0YTEgMSAwIDEgMCAyIDB2LTUuMmEuNzUuNzUgMCAwIDEgLjA3NC0uMTljLjA0OS0uMDgxLjEwOC0uMTUuMzI1LS4xNWEuMzUuMzUgMCAwIDEgLjMwNy4xNXY1LjM5YTEgMSAwIDEgMCAyIDBWOC4wNDdhLjU4My41ODMgMCAwIDEgLjM3Ny0uMWMuMDY1IDAgLjI1OC4wMDYuMzM0LjA3OGwuMDA0IDguMTlaIgogICAgLz4KPC9zdmc+Cg=='),
|
|
@@ -12138,7 +12132,7 @@ const Preview = () => {
|
|
|
12138
12132
|
const isPreviewVisible = Boolean(preview?.type);
|
|
12139
12133
|
const editor = reactRedux.useSelector(selectEditor);
|
|
12140
12134
|
React.useLayoutEffect(() => {
|
|
12141
|
-
if (!previewRef.current || preview
|
|
12135
|
+
if (!previewRef.current || preview?.style) {
|
|
12142
12136
|
return;
|
|
12143
12137
|
}
|
|
12144
12138
|
if (preview?.type) {
|
|
@@ -15233,7 +15227,6 @@ function EditorContainer({
|
|
|
15233
15227
|
monomersLibraryReplace,
|
|
15234
15228
|
isMacromoleculesEditorTurnedOn
|
|
15235
15229
|
}) {
|
|
15236
|
-
const [store] = React.useState(() => configureAppStore());
|
|
15237
15230
|
const rootElRef = React.useRef(null);
|
|
15238
15231
|
const editorTheme = theme ? lodash.merge(defaultTheme, theme) : defaultTheme;
|
|
15239
15232
|
const mergedTheme = lodash.merge(muiTheme, {
|
|
@@ -15241,7 +15234,7 @@ function EditorContainer({
|
|
|
15241
15234
|
});
|
|
15242
15235
|
React.useEffect(() => {
|
|
15243
15236
|
store.dispatch(initKetcherId(ketcherId));
|
|
15244
|
-
}, [ketcherId
|
|
15237
|
+
}, [ketcherId]);
|
|
15245
15238
|
return jsxRuntime.jsx(reactRedux.Provider, {
|
|
15246
15239
|
store: store,
|
|
15247
15240
|
children: jsxRuntime.jsxs(react.ThemeProvider, {
|
|
@@ -15268,7 +15261,6 @@ function EditorContainer({
|
|
|
15268
15261
|
});
|
|
15269
15262
|
}
|
|
15270
15263
|
function Editor({
|
|
15271
|
-
ketcherId,
|
|
15272
15264
|
theme,
|
|
15273
15265
|
togglerComponent,
|
|
15274
15266
|
monomersLibraryUpdate,
|
|
@@ -15302,7 +15294,6 @@ function Editor({
|
|
|
15302
15294
|
});
|
|
15303
15295
|
React.useEffect(() => {
|
|
15304
15296
|
dispatch(createEditor({
|
|
15305
|
-
ketcherId,
|
|
15306
15297
|
theme,
|
|
15307
15298
|
canvas: canvasRef.current,
|
|
15308
15299
|
monomersLibraryUpdate,
|