drugflow-molstar 0.3.77 → 0.4.1

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 (250) hide show
  1. package/build/drugflow-molstar-0.4.1.css +1 -0
  2. package/build/drugflow-molstar-component-0.4.1.js +25 -0
  3. package/build/drugflow-molstar-plugin-0.4.1.js +2 -0
  4. package/build/drugflow-molstar-plugin-0.4.1.js.LICENSE.txt +64 -0
  5. package/lib/alphafold-transparency.js +58 -125
  6. package/lib/contact.d.ts +15 -6
  7. package/lib/contact.js +71 -66
  8. package/lib/custom-events.js +16 -16
  9. package/lib/domain-annotations/behavior.js +20 -24
  10. package/lib/domain-annotations/color.d.ts +1 -1
  11. package/lib/domain-annotations/color.js +23 -22
  12. package/lib/domain-annotations/prop.d.ts +3 -3
  13. package/lib/domain-annotations/prop.js +54 -76
  14. package/lib/drugflow-molstar-component-build-0.3.78.js +2 -0
  15. package/lib/drugflow-molstar-component-build-0.4.1.js +2 -0
  16. package/lib/helpers.d.ts +4 -4
  17. package/lib/helpers.js +94 -99
  18. package/lib/index.js +1785 -2608
  19. package/lib/labels.d.ts +1 -1
  20. package/lib/labels.js +20 -23
  21. package/lib/loci-details.d.ts +2 -2
  22. package/lib/loci-details.js +26 -29
  23. package/lib/sifts-mapping.js +30 -34
  24. package/lib/sifts-mappings-behaviour.js +26 -30
  25. package/lib/spec.d.ts +1 -1
  26. package/lib/spec.js +50 -38
  27. package/lib/structure_contact3d.d.ts +13 -4
  28. package/lib/structure_contact3d.js +25 -46
  29. package/lib/subscribe-events.js +17 -17
  30. package/lib/superposition-export.js +100 -144
  31. package/lib/superposition-focus-representation.d.ts +1 -1
  32. package/lib/superposition-focus-representation.js +74 -112
  33. package/lib/superposition-sifts-mapping.d.ts +1 -1
  34. package/lib/superposition-sifts-mapping.js +56 -62
  35. package/lib/superposition.d.ts +2 -2
  36. package/lib/superposition.js +490 -726
  37. package/lib/ui/alphafold-superposition.d.ts +8 -9
  38. package/lib/ui/alphafold-superposition.js +96 -120
  39. package/lib/ui/alphafold-tranparency.d.ts +1 -2
  40. package/lib/ui/alphafold-tranparency.js +27 -43
  41. package/lib/ui/annotation-controls.d.ts +2 -3
  42. package/lib/ui/annotation-controls.js +81 -87
  43. package/lib/ui/export-superposition.js +33 -51
  44. package/lib/ui/pdbe-left-panel.d.ts +3 -3
  45. package/lib/ui/pdbe-left-panel.js +82 -106
  46. package/lib/ui/pdbe-screenshot-controls.d.ts +1 -1
  47. package/lib/ui/pdbe-screenshot-controls.js +54 -83
  48. package/lib/ui/pdbe-structure-controls.d.ts +4 -5
  49. package/lib/ui/pdbe-structure-controls.js +34 -57
  50. package/lib/ui/pdbe-viewport-controls.d.ts +1 -2
  51. package/lib/ui/pdbe-viewport-controls.js +23 -29
  52. package/lib/ui/segment-tree.d.ts +1 -2
  53. package/lib/ui/segment-tree.js +438 -590
  54. package/lib/ui/superposition-components.d.ts +1 -2
  55. package/lib/ui/superposition-components.js +196 -266
  56. package/lib/ui/superposition-viewport.d.ts +1 -2
  57. package/lib/ui/superposition-viewport.js +11 -18
  58. package/package.json +7 -4
  59. package/build/drugflow-molstar-0.3.62.css +0 -1
  60. package/build/drugflow-molstar-0.3.77.css +0 -1
  61. package/build/drugflow-molstar-component-0.3.62.js +0 -25
  62. package/build/drugflow-molstar-component-0.3.77.js +0 -25
  63. package/build/drugflow-molstar-light.css +0 -1
  64. package/build/drugflow-molstar-plugin-0.3.62.js +0 -2
  65. package/build/drugflow-molstar-plugin-0.3.62.js.LICENSE.txt +0 -39
  66. package/build/drugflow-molstar-plugin-0.3.77.js +0 -2
  67. package/build/drugflow-molstar-plugin-0.3.77.js.LICENSE.txt +0 -39
  68. package/lib/drugflow-molstar-component-build-0.1.2.js +0 -4268
  69. package/lib/drugflow-molstar-component-build-0.1.2.js.map +0 -1
  70. package/lib/drugflow-molstar-component-build-0.1.3.js +0 -2
  71. package/lib/drugflow-molstar-component-build-0.1.4.js +0 -2
  72. package/lib/drugflow-molstar-component-build-0.1.4.js.LICENSE.txt +0 -24
  73. package/lib/drugflow-molstar-component-build-0.1.5.js +0 -2
  74. package/lib/drugflow-molstar-component-build-0.1.5.js.LICENSE.txt +0 -24
  75. package/lib/drugflow-molstar-component-build-0.1.6.js +0 -2
  76. package/lib/drugflow-molstar-component-build-0.1.6.js.LICENSE.txt +0 -24
  77. package/lib/drugflow-molstar-component-build-0.2.10.js +0 -2
  78. package/lib/drugflow-molstar-component-build-0.2.10.js.LICENSE.txt +0 -24
  79. package/lib/drugflow-molstar-component-build-0.2.2.js +0 -2
  80. package/lib/drugflow-molstar-component-build-0.2.2.js.LICENSE.txt +0 -24
  81. package/lib/drugflow-molstar-component-build-0.2.3.js +0 -2
  82. package/lib/drugflow-molstar-component-build-0.2.3.js.LICENSE.txt +0 -24
  83. package/lib/drugflow-molstar-component-build-0.2.4.js +0 -2
  84. package/lib/drugflow-molstar-component-build-0.2.4.js.LICENSE.txt +0 -24
  85. package/lib/drugflow-molstar-component-build-0.2.5.js +0 -2
  86. package/lib/drugflow-molstar-component-build-0.2.5.js.LICENSE.txt +0 -24
  87. package/lib/drugflow-molstar-component-build-0.2.6.js +0 -2
  88. package/lib/drugflow-molstar-component-build-0.2.6.js.LICENSE.txt +0 -24
  89. package/lib/drugflow-molstar-component-build-0.2.7.js +0 -2
  90. package/lib/drugflow-molstar-component-build-0.2.7.js.LICENSE.txt +0 -24
  91. package/lib/drugflow-molstar-component-build-0.2.9.js +0 -2
  92. package/lib/drugflow-molstar-component-build-0.2.9.js.LICENSE.txt +0 -24
  93. package/lib/drugflow-molstar-component-build-0.3.1.js +0 -2
  94. package/lib/drugflow-molstar-component-build-0.3.1.js.LICENSE.txt +0 -24
  95. package/lib/drugflow-molstar-component-build-0.3.10.js +0 -2
  96. package/lib/drugflow-molstar-component-build-0.3.10.js.LICENSE.txt +0 -24
  97. package/lib/drugflow-molstar-component-build-0.3.11.js +0 -2
  98. package/lib/drugflow-molstar-component-build-0.3.11.js.LICENSE.txt +0 -24
  99. package/lib/drugflow-molstar-component-build-0.3.12.js +0 -2
  100. package/lib/drugflow-molstar-component-build-0.3.12.js.LICENSE.txt +0 -24
  101. package/lib/drugflow-molstar-component-build-0.3.13.js +0 -2
  102. package/lib/drugflow-molstar-component-build-0.3.13.js.LICENSE.txt +0 -24
  103. package/lib/drugflow-molstar-component-build-0.3.14.js +0 -2
  104. package/lib/drugflow-molstar-component-build-0.3.14.js.LICENSE.txt +0 -24
  105. package/lib/drugflow-molstar-component-build-0.3.15.js +0 -2
  106. package/lib/drugflow-molstar-component-build-0.3.15.js.LICENSE.txt +0 -24
  107. package/lib/drugflow-molstar-component-build-0.3.16.js +0 -2
  108. package/lib/drugflow-molstar-component-build-0.3.16.js.LICENSE.txt +0 -24
  109. package/lib/drugflow-molstar-component-build-0.3.17.js +0 -2
  110. package/lib/drugflow-molstar-component-build-0.3.17.js.LICENSE.txt +0 -24
  111. package/lib/drugflow-molstar-component-build-0.3.18.js +0 -2
  112. package/lib/drugflow-molstar-component-build-0.3.18.js.LICENSE.txt +0 -24
  113. package/lib/drugflow-molstar-component-build-0.3.19.js +0 -2
  114. package/lib/drugflow-molstar-component-build-0.3.19.js.LICENSE.txt +0 -24
  115. package/lib/drugflow-molstar-component-build-0.3.2.js +0 -2
  116. package/lib/drugflow-molstar-component-build-0.3.2.js.LICENSE.txt +0 -24
  117. package/lib/drugflow-molstar-component-build-0.3.20.js +0 -2
  118. package/lib/drugflow-molstar-component-build-0.3.20.js.LICENSE.txt +0 -24
  119. package/lib/drugflow-molstar-component-build-0.3.21.js +0 -2
  120. package/lib/drugflow-molstar-component-build-0.3.21.js.LICENSE.txt +0 -24
  121. package/lib/drugflow-molstar-component-build-0.3.22.js +0 -2
  122. package/lib/drugflow-molstar-component-build-0.3.22.js.LICENSE.txt +0 -24
  123. package/lib/drugflow-molstar-component-build-0.3.23.js +0 -2
  124. package/lib/drugflow-molstar-component-build-0.3.23.js.LICENSE.txt +0 -24
  125. package/lib/drugflow-molstar-component-build-0.3.24.js +0 -2
  126. package/lib/drugflow-molstar-component-build-0.3.24.js.LICENSE.txt +0 -24
  127. package/lib/drugflow-molstar-component-build-0.3.25.js +0 -2
  128. package/lib/drugflow-molstar-component-build-0.3.25.js.LICENSE.txt +0 -24
  129. package/lib/drugflow-molstar-component-build-0.3.26.js +0 -2
  130. package/lib/drugflow-molstar-component-build-0.3.26.js.LICENSE.txt +0 -24
  131. package/lib/drugflow-molstar-component-build-0.3.27.js +0 -2
  132. package/lib/drugflow-molstar-component-build-0.3.27.js.LICENSE.txt +0 -24
  133. package/lib/drugflow-molstar-component-build-0.3.28.js +0 -2
  134. package/lib/drugflow-molstar-component-build-0.3.28.js.LICENSE.txt +0 -24
  135. package/lib/drugflow-molstar-component-build-0.3.29.js +0 -2
  136. package/lib/drugflow-molstar-component-build-0.3.29.js.LICENSE.txt +0 -24
  137. package/lib/drugflow-molstar-component-build-0.3.3.js +0 -2
  138. package/lib/drugflow-molstar-component-build-0.3.3.js.LICENSE.txt +0 -24
  139. package/lib/drugflow-molstar-component-build-0.3.30.js +0 -2
  140. package/lib/drugflow-molstar-component-build-0.3.30.js.LICENSE.txt +0 -24
  141. package/lib/drugflow-molstar-component-build-0.3.31.js +0 -2
  142. package/lib/drugflow-molstar-component-build-0.3.31.js.LICENSE.txt +0 -24
  143. package/lib/drugflow-molstar-component-build-0.3.32.js +0 -2
  144. package/lib/drugflow-molstar-component-build-0.3.32.js.LICENSE.txt +0 -24
  145. package/lib/drugflow-molstar-component-build-0.3.33.js +0 -2
  146. package/lib/drugflow-molstar-component-build-0.3.33.js.LICENSE.txt +0 -24
  147. package/lib/drugflow-molstar-component-build-0.3.34.js +0 -2
  148. package/lib/drugflow-molstar-component-build-0.3.34.js.LICENSE.txt +0 -24
  149. package/lib/drugflow-molstar-component-build-0.3.35.js +0 -2
  150. package/lib/drugflow-molstar-component-build-0.3.35.js.LICENSE.txt +0 -24
  151. package/lib/drugflow-molstar-component-build-0.3.36.js +0 -2
  152. package/lib/drugflow-molstar-component-build-0.3.36.js.LICENSE.txt +0 -24
  153. package/lib/drugflow-molstar-component-build-0.3.37.js +0 -2
  154. package/lib/drugflow-molstar-component-build-0.3.37.js.LICENSE.txt +0 -24
  155. package/lib/drugflow-molstar-component-build-0.3.38.js +0 -2
  156. package/lib/drugflow-molstar-component-build-0.3.38.js.LICENSE.txt +0 -24
  157. package/lib/drugflow-molstar-component-build-0.3.39.js +0 -2
  158. package/lib/drugflow-molstar-component-build-0.3.39.js.LICENSE.txt +0 -24
  159. package/lib/drugflow-molstar-component-build-0.3.4.js +0 -2
  160. package/lib/drugflow-molstar-component-build-0.3.4.js.LICENSE.txt +0 -24
  161. package/lib/drugflow-molstar-component-build-0.3.40.js +0 -2
  162. package/lib/drugflow-molstar-component-build-0.3.40.js.LICENSE.txt +0 -24
  163. package/lib/drugflow-molstar-component-build-0.3.41.js +0 -2
  164. package/lib/drugflow-molstar-component-build-0.3.41.js.LICENSE.txt +0 -24
  165. package/lib/drugflow-molstar-component-build-0.3.42.js +0 -2
  166. package/lib/drugflow-molstar-component-build-0.3.42.js.LICENSE.txt +0 -24
  167. package/lib/drugflow-molstar-component-build-0.3.43.js +0 -2
  168. package/lib/drugflow-molstar-component-build-0.3.43.js.LICENSE.txt +0 -24
  169. package/lib/drugflow-molstar-component-build-0.3.44.js +0 -2
  170. package/lib/drugflow-molstar-component-build-0.3.44.js.LICENSE.txt +0 -24
  171. package/lib/drugflow-molstar-component-build-0.3.46.js +0 -2
  172. package/lib/drugflow-molstar-component-build-0.3.46.js.LICENSE.txt +0 -24
  173. package/lib/drugflow-molstar-component-build-0.3.47.js +0 -2
  174. package/lib/drugflow-molstar-component-build-0.3.47.js.LICENSE.txt +0 -24
  175. package/lib/drugflow-molstar-component-build-0.3.48.js +0 -2
  176. package/lib/drugflow-molstar-component-build-0.3.48.js.LICENSE.txt +0 -24
  177. package/lib/drugflow-molstar-component-build-0.3.49.js +0 -2
  178. package/lib/drugflow-molstar-component-build-0.3.49.js.LICENSE.txt +0 -24
  179. package/lib/drugflow-molstar-component-build-0.3.5.js +0 -2
  180. package/lib/drugflow-molstar-component-build-0.3.5.js.LICENSE.txt +0 -24
  181. package/lib/drugflow-molstar-component-build-0.3.50.js +0 -2
  182. package/lib/drugflow-molstar-component-build-0.3.50.js.LICENSE.txt +0 -24
  183. package/lib/drugflow-molstar-component-build-0.3.51.js +0 -2
  184. package/lib/drugflow-molstar-component-build-0.3.51.js.LICENSE.txt +0 -24
  185. package/lib/drugflow-molstar-component-build-0.3.52.js +0 -2
  186. package/lib/drugflow-molstar-component-build-0.3.52.js.LICENSE.txt +0 -24
  187. package/lib/drugflow-molstar-component-build-0.3.53.js +0 -2
  188. package/lib/drugflow-molstar-component-build-0.3.53.js.LICENSE.txt +0 -24
  189. package/lib/drugflow-molstar-component-build-0.3.54.js +0 -2
  190. package/lib/drugflow-molstar-component-build-0.3.54.js.LICENSE.txt +0 -24
  191. package/lib/drugflow-molstar-component-build-0.3.55.js +0 -2
  192. package/lib/drugflow-molstar-component-build-0.3.55.js.LICENSE.txt +0 -24
  193. package/lib/drugflow-molstar-component-build-0.3.56.js +0 -2
  194. package/lib/drugflow-molstar-component-build-0.3.56.js.LICENSE.txt +0 -24
  195. package/lib/drugflow-molstar-component-build-0.3.57.js +0 -2
  196. package/lib/drugflow-molstar-component-build-0.3.57.js.LICENSE.txt +0 -24
  197. package/lib/drugflow-molstar-component-build-0.3.58.js +0 -2
  198. package/lib/drugflow-molstar-component-build-0.3.58.js.LICENSE.txt +0 -24
  199. package/lib/drugflow-molstar-component-build-0.3.59.js +0 -2
  200. package/lib/drugflow-molstar-component-build-0.3.59.js.LICENSE.txt +0 -24
  201. package/lib/drugflow-molstar-component-build-0.3.6.js +0 -2
  202. package/lib/drugflow-molstar-component-build-0.3.6.js.LICENSE.txt +0 -24
  203. package/lib/drugflow-molstar-component-build-0.3.60.js +0 -2
  204. package/lib/drugflow-molstar-component-build-0.3.60.js.LICENSE.txt +0 -24
  205. package/lib/drugflow-molstar-component-build-0.3.61.js +0 -2
  206. package/lib/drugflow-molstar-component-build-0.3.61.js.LICENSE.txt +0 -24
  207. package/lib/drugflow-molstar-component-build-0.3.62.js +0 -2
  208. package/lib/drugflow-molstar-component-build-0.3.62.js.LICENSE.txt +0 -24
  209. package/lib/drugflow-molstar-component-build-0.3.63.js +0 -2
  210. package/lib/drugflow-molstar-component-build-0.3.63.js.LICENSE.txt +0 -24
  211. package/lib/drugflow-molstar-component-build-0.3.64.js +0 -2
  212. package/lib/drugflow-molstar-component-build-0.3.64.js.LICENSE.txt +0 -24
  213. package/lib/drugflow-molstar-component-build-0.3.65.js +0 -2
  214. package/lib/drugflow-molstar-component-build-0.3.65.js.LICENSE.txt +0 -24
  215. package/lib/drugflow-molstar-component-build-0.3.66.js +0 -2
  216. package/lib/drugflow-molstar-component-build-0.3.66.js.LICENSE.txt +0 -24
  217. package/lib/drugflow-molstar-component-build-0.3.67.js +0 -2
  218. package/lib/drugflow-molstar-component-build-0.3.67.js.LICENSE.txt +0 -24
  219. package/lib/drugflow-molstar-component-build-0.3.68.js +0 -2
  220. package/lib/drugflow-molstar-component-build-0.3.68.js.LICENSE.txt +0 -24
  221. package/lib/drugflow-molstar-component-build-0.3.69.js +0 -2
  222. package/lib/drugflow-molstar-component-build-0.3.69.js.LICENSE.txt +0 -24
  223. package/lib/drugflow-molstar-component-build-0.3.7.js +0 -2
  224. package/lib/drugflow-molstar-component-build-0.3.7.js.LICENSE.txt +0 -24
  225. package/lib/drugflow-molstar-component-build-0.3.70.js +0 -2
  226. package/lib/drugflow-molstar-component-build-0.3.70.js.LICENSE.txt +0 -24
  227. package/lib/drugflow-molstar-component-build-0.3.71.js +0 -2
  228. package/lib/drugflow-molstar-component-build-0.3.71.js.LICENSE.txt +0 -24
  229. package/lib/drugflow-molstar-component-build-0.3.72.js +0 -2
  230. package/lib/drugflow-molstar-component-build-0.3.72.js.LICENSE.txt +0 -24
  231. package/lib/drugflow-molstar-component-build-0.3.73.js +0 -2
  232. package/lib/drugflow-molstar-component-build-0.3.73.js.LICENSE.txt +0 -24
  233. package/lib/drugflow-molstar-component-build-0.3.74.js +0 -2
  234. package/lib/drugflow-molstar-component-build-0.3.74.js.LICENSE.txt +0 -24
  235. package/lib/drugflow-molstar-component-build-0.3.75.js +0 -2
  236. package/lib/drugflow-molstar-component-build-0.3.75.js.LICENSE.txt +0 -24
  237. package/lib/drugflow-molstar-component-build-0.3.76.js +0 -2
  238. package/lib/drugflow-molstar-component-build-0.3.76.js.LICENSE.txt +0 -24
  239. package/lib/drugflow-molstar-component-build-0.3.77.js +0 -2
  240. package/lib/drugflow-molstar-component-build-0.3.77.js.LICENSE.txt +0 -24
  241. package/lib/drugflow-molstar-component-build-0.3.8.js +0 -2
  242. package/lib/drugflow-molstar-component-build-0.3.8.js.LICENSE.txt +0 -24
  243. package/lib/drugflow-molstar-component-build-0.3.9.js +0 -2
  244. package/lib/drugflow-molstar-component-build-0.3.9.js.LICENSE.txt +0 -24
  245. package/lib/index2.d.ts +0 -1
  246. package/lib/index2.js +0 -1369
  247. package/lib/pdbe-molstar-component-build-3.1.2.js +0 -2
  248. package/lib/pdbe-molstar-component-build-3.1.2.js.LICENSE.txt +0 -24
  249. /package/lib/{drugflow-molstar-component-build-0.1.2.js.LICENSE.txt → drugflow-molstar-component-build-0.3.78.js.LICENSE.txt} +0 -0
  250. /package/lib/{drugflow-molstar-component-build-0.1.3.js.LICENSE.txt → drugflow-molstar-component-build-0.4.1.js.LICENSE.txt} +0 -0
