molstar 3.7.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +202 -202
  3. package/build/viewer/embedded.html +43 -43
  4. package/build/viewer/index.html +106 -106
  5. package/build/viewer/molstar.js +1 -1
  6. package/build/viewer/molstar.js.LICENSE.txt +0 -15
  7. package/lib/apps/docking-viewer/index.html +36 -36
  8. package/lib/apps/viewer/embedded.html +43 -43
  9. package/lib/apps/viewer/index.html +106 -106
  10. package/lib/cli/chem-comp-dict/create-ions.d.ts +2 -1
  11. package/lib/cli/chem-comp-dict/create-ions.js +3 -2
  12. package/lib/cli/cifschema/index.js +1 -1
  13. package/lib/cli/cifschema/util/cif-dic.js +1 -0
  14. package/lib/commonjs/cli/chem-comp-dict/create-ions.d.ts +2 -1
  15. package/lib/commonjs/cli/chem-comp-dict/create-ions.js +3 -2
  16. package/lib/commonjs/cli/cifschema/index.js +1 -1
  17. package/lib/commonjs/cli/cifschema/util/cif-dic.js +1 -0
  18. package/lib/commonjs/examples/proteopedia-wrapper/coloring.d.ts +20 -5
  19. package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +284 -0
  20. package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +0 -2
  21. package/lib/commonjs/mol-canvas3d/passes/draw.js +35 -70
  22. package/lib/commonjs/mol-canvas3d/passes/pick.d.ts +1 -1
  23. package/lib/commonjs/mol-canvas3d/passes/pick.js +1 -1
  24. package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +1 -0
  25. package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +16 -11
  26. package/lib/commonjs/mol-geo/geometry/color-data.d.ts +5 -2
  27. package/lib/commonjs/mol-geo/geometry/color-data.js +7 -17
  28. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +1 -1
  29. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +2 -2
  30. package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +1 -0
  31. package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +2 -2
  32. package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
  33. package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +2 -2
  34. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
  35. package/lib/commonjs/mol-geo/geometry/transparency-data.d.ts +1 -1
  36. package/lib/commonjs/mol-geo/geometry/transparency-data.js +3 -1
  37. package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +1 -1
  38. package/lib/commonjs/mol-gl/renderable/cylinders.js +1 -1
  39. package/lib/commonjs/mol-gl/renderable/mesh.d.ts +1 -1
  40. package/lib/commonjs/mol-gl/renderable/mesh.js +1 -1
  41. package/lib/commonjs/mol-gl/renderable/schema.d.ts +2 -2
  42. package/lib/commonjs/mol-gl/renderable/schema.js +2 -2
  43. package/lib/commonjs/mol-gl/renderable/spheres.d.ts +1 -1
  44. package/lib/commonjs/mol-gl/renderable/spheres.js +1 -1
  45. package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +1 -1
  46. package/lib/commonjs/mol-gl/renderable/texture-mesh.js +1 -1
  47. package/lib/commonjs/mol-gl/renderer.d.ts +5 -5
  48. package/lib/commonjs/mol-gl/renderer.js +64 -45
  49. package/lib/commonjs/mol-gl/scene.d.ts +1 -0
  50. package/lib/commonjs/mol-gl/scene.js +26 -1
  51. package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
  52. package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
  53. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
  54. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
  55. package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
  56. package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
  57. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
  58. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
  59. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
  60. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +1 -1
  61. package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.d.ts +1 -1
  62. package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
  63. package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  64. package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
  65. package/lib/commonjs/mol-gl/shader/image.frag.d.ts +1 -1
  66. package/lib/commonjs/mol-gl/shader/image.frag.js +1 -1
  67. package/lib/commonjs/mol-gl/shader/outlines.frag.d.ts +3 -2
  68. package/lib/commonjs/mol-gl/shader/outlines.frag.js +3 -2
  69. package/lib/commonjs/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  70. package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +1 -1
  71. package/lib/commonjs/mol-gl/shader/ssao.frag.d.ts +2 -2
  72. package/lib/commonjs/mol-gl/shader/ssao.frag.js +2 -2
  73. package/lib/commonjs/mol-gl/webgl/render-target.d.ts +3 -1
  74. package/lib/commonjs/mol-gl/webgl/render-target.js +3 -1
  75. package/lib/commonjs/mol-gl/webgl/renderbuffer.d.ts +2 -1
  76. package/lib/commonjs/mol-gl/webgl/renderbuffer.js +8 -1
  77. package/lib/commonjs/mol-gl/webgl/state.d.ts +7 -1
  78. package/lib/commonjs/mol-gl/webgl/state.js +28 -1
  79. package/lib/commonjs/mol-gl/webgl/texture.js +3 -0
  80. package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
  81. package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
  82. package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  83. package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
  84. package/lib/commonjs/mol-io/reader/cif/schema/cif-core.d.ts +1 -1
  85. package/lib/commonjs/mol-io/reader/cif/schema/cif-core.js +1 -1
  86. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +3 -4
  87. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +2 -3
  88. package/lib/commonjs/mol-io/reader/dx/parser.js +1 -1
  89. package/lib/commonjs/mol-math/geometry/lookup3d/grid.d.ts +1 -1
  90. package/lib/commonjs/mol-math/geometry/lookup3d/grid.js +3 -3
  91. package/lib/commonjs/mol-model/structure/model/properties/seconday-structure.d.ts +4 -2
  92. package/lib/commonjs/mol-model/structure/model/properties/seconday-structure.js +2 -1
  93. package/lib/commonjs/mol-model/structure/model/types/ions.d.ts +2 -2
  94. package/lib/commonjs/mol-model/structure/model/types/ions.js +2 -2
  95. package/lib/commonjs/mol-model/structure/model/types/saccharides.js +1 -1
  96. package/lib/commonjs/mol-model/structure/model/types.d.ts +1 -1
  97. package/lib/commonjs/mol-model/structure/model/types.js +43 -41
  98. package/lib/commonjs/mol-model-formats/structure/common/property.js +2 -0
  99. package/lib/commonjs/mol-model-formats/structure/property/secondary-structure.d.ts +1 -1
  100. package/lib/commonjs/mol-model-formats/structure/property/secondary-structure.js +2 -2
  101. package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
  102. package/lib/commonjs/mol-plugin-state/helpers/root-structure.js +3 -1
  103. package/lib/commonjs/mol-repr/volume/slice.js +1 -1
  104. package/lib/commonjs/mol-script/language/builder.d.ts +0 -1
  105. package/lib/commonjs/mol-theme/color/volume-value.d.ts +3 -2
  106. package/lib/commonjs/mol-theme/color/volume-value.js +1 -3
  107. package/lib/commonjs/mol-theme/color.d.ts +47 -38
  108. package/lib/commonjs/mol-theme/theme.d.ts +8 -7
  109. package/lib/commonjs/mol-theme/theme.js +1 -1
  110. package/lib/examples/alpha-orbitals/index.html +61 -61
  111. package/lib/examples/basic-wrapper/index.html +137 -137
  112. package/lib/examples/lighting/index.html +88 -88
  113. package/lib/examples/proteopedia-wrapper/coloring.d.ts +20 -5
  114. package/lib/examples/proteopedia-wrapper/index.html +236 -236
  115. package/lib/extensions/rcsb/graphql/types.d.ts +284 -0
  116. package/lib/mol-canvas3d/passes/draw.d.ts +0 -2
  117. package/lib/mol-canvas3d/passes/draw.js +32 -67
  118. package/lib/mol-canvas3d/passes/pick.d.ts +1 -1
  119. package/lib/mol-canvas3d/passes/pick.js +1 -1
  120. package/lib/mol-canvas3d/passes/postprocessing.d.ts +1 -0
  121. package/lib/mol-canvas3d/passes/postprocessing.js +16 -11
  122. package/lib/mol-geo/geometry/color-data.d.ts +5 -2
  123. package/lib/mol-geo/geometry/color-data.js +7 -17
  124. package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +1 -1
  125. package/lib/mol-geo/geometry/cylinders/cylinders.js +2 -2
  126. package/lib/mol-geo/geometry/lines/lines.d.ts +1 -0
  127. package/lib/mol-geo/geometry/mesh/mesh.js +2 -2
  128. package/lib/mol-geo/geometry/points/points.d.ts +1 -1
  129. package/lib/mol-geo/geometry/spheres/spheres.js +2 -2
  130. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
  131. package/lib/mol-geo/geometry/transparency-data.d.ts +1 -1
  132. package/lib/mol-geo/geometry/transparency-data.js +3 -1
  133. package/lib/mol-gl/renderable/cylinders.d.ts +1 -1
  134. package/lib/mol-gl/renderable/cylinders.js +1 -1
  135. package/lib/mol-gl/renderable/mesh.d.ts +1 -1
  136. package/lib/mol-gl/renderable/mesh.js +1 -1
  137. package/lib/mol-gl/renderable/schema.d.ts +2 -2
  138. package/lib/mol-gl/renderable/schema.js +2 -2
  139. package/lib/mol-gl/renderable/spheres.d.ts +1 -1
  140. package/lib/mol-gl/renderable/spheres.js +1 -1
  141. package/lib/mol-gl/renderable/texture-mesh.d.ts +1 -1
  142. package/lib/mol-gl/renderable/texture-mesh.js +1 -1
  143. package/lib/mol-gl/renderer.d.ts +5 -5
  144. package/lib/mol-gl/renderer.js +64 -45
  145. package/lib/mol-gl/scene.d.ts +1 -0
  146. package/lib/mol-gl/scene.js +26 -1
  147. package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
  148. package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
  149. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
  150. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
  151. package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
  152. package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
  153. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
  154. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
  155. package/lib/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
  156. package/lib/mol-gl/shader/chunks/common.glsl.js +1 -1
  157. package/lib/mol-gl/shader/chunks/wboit-write.glsl.d.ts +1 -1
  158. package/lib/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
  159. package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  160. package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
  161. package/lib/mol-gl/shader/image.frag.d.ts +1 -1
  162. package/lib/mol-gl/shader/image.frag.js +1 -1
  163. package/lib/mol-gl/shader/outlines.frag.d.ts +3 -2
  164. package/lib/mol-gl/shader/outlines.frag.js +3 -2
  165. package/lib/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  166. package/lib/mol-gl/shader/postprocessing.frag.js +1 -1
  167. package/lib/mol-gl/shader/ssao.frag.d.ts +2 -2
  168. package/lib/mol-gl/shader/ssao.frag.js +2 -2
  169. package/lib/mol-gl/webgl/render-target.d.ts +3 -1
  170. package/lib/mol-gl/webgl/render-target.js +3 -1
  171. package/lib/mol-gl/webgl/renderbuffer.d.ts +2 -1
  172. package/lib/mol-gl/webgl/renderbuffer.js +8 -1
  173. package/lib/mol-gl/webgl/state.d.ts +7 -1
  174. package/lib/mol-gl/webgl/state.js +28 -1
  175. package/lib/mol-gl/webgl/texture.js +3 -0
  176. package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
  177. package/lib/mol-io/reader/cif/schema/bird.js +1 -1
  178. package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  179. package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
  180. package/lib/mol-io/reader/cif/schema/cif-core.d.ts +1 -1
  181. package/lib/mol-io/reader/cif/schema/cif-core.js +1 -1
  182. package/lib/mol-io/reader/cif/schema/mmcif.d.ts +3 -4
  183. package/lib/mol-io/reader/cif/schema/mmcif.js +2 -3
  184. package/lib/mol-io/reader/dx/parser.js +1 -1
  185. package/lib/mol-math/geometry/lookup3d/grid.d.ts +1 -1
  186. package/lib/mol-math/geometry/lookup3d/grid.js +3 -3
  187. package/lib/mol-model/structure/model/properties/seconday-structure.d.ts +4 -2
  188. package/lib/mol-model/structure/model/properties/seconday-structure.js +2 -1
  189. package/lib/mol-model/structure/model/types/ions.d.ts +2 -2
  190. package/lib/mol-model/structure/model/types/ions.js +2 -2
  191. package/lib/mol-model/structure/model/types/saccharides.js +1 -1
  192. package/lib/mol-model/structure/model/types.d.ts +1 -1
  193. package/lib/mol-model/structure/model/types.js +43 -41
  194. package/lib/mol-model-formats/structure/common/property.js +2 -0
  195. package/lib/mol-model-formats/structure/property/secondary-structure.d.ts +1 -1
  196. package/lib/mol-model-formats/structure/property/secondary-structure.js +2 -2
  197. package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
  198. package/lib/mol-plugin/version.js +2 -2
  199. package/lib/mol-plugin-state/helpers/root-structure.js +3 -1
  200. package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
  201. package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
  202. package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
  203. package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
  204. package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
  205. package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
  206. package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
  207. package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
  208. package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
  209. package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
  210. package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
  211. package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
  212. package/lib/mol-plugin-ui/skin/base/components/viewport.scss +128 -128
  213. package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
  214. package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
  215. package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
  216. package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
  217. package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
  218. package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
  219. package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
  220. package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
  221. package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
  222. package/lib/mol-plugin-ui/skin/blue.scss +1 -1
  223. package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
  224. package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
  225. package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
  226. package/lib/mol-plugin-ui/skin/dark.scss +1 -1
  227. package/lib/mol-plugin-ui/skin/light.scss +1 -1
  228. package/lib/mol-repr/volume/slice.js +1 -1
  229. package/lib/mol-script/language/builder.d.ts +0 -1
  230. package/lib/mol-theme/color/volume-value.d.ts +3 -2
  231. package/lib/mol-theme/color/volume-value.js +2 -4
  232. package/lib/mol-theme/color.d.ts +47 -38
  233. package/lib/mol-theme/theme.d.ts +8 -7
  234. package/lib/mol-theme/theme.js +1 -1
  235. package/package.json +162 -162
