pdbe-molstar 3.4.0 → 3.5.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.
Files changed (62) hide show
  1. package/build/pdbe-molstar-component.js +2 -2
  2. package/build/pdbe-molstar-light.css +2 -2
  3. package/build/pdbe-molstar-plugin.js +2 -2
  4. package/build/pdbe-molstar-plugin.js.LICENSE.txt +26 -1
  5. package/build/pdbe-molstar.css +2 -2
  6. package/lib/alphafold-transparency.js +5 -6
  7. package/lib/custom-events.js +1 -1
  8. package/lib/domain-annotations/behavior.d.ts +1 -1
  9. package/lib/domain-annotations/color.js +2 -2
  10. package/lib/domain-annotations/prop.js +1 -2
  11. package/lib/extensions/foldseek/index.d.ts +1 -1
  12. package/lib/extensions/foldseek/index.js +7 -7
  13. package/lib/extensions/interactions/index.d.ts +36 -0
  14. package/lib/extensions/interactions/index.js +112 -0
  15. package/lib/extensions/state-gallery/behavior.d.ts +1 -1
  16. package/lib/extensions/state-gallery/config.js +2 -2
  17. package/lib/extensions/state-gallery/manager.js +5 -4
  18. package/lib/extensions/state-gallery/ui.js +12 -12
  19. package/lib/helpers.d.ts +4 -0
  20. package/lib/helpers.js +68 -19
  21. package/lib/labels.d.ts +1 -1
  22. package/lib/loci-details.js +4 -5
  23. package/lib/plugin-custom-state.js +2 -2
  24. package/lib/sifts-mapping.js +1 -2
  25. package/lib/sifts-mappings-behaviour.d.ts +1 -1
  26. package/lib/spec-from-html.js +1 -2
  27. package/lib/spec.js +3 -3
  28. package/lib/subscribe-events.js +1 -2
  29. package/lib/superposition-export.js +1 -2
  30. package/lib/superposition-focus-representation.d.ts +2 -2
  31. package/lib/superposition-focus-representation.js +1 -1
  32. package/lib/superposition-sifts-mapping.js +1 -2
  33. package/lib/superposition.d.ts +1 -1
  34. package/lib/superposition.js +34 -39
  35. package/lib/ui/alphafold-superposition.js +6 -6
  36. package/lib/ui/annotation-controls.d.ts +1 -1
  37. package/lib/ui/annotation-controls.js +2 -2
  38. package/lib/ui/annotation-row-controls.js +3 -3
  39. package/lib/ui/custom-controls.js +1 -1
  40. package/lib/ui/export-superposition.d.ts +0 -1
  41. package/lib/ui/export-superposition.js +1 -1
  42. package/lib/ui/icons.js +1 -1
  43. package/lib/ui/left-panel/core.d.ts +0 -1
  44. package/lib/ui/left-panel/core.js +5 -6
  45. package/lib/ui/left-panel/pdbe-left-panel.d.ts +0 -1
  46. package/lib/ui/left-panel/tabs.d.ts +1 -1
  47. package/lib/ui/left-panel/tabs.js +2 -2
  48. package/lib/ui/overlay.js +3 -4
  49. package/lib/ui/pdbe-screenshot-controls.js +4 -4
  50. package/lib/ui/pdbe-structure-controls.js +3 -3
  51. package/lib/ui/pdbe-viewport-controls.js +1 -1
  52. package/lib/ui/pdbe-viewport.d.ts +0 -1
  53. package/lib/ui/pdbe-viewport.js +1 -1
  54. package/lib/ui/segment-tree.js +40 -45
  55. package/lib/ui/split-ui/components.d.ts +0 -1
  56. package/lib/ui/split-ui/split-ui.js +6 -7
  57. package/lib/ui/superposition-components.js +16 -21
  58. package/lib/ui/symmetry-annotation-controls.d.ts +4 -4
  59. package/lib/ui/symmetry-annotation-controls.js +18 -25
  60. package/lib/viewer.d.ts +24 -2
  61. package/lib/viewer.js +28 -27
  62. package/package.json +3 -3
@@ -4,7 +4,7 @@ import { ParamDefinition as PD } from 'molstar/lib/mol-util/param-definition';
4
4
  declare const SuperpositionFocusRepresentationParams: (plugin: PluginContext) => {
5
5
  expandRadius: PD.Numeric;
6
6
  surroundingsParams: PD.Group<PD.Normalize<{
7
- [x: string]: any;
7
+ [x: string]: /*elided*/ any;
8
8
  }>>;
9
9
  };
10
10
  type SuperpositionFocusRepresentationProps = PD.ValuesFor<ReturnType<typeof SuperpositionFocusRepresentationParams>>;
@@ -12,5 +12,5 @@ export declare enum SuperpositionFocusRepresentationTags {
12
12
  SurrSel = "superposition-focus-surr-sel",
13
13
  SurrRepr = "superposition-focus-surr-repr"
14
14
  }
15
- export declare const SuperpositionFocusRepresentation: import("molstar/lib/mol-state/transformer").StateTransformer<PluginBehavior.Category, PluginBehavior.Behavior, SuperpositionFocusRepresentationProps>;
15
+ export declare const SuperpositionFocusRepresentation: import("molstar/lib/mol-state").StateTransformer<PluginBehavior.Category, PluginBehavior.Behavior, SuperpositionFocusRepresentationProps>;
16
16
  export {};
@@ -25,7 +25,7 @@ var SuperpositionFocusRepresentationTags;
25
25
  (function (SuperpositionFocusRepresentationTags) {
26
26
  SuperpositionFocusRepresentationTags["SurrSel"] = "superposition-focus-surr-sel";
27
27
  SuperpositionFocusRepresentationTags["SurrRepr"] = "superposition-focus-surr-repr";
28
- })(SuperpositionFocusRepresentationTags = exports.SuperpositionFocusRepresentationTags || (exports.SuperpositionFocusRepresentationTags = {}));
28
+ })(SuperpositionFocusRepresentationTags || (exports.SuperpositionFocusRepresentationTags = SuperpositionFocusRepresentationTags = {}));
29
29
  const TagSet = new Set([SuperpositionFocusRepresentationTags.SurrSel, SuperpositionFocusRepresentationTags.SurrRepr]);
30
30
  class SuperpositionFocusRepresentationBehavior extends behavior_1.PluginBehavior.WithSubscribers {
31
31
  get surrLabel() { return `[Focus] Surroundings (${this.params.expandRadius} Å)`; }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.alignAndSuperposeWithSIFTSMapping = void 0;
3
+ exports.alignAndSuperposeWithSIFTSMapping = alignAndSuperposeWithSIFTSMapping;
4
4
  const int_1 = require("molstar/lib/mol-data/int");
5
5
  const minimize_rmsd_1 = require("molstar/lib/mol-math/linear-algebra/3d/minimize-rmsd");
6
6
  const element_1 = require("molstar/lib/mol-model/structure/structure/element");
@@ -37,7 +37,6 @@ function alignAndSuperposeWithSIFTSMapping(structures, options) {
37
37
  }
38
38
  return { entries, zeroOverlapPairs, failedPairs };
39
39
  }
40
- exports.alignAndSuperposeWithSIFTSMapping = alignAndSuperposeWithSIFTSMapping;
41
40
  function getPositionTables(index, pivot, other, N) {
42
41
  const xs = minimize_rmsd_1.MinimizeRmsd.Positions.empty(N);
43
42
  const ys = minimize_rmsd_1.MinimizeRmsd.Positions.empty(N);
@@ -12,4 +12,4 @@ export declare function loadAfStructure(plugin: PluginContext): Promise<string |
12
12
  export declare function superposeAf(plugin: PluginContext, traceOnly: boolean, segmentIndex?: number): Promise<true | undefined>;
13
13
  export declare function renderSuperposition(plugin: PluginContext, segmentIndex: number, entryList: ClusterMember[]): Promise<void>;
14
14
  /** Apply tranformation to a structure. Only use once per structure, combining multiple transformations is not implemented. */
15
- export declare function transform(plugin: PluginContext, s: StateObjectRef<PSO.Molecule.Structure>, matrix: Mat4): Promise<StateObjectSelector<PSO.Molecule.Structure, import("molstar/lib/mol-state/transformer").StateTransformer<import("molstar/lib/mol-state/object").StateObject<any, import("molstar/lib/mol-state/object").StateObject.Type<any>>, import("molstar/lib/mol-state/object").StateObject<any, import("molstar/lib/mol-state/object").StateObject.Type<any>>, any>>>;
15
+ export declare function transform(plugin: PluginContext, s: StateObjectRef<PSO.Molecule.Structure>, matrix: Mat4): Promise<StateObjectSelector<PSO.Molecule.Structure, import("molstar/lib/mol-state").StateTransformer<import("molstar/lib/mol-state").StateObject<any, import("molstar/lib/mol-state").StateObject.Type<any>>, import("molstar/lib/mol-state").StateObject<any, import("molstar/lib/mol-state").StateObject.Type<any>>, any>>>;
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transform = exports.renderSuperposition = exports.superposeAf = exports.loadAfStructure = exports.initSuperposition = exports.getNextColor = exports.SuperpositionColorPalette = void 0;
3
+ exports.SuperpositionColorPalette = void 0;
4
+ exports.getNextColor = getNextColor;
5
+ exports.initSuperposition = initSuperposition;
6
+ exports.loadAfStructure = loadAfStructure;
7
+ exports.superposeAf = superposeAf;
8
+ exports.renderSuperposition = renderSuperposition;
9
+ exports.transform = transform;
4
10
  const tslib_1 = require("tslib");
5
11
  const linear_algebra_1 = require("molstar/lib/mol-math/linear-algebra");
6
12
  const structure_1 = require("molstar/lib/mol-model/structure");
@@ -28,10 +34,9 @@ function getNextColor(plugin, segmentIndex) {
28
34
  spState.colorCounters[segmentIndex] = (spState.colorCounters[segmentIndex] + 1) % exports.SuperpositionColorPalette.length;
29
35
  return nextColor;
30
36
  }
31
- exports.getNextColor = getNextColor;
32
37
  function initSuperposition(plugin, completeSubject) {
33
- var _a;
34
38
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
39
+ var _a;
35
40
  let success = false;
36
41
  try {
37
42
  yield plugin.clear();
@@ -114,7 +119,6 @@ function initSuperposition(plugin, completeSubject) {
114
119
  }
115
120
  });
116
121
  }
