molstar 3.0.0-dev.3 → 3.0.0-dev.4

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 (379) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +187 -187
  3. package/build/viewer/embedded.html +43 -43
  4. package/build/viewer/index.html +95 -94
  5. package/build/viewer/molstar.css +1 -1
  6. package/build/viewer/molstar.js +1 -1
  7. package/lib/apps/docking-viewer/index.html +36 -36
  8. package/lib/apps/docking-viewer/viewport.js +2 -1
  9. package/lib/apps/viewer/embedded.html +43 -43
  10. package/lib/apps/viewer/index.html +95 -94
  11. package/lib/commonjs/apps/docking-viewer/viewport.js +2 -1
  12. package/lib/commonjs/examples/lighting/index.js +2 -1
  13. package/lib/commonjs/extensions/anvil/behavior.d.ts +3 -0
  14. package/lib/commonjs/extensions/anvil/representation.d.ts +13 -0
  15. package/lib/commonjs/extensions/cellpack/representation.d.ts +3 -0
  16. package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +9 -0
  17. package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +3 -0
  18. package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +3 -0
  19. package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +15 -0
  20. package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +6 -0
  21. package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +3 -0
  22. package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +3 -0
  23. package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +4 -0
  24. package/lib/commonjs/mol-canvas3d/passes/image.d.ts +3 -0
  25. package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +1 -0
  26. package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +4 -2
  27. package/lib/commonjs/mol-geo/geometry/base.d.ts +2 -0
  28. package/lib/commonjs/mol-geo/geometry/base.js +2 -0
  29. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +4 -1
  30. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +4 -2
  31. package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.d.ts +1 -0
  32. package/lib/commonjs/mol-geo/geometry/image/image.d.ts +1 -0
  33. package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +1 -0
  34. package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.js +1 -1
  35. package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +3 -0
  36. package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +4 -2
  37. package/lib/commonjs/mol-geo/geometry/points/points.d.ts +2 -1
  38. package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +3 -0
  39. package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +4 -2
  40. package/lib/commonjs/mol-geo/geometry/substance-data.js +3 -3
  41. package/lib/commonjs/mol-geo/geometry/text/text.d.ts +1 -0
  42. package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.js +3 -3
  43. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +3 -0
  44. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +4 -2
  45. package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +31 -28
  46. package/lib/commonjs/mol-gl/renderable/cylinders.js +2 -2
  47. package/lib/commonjs/mol-gl/renderable/direct-volume.d.ts +1 -0
  48. package/lib/commonjs/mol-gl/renderable/image.d.ts +1 -0
  49. package/lib/commonjs/mol-gl/renderable/lines.d.ts +1 -0
  50. package/lib/commonjs/mol-gl/renderable/mesh.d.ts +28 -25
  51. package/lib/commonjs/mol-gl/renderable/mesh.js +2 -2
  52. package/lib/commonjs/mol-gl/renderable/points.d.ts +1 -0
  53. package/lib/commonjs/mol-gl/renderable/schema.d.ts +1 -0
  54. package/lib/commonjs/mol-gl/renderable/schema.js +3 -3
  55. package/lib/commonjs/mol-gl/renderable/spheres.d.ts +31 -28
  56. package/lib/commonjs/mol-gl/renderable/spheres.js +2 -2
  57. package/lib/commonjs/mol-gl/renderable/text.d.ts +1 -0
  58. package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +3 -0
  59. package/lib/commonjs/mol-gl/renderable/texture-mesh.js +1 -1
  60. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
  61. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
  62. package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.d.ts +1 -1
  63. package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.js +1 -1
  64. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
  65. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
  66. package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
  67. package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.js +1 -1
  68. package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
  69. package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
  70. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
  71. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
  72. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
  73. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +1 -1
  74. package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.d.ts +1 -1
  75. package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.js +1 -1
  76. package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +1 -1
  77. package/lib/commonjs/mol-gl/shader/cylinders.frag.js +1 -1
  78. package/lib/commonjs/mol-gl/shader/mesh.frag.d.ts +1 -1
  79. package/lib/commonjs/mol-gl/shader/mesh.frag.js +1 -1
  80. package/lib/commonjs/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  81. package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +1 -1
  82. package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +1 -1
  83. package/lib/commonjs/mol-gl/shader/spheres.frag.js +1 -1
  84. package/lib/commonjs/mol-model/structure/model/model.js +7 -3
  85. package/lib/commonjs/mol-model-formats/shape/ply.d.ts +6 -0
  86. package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +3 -0
  87. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +3 -0
  88. package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +9 -0
  89. package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +12 -0
  90. package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -0
  91. package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
  92. package/lib/commonjs/mol-plugin/commands.d.ts +3 -0
  93. package/lib/commonjs/mol-plugin/config.d.ts +1 -0
  94. package/lib/commonjs/mol-plugin/config.js +9 -3
  95. package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +9 -0
  96. package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +2 -0
  97. package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +22 -0
  98. package/lib/commonjs/mol-plugin-ui/controls/parameters.d.ts +3 -2
  99. package/lib/commonjs/mol-plugin-ui/controls/parameters.js +11 -6
  100. package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
  101. package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.js +8 -17
  102. package/lib/commonjs/mol-plugin-ui/plugin.d.ts +1 -1
  103. package/lib/commonjs/mol-plugin-ui/plugin.js +76 -10
  104. package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +3 -0
  105. package/lib/commonjs/mol-repr/shape/loci/common.d.ts +1 -0
  106. package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +3 -0
  107. package/lib/commonjs/mol-repr/shape/loci/distance.d.ts +1 -0
  108. package/lib/commonjs/mol-repr/shape/loci/label.d.ts +1 -0
  109. package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +3 -0
  110. package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +3 -0
  111. package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +3 -0
  112. package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +12 -0
  113. package/lib/commonjs/mol-repr/structure/params.d.ts +16 -0
  114. package/lib/commonjs/mol-repr/structure/registry.d.ts +35 -1
  115. package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +9 -0
  116. package/lib/commonjs/mol-repr/structure/representation/backbone.js +2 -1
  117. package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +9 -0
  118. package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.js +2 -1
  119. package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +9 -0
  120. package/lib/commonjs/mol-repr/structure/representation/carbohydrate.js +2 -1
  121. package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +9 -0
  122. package/lib/commonjs/mol-repr/structure/representation/cartoon.js +2 -1
  123. package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +9 -0
  124. package/lib/commonjs/mol-repr/structure/representation/ellipsoid.js +2 -1
  125. package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +9 -0
  126. package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.js +2 -1
  127. package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
  128. package/lib/commonjs/mol-repr/structure/representation/label.d.ts +6 -3
  129. package/lib/commonjs/mol-repr/structure/representation/line.d.ts +3 -0
  130. package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +9 -0
  131. package/lib/commonjs/mol-repr/structure/representation/molecular-surface.js +2 -1
  132. package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +9 -0
  133. package/lib/commonjs/mol-repr/structure/representation/orientation.js +2 -1
  134. package/lib/commonjs/mol-repr/structure/representation/point.d.ts +3 -0
  135. package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +9 -0
  136. package/lib/commonjs/mol-repr/structure/representation/putty.js +2 -1
  137. package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +9 -0
  138. package/lib/commonjs/mol-repr/structure/representation/spacefill.js +2 -1
  139. package/lib/commonjs/mol-repr/structure/units-visual.d.ts +16 -0
  140. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +6 -0
  141. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
  142. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +6 -0
  143. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
  144. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +3 -0
  145. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +3 -0
  146. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +3 -0
  147. package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +1 -0
  148. package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +1 -0
  149. package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +6 -0
  150. package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +3 -0
  151. package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
  152. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +12 -0
  153. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
  154. package/lib/commonjs/mol-repr/structure/visual/label-text.d.ts +3 -2
  155. package/lib/commonjs/mol-repr/structure/visual/label-text.js +2 -2
  156. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +3 -0
  157. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
  158. package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +3 -0
  159. package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +3 -0
  160. package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +3 -0
  161. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +6 -0
  162. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +6 -0
  163. package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +3 -0
  164. package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +3 -0
  165. package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +3 -0
  166. package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +3 -0
  167. package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +3 -0
  168. package/lib/commonjs/mol-repr/volume/isosurface.d.ts +16 -0
  169. package/lib/commonjs/mol-repr/volume/isosurface.js +2 -1
  170. package/lib/commonjs/mol-repr/volume/registry.d.ts +5 -0
  171. package/lib/commonjs/mol-repr/volume/representation.d.ts +1 -0
  172. package/lib/commonjs/mol-repr/volume/slice.d.ts +3 -0
  173. package/lib/commonjs/mol-script/language/builder.d.ts +1 -0
  174. package/lib/commonjs/mol-theme/color/illustrative.d.ts +2 -0
  175. package/lib/commonjs/mol-theme/color/illustrative.js +2 -2
  176. package/lib/commonjs/mol-theme/color.d.ts +1 -0
  177. package/lib/commonjs/mol-util/material.d.ts +5 -1
  178. package/lib/commonjs/mol-util/material.js +9 -7
  179. package/lib/examples/alpha-orbitals/index.html +60 -60
  180. package/lib/examples/basic-wrapper/index.html +136 -136
  181. package/lib/examples/lighting/index.html +86 -86
  182. package/lib/examples/lighting/index.js +2 -1
  183. package/lib/examples/proteopedia-wrapper/index.html +235 -235
  184. package/lib/extensions/anvil/behavior.d.ts +3 -0
  185. package/lib/extensions/anvil/representation.d.ts +13 -0
  186. package/lib/extensions/cellpack/representation.d.ts +3 -0
  187. package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +9 -0
  188. package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +3 -0
  189. package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +3 -0
  190. package/lib/extensions/rcsb/validation-report/representation.d.ts +15 -0
  191. package/lib/mol-canvas3d/canvas3d.d.ts +6 -0
  192. package/lib/mol-canvas3d/helper/camera-helper.d.ts +3 -0
  193. package/lib/mol-canvas3d/helper/handle-helper.d.ts +3 -0
  194. package/lib/mol-canvas3d/helper/helper.d.ts +4 -0
  195. package/lib/mol-canvas3d/passes/image.d.ts +3 -0
  196. package/lib/mol-canvas3d/passes/postprocessing.d.ts +1 -0
  197. package/lib/mol-canvas3d/passes/postprocessing.js +4 -2
  198. package/lib/mol-geo/geometry/base.d.ts +2 -0
  199. package/lib/mol-geo/geometry/base.js +2 -0
  200. package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +4 -1
  201. package/lib/mol-geo/geometry/cylinders/cylinders.js +4 -2
  202. package/lib/mol-geo/geometry/direct-volume/direct-volume.d.ts +1 -0
  203. package/lib/mol-geo/geometry/image/image.d.ts +1 -0
  204. package/lib/mol-geo/geometry/lines/lines.d.ts +1 -0
  205. package/lib/mol-geo/geometry/mesh/color-smoothing.js +1 -1
  206. package/lib/mol-geo/geometry/mesh/mesh.d.ts +3 -0
  207. package/lib/mol-geo/geometry/mesh/mesh.js +4 -2
  208. package/lib/mol-geo/geometry/points/points.d.ts +2 -1
  209. package/lib/mol-geo/geometry/spheres/spheres.d.ts +3 -0
  210. package/lib/mol-geo/geometry/spheres/spheres.js +4 -2
  211. package/lib/mol-geo/geometry/substance-data.js +3 -3
  212. package/lib/mol-geo/geometry/text/text.d.ts +1 -0
  213. package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +3 -3
  214. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +3 -0
  215. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +4 -2
  216. package/lib/mol-gl/renderable/cylinders.d.ts +31 -28
  217. package/lib/mol-gl/renderable/cylinders.js +3 -3
  218. package/lib/mol-gl/renderable/direct-volume.d.ts +1 -0
  219. package/lib/mol-gl/renderable/image.d.ts +1 -0
  220. package/lib/mol-gl/renderable/lines.d.ts +1 -0
  221. package/lib/mol-gl/renderable/mesh.d.ts +28 -25
  222. package/lib/mol-gl/renderable/mesh.js +3 -3
  223. package/lib/mol-gl/renderable/points.d.ts +1 -0
  224. package/lib/mol-gl/renderable/schema.d.ts +1 -0
  225. package/lib/mol-gl/renderable/schema.js +3 -3
  226. package/lib/mol-gl/renderable/spheres.d.ts +31 -28
  227. package/lib/mol-gl/renderable/spheres.js +3 -3
  228. package/lib/mol-gl/renderable/text.d.ts +1 -0
  229. package/lib/mol-gl/renderable/texture-mesh.d.ts +3 -0
  230. package/lib/mol-gl/renderable/texture-mesh.js +1 -1
  231. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
  232. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
  233. package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.d.ts +1 -1
  234. package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.js +1 -1
  235. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
  236. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
  237. package/lib/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
  238. package/lib/mol-gl/shader/chunks/color-frag-params.glsl.js +1 -1
  239. package/lib/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
  240. package/lib/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
  241. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
  242. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
  243. package/lib/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
  244. package/lib/mol-gl/shader/chunks/common.glsl.js +1 -1
  245. package/lib/mol-gl/shader/chunks/light-frag-params.glsl.d.ts +1 -1
  246. package/lib/mol-gl/shader/chunks/light-frag-params.glsl.js +1 -1
  247. package/lib/mol-gl/shader/cylinders.frag.d.ts +1 -1
  248. package/lib/mol-gl/shader/cylinders.frag.js +1 -1
  249. package/lib/mol-gl/shader/mesh.frag.d.ts +1 -1
  250. package/lib/mol-gl/shader/mesh.frag.js +1 -1
  251. package/lib/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  252. package/lib/mol-gl/shader/postprocessing.frag.js +1 -1
  253. package/lib/mol-gl/shader/spheres.frag.d.ts +1 -1
  254. package/lib/mol-gl/shader/spheres.frag.js +1 -1
  255. package/lib/mol-model/structure/model/model.js +7 -3
  256. package/lib/mol-model-formats/shape/ply.d.ts +6 -0
  257. package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +3 -0
  258. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +3 -0
  259. package/lib/mol-model-props/computed/representations/interactions.d.ts +9 -0
  260. package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +12 -0
  261. package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -0
  262. package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
  263. package/lib/mol-plugin/commands.d.ts +3 -0
  264. package/lib/mol-plugin/config.d.ts +1 -0
  265. package/lib/mol-plugin/config.js +8 -3
  266. package/lib/mol-plugin/util/viewport-screenshot.d.ts +9 -0
  267. package/lib/mol-plugin/version.js +2 -2
  268. package/lib/mol-plugin-state/manager/structure/component.d.ts +2 -0
  269. package/lib/mol-plugin-state/transforms/representation.d.ts +22 -0
  270. package/lib/mol-plugin-ui/controls/parameters.d.ts +3 -2
  271. package/lib/mol-plugin-ui/controls/parameters.js +12 -7
  272. package/lib/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
  273. package/lib/mol-plugin-ui/hooks/use-behavior.js +9 -18
  274. package/lib/mol-plugin-ui/plugin.d.ts +1 -1
  275. package/lib/mol-plugin-ui/plugin.js +76 -10
  276. package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
  277. package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
  278. package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
  279. package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
  280. package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
  281. package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
  282. package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -616
  283. package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
  284. package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
  285. package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
  286. package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
  287. package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
  288. package/lib/mol-plugin-ui/skin/base/components/viewport.scss +127 -127
  289. package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
  290. package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
  291. package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
  292. package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
  293. package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
  294. package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
  295. package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
  296. package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
  297. package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
  298. package/lib/mol-plugin-ui/skin/blue.scss +1 -1
  299. package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
  300. package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
  301. package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
  302. package/lib/mol-plugin-ui/skin/dark.scss +1 -1
  303. package/lib/mol-plugin-ui/skin/light.scss +1 -1
  304. package/lib/mol-repr/shape/loci/angle.d.ts +3 -0
  305. package/lib/mol-repr/shape/loci/common.d.ts +1 -0
  306. package/lib/mol-repr/shape/loci/dihedral.d.ts +3 -0
  307. package/lib/mol-repr/shape/loci/distance.d.ts +1 -0
  308. package/lib/mol-repr/shape/loci/label.d.ts +1 -0
  309. package/lib/mol-repr/shape/loci/orientation.d.ts +3 -0
  310. package/lib/mol-repr/shape/loci/plane.d.ts +3 -0
  311. package/lib/mol-repr/shape/model/unitcell.d.ts +3 -0
  312. package/lib/mol-repr/structure/complex-visual.d.ts +12 -0
  313. package/lib/mol-repr/structure/params.d.ts +16 -0
  314. package/lib/mol-repr/structure/registry.d.ts +35 -1
  315. package/lib/mol-repr/structure/representation/backbone.d.ts +9 -0
  316. package/lib/mol-repr/structure/representation/backbone.js +2 -1
  317. package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +9 -0
  318. package/lib/mol-repr/structure/representation/ball-and-stick.js +2 -1
  319. package/lib/mol-repr/structure/representation/carbohydrate.d.ts +9 -0
  320. package/lib/mol-repr/structure/representation/carbohydrate.js +2 -1
  321. package/lib/mol-repr/structure/representation/cartoon.d.ts +9 -0
  322. package/lib/mol-repr/structure/representation/cartoon.js +2 -1
  323. package/lib/mol-repr/structure/representation/ellipsoid.d.ts +9 -0
  324. package/lib/mol-repr/structure/representation/ellipsoid.js +2 -1
  325. package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +9 -0
  326. package/lib/mol-repr/structure/representation/gaussian-surface.js +2 -1
  327. package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
  328. package/lib/mol-repr/structure/representation/label.d.ts +6 -3
  329. package/lib/mol-repr/structure/representation/line.d.ts +3 -0
  330. package/lib/mol-repr/structure/representation/molecular-surface.d.ts +9 -0
  331. package/lib/mol-repr/structure/representation/molecular-surface.js +2 -1
  332. package/lib/mol-repr/structure/representation/orientation.d.ts +9 -0
  333. package/lib/mol-repr/structure/representation/orientation.js +2 -1
  334. package/lib/mol-repr/structure/representation/point.d.ts +3 -0
  335. package/lib/mol-repr/structure/representation/putty.d.ts +9 -0
  336. package/lib/mol-repr/structure/representation/putty.js +2 -1
  337. package/lib/mol-repr/structure/representation/spacefill.d.ts +9 -0
  338. package/lib/mol-repr/structure/representation/spacefill.js +2 -1
  339. package/lib/mol-repr/structure/units-visual.d.ts +16 -0
  340. package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +6 -0
  341. package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
  342. package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +6 -0
  343. package/lib/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
  344. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +3 -0
  345. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +3 -0
  346. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +3 -0
  347. package/lib/mol-repr/structure/visual/element-cross.d.ts +1 -0
  348. package/lib/mol-repr/structure/visual/element-point.d.ts +1 -0
  349. package/lib/mol-repr/structure/visual/element-sphere.d.ts +6 -0
  350. package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +3 -0
  351. package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
  352. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +12 -0
  353. package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
  354. package/lib/mol-repr/structure/visual/label-text.d.ts +3 -2
  355. package/lib/mol-repr/structure/visual/label-text.js +2 -2
  356. package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +3 -0
  357. package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
  358. package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +3 -0
  359. package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +3 -0
  360. package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +3 -0
  361. package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +6 -0
  362. package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +6 -0
  363. package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +3 -0
  364. package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +3 -0
  365. package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +3 -0
  366. package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +3 -0
  367. package/lib/mol-repr/volume/direct-volume.d.ts +3 -0
  368. package/lib/mol-repr/volume/isosurface.d.ts +16 -0
  369. package/lib/mol-repr/volume/isosurface.js +2 -1
  370. package/lib/mol-repr/volume/registry.d.ts +5 -0
  371. package/lib/mol-repr/volume/representation.d.ts +1 -0
  372. package/lib/mol-repr/volume/slice.d.ts +3 -0
  373. package/lib/mol-script/language/builder.d.ts +1 -0
  374. package/lib/mol-theme/color/illustrative.d.ts +2 -0
  375. package/lib/mol-theme/color/illustrative.js +2 -2
  376. package/lib/mol-theme/color.d.ts +1 -0
  377. package/lib/mol-util/material.d.ts +5 -1
  378. package/lib/mol-util/material.js +9 -7
  379. package/package.json +162 -160
