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.
- package/LICENSE +20 -20
- package/README.md +202 -202
- package/build/viewer/embedded.html +43 -43
- package/build/viewer/index.html +106 -106
- package/build/viewer/molstar.js +1 -1
- package/build/viewer/molstar.js.LICENSE.txt +0 -15
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/viewer/embedded.html +43 -43
- package/lib/apps/viewer/index.html +106 -106
- package/lib/cli/chem-comp-dict/create-ions.d.ts +2 -1
- package/lib/cli/chem-comp-dict/create-ions.js +3 -2
- package/lib/cli/cifschema/index.js +1 -1
- package/lib/cli/cifschema/util/cif-dic.js +1 -0
- package/lib/commonjs/cli/chem-comp-dict/create-ions.d.ts +2 -1
- package/lib/commonjs/cli/chem-comp-dict/create-ions.js +3 -2
- package/lib/commonjs/cli/cifschema/index.js +1 -1
- package/lib/commonjs/cli/cifschema/util/cif-dic.js +1 -0
- package/lib/commonjs/examples/proteopedia-wrapper/coloring.d.ts +20 -5
- package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +284 -0
- package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +0 -2
- package/lib/commonjs/mol-canvas3d/passes/draw.js +35 -70
- package/lib/commonjs/mol-canvas3d/passes/pick.d.ts +1 -1
- package/lib/commonjs/mol-canvas3d/passes/pick.js +1 -1
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +1 -0
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +16 -11
- package/lib/commonjs/mol-geo/geometry/color-data.d.ts +5 -2
- package/lib/commonjs/mol-geo/geometry/color-data.js +7 -17
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +2 -2
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +1 -0
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +2 -2
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +2 -2
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
- package/lib/commonjs/mol-geo/geometry/transparency-data.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/transparency-data.js +3 -1
- package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +1 -1
- package/lib/commonjs/mol-gl/renderable/cylinders.js +1 -1
- package/lib/commonjs/mol-gl/renderable/mesh.d.ts +1 -1
- package/lib/commonjs/mol-gl/renderable/mesh.js +1 -1
- package/lib/commonjs/mol-gl/renderable/schema.d.ts +2 -2
- package/lib/commonjs/mol-gl/renderable/schema.js +2 -2
- package/lib/commonjs/mol-gl/renderable/spheres.d.ts +1 -1
- package/lib/commonjs/mol-gl/renderable/spheres.js +1 -1
- package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +1 -1
- package/lib/commonjs/mol-gl/renderable/texture-mesh.js +1 -1
- package/lib/commonjs/mol-gl/renderer.d.ts +5 -5
- package/lib/commonjs/mol-gl/renderer.js +64 -45
- package/lib/commonjs/mol-gl/scene.d.ts +1 -0
- package/lib/commonjs/mol-gl/scene.js +26 -1
- package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/image.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/image.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/outlines.frag.d.ts +3 -2
- package/lib/commonjs/mol-gl/shader/outlines.frag.js +3 -2
- package/lib/commonjs/mol-gl/shader/postprocessing.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/ssao.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/ssao.frag.js +2 -2
- package/lib/commonjs/mol-gl/webgl/render-target.d.ts +3 -1
- package/lib/commonjs/mol-gl/webgl/render-target.js +3 -1
- package/lib/commonjs/mol-gl/webgl/renderbuffer.d.ts +2 -1
- package/lib/commonjs/mol-gl/webgl/renderbuffer.js +8 -1
- package/lib/commonjs/mol-gl/webgl/state.d.ts +7 -1
- package/lib/commonjs/mol-gl/webgl/state.js +28 -1
- package/lib/commonjs/mol-gl/webgl/texture.js +3 -0
- package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/cif-core.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/cif-core.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +3 -4
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +2 -3
- package/lib/commonjs/mol-io/reader/dx/parser.js +1 -1
- package/lib/commonjs/mol-math/geometry/lookup3d/grid.d.ts +1 -1
- package/lib/commonjs/mol-math/geometry/lookup3d/grid.js +3 -3
- package/lib/commonjs/mol-model/structure/model/properties/seconday-structure.d.ts +4 -2
- package/lib/commonjs/mol-model/structure/model/properties/seconday-structure.js +2 -1
- package/lib/commonjs/mol-model/structure/model/types/ions.d.ts +2 -2
- package/lib/commonjs/mol-model/structure/model/types/ions.js +2 -2
- package/lib/commonjs/mol-model/structure/model/types/saccharides.js +1 -1
- package/lib/commonjs/mol-model/structure/model/types.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/model/types.js +43 -41
- package/lib/commonjs/mol-model-formats/structure/common/property.js +2 -0
- package/lib/commonjs/mol-model-formats/structure/property/secondary-structure.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/property/secondary-structure.js +2 -2
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
- package/lib/commonjs/mol-plugin-state/helpers/root-structure.js +3 -1
- package/lib/commonjs/mol-repr/volume/slice.js +1 -1
- package/lib/commonjs/mol-script/language/builder.d.ts +0 -1
- package/lib/commonjs/mol-theme/color/volume-value.d.ts +3 -2
- package/lib/commonjs/mol-theme/color/volume-value.js +1 -3
- package/lib/commonjs/mol-theme/color.d.ts +47 -38
- package/lib/commonjs/mol-theme/theme.d.ts +8 -7
- package/lib/commonjs/mol-theme/theme.js +1 -1
- package/lib/examples/alpha-orbitals/index.html +61 -61
- package/lib/examples/basic-wrapper/index.html +137 -137
- package/lib/examples/lighting/index.html +88 -88
- package/lib/examples/proteopedia-wrapper/coloring.d.ts +20 -5
- package/lib/examples/proteopedia-wrapper/index.html +236 -236
- package/lib/extensions/rcsb/graphql/types.d.ts +284 -0
- package/lib/mol-canvas3d/passes/draw.d.ts +0 -2
- package/lib/mol-canvas3d/passes/draw.js +32 -67
- package/lib/mol-canvas3d/passes/pick.d.ts +1 -1
- package/lib/mol-canvas3d/passes/pick.js +1 -1
- package/lib/mol-canvas3d/passes/postprocessing.d.ts +1 -0
- package/lib/mol-canvas3d/passes/postprocessing.js +16 -11
- package/lib/mol-geo/geometry/color-data.d.ts +5 -2
- package/lib/mol-geo/geometry/color-data.js +7 -17
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +1 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.js +2 -2
- package/lib/mol-geo/geometry/lines/lines.d.ts +1 -0
- package/lib/mol-geo/geometry/mesh/mesh.js +2 -2
- package/lib/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/mol-geo/geometry/spheres/spheres.js +2 -2
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
- package/lib/mol-geo/geometry/transparency-data.d.ts +1 -1
- package/lib/mol-geo/geometry/transparency-data.js +3 -1
- package/lib/mol-gl/renderable/cylinders.d.ts +1 -1
- package/lib/mol-gl/renderable/cylinders.js +1 -1
- package/lib/mol-gl/renderable/mesh.d.ts +1 -1
- package/lib/mol-gl/renderable/mesh.js +1 -1
- package/lib/mol-gl/renderable/schema.d.ts +2 -2
- package/lib/mol-gl/renderable/schema.js +2 -2
- package/lib/mol-gl/renderable/spheres.d.ts +1 -1
- package/lib/mol-gl/renderable/spheres.js +1 -1
- package/lib/mol-gl/renderable/texture-mesh.d.ts +1 -1
- package/lib/mol-gl/renderable/texture-mesh.js +1 -1
- package/lib/mol-gl/renderer.d.ts +5 -5
- package/lib/mol-gl/renderer.js +64 -45
- package/lib/mol-gl/scene.d.ts +1 -0
- package/lib/mol-gl/scene.js +26 -1
- package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/wboit-write.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/mol-gl/shader/image.frag.d.ts +1 -1
- package/lib/mol-gl/shader/image.frag.js +1 -1
- package/lib/mol-gl/shader/outlines.frag.d.ts +3 -2
- package/lib/mol-gl/shader/outlines.frag.js +3 -2
- package/lib/mol-gl/shader/postprocessing.frag.d.ts +1 -1
- package/lib/mol-gl/shader/postprocessing.frag.js +1 -1
- package/lib/mol-gl/shader/ssao.frag.d.ts +2 -2
- package/lib/mol-gl/shader/ssao.frag.js +2 -2
- package/lib/mol-gl/webgl/render-target.d.ts +3 -1
- package/lib/mol-gl/webgl/render-target.js +3 -1
- package/lib/mol-gl/webgl/renderbuffer.d.ts +2 -1
- package/lib/mol-gl/webgl/renderbuffer.js +8 -1
- package/lib/mol-gl/webgl/state.d.ts +7 -1
- package/lib/mol-gl/webgl/state.js +28 -1
- package/lib/mol-gl/webgl/texture.js +3 -0
- package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/bird.js +1 -1
- package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
- package/lib/mol-io/reader/cif/schema/cif-core.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/cif-core.js +1 -1
- package/lib/mol-io/reader/cif/schema/mmcif.d.ts +3 -4
- package/lib/mol-io/reader/cif/schema/mmcif.js +2 -3
- package/lib/mol-io/reader/dx/parser.js +1 -1
- package/lib/mol-math/geometry/lookup3d/grid.d.ts +1 -1
- package/lib/mol-math/geometry/lookup3d/grid.js +3 -3
- package/lib/mol-model/structure/model/properties/seconday-structure.d.ts +4 -2
- package/lib/mol-model/structure/model/properties/seconday-structure.js +2 -1
- package/lib/mol-model/structure/model/types/ions.d.ts +2 -2
- package/lib/mol-model/structure/model/types/ions.js +2 -2
- package/lib/mol-model/structure/model/types/saccharides.js +1 -1
- package/lib/mol-model/structure/model/types.d.ts +1 -1
- package/lib/mol-model/structure/model/types.js +43 -41
- package/lib/mol-model-formats/structure/common/property.js +2 -0
- package/lib/mol-model-formats/structure/property/secondary-structure.d.ts +1 -1
- package/lib/mol-model-formats/structure/property/secondary-structure.js +2 -2
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/helpers/root-structure.js +3 -1
- package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
- package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
- package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
- package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
- package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
- package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
- package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
- package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
- package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
- package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
- package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
- package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
- package/lib/mol-plugin-ui/skin/base/components/viewport.scss +128 -128
- package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
- package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
- package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
- package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
- package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
- package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
- package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
- package/lib/mol-plugin-ui/skin/blue.scss +1 -1
- package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
- package/lib/mol-plugin-ui/skin/dark.scss +1 -1
- package/lib/mol-plugin-ui/skin/light.scss +1 -1
- package/lib/mol-repr/volume/slice.js +1 -1
- package/lib/mol-script/language/builder.d.ts +0 -1
- package/lib/mol-theme/color/volume-value.d.ts +3 -2
- package/lib/mol-theme/color/volume-value.js +2 -4
- package/lib/mol-theme/color.d.ts +47 -38
- package/lib/mol-theme/theme.d.ts +8 -7
- package/lib/mol-theme/theme.js +1 -1
- 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 {
|
|
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,
|
package/lib/mol-theme/color.d.ts
CHANGED
|
@@ -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
|
-
|
|
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: () =>
|
|
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<
|
|
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;
|
package/lib/mol-theme/theme.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
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
|
}
|
package/lib/mol-theme/theme.js
CHANGED