117
- exports.initSuperposition = initSuperposition;
118
122
  function createCarbVisLabel(carbLigNamesAndCount) {
119
123
  const compList = [];
120
124
  for (const carbCompId in carbLigNamesAndCount) {
@@ -144,8 +148,8 @@ function getAfUrls(plugin, accession) {
144
148
  });
145
149
  }
146
150
  function loadAfStructure(plugin) {
147
- var _a, _b;
148
151
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
152
+ var _a, _b;
149
153
  const customState = (0, plugin_custom_state_1.PluginCustomState)(plugin);
150
154
  if (!customState.superpositionState)
151
155
  throw new Error('customState.superpositionState has not been initialized');
@@ -169,7 +173,6 @@ function loadAfStructure(plugin) {
169
173
  return false;
170
174
  });
171
175
  }
172
- exports.loadAfStructure = loadAfStructure;
173
176
  function superposeAf(plugin, traceOnly, segmentIndex) {
174
177
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
175
178
  const customState = (0, plugin_custom_state_1.PluginCustomState)(plugin);
@@ -243,10 +246,9 @@ function superposeAf(plugin, traceOnly, segmentIndex) {
243
246
  return true;
244
247
  });
245
248
  }
246
- exports.superposeAf = superposeAf;
247
249
  function renderSuperposition(plugin, segmentIndex, entryList) {
248
- var _a;
249
250
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
251
+ var _a;
250
252
  const customState = (0, plugin_custom_state_1.PluginCustomState)(plugin);
251
253
  const superpositionParams = customState.initParams.superpositionParams;
252
254
  let busyFlagOn = false;
@@ -256,8 +258,8 @@ function renderSuperposition(plugin, segmentIndex, entryList) {
256
258
  }
257
259
  // Load Coordinates and render respresentations
258
260
  return plugin.dataTransaction(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
259
- var _b, e_1, _c, _d;
260
- var _e;
261
+ var _a, e_1, _b, _c;
262
+ var _d;
261
263
  if (!customState.initParams)
262
264
  throw new Error('customState.initParams has not been initialized');
263
265
  if (!customState.superpositionState)
@@ -336,35 +338,30 @@ function renderSuperposition(plugin, segmentIndex, entryList) {
336
338
  // const interactingHets = [];
337
339
  if (hets && hets.length > 0) {
338
340
  try {
339
- for (var _f = true, hets_1 = (e_1 = void 0, tslib_1.__asyncValues(hets)), hets_1_1; hets_1_1 = yield hets_1.next(), _b = hets_1_1.done, !_b;) {
340
- _d = hets_1_1.value;
341
- _f = false;
342
- try {
343
- const het = _d;
344
- const ligand = builder_1.MolScriptBuilder.struct.generator.atomGroups({
345
- 'chain-test': builder_1.MolScriptBuilder.core.rel.eq([builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.auth_asym_id(), s.auth_asym_id]),
346
- 'residue-test': builder_1.MolScriptBuilder.core.rel.eq([builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.label_comp_id(), het]),
347
- 'group-by': builder_1.MolScriptBuilder.core.str.concat([builder_1.MolScriptBuilder.struct.atomProperty.core.operatorName(), builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.residueKey()]),
348
- });
349
- const labelTagParams = { label: `${het}`, tags: [`superposition-ligand-sel`] };
350
- const hetColor = (0, helpers_1.normalizeColor)(superpositionParams.ligandColor, DefaultLigandColor);
351
- const ligandExp = yield plugin.builders.structure.tryCreateComponentFromExpression(strInstance, ligand, `${het}-${segmentIndex}`, labelTagParams);
352
- if (ligandExp) {
353
- yield plugin.builders.structure.representation.addRepresentation(ligandExp, { type: 'ball-and-stick', color: 'uniform', colorParams: { value: hetColor } }, { tag: `superposition-ligand-visual` });
354
- spState.refMaps[ligandExp.ref] = `${s.pdb_id}_${s.struct_asym_id}`;
355
- invalidStruct = false;
356
- // interactingHets.push(het);
357
- }
358
- }
359
- finally {
360
- _f = true;
341
+ for (var _e = true, hets_1 = (e_1 = void 0, tslib_1.__asyncValues(hets)), hets_1_1; hets_1_1 = yield hets_1.next(), _a = hets_1_1.done, !_a; _e = true) {
342
+ _c = hets_1_1.value;
343
+ _e = false;
344
+ const het = _c;
345
+ const ligand = builder_1.MolScriptBuilder.struct.generator.atomGroups({
346
+ 'chain-test': builder_1.MolScriptBuilder.core.rel.eq([builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.auth_asym_id(), s.auth_asym_id]),
347
+ 'residue-test': builder_1.MolScriptBuilder.core.rel.eq([builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.label_comp_id(), het]),
348
+ 'group-by': builder_1.MolScriptBuilder.core.str.concat([builder_1.MolScriptBuilder.struct.atomProperty.core.operatorName(), builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.residueKey()]),
349
+ });
350
+ const labelTagParams = { label: `${het}`, tags: [`superposition-ligand-sel`] };
351
+ const hetColor = (0, helpers_1.normalizeColor)(superpositionParams.ligandColor, DefaultLigandColor);
352
+ const ligandExp = yield plugin.builders.structure.tryCreateComponentFromExpression(strInstance, ligand, `${het}-${segmentIndex}`, labelTagParams);
353
+ if (ligandExp) {
354
+ yield plugin.builders.structure.representation.addRepresentation(ligandExp, { type: 'ball-and-stick', color: 'uniform', colorParams: { value: hetColor } }, { tag: `superposition-ligand-visual` });
355
+ spState.refMaps[ligandExp.ref] = `${s.pdb_id}_${s.struct_asym_id}`;
356
+ invalidStruct = false;
357
+ // interactingHets.push(het);
361
358
  }
362
359
  }
363
360
  }
364
361
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
365
362
  finally {
366
363
  try {
367
- if (!_f && !_b && (_c = hets_1.return)) yield _c.call(hets_1);
364
+ if (!_e && !_a && (_b = hets_1.return)) yield _b.call(hets_1);
368
365
  }
369
366
  finally { if (e_1) throw e_1.error; }
370
367
  }
@@ -450,15 +447,14 @@ function renderSuperposition(plugin, segmentIndex, entryList) {
450
447
  }
451
448
  if (busyFlagOn) {
452
449
  busyFlagOn = false;
453
- (_e = customState.events) === null || _e === void 0 ? void 0 : _e.isBusy.next(false);
450
+ (_d = customState.events) === null || _d === void 0 ? void 0 : _d.isBusy.next(false);
454
451
  }
455
452
  }));
456
453
  });
457
454
  }
458
- exports.renderSuperposition = renderSuperposition;
459
455
  function getLigandNamesFromModelData(plugin, state, modelRef) {
460
- var _a;
461
456
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
457
+ var _a;
462
458
  const cell = state.select(modelRef)[0];
463
459
  if (!cell || !cell.obj)
464
460
  return undefined;
@@ -502,7 +498,6 @@ function transform(plugin, s, matrix) {
502
498
  .insert(transforms_1.StateTransforms.Model.TransformStructureConformation, { transform: { name: 'matrix', params: { data: matrix, transpose: false } } });
503
499
  return plugin.runTask(plugin.state.data.updateTree(b));
504
500
  }
505
- exports.transform = transform;
506
501
  function afTransform(plugin, s, matrix, coordinateSystem) {
507
502
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
508
503
  const r = mol_state_1.StateObjectRef.resolveAndCheck(plugin.state.data, s);
@@ -526,8 +521,8 @@ function afTransform(plugin, s, matrix, coordinateSystem) {
526
521
  });
527
522
  }