@@ -37,10 +37,13 @@ declare class ViewportScreenshotHelper extends PluginComponent {
37
37
  flipSided: boolean;
38
38
  flatShaded: boolean;
39
39
  xrayShaded: boolean;
40
+ bumpFrequency: number;
41
+ bumpAmplitude: number;
40
42
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
41
43
  material: PD.Normalize<{
42
44
  metalness: number;
43
45
  roughness: number;
46
+ bumpiness: number;
44
47
  }>;
45
48
  }>, "on">>;
46
49
  };
@@ -62,10 +65,13 @@ declare class ViewportScreenshotHelper extends PluginComponent {
62
65
  flipSided: boolean;
63
66
  flatShaded: boolean;
64
67
  xrayShaded: boolean;
68
+ bumpFrequency: number;
69
+ bumpAmplitude: number;
65
70
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
66
71
  material: PD.Normalize<{
67
72
  metalness: number;
68
73
  roughness: number;
74
+ bumpiness: number;
69
75
  }>;
70
76
  }>, "on">>;
71
77
  }>>;
@@ -95,10 +101,13 @@ declare class ViewportScreenshotHelper extends PluginComponent {
95
101
  flipSided: boolean;
96
102
  flatShaded: boolean;
97
103
  xrayShaded: boolean;
104
+ bumpFrequency: number;
105
+ bumpAmplitude: number;
98
106
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
99
107
  material: PD.Normalize<{
100
108
  metalness: number;
101
109
  roughness: number;
110
+ bumpiness: number;
102
111
  }>;
103
112
  }>, "on">>;
