molstar 3.6.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.css +1 -1
- 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/alpha-orbitals/index.js +20 -15
- package/lib/commonjs/examples/proteopedia-wrapper/coloring.d.ts +20 -5
- package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -1
- package/lib/commonjs/extensions/anvil/representation.d.ts +4 -4
- package/lib/commonjs/extensions/cellpack/representation.d.ts +1 -1
- package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +3 -3
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +1 -1
- package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +284 -0
- package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +5 -5
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +2 -2
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +1 -1
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +1 -1
- package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +2 -2
- 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/image.d.ts +1 -1
- 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 +7 -10
- package/lib/commonjs/mol-geo/geometry/color-data.js +7 -4
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +3 -2
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +1 -0
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +3 -2
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +3 -2
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +15 -4
- 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 +2 -1
- package/lib/commonjs/mol-gl/renderable/cylinders.js +2 -2
- package/lib/commonjs/mol-gl/renderable/mesh.d.ts +2 -1
- package/lib/commonjs/mol-gl/renderable/mesh.js +2 -2
- 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 +2 -1
- package/lib/commonjs/mol-gl/renderable/spheres.js +2 -2
- package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +2 -1
- package/lib/commonjs/mol-gl/renderable/texture-mesh.js +2 -2
- package/lib/commonjs/mol-gl/renderer.d.ts +5 -5
- package/lib/commonjs/mol-gl/renderer.js +114 -64
- 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/color-vert-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.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-io/writer/ligand-encoder.d.ts +4 -2
- package/lib/commonjs/mol-io/writer/ligand-encoder.js +9 -4
- package/lib/commonjs/mol-io/writer/mol/encoder.js +16 -4
- package/lib/commonjs/mol-io/writer/mol2/encoder.js +17 -4
- 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/shape/ply.d.ts +2 -2
- 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-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +3 -3
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -4
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
- package/lib/commonjs/mol-plugin/commands.d.ts +1 -1
- package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +3 -3
- package/lib/commonjs/mol-plugin-state/helpers/root-structure.js +3 -1
- package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +6 -6
- package/lib/commonjs/mol-plugin-ui/base.d.ts +3 -1
- package/lib/commonjs/mol-plugin-ui/controls/color.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/controls/common.d.ts +2 -0
- package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.js +21 -7
- package/lib/commonjs/mol-plugin-ui/plugin.d.ts +2 -0
- package/lib/commonjs/mol-plugin-ui/plugin.js +2 -2
- package/lib/commonjs/mol-plugin-ui/spec.d.ts +1 -0
- package/lib/commonjs/mol-plugin-ui/state/common.js +6 -7
- package/lib/commonjs/mol-plugin-ui/task.d.ts +2 -21
- package/lib/commonjs/mol-plugin-ui/task.js +39 -43
- package/lib/commonjs/mol-plugin-ui/viewport/help.d.ts +4 -1
- package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +1 -1
- package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +1 -1
- package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +1 -1
- package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +1 -1
- package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/params.d.ts +4 -4
- package/lib/commonjs/mol-repr/structure/registry.d.ts +10 -10
- package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +4 -4
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -2
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -2
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +2 -2
- package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -4
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -2
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -2
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/util.d.ts +1 -1
- package/lib/commonjs/mol-repr/util.js +1 -1
- package/lib/commonjs/mol-repr/volume/isosurface.d.ts +5 -5
- package/lib/commonjs/mol-repr/volume/registry.d.ts +1 -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 +55 -39
- package/lib/commonjs/mol-theme/color.js +1 -1
- package/lib/commonjs/mol-theme/theme.d.ts +8 -7
- package/lib/commonjs/mol-theme/theme.js +1 -1
- package/lib/commonjs/servers/model/server/query.js +1 -3
- package/lib/commonjs/servers/model/version.d.ts +1 -1
- package/lib/commonjs/servers/model/version.js +1 -1
- package/lib/examples/alpha-orbitals/index.html +61 -61
- package/lib/examples/alpha-orbitals/index.js +20 -15
- 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/anvil/behavior.d.ts +1 -1
- package/lib/extensions/anvil/representation.d.ts +4 -4
- package/lib/extensions/cellpack/representation.d.ts +1 -1
- package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +3 -3
- package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +1 -1
- package/lib/extensions/rcsb/graphql/types.d.ts +284 -0
- package/lib/extensions/rcsb/validation-report/representation.d.ts +5 -5
- package/lib/mol-canvas3d/canvas3d.d.ts +2 -2
- package/lib/mol-canvas3d/helper/camera-helper.d.ts +1 -1
- package/lib/mol-canvas3d/helper/handle-helper.d.ts +1 -1
- package/lib/mol-canvas3d/helper/helper.d.ts +2 -2
- package/lib/mol-canvas3d/passes/draw.d.ts +0 -2
- package/lib/mol-canvas3d/passes/draw.js +32 -67
- package/lib/mol-canvas3d/passes/image.d.ts +1 -1
- 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 +7 -10
- package/lib/mol-geo/geometry/color-data.js +7 -4
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
- package/lib/mol-geo/geometry/cylinders/cylinders.js +3 -2
- package/lib/mol-geo/geometry/lines/lines.d.ts +1 -0
- package/lib/mol-geo/geometry/mesh/mesh.d.ts +1 -1
- package/lib/mol-geo/geometry/mesh/mesh.js +3 -2
- package/lib/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/mol-geo/geometry/spheres/spheres.d.ts +1 -1
- package/lib/mol-geo/geometry/spheres/spheres.js +3 -2
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +1 -1
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +15 -4
- 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 +2 -1
- package/lib/mol-gl/renderable/cylinders.js +2 -2
- package/lib/mol-gl/renderable/mesh.d.ts +2 -1
- package/lib/mol-gl/renderable/mesh.js +2 -2
- 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 +2 -1
- package/lib/mol-gl/renderable/spheres.js +2 -2
- package/lib/mol-gl/renderable/texture-mesh.d.ts +2 -1
- package/lib/mol-gl/renderable/texture-mesh.js +2 -2
- package/lib/mol-gl/renderer.d.ts +5 -5
- package/lib/mol-gl/renderer.js +114 -64
- 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/color-vert-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/color-vert-params.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-io/writer/ligand-encoder.d.ts +4 -2
- package/lib/mol-io/writer/ligand-encoder.js +9 -4
- package/lib/mol-io/writer/mol/encoder.js +16 -4
- package/lib/mol-io/writer/mol2/encoder.js +17 -4
- 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/shape/ply.d.ts +2 -2
- 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-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
- package/lib/mol-model-props/computed/representations/interactions.d.ts +3 -3
- package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -4
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
- package/lib/mol-plugin/commands.d.ts +1 -1
- package/lib/mol-plugin/util/viewport-screenshot.d.ts +3 -3
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/helpers/root-structure.js +3 -1
- package/lib/mol-plugin-state/transforms/representation.d.ts +6 -6
- package/lib/mol-plugin-ui/base.d.ts +3 -1
- package/lib/mol-plugin-ui/controls/color.d.ts +1 -1
- package/lib/mol-plugin-ui/controls/common.d.ts +2 -0
- package/lib/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
- package/lib/mol-plugin-ui/hooks/use-behavior.js +20 -7
- package/lib/mol-plugin-ui/plugin.d.ts +2 -0
- package/lib/mol-plugin-ui/plugin.js +2 -2
- 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-plugin-ui/spec.d.ts +1 -0
- package/lib/mol-plugin-ui/state/common.js +7 -8
- package/lib/mol-plugin-ui/task.d.ts +2 -21
- package/lib/mol-plugin-ui/task.js +40 -46
- package/lib/mol-plugin-ui/viewport/help.d.ts +4 -1
- package/lib/mol-repr/shape/loci/angle.d.ts +1 -1
- package/lib/mol-repr/shape/loci/dihedral.d.ts +1 -1
- package/lib/mol-repr/shape/loci/orientation.d.ts +1 -1
- package/lib/mol-repr/shape/loci/plane.d.ts +1 -1
- package/lib/mol-repr/shape/model/unitcell.d.ts +1 -1
- package/lib/mol-repr/structure/complex-visual.d.ts +3 -3
- package/lib/mol-repr/structure/params.d.ts +4 -4
- package/lib/mol-repr/structure/registry.d.ts +10 -10
- package/lib/mol-repr/structure/representation/backbone.d.ts +3 -3
- package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +3 -3
- package/lib/mol-repr/structure/representation/carbohydrate.d.ts +3 -3
- package/lib/mol-repr/structure/representation/cartoon.d.ts +3 -3
- package/lib/mol-repr/structure/representation/ellipsoid.d.ts +3 -3
- package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +3 -3
- package/lib/mol-repr/structure/representation/molecular-surface.d.ts +3 -3
- package/lib/mol-repr/structure/representation/orientation.d.ts +3 -3
- package/lib/mol-repr/structure/representation/putty.d.ts +3 -3
- package/lib/mol-repr/structure/representation/spacefill.d.ts +3 -3
- package/lib/mol-repr/structure/units-visual.d.ts +4 -4
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -2
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -2
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
- package/lib/mol-repr/structure/visual/element-sphere.d.ts +2 -2
- package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -4
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -2
- package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -2
- package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -1
- package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -1
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -1
- package/lib/mol-repr/util.d.ts +1 -1
- package/lib/mol-repr/util.js +1 -1
- package/lib/mol-repr/volume/isosurface.d.ts +5 -5
- package/lib/mol-repr/volume/registry.d.ts +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 +55 -39
- package/lib/mol-theme/color.js +1 -1
- package/lib/mol-theme/theme.d.ts +8 -7
- package/lib/mol-theme/theme.js +1 -1
- package/lib/servers/model/server/query.js +1 -3
- package/lib/servers/model/version.d.ts +1 -1
- package/lib/servers/model/version.js +1 -1
- package/package.json +162 -162
|
@@ -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
|
@@ -1,21 +1,25 @@
|
|
|
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
|
*/
|
|
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';
|
|
12
|
-
import { TextureFilter } from '../mol-gl/webgl/texture';
|
|
12
|
+
import { Texture, TextureFilter } from '../mol-gl/webgl/texture';
|
|
13
|
+
import { Vec3, Vec4 } from '../mol-math/linear-algebra';
|
|
13
14
|
export declare type LocationColor = (location: Location, isSecondary: boolean) => Color;
|
|
15
|
+
export interface ColorVolume {
|
|
16
|
+
colors: Texture;
|
|
17
|
+
dimension: Vec3;
|
|
18
|
+
transform: Vec4;
|
|
19
|
+
}
|
|
14
20
|
export { ColorTheme };
|
|
15
|
-
|
|
16
|
-
readonly factory: ColorTheme.Factory<P>;
|
|
17
|
-
readonly granularity: ColorType;
|
|
18
|
-
readonly color: LocationColor;
|
|
21
|
+
declare type ColorThemeShared<P extends PD.Params, G extends ColorType> = {
|
|
22
|
+
readonly factory: ColorTheme.Factory<P, G>;
|
|
19
23
|
readonly props: Readonly<PD.Values<P>>;
|
|
20
24
|
/**
|
|
21
25
|
* if palette is defined, 24bit RGB color value normalized to interval [0, 1]
|
|
@@ -26,7 +30,19 @@ interface ColorTheme<P extends PD.Params> {
|
|
|
26
30
|
readonly contextHash?: number;
|
|
27
31
|
readonly description?: string;
|
|
28
32
|
readonly legend?: Readonly<ScaleLegend | TableLegend>;
|
|
29
|
-
}
|
|
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;
|
|
30
46
|
declare namespace ColorTheme {
|
|
31
47
|
export const enum Category {
|
|
32
48
|
Atom = "Atom Property",
|
|
@@ -44,15 +60,15 @@ declare namespace ColorTheme {
|
|
|
44
60
|
export type Props = {
|
|
45
61
|
[k: string]: any;
|
|
46
62
|
};
|
|
47
|
-
export type Factory<P extends PD.Params> = (ctx: ThemeDataContext, props: PD.Values<P>) => ColorTheme<P>;
|
|
48
|
-
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<{}>;
|
|
49
65
|
export const Empty: ColorTheme<{}>;
|
|
50
|
-
export function areEqual(themeA: ColorTheme<any>, themeB: ColorTheme<any>): boolean;
|
|
51
|
-
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> {
|
|
52
68
|
}
|
|
53
69
|
export const EmptyProvider: Provider<{}>;
|
|
54
|
-
export type Registry = ThemeRegistry<ColorTheme<any>>;
|
|
55
|
-
export function createRegistry(): ThemeRegistry<
|
|
70
|
+
export type Registry = ThemeRegistry<ColorTheme<any, any>>;
|
|
71
|
+
export function createRegistry(): ThemeRegistry<ColorThemeLocation<{}> | ColorThemeDirect<{}> | ColorThemeGrid<{}>>;
|
|
56
72
|
export const BuiltIn: {
|
|
57
73
|
'atom-id': Provider<{
|
|
58
74
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
@@ -68,8 +84,8 @@ declare namespace ColorTheme {
|
|
|
68
84
|
colors: import("../mol-util/color/color").ColorListEntry[];
|
|
69
85
|
};
|
|
70
86
|
}>, "colors">>;
|
|
71
|
-
}, "atom-id">;
|
|
72
|
-
'carbohydrate-symbol': Provider<{}, "carbohydrate-symbol">;
|
|
87
|
+
}, "atom-id", ColorType>;
|
|
88
|
+
'carbohydrate-symbol': Provider<{}, "carbohydrate-symbol", ColorType>;
|
|
73
89
|
'chain-id': Provider<{
|
|
74
90
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
75
91
|
maxCount: number;
|
|
@@ -85,7 +101,7 @@ declare namespace ColorTheme {
|
|
|
85
101
|
};
|
|
86
102
|
}>, "colors">>;
|
|
87
103
|
asymId: PD.Select<"label" | "auth">;
|
|
88
|
-
}, "chain-id">;
|
|
104
|
+
}, "chain-id", ColorType>;
|
|
89
105
|
'element-index': Provider<{
|
|
90
106
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
91
107
|
maxCount: number;
|
|
@@ -100,7 +116,7 @@ declare namespace ColorTheme {
|
|
|
100
116
|
colors: import("../mol-util/color/color").ColorListEntry[];
|
|
101
117
|
};
|
|
102
118
|
}>, "colors">>;
|
|
103
|
-
}, "element-index">;
|
|
119
|
+
}, "element-index", ColorType>;
|
|
104
120
|
'element-symbol': Provider<{
|
|
105
121
|
carbonColor: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "element-symbol"> | PD.NamedParams<PD.Normalize<{
|
|
106
122
|
palette: PD.NamedParams<PD.Normalize<{
|
|
@@ -271,7 +287,7 @@ declare namespace ColorTheme {
|
|
|
271
287
|
LV: Color;
|
|
272
288
|
UUH: Color;
|
|
273
289
|
}>, "custom">>;
|
|
274
|
-
}, "element-symbol">;
|
|
290
|
+
}, "element-symbol", ColorType>;
|
|
275
291
|
'entity-id': Provider<{
|
|
276
292
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
277
293
|
maxCount: number;
|
|
@@ -286,7 +302,7 @@ declare namespace ColorTheme {
|
|
|
286
302
|
colors: import("../mol-util/color/color").ColorListEntry[];
|
|
287
303
|
};
|
|
288
304
|
}>, "colors">>;
|
|
289
|
-
}, "entity-id">;
|
|
305
|
+
}, "entity-id", ColorType>;
|
|
290
306
|
'entity-source': Provider<{
|
|
291
307
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
292
308
|
maxCount: number;
|
|
@@ -301,11 +317,11 @@ declare namespace ColorTheme {
|
|
|
301
317
|
colors: import("../mol-util/color/color").ColorListEntry[];
|
|
302
318
|
};
|
|
303
319
|
}>, "colors">>;
|
|
304
|
-
}, "entity-source">;
|
|
320
|
+
}, "entity-source", ColorType>;
|
|
305
321
|
hydrophobicity: Provider<{
|
|
306
322
|
list: PD.ColorList;
|
|
307
323
|
scale: PD.Select<"DGwif" | "DGwoct" | "Oct-IF">;
|
|
308
|
-
}, "hydrophobicity">;
|
|
324
|
+
}, "hydrophobicity", ColorType>;
|
|
309
325
|
illustrative: Provider<{
|
|
310
326
|
style: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
311
327
|
palette: PD.NamedParams<PD.Normalize<{
|
|
@@ -357,7 +373,7 @@ declare namespace ColorTheme {
|
|
|
357
373
|
}>, "custom">;
|
|
358
374
|
}>, "molecule-type">>;
|
|
359
375
|
carbonLightness: PD.Numeric;
|
|
360
|
-
}, "illustrative">;
|
|
376
|
+
}, "illustrative", ColorType>;
|
|
361
377
|
'model-index': Provider<{
|
|
362
378
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
363
379
|
maxCount: number;
|
|
@@ -372,7 +388,7 @@ declare namespace ColorTheme {
|
|
|
372
388
|
colors: import("../mol-util/color/color").ColorListEntry[];
|
|
373
389
|
};
|
|
374
390
|
}>, "colors">>;
|
|
375
|
-
}, "model-index">;
|
|
391
|
+
}, "model-index", ColorType>;
|
|
376
392
|
'molecule-type': Provider<{
|
|
377
393
|
saturation: PD.Numeric;
|
|
378
394
|
lightness: PD.Numeric;
|
|
@@ -385,11 +401,11 @@ declare namespace ColorTheme {
|
|
|
385
401
|
PNA: Color;
|
|
386
402
|
saccharide: Color;
|
|
387
403
|
}>, "custom">>;
|
|
388
|
-
}, "molecule-type">;
|
|
404
|
+
}, "molecule-type", ColorType>;
|
|
389
405
|
occupancy: Provider<{
|
|
390
406
|
domain: PD.Interval;
|
|
391
407
|
list: PD.ColorList;
|
|
392
|
-
}, "occupancy">;
|
|
408
|
+
}, "occupancy", ColorType>;
|
|
393
409
|
'operator-hkl': Provider<{
|
|
394
410
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
395
411
|
maxCount: number;
|
|
@@ -404,7 +420,7 @@ declare namespace ColorTheme {
|
|
|
404
420
|
colors: import("../mol-util/color/color").ColorListEntry[];
|
|
405
421
|
};
|
|
406
422
|
}>, "colors">>;
|
|
407
|
-
}, "operator-hkl">;
|
|
423
|
+
}, "operator-hkl", ColorType>;
|
|
408
424
|
'operator-name': Provider<{
|
|
409
425
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
410
426
|
maxCount: number;
|
|
@@ -419,11 +435,11 @@ declare namespace ColorTheme {
|
|
|
419
435
|
colors: import("../mol-util/color/color").ColorListEntry[];
|
|
420
436
|
};
|
|
421
437
|
}>, "colors">>;
|
|
422
|
-
}, "operator-name">;
|
|
438
|
+
}, "operator-name", ColorType>;
|
|
423
439
|
'partial-charge': Provider<{
|
|
424
440
|
domain: PD.Interval;
|
|
425
441
|
list: PD.ColorList;
|
|
426
|
-
}, "partial-charge">;
|
|
442
|
+
}, "partial-charge", ColorType>;
|
|
427
443
|
'polymer-id': Provider<{
|
|
428
444
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
429
445
|
maxCount: number;
|
|
@@ -438,7 +454,7 @@ declare namespace ColorTheme {
|
|
|
438
454
|
colors: import("../mol-util/color/color").ColorListEntry[];
|
|
439
455
|
};
|
|
440
456
|
}>, "colors">>;
|
|
441
|
-
}, "polymer-id">;
|
|
457
|
+
}, "polymer-id", ColorType>;
|
|
442
458
|
'polymer-index': Provider<{
|
|
443
459
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
444
460
|
maxCount: number;
|
|
@@ -453,7 +469,7 @@ declare namespace ColorTheme {
|
|
|
453
469
|
colors: import("../mol-util/color/color").ColorListEntry[];
|
|
454
470
|
};
|
|
455
471
|
}>, "colors">>;
|
|
456
|
-
}, "polymer-index">;
|
|
472
|
+
}, "polymer-index", ColorType>;
|
|
457
473
|
'residue-name': Provider<{
|
|
458
474
|
saturation: PD.Numeric;
|
|
459
475
|
lightness: PD.Numeric;
|
|
@@ -495,7 +511,7 @@ declare namespace ColorTheme {
|
|
|
495
511
|
CPN: Color;
|
|
496
512
|
TPN: Color;
|
|
497
513
|
}>, "custom">>;
|
|
498
|
-
}, "residue-name">;
|
|
514
|
+
}, "residue-name", ColorType>;
|
|
499
515
|
'secondary-structure': Provider<{
|
|
500
516
|
saturation: PD.Numeric;
|
|
501
517
|
lightness: PD.Numeric;
|
|
@@ -512,15 +528,15 @@ declare namespace ColorTheme {
|
|
|
512
528
|
rna: Color;
|
|
513
529
|
carbohydrate: Color;
|
|
514
530
|
}>, "custom">>;
|
|
515
|
-
}, "secondary-structure">;
|
|
531
|
+
}, "secondary-structure", ColorType>;
|
|
516
532
|
'sequence-id': Provider<{
|
|
517
533
|
list: PD.ColorList;
|
|
518
|
-
}, "sequence-id">;
|
|
519
|
-
'shape-group': Provider<{}, "shape-group">;
|
|
534
|
+
}, "sequence-id", ColorType>;
|
|
535
|
+
'shape-group': Provider<{}, "shape-group", ColorType>;
|
|
520
536
|
uncertainty: Provider<{
|
|
521
537
|
domain: PD.Interval;
|
|
522
538
|
list: PD.ColorList;
|
|
523
|
-
}, "uncertainty">;
|
|
539
|
+
}, "uncertainty", ColorType>;
|
|
524
540
|
'unit-index': Provider<{
|
|
525
541
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
526
542
|
maxCount: number;
|
|
@@ -535,13 +551,13 @@ declare namespace ColorTheme {
|
|
|
535
551
|
colors: import("../mol-util/color/color").ColorListEntry[];
|
|
536
552
|
};
|
|
537
553
|
}>, "colors">>;
|
|
538
|
-
}, "unit-index">;
|
|
554
|
+
}, "unit-index", ColorType>;
|
|
539
555
|
uniform: Provider<{
|
|
540
556
|
value: PD.Color;
|
|
541
|
-
}, "uniform">;
|
|
557
|
+
}, "uniform", ColorType>;
|
|
542
558
|
'volume-value': Provider<{
|
|
543
559
|
colorList: PD.ColorList;
|
|
544
|
-
}, "volume-value">;
|
|
560
|
+
}, "volume-value", ColorType>;
|
|
545
561
|
};
|
|
546
562
|
type _BuiltIn = typeof BuiltIn;
|
|
547
563
|
export type BuiltIn = keyof _BuiltIn;
|
package/lib/mol-theme/color.js
CHANGED
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
|
@@ -256,10 +256,8 @@ function resolveJobEntry(entry, structure, encoder) {
|
|
|
256
256
|
encoder.writeCategory(_model_server_result, entry);
|
|
257
257
|
encoder.writeCategory(_model_server_params, entry);
|
|
258
258
|
if (entry.queryDefinition.niceName === 'Ligand') {
|
|
259
|
-
if (encoder instanceof MolEncoder) {
|
|
260
|
-
encoder.setComponentAtomData(ComponentAtom.Provider.get(structure.models[0]));
|
|
261
|
-
}
|
|
262
259
|
if (encoder instanceof MolEncoder || encoder instanceof Mol2Encoder) {
|
|
260
|
+
encoder.setComponentAtomData(ComponentAtom.Provider.get(structure.models[0]));
|
|
263
261
|
encoder.setComponentBondData(ComponentBond.Provider.get(structure.models[0]));
|
|
264
262
|
}
|
|
265
263
|
}
|