528
523
  function getMatrixData(plugin) {
529
- var _a, _b, _c;
530
524
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
525
+ var _a, _b, _c;
531
526
  const customState = (0, plugin_custom_state_1.PluginCustomState)(plugin);
532
527
  if (!customState.initParams)
533
528
  throw new Error('customState.initParams has not been initialized');
@@ -551,8 +546,8 @@ function getMatrixData(plugin) {
551
546
  }
552
547
  /** Download data about segment clustering and save in plugin custom state */
553
548
  function getSegmentData(plugin) {
554
- var _a;
555
549
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
550
+ var _a;
556
551
  const customState = (0, plugin_custom_state_1.PluginCustomState)(plugin);
557
552
  if (!customState.initParams)
558
553
  throw new Error('customState.initParams has not been initialized');
@@ -69,7 +69,7 @@ class AlphafoldPaeControls extends base_1.CollapsableControls {
69
69
  if (!superpositionState || !superpositionState.alphafold)
70
70
  return null;
71
71
  const errorScale = [0, 5, 10, 15, 20, 25, 30];
72
- return (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-flex-row', style: { height: 'auto', textAlign: 'center', justifyContent: 'center', padding: '15px 0', position: 'relative', fontSize: '12px' } }, { children: [(0, jsx_runtime_1.jsx)("div", { ref: this.axisBoxRef, className: 'pae-axis-box', style: { position: 'absolute', width: '100%', height: '100%' } }), (0, jsx_runtime_1.jsx)("span", Object.assign({ style: { transform: 'rotate(270deg)', position: 'absolute', transformOrigin: '0 0', left: '10px', top: '165px', fontWeight: 500 } }, { children: "Aligned residue" })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-flex-row', style: { height: 'auto', flexDirection: 'column' } }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ style: { width: '200px', height: '200px', border: '1px solid #6a635a', margin: '2px 0 25px 25px', position: 'relative' } }, { children: (0, jsx_runtime_1.jsx)("img", { style: { width: '100%', height: '100%', position: 'absolute', left: 0, top: 0 }, src: `${superpositionState.alphafold.apiData.pae}`, alt: "PAE" }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: { textAlign: 'center', paddingLeft: '30px', marginBottom: '20px', fontWeight: 500 } }, { children: "Scored residue" })), (0, jsx_runtime_1.jsx)("img", { style: { width: '200px', height: '10px', border: '1px solid #6a635a', margin: '2px 0 25px 25px', transform: 'rotate(180deg)' }, src: 'https://alphafold.ebi.ac.uk/assets/img/horizontal_colorbar.png', alt: "PAE Scale" }), (0, jsx_runtime_1.jsx)("ul", Object.assign({ style: { listStyleType: 'none', fontWeight: 500, margin: 0, display: 'inline-block', position: 'absolute', top: '292px', marginLeft: '24px' } }, { children: errorScale.map((errValue) => (0, jsx_runtime_1.jsx)("li", Object.assign({ style: { float: 'left', marginRight: '18px' } }, { children: errValue }), errValue)) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: { textAlign: 'center', paddingLeft: '20px', fontWeight: 500 } }, { children: "Expected position error (\u00C5ngstr\u00F6ms)" }))] }))] }));
72
+ return (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', style: { height: 'auto', textAlign: 'center', justifyContent: 'center', padding: '15px 0', position: 'relative', fontSize: '12px' }, children: [(0, jsx_runtime_1.jsx)("div", { ref: this.axisBoxRef, className: 'pae-axis-box', style: { position: 'absolute', width: '100%', height: '100%' } }), (0, jsx_runtime_1.jsx)("span", { style: { transform: 'rotate(270deg)', position: 'absolute', transformOrigin: '0 0', left: '10px', top: '165px', fontWeight: 500 }, children: "Aligned residue" }), (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', style: { height: 'auto', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsx)("div", { style: { width: '200px', height: '200px', border: '1px solid #6a635a', margin: '2px 0 25px 25px', position: 'relative' }, children: (0, jsx_runtime_1.jsx)("img", { style: { width: '100%', height: '100%', position: 'absolute', left: 0, top: 0 }, src: `${superpositionState.alphafold.apiData.pae}`, alt: "PAE" }) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: 'center', paddingLeft: '30px', marginBottom: '20px', fontWeight: 500 }, children: "Scored residue" }), (0, jsx_runtime_1.jsx)("img", { style: { width: '200px', height: '10px', border: '1px solid #6a635a', margin: '2px 0 25px 25px', transform: 'rotate(180deg)' }, src: 'https://alphafold.ebi.ac.uk/assets/img/horizontal_colorbar.png', alt: "PAE Scale" }), (0, jsx_runtime_1.jsx)("ul", { style: { listStyleType: 'none', fontWeight: 500, margin: 0, display: 'inline-block', position: 'absolute', top: '292px', marginLeft: '24px' }, children: errorScale.map((errValue) => (0, jsx_runtime_1.jsx)("li", { style: { float: 'left', marginRight: '18px' }, children: errValue }, errValue)) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: 'center', paddingLeft: '20px', fontWeight: 500 }, children: "Expected position error (\u00C5ngstr\u00F6ms)" })] })] });
73
73
  }
74
74
  }
75
75
  exports.AlphafoldPaeControls = AlphafoldPaeControls;
@@ -96,10 +96,10 @@ class AlphafoldSuperpositionControls extends base_1.CollapsableControls {
96
96
  throw new Error('customState.superpositionState has not been initialized');
97
97
  const { activeSegment } = spData;
98
98
  const { rmsds } = spData.alphafold;
99
- return (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-control-offset' }, { children: [(rmsds.length === 0 || !rmsds[activeSegment - 1]) && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'msp-flex-row', style: { padding: '5px 0 0 10px' } }, { children: (0, jsx_runtime_1.jsx)("strong", { children: "No overlap found!" }) })), rmsds[activeSegment - 1] && (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-flex-row' }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ style: { width: '40%', borderRight: '1px solid rgb(213 206 196)', padding: '5px 0 0 5px' } }, { children: (0, jsx_runtime_1.jsx)("strong", { children: "Entry" }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: { padding: '5px 0 0 5px' } }, { children: (0, jsx_runtime_1.jsx)("strong", { children: "RMSD (\u212B)" }) }))] })), rmsds[activeSegment - 1] && rmsds[activeSegment - 1].map((d) => {
99
+ return (0, jsx_runtime_1.jsxs)("div", { className: 'msp-control-offset', children: [(rmsds.length === 0 || !rmsds[activeSegment - 1]) && (0, jsx_runtime_1.jsx)("div", { className: 'msp-flex-row', style: { padding: '5px 0 0 10px' }, children: (0, jsx_runtime_1.jsx)("strong", { children: "No overlap found!" }) }), rmsds[activeSegment - 1] && (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', children: [(0, jsx_runtime_1.jsx)("div", { style: { width: '40%', borderRight: '1px solid rgb(213 206 196)', padding: '5px 0 0 5px' }, children: (0, jsx_runtime_1.jsx)("strong", { children: "Entry" }) }), (0, jsx_runtime_1.jsx)("div", { style: { padding: '5px 0 0 5px' }, children: (0, jsx_runtime_1.jsx)("strong", { children: "RMSD (\u212B)" }) })] }), rmsds[activeSegment - 1] && rmsds[activeSegment - 1].map((d) => {
100
100
  const details = d.split(':');
101
- return details[1] !== '-' ? (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-flex-row' }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'msp-control-row-label', style: { width: '40%', borderRight: '1px solid rgb(213 206 196)', padding: '5px 0 0 5px' } }, { children: details[0] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: { padding: '5px 0 0 5px' } }, { children: details[1] }))] }), d) : null;
102
- })] }));
101
+ return details[1] !== '-' ? (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', children: [(0, jsx_runtime_1.jsx)("div", { className: 'msp-control-row-label', style: { width: '40%', borderRight: '1px solid rgb(213 206 196)', padding: '5px 0 0 5px' }, children: details[0] }), (0, jsx_runtime_1.jsx)("div", { style: { padding: '5px 0 0 5px' }, children: details[1] })] }, d) : null;
102
+ })] });
103
103
  }
104
104
  renderControls() {
105
105
  const superpositionState = (0, plugin_custom_state_1.PluginCustomState)(this.plugin).superpositionState;
@@ -148,10 +148,10 @@ class AfSuperpositionControls extends base_1.PurePluginUIComponent {
148
148
  return (0, plugin_custom_state_1.PluginCustomState)(this.plugin);
149
149
  }
150
150
  superposeByDbMapping() {
151
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(common_1.Button, Object.assign({ icon: icons_1.SuperposeChainsSvg, title: 'Superpose AlphaFold structure using intersection of residues from SIFTS UNIPROT mapping.', className: 'msp-btn msp-btn-block', onClick: this.superposeDb, style: { marginTop: '1px', textAlign: 'left' }, disabled: this.state.isBusy }, { children: "Load AlphaFold structure" })) });
151
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.SuperposeChainsSvg, title: 'Superpose AlphaFold structure using intersection of residues from SIFTS UNIPROT mapping.', className: 'msp-btn msp-btn-block', onClick: this.superposeDb, style: { marginTop: '1px', textAlign: 'left' }, disabled: this.state.isBusy, children: "Load AlphaFold structure" }) });
152
152
  }
153
153
  render() {
154
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ style: { backgroundColor: '#dce54e', fontWeight: 500, padding: '5px 12px' } }, { children: "New Feature!" })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'msp-help-text', style: { margin: '2px 0' } }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-help-description' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_2.InfoIconSvg, inline: true }), "Load and superpose AlphaFold structure against representative chains."] })) })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-flex-row' }, { children: [this.state.canUseDb && this.superposeByDbMapping(), (0, jsx_runtime_1.jsx)(common_1.ToggleButton, { icon: icons_1.TuneSvg, label: '', title: 'Options', toggle: this.toggleOptions, isSelected: this.state.action === 'options', disabled: this.state.isBusy, style: { flex: '0 0 40px', padding: 0 } })] })), this.state.action === 'options' && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'msp-control-offset' }, { children: (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: exports.AlphafoldSuperpositionParams, values: this.state.options, onChangeValues: this.setOptions, isDisabled: this.state.isBusy }) }))] });
154
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: { backgroundColor: '#dce54e', fontWeight: 500, padding: '5px 12px' }, children: "New Feature!" }), (0, jsx_runtime_1.jsx)("div", { className: 'msp-help-text', style: { margin: '2px 0' }, children: (0, jsx_runtime_1.jsxs)("div", { className: 'msp-help-description', children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_2.InfoIconSvg, inline: true }), "Load and superpose AlphaFold structure against representative chains."] }) }), (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', children: [this.state.canUseDb && this.superposeByDbMapping(), (0, jsx_runtime_1.jsx)(common_1.ToggleButton, { icon: icons_1.TuneSvg, label: '', title: 'Options', toggle: this.toggleOptions, isSelected: this.state.action === 'options', disabled: this.state.isBusy, style: { flex: '0 0 40px', padding: 0 } })] }), this.state.action === 'options' && (0, jsx_runtime_1.jsx)("div", { className: 'msp-control-offset', children: (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: exports.AlphafoldSuperpositionParams, values: this.state.options, onChangeValues: this.setOptions, isDisabled: this.state.isBusy }) })] });
155
155
  }
156
156
  }
157
157
  exports.AfSuperpositionControls = AfSuperpositionControls;
@@ -28,7 +28,7 @@ export declare class AnnotationsComponentControls extends PurePluginUIComponent<
28
28
  initOptionParams: () => void;
29
29
  getStructure: () => StateObject<Structure, StateObject.Type<any>> | undefined;
30
30
  toggleCollapsed: () => void;
31
- applyAnnotation: (type: 'validation' | 'domains', visibleState: boolean, params?: StructureQualityReportColorThemeProps | DomainAnnotationsColorThemeProps) => void;
31
+ applyAnnotation: (type: "validation" | "domains", visibleState: boolean, params?: StructureQualityReportColorThemeProps | DomainAnnotationsColorThemeProps) => void;
32
32
  toggleAnnotation: (type: AnnotationType) => void;
33
33
  updateValidationParams: (values: StructureQualityReportColorThemeProps) => void;
34
34
  updateDomainParams: (values?: DomainAnnotationsColorThemeProps) => void;
@@ -166,10 +166,10 @@ class AnnotationsComponentControls extends base_1.PurePluginUIComponent {
166
166
  : 'msp-transform-wrapper';
167
167
  const validationDataReady = (_a = this.getStructure()) === null || _a === void 0 ? void 0 : _a.data.model.customProperties.has(prop_1.StructureQualityReportProvider.descriptor);
168
168
  const domainDataReady = (_b = this.getStructure()) === null || _b === void 0 ? void 0 : _b.data.model.customProperties.has(prop_2.DomainAnnotationsProvider.descriptor);
169
- return (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: wrapClass }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'msp-transform-header' }, { children: (0, jsx_runtime_1.jsxs)(common_1.Button, Object.assign({ icon: brand ? undefined : this.state.isCollapsed ? icons_1.ArrowRightSvg : icons_1.ArrowDropDownSvg, noOverflow: true, onClick: this.toggleCollapsed, className: brand ? `msp-transform-header-brand msp-transform-header-brand-${brand.accent}` : undefined, title: `Click to ${this.state.isCollapsed ? 'expand' : 'collapse'}` }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: brand === null || brand === void 0 ? void 0 : brand.svg, inline: true }), "Annotations", (0, jsx_runtime_1.jsx)("small", Object.assign({ style: { margin: '0 6px' } }, { children: this.state.isCollapsed ? '' : this.state.description }))] })) })), !this.state.isCollapsed && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [this.state.validationParams &&
169
+ return (0, jsx_runtime_1.jsxs)("div", { className: wrapClass, children: [(0, jsx_runtime_1.jsx)("div", { className: 'msp-transform-header', children: (0, jsx_runtime_1.jsxs)(common_1.Button, { icon: brand ? undefined : this.state.isCollapsed ? icons_1.ArrowRightSvg : icons_1.ArrowDropDownSvg, noOverflow: true, onClick: this.toggleCollapsed, className: brand ? `msp-transform-header-brand msp-transform-header-brand-${brand.accent}` : undefined, title: `Click to ${this.state.isCollapsed ? 'expand' : 'collapse'}`, children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: brand === null || brand === void 0 ? void 0 : brand.svg, inline: true }), "Annotations", (0, jsx_runtime_1.jsx)("small", { style: { margin: '0 6px' }, children: this.state.isCollapsed ? '' : this.state.description })] }) }), !this.state.isCollapsed && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [this.state.validationParams &&
170
170
  (0, jsx_runtime_1.jsx)(annotation_row_controls_1.AnnotationRowControls, { title: 'Validation', params: this.state.validationParams.params, values: this.state.validationParams.values, onChangeValues: this.updateValidationParams, applied: this.state.validationApplied, onChangeApplied: () => this.toggleAnnotation('validation'), errorMessage: validationDataReady ? undefined : 'First activate annotation to show options' }), this.state.domainsParams &&
171
171
  (0, jsx_runtime_1.jsx)(annotation_row_controls_1.AnnotationRowControls, { title: 'Domain Annotations', shortTitle: 'Domains', params: this.state.domainsParams.params, values: this.state.domainsParams.values, onChangeValues: this.updateDomainParams, applied: this.state.domainsApplied, onChangeApplied: () => this.toggleAnnotation('domains'), errorMessage: domainDataReady ? undefined : 'First activate annotation to show options' }), this.state.showSymmetryAnnotation &&
172
- (0, jsx_runtime_1.jsx)(symmetry_annotation_controls_1.SymmetryAnnotationControls, {})] })] }));
172
+ (0, jsx_runtime_1.jsx)(symmetry_annotation_controls_1.SymmetryAnnotationControls, {})] })] });
173
173
  }
174
174
  }
175
175
  exports.AnnotationsComponentControls = AnnotationsComponentControls;