package/lib/labels.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import { PluginBehavior } from 'Molstar/mol-plugin/behavior';
2
- export declare const PDBeLociLabelProvider: import("molstar/lib/mol-state/transformer").StateTransformer<PluginBehavior.Category, PluginBehavior.Behavior, unknown>;
2
+ export declare const PDBeLociLabelProvider: import("molstar/lib/mol-state/transformer").StateTransformer<PluginBehavior.Category, PluginBehavior.Behavior, {}>;
package/lib/labels.js CHANGED
@@ -1,42 +1,39 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PDBeLociLabelProvider = void 0;
4
- var behavior_1 = require("Molstar/mol-plugin/behavior");
5
- var structure_1 = require("Molstar/mol-model/structure");
6
- var label_1 = require("Molstar/mol-theme/label");
4
+ const behavior_1 = require("Molstar/mol-plugin/behavior");
5
+ const structure_1 = require("Molstar/mol-model/structure");
6
+ const label_1 = require("Molstar/mol-theme/label");
7
7
  exports.PDBeLociLabelProvider = behavior_1.PluginBehavior.create({
8
8
  name: 'pdbe-loci-label-provider',
9
9
  category: 'interaction',
10
- ctor: /** @class */ (function () {
11
- function class_1(ctx) {
12
- var _this = this;
10
+ ctor: class {
11
+ register() { this.ctx.managers.lociLabels.addProvider(this.f); }
12
+ unregister() { this.ctx.managers.lociLabels.removeProvider(this.f); }
13
+ constructor(ctx) {
13
14
  this.ctx = ctx;
14
15
  this.f = {
15
- label: function (loci) {
16
- var customState = (_this.ctx.customState);
17
- var superpositionView = (customState && customState.initParams.superposition) ? true : false;
18
- var label = [];
16
+ label: (loci) => {
17
+ const customState = (this.ctx.customState);
18
+ const superpositionView = (customState && customState.initParams.superposition) ? true : false;
19
+ const label = [];
19
20
  if (!superpositionView && structure_1.StructureElement.Loci.is(loci) && loci.elements.length === 1) {
20
- var entityNames = new Set();
21
- for (var _i = 0, _a = loci.elements; _i < _a.length; _i++) {
22
- var u = _a[_i].unit;
23
- var l = structure_1.StructureElement.Location.create(loci.structure, u, u.elements[0]);
24
- var name_1 = structure_1.StructureProperties.entity.pdbx_description(l).join(', ');
25
- entityNames.add(name_1);
21
+ const entityNames = new Set();
22
+ for (const { unit: u } of loci.elements) {
23
+ const l = structure_1.StructureElement.Location.create(loci.structure, u, u.elements[0]);
24
+ const name = structure_1.StructureProperties.entity.pdbx_description(l).join(', ');
25
+ entityNames.add(name);
26
26
  }
27
27
  if (entityNames.size === 1)
28
- entityNames.forEach(function (name) { return label.push(name); });
28
+ entityNames.forEach(name => label.push(name));
29
29
  }
30
30
  label.push((0, label_1.lociLabel)(loci));
31
- return label.filter(function (l) { return !!l; }).join('</br>');
31
+ return label.filter(l => !!l).join('</br>');
32
32
  },
33
- group: function (label) { return label.toString().replace(/Model [0-9]+/g, 'Models'); },
33
+ group: (label) => label.toString().replace(/Model [0-9]+/g, 'Models'),
34
34
  priority: 100
35
35
  };
36
36
  }
37
- class_1.prototype.register = function () { this.ctx.managers.lociLabels.addProvider(this.f); };
38
- class_1.prototype.unregister = function () { this.ctx.managers.lociLabels.removeProvider(this.f); };
39
- return class_1;
40
- }()),
37
+ },
41
38
  display: { name: 'Provide PDBe Loci Label' }
42
39
  });
@@ -1,6 +1,6 @@
1
1
  import { Bond } from 'Molstar/mol-model/structure';
2
2
  import { Loci } from 'Molstar/mol-model/loci';
3
- export declare type EventDetail = {
3
+ export type EventDetail = {
4
4
  models?: string[];
5
5
  entity_id?: string;
6
6
  label_asym_id?: string;
@@ -20,7 +20,7 @@ export declare type EventDetail = {
20
20
  button?: number;
21
21
  modifiers?: any;
22
22
  };
23
- declare type LabelGranularity = 'element' | 'conformation' | 'residue' | 'chain' | 'structure';
23
+ type LabelGranularity = 'element' | 'conformation' | 'residue' | 'chain' | 'structure';
24
24
  export declare function lociDetails(loci: Loci): EventDetail | undefined;
25
25
  export declare function bondLabel(bond: Bond.Location, granularity: LabelGranularity): any;
26
26
  export declare function _bundleLabel(bundle: Loci.Bundle<any>, granularity: LabelGranularity): EventDetail | (EventDetail | undefined)[];
@@ -1,18 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports._bundleLabel = exports.bondLabel = exports.lociDetails = void 0;
4
- var tslib_1 = require("tslib");
5
- var structure_1 = require("Molstar/mol-model/structure");
6
- var int_1 = require("Molstar/mol-data/int");
7
- var sifts_mapping_1 = require("Molstar/mol-model-props/sequence/sifts-mapping");
4
+ const structure_1 = require("Molstar/mol-model/structure");
5
+ const int_1 = require("Molstar/mol-data/int");
6
+ const sifts_mapping_1 = require("Molstar/mol-model-props/sequence/sifts-mapping");
8
7
  function lociDetails(loci) {
9
8
  switch (loci.kind) {
10
9
  case 'structure-loci':
11
- return { models: loci.structure.models.map(function (m) { return m.entry; }).filter(function (l) { return !!l; }) };
10
+ return { models: loci.structure.models.map(m => m.entry).filter(l => !!l) };
12
11
  case 'element-loci':
13
12
  return structureElementStatsDetail(structure_1.StructureElement.Stats.ofLoci(loci));
14
13
  case 'bond-loci':
15
- var bond = loci.bonds[0];
14
+ const bond = loci.bonds[0];
16
15
  return bond ? bondLabel(bond, 'element') : '';
17
16
  default:
18
17
  return void 0;
@@ -20,7 +19,7 @@ function lociDetails(loci) {
20
19
  }
21
20
  exports.lociDetails = lociDetails;
22
21
  function structureElementStatsDetail(stats) {
23
- var chainCount = stats.chainCount, residueCount = stats.residueCount, elementCount = stats.elementCount;
22
+ const { chainCount, residueCount, elementCount } = stats;
24
23
  if (elementCount === 1 && residueCount === 0 && chainCount === 0) {
25
24
  return getElementDetails(stats.firstElementLoc, 'element');
26
25
  }
@@ -31,10 +30,9 @@ function structureElementStatsDetail(stats) {
31
30
  return void 0;
32
31
  }
33
32
  }
34
- function getElementDetails(location, granularity) {
35
- if (granularity === void 0) { granularity = 'element'; }
36
- var basicDetails = {};
37
- var entry = location.unit.model.entry;
33
+ function getElementDetails(location, granularity = 'element') {
34
+ const basicDetails = {};
35
+ let entry = location.unit.model.entry;
38
36
  if (entry.length > 30)
39
37
  entry = entry.substr(0, 27) + '\u2026'; // ellipsis
40
38
  basicDetails['entry_id'] = entry; // entry
@@ -42,17 +40,17 @@ function getElementDetails(location, granularity) {
42
40
  basicDetails['model'] = location.unit.model.modelNum; // model
43
41
  basicDetails['instance'] = location.unit.conformation.operator.name; // instance
44
42
  }
45
- var elementDetails;
43
+ let elementDetails;
46
44
  if (structure_1.Unit.isAtomic(location.unit)) {
47
45
  elementDetails = atomicElementDetails(location, granularity);
48
46
  }
49
47
  else if (structure_1.Unit.isCoarse(location.unit)) {
50
48
  elementDetails = coarseElementDetails(location, granularity);
51
49
  }
52
- return tslib_1.__assign(tslib_1.__assign({}, basicDetails), elementDetails);
50
+ return { ...basicDetails, ...elementDetails };
53
51
  }
54
52
  function atomicElementDetails(location, granularity) {
55
- var elementDetails = {
53
+ const elementDetails = {
56
54
  entity_id: structure_1.StructureProperties.chain.label_entity_id(location),
57
55
  label_asym_id: structure_1.StructureProperties.chain.label_asym_id(location),
58
56
  auth_asym_id: structure_1.StructureProperties.chain.auth_asym_id(location),
@@ -65,29 +63,29 @@ function atomicElementDetails(location, granularity) {
65
63
  atom_id: [structure_1.StructureProperties.atom.label_atom_id(location)],
66
64
  alt_id: structure_1.StructureProperties.atom.label_alt_id(location)
67
65
  };
68
- var unpLabel = sifts_mapping_1.SIFTSMapping.getLabel(location);
66
+ const unpLabel = sifts_mapping_1.SIFTSMapping.getLabel(location);
69
67
  if (unpLabel) {
70
- var unpLabelDetails = unpLabel.split(' ');
68
+ const unpLabelDetails = unpLabel.split(' ');
71
69
  if (unpLabelDetails[0] === 'UNP') {
72
70
  elementDetails.unp_accession = unpLabelDetails[1];
73
71
  elementDetails.unp_seq_id = +unpLabelDetails[2];
74
72
  }
75
73
  }
76
- var microHetCompIds = structure_1.StructureProperties.residue.microheterogeneityCompIds(location);
74
+ const microHetCompIds = structure_1.StructureProperties.residue.microheterogeneityCompIds(location);
77
75
  elementDetails['micro_het_comp_ids'] = granularity === 'residue' && microHetCompIds.length > 1 ?
78
76
  microHetCompIds : [elementDetails['comp_id']];
79
77
  return elementDetails;
80
78
  }
81
79
  function coarseElementDetails(location, granularity) {
82
- var elementDetails = {
80
+ const elementDetails = {
83
81
  asym_id: structure_1.StructureProperties.coarse.asym_id(location),
84
82
  seq_id_begin: structure_1.StructureProperties.coarse.seq_id_begin(location),
85
83
  seq_id_end: structure_1.StructureProperties.coarse.seq_id_end(location)
86
84
  };
87
85
  if (granularity === 'residue') {
88
86
  if (elementDetails.seq_id_begin === elementDetails.seq_id_end) {
89
- var entityIndex = structure_1.StructureProperties.coarse.entityKey(location);
90
- var seq = location.unit.model.sequence.byEntityKey[entityIndex];
87
+ const entityIndex = structure_1.StructureProperties.coarse.entityKey(location);
88
+ const seq = location.unit.model.sequence.byEntityKey[entityIndex];
91
89
  elementDetails['comp_id'] = seq.sequence.compId.value(elementDetails.seq_id_begin - 1); // 1-indexed
92
90
  }
93
91
  }
@@ -101,27 +99,26 @@ function bondLabel(bond, granularity) {
101
99
  }
102
100
  exports.bondLabel = bondLabel;
103
101
  function _bundleLabel(bundle, granularity) {
104
- var isSingleElements = true;
105
- for (var _i = 0, _a = bundle.loci; _i < _a.length; _i++) {
106
- var l = _a[_i];
102
+ let isSingleElements = true;
103
+ for (const l of bundle.loci) {
107
104
  if (!structure_1.StructureElement.Loci.is(l) || structure_1.StructureElement.Loci.size(l) !== 1) {
108
105
  isSingleElements = false;
109
106
  break;
110
107
  }
111
108
  }
112
109
  if (isSingleElements) {
113
- var locations = bundle.loci.map(function (l) {
114
- var _a = l.elements[0], unit = _a.unit, indices = _a.indices;
110
+ const locations = bundle.loci.map(l => {
111
+ const { unit, indices } = l.elements[0];
115
112
  return structure_1.StructureElement.Location.create(l.structure, unit, unit.elements[int_1.OrderedSet.start(indices)]);
116
113
  });
117
- var elementDetailsArr = locations.map(function (l) { return getElementDetails(l, granularity); });
118
- var atomIds = [elementDetailsArr[0].atom_id[0], elementDetailsArr[1].atom_id[0]];
119
- var elementDetails = elementDetailsArr[0];
114
+ const elementDetailsArr = locations.map(l => getElementDetails(l, granularity));
115
+ const atomIds = [elementDetailsArr[0].atom_id[0], elementDetailsArr[1].atom_id[0]];
116
+ const elementDetails = elementDetailsArr[0];
120
117
  elementDetails['atom_id'] = atomIds;
121
118
  return elementDetails;
122
119
  }
123
120
  else {
124
- var elementDetails = bundle.loci.map(function (l) { return lociDetails(l); });
121
+ const elementDetails = bundle.loci.map(l => lociDetails(l));
125
122
  return elementDetails;
126
123
  }
127
124
  }
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SIFTSMapping = void 0;
4
- var tslib_1 = require("tslib");
5
- var mmcif_1 = require("Molstar/mol-model-formats/structure/mmcif");
6
- var custom_property_1 = require("Molstar/mol-model/custom-property");
7
- var custom_model_property_1 = require("Molstar/mol-model-props/common/custom-model-property");
4
+ const db_1 = require("Molstar/mol-data/db");
5
+ const mmcif_1 = require("Molstar/mol-model-formats/structure/mmcif");
6
+ const custom_property_1 = require("Molstar/mol-model/custom-property");
7
+ const custom_model_property_1 = require("Molstar/mol-model-props/common/custom-model-property");
8
8
  var SIFTSMapping;
9
9
  (function (SIFTSMapping) {
10
- var _this = this;
11
10
  SIFTSMapping.Provider = custom_model_property_1.CustomModelProperty.createProvider({
12
11
  label: 'SIFTS Mapping',
13
12
  descriptor: (0, custom_property_1.CustomPropertyDescriptor)({
@@ -15,57 +14,55 @@ var SIFTSMapping;
15
14
  }),
16
15
  type: 'static',
17
16
  defaultParams: {},
18
- getParams: function () { return ({}); },
19
- isApplicable: function (data) { return isAvailable(data); },
20
- obtain: function (ctx, data) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
21
- return tslib_1.__generator(this, function (_a) {
22
- return [2 /*return*/, { value: fromCif(data) }];
23
- });
24
- }); }
17
+ getParams: () => ({}),
18
+ isApplicable: (data) => isAvailable(data),
19
+ obtain: async (ctx, data) => {
20
+ return { value: fromCif(data) };
21
+ }
25
22
  });
26
23
  function isAvailable(model) {
27
24
  if (!mmcif_1.MmcifFormat.is(model.sourceData))
28
25
  return false;
29
- var _a = model.sourceData.data.db.atom_site, db_name = _a.pdbx_sifts_xref_db_name, db_acc = _a.pdbx_sifts_xref_db_acc, db_num = _a.pdbx_sifts_xref_db_num, db_res = _a.pdbx_sifts_xref_db_res;
26
+ const { pdbx_sifts_xref_db_name: db_name, pdbx_sifts_xref_db_acc: db_acc, pdbx_sifts_xref_db_num: db_num, pdbx_sifts_xref_db_res: db_res } = model.sourceData.data.db.atom_site;
30
27
  return db_name.isDefined && db_acc.isDefined && db_num.isDefined && db_res.isDefined;
31
28
  }
32
29
  SIFTSMapping.isAvailable = isAvailable;
33
30
  function getKey(loc) {
34
- var model = loc.unit.model;
35
- var data = SIFTSMapping.Provider.get(model).value;
31
+ const model = loc.unit.model;
32
+ const data = SIFTSMapping.Provider.get(model).value;
36
33
  if (!data)
37
34
  return '';
38
- var rI = model.atomicHierarchy.residueAtomSegments.index[loc.element];
35
+ const rI = model.atomicHierarchy.residueAtomSegments.index[loc.element];
39
36
  return data.accession[rI];
40
37
  }
41
38
  SIFTSMapping.getKey = getKey;
42
39
  function getLabel(loc) {
43
- var model = loc.unit.model;
44
- var data = SIFTSMapping.Provider.get(model).value;
40
+ const model = loc.unit.model;
41
+ const data = SIFTSMapping.Provider.get(model).value;
45
42
  if (!data)
46
43
  return;
47
- var rI = model.atomicHierarchy.residueAtomSegments.index[loc.element];
48
- var dbName = data.dbName[rI];
44
+ const rI = model.atomicHierarchy.residueAtomSegments.index[loc.element];
45
+ const dbName = data.dbName[rI];
49
46
  if (!dbName)
50
47
  return;
51
- return "".concat(dbName, " ").concat(data.accession[rI], " ").concat(data.num[rI], " ").concat(data.residue[rI]);
48
+ return `${dbName} ${data.accession[rI]} ${data.num[rI]} ${data.residue[rI]}`;
52
49
  }
53
50
  SIFTSMapping.getLabel = getLabel;
54
51
  function fromCif(model) {
55
52
  if (!mmcif_1.MmcifFormat.is(model.sourceData))
56
53
  return;
57
- var _a = model.sourceData.data.db.atom_site, db_name = _a.pdbx_sifts_xref_db_name, db_acc = _a.pdbx_sifts_xref_db_acc, db_num = _a.pdbx_sifts_xref_db_num, db_res = _a.pdbx_sifts_xref_db_res;
54
+ const { pdbx_sifts_xref_db_name: db_name, pdbx_sifts_xref_db_acc: db_acc, pdbx_sifts_xref_db_num: db_num, pdbx_sifts_xref_db_res: db_res } = model.sourceData.data.db.atom_site;
58
55
  if (!db_name.isDefined || !db_acc.isDefined || !db_num.isDefined || !db_res.isDefined)
59
56
  return;
60
- var atomSourceIndex = model.atomicHierarchy.atomSourceIndex;
61
- var _b = model.atomicHierarchy.residueAtomSegments, count = _b.count, residueOffsets = _b.offsets;
62
- var dbName = new Array(count);
63
- var accession = new Array(count);
64
- var num = new Array(count);
65
- var residue = new Array(count);
66
- for (var i = 0; i < count; i++) {
67
- var row = atomSourceIndex.value(residueOffsets[i]);
68
- if (db_name.valueKind(row) !== 0 /* Present */) {
57
+ const { atomSourceIndex } = model.atomicHierarchy;
58
+ const { count, offsets: residueOffsets } = model.atomicHierarchy.residueAtomSegments;
59
+ const dbName = new Array(count);
60
+ const accession = new Array(count);
61
+ const num = new Array(count);
62
+ const residue = new Array(count);
63
+ for (let i = 0; i < count; i++) {
64
+ const row = atomSourceIndex.value(residueOffsets[i]);
65
+ if (db_name.valueKind(row) !== db_1.Column.ValueKind.Present) {
69
66
  dbName[i] = '';
70
67
  accession[i] = '';
71
68
  num[i] = '';
@@ -77,7 +74,6 @@ var SIFTSMapping;
77
74
  num[i] = db_num.value(row);
78
75
  residue[i] = db_res.value(row);
79
76
  }
80
- return { dbName: dbName, accession: accession, num: num, residue: residue };
77
+ return { dbName, accession, num, residue };
81
78
  }
82
- })(SIFTSMapping || (SIFTSMapping = {}));
83
- exports.SIFTSMapping = SIFTSMapping;
79
+ })(SIFTSMapping || (exports.SIFTSMapping = SIFTSMapping = {}));
@@ -1,64 +1,60 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PDBeSIFTSMapping = void 0;
4
- var tslib_1 = require("tslib");
5
- var int_1 = require("Molstar/mol-data/int");
6
- var sifts_mapping_1 = require("./sifts-mapping");
7
- var sifts_mapping_2 = require("Molstar/mol-model-props/sequence/themes/sifts-mapping");
8
- var structure_1 = require("Molstar/mol-model/structure");
9
- var param_definition_1 = require("Molstar/mol-util/param-definition");
10
- var behavior_1 = require("Molstar/mol-plugin/behavior");
4
+ const int_1 = require("Molstar/mol-data/int");
5
+ const sifts_mapping_1 = require("./sifts-mapping");
6
+ const sifts_mapping_2 = require("Molstar/mol-model-props/sequence/themes/sifts-mapping");
7
+ const structure_1 = require("Molstar/mol-model/structure");
8
+ const param_definition_1 = require("Molstar/mol-util/param-definition");
9
+ const behavior_1 = require("Molstar/mol-plugin/behavior");
11
10
  exports.PDBeSIFTSMapping = behavior_1.PluginBehavior.create({
12
11
  name: 'pdbe-sifts-mapping-prop',
13
12
  category: 'custom-props',
14
13
  display: { name: 'PDBe SIFTS Mapping' },
15
- ctor: /** @class */ (function (_super) {
16
- tslib_1.__extends(class_1, _super);
17
- function class_1() {
18
- var _this = _super !== null && _super.apply(this, arguments) || this;
19
- _this.provider = sifts_mapping_1.SIFTSMapping.Provider;
20
- _this.labelProvider = {
21
- label: function (loci) {
22
- if (!_this.params.showTooltip)
14
+ ctor: class extends behavior_1.PluginBehavior.Handler {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.provider = sifts_mapping_1.SIFTSMapping.Provider;
18
+ this.labelProvider = {
19
+ label: (loci) => {
20
+ if (!this.params.showTooltip)
23
21
  return;
24
22
  return PDBeBestDatabaseSequenceMappingLabel(loci);
25
23
  }
26
24
  };
27
- return _this;
28
25
  }
29
- class_1.prototype.update = function (p) {
30
- var updated = (this.params.autoAttach !== p.autoAttach ||
26
+ update(p) {
27
+ const updated = (this.params.autoAttach !== p.autoAttach ||
31
28
  this.params.showTooltip !== p.showTooltip);
32
29
  this.params.autoAttach = p.autoAttach;
33
30
  this.params.showTooltip = p.showTooltip;
34
31
  this.ctx.customStructureProperties.setDefaultAutoAttach(this.provider.descriptor.name, this.params.autoAttach);
35
32
  return updated;
36
- };
37
- class_1.prototype.register = function () {
33
+ }
34
+ register() {
38
35
  this.ctx.customModelProperties.register(this.provider, this.params.autoAttach);
39
36
  this.ctx.representation.structure.themes.colorThemeRegistry.add(sifts_mapping_2.SIFTSMappingColorThemeProvider);
40
37
  this.ctx.managers.lociLabels.addProvider(this.labelProvider);
41
- };
42
- class_1.prototype.unregister = function () {
38
+ }
39
+ unregister() {
43
40
  this.ctx.customModelProperties.unregister(this.provider.descriptor.name);
44
41
  this.ctx.representation.structure.themes.colorThemeRegistry.remove(sifts_mapping_2.SIFTSMappingColorThemeProvider);
45
42
  this.ctx.managers.lociLabels.removeProvider(this.labelProvider);
46
- };
47
- return class_1;
48
- }(behavior_1.PluginBehavior.Handler)),
49
- params: function () { return ({
43
+ }
44
+ },
45
+ params: () => ({
50
46
  autoAttach: param_definition_1.ParamDefinition.Boolean(true),
51
47
  showTooltip: param_definition_1.ParamDefinition.Boolean(true)
52
- }); }
48
+ })
53
49
  });
54
50
  //
55
51
  function PDBeBestDatabaseSequenceMappingLabel(loci) {
56
52
  if (loci.kind === 'element-loci') {
57
53
  if (loci.elements.length === 0)
58
54
  return;
59
- var e = loci.elements[0];
60
- var u = e.unit;
61
- var se = structure_1.StructureElement.Location.create(loci.structure, u, u.elements[int_1.OrderedSet.getAt(e.indices, 0)]);
55
+ const e = loci.elements[0];
56
+ const u = e.unit;
57
+ const se = structure_1.StructureElement.Location.create(loci.structure, u, u.elements[int_1.OrderedSet.getAt(e.indices, 0)]);
62
58
  return sifts_mapping_1.SIFTSMapping.getLabel(se);
63
59
  }
64
60
  }
package/lib/spec.d.ts CHANGED
@@ -8,7 +8,7 @@ export declare const DefaultPluginUISpec: () => PluginUISpec;
8
8
  export declare function createPluginUI(target: HTMLElement, spec?: PluginUISpec, options?: {
9
9
  onBeforeUIRender?: (ctx: PluginUIContext) => (Promise<void> | void);
10
10
  }): Promise<PluginUIContext>;
11
- export declare type InitParams = {
11
+ export type InitParams = {
12
12
  moleculeId?: string;
13
13
  superposition?: boolean;
14
14
  pdbeUrl?: string;
package/lib/spec.js CHANGED
@@ -1,20 +1,42 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.DefaultParams = exports.createPluginUI = exports.DefaultPluginUISpec = exports.DefaultPluginSpec = void 0;
4
- var tslib_1 = require("tslib");
5
- var React = tslib_1.__importStar(require("react"));
6
- var ReactDOM = tslib_1.__importStar(require("react-dom"));
7
- var volume_1 = require("Molstar/mol-plugin-ui/custom/volume");
8
- var plugin_1 = require("Molstar/mol-plugin-ui/plugin");
9
- var behavior_1 = require("Molstar/mol-plugin/behavior");
10
- var transformers_1 = require("Molstar/mol-plugin/behavior/dynamic/volume-streaming/transformers");
11
- var context_1 = require("Molstar/mol-plugin-ui/context");
12
- var spec_1 = require("Molstar/mol-plugin/spec");
13
- var config_1 = require("Molstar/mol-plugin/config");
14
- var actions_1 = require("Molstar/mol-plugin-state/actions");
15
- var labels_1 = require("./labels");
16
- var sifts_mappings_behaviour_1 = require("./sifts-mappings-behaviour");
17
- var DefaultPluginSpec = function () { return ({
27
+ const React = __importStar(require("react"));
28
+ const ReactDOM = __importStar(require("react-dom"));
29
+ const volume_1 = require("Molstar/mol-plugin-ui/custom/volume");
30
+ const plugin_1 = require("Molstar/mol-plugin-ui/plugin");
31
+ const behavior_1 = require("Molstar/mol-plugin/behavior");
32
+ const transformers_1 = require("Molstar/mol-plugin/behavior/dynamic/volume-streaming/transformers");
33
+ const context_1 = require("Molstar/mol-plugin-ui/context");
34
+ const spec_1 = require("Molstar/mol-plugin/spec");
35
+ const config_1 = require("Molstar/mol-plugin/config");
36
+ const actions_1 = require("Molstar/mol-plugin-state/actions");
37
+ const labels_1 = require("./labels");
38
+ const sifts_mappings_behaviour_1 = require("./sifts-mappings-behaviour");
39
+ const DefaultPluginSpec = () => ({
18
40
  actions: [
19
41
  spec_1.PluginSpec.Action(actions_1.StateActions.Structure.EnableStructureCustomProps)
20
42
  ],
@@ -37,33 +59,23 @@ var DefaultPluginSpec = function () { return ({
37
59
  config: [
38
60
  [config_1.PluginConfig.VolumeStreaming.DefaultServer, 'https://www.ebi.ac.uk/pdbe/volume-server']
39
61
  ]
40
- }); };
62
+ });
41
63
  exports.DefaultPluginSpec = DefaultPluginSpec;
42
- var DefaultPluginUISpec = function () { return (tslib_1.__assign(tslib_1.__assign({}, (0, exports.DefaultPluginSpec)()), { customParamEditors: [
64
+ const DefaultPluginUISpec = () => ({
65
+ ...(0, exports.DefaultPluginSpec)(),
66
+ customParamEditors: [
43
67
  [transformers_1.CreateVolumeStreamingBehavior, volume_1.VolumeStreamingCustomControls]
44
- ] })); };
68
+ ],
69
+ });
45
70
  exports.DefaultPluginUISpec = DefaultPluginUISpec;
46
- function createPluginUI(target, spec, options) {
47
- return tslib_1.__awaiter(this, void 0, void 0, function () {
48
- var ctx;
49
- return tslib_1.__generator(this, function (_a) {
50
- switch (_a.label) {
51
- case 0:
52
- ctx = new context_1.PluginUIContext(spec || (0, exports.DefaultPluginUISpec)());
53
- return [4 /*yield*/, ctx.init()];
54
- case 1:
55
- _a.sent();
56
- if (!(options === null || options === void 0 ? void 0 : options.onBeforeUIRender)) return [3 /*break*/, 3];
57
- return [4 /*yield*/, options.onBeforeUIRender(ctx)];
58
- case 2:
59
- _a.sent();
60
- _a.label = 3;
61
- case 3:
62
- ReactDOM.render(React.createElement(plugin_1.Plugin, { plugin: ctx }), target);
63
- return [2 /*return*/, ctx];
64
- }
65
- });
66
- });
71
+ async function createPluginUI(target, spec, options) {
72
+ const ctx = new context_1.PluginUIContext(spec || (0, exports.DefaultPluginUISpec)());
73
+ await ctx.init();
74
+ if (options?.onBeforeUIRender) {
75
+ await options.onBeforeUIRender(ctx);
76
+ }
77
+ ReactDOM.render(React.createElement(plugin_1.Plugin, { plugin: ctx }), target);
78
+ return ctx;
67
79
  }
68
80
  exports.createPluginUI = createPluginUI;
69
81
  exports.DefaultParams = {
@@ -1,7 +1,7 @@
1
1
  import { StateTransformer } from 'molstar/lib/mol-state';
2
2
  import { PluginStateObject as SO } from 'molstar/lib/mol-plugin-state/objects';
3
3
  export { StructureSelectionsContact3D };
4
- declare type StructureSelectionsContact3D = typeof StructureSelectionsContact3D;
4
+ type StructureSelectionsContact3D = typeof StructureSelectionsContact3D;
5
5
  declare const StructureSelectionsContact3D: StateTransformer<SO.Molecule.Structure.Selections, SO.Shape.Representation3D, import("molstar/lib/mol-util/param-definition").ParamDefinition.Normalize<{
6
6
  visuals: ("text" | "cylinder")[];
7
7
  unitLabel: string;
@@ -21,7 +21,7 @@ declare const StructureSelectionsContact3D: StateTransformer<SO.Molecule.Structu
21
21
  tether: boolean;
22
22
  tetherLength: number;
23
23
  tetherBaseWidth: number;
24
- attachment: "bottom-left" | "bottom-center" | "bottom-right" | "middle-left" | "middle-center" | "middle-right" | "top-left" | "top-center" | "top-right";
24
+ attachment: "middle-center" | "bottom-left" | "bottom-center" | "bottom-right" | "middle-left" | "middle-right" | "top-left" | "top-center" | "top-right";
25
25
  fontFamily: import("molstar/lib/mol-geo/geometry/text/font-atlas").FontFamily;
26
26
  fontQuality: number;
27
27
  fontStyle: import("molstar/lib/mol-geo/geometry/text/font-atlas").FontStyle;
@@ -42,9 +42,15 @@ declare const StructureSelectionsContact3D: StateTransformer<SO.Molecule.Structu
42
42
  position: any;
43
43
  rotation: any;
44
44
  scale: any;
45
+ transform: any;
45
46
  }>[];
46
47
  }>;
48
+ emissive: number;
49
+ density: number;
47
50
  instanceGranularity: boolean;
51
+ lod: import("molstar/lib/mol-math/linear-algebra").Vec3;
52
+ cellSize: number;
53
+ batchSize: number;
48
54
  lineSizeAttenuation: boolean;
49
55
  linesSize: number;
50
56
  dashLength: number;
@@ -53,8 +59,11 @@ declare const StructureSelectionsContact3D: StateTransformer<SO.Molecule.Structu
53
59
  sizeAspectRatio: number;
54
60
  doubleSided: boolean;
55
61
  ignoreLight: boolean;
56
- xrayShaded: boolean;
57
- transparentBackfaces: string;
62
+ celShaded: boolean;
63
+ xrayShaded: boolean | "inverted";
64
+ transparentBackfaces: "off" | "on" | "opaque";
65
+ solidInterior: boolean;
58
66
  bumpFrequency: number;
59
67
  bumpAmplitude: number;
68
+ colorMode: "default" | "interpolate";
60
69
  }>>;