/** * Copyright (c) 2018-2025 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal * @author Alexander Rose */ import { Ccp4File } from '../mol-io/reader/ccp4/schema.js'; import { CifFile } from '../mol-io/reader/cif.js'; import { DcdFile } from '../mol-io/reader/dcd/parser.js'; import { Dsn6File } from '../mol-io/reader/dsn6/schema.js'; import { PlyFile } from '../mol-io/reader/ply/schema.js'; import { PsfFile } from '../mol-io/reader/psf/parser.js'; import { ShapeProvider } from '../mol-model/shape/provider.js'; import { Coordinates as _Coordinates, Model as _Model, Structure as _Structure, Trajectory as _Trajectory, StructureElement, Topology as _Topology } from '../mol-model/structure.js'; import { Volume as _Volume } from '../mol-model/volume.js'; import { PluginBehavior } from '../mol-plugin/behavior/behavior.js'; import { Representation } from '../mol-repr/representation.js'; import { ShapeRepresentation } from '../mol-repr/shape/representation.js'; import { StructureRepresentation, StructureRepresentationState } from '../mol-repr/structure/representation.js'; import { VolumeRepresentation } from '../mol-repr/volume/representation.js'; import { StateObject, StateTransformer } from '../mol-state/index.js'; import { CubeFile } from '../mol-io/reader/cube/parser.js'; import { DxFile } from '../mol-io/reader/dx/parser.js'; import { Color } from '../mol-util/color/color.js'; import { Asset } from '../mol-util/assets.js'; import { PrmtopFile } from '../mol-io/reader/prmtop/parser.js'; import { TopFile } from '../mol-io/reader/top/parser.js'; import { StringLike } from '../mol-io/common/string-like.js'; export type TypeClass = 'root' | 'data' | 'prop'; export declare namespace PluginStateObject { export type Any = StateObject; export type TypeClass = 'Root' | 'Group' | 'Data' | 'Object' | 'Representation3D' | 'Behavior'; export interface TypeInfo { name: string; typeClass: TypeClass; } export const Create: (type: TypeInfo) => { new (data: D, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: D; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export function isRepresentation3D(o?: Any): o is StateObject, TypeInfo>; export function isBehavior(o?: Any): o is StateObject; export interface Representation3DData { repr: T; sourceData: S; } export function CreateRepresentation3D(type: { name: string; }): { new (data: Representation3DData, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: Representation3DData; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject, TypeInfo>; }; export function CreateBehavior(type: { name: string; }): { new (data: T, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: T; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; const Root_base: { new (data: {}, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: {}; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject<{}, TypeInfo>; }; export class Root extends Root_base { } const Group_base: { new (data: {}, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: {}; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject<{}, TypeInfo>; }; export class Group extends Group_base { } export namespace Data { const String_base: { new (data: StringLike, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: StringLike; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class String extends String_base { } const Binary_base: { new (data: Uint8Array, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: Uint8Array; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject, TypeInfo>; }; export class Binary extends Binary_base { } export type BlobEntry = { id: string; } & ({ kind: 'string'; data: string; } | { kind: 'binary'; data: Uint8Array; }); export type BlobData = BlobEntry[]; const Blob_base: { new (data: BlobData, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: BlobData; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Blob extends Blob_base { } export {}; } export namespace Format { const Json_base: { new (data: any, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: any; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Json extends Json_base { } const Cif_base: { new (data: CifFile, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: CifFile; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Cif extends Cif_base { } const Cube_base: { new (data: CubeFile, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: CubeFile; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Cube extends Cube_base { } const Psf_base: { new (data: PsfFile, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: PsfFile; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Psf extends Psf_base { } const Prmtop_base: { new (data: PrmtopFile, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: PrmtopFile; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Prmtop extends Prmtop_base { } const Top_base: { new (data: TopFile, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: TopFile; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Top extends Top_base { } const Ply_base: { new (data: PlyFile, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: PlyFile; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Ply extends Ply_base { } const Ccp4_base: { new (data: Ccp4File, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: Ccp4File; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Ccp4 extends Ccp4_base { } const Dsn6_base: { new (data: Dsn6File, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: Dsn6File; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Dsn6 extends Dsn6_base { } const Dx_base: { new (data: DxFile, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: DxFile; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Dx extends Dx_base { } export type BlobEntry = { id: string; } & ({ kind: 'json'; data: unknown; } | { kind: 'string'; data: string; } | { kind: 'binary'; data: Uint8Array; } | { kind: 'cif'; data: CifFile; } | { kind: 'pdb'; data: CifFile; } | { kind: 'gro'; data: CifFile; } | { kind: 'dcd'; data: DcdFile; } | { kind: 'ccp4'; data: Ccp4File; } | { kind: 'dsn6'; data: Dsn6File; } | { kind: 'dx'; data: DxFile; } | { kind: 'ply'; data: PlyFile; } | { kind: 'custom'; data: unknown; tag: string; }); export type BlobData = BlobEntry[]; const Blob_base_1: { new (data: BlobData, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: BlobData; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Blob extends Blob_base_1 { } export {}; } export namespace Molecule { const Coordinates_base: { new (data: _Coordinates, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: _Coordinates; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject<_Coordinates, TypeInfo>; }; export class Coordinates extends Coordinates_base { } const Topology_base: { new (data: _Topology, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: _Topology; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject<_Topology, TypeInfo>; }; export class Topology extends Topology_base { } const Model_base: { new (data: _Model, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: _Model; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject<_Model, TypeInfo>; }; export class Model extends Model_base { } const Trajectory_base: { new (data: _Trajectory, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: _Trajectory; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject<_Trajectory, TypeInfo>; }; export class Trajectory extends Trajectory_base { } const Structure_base: { new (data: _Structure, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: _Structure; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject<_Structure, TypeInfo>; }; export class Structure extends Structure_base { } export namespace Structure { const Representation3D_base: { new (data: Representation3DData, _Structure>, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: Representation3DData, _Structure>; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject, _Structure>, TypeInfo>; }; export class Representation3D extends Representation3D_base { } export interface Representation3DStateData { repr: StructureRepresentation; /** used to restore state when the obj is removed */ initialState: Partial; state: Partial; info?: unknown; } const Representation3DState_base: { new (data: Representation3DStateData, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: Representation3DStateData; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Representation3DState extends Representation3DState_base { } export interface SelectionEntry { key: string; structureRef: string; groupId?: string; loci: StructureElement.Loci; } const Selections_base: { new (data: readonly SelectionEntry[], props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: readonly SelectionEntry[]; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Selections extends Selections_base { } export {}; } export {}; } export namespace Volume { export interface LazyInfo { url: string | Asset.Url; isBinary: boolean; format: string; entryId?: string | string[]; isovalues: { type: 'absolute' | 'relative'; value: number; color: Color; alpha?: number; volumeIndex?: number; }[]; } const Data_base: { new (data: _Volume, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: _Volume; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject<_Volume, TypeInfo>; }; export class Data extends Data_base { } const Lazy_base: { new (data: LazyInfo, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: LazyInfo; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject; }; export class Lazy extends Lazy_base { } const Representation3D_base_1: { new (data: Representation3DData, _Volume>, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: Representation3DData, _Volume>; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject, _Volume>, TypeInfo>; }; export class Representation3D extends Representation3D_base_1 { } export {}; } export namespace Shape { const Provider_base: { new (data: ShapeProvider, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: ShapeProvider; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject, TypeInfo>; }; export class Provider extends Provider_base { } const Representation3D_base_2: { new (data: Representation3DData, unknown>, props?: { label: string; description?: string; } | undefined): { id: import("../mol-util/index.js").UUID; type: TypeInfo; label: string; description?: string; data: Representation3DData, unknown>; }; type: TypeInfo; is(obj?: StateObject): obj is StateObject, unknown>, TypeInfo>; }; export class Representation3D extends Representation3D_base_2 { } export {}; } export {}; } export declare namespace PluginStateTransform { const CreateBuiltIn: (definition: StateTransformer.Definition) => StateTransformer; const BuiltIn: StateTransformer.Builder.Root; }