@@ -32,12 +32,12 @@ class AnnotationRowControls extends react_1.default.PureComponent {
32
32
  var _a;
33
33
  if (!this.props.params)
34
34
  return null;
35
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-flex-row' }, { children: [(0, jsx_runtime_1.jsx)(common_1.Button, Object.assign({ noOverflow: true, className: 'msp-control-button-label', title: this.props.title, style: { textAlign: 'left' } }, { children: (_a = this.props.shortTitle) !== null && _a !== void 0 ? _a : this.props.title })), (0, jsx_runtime_1.jsx)(common_1.IconButton, { onClick: () => this.toggleApplied(), toggleState: false, svg: !this.isApplied() ? icons_1.VisibilityOffOutlinedSvg : icons_1.VisibilityOutlinedSvg, title: `Click to ${this.isApplied() ? 'hide' : 'show'} ${this.props.title}`, small: true, className: 'msp-form-control', flex: true }), (0, jsx_runtime_1.jsx)(common_1.IconButton, { onClick: () => this.toggleOptions(), svg: icons_1.MoreHorizSvg, title: 'Options', toggleState: this.state.optionsExpanded, className: 'msp-form-control', flex: true })] })), this.state.optionsExpanded &&
36
- (0, jsx_runtime_1.jsx)("div", Object.assign({ style: { marginBottom: '6px' } }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'msp-accent-offset' }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'msp-representation-entry' }, { children: this.renderOptions() })) })) }))] });
35
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', children: [(0, jsx_runtime_1.jsx)(common_1.Button, { noOverflow: true, className: 'msp-control-button-label', title: this.props.title, style: { textAlign: 'left' }, children: (_a = this.props.shortTitle) !== null && _a !== void 0 ? _a : this.props.title }), (0, jsx_runtime_1.jsx)(common_1.IconButton, { onClick: () => this.toggleApplied(), toggleState: false, svg: !this.isApplied() ? icons_1.VisibilityOffOutlinedSvg : icons_1.VisibilityOutlinedSvg, title: `Click to ${this.isApplied() ? 'hide' : 'show'} ${this.props.title}`, small: true, className: 'msp-form-control', flex: true }), (0, jsx_runtime_1.jsx)(common_1.IconButton, { onClick: () => this.toggleOptions(), svg: icons_1.MoreHorizSvg, title: 'Options', toggleState: this.state.optionsExpanded, className: 'msp-form-control', flex: true })] }), this.state.optionsExpanded &&
36
+ (0, jsx_runtime_1.jsx)("div", { style: { marginBottom: '6px' }, children: (0, jsx_runtime_1.jsx)("div", { className: 'msp-accent-offset', children: (0, jsx_runtime_1.jsx)("div", { className: 'msp-representation-entry', children: this.renderOptions() }) }) })] });
37
37
  }
38
38
  renderOptions() {
39
39
  if (this.props.errorMessage) {
40
- return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'msp-row-text' }, { children: (0, jsx_runtime_1.jsx)("div", { children: this.props.errorMessage }) }));
40
+ return (0, jsx_runtime_1.jsx)("div", { className: 'msp-row-text', children: (0, jsx_runtime_1.jsx)("div", { children: this.props.errorMessage }) });
41
41
  }
42
42
  return (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: this.props.params, onChange: this.props.onChange, values: this.props.values, onChangeValues: this.props.onChangeValues, onEnter: this.props.onEnter });
43
43
  }
@@ -11,7 +11,7 @@ class CustomControls extends base_1.PluginUIComponent {
11
11
  }
12
12
  render() {
13
13
  const customControls = Array.from(plugin_custom_state_1.PluginCustomControls.get(this.plugin, this.props.region).entries());
14
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: customControls.map(([name, Control]) => (0, jsx_runtime_1.jsx)("div", Object.assign({ className: `pdbemolstar-custom-control-${this.props.region}` }, { children: (0, jsx_runtime_1.jsx)(Control, {}) }), name)) });
14
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: customControls.map(([name, Control]) => (0, jsx_runtime_1.jsx)("div", { className: `pdbemolstar-custom-control-${this.props.region}`, children: (0, jsx_runtime_1.jsx)(Control, {}) }, name)) });
15
15
  }
16
16
  }
17
17
  exports.CustomControls = CustomControls;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CollapsableControls, CollapsableState } from 'molstar/lib/mol-plugin-ui/base';
3
2
  export declare class SuperpositionModelExportUI extends CollapsableControls<{}, {}> {
4
3
  protected defaultState(): CollapsableState;
@@ -50,5 +50,5 @@ function SuperpositionExportControls({ plugin }) {
50
50
  setExporting(false);
51
51
  }
52
52
  });
53
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: Params, values: params, onChangeValues: setParams, isDisabled: isBusy || exporting }), (0, jsx_runtime_1.jsx)(common_1.Button, Object.assign({ onClick: onExport, style: { marginTop: 1 }, disabled: isBusy || hierarchy.structures.length === 0 || exporting, commit: hierarchy.structures.length > 0 ? 'on' : 'off' }, { children: label }))] });
53
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: Params, values: params, onChangeValues: setParams, isDisabled: isBusy || exporting }), (0, jsx_runtime_1.jsx)(common_1.Button, { onClick: onExport, style: { marginTop: 1 }, disabled: isBusy || hierarchy.structures.length === 0 || exporting, commit: hierarchy.structures.length > 0 ? 'on' : 'off', children: label })] });
54
54
  }
package/lib/ui/icons.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HourglassBottomSvg = exports.ChevronRightSvg = exports.ChevronLeftSvg = exports.TextsmsOutlinedSvg = exports.InfoIconSvg = exports.WavesIconSvg = exports.CollectionsOutlinedSvg = exports.EmptyIconSvg = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  function svgIcon(path) {
6
- const svg = (0, jsx_runtime_1.jsx)("svg", Object.assign({ width: '24px', height: '24px', viewBox: '0 0 24 24' }, { children: (0, jsx_runtime_1.jsx)("path", { d: path }) }));
6
+ const svg = (0, jsx_runtime_1.jsx)("svg", { width: '24px', height: '24px', viewBox: '0 0 24 24', children: (0, jsx_runtime_1.jsx)("path", { d: path }) });
7
7
  return function SvgIcon() { return svg; };
8
8
  }
9
9
  // Source: https://mui.com/material-ui/material-icons/
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PluginContext } from 'molstar/lib/mol-plugin/context';
3
2
  import { BehaviorSubject, Subject } from 'rxjs';
4
3
  /** Specification of one tab in a tabbed panel */
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LeftPanel = exports.VerticalTabbedPanel = void 0;
3
+ exports.VerticalTabbedPanel = VerticalTabbedPanel;
4
+ exports.LeftPanel = LeftPanel;
4
5
  const tslib_1 = require("tslib");
5
6
  const jsx_runtime_1 = require("react/jsx-runtime");
6
7
  const base_1 = require("molstar/lib/mol-plugin-ui/base");
@@ -10,7 +11,7 @@ const sleep_1 = require("molstar/lib/mol-util/sleep");
10
11
  /** Convert `Icon` to a React functional element. `Icon` can be either React element (class or functional) or a string with icon path (in 24x24 viewBox) */
11
12
  function resolveIcon(Icon) {
12
13
  if (typeof Icon === 'string') {
13
- return function _Icon() { return (0, jsx_runtime_1.jsx)("svg", Object.assign({ width: '24px', height: '24px', viewBox: '0 0 24 24' }, { children: (0, jsx_runtime_1.jsx)("path", { d: Icon }) })); };
14
+ return function _Icon() { return (0, jsx_runtime_1.jsx)("svg", { width: '24px', height: '24px', viewBox: '0 0 24 24', children: (0, jsx_runtime_1.jsx)("path", { d: Icon }) }); };
14
15
  }
15
16
  else {
16
17
  return function _Icon() { return (0, jsx_runtime_1.jsx)(Icon, {}); };
@@ -89,12 +90,11 @@ function VerticalTabbedPanel(options) {
89
90
  return null;
90
91
  return (0, jsx_runtime_1.jsx)(common_1.IconButton, { title: tab.title, svg: resolveIcon(tab.icon), toggleState: tab.id === currentTabId, onClick: () => this.toggleTab(tab.id), transparent: true, style: { position: 'relative' }, extraContent: this.state.dirtyTabs.includes(tab.id) ? (0, jsx_runtime_1.jsx)("div", { className: 'msp-left-panel-controls-button-data-dirty' }) : undefined }, tab.id);
91
92
  };
92
- return (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-left-panel-controls' }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-left-panel-controls-buttons' }, { children: [(_a = options.tabsTop) === null || _a === void 0 ? void 0 : _a.map(iconForTab), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'msp-left-panel-controls-buttons-bottom' }, { children: (_b = options.tabsBottom) === null || _b === void 0 ? void 0 : _b.map(iconForTab) }))] })), currentTab &&
93
- (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-scrollable-container' }, { children: [CurrentTabHeader && (0, jsx_runtime_1.jsx)(CurrentTabHeader, {}) || (0, jsx_runtime_1.jsx)(common_1.SectionHeader, { icon: resolveIcon(currentTab.icon), title: currentTab.title }), CurrentTabBody && (0, jsx_runtime_1.jsx)(CurrentTabBody, {})] }))] }));
93
+ return (0, jsx_runtime_1.jsxs)("div", { className: 'msp-left-panel-controls', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'msp-left-panel-controls-buttons', children: [(_a = options.tabsTop) === null || _a === void 0 ? void 0 : _a.map(iconForTab), (0, jsx_runtime_1.jsx)("div", { className: 'msp-left-panel-controls-buttons-bottom', children: (_b = options.tabsBottom) === null || _b === void 0 ? void 0 : _b.map(iconForTab) })] }), currentTab &&
94
+ (0, jsx_runtime_1.jsxs)("div", { className: 'msp-scrollable-container', children: [CurrentTabHeader && (0, jsx_runtime_1.jsx)(CurrentTabHeader, {}) || (0, jsx_runtime_1.jsx)(common_1.SectionHeader, { icon: resolveIcon(currentTab.icon), title: currentTab.title }), CurrentTabBody && (0, jsx_runtime_1.jsx)(CurrentTabBody, {})] })] });
94
95
  }