104
113
  }>;
@@ -61,6 +61,7 @@ declare namespace StructureComponentManager {
61
61
  materialStyle: PD.Group<PD.Normalize<{
62
62
  metalness: number;
63
63
  roughness: number;
64
+ bumpiness: number;
64
65
  }>>;
65
66
  interactions: PD.Group<PD.Normalize<{
66
67
  providers: PD.Normalize<{
@@ -108,6 +109,7 @@ declare namespace StructureComponentManager {
108
109
  material: PD.Normalize<{
109
110
  metalness: number;
110
111
  roughness: number;
112
+ bumpiness: number;
111
113
  }>;
112
114
  }>, "material"> | PD.NamedParams<PD.Normalize<{
113
115
  value: number;
@@ -93,6 +93,7 @@ declare const SubstanceStructureRepresentation3DFromScript: StateTransformer<SO.
93
93
  material: {
94
94
  metalness: number;
95
95
  roughness: number;
96
+ bumpiness: number;
96
97
  };
97
98
  clear: boolean;
98
99
  }>[];
@@ -104,6 +105,7 @@ declare const SubstanceStructureRepresentation3DFromBundle: StateTransformer<SO.
104
105
  material: {
105
106
  metalness: number;
106
107
  roughness: number;
108
+ bumpiness: number;
107
109
  };
108
110
  clear: boolean;
109
111
  }>[];
@@ -148,11 +150,14 @@ declare const ModelUnitcell3D: StateTransformer<SO.Molecule.Model, SO.Shape.Repr
148
150
  flatShaded: boolean;
149
151
  ignoreLight: boolean;
150
152
  xrayShaded: boolean;
153
+ bumpFrequency: number;
154
+ bumpAmplitude: number;
151
155
  alpha: number;
152
156
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
153
157
  material: PD.Normalize<{
154
158
  metalness: number;
155
159
  roughness: number;
160
+ bumpiness: number;
156
161
  }>;
157
162
  }>>;
158
163
  export { StructureBoundingBox3D };
@@ -163,11 +168,14 @@ declare const StructureBoundingBox3D: StateTransformer<SO.Molecule.Structure, SO
163
168
  flatShaded: boolean;
164
169
  ignoreLight: boolean;
165
170
  xrayShaded: boolean;
171
+ bumpFrequency: number;
172
+ bumpAmplitude: number;
166
173
  alpha: number;
167
174
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
168
175
  material: PD.Normalize<{
169
176
  metalness: number;
170
177
  roughness: number;
178
+ bumpiness: number;
171
179
  }>;
172
180
  radius: number;
173
181
  color: Color;
@@ -204,6 +212,7 @@ declare const StructureSelectionsDistance3D: StateTransformer<SO.Molecule.Struct
204
212
  material: PD.Normalize<{
205
213
  metalness: number;
206
214
  roughness: number;
215
+ bumpiness: number;
207
216
  }>;
208
217
  lineSizeAttenuation: boolean;
209
218
  linesColor: Color;
@@ -241,6 +250,7 @@ declare const StructureSelectionsAngle3D: StateTransformer<SO.Molecule.Structure
241
250
  material: PD.Normalize<{
242
251
  metalness: number;
243
252
  roughness: number;
253
+ bumpiness: number;
244
254
  }>;
245
255
  ignoreLight: boolean;
246
256
  sectorOpacity: number;
@@ -250,6 +260,8 @@ declare const StructureSelectionsAngle3D: StateTransformer<SO.Molecule.Structure
250
260
  flipSided: boolean;
251
261
  flatShaded: boolean;
252
262
  xrayShaded: boolean;
263
+ bumpFrequency: number;
264
+ bumpAmplitude: number;
253
265
  lineSizeAttenuation: boolean;
254
266
  linesSize: number;
255
267
  dashLength: number;
@@ -285,6 +297,7 @@ declare const StructureSelectionsDihedral3D: StateTransformer<SO.Molecule.Struct
285
297
  material: PD.Normalize<{
286
298
  metalness: number;
287
299
  roughness: number;
300
+ bumpiness: number;
288
301
  }>;
289
302
  ignoreLight: boolean;
290
303
  sectorOpacity: number;
@@ -294,6 +307,8 @@ declare const StructureSelectionsDihedral3D: StateTransformer<SO.Molecule.Struct
294
307
  flipSided: boolean;
295
308
  flatShaded: boolean;
296
309
  xrayShaded: boolean;
310
+ bumpFrequency: number;
311
+ bumpAmplitude: number;
297
312
  lineSizeAttenuation: boolean;
298
313
  linesSize: number;
299
314
  dashLength: number;
@@ -330,6 +345,7 @@ declare const StructureSelectionsLabel3D: StateTransformer<SO.Molecule.Structure
330
345
  material: PD.Normalize<{
331
346
  metalness: number;
332
347
  roughness: number;
348
+ bumpiness: number;
333
349
  }>;
334
350
  }>>;
