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
@@ -30,11 +30,14 @@ export declare const CrossLinkRestraintCylinderParams: {
30
30
  flatShaded: PD.BooleanParam;
31
31
  ignoreLight: PD.BooleanParam;
32
32
  xrayShaded: PD.BooleanParam;
33
+ bumpFrequency: PD.Numeric;
34
+ bumpAmplitude: PD.Numeric;
33
35
  alpha: PD.Numeric;
34
36
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
35
37
  material: PD.Group<PD.Normalize<{
36
38
  metalness: number;
37
39
  roughness: number;
40
+ bumpiness: number;
38
41
  }>>;
39
42
  };
40
43
  export declare type CrossLinkRestraintCylinderParams = typeof CrossLinkRestraintCylinderParams;
@@ -59,11 +62,14 @@ export declare const CrossLinkRestraintParams: {
59
62
  flatShaded: PD.BooleanParam;
60
63
  ignoreLight: PD.BooleanParam;
61
64
  xrayShaded: PD.BooleanParam;
65
+ bumpFrequency: PD.Numeric;
66
+ bumpAmplitude: PD.Numeric;
62
67
  alpha: PD.Numeric;
63
68
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
64
69
  material: PD.Group<PD.Normalize<{
65
70
  metalness: number;
66
71
  roughness: number;
72
+ bumpiness: number;
67
73
  }>>;
68
74
  };
69
75
  export declare type CrossLinkRestraintParams = typeof CrossLinkRestraintParams;
@@ -87,11 +93,14 @@ export declare function getCrossLinkRestraintParams(ctx: ThemeRegistryContext, s
87
93
  flatShaded: PD.BooleanParam;
88
94
  ignoreLight: PD.BooleanParam;
89
95
  xrayShaded: PD.BooleanParam;
96
+ bumpFrequency: PD.Numeric;
97
+ bumpAmplitude: PD.Numeric;
90
98
  alpha: PD.Numeric;
91
99
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
92
100
  material: PD.Group<PD.Normalize<{
93
101
  metalness: number;
94
102
  roughness: number;
103
+ bumpiness: number;
95
104
  }>>;
96
105
  };
97
106
  export declare type CrossLinkRestraintRepresentation = StructureRepresentation<CrossLinkRestraintParams>;
@@ -116,10 +125,13 @@ export declare const CrossLinkRestraintRepresentationProvider: StructureRepresen
116
125
  flatShaded: PD.BooleanParam;
117
126
  ignoreLight: PD.BooleanParam;
118
127
  xrayShaded: PD.BooleanParam;
128
+ bumpFrequency: PD.Numeric;
129
+ bumpAmplitude: PD.Numeric;
119
130
  alpha: PD.Numeric;
120
131
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
121
132
  material: PD.Group<PD.Normalize<{
122
133
  metalness: number;
123
134
  roughness: number;
135
+ bumpiness: number;
124
136
  }>>;
125
137
  }, CrossLinkRestraint.Tag>;
@@ -24,6 +24,7 @@ declare const StructureFocusRepresentationParams: (plugin: PluginContext) => {
24
24
  material: PD.Group<PD.Normalize<{
25
25
  metalness: number;
26
26
  roughness: number;
27
+ bumpiness: number;
27
28
  }>>;
28
29
  };
29
30
  declare type StructureFocusRepresentationProps = PD.ValuesFor<ReturnType<typeof StructureFocusRepresentationParams>>;
@@ -9,12 +9,12 @@ import { Volume } from '../../../../mol-model/volume';
9
9
  import { Structure } from '../../../../mol-model/structure';
10
10
  declare const VolumeServerInfo_base: {
11
11
  new (data: VolumeServerInfo.Data, props?: {
12
- label: string; /** Precision data the server can show. */
12
+ /** Precision data the server can show. */
13
+ label: string;
13
14
  description?: string | undefined;
14
15
  } | undefined): {
15
16
  id: import("../../../../mol-util/uuid").UUID;
16
17
  type: PluginStateObject.TypeInfo;
17
- /** The value are stored in blockSize^3 cubes */
18
18
  label: string;
19
19
  description?: string | undefined;
20
20
  data: VolumeServerInfo.Data;
@@ -23,7 +23,6 @@ declare const VolumeServerInfo_base: {
23
23
  is(obj?: import("../../../../mol-state/object").StateObject<any, import("../../../../mol-state/object").StateObject.Type<any>> | undefined): obj is {
24
24
  id: import("../../../../mol-util/uuid").UUID;
25
25
  type: PluginStateObject.TypeInfo;
26
- /** The value are stored in blockSize^3 cubes */
27
26
  label: string;
28
27
  description?: string | undefined;
29
28
  data: VolumeServerInfo.Data;
@@ -232,6 +232,7 @@ export declare const PluginCommands: {
232
232
  outline: import("../mol-util/param-definition").ParamDefinition.NamedParams<import("../mol-util/param-definition").ParamDefinition.Normalize<unknown>, "off"> | import("../mol-util/param-definition").ParamDefinition.NamedParams<import("../mol-util/param-definition").ParamDefinition.Normalize<{
233
233
  scale: any;
234
234
  threshold: any;
235
+ color: any;
235
236
  }>, "on">;
236
237
  antialiasing: import("../mol-util/param-definition").ParamDefinition.NamedParams<import("../mol-util/param-definition").ParamDefinition.Normalize<unknown>, "off"> | import("../mol-util/param-definition").ParamDefinition.NamedParams<import("../mol-util/param-definition").ParamDefinition.Normalize<{
237
238
  edgeThreshold: any;
@@ -329,6 +330,8 @@ export declare const PluginCommands: {
329
330
  flipSided: any;
330
331
  flatShaded: any;
331
332
  xrayShaded: any;
333
+ bumpFrequency: any;
334
+ bumpAmplitude: any;
332
335
  quality: any;
333
336
  material: any;
334
337
  }>, "on">;
@@ -16,6 +16,7 @@ export declare class PluginConfigItem<T = any> {
16
16
  constructor(key: string, defaultValue?: T | undefined);
17
17
  }
18
18
  declare function item<T>(key: string, defaultValue?: T): PluginConfigItem<T>;
19
+ export declare function preferWebGl1(): boolean;
19
20
  export declare const PluginConfig: {
20
21
  item: typeof item;
21
22
  General: {
@@ -16,12 +16,17 @@ var PluginConfigItem = /** @class */ (function () {
16
16
  }());
17
17
  export { PluginConfigItem };
18
18
  function item(key, defaultValue) { return new PluginConfigItem(key, defaultValue); }
19
- function preferWebGl1() {
19
+ export function preferWebGl1() {
20
20
  if (typeof navigator === 'undefined' || typeof window === 'undefined')
21
21
  return false;
22
- // WebGL2 isn't working in MacOS 12.0.1 Safari 15.1 (but is working in Safari tech preview)
22
+ // WebGL2 isn't working in MacOS 12.0.1 Safari 15.1, 15.2. It is working in Safari 15.4 tech preview, so disabling all versions before that.
23
23
  // prefer webgl 1 based on the userAgent substring
24
- if (navigator.userAgent.indexOf('Version/15.1 Safari') > 0) {
24
+ var unpportedSafariVersions = [
25
+ 'Version/15.1 Safari',
26
+ 'Version/15.2 Safari',
27
+ 'Version/15.3 Safari'
28
+ ];
29
+ if (unpportedSafariVersions.some(function (v) { return navigator.userAgent.indexOf(v) > 0; })) {
25
30
  return true;
26
31
  }
27
32
  // Check for iOS device which enabled WebGL2 recently but it doesn't seem
@@ -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
  }>;
@@ -1,2 +1,2 @@
1
- export var PLUGIN_VERSION = '3.0.0-dev.3';
2
- export var PLUGIN_VERSION_DATE = new Date(typeof __MOLSTAR_DEBUG_TIMESTAMP__ !== 'undefined' ? __MOLSTAR_DEBUG_TIMESTAMP__ : 1638685340455);
1
+ export var PLUGIN_VERSION = '3.0.0-dev.4';
2
+ export var PLUGIN_VERSION_DATE = new Date(typeof __MOLSTAR_DEBUG_TIMESTAMP__ !== 'undefined' ? __MOLSTAR_DEBUG_TIMESTAMP__ : 1639488302617);
@@ -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;
@@ -1,13 +1,14 @@
1
1
  import { __assign, __extends, __spreadArray } from "tslib";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  /**
4
- * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
+ * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
5
5
  *
6
6
  * @author David Sehnal <david.sehnal@gmail.com>
7
7
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
8
8
  */
9
9
  import * as React from 'react';
10
10
  import { Mat4, Vec3 } from '../../mol-math/linear-algebra';
11
+ import { Asset } from '../../mol-util/assets';
11
12
  import { Color } from '../../mol-util/color';
12
13
  import { ColorListOptions, ColorListOptionsScale, ColorListOptionsSet, getColorListFromName } from '../../mol-util/color/lists';
13
14
  import { memoize1, memoizeLatest } from '../../mol-util/memoize';
@@ -18,11 +19,10 @@ import { PluginUIComponent } from '../base';
18
19
  import { ActionMenu } from './action-menu';
19
20
  import { ColorOptions, ColorValueOption, CombinedColorControl } from './color';
20
21
  import { Button, ControlGroup, ControlRow, ExpandGroup, IconButton, TextInput, ToggleButton } from './common';
21
- import { Icon, HelpOutlineSvg, CheckSvg, ClearSvg, BookmarksOutlinedSvg, MoreHorizSvg, ArrowDropDownSvg, ArrowRightSvg, ArrowDownwardSvg, ArrowUpwardSvg, DeleteOutlinedSvg, TuneSvg } from './icons';
22
+ import { ArrowDownwardSvg, ArrowDropDownSvg, ArrowRightSvg, ArrowUpwardSvg, BookmarksOutlinedSvg, CheckSvg, ClearSvg, DeleteOutlinedSvg, HelpOutlineSvg, Icon, MoreHorizSvg } from './icons';
22
23
  import { legendFor } from './legend';
23
24
  import { LineGraphComponent } from './line-graph/line-graph-component';
24
25
  import { Slider, Slider2 } from './slider';
25
- import { Asset } from '../../mol-util/assets';
26
26
  var ParameterControls = /** @class */ (function (_super) {
27
27
  __extends(ParameterControls, _super);
28
28
  function ParameterControls() {
@@ -1026,11 +1026,16 @@ var GroupControl = /** @class */ (function (_super) {
1026
1026
  GroupControl.prototype.change = function (value) {
1027
1027
  this.props.onChange({ name: this.props.name, param: this.props.param, value: value });
1028
1028
  };
1029
- GroupControl.prototype.presets = function () {
1029
+ GroupControl.prototype.pivotedPresets = function () {
1030
1030
  if (!this.props.param.presets)
1031
1031
  return null;
1032
1032
  var label = this.props.param.label || camelCaseToWords(this.props.name);
1033
- return _jsxs("div", __assign({ className: 'msp-control-group-wrapper' }, { children: [_jsx("div", __assign({ className: 'msp-control-group-header' }, { children: _jsxs("button", __assign({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleShowPresets }, { children: [_jsx(Icon, { svg: TuneSvg }, void 0), label, " Presets"] }), void 0) }), void 0), this.state.showPresets && _jsx(ActionMenu, { items: this.presetItems(this.props.param), onSelect: this.onSelectPreset }, void 0)] }), void 0);
1033
+ return _jsxs("div", __assign({ className: 'msp-control-group-wrapper' }, { children: [_jsx("div", __assign({ className: 'msp-control-group-header' }, { children: _jsxs("button", __assign({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleShowPresets }, { children: [_jsx(Icon, { svg: BookmarksOutlinedSvg }, void 0), label, " Presets"] }), void 0) }), void 0), this.state.showPresets && _jsx(ActionMenu, { items: this.presetItems(this.props.param), onSelect: this.onSelectPreset }, void 0)] }), void 0);
1034
+ };
1035
+ GroupControl.prototype.presets = function () {
1036
+ if (!this.props.param.presets)
1037
+ return null;
1038
+ return _jsxs(_Fragment, { children: [_jsx("div", __assign({ className: 'msp-control-group-presets-wrapper' }, { children: _jsx("div", __assign({ className: 'msp-control-group-header' }, { children: _jsxs("button", __assign({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleShowPresets }, { children: [_jsx(Icon, { svg: BookmarksOutlinedSvg }, void 0), "Presets"] }), void 0) }), void 0) }), void 0), this.state.showPresets && _jsx(ActionMenu, { items: this.presetItems(this.props.param), onSelect: this.onSelectPreset }, void 0)] }, void 0);
1034
1039
  };
1035
1040
  GroupControl.prototype.pivoted = function () {
1036
1041
  var key = this.props.param.pivot;
@@ -1047,7 +1052,7 @@ var GroupControl = /** @class */ (function (_super) {
1047
1052
  if (k !== key)
1048
1053
  filtered[k] = params[k];
1049
1054
  }
1050
- return _jsxs("div", __assign({ className: 'msp-mapped-parameter-group' }, { children: [ctrl, _jsx(IconButton, { svg: MoreHorizSvg, onClick: this.toggleExpanded, toggleState: this.state.isExpanded, title: "More Options" }, void 0), _jsxs("div", __assign({ className: 'msp-control-offset' }, { children: [this.presets(), _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);
1055
+ return _jsxs("div", __assign({ className: 'msp-mapped-parameter-group' }, { children: [ctrl, _jsx(IconButton, { svg: MoreHorizSvg, onClick: this.toggleExpanded, toggleState: this.state.isExpanded, title: "More Options" }, void 0), _jsxs("div", __assign({ className: 'msp-control-offset' }, { children: [this.pivotedPresets(), _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);
1051
1056
  };
1052
1057
  GroupControl.prototype.render = function () {
1053
1058
  var params = this.props.param.params;
@@ -1064,7 +1069,7 @@ var GroupControl = /** @class */ (function (_super) {
1064
1069
  if (this.props.param.isFlat) {
1065
1070
  return controls;
1066
1071
  }
1067
- return _jsxs("div", __assign({ className: 'msp-control-group-wrapper' }, { children: [_jsx("div", __assign({ className: 'msp-control-group-header' }, { children: _jsxs("button", __assign({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleExpanded }, { children: [_jsx(Icon, { svg: this.state.isExpanded ? ArrowDropDownSvg : ArrowRightSvg }, void 0), label] }), void 0) }), void 0), this.state.isExpanded && _jsxs("div", __assign({ className: 'msp-control-offset' }, { children: [this.presets(), controls] }), void 0)] }), void 0);
1072
+ return _jsxs("div", __assign({ className: 'msp-control-group-wrapper', style: { position: 'relative' } }, { children: [_jsx("div", __assign({ className: 'msp-control-group-header' }, { children: _jsxs("button", __assign({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleExpanded }, { children: [_jsx(Icon, { svg: this.state.isExpanded ? ArrowDropDownSvg : ArrowRightSvg }, void 0), label] }), void 0) }), void 0), this.presets(), this.state.isExpanded && _jsx("div", __assign({ className: 'msp-control-offset' }, { children: controls }), void 0)] }), void 0);
1068
1073
  };
1069
1074
  return GroupControl;
1070
1075
  }(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,33 +1,24 @@
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
  */
6
- import { useEffect, useState } from 'react';
6
+ import { useEffect, useRef, useState } from 'react';
7
7
  // eslint-disable-next-line
8
8
  export function useBehavior(s) {
9
- var _a = useState(s === null || s === void 0 ? void 0 : s.value), value = _a[0], setValue = _a[1];
9
+ var _a = useState({}), next = _a[1];
10
+ var current = useRef();
11
+ current.current = s === null || s === void 0 ? void 0 : s.value;
10
12
  useEffect(function () {
11
13
  if (!s) {
12
- if (value !== void 0)
13
- setValue(void 0);
14
14
  return;
15
15
  }
16
- var fst = true;
17
16
  var sub = s.subscribe(function (v) {
18
- if (fst) {
19
- fst = false;
20
- if (v !== value)
21
- setValue(v);
22
- }
23
- else
24
- setValue(v);
17
+ if (current.current !== v)
18
+ next({});
25
19
  });
26
- return function () {
27
- sub.unsubscribe();
28
- };
29
- // eslint-disable-next-line
20
+ return function () { return sub.unsubscribe(); };
30
21
  }, [s]);
31
- return value;
22
+ return s === null || s === void 0 ? void 0 : s.value;
32
23
  }
33
24
  //# 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>
@@ -10,6 +10,10 @@ import { BackgroundTaskProgress, OverlayTaskProgress } from './task';
10
10
  import { Toasts } from './toast';
11
11
  import { Viewport, ViewportControls } from './viewport';
12
12
  import { PluginCommands } from '../mol-plugin/commands';
13
+ import { OpenFiles } from '../mol-plugin-state/actions/file';
14
+ import { Asset } from '../mol-util/assets';
15
+ import { BehaviorSubject } from 'rxjs';
16
+ import { useBehavior } from './hooks/use-behavior';
13
17
  var Plugin = /** @class */ (function (_super) {
14
18
  __extends(Plugin, _super);
15
19
  function Plugin() {
@@ -41,29 +45,44 @@ var Layout = /** @class */ (function (_super) {
41
45
  var _this = _super !== null && _super.apply(this, arguments) || this;
42
46
  _this.onDrop = function (ev) {
43
47
  ev.preventDefault();
44
- var file;
48
+ var files = [];
45
49
  if (ev.dataTransfer.items) {
46
50
  // Use DataTransferItemList interface to access the file(s)
47
51
  for (var i = 0; i < ev.dataTransfer.items.length; i++) {
48
52
  if (ev.dataTransfer.items[i].kind !== 'file')
49
53
  continue;
50
- file = ev.dataTransfer.items[i].getAsFile();
51
- break;
54
+ var file = ev.dataTransfer.items[i].getAsFile();
55
+ if (file)
56
+ files.push(file);
52
57
  }
53
58
  }
54
59
  else {
55
- file = ev.dataTransfer.files[0];
60
+ for (var i = 0; i < ev.dataTransfer.files.length; i++) {
61
+ var file = ev.dataTransfer.files[0];
62
+ if (file)
63
+ files.push(file);
64
+ }
65
+ }
66
+ var sessions = files.filter(function (f) {
67
+ var fn = f.name.toLowerCase();
68
+ return fn.endsWith('.molx') || fn.endsWith('.molj');
69
+ });
70
+ if (sessions.length > 0) {
71
+ PluginCommands.State.Snapshots.OpenFile(_this.plugin, { file: sessions[0] });
56
72
  }
57
- if (!file)
58
- return;
59
- var fn = (file === null || file === void 0 ? void 0 : file.name.toLowerCase()) || '';
60
- if (fn.endsWith('molx') || fn.endsWith('molj')) {
61
- PluginCommands.State.Snapshots.OpenFile(_this.plugin, { file: file });
73
+ else {
74
+ _this.plugin.runTask(_this.plugin.state.data.applyAction(OpenFiles, {
75
+ files: files.map(function (f) { return Asset.File(f); }),
76
+ format: { name: 'auto', params: {} },
77
+ visuals: true
78
+ }));
62
79
  }
63
80
  };
64
81
  _this.onDragOver = function (ev) {
65
82
  ev.preventDefault();
66
83
  };
84
+ _this.showDragOverlay = new BehaviorSubject(false);
85
+ _this.onDragEnter = function () { return _this.showDragOverlay.next(true); };
67
86
  return _this;
68
87
  }
69
88
  Layout.prototype.componentDidMount = function () {
@@ -119,10 +138,57 @@ var Layout = /** @class */ (function (_super) {
119
138
  var layout = this.plugin.layout.state;
120
139
  var controls = ((_a = this.plugin.spec.components) === null || _a === void 0 ? void 0 : _a.controls) || {};
121
140
  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;
122
- return _jsx("div", __assign({ className: 'msp-plugin', onDrop: this.onDrop, onDragOver: this.onDragOver }, { children: _jsxs("div", __assign({ className: this.layoutClassName }, { children: [_jsxs("div", __assign({ className: this.layoutVisibilityClassName }, { children: [this.region('main', viewport), layout.showControls && controls.top !== 'none' && this.region('top', controls.top || SequenceView), layout.showControls && controls.left !== 'none' && this.region('left', controls.left || 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) && _jsx(OverlayTaskProgress, {}, void 0)] }), void 0) }), void 0);
141
+ return _jsx("div", __assign({ className: 'msp-plugin' }, { children: _jsxs("div", __assign({ className: this.layoutClassName, onDragEnter: this.onDragEnter }, { children: [_jsxs("div", __assign({ className: this.layoutVisibilityClassName }, { children: [this.region('main', viewport), layout.showControls && controls.top !== 'none' && this.region('top', controls.top || SequenceView), layout.showControls && controls.left !== 'none' && this.region('left', controls.left || 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) && _jsx(OverlayTaskProgress, {}, void 0), _jsx(DragOverlay, { plugin: this.plugin, showDragOverlay: this.showDragOverlay }, void 0)] }), void 0) }), void 0);
123
142
  };
124
143
  return Layout;
125
144
  }(PluginUIComponent));
145
+ function dropFiles(ev, plugin, showDragOverlay) {
146
+ ev.preventDefault();
147
+ ev.stopPropagation();
148
+ showDragOverlay.next(false);
149
+ var files = [];
150
+ if (ev.dataTransfer.items) {
151
+ // Use DataTransferItemList interface to access the file(s)
152
+ for (var i = 0; i < ev.dataTransfer.items.length; i++) {
153
+ if (ev.dataTransfer.items[i].kind !== 'file')
154
+ continue;
155
+ var file = ev.dataTransfer.items[i].getAsFile();
156
+ if (file)
157
+ files.push(file);
158
+ }
159
+ }
160
+ else {
161
+ for (var i = 0; i < ev.dataTransfer.files.length; i++) {
162
+ var file = ev.dataTransfer.files[0];
163
+ if (file)
164
+ files.push(file);
165
+ }
166
+ }
167
+ var sessions = files.filter(function (f) {
168
+ var fn = f.name.toLowerCase();
169
+ return fn.endsWith('.molx') || fn.endsWith('.molj');
170
+ });
171
+ if (sessions.length > 0) {
172
+ PluginCommands.State.Snapshots.OpenFile(plugin, { file: sessions[0] });
173
+ }
174
+ else {
175
+ plugin.runTask(plugin.state.data.applyAction(OpenFiles, {
176
+ files: files.map(function (f) { return Asset.File(f); }),
177
+ format: { name: 'auto', params: {} },
178
+ visuals: true
179
+ }));
180
+ }
181
+ }
182
+ function DragOverlay(_a) {
183
+ var plugin = _a.plugin, showDragOverlay = _a.showDragOverlay;
184
+ var show = useBehavior(showDragOverlay);
185
+ var preventDrag = function (e) {
186
+ e.dataTransfer.dropEffect = 'copy';
187
+ e.preventDefault();
188
+ e.stopPropagation();
189
+ };
190
+ return _jsx("div", __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);
191
+ }
126
192
  var ControlsWrapper = /** @class */ (function (_super) {
127
193
  __extends(ControlsWrapper, _super);
128
194
  function ControlsWrapper() {