@@ -1,24 +1,24 @@
1
- $default-background: #2D3E50;
2
- $font-color: #EDF1F2;
3
- $hover-font-color: #3B9AD9;
4
- $entity-current-font-color: #FFFFFF;
5
- $msp-btn-remove-background: #BF3A31;
6
- $msp-btn-remove-hover-font-color:#ffffff;
7
- $msp-btn-commit-on-font-color: #ffffff;
8
- $entity-badge-font-color: #ccd4e0;
9
-
10
- // used in LOG
11
- $log-message: #0CCA5D;
12
- $log-info: #5E3673;
13
- $log-warning: #FCC937;
14
- $log-error: #FD354B;
15
-
16
- $logo-background: rgba(0,0,0,0.75);
17
-
18
- @function color-lower-contrast($color, $amount) {
19
- @return darken($color, $amount);
20
- }
21
-
22
- @function color-increase-contrast($color, $amount) {
23
- @return lighten($color, $amount);
1
+ $default-background: #2D3E50;
2
+ $font-color: #EDF1F2;
3
+ $hover-font-color: #3B9AD9;
4
+ $entity-current-font-color: #FFFFFF;
5
+ $msp-btn-remove-background: #BF3A31;
6
+ $msp-btn-remove-hover-font-color:#ffffff;
7
+ $msp-btn-commit-on-font-color: #ffffff;
8
+ $entity-badge-font-color: #ccd4e0;
9
+
10
+ // used in LOG
11
+ $log-message: #0CCA5D;
12
+ $log-info: #5E3673;
13
+ $log-warning: #FCC937;
14
+ $log-error: #FD354B;
15
+
16
+ $logo-background: rgba(0,0,0,0.75);
17
+
18
+ @function color-lower-contrast($color, $amount) {
19
+ @return darken($color, $amount);
20
+ }
21
+
22
+ @function color-increase-contrast($color, $amount) {
23
+ @return lighten($color, $amount);
24
24
  }
@@ -1,24 +1,24 @@
1
- $default-background: #111318;
2
- $font-color: #ccd4e0;
3
- $hover-font-color: #51A2FB;
4
- $entity-current-font-color: #68BEFD;
5
- $msp-btn-remove-background: #DE0A28;
6
- $msp-btn-remove-hover-font-color:#F2F4F7;
7
- $msp-btn-commit-on-font-color: #68BEFD;
8
- $entity-badge-font-color: #ccd4e0;
9
-
10
- // used in LOG
11
- $log-message: #0CCA5D;
12
- $log-info: #5E3673;
13
- $log-warning: #FCC937;
14
- $log-error: #FD354B;
15
-
16
- $logo-background: rgba(0,0,0,0.75);
17
-
18
- @function color-lower-contrast($color, $amount) {
19
- @return darken($color, $amount);
20
- }
21
-
22
- @function color-increase-contrast($color, $amount) {
23
- @return lighten($color, $amount);
1
+ $default-background: #111318;
2
+ $font-color: #ccd4e0;
3
+ $hover-font-color: #51A2FB;
4
+ $entity-current-font-color: #68BEFD;
5
+ $msp-btn-remove-background: #DE0A28;
6
+ $msp-btn-remove-hover-font-color:#F2F4F7;
7
+ $msp-btn-commit-on-font-color: #68BEFD;
8
+ $entity-badge-font-color: #ccd4e0;
9
+
10
+ // used in LOG
11
+ $log-message: #0CCA5D;
12
+ $log-info: #5E3673;
13
+ $log-warning: #FCC937;
14
+ $log-error: #FD354B;
15
+
16
+ $logo-background: rgba(0,0,0,0.75);
17
+
18
+ @function color-lower-contrast($color, $amount) {
19
+ @return darken($color, $amount);
20
+ }
21
+
22
+ @function color-increase-contrast($color, $amount) {
23
+ @return lighten($color, $amount);
24
24
  }
@@ -1,30 +1,30 @@
1
- // this is complement of the dark theme
2
-
3
- @function compl($color) {
4
- @return rgb(255 - red($color), 255 - green($color), 255 - blue($color));
5
- }
6
-
7
- $default-background: compl(#111318);
8
- $font-color: compl(#ccd4e0);
9
- $hover-font-color: compl(#51A2FB);
10
- $entity-current-font-color: compl(#68BEFD);
11
- $msp-btn-commit-on-font-color: compl(#68BEFD);
12
- $entity-badge-font-color: lighten(#ccd4e0,10%);
13
- $msp-btn-remove-background: #DE0A28;
14
- $msp-btn-remove-hover-font-color:#F2F4F7;
15
-
16
- // used in LOG
17
- $log-message: #0CCA5D;
18
- $log-info: #5E3673;
19
- $log-warning: #FCC937;
20
- $log-error: #FD354B;
21
-
22
- $logo-background: compl(#111318);
23
-
24
- @function color-lower-contrast($color, $amount) {
25
- @return lighten($color, $amount);
26
- }
27
-
28
- @function color-increase-contrast($color, $amount) {
29
- @return darken($color, $amount);
1
+ // this is complement of the dark theme
2
+
3
+ @function compl($color) {
4
+ @return rgb(255 - red($color), 255 - green($color), 255 - blue($color));
5
+ }
6
+
7
+ $default-background: compl(#111318);
8
+ $font-color: compl(#ccd4e0);
9
+ $hover-font-color: compl(#51A2FB);
10
+ $entity-current-font-color: compl(#68BEFD);
11
+ $msp-btn-commit-on-font-color: compl(#68BEFD);
12
+ $entity-badge-font-color: lighten(#ccd4e0,10%);
13
+ $msp-btn-remove-background: #DE0A28;
14
+ $msp-btn-remove-hover-font-color:#F2F4F7;
15
+
16
+ // used in LOG
17
+ $log-message: #0CCA5D;
18
+ $log-info: #5E3673;
19
+ $log-warning: #FCC937;
20
+ $log-error: #FD354B;
21
+
22
+ $logo-background: compl(#111318);
23
+
24
+ @function color-lower-contrast($color, $amount) {
25
+ @return lighten($color, $amount);
26
+ }
27
+
28
+ @function color-increase-contrast($color, $amount) {
29
+ @return darken($color, $amount);
30
30
  }
@@ -1,2 +1,2 @@
1
- @import 'colors/dark';
1
+ @import 'colors/dark';
2
2
  @import 'base/base';
@@ -1,2 +1,2 @@
1
- @import 'colors/light';
1
+ @import 'colors/light';
2
2
  @import 'base/base';
@@ -25,7 +25,7 @@ export function createImage(ctx, volume, theme, props, image) {
25
25
  _a = volume.grid.cells, space = _a.space, data = _a.data;
26
26
  _b = volume.grid.stats, min = _b.min, max = _b.max;
27
27
  isoVal = Volume.IsoValue.toAbsolute(isoValue, volume.grid.stats).absoluteValue;
28
- color = theme.color.color(NullLocation, false);
28
+ color = 'color' in theme.color ? theme.color.color(NullLocation, false) : Color(0xffffff);
29
29
  _c = Color.toRgbNormalized(color), r = _c[0], g = _c[1], b = _c[2];
30
30
  _d = getSliceInfo(volume.grid, props), width = _d.width, height = _d.height, x = _d.x, y = _d.y, z = _d.z, x0 = _d.x0, y0 = _d.y0, z0 = _d.z0, nx = _d.nx, ny = _d.ny, nz = _d.nz;
31
31
  corners = new Float32Array(dim === 'x' ? [x, 0, 0, x, y, 0, x, 0, z, x, y, z] :
@@ -10,7 +10,6 @@ export declare namespace MolScriptBuilder {
10
10
  '@header': string;
11
11
  type: {
12
12
  '@header': string;
13
- /** atom macromolecular property set */
14
13
  bool: MSymbol<import("./symbol").Arguments<import("./symbol").Arguments.PropTypes<{
15
14
  0: import("./symbol").Argument<import("./type").Type.AnyValue>;
16
15
  }>>, import("./type").Type.OneOf<boolean>>;
@@ -1,11 +1,12 @@
1
1
  /**
2
- * Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2021-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
6
6
  import { ColorTheme } from '../color';
7
7
  import { ParamDefinition as PD } from '../../mol-util/param-definition';
8
8
  import { ThemeDataContext } from '../theme';
9
+ import { ColorTypeDirect } from '../../mol-geo/geometry/color-data';
9
10
  export declare const VolumeValueColorThemeParams: {
10
11
  colorList: PD.ColorList;
11
12
  };
@@ -13,5 +14,5 @@ export declare type VolumeValueColorThemeParams = typeof VolumeValueColorThemePa
13
14
  export declare function getVolumeValueColorThemeParams(ctx: ThemeDataContext): {
14
15
  colorList: PD.ColorList;
15
16
  };
16
- export declare function VolumeValueColorTheme(ctx: ThemeDataContext, props: PD.Values<VolumeValueColorThemeParams>): ColorTheme<VolumeValueColorThemeParams>;
17
+ export declare function VolumeValueColorTheme(ctx: ThemeDataContext, props: PD.Values<VolumeValueColorThemeParams>): ColorTheme<VolumeValueColorThemeParams, ColorTypeDirect>;
17
18
  export declare const VolumeValueColorThemeProvider: ColorTheme.Provider<VolumeValueColorThemeParams, 'volume-value'>;
@@ -1,12 +1,11 @@
1
1
  /**
2
- * Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2021-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
6
- import { Color, ColorScale } from '../../mol-util/color';
6
+ import { ColorScale } from '../../mol-util/color';
7
7
  import { ParamDefinition as PD } from '../../mol-util/param-definition';
8
8
  import { ColorNames } from '../../mol-util/color/names';
9
- var DefaultColor = Color(0xCCCCCC);
10
9
  var Description = 'Assign color based on the given value of a volume cell.';
11
10
  export var VolumeValueColorThemeParams = {
12
11
  colorList: PD.ColorList({
@@ -33,7 +32,6 @@ export function VolumeValueColorTheme(ctx, props) {
33
32
  return {
34
33
  factory: VolumeValueColorTheme,
35
34
  granularity: 'direct',
36
- color: function () { return DefaultColor; },
37
35
  props: props,
38
36
  description: Description,
39
37
  legend: scale.legend,
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { Color } from '../mol-util/color';
7
7
  import { Location } from '../mol-model/location';
8
- import { ColorType } from '../mol-geo/geometry/color-data';
8
+ import { ColorType, ColorTypeDirect, ColorTypeGrid, ColorTypeLocation } from '../mol-geo/geometry/color-data';
9
9
  import { ParamDefinition as PD } from '../mol-util/param-definition';
10
10
  import { ThemeDataContext, ThemeRegistry, ThemeProvider } from './theme';
11
11
  import { ScaleLegend, TableLegend } from '../mol-util/legend';
@@ -18,12 +18,9 @@ export interface ColorVolume {
18
18
  transform: Vec4;
19
19
  }
20
20
  export { ColorTheme };
21
- interface ColorTheme<P extends PD.Params> {
22
- readonly factory: ColorTheme.Factory<P>;
23
- readonly granularity: ColorType;
24
- readonly color: LocationColor;
21
+ declare type ColorThemeShared<P extends PD.Params, G extends ColorType> = {
22
+ readonly factory: ColorTheme.Factory<P, G>;
25
23
  readonly props: Readonly<PD.Values<P>>;
26
- readonly grid?: ColorVolume;
27
24
  /**
28
25
  * if palette is defined, 24bit RGB color value normalized to interval [0, 1]
29
26
  * is used as index to the colors
@@ -33,7 +30,19 @@ interface ColorTheme<P extends PD.Params> {
33
30
  readonly contextHash?: number;
34
31
  readonly description?: string;
35
32
  readonly legend?: Readonly<ScaleLegend | TableLegend>;
36
- }
33
+ };
34
+ declare type ColorThemeLocation<P extends PD.Params> = {
35
+ readonly granularity: ColorTypeLocation;
36
+ readonly color: LocationColor;
37
+ } & ColorThemeShared<P, ColorTypeLocation>;
38
+ declare type ColorThemeGrid<P extends PD.Params> = {
39
+ readonly granularity: ColorTypeGrid;
40
+ readonly grid: ColorVolume;
41
+ } & ColorThemeShared<P, ColorTypeGrid>;
42
+ declare type ColorThemeDirect<P extends PD.Params> = {
43
+ readonly granularity: ColorTypeDirect;
44
+ } & ColorThemeShared<P, ColorTypeDirect>;
45
+ declare type ColorTheme<P extends PD.Params, G extends ColorType = ColorTypeLocation> = G extends ColorTypeLocation ? ColorThemeLocation<P> : G extends ColorTypeGrid ? ColorThemeGrid<P> : G extends ColorTypeDirect ? ColorThemeDirect<P> : never;
37
46
  declare namespace ColorTheme {
38
47
  export const enum Category {
39
48
  Atom = "Atom Property",
@@ -51,15 +60,15 @@ declare namespace ColorTheme {
51
60
  export type Props = {
52
61
  [k: string]: any;
53
62
  };
54
- export type Factory<P extends PD.Params> = (ctx: ThemeDataContext, props: PD.Values<P>) => ColorTheme<P>;
55
- export const EmptyFactory: () => ColorTheme<{}>;
63
+ export type Factory<P extends PD.Params, G extends ColorType> = (ctx: ThemeDataContext, props: PD.Values<P>) => ColorTheme<P, G>;
64
+ export const EmptyFactory: () => ColorThemeLocation<{}>;
56
65
  export const Empty: ColorTheme<{}>;
57
- export function areEqual(themeA: ColorTheme<any>, themeB: ColorTheme<any>): boolean;
58
- export interface Provider<P extends PD.Params = any, Id extends string = string> extends ThemeProvider<ColorTheme<P>, P, Id> {
66
+ export function areEqual(themeA: ColorTheme<any, any>, themeB: ColorTheme<any, any>): boolean;
67
+ export interface Provider<P extends PD.Params = any, Id extends string = string, G extends ColorType = ColorType> extends ThemeProvider<ColorTheme<P, G>, P, Id, G> {
59
68
  }
60
69
  export const EmptyProvider: Provider<{}>;
61
- export type Registry = ThemeRegistry<ColorTheme<any>>;
62
- export function createRegistry(): ThemeRegistry<ColorTheme<{}>>;
70
+ export type Registry = ThemeRegistry<ColorTheme<any, any>>;
71
+ export function createRegistry(): ThemeRegistry<ColorThemeLocation<{}> | ColorThemeDirect<{}> | ColorThemeGrid<{}>>;
63
72
  export const BuiltIn: {
64
73
  'atom-id': Provider<{
65
74
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
@@ -75,8 +84,8 @@ declare namespace ColorTheme {
75
84
  colors: import("../mol-util/color/color").ColorListEntry[];
76
85
  };
77
86
  }>, "colors">>;
78
- }, "atom-id">;
79
- 'carbohydrate-symbol': Provider<{}, "carbohydrate-symbol">;
87
+ }, "atom-id", ColorType>;
88
+ 'carbohydrate-symbol': Provider<{}, "carbohydrate-symbol", ColorType>;
80
89
  'chain-id': Provider<{
81
90
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
82
91
  maxCount: number;
@@ -92,7 +101,7 @@ declare namespace ColorTheme {
92
101
  };
93
102
  }>, "colors">>;
94
103
  asymId: PD.Select<"label" | "auth">;
95
- }, "chain-id">;
104
+ }, "chain-id", ColorType>;
96
105
  'element-index': Provider<{
97
106
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
98
107
  maxCount: number;
@@ -107,7 +116,7 @@ declare namespace ColorTheme {
107
116
  colors: import("../mol-util/color/color").ColorListEntry[];
108
117
  };
109
118
  }>, "colors">>;
110
- }, "element-index">;
119
+ }, "element-index", ColorType>;
111
120
  'element-symbol': Provider<{
112
121
  carbonColor: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "element-symbol"> | PD.NamedParams<PD.Normalize<{
113
122
  palette: PD.NamedParams<PD.Normalize<{
@@ -278,7 +287,7 @@ declare namespace ColorTheme {
278
287
  LV: Color;
279
288
  UUH: Color;
280
289
  }>, "custom">>;
281
- }, "element-symbol">;
290
+ }, "element-symbol", ColorType>;
282
291
  'entity-id': Provider<{
283
292
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
284
293
  maxCount: number;
@@ -293,7 +302,7 @@ declare namespace ColorTheme {
293
302
  colors: import("../mol-util/color/color").ColorListEntry[];
294
303
  };
295
304
  }>, "colors">>;
296
- }, "entity-id">;
305
+ }, "entity-id", ColorType>;
297
306
  'entity-source': Provider<{
298
307
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
299
308
  maxCount: number;
@@ -308,11 +317,11 @@ declare namespace ColorTheme {
308
317
  colors: import("../mol-util/color/color").ColorListEntry[];
309
318
  };
310
319
  }>, "colors">>;
311
- }, "entity-source">;
320
+ }, "entity-source", ColorType>;
312
321
  hydrophobicity: Provider<{
313
322
  list: PD.ColorList;
314
323
  scale: PD.Select<"DGwif" | "DGwoct" | "Oct-IF">;
315
- }, "hydrophobicity">;
324
+ }, "hydrophobicity", ColorType>;
316
325
  illustrative: Provider<{
317
326
  style: PD.Mapped<PD.NamedParams<PD.Normalize<{
318
327
  palette: PD.NamedParams<PD.Normalize<{
@@ -364,7 +373,7 @@ declare namespace ColorTheme {
364
373
  }>, "custom">;
365
374
  }>, "molecule-type">>;
366
375
  carbonLightness: PD.Numeric;
367
- }, "illustrative">;
376
+ }, "illustrative", ColorType>;
368
377
  'model-index': Provider<{
369
378
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
370
379
  maxCount: number;
@@ -379,7 +388,7 @@ declare namespace ColorTheme {
379
388
  colors: import("../mol-util/color/color").ColorListEntry[];
380
389
  };
381
390
  }>, "colors">>;
382
- }, "model-index">;
391
+ }, "model-index", ColorType>;
383
392
  'molecule-type': Provider<{
384
393
  saturation: PD.Numeric;
385
394
  lightness: PD.Numeric;
@@ -392,11 +401,11 @@ declare namespace ColorTheme {
392
401
  PNA: Color;
393
402
  saccharide: Color;
394
403
  }>, "custom">>;
395
- }, "molecule-type">;
404
+ }, "molecule-type", ColorType>;
396
405
  occupancy: Provider<{
397
406
  domain: PD.Interval;
398
407
  list: PD.ColorList;
399
- }, "occupancy">;
408
+ }, "occupancy", ColorType>;
400
409
  'operator-hkl': Provider<{
401
410
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
402
411
  maxCount: number;
@@ -411,7 +420,7 @@ declare namespace ColorTheme {
411
420
  colors: import("../mol-util/color/color").ColorListEntry[];
412
421
  };
413
422
  }>, "colors">>;
414
- }, "operator-hkl">;
423
+ }, "operator-hkl", ColorType>;
415
424
  'operator-name': Provider<{
416
425
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
417
426
  maxCount: number;
@@ -426,11 +435,11 @@ declare namespace ColorTheme {
426
435
  colors: import("../mol-util/color/color").ColorListEntry[];
427
436
  };
428
437
  }>, "colors">>;
429
- }, "operator-name">;
438
+ }, "operator-name", ColorType>;
430
439
  'partial-charge': Provider<{
431
440
  domain: PD.Interval;
432
441
  list: PD.ColorList;
433
- }, "partial-charge">;
442
+ }, "partial-charge", ColorType>;
434
443
  'polymer-id': Provider<{
435
444
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
436
445
  maxCount: number;
@@ -445,7 +454,7 @@ declare namespace ColorTheme {
445
454
  colors: import("../mol-util/color/color").ColorListEntry[];
446
455
  };
447
456
  }>, "colors">>;
448
- }, "polymer-id">;
457
+ }, "polymer-id", ColorType>;
449
458
  'polymer-index': Provider<{
450
459
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
451
460
  maxCount: number;
@@ -460,7 +469,7 @@ declare namespace ColorTheme {
460
469
  colors: import("../mol-util/color/color").ColorListEntry[];
461
470
  };
462
471
  }>, "colors">>;
463
- }, "polymer-index">;
472
+ }, "polymer-index", ColorType>;
464
473
  'residue-name': Provider<{
465
474
  saturation: PD.Numeric;
466
475
  lightness: PD.Numeric;
@@ -502,7 +511,7 @@ declare namespace ColorTheme {
502
511
  CPN: Color;
503
512
  TPN: Color;
504
513
  }>, "custom">>;
505
- }, "residue-name">;
514
+ }, "residue-name", ColorType>;
506
515
  'secondary-structure': Provider<{
507
516
  saturation: PD.Numeric;
508
517
  lightness: PD.Numeric;
@@ -519,15 +528,15 @@ declare namespace ColorTheme {
519
528
  rna: Color;
520
529
  carbohydrate: Color;
521
530
  }>, "custom">>;
522
- }, "secondary-structure">;
531
+ }, "secondary-structure", ColorType>;
523
532
  'sequence-id': Provider<{
524
533
  list: PD.ColorList;
525
- }, "sequence-id">;
526
- 'shape-group': Provider<{}, "shape-group">;
534
+ }, "sequence-id", ColorType>;
535
+ 'shape-group': Provider<{}, "shape-group", ColorType>;
527
536
  uncertainty: Provider<{
528
537
  domain: PD.Interval;
529
538
  list: PD.ColorList;
530
- }, "uncertainty">;
539
+ }, "uncertainty", ColorType>;
531
540
  'unit-index': Provider<{
532
541
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
533
542
  maxCount: number;
@@ -542,13 +551,13 @@ declare namespace ColorTheme {
542
551
  colors: import("../mol-util/color/color").ColorListEntry[];
543
552
  };
544
553
  }>, "colors">>;
545
- }, "unit-index">;
554
+ }, "unit-index", ColorType>;
546
555
  uniform: Provider<{
547
556
  value: PD.Color;
548
- }, "uniform">;
557
+ }, "uniform", ColorType>;
549
558
  'volume-value': Provider<{
550
559
  colorList: PD.ColorList;
551
- }, "volume-value">;
560
+ }, "volume-value", ColorType>;
552
561
  };
553
562
  type _BuiltIn = typeof BuiltIn;
554
563
  export type BuiltIn = keyof _BuiltIn;
@@ -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-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -10,6 +10,7 @@ import { Volume } from '../mol-model/volume';
10
10
  import { ParamDefinition as PD } from '../mol-util/param-definition';
11
11
  import { Shape } from '../mol-model/shape';
12
12
  import { CustomProperty } from '../mol-model-props/common/custom-property';
13
+ import { ColorType } from '../mol-geo/geometry/color-data';
13
14
  export interface ThemeRegistryContext {
14
15
  colorThemeRegistry: ColorTheme.Registry;
15
16
  sizeThemeRegistry: SizeTheme.Registry;
@@ -22,7 +23,7 @@ export interface ThemeDataContext {
22
23
  }
23
24
  export { Theme };
24
25
  interface Theme {
25
- color: ColorTheme<any>;
26
+ color: ColorTheme<any, any>;
26
27
  size: SizeTheme<any>;
27
28
  }
28
29
  declare namespace Theme {
@@ -35,7 +36,7 @@ declare namespace Theme {
35
36
  export function releaseDependencies(theme: ThemeRegistryContext, data: ThemeDataContext, props: Props): void;
36
37
  export {};
37
38
  }
38
- export interface ThemeProvider<T extends ColorTheme<P> | SizeTheme<P>, P extends PD.Params, Id extends string = string> {
39
+ export interface ThemeProvider<T extends ColorTheme<P, G> | SizeTheme<P>, P extends PD.Params, Id extends string = string, G extends ColorType = ColorType> {
39
40
  readonly name: Id;
40
41
  readonly label: string;
41
42
  readonly category: string;
@@ -48,18 +49,18 @@ export interface ThemeProvider<T extends ColorTheme<P> | SizeTheme<P>, P extends
48
49
  detach: (data: ThemeDataContext) => void;
49
50
  };
50
51
  }
51
- export declare class ThemeRegistry<T extends ColorTheme<any> | SizeTheme<any>> {
52
+ export declare class ThemeRegistry<T extends ColorTheme<any, any> | SizeTheme<any>> {
52
53
  private emptyProvider;
53
54
  private _list;
54
55
  private _map;
55
56
  private _name;
56
57
  get default(): {
57
58
  name: string;
58
- provider: ThemeProvider<T, any, string>;
59
+ provider: ThemeProvider<T, any, string, ColorType>;
59
60
  };
60
61
  get list(): {
61
62
  name: string;
62
- provider: ThemeProvider<T, any, string>;
63
+ provider: ThemeProvider<T, any, string, ColorType>;
63
64
  }[];
64
65
  get types(): [string, string, string][];
65
66
  constructor(builtInThemes: {
@@ -74,7 +75,7 @@ export declare class ThemeRegistry<T extends ColorTheme<any> | SizeTheme<any>> {
74
75
  create(name: string, ctx: ThemeDataContext, props?: {}): T;
75
76
  getApplicableList(ctx: ThemeDataContext): {
76
77
  name: string;
77
- provider: ThemeProvider<T, any, string>;
78
+ provider: ThemeProvider<T, any, string, ColorType>;
78
79
  }[];
79
80
  getApplicableTypes(ctx: ThemeDataContext): [string, string, string][];
80
81
  }
@@ -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-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */