pdbe-molstar 3.2.1-beta.1 → 3.2.1-beta.3
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/README.md +1 -1
- package/build/pdbe-molstar-component.js +2 -2
- package/build/pdbe-molstar-light.css +2 -2
- package/build/pdbe-molstar-plugin.js +2 -2
- package/build/pdbe-molstar-plugin.js.LICENSE.txt +1 -1
- package/build/pdbe-molstar.css +2 -2
- package/lib/alphafold-transparency.d.ts +3 -3
- package/lib/alphafold-transparency.js +10 -11
- package/lib/custom-events.d.ts +1 -1
- package/lib/custom-events.js +1 -1
- package/lib/domain-annotations/behavior.d.ts +1 -1
- package/lib/domain-annotations/behavior.js +3 -3
- package/lib/domain-annotations/color.d.ts +3 -3
- package/lib/domain-annotations/color.js +4 -4
- package/lib/domain-annotations/prop.d.ts +6 -6
- package/lib/domain-annotations/prop.js +7 -7
- package/lib/extensions/foldseek.d.ts +1 -1
- package/lib/extensions/foldseek.js +2 -2
- package/lib/helpers.d.ts +20 -13
- package/lib/helpers.js +49 -11
- package/lib/index(light).d.ts +4 -179
- package/lib/index(light).js +6 -1234
- package/lib/index.d.ts +4 -179
- package/lib/index.js +6 -1234
- package/lib/labels.d.ts +1 -1
- package/lib/labels.js +3 -3
- package/lib/loci-details.d.ts +2 -2
- package/lib/loci-details.js +3 -3
- package/lib/plugin-custom-state.d.ts +6 -9
- package/lib/sifts-mapping.d.ts +3 -3
- package/lib/sifts-mapping.js +4 -4
- package/lib/sifts-mappings-behaviour.d.ts +1 -1
- package/lib/sifts-mappings-behaviour.js +10 -10
- package/lib/spec.d.ts +36 -11
- package/lib/spec.js +38 -7
- package/lib/{overlay.scss → styles/index.scss} +11 -0
- package/lib/superposition-export.d.ts +1 -1
- package/lib/superposition-export.js +7 -7
- package/lib/superposition-focus-representation.d.ts +3 -3
- package/lib/superposition-focus-representation.js +8 -8
- package/lib/superposition-sifts-mapping.d.ts +5 -5
- package/lib/superposition-sifts-mapping.js +3 -3
- package/lib/superposition.d.ts +7 -4
- package/lib/superposition.js +147 -184
- package/lib/ui/alphafold-superposition.d.ts +4 -4
- package/lib/ui/alphafold-superposition.js +8 -8
- package/lib/ui/alphafold-tranparency.d.ts +2 -2
- package/lib/ui/alphafold-tranparency.js +4 -4
- package/lib/ui/annotation-controls.d.ts +1 -1
- package/lib/ui/annotation-controls.js +7 -7
- package/lib/ui/annotation-row-controls.d.ts +2 -2
- package/lib/ui/annotation-row-controls.js +3 -3
- package/lib/ui/export-superposition.d.ts +1 -1
- package/lib/ui/export-superposition.js +9 -9
- package/lib/ui/pdbe-left-panel.d.ts +8 -8
- package/lib/ui/pdbe-left-panel.js +26 -47
- package/lib/ui/pdbe-screenshot-controls.d.ts +2 -2
- package/lib/ui/pdbe-screenshot-controls.js +7 -7
- package/lib/ui/pdbe-structure-controls.d.ts +1 -1
- package/lib/ui/pdbe-structure-controls.js +8 -8
- package/lib/ui/pdbe-viewport-controls.d.ts +1 -1
- package/lib/ui/pdbe-viewport-controls.js +4 -2
- package/lib/ui/segment-tree.d.ts +4 -4
- package/lib/ui/segment-tree.js +12 -32
- package/lib/ui/superposition-components.d.ts +1 -1
- package/lib/ui/superposition-components.js +8 -8
- package/lib/ui/superposition-viewport.d.ts +1 -1
- package/lib/ui/superposition-viewport.js +5 -5
- package/lib/ui/symmetry-annotation-controls.d.ts +6 -6
- package/lib/ui/symmetry-annotation-controls.js +6 -6
- package/lib/viewer.d.ts +178 -0
- package/lib/viewer.js +1286 -0
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PurePluginUIComponent } from '
|
|
1
|
+
import { PurePluginUIComponent } from 'molstar/lib/mol-plugin-ui/base';
|
|
2
2
|
export declare function TextsmsOutlinedSvg(): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
type AnnotationType = 'validation' | 'domains' | 'symmetry';
|
|
4
4
|
interface AnnotationsComponentControlsState {
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AnnotationsComponentControls = exports.TextsmsOutlinedSvg = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var behavior_1 = require("
|
|
7
|
-
var color_1 = require("
|
|
8
|
-
var hierarchy_1 = require("
|
|
9
|
-
var base_1 = require("
|
|
10
|
-
var common_1 = require("
|
|
11
|
-
var icons_1 = require("
|
|
12
|
-
var mol_state_1 = require("
|
|
6
|
+
var behavior_1 = require("molstar/lib/extensions/pdbe/structure-quality-report/behavior");
|
|
7
|
+
var color_1 = require("molstar/lib/extensions/pdbe/structure-quality-report/color");
|
|
8
|
+
var hierarchy_1 = require("molstar/lib/mol-plugin-state/manager/structure/hierarchy");
|
|
9
|
+
var base_1 = require("molstar/lib/mol-plugin-ui/base");
|
|
10
|
+
var common_1 = require("molstar/lib/mol-plugin-ui/controls/common");
|
|
11
|
+
var icons_1 = require("molstar/lib/mol-plugin-ui/controls/icons");
|
|
12
|
+
var mol_state_1 = require("molstar/lib/mol-state");
|
|
13
13
|
var behavior_2 = require("../domain-annotations/behavior");
|
|
14
14
|
var color_2 = require("../domain-annotations/color");
|
|
15
15
|
var plugin_custom_state_1 = require("../plugin-custom-state");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ParameterControlsProps } from '
|
|
2
|
-
import { ParamDefinition as PD } from '
|
|
1
|
+
import { ParameterControlsProps } from 'molstar/lib/mol-plugin-ui/controls/parameters';
|
|
2
|
+
import { ParamDefinition as PD } from 'molstar/lib/mol-util/param-definition';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
type AnnotationRowControlsProps<P extends PD.Params> = ParameterControlsProps<P> & {
|
|
5
5
|
shortTitle?: string;
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AnnotationRowControls = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var common_1 = require("
|
|
7
|
-
var icons_1 = require("
|
|
8
|
-
var parameters_1 = require("
|
|
6
|
+
var common_1 = require("molstar/lib/mol-plugin-ui/controls/common");
|
|
7
|
+
var icons_1 = require("molstar/lib/mol-plugin-ui/controls/icons");
|
|
8
|
+
var parameters_1 = require("molstar/lib/mol-plugin-ui/controls/parameters");
|
|
9
9
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
10
10
|
/** UI controls for a single annotation source (row) in Annotations section */
|
|
11
11
|
var AnnotationRowControls = /** @class */ (function (_super) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CollapsableControls, CollapsableState } from '
|
|
2
|
+
import { CollapsableControls, CollapsableState } from 'molstar/lib/mol-plugin-ui/base';
|
|
3
3
|
export declare class SuperpositionModelExportUI extends CollapsableControls<{}, {}> {
|
|
4
4
|
protected defaultState(): CollapsableState;
|
|
5
5
|
protected renderControls(): JSX.Element | null;
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SuperpositionModelExportUI = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
6
|
+
var base_1 = require("molstar/lib/mol-plugin-ui/base");
|
|
7
|
+
var common_1 = require("molstar/lib/mol-plugin-ui/controls/common");
|
|
8
|
+
var icons_1 = require("molstar/lib/mol-plugin-ui/controls/icons");
|
|
9
|
+
var parameters_1 = require("molstar/lib/mol-plugin-ui/controls/parameters");
|
|
10
|
+
var use_behavior_1 = require("molstar/lib/mol-plugin-ui/hooks/use-behavior");
|
|
11
|
+
var param_definition_1 = require("molstar/lib/mol-util/param-definition");
|
|
12
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
13
13
|
var superposition_export_1 = require("../superposition-export");
|
|
14
14
|
var SuperpositionModelExportUI = /** @class */ (function (_super) {
|
|
15
15
|
tslib_1.__extends(SuperpositionModelExportUI, _super);
|
|
@@ -36,8 +36,8 @@ var DefaultParams = param_definition_1.ParamDefinition.getDefaultValues(Params);
|
|
|
36
36
|
function SuperpositionExportControls(_a) {
|
|
37
37
|
var _this = this;
|
|
38
38
|
var plugin = _a.plugin;
|
|
39
|
-
var _b =
|
|
40
|
-
var _c =
|
|
39
|
+
var _b = react_1.default.useState(DefaultParams), params = _b[0], setParams = _b[1];
|
|
40
|
+
var _c = react_1.default.useState(false), exporting = _c[0], setExporting = _c[1];
|
|
41
41
|
(0, use_behavior_1.useBehavior)(plugin.managers.structure.hierarchy.behaviors.selection); // triggers UI update
|
|
42
42
|
var isBusy = (0, use_behavior_1.useBehavior)(plugin.behaviors.state.isBusy);
|
|
43
43
|
var hierarchy = plugin.managers.structure.hierarchy.current;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PluginUIComponent } from '
|
|
2
|
+
import { PluginUIComponent } from 'molstar/lib/mol-plugin-ui/base';
|
|
3
3
|
export declare function WavesIconSvg(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
type
|
|
5
|
-
export declare class
|
|
6
|
-
tab:
|
|
4
|
+
type PDBeLeftPanelTabName = 'none' | 'root' | 'data' | 'states' | 'settings' | 'help' | 'segments';
|
|
5
|
+
export declare class PDBeLeftPanelControls extends PluginUIComponent<{}, {
|
|
6
|
+
tab: PDBeLeftPanelTabName;
|
|
7
7
|
}> {
|
|
8
|
-
state: {
|
|
9
|
-
tab:
|
|
8
|
+
readonly state: {
|
|
9
|
+
tab: PDBeLeftPanelTabName;
|
|
10
10
|
};
|
|
11
11
|
componentDidMount(): void;
|
|
12
|
-
set: (tab:
|
|
12
|
+
set: (tab: PDBeLeftPanelTabName) => void;
|
|
13
13
|
tabs: {
|
|
14
|
-
[K in
|
|
14
|
+
[K in PDBeLeftPanelTabName]: JSX.Element;
|
|
15
15
|
};
|
|
16
16
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
}
|
|
@@ -1,41 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PDBeLeftPanelControls = exports.WavesIconSvg = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var canvas3d_1 = require("
|
|
7
|
-
var base_1 = require("
|
|
8
|
-
var common_1 = require("
|
|
9
|
-
var icons_1 = require("
|
|
10
|
-
var parameters_1 = require("
|
|
11
|
-
var actions_1 = require("
|
|
12
|
-
var snapshots_1 = require("
|
|
13
|
-
var tree_1 = require("
|
|
14
|
-
var help_1 = require("
|
|
15
|
-
var commands_1 = require("
|
|
16
|
-
var mol_state_1 = require("
|
|
6
|
+
var canvas3d_1 = require("molstar/lib/mol-canvas3d/canvas3d");
|
|
7
|
+
var base_1 = require("molstar/lib/mol-plugin-ui/base");
|
|
8
|
+
var common_1 = require("molstar/lib/mol-plugin-ui/controls/common");
|
|
9
|
+
var icons_1 = require("molstar/lib/mol-plugin-ui/controls/icons");
|
|
10
|
+
var parameters_1 = require("molstar/lib/mol-plugin-ui/controls/parameters");
|
|
11
|
+
var actions_1 = require("molstar/lib/mol-plugin-ui/state/actions");
|
|
12
|
+
var snapshots_1 = require("molstar/lib/mol-plugin-ui/state/snapshots");
|
|
13
|
+
var tree_1 = require("molstar/lib/mol-plugin-ui/state/tree");
|
|
14
|
+
var help_1 = require("molstar/lib/mol-plugin-ui/viewport/help");
|
|
15
|
+
var commands_1 = require("molstar/lib/mol-plugin/commands");
|
|
16
|
+
var mol_state_1 = require("molstar/lib/mol-state");
|
|
17
17
|
var plugin_custom_state_1 = require("../plugin-custom-state");
|
|
18
18
|
var segment_tree_1 = require("./segment-tree");
|
|
19
19
|
var _WavesIcon = (0, jsx_runtime_1.jsx)("svg", tslib_1.__assign({ width: '24px', height: '24px', viewBox: '0 0 24 24' }, { children: (0, jsx_runtime_1.jsx)("path", { d: "M17 16.99c-1.35 0-2.2.42-2.95.8-.65.33-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.38-1.57-.8-2.95-.8s-2.2.42-2.95.8c-.65.33-1.17.6-2.05.6v1.95c1.35 0 2.2-.42 2.95-.8.65-.33 1.17-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.42 2.95-.8c.65-.33 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8v-1.95c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8zm0-4.45c-1.35 0-2.2.43-2.95.8-.65.32-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.38-1.57-.8-2.95-.8s-2.2.43-2.95.8c-.65.32-1.17.6-2.05.6v1.95c1.35 0 2.2-.43 2.95-.8.65-.35 1.15-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.43 2.95-.8c.65-.35 1.15-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.58.8 2.95.8v-1.95c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8zm2.95-8.08c-.75-.38-1.58-.8-2.95-.8s-2.2.42-2.95.8c-.65.32-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.37-1.57-.8-2.95-.8s-2.2.42-2.95.8c-.65.33-1.17.6-2.05.6v1.93c1.35 0 2.2-.43 2.95-.8.65-.33 1.17-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.43 2.95-.8c.65-.32 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8V5.04c-.9 0-1.4-.25-2.05-.58zM17 8.09c-1.35 0-2.2.43-2.95.8-.65.35-1.15.6-2.05.6s-1.4-.25-2.05-.6c-.75-.38-1.57-.8-2.95-.8s-2.2.43-2.95.8c-.65.35-1.15.6-2.05.6v1.95c1.35 0 2.2-.43 2.95-.8.65-.32 1.18-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.43 2.95-.8c.65-.32 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8V9.49c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8z" }) }));
|
|
20
20
|
function WavesIconSvg() { return _WavesIcon; }
|
|
21
21
|
exports.WavesIconSvg = WavesIconSvg;
|
|
22
|
-
var
|
|
23
|
-
tslib_1.__extends(
|
|
24
|
-
function
|
|
22
|
+
var PDBeLeftPanelControls = /** @class */ (function (_super) {
|
|
23
|
+
tslib_1.__extends(PDBeLeftPanelControls, _super);
|
|
24
|
+
function PDBeLeftPanelControls() {
|
|
25
25
|
var _this = this;
|
|
26
26
|
var _a;
|
|
27
27
|
_this = _super.apply(this, arguments) || this;
|
|
28
28
|
_this.state = { tab: _this.plugin.behaviors.layout.leftPanelTabName.value };
|
|
29
29
|
_this.set = function (tab) {
|
|
30
30
|
if (_this.state.tab === tab) {
|
|
31
|
-
|
|
32
|
-
commands_1.PluginCommands.Layout.Update(_this.plugin, { state: { regionState: tslib_1.__assign(tslib_1.__assign({}, _this.plugin.layout.state.regionState), { left: 'collapsed' }) } });
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
_this.setState({ tab: tab }, function () { return _this.plugin.behaviors.layout.leftPanelTabName.next(tab); });
|
|
36
|
-
if (_this.plugin.layout.state.regionState.left !== 'full') {
|
|
37
|
-
commands_1.PluginCommands.Layout.Update(_this.plugin, { state: { regionState: tslib_1.__assign(tslib_1.__assign({}, _this.plugin.layout.state.regionState), { left: 'full' }) } });
|
|
31
|
+
tab = 'none'; // clicking on active tab should collapse panel
|
|
38
32
|
}
|
|
33
|
+
_this.plugin.behaviors.layout.leftPanelTabName.next(tab); // will update state via subscription
|
|
39
34
|
};
|
|
40
35
|
_this.tabs = {
|
|
41
36
|
'none': (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}),
|
|
@@ -48,14 +43,18 @@ var LeftPanelControls = /** @class */ (function (_super) {
|
|
|
48
43
|
};
|
|
49
44
|
return _this;
|
|
50
45
|
}
|
|
51
|
-
|
|
46
|
+
PDBeLeftPanelControls.prototype.componentDidMount = function () {
|
|
52
47
|
var _this = this;
|
|
53
48
|
this.subscribe(this.plugin.behaviors.layout.leftPanelTabName, function (tab) {
|
|
54
49
|
if (_this.state.tab !== tab)
|
|
55
50
|
_this.setState({ tab: tab });
|
|
56
|
-
if
|
|
51
|
+
// Collapse panel if no active tab, expand if active tab (don't apply if panel hidden!)
|
|
52
|
+
if (tab === 'none' && _this.plugin.layout.state.regionState.left === 'full') {
|
|
57
53
|
commands_1.PluginCommands.Layout.Update(_this.plugin, { state: { regionState: tslib_1.__assign(tslib_1.__assign({}, _this.plugin.layout.state.regionState), { left: 'collapsed' }) } });
|
|
58
54
|
}
|
|
55
|
+
if (tab !== 'none' && _this.plugin.layout.state.regionState.left === 'collapsed') {
|
|
56
|
+
commands_1.PluginCommands.Layout.Update(_this.plugin, { state: { regionState: tslib_1.__assign(tslib_1.__assign({}, _this.plugin.layout.state.regionState), { left: 'full' }) } });
|
|
57
|
+
}
|
|
59
58
|
});
|
|
60
59
|
this.subscribe(this.plugin.state.data.events.changed, function (_a) {
|
|
61
60
|
var state = _a.state;
|
|
@@ -65,35 +64,15 @@ var LeftPanelControls = /** @class */ (function (_super) {
|
|
|
65
64
|
_this.set('root');
|
|
66
65
|
});
|
|
67
66
|
};
|
|
68
|
-
|
|
67
|
+
PDBeLeftPanelControls.prototype.render = function () {
|
|
69
68
|
var _this = this;
|
|
70
69
|
var tab = this.state.tab;
|
|
71
70
|
var customState = (0, plugin_custom_state_1.PluginCustomState)(this.plugin);
|
|
72
71
|
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-left-panel-controls' }, { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-left-panel-controls-buttons' }, { children: [(0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.HelpOutlineSvg, toggleState: tab === 'help', transparent: true, onClick: function () { return _this.set('help'); }, title: 'Help' }), customState && customState.initParams && customState.initParams.superposition && (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: WavesIconSvg, toggleState: tab === 'segments', transparent: true, onClick: function () { return _this.set('segments'); }, title: 'Superpose segments' }), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-left-panel-controls-buttons-bottom' }, { children: (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.TuneSvg, toggleState: tab === 'settings', transparent: true, onClick: function () { return _this.set('settings'); }, title: 'Settings' }) }))] })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-scrollable-container' }, { children: this.tabs[tab] }))] }));
|
|
73
72
|
};
|
|
74
|
-
return
|
|
73
|
+
return PDBeLeftPanelControls;
|
|
75
74
|
}(base_1.PluginUIComponent));
|
|
76
|
-
exports.
|
|
77
|
-
// class DataIcon extends PluginUIComponent<{ set: (tab: LeftPanelTabName) => void }, { changed: boolean }> {
|
|
78
|
-
// state = { changed: false };
|
|
79
|
-
// get tab() {
|
|
80
|
-
// return this.plugin.behaviors.layout.leftPanelTabName.value;
|
|
81
|
-
// }
|
|
82
|
-
// componentDidMount() {
|
|
83
|
-
// this.subscribe(this.plugin.behaviors.layout.leftPanelTabName, tab => {
|
|
84
|
-
// if (this.tab === 'data') this.setState({ changed: false });
|
|
85
|
-
// else this.forceUpdate();
|
|
86
|
-
// });
|
|
87
|
-
// this.subscribe(this.plugin.state.data.events.changed, state => {
|
|
88
|
-
// if (this.tab !== 'data') this.setState({ changed: true });
|
|
89
|
-
// });
|
|
90
|
-
// }
|
|
91
|
-
// render() {
|
|
92
|
-
// return <IconButton
|
|
93
|
-
// svg={AccountTreeOutlinedSvg} toggleState={this.tab === 'data'} transparent onClick={() => this.props.set('data')} title='State Tree'
|
|
94
|
-
// style={{ position: 'relative' }} extraContent={this.state.changed ? <div className='msp-left-panel-controls-button-data-dirty' /> : void 0} />;
|
|
95
|
-
// }
|
|
96
|
-
// }
|
|
75
|
+
exports.PDBeLeftPanelControls = PDBeLeftPanelControls;
|
|
97
76
|
var FullSettings = /** @class */ (function (_super) {
|
|
98
77
|
tslib_1.__extends(FullSettings, _super);
|
|
99
78
|
function FullSettings() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { PluginUIComponent } from 'molstar/lib/mol-plugin-ui/base';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
interface ImageControlsState {
|
|
4
4
|
showPreview: boolean;
|
|
5
5
|
isDisabled: boolean;
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DownloadScreenshotControls = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var use_behavior_1 = require("
|
|
12
|
-
var
|
|
6
|
+
var base_1 = require("molstar/lib/mol-plugin-ui/base");
|
|
7
|
+
var common_1 = require("molstar/lib/mol-plugin-ui/controls/common");
|
|
8
|
+
var icons_1 = require("molstar/lib/mol-plugin-ui/controls/icons");
|
|
9
|
+
var parameters_1 = require("molstar/lib/mol-plugin-ui/controls/parameters");
|
|
10
|
+
var screenshot_1 = require("molstar/lib/mol-plugin-ui/controls/screenshot");
|
|
11
|
+
var use_behavior_1 = require("molstar/lib/mol-plugin-ui/hooks/use-behavior");
|
|
12
|
+
var commands_1 = require("molstar/lib/mol-plugin/commands");
|
|
13
13
|
var DownloadScreenshotControls = /** @class */ (function (_super) {
|
|
14
14
|
tslib_1.__extends(DownloadScreenshotControls, _super);
|
|
15
15
|
function DownloadScreenshotControls() {
|
|
@@ -3,19 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PDBeSuperpositionStructureTools = exports.PDBeLigandViewStructureTools = exports.CustomStructureControls = exports.PDBeStructureTools = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var base_1 = require("
|
|
7
|
-
var components_1 = require("
|
|
8
|
-
var measurements_1 = require("
|
|
9
|
-
var source_1 = require("
|
|
10
|
-
var volume_1 = require("
|
|
6
|
+
var base_1 = require("molstar/lib/mol-plugin-ui/base");
|
|
7
|
+
var components_1 = require("molstar/lib/mol-plugin-ui/structure/components");
|
|
8
|
+
var measurements_1 = require("molstar/lib/mol-plugin-ui/structure/measurements");
|
|
9
|
+
var source_1 = require("molstar/lib/mol-plugin-ui/structure/source");
|
|
10
|
+
var volume_1 = require("molstar/lib/mol-plugin-ui/structure/volume");
|
|
11
11
|
var annotation_controls_1 = require("./annotation-controls");
|
|
12
|
-
var icons_1 = require("
|
|
12
|
+
var icons_1 = require("molstar/lib/mol-plugin-ui/controls/icons");
|
|
13
13
|
var superposition_components_1 = require("./superposition-components");
|
|
14
|
-
var quick_styles_1 = require("
|
|
14
|
+
var quick_styles_1 = require("molstar/lib/mol-plugin-ui/structure/quick-styles");
|
|
15
15
|
var alphafold_superposition_1 = require("./alphafold-superposition");
|
|
16
16
|
var export_superposition_1 = require("./export-superposition");
|
|
17
17
|
var alphafold_tranparency_1 = require("./alphafold-tranparency");
|
|
18
|
-
var prop_1 = require("
|
|
18
|
+
var prop_1 = require("molstar/lib/extensions/rcsb/assembly-symmetry/prop");
|
|
19
19
|
var PDBeStructureTools = /** @class */ (function (_super) {
|
|
20
20
|
tslib_1.__extends(PDBeStructureTools, _super);
|
|
21
21
|
function PDBeStructureTools() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewportControls } from '
|
|
1
|
+
import { ViewportControls } from 'molstar/lib/mol-plugin-ui/viewport';
|
|
2
2
|
export declare class PDBeViewportControls extends ViewportControls {
|
|
3
3
|
private isBlack;
|
|
4
4
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PDBeViewportControls = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var viewport_1 = require("
|
|
6
|
+
var viewport_1 = require("molstar/lib/mol-plugin-ui/viewport");
|
|
7
|
+
var names_1 = require("molstar/lib/mol-util/color/names");
|
|
8
|
+
var helpers_1 = require("../helpers");
|
|
7
9
|
var plugin_custom_state_1 = require("../plugin-custom-state");
|
|
8
10
|
var PDBeViewportControls = /** @class */ (function (_super) {
|
|
9
11
|
tslib_1.__extends(PDBeViewportControls, _super);
|
|
@@ -13,7 +15,7 @@ var PDBeViewportControls = /** @class */ (function (_super) {
|
|
|
13
15
|
PDBeViewportControls.prototype.isBlack = function () {
|
|
14
16
|
var _a;
|
|
15
17
|
var bgColor = (_a = (0, plugin_custom_state_1.PluginCustomState)(this.plugin).initParams) === null || _a === void 0 ? void 0 : _a.bgColor;
|
|
16
|
-
return bgColor !== undefined &&
|
|
18
|
+
return bgColor !== undefined && (0, helpers_1.normalizeColor)(bgColor) === names_1.ColorNames.black;
|
|
17
19
|
};
|
|
18
20
|
PDBeViewportControls.prototype.render = function () {
|
|
19
21
|
var initParams = (0, plugin_custom_state_1.PluginCustomState)(this.plugin).initParams;
|
package/lib/ui/segment-tree.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Mat4 } from '
|
|
2
|
-
import { PluginStateObject } from '
|
|
3
|
-
import { PurePluginUIComponent } from '
|
|
4
|
-
import { StateObjectRef } from '
|
|
1
|
+
import { Mat4 } from 'molstar/lib/mol-math/linear-algebra';
|
|
2
|
+
import { PluginStateObject } from 'molstar/lib/mol-plugin-state/objects';
|
|
3
|
+
import { PurePluginUIComponent } from 'molstar/lib/mol-plugin-ui/base';
|
|
4
|
+
import { StateObjectRef } from 'molstar/lib/mol-state';
|
|
5
5
|
import { PluginCustomState } from '../plugin-custom-state';
|
|
6
6
|
export declare class SegmentTree extends PurePluginUIComponent<{}, {
|
|
7
7
|
segment?: any;
|
package/lib/ui/segment-tree.js
CHANGED
|
@@ -3,18 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SegmentTree = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var transforms_1 = require("
|
|
7
|
-
var base_1 = require("
|
|
8
|
-
var common_1 = require("
|
|
9
|
-
var icons_1 = require("
|
|
10
|
-
var parameters_1 = require("
|
|
11
|
-
var update_transform_1 = require("
|
|
12
|
-
var commands_1 = require("
|
|
13
|
-
var builder_1 = require("
|
|
14
|
-
var mol_state_1 = require("
|
|
15
|
-
var color_1 = require("
|
|
16
|
-
var
|
|
17
|
-
var param_definition_1 = require("Molstar/mol-util/param-definition");
|
|
6
|
+
var transforms_1 = require("molstar/lib/mol-plugin-state/transforms");
|
|
7
|
+
var base_1 = require("molstar/lib/mol-plugin-ui/base");
|
|
8
|
+
var common_1 = require("molstar/lib/mol-plugin-ui/controls/common");
|
|
9
|
+
var icons_1 = require("molstar/lib/mol-plugin-ui/controls/icons");
|
|
10
|
+
var parameters_1 = require("molstar/lib/mol-plugin-ui/controls/parameters");
|
|
11
|
+
var update_transform_1 = require("molstar/lib/mol-plugin-ui/state/update-transform");
|
|
12
|
+
var commands_1 = require("molstar/lib/mol-plugin/commands");
|
|
13
|
+
var builder_1 = require("molstar/lib/mol-script/language/builder");
|
|
14
|
+
var mol_state_1 = require("molstar/lib/mol-state");
|
|
15
|
+
var color_1 = require("molstar/lib/mol-util/color");
|
|
16
|
+
var param_definition_1 = require("molstar/lib/mol-util/param-definition");
|
|
18
17
|
var rxjs_1 = require("rxjs");
|
|
19
18
|
var operators_1 = require("rxjs/operators");
|
|
20
19
|
var plugin_custom_state_1 = require("../plugin-custom-state");
|
|
@@ -654,32 +653,13 @@ var StructureNode = /** @class */ (function (_super) {
|
|
|
654
653
|
return mol_state_1.StateSelection.findUniqueTagsInSubtree(tree, this.modelCell.transform.ref, TagSet);
|
|
655
654
|
};
|
|
656
655
|
;
|
|
657
|
-
StructureNode.prototype.getRandomColor = function () {
|
|
658
|
-
var clList = lists_1.ColorLists;
|
|
659
|
-
var spState = (0, plugin_custom_state_1.PluginCustomState)(this.plugin).superpositionState;
|
|
660
|
-
if (!spState)
|
|
661
|
-
throw new Error('customState.superpositionState has not been initialized');
|
|
662
|
-
var palleteIndex = spState.colorState[this.props.segmentIndex].palleteIndex;
|
|
663
|
-
var colorIndex = spState.colorState[this.props.segmentIndex].colorIndex;
|
|
664
|
-
if (clList[spState.colorPalette[palleteIndex]].list[colorIndex + 1]) {
|
|
665
|
-
colorIndex += 1;
|
|
666
|
-
}
|
|
667
|
-
else {
|
|
668
|
-
colorIndex = 0;
|
|
669
|
-
palleteIndex = spState.colorPalette[palleteIndex + 1] ? palleteIndex + 1 : 0;
|
|
670
|
-
}
|
|
671
|
-
var palleteName = spState.colorPalette[palleteIndex];
|
|
672
|
-
spState.colorState[this.props.segmentIndex].palleteIndex = palleteIndex;
|
|
673
|
-
spState.colorState[this.props.segmentIndex].colorIndex = colorIndex;
|
|
674
|
-
return clList[palleteName].list[colorIndex];
|
|
675
|
-
};
|
|
676
656
|
StructureNode.prototype.addChainRepr = function () {
|
|
677
657
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
678
658
|
var uniformColor1, strInstance, query, chainSel;
|
|
679
659
|
return tslib_1.__generator(this, function (_a) {
|
|
680
660
|
switch (_a.label) {
|
|
681
661
|
case 0:
|
|
682
|
-
uniformColor1 = this.
|
|
662
|
+
uniformColor1 = (0, superposition_1.getNextColor)(this.plugin, this.props.segmentIndex);
|
|
683
663
|
strInstance = this.plugin.state.data.select(this.ref)[0];
|
|
684
664
|
query = builder_1.MolScriptBuilder.struct.generator.atomGroups({
|
|
685
665
|
'chain-test': builder_1.MolScriptBuilder.core.rel.eq([builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.label_asym_id(), this.props.structure.struct_asym_id])
|
|
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SuperpositionComponentControls = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var operators_1 = require("rxjs/operators");
|
|
6
|
+
var base_1 = require("molstar/lib/mol-plugin-ui/base");
|
|
7
|
+
var common_1 = require("molstar/lib/mol-plugin-ui/controls/common");
|
|
8
|
+
var icons_1 = require("molstar/lib/mol-plugin-ui/controls/icons");
|
|
9
|
+
var parameters_1 = require("molstar/lib/mol-plugin-ui/controls/parameters");
|
|
10
|
+
var commands_1 = require("molstar/lib/mol-plugin/commands");
|
|
11
|
+
var mol_state_1 = require("molstar/lib/mol-state");
|
|
12
|
+
var param_definition_1 = require("molstar/lib/mol-util/param-definition");
|
|
14
13
|
var rxjs_1 = require("rxjs");
|
|
14
|
+
var operators_1 = require("rxjs/operators");
|
|
15
15
|
var plugin_custom_state_1 = require("../plugin-custom-state");
|
|
16
16
|
var SuperpositionComponentControls = /** @class */ (function (_super) {
|
|
17
17
|
tslib_1.__extends(SuperpositionComponentControls, _super);
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SuperpostionViewport = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var base_1 = require("
|
|
7
|
-
var controls_1 = require("
|
|
8
|
-
var task_1 = require("
|
|
9
|
-
var toast_1 = require("
|
|
10
|
-
var viewport_1 = require("
|
|
6
|
+
var base_1 = require("molstar/lib/mol-plugin-ui/base");
|
|
7
|
+
var controls_1 = require("molstar/lib/mol-plugin-ui/controls");
|
|
8
|
+
var task_1 = require("molstar/lib/mol-plugin-ui/task");
|
|
9
|
+
var toast_1 = require("molstar/lib/mol-plugin-ui/toast");
|
|
10
|
+
var viewport_1 = require("molstar/lib/mol-plugin-ui/viewport");
|
|
11
11
|
var SuperpostionViewport = /** @class */ (function (_super) {
|
|
12
12
|
tslib_1.__extends(SuperpostionViewport, _super);
|
|
13
13
|
function SuperpostionViewport() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AssemblySymmetryParams, AssemblySymmetryProps } from '
|
|
2
|
-
import { StructureRef } from '
|
|
3
|
-
import { PurePluginUIComponent } from '
|
|
4
|
-
import { PluginContext } from '
|
|
5
|
-
import { UUID } from '
|
|
6
|
-
import { ParamDefinition as PD } from '
|
|
1
|
+
import { AssemblySymmetryParams, AssemblySymmetryProps } from 'molstar/lib/extensions/rcsb/assembly-symmetry/prop';
|
|
2
|
+
import { StructureRef } from 'molstar/lib/mol-plugin-state/manager/structure/hierarchy-state';
|
|
3
|
+
import { PurePluginUIComponent } from 'molstar/lib/mol-plugin-ui/base';
|
|
4
|
+
import { PluginContext } from 'molstar/lib/mol-plugin/context';
|
|
5
|
+
import { UUID } from 'molstar/lib/mol-util';
|
|
6
|
+
import { ParamDefinition as PD } from 'molstar/lib/mol-util/param-definition';
|
|
7
7
|
type SymmetryParams = {
|
|
8
8
|
/** State of the visibility button */
|
|
9
9
|
on: PD.BooleanParam;
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isAssemblySymmetryAnnotationApplicable = exports.SymmetryAnnotationControls = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var behavior_1 = require("
|
|
7
|
-
var prop_1 = require("
|
|
8
|
-
var base_1 = require("
|
|
9
|
-
var mol_state_1 = require("
|
|
10
|
-
var mol_task_1 = require("
|
|
11
|
-
var param_definition_1 = require("
|
|
6
|
+
var behavior_1 = require("molstar/lib/extensions/rcsb/assembly-symmetry/behavior");
|
|
7
|
+
var prop_1 = require("molstar/lib/extensions/rcsb/assembly-symmetry/prop");
|
|
8
|
+
var base_1 = require("molstar/lib/mol-plugin-ui/base");
|
|
9
|
+
var mol_state_1 = require("molstar/lib/mol-state");
|
|
10
|
+
var mol_task_1 = require("molstar/lib/mol-task");
|
|
11
|
+
var param_definition_1 = require("molstar/lib/mol-util/param-definition");
|
|
12
12
|
var annotation_row_controls_1 = require("./annotation-row-controls");
|
|
13
13
|
var DefaultSymmetryControlsState = {
|
|
14
14
|
params: {
|