335
351
  export { StructureSelectionsOrientation3D };
@@ -344,11 +360,14 @@ declare const StructureSelectionsOrientation3D: StateTransformer<SO.Molecule.Str
344
360
  flatShaded: boolean;
345
361
  ignoreLight: boolean;
346
362
  xrayShaded: boolean;
363
+ bumpFrequency: number;
364
+ bumpAmplitude: number;
347
365
  alpha: number;
348
366
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
349
367
  material: PD.Normalize<{
350
368
  metalness: number;
351
369
  roughness: number;
370
+ bumpiness: number;
352
371
  }>;
353
372
  }>>;
354
373
  export { StructureSelectionsPlane3D };
@@ -362,10 +381,13 @@ declare const StructureSelectionsPlane3D: StateTransformer<SO.Molecule.Structure
362
381
  flatShaded: boolean;
363
382
  ignoreLight: boolean;
364
383
  xrayShaded: boolean;
384
+ bumpFrequency: number;
385
+ bumpAmplitude: number;
365
386
  alpha: number;
366
387
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
367
388
  material: PD.Normalize<{
368
389
  metalness: number;
369
390
  roughness: number;
391
+ bumpiness: number;
370
392
  }>;
371
393
  }>>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -10,8 +10,8 @@ import { Legend as LegendData } from '../../mol-util/legend';
10
10
  import { ParamDefinition as PD } from '../../mol-util/param-definition';
11
11
  import { ParamMapping } from '../../mol-util/param-mapping';
12
12
  import { PluginUIComponent } from '../base';
13
- import { ActionMenu } from './action-menu';
14
13
  import { PluginUIContext } from '../context';
14
+ import { ActionMenu } from './action-menu';
15
15
  export declare type ParameterControlsCategoryFilter = string | null | (string | null)[];
16
16
  export interface ParameterControlsProps<P extends PD.Params = PD.Params> {
17
17
  params: P;
@@ -304,6 +304,7 @@ export declare class GroupControl extends React.PureComponent<ParamProps<PD.Grou
304
304
  toggleShowPresets: () => void;
305
305
  presetItems: (param: PD.Group<any>) => ActionMenu.Items[];
306
306
  onSelectPreset: ActionMenu.OnSelect;
307
+ pivotedPresets(): JSX.Element | null;
307
308
  presets(): JSX.Element | null;
308
309
  pivoted(): JSX.Element;
309
310
  render(): JSX.Element | null;
@@ -4,13 +4,14 @@ exports.ScriptControl = exports.ConvertedControl = exports.ConditionedControl =
4
4
  var tslib_1 = require("tslib");
5
5
  var jsx_runtime_1 = require("react/jsx-runtime");
6
6
  /**
7
- * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
7
+ * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
8
8
  *
9
9
  * @author David Sehnal <david.sehnal@gmail.com>
10
10
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
11
11
  */
12
12
  var React = (0, tslib_1.__importStar)(require("react"));
13
13
  var linear_algebra_1 = require("../../mol-math/linear-algebra");
14
+ var assets_1 = require("../../mol-util/assets");
14
15
  var color_1 = require("../../mol-util/color");
15
16
  var lists_1 = require("../../mol-util/color/lists");
16
17
  var memoize_1 = require("../../mol-util/memoize");
@@ -25,7 +26,6 @@ var icons_1 = require("./icons");
25
26
  var legend_1 = require("./legend");
26
27
  var line_graph_component_1 = require("./line-graph/line-graph-component");
27
28
  var slider_1 = require("./slider");
28
- var assets_1 = require("../../mol-util/assets");
29
29
  var ParameterControls = /** @class */ (function (_super) {
30
30
  (0, tslib_1.__extends)(ParameterControls, _super);
31
31
  function ParameterControls() {
@@ -1029,11 +1029,16 @@ var GroupControl = /** @class */ (function (_super) {
1029
1029
  GroupControl.prototype.change = function (value) {
1030
1030
  this.props.onChange({ name: this.props.name, param: this.props.param, value: value });
1031
1031
  };
1032
- GroupControl.prototype.presets = function () {
1032
+ GroupControl.prototype.pivotedPresets = function () {
1033
1033
  if (!this.props.param.presets)
1034
1034
  return null;
1035
1035
  var label = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
1036
- return (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-control-group-wrapper' }, { children: [(0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-control-group-header' }, { children: (0, jsx_runtime_1.jsxs)("button", (0, tslib_1.__assign)({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleShowPresets }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.TuneSvg }, void 0), label, " Presets"] }), void 0) }), void 0), this.state.showPresets && (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: this.presetItems(this.props.param), onSelect: this.onSelectPreset }, void 0)] }), void 0);
1036
+ return (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-control-group-wrapper' }, { children: [(0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-control-group-header' }, { children: (0, jsx_runtime_1.jsxs)("button", (0, tslib_1.__assign)({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleShowPresets }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BookmarksOutlinedSvg }, void 0), label, " Presets"] }), void 0) }), void 0), this.state.showPresets && (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: this.presetItems(this.props.param), onSelect: this.onSelectPreset }, void 0)] }), void 0);
1037
+ };
1038
+ GroupControl.prototype.presets = function () {
1039
+ if (!this.props.param.presets)
1040
+ return null;
1041
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-control-group-presets-wrapper' }, { children: (0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-control-group-header' }, { children: (0, jsx_runtime_1.jsxs)("button", (0, tslib_1.__assign)({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleShowPresets }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BookmarksOutlinedSvg }, void 0), "Presets"] }), void 0) }), void 0) }), void 0), this.state.showPresets && (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: this.presetItems(this.props.param), onSelect: this.onSelectPreset }, void 0)] }, void 0);
1037
1042
  };