95
96
  };
96
97
  }
97
- exports.VerticalTabbedPanel = VerticalTabbedPanel;
98
98
  /** Set left panel state in Molstar layout to 'full' (if expanded) or 'collapsed' (if not expanded).
99
99
  * Do not change the state if it is 'hidden'. */
100
100
  function adjustLeftPanelState(plugin, expanded) {
@@ -117,4 +117,3 @@ function LeftPanel(options) {
117
117
  (_c = options.onTabChange) === null || _c === void 0 ? void 0 : _c.call(options, plugin, tab);
118
118
  } }));
119
119
  }
120
- exports.LeftPanel = LeftPanel;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /** Left panel in core Molstar */
3
2
  export declare const DefaultLeftPanelControls: import("react").ComponentClass<{}, any>;
4
3
  /** Left panel in PDBe Molstar */
@@ -48,7 +48,7 @@ export declare const CoreLeftPanelTabs: {
48
48
  readonly header: typeof DataTabHeader;
49
49
  readonly body: typeof DataTabBody;
50
50
  readonly dirtyOn: (plugin: import("molstar/lib/mol-plugin/context").PluginContext) => import("rxjs").Subject<{
51
- state: import("molstar/lib/mol-state/state").State;
51
+ state: import("molstar/lib/mol-state").State;
52
52
  inTransaction: boolean;
53
53
  }>;
54
54
  };
@@ -62,7 +62,7 @@ class RemoveAllButton extends base_1.PluginUIComponent {
62
62
  }
63
63
  }
64
64
  function HelpSection(props) {
65
- return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'msp-simple-help-section' }, { children: props.header }));
65
+ return (0, jsx_runtime_1.jsx)("div", { className: 'msp-simple-help-section', children: props.header });
66
66
  }
67
67
  /** Help section about superposition functionality for the left panel */
68
68
  class SuperpositionHelpSection extends base_1.PluginUIComponent {
@@ -70,7 +70,7 @@ class SuperpositionHelpSection extends base_1.PluginUIComponent {
70
70
  this.subscribe(this.plugin.events.canvas3d.settingsUpdated, () => this.forceUpdate());
71
71
  }
72
72
  render() {
73
- return (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(HelpSection, { header: 'Superposition' }), (0, jsx_runtime_1.jsx)(help_1.HelpGroup, Object.assign({ header: 'Segment' }, { children: (0, jsx_runtime_1.jsx)(help_1.HelpText, { children: (0, jsx_runtime_1.jsx)("p", { children: "Discrete UniProt sequence range mapped to the structure" }) }) })), (0, jsx_runtime_1.jsx)(help_1.HelpGroup, Object.assign({ header: 'Cluster' }, { children: (0, jsx_runtime_1.jsx)(help_1.HelpText, { children: (0, jsx_runtime_1.jsx)("p", { children: "Structural chains that possess significantly close superposition Q-score" }) }) })), (0, jsx_runtime_1.jsx)(help_1.HelpGroup, Object.assign({ header: 'Representative chain' }, { children: (0, jsx_runtime_1.jsx)(help_1.HelpText, { children: (0, jsx_runtime_1.jsx)("p", { children: "The best-ranked chain within a cluster chosen based on the model quality, resolution, observed residues ratio and UniProt sequence coverage" }) }) }))] });
73
+ return (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(HelpSection, { header: 'Superposition' }), (0, jsx_runtime_1.jsx)(help_1.HelpGroup, { header: 'Segment', children: (0, jsx_runtime_1.jsx)(help_1.HelpText, { children: (0, jsx_runtime_1.jsx)("p", { children: "Discrete UniProt sequence range mapped to the structure" }) }) }), (0, jsx_runtime_1.jsx)(help_1.HelpGroup, { header: 'Cluster', children: (0, jsx_runtime_1.jsx)(help_1.HelpText, { children: (0, jsx_runtime_1.jsx)("p", { children: "Structural chains that possess significantly close superposition Q-score" }) }) }), (0, jsx_runtime_1.jsx)(help_1.HelpGroup, { header: 'Representative chain', children: (0, jsx_runtime_1.jsx)(help_1.HelpText, { children: (0, jsx_runtime_1.jsx)("p", { children: "The best-ranked chain within a cluster chosen based on the model quality, resolution, observed residues ratio and UniProt sequence coverage" }) }) })] });
74
74
  }
75
75
  }
76
76
  /** Body of 'help' tab in the left panel (core help + PDBe-specific help) */
package/lib/ui/overlay.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WithLoadingOverlay = void 0;
3
+ exports.WithLoadingOverlay = WithLoadingOverlay;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const base_1 = require("molstar/lib/mol-plugin-ui/base");
6
6
  const plugin_custom_state_1 = require("../plugin-custom-state");
@@ -23,12 +23,11 @@ function WithLoadingOverlay(MainContent, OverlayContent = PDBeLoadingOverlayBox)
23
23
  }
24
24
  }
25
25
  render() {
26
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MainContent, {}), this.state.showOverlay && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'pdbemolstar-overlay' }, { children: (0, jsx_runtime_1.jsx)(OverlayContent, {}) }))] });
26
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MainContent, {}), this.state.showOverlay && (0, jsx_runtime_1.jsx)("div", { className: 'pdbemolstar-overlay', children: (0, jsx_runtime_1.jsx)(OverlayContent, {}) })] });
27
27
  }
28
28
  };
29
29
  }
30
- exports.WithLoadingOverlay = WithLoadingOverlay;
31
30
  /** Overlay component with animated PDBe logo */
32
31
  function PDBeLoadingOverlayBox() {
33
- return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'pdbemolstar-overlay-box' }, { children: (0, jsx_runtime_1.jsxs)("svg", Object.assign({ className: 'pdbe-animated-logo', viewBox: '0 0 300 300' }, { children: [(0, jsx_runtime_1.jsx)("path", { className: 'path-bg', fill: 'transparent', stroke: '#E13D3D', strokeWidth: '30', d: 'M 150 200 L 150 100 A 50 50 0 1 0 100 150 L 200 150 A 50 50 0 1 0 150 100 L 150 200 A 50 50 0 1 0 200 150 L 100 150 A 50 50 0 1 0 150 200 ' }), (0, jsx_runtime_1.jsx)("path", { className: 'path-cross', fill: 'transparent', stroke: '#72B260', strokeWidth: '30', d: 'M 150 100 L 150 200 M 100 150 L 200 150' }), (0, jsx_runtime_1.jsx)("path", { className: 'path-fg', fill: 'transparent', stroke: '#72B260', strokeWidth: '30', d: 'M 100 150 A 50 50 0 1 1 150 100 L 150 170 L 150 100 L 150 170 L 150 100 L 150 100 A 50 50 0 1 1 200 150 L 130 150 L 200 150 L 130 150 L 200 150 L 200 150 A 50 50 0 1 1 150 200 L 150 130 L 150 200 L 150 130 L 150 200 L 150 200 A 50 50 0 1 1 100 150 L 170 150 L 100 150 L 170 150 L 100 150' })] })) }));
32
+ return (0, jsx_runtime_1.jsx)("div", { className: 'pdbemolstar-overlay-box', children: (0, jsx_runtime_1.jsxs)("svg", { className: 'pdbe-animated-logo', viewBox: '0 0 300 300', children: [(0, jsx_runtime_1.jsx)("path", { className: 'path-bg', fill: 'transparent', stroke: '#E13D3D', strokeWidth: '30', d: 'M 150 200 L 150 100 A 50 50 0 1 0 100 150 L 200 150 A 50 50 0 1 0 150 100 L 150 200 A 50 50 0 1 0 200 150 L 100 150 A 50 50 0 1 0 150 200 ' }), (0, jsx_runtime_1.jsx)("path", { className: 'path-cross', fill: 'transparent', stroke: '#72B260', strokeWidth: '30', d: 'M 150 100 L 150 200 M 100 150 L 200 150' }), (0, jsx_runtime_1.jsx)("path", { className: 'path-fg', fill: 'transparent', stroke: '#72B260', strokeWidth: '30', d: 'M 100 150 A 50 50 0 1 1 150 100 L 150 170 L 150 100 L 150 170 L 150 100 L 150 100 A 50 50 0 1 1 200 150 L 130 150 L 200 150 L 130 150 L 200 150 L 200 150 A 50 50 0 1 1 150 200 L 150 130 L 150 200 L 150 130 L 150 200 L 150 200 A 50 50 0 1 1 100 150 L 170 150 L 100 150 L 170 150 L 100 150' })] }) });
34
33
  }
@@ -37,8 +37,8 @@ class DownloadScreenshotControls extends base_1.PluginUIComponent {
37
37
  }
38
38
  });
39
39
  this.copyImg = () => tslib_1.__awaiter(this, void 0, void 0, function* () {
40
- var _c;
41
- const src = yield ((_c = this.plugin.helpers.viewportScreenshot) === null || _c === void 0 ? void 0 : _c.getImageDataUri());
40
+ var _a;
41
+ const src = yield ((_a = this.plugin.helpers.viewportScreenshot) === null || _a === void 0 ? void 0 : _a.getImageDataUri());
42
42
  this.setState({ imageData: src });
43
43
  });
44
44
  this.open = (e) => {
@@ -58,7 +58,7 @@ class DownloadScreenshotControls extends base_1.PluginUIComponent {
58
58
  render() {
59
59
  var _a;
60
60
  const hasClipboardApi = !!((_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.write);
61
- return (0, jsx_runtime_1.jsxs)("div", { children: [this.state.showPreview && (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-image-preview' }, { children: [(0, jsx_runtime_1.jsx)(screenshot_1.ScreenshotPreview, { plugin: this.plugin }), (0, jsx_runtime_1.jsx)(CropControls, { plugin: this.plugin })] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-flex-row' }, { children: [!this.state.imageData && (0, jsx_runtime_1.jsx)(common_1.Button, Object.assign({ icon: icons_1.CopySvg, onClick: hasClipboardApi ? this.copy : this.copyImg, disabled: this.state.isDisabled }, { children: "Copy" })), this.state.imageData && (0, jsx_runtime_1.jsx)(common_1.Button, Object.assign({ onClick: () => this.setState({ imageData: undefined }), disabled: this.state.isDisabled }, { children: "Clear" })), (0, jsx_runtime_1.jsx)(common_1.Button, Object.assign({ icon: icons_1.GetAppSvg, onClick: this.download, disabled: this.state.isDisabled }, { children: "Download" }))] })), this.state.imageData && (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-row msp-copy-image-wrapper' }, { children: [(0, jsx_runtime_1.jsx)("div", { children: "Right click below + Copy Image" }), (0, jsx_runtime_1.jsx)("img", { src: this.state.imageData, style: { width: '100%', height: 32, display: 'block' } })] })), (0, jsx_runtime_1.jsx)(ScreenshotParams, { plugin: this.plugin, isDisabled: this.state.isDisabled })] });
61
+ return (0, jsx_runtime_1.jsxs)("div", { children: [this.state.showPreview && (0, jsx_runtime_1.jsxs)("div", { className: 'msp-image-preview', children: [(0, jsx_runtime_1.jsx)(screenshot_1.ScreenshotPreview, { plugin: this.plugin }), (0, jsx_runtime_1.jsx)(CropControls, { plugin: this.plugin })] }), (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', children: [!this.state.imageData && (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.CopySvg, onClick: hasClipboardApi ? this.copy : this.copyImg, disabled: this.state.isDisabled, children: "Copy" }), this.state.imageData && (0, jsx_runtime_1.jsx)(common_1.Button, { onClick: () => this.setState({ imageData: undefined }), disabled: this.state.isDisabled, children: "Clear" }), (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.GetAppSvg, onClick: this.download, disabled: this.state.isDisabled, children: "Download" })] }), this.state.imageData && (0, jsx_runtime_1.jsxs)("div", { className: 'msp-row msp-copy-image-wrapper', children: [(0, jsx_runtime_1.jsx)("div", { children: "Right click below + Copy Image" }), (0, jsx_runtime_1.jsx)("img", { src: this.state.imageData, style: { width: '100%', height: 32, display: 'block' } })] }), (0, jsx_runtime_1.jsx)(ScreenshotParams, { plugin: this.plugin, isDisabled: this.state.isDisabled })] });
62
62
  }
63
63
  }
64
64
  exports.DownloadScreenshotControls = DownloadScreenshotControls;
@@ -73,5 +73,5 @@ function CropControls({ plugin }) {
73
73
  (0, use_behavior_1.useBehavior)(helper === null || helper === void 0 ? void 0 : helper.behaviors.relativeCrop);
74
74
  if (!helper)
75
75
  return null;
76
- return (0, jsx_runtime_1.jsxs)("div", Object.assign({ style: { width: '100%', height: '24px', marginTop: '8px' } }, { children: [(0, jsx_runtime_1.jsx)(common_1.ToggleButton, { icon: icons_1.CropOrginalSvg, title: 'Auto-crop', inline: true, isSelected: cropParams === null || cropParams === void 0 ? void 0 : cropParams.auto, style: { background: 'transparent', float: 'left', width: 'auto', height: '24px', lineHeight: '24px' }, toggle: () => helper.toggleAutocrop(), label: 'Auto-crop ' + ((cropParams === null || cropParams === void 0 ? void 0 : cropParams.auto) ? 'On' : 'Off') }), !(cropParams === null || cropParams === void 0 ? void 0 : cropParams.auto) && (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.CropSvg, title: 'Crop', style: { background: 'transparent', float: 'right', height: '24px', lineHeight: '24px', width: '24px', padding: '0' }, onClick: () => helper.autocrop() }), !(cropParams === null || cropParams === void 0 ? void 0 : cropParams.auto) && !helper.isFullFrame && (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.CropFreeSvg, title: 'Reset Crop', style: { background: 'transparent', float: 'right', height: '24px', lineHeight: '24px', width: '24px', padding: '0' }, onClick: () => helper.resetCrop() })] }));
76
+ return (0, jsx_runtime_1.jsxs)("div", { style: { width: '100%', height: '24px', marginTop: '8px' }, children: [(0, jsx_runtime_1.jsx)(common_1.ToggleButton, { icon: icons_1.CropOrginalSvg, title: 'Auto-crop', inline: true, isSelected: cropParams === null || cropParams === void 0 ? void 0 : cropParams.auto, style: { background: 'transparent', float: 'left', width: 'auto', height: '24px', lineHeight: '24px' }, toggle: () => helper.toggleAutocrop(), label: 'Auto-crop ' + ((cropParams === null || cropParams === void 0 ? void 0 : cropParams.auto) ? 'On' : 'Off') }), !(cropParams === null || cropParams === void 0 ? void 0 : cropParams.auto) && (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.CropSvg, title: 'Crop', style: { background: 'transparent', float: 'right', height: '24px', lineHeight: '24px', width: '24px', padding: '0' }, onClick: () => helper.autocrop() }), !(cropParams === null || cropParams === void 0 ? void 0 : cropParams.auto) && !helper.isFullFrame && (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.CropFreeSvg, title: 'Reset Crop', style: { background: 'transparent', float: 'right', height: '24px', lineHeight: '24px', width: '24px', padding: '0' }, onClick: () => helper.resetCrop() })] });
77
77
  }
@@ -18,7 +18,7 @@ const prop_1 = require("molstar/lib/extensions/assembly-symmetry/prop");
18
18
  class PDBeStructureTools extends base_1.PluginUIComponent {
19
19
  render() {
20
20
  const AssemblySymmetryKey = prop_1.AssemblySymmetryData.Tag.Representation;
21
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-section-header' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }), "Structure Tools"] })), (0, jsx_runtime_1.jsx)(source_1.StructureSourceControls, {}), (0, jsx_runtime_1.jsx)(annotation_controls_1.AnnotationsComponentControls, {}), (0, jsx_runtime_1.jsx)(quick_styles_1.StructureQuickStylesControls, {}), (0, jsx_runtime_1.jsx)(components_1.StructureComponentControls, {}), (0, jsx_runtime_1.jsx)(volume_1.VolumeStreamingControls, {}), (0, jsx_runtime_1.jsx)(volume_1.VolumeSourceControls, {}), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}), (0, jsx_runtime_1.jsx)(CustomStructureControls, { skipKeys: [AssemblySymmetryKey] })] });
21
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: 'msp-section-header', children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }), "Structure Tools"] }), (0, jsx_runtime_1.jsx)(source_1.StructureSourceControls, {}), (0, jsx_runtime_1.jsx)(annotation_controls_1.AnnotationsComponentControls, {}), (0, jsx_runtime_1.jsx)(quick_styles_1.StructureQuickStylesControls, {}), (0, jsx_runtime_1.jsx)(components_1.StructureComponentControls, {}), (0, jsx_runtime_1.jsx)(volume_1.VolumeStreamingControls, {}), (0, jsx_runtime_1.jsx)(volume_1.VolumeSourceControls, {}), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}), (0, jsx_runtime_1.jsx)(CustomStructureControls, { skipKeys: [AssemblySymmetryKey] })] });
22
22
  }
23
23
  }
24
24
  exports.PDBeStructureTools = PDBeStructureTools;
@@ -44,13 +44,13 @@ class CustomStructureControls extends base_1.PluginUIComponent {
44
44
  exports.CustomStructureControls = CustomStructureControls;
45
45
  class PDBeLigandViewStructureTools extends base_1.PluginUIComponent {
46
46
  render() {
47
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-section-header' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }), "Structure Tools"] })), (0, jsx_runtime_1.jsx)(components_1.StructureComponentControls, {}), (0, jsx_runtime_1.jsx)(volume_1.VolumeStreamingControls, {}), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}), (0, jsx_runtime_1.jsx)(CustomStructureControls, {})] });
47
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: 'msp-section-header', children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }), "Structure Tools"] }), (0, jsx_runtime_1.jsx)(components_1.StructureComponentControls, {}), (0, jsx_runtime_1.jsx)(volume_1.VolumeStreamingControls, {}), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}), (0, jsx_runtime_1.jsx)(CustomStructureControls, {})] });
48
48
  }
49
49
  }
50
50
  exports.PDBeLigandViewStructureTools = PDBeLigandViewStructureTools;
51
51
  class PDBeSuperpositionStructureTools extends base_1.PluginUIComponent {
52
52
  render() {
53
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-section-header' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }), "Structure Tools"] })), (0, jsx_runtime_1.jsx)(superposition_components_1.SuperpositionComponentControls, {}), (0, jsx_runtime_1.jsx)(alphafold_tranparency_1.AlphafoldTransparencyControls, {}), (0, jsx_runtime_1.jsx)(alphafold_superposition_1.AlphafoldPaeControls, {}), (0, jsx_runtime_1.jsx)(alphafold_superposition_1.AlphafoldSuperpositionControls, {}), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}), (0, jsx_runtime_1.jsx)(export_superposition_1.SuperpositionModelExportUI, {}), (0, jsx_runtime_1.jsx)(CustomStructureControls, {})] });
53
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: 'msp-section-header', children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }), "Structure Tools"] }), (0, jsx_runtime_1.jsx)(superposition_components_1.SuperpositionComponentControls, {}), (0, jsx_runtime_1.jsx)(alphafold_tranparency_1.AlphafoldTransparencyControls, {}), (0, jsx_runtime_1.jsx)(alphafold_superposition_1.AlphafoldPaeControls, {}), (0, jsx_runtime_1.jsx)(alphafold_superposition_1.AlphafoldSuperpositionControls, {}), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}), (0, jsx_runtime_1.jsx)(export_superposition_1.SuperpositionModelExportUI, {}), (0, jsx_runtime_1.jsx)(CustomStructureControls, {})] });
54
54
  }
55
55
  }
56
56
  exports.PDBeSuperpositionStructureTools = PDBeSuperpositionStructureTools;
@@ -27,7 +27,7 @@ class PDBeViewportControls extends viewport_1.ViewportControls {
27
27
  style: { height: '12px', width: '12px', border: 0, position: 'absolute', margin: '4px 0 0 -13px' },
28
28
  },
29
29
  };
30
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showPDBeLink && (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-viewport-controls-buttons', style: pdbeLink.containerStyle }, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'msp-semi-transparent-background', style: pdbeLink.bgStyle }), (0, jsx_runtime_1.jsxs)("a", Object.assign({ className: 'msp-pdbe-link', style: pdbeLink.style, target: "_blank", href: `https://pdbe.org/${initParams.moleculeId}` }, { children: [(0, jsx_runtime_1.jsx)("img", { src: pdbeLink.pdbeImg.src, alt: pdbeLink.pdbeImg.alt, style: pdbeLink.pdbeImg.style }), initParams.moleculeId] }))] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: { position: 'absolute', top: showPDBeLink ? (27 + 4) : 0, right: 0 } }, { children: super.render() }))] });
30
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showPDBeLink && (0, jsx_runtime_1.jsxs)("div", { className: 'msp-viewport-controls-buttons', style: pdbeLink.containerStyle, children: [(0, jsx_runtime_1.jsx)("div", { className: 'msp-semi-transparent-background', style: pdbeLink.bgStyle }), (0, jsx_runtime_1.jsxs)("a", { className: 'msp-pdbe-link', style: pdbeLink.style, target: "_blank", href: `https://pdbe.org/${initParams.moleculeId}`, children: [(0, jsx_runtime_1.jsx)("img", { src: pdbeLink.pdbeImg.src, alt: pdbeLink.pdbeImg.alt, style: pdbeLink.pdbeImg.style }), initParams.moleculeId] })] }), (0, jsx_runtime_1.jsx)("div", { style: { position: 'absolute', top: showPDBeLink ? (27 + 4) : 0, right: 0 }, children: super.render() })] });
31
31
  }
32
32
  }
33
33
  exports.PDBeViewportControls = PDBeViewportControls;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DefaultViewport } from 'molstar/lib/mol-plugin-ui/plugin';
3
2
  /** A modified copy of DefaultViewport */
4
3
  export declare class CustomizableDefaultViewport extends DefaultViewport {
@@ -15,7 +15,7 @@ class CustomizableDefaultViewport extends plugin_1.DefaultViewport {
15
15
  var _a, _b, _c, _d;
16
16
  const VPControls = ((_b = (_a = this.plugin.spec.components) === null || _a === void 0 ? void 0 : _a.viewport) === null || _b === void 0 ? void 0 : _b.controls) || viewport_1.ViewportControls;
17
17
  const SnapshotDescription = ((_d = (_c = this.plugin.spec.components) === null || _c === void 0 ? void 0 : _c.viewport) === null || _d === void 0 ? void 0 : _d.snapshotDescription) || controls_1.ViewportSnapshotDescription;
18
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(viewport_1.Viewport, {}), (0, jsx_runtime_1.jsxs)("div", Object.assign({ style: { position: 'absolute', inset: 0, pointerEvents: 'none' } }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'pdbemolstar-viewport-top-center-controls' }, { children: [(0, jsx_runtime_1.jsx)(custom_controls_1.CustomControls, { region: 'viewport-top-center' }), (0, jsx_runtime_1.jsx)(controls_1.SelectionViewportControls, {})] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: { position: 'relative', pointerEvents: 'auto' } }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-viewport-top-left-controls' }, { children: [(0, jsx_runtime_1.jsx)(controls_1.AnimationViewportControls, {}), (0, jsx_runtime_1.jsx)(controls_1.TrajectoryViewportControls, {}), (0, jsx_runtime_1.jsx)(controls_1.StateSnapshotViewportControls, {}), (0, jsx_runtime_1.jsx)(custom_controls_1.CustomControls, { region: 'viewport-top-left' }), (0, jsx_runtime_1.jsx)(SnapshotDescription, {})] })) }))] })), (0, jsx_runtime_1.jsx)(VPControls, {}), (0, jsx_runtime_1.jsx)(task_1.BackgroundTaskProgress, {}), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'msp-highlight-toast-wrapper' }, { children: [(0, jsx_runtime_1.jsx)(controls_1.LociLabels, {}), (0, jsx_runtime_1.jsx)(toast_1.Toasts, {})] }))] });
18
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(viewport_1.Viewport, {}), (0, jsx_runtime_1.jsxs)("div", { style: { position: 'absolute', inset: 0, pointerEvents: 'none' }, children: [(0, jsx_runtime_1.jsxs)("div", { className: 'pdbemolstar-viewport-top-center-controls', children: [(0, jsx_runtime_1.jsx)(custom_controls_1.CustomControls, { region: 'viewport-top-center' }), (0, jsx_runtime_1.jsx)(controls_1.SelectionViewportControls, {})] }), (0, jsx_runtime_1.jsx)("div", { style: { position: 'relative', pointerEvents: 'auto' }, children: (0, jsx_runtime_1.jsxs)("div", { className: 'msp-viewport-top-left-controls', children: [(0, jsx_runtime_1.jsx)(controls_1.AnimationViewportControls, {}), (0, jsx_runtime_1.jsx)(controls_1.TrajectoryViewportControls, {}), (0, jsx_runtime_1.jsx)(controls_1.StateSnapshotViewportControls, {}), (0, jsx_runtime_1.jsx)(custom_controls_1.CustomControls, { region: 'viewport-top-left' }), (0, jsx_runtime_1.jsx)(SnapshotDescription, {})] }) })] }), (0, jsx_runtime_1.jsx)(VPControls, {}), (0, jsx_runtime_1.jsx)(task_1.BackgroundTaskProgress, {}), (0, jsx_runtime_1.jsxs)("div", { className: 'msp-highlight-toast-wrapper', children: [(0, jsx_runtime_1.jsx)(controls_1.LociLabels, {}), (0, jsx_runtime_1.jsx)(toast_1.Toasts, {})] })] });
19
19
  }
20
20
  }
21
21
  exports.CustomizableDefaultViewport = CustomizableDefaultViewport;