1038
1043
  GroupControl.prototype.pivoted = function () {
1039
1044
  var key = this.props.param.pivot;
@@ -1050,7 +1055,7 @@ var GroupControl = /** @class */ (function (_super) {
1050
1055
  if (k !== key)
1051
1056
  filtered[k] = params[k];
1052
1057
  }
1053
- return (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-mapped-parameter-group' }, { children: [ctrl, (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.MoreHorizSvg, onClick: this.toggleExpanded, toggleState: this.state.isExpanded, title: "More Options" }, void 0), (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-control-offset' }, { children: [this.presets(), (0, jsx_runtime_1.jsx)(ParameterControls, { params: filtered, onEnter: this.props.onEnter, values: this.props.value, onChange: this.onChangeParam, isDisabled: this.props.isDisabled }, void 0)] }), void 0)] }), void 0);
1058
+ return (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-mapped-parameter-group' }, { children: [ctrl, (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.MoreHorizSvg, onClick: this.toggleExpanded, toggleState: this.state.isExpanded, title: "More Options" }, void 0), (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-control-offset' }, { children: [this.pivotedPresets(), (0, jsx_runtime_1.jsx)(ParameterControls, { params: filtered, onEnter: this.props.onEnter, values: this.props.value, onChange: this.onChangeParam, isDisabled: this.props.isDisabled }, void 0)] }), void 0)] }), void 0);
1054
1059
  };
1055
1060
  GroupControl.prototype.render = function () {
1056
1061
  var params = this.props.param.params;
@@ -1067,7 +1072,7 @@ var GroupControl = /** @class */ (function (_super) {
1067
1072
  if (this.props.param.isFlat) {
1068
1073
  return controls;
1069
1074
  }
1070
- return (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-control-group-wrapper' }, { children: [(0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-control-group-header' }, { children: (0, jsx_runtime_1.jsxs)("button", (0, tslib_1.__assign)({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleExpanded }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: this.state.isExpanded ? icons_1.ArrowDropDownSvg : icons_1.ArrowRightSvg }, void 0), label] }), void 0) }), void 0), this.state.isExpanded && (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-control-offset' }, { children: [this.presets(), controls] }), void 0)] }), void 0);
1075
+ return (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-control-group-wrapper', style: { position: 'relative' } }, { children: [(0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-control-group-header' }, { children: (0, jsx_runtime_1.jsxs)("button", (0, tslib_1.__assign)({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleExpanded }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: this.state.isExpanded ? icons_1.ArrowDropDownSvg : icons_1.ArrowRightSvg }, void 0), label] }), void 0) }), void 0), this.presets(), this.state.isExpanded && (0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-control-offset' }, { children: controls }), void 0)] }), void 0);
1071
1076
  };
1072
1077
  return GroupControl;
1073
1078
  }(React.PureComponent));
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2020-21 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author David Sehnal <david.sehnal@gmail.com>
5
5
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2020-21 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author David Sehnal <david.sehnal@gmail.com>
6
6
  */
@@ -9,29 +9,20 @@ exports.useBehavior = void 0;
9
9
  var react_1 = require("react");
10
10
  // eslint-disable-next-line
11
11
  function useBehavior(s) {
12
- var _a = (0, react_1.useState)(s === null || s === void 0 ? void 0 : s.value), value = _a[0], setValue = _a[1];
12
+ var _a = (0, react_1.useState)({}), next = _a[1];
13
+ var current = (0, react_1.useRef)();
14
+ current.current = s === null || s === void 0 ? void 0 : s.value;
13
15
  (0, react_1.useEffect)(function () {
14
16
  if (!s) {
15
- if (value !== void 0)
16
- setValue(void 0);
17
17
  return;
18
18
  }
19
- var fst = true;
20
19
  var sub = s.subscribe(function (v) {
21
- if (fst) {
22
- fst = false;
23
- if (v !== value)
24
- setValue(v);
25
- }
26
- else
27
- setValue(v);
20
+ if (current.current !== v)
21
+ next({});
28
22
  });
29
- return function () {
30
- sub.unsubscribe();
31
- };
32
- // eslint-disable-next-line
23
+ return function () { return sub.unsubscribe(); };
33
24
  }, [s]);
34
- return value;
25
+ return s === null || s === void 0 ? void 0 : s.value;
35
26
  }
36
27
  exports.useBehavior = useBehavior;
37
28
  //# sourceMappingURL=use-behavior.js.map
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -13,6 +13,10 @@ var task_1 = require("./task");
13
13
  var toast_1 = require("./toast");
14
14
  var viewport_1 = require("./viewport");
15
15
  var commands_1 = require("../mol-plugin/commands");
16
+ var file_1 = require("../mol-plugin-state/actions/file");
17
+ var assets_1 = require("../mol-util/assets");
18
+ var rxjs_1 = require("rxjs");
19
+ var use_behavior_1 = require("./hooks/use-behavior");
16
20
  var Plugin = /** @class */ (function (_super) {
17
21
  (0, tslib_1.__extends)(Plugin, _super);
18
22
  function Plugin() {
@@ -44,29 +48,44 @@ var Layout = /** @class */ (function (_super) {
44
48
  var _this = _super !== null && _super.apply(this, arguments) || this;
45
49
  _this.onDrop = function (ev) {
46
50
  ev.preventDefault();
47
- var file;
51
+ var files = [];
48
52
  if (ev.dataTransfer.items) {
49
53
  // Use DataTransferItemList interface to access the file(s)
50
54
  for (var i = 0; i < ev.dataTransfer.items.length; i++) {
51
55
  if (ev.dataTransfer.items[i].kind !== 'file')
52
56
  continue;
53
- file = ev.dataTransfer.items[i].getAsFile();
54
- break;
57
+ var file = ev.dataTransfer.items[i].getAsFile();
58
+ if (file)
59
+ files.push(file);
55
60
  }
56
61
  }
57
62
  else {
58
- file = ev.dataTransfer.files[0];
63
+ for (var i = 0; i < ev.dataTransfer.files.length; i++) {
64
+ var file = ev.dataTransfer.files[0];
65
+ if (file)
66
+ files.push(file);
67
+ }
68
+ }
69
+ var sessions = files.filter(function (f) {
70
+ var fn = f.name.toLowerCase();
71
+ return fn.endsWith('.molx') || fn.endsWith('.molj');
72
+ });
73
+ if (sessions.length > 0) {
74
+ commands_1.PluginCommands.State.Snapshots.OpenFile(_this.plugin, { file: sessions[0] });
59
75
  }
60
- if (!file)
61
- return;
62
- var fn = (file === null || file === void 0 ? void 0 : file.name.toLowerCase()) || '';
63
- if (fn.endsWith('molx') || fn.endsWith('molj')) {
64
- commands_1.PluginCommands.State.Snapshots.OpenFile(_this.plugin, { file: file });
76
+ else {
77
+ _this.plugin.runTask(_this.plugin.state.data.applyAction(file_1.OpenFiles, {
78
+ files: files.map(function (f) { return assets_1.Asset.File(f); }),
79
+ format: { name: 'auto', params: {} },
80
+ visuals: true
81
+ }));
65
82
  }
66
83
  };
67
84
  _this.onDragOver = function (ev) {
68
85
  ev.preventDefault();
69
86
  };
87
+ _this.showDragOverlay = new rxjs_1.BehaviorSubject(false);
88
+ _this.onDragEnter = function () { return _this.showDragOverlay.next(true); };
70
89
  return _this;
71
90
  }
72
91
  Layout.prototype.componentDidMount = function () {
@@ -122,10 +141,57 @@ var Layout = /** @class */ (function (_super) {
122
141
  var layout = this.plugin.layout.state;
123
142
  var controls = ((_a = this.plugin.spec.components) === null || _a === void 0 ? void 0 : _a.controls) || {};
124
143
  var viewport = ((_c = (_b = this.plugin.spec.components) === null || _b === void 0 ? void 0 : _b.viewport) === null || _c === void 0 ? void 0 : _c.view) || DefaultViewport;
125
- return (0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-plugin', onDrop: this.onDrop, onDragOver: this.onDragOver }, { children: (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: this.layoutClassName }, { children: [(0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: this.layoutVisibilityClassName }, { children: [this.region('main', viewport), layout.showControls && controls.top !== 'none' && this.region('top', controls.top || sequence_1.SequenceView), layout.showControls && controls.left !== 'none' && this.region('left', controls.left || left_panel_1.LeftPanelControls), layout.showControls && controls.right !== 'none' && this.region('right', controls.right || ControlsWrapper), layout.showControls && controls.bottom !== 'none' && this.region('bottom', controls.bottom || Log)] }), void 0), !((_d = this.plugin.spec.components) === null || _d === void 0 ? void 0 : _d.hideTaskOverlay) && (0, jsx_runtime_1.jsx)(task_1.OverlayTaskProgress, {}, void 0)] }), void 0) }), void 0);
144
+ return (0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-plugin' }, { children: (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: this.layoutClassName, onDragEnter: this.onDragEnter }, { children: [(0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: this.layoutVisibilityClassName }, { children: [this.region('main', viewport), layout.showControls && controls.top !== 'none' && this.region('top', controls.top || sequence_1.SequenceView), layout.showControls && controls.left !== 'none' && this.region('left', controls.left || left_panel_1.LeftPanelControls), layout.showControls && controls.right !== 'none' && this.region('right', controls.right || ControlsWrapper), layout.showControls && controls.bottom !== 'none' && this.region('bottom', controls.bottom || Log)] }), void 0), !((_d = this.plugin.spec.components) === null || _d === void 0 ? void 0 : _d.hideTaskOverlay) && (0, jsx_runtime_1.jsx)(task_1.OverlayTaskProgress, {}, void 0), (0, jsx_runtime_1.jsx)(DragOverlay, { plugin: this.plugin, showDragOverlay: this.showDragOverlay }, void 0)] }), void 0) }), void 0);
126
145
  };
127
146
  return Layout;
128
147
  }(base_1.PluginUIComponent));
148
+ function dropFiles(ev, plugin, showDragOverlay) {
149
+ ev.preventDefault();
150
+ ev.stopPropagation();
151
+ showDragOverlay.next(false);
152
+ var files = [];
153
+ if (ev.dataTransfer.items) {
154
+ // Use DataTransferItemList interface to access the file(s)
155
+ for (var i = 0; i < ev.dataTransfer.items.length; i++) {
156
+ if (ev.dataTransfer.items[i].kind !== 'file')
157
+ continue;
158
+ var file = ev.dataTransfer.items[i].getAsFile();
159
+ if (file)
160
+ files.push(file);
161
+ }
162
+ }
163
+ else {
164
+ for (var i = 0; i < ev.dataTransfer.files.length; i++) {
165
+ var file = ev.dataTransfer.files[0];
166
+ if (file)
167
+ files.push(file);
168
+ }
169
+ }
170
+ var sessions = files.filter(function (f) {
171
+ var fn = f.name.toLowerCase();
172
+ return fn.endsWith('.molx') || fn.endsWith('.molj');
173
+ });
174
+ if (sessions.length > 0) {
175
+ commands_1.PluginCommands.State.Snapshots.OpenFile(plugin, { file: sessions[0] });
176
+ }
177
+ else {
178
+ plugin.runTask(plugin.state.data.applyAction(file_1.OpenFiles, {
179
+ files: files.map(function (f) { return assets_1.Asset.File(f); }),
180
+ format: { name: 'auto', params: {} },
181
+ visuals: true
182
+ }));
183
+ }
184
+ }
185
+ function DragOverlay(_a) {
186
+ var plugin = _a.plugin, showDragOverlay = _a.showDragOverlay;
187
+ var show = (0, use_behavior_1.useBehavior)(showDragOverlay);
188
+ var preventDrag = function (e) {
189
+ e.dataTransfer.dropEffect = 'copy';
190
+ e.preventDefault();
191
+ e.stopPropagation();
192
+ };
193
+ return (0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-drag-drop-overlay', style: { display: show ? 'flex' : 'none' }, onDragEnter: preventDrag, onDragOver: preventDrag, onDragLeave: function () { return showDragOverlay.next(false); }, onDrop: function (e) { return dropFiles(e, plugin, showDragOverlay); } }, { children: "Upload File(s)" }), void 0);
194
+ }
129
195
  var ControlsWrapper = /** @class */ (function (_super) {
130
196
  (0, tslib_1.__extends)(ControlsWrapper, _super);
131
197
  function ControlsWrapper() {
@@ -38,6 +38,7 @@ export declare const AngleParams: {
38
38
  material: PD.Group<PD.Normalize<{
39
39
  metalness: number;
40
40
  roughness: number;
41
+ bumpiness: number;
41
42
  }>>;
42
43
  ignoreLight: PD.BooleanParam;
43
44
  sectorOpacity: PD.Numeric;
@@ -47,6 +48,8 @@ export declare const AngleParams: {
47
48
  flipSided: PD.BooleanParam;
48
49
  flatShaded: PD.BooleanParam;
49
50
  xrayShaded: PD.BooleanParam;
51
+ bumpFrequency: PD.Numeric;
52
+ bumpAmplitude: PD.Numeric;
50
53
  lineSizeAttenuation: PD.BooleanParam;
51
54
  linesSize: PD.Numeric;
52
55
  dashLength: PD.Numeric;
@@ -38,6 +38,7 @@ export declare const LociLabelTextParams: {
38
38
  material: PD.Group<PD.Normalize<{
39
39
  metalness: number;
40
40
  roughness: number;
41
+ bumpiness: number;
41
42
  }>>;
42
43
  };
43
44
  export declare type LociLabelTextParams = typeof LociLabelTextParams;
@@ -38,6 +38,7 @@ export declare const DihedralParams: {
38
38
  material: PD.Group<PD.Normalize<{
39
39
  metalness: number;
40
40
  roughness: number;
41
+ bumpiness: number;
41
42
  }>>;
42
43
  ignoreLight: PD.BooleanParam;
43
44
  sectorOpacity: PD.Numeric;
@@ -47,6 +48,8 @@ export declare const DihedralParams: {
47
48
  flipSided: PD.BooleanParam;
48
49
  flatShaded: PD.BooleanParam;
49
50
  xrayShaded: PD.BooleanParam;
51
+ bumpFrequency: PD.Numeric;
52
+ bumpAmplitude: PD.Numeric;
50
53
  lineSizeAttenuation: PD.BooleanParam;
51
54
  linesSize: PD.Numeric;
52
55
  dashLength: PD.Numeric;
@@ -39,6 +39,7 @@ export declare const DistanceParams: {
39
39
  material: PD.Group<PD.Normalize<{
40
40
  metalness: number;
41
41
  roughness: number;
42
+ bumpiness: number;
42
43
  }>>;
43
44
  lineSizeAttenuation: PD.BooleanParam;
44
45
  linesColor: PD.Color;
@@ -42,6 +42,7 @@ export declare const LabelParams: {
42
42
  material: PD.Group<PD.Normalize<{
43
43
  metalness: number;
44
44
  roughness: number;
45
+ bumpiness: number;
45
46
  }>>;
46
47
  };
47
48
  export declare type LabelParams = typeof LabelParams;
@@ -19,11 +19,14 @@ export declare const OrientationParams: {
19
19
  flatShaded: PD.BooleanParam;
20
20
  ignoreLight: PD.BooleanParam;
21
21
  xrayShaded: PD.BooleanParam;
22
+ bumpFrequency: PD.Numeric;
23
+ bumpAmplitude: PD.Numeric;
22
24
  alpha: PD.Numeric;
23
25
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
24
26
  material: PD.Group<PD.Normalize<{
25
27
  metalness: number;
26
28
  roughness: number;
29
+ bumpiness: number;
27
30
  }>>;
28
31
  };
29
32
  export declare type OrientationParams = typeof OrientationParams;
@@ -18,11 +18,14 @@ export declare const PlaneParams: {
18
18
  flatShaded: PD.BooleanParam;
19
19
  ignoreLight: PD.BooleanParam;
20
20
  xrayShaded: PD.BooleanParam;
21
+ bumpFrequency: PD.Numeric;
22
+ bumpAmplitude: PD.Numeric;
21
23
  alpha: PD.Numeric;
22
24
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
23
25
  material: PD.Group<PD.Normalize<{
24
26
  metalness: number;
25
27
  roughness: number;
28
+ bumpiness: number;
26
29
  }>>;
27
30
  };
28
31
  export declare type PlaneParams = typeof PlaneParams;
@@ -21,11 +21,14 @@ export declare const UnitcellParams: {
21
21
  flatShaded: PD.BooleanParam;
22
22
  ignoreLight: PD.BooleanParam;
23
23
  xrayShaded: PD.BooleanParam;
24
+ bumpFrequency: PD.Numeric;
25
+ bumpAmplitude: PD.Numeric;
24
26
  alpha: PD.Numeric;
25
27
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
26
28
  material: PD.Group<PD.Normalize<{
27
29
  metalness: number;
28
30
  roughness: number;
31
+ bumpiness: number;
29
32
  }>>;
30
33
  };
31
34
  export declare type UnitcellParams = typeof UnitcellParams;
@@ -47,11 +47,14 @@ export declare const ComplexMeshParams: {
47
47
  flatShaded: PD.BooleanParam;
48
48
  ignoreLight: PD.BooleanParam;
49
49
  xrayShaded: PD.BooleanParam;
50
+ bumpFrequency: PD.Numeric;
51
+ bumpAmplitude: PD.Numeric;
50
52
  alpha: PD.Numeric;
51
53
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
52
54
  material: PD.Group<PD.Normalize<{
53
55
  metalness: number;
54
56
  roughness: number;
57
+ bumpiness: number;
55
58
  }>>;
56
59
  };
57
60
  export declare type ComplexMeshParams = typeof ComplexMeshParams;
@@ -66,11 +69,14 @@ export declare const ComplexCylindersParams: {
66
69
  doubleSided: PD.BooleanParam;
67
70
  ignoreLight: PD.BooleanParam;
68
71
  xrayShaded: PD.BooleanParam;
72
+ bumpFrequency: PD.Numeric;
73
+ bumpAmplitude: PD.Numeric;
69
74
  alpha: PD.Numeric;
70
75
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
71
76
  material: PD.Group<PD.Normalize<{
72
77
  metalness: number;
73
78
  roughness: number;
79
+ bumpiness: number;
74
80
  }>>;
75
81
  };
76
82
  export declare type ComplexCylindersParams = typeof ComplexCylindersParams;
@@ -87,6 +93,7 @@ export declare const ComplexLinesParams: {
87
93
  material: PD.Group<PD.Normalize<{
88
94
  metalness: number;
89
95
  roughness: number;
96
+ bumpiness: number;
90
97
  }>>;
91
98
  };
92
99
  export declare type ComplexLinesParams = typeof ComplexLinesParams;
@@ -120,6 +127,7 @@ export declare const ComplexTextParams: {
120
127
  material: PD.Group<PD.Normalize<{
121
128
  metalness: number;
122
129
  roughness: number;
130
+ bumpiness: number;
123
131
  }>>;
124
132
  };
125
133
  export declare type ComplexTextParams = typeof ComplexTextParams;
@@ -157,6 +165,7 @@ export declare const ComplexDirectVolumeParams: {
157
165
  material: PD.Group<PD.Normalize<{
158
166
  metalness: number;
159
167
  roughness: number;
168
+ bumpiness: number;
160
169
  }>>;
161
170
  };
162
171
  export declare type ComplexDirectVolumeParams = typeof ComplexDirectVolumeParams;
@@ -171,11 +180,14 @@ export declare const ComplexTextureMeshParams: {
171
180
  flatShaded: PD.BooleanParam;
172
181
  ignoreLight: PD.BooleanParam;
173
182
  xrayShaded: PD.BooleanParam;
183
+ bumpFrequency: PD.Numeric;
184
+ bumpAmplitude: PD.Numeric;
174
185
  alpha: PD.Numeric;
175
186
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
176
187
  material: PD.Group<PD.Normalize<{
177
188
  metalness: number;
178
189
  roughness: number;
190
+ bumpiness: number;
179
191
  }>>;
180
192
  };
181
193
  export declare type ComplexTextureMeshParams = typeof ComplexTextureMeshParams;