diff --git a/@mol-view-stories/lib/package.json b/@mol-view-stories/lib/package.json index b04d7b6..8521482 100644 --- a/@mol-view-stories/lib/package.json +++ b/@mol-view-stories/lib/package.json @@ -5,5 +5,12 @@ "type": "module", "files": [ "./src" - ] + ], + "scripts": { + "mvs-types": "rollup -c scripts/rollup-mvs-data-bundle.config.mjs && node ./scripts/process-mvs-types.mjs" + }, + "devDependencies": { + "rollup": "^4.60.0", + "rollup-plugin-dts": "^6.4.1" + } } diff --git a/@mol-view-stories/lib/src/mvs-types.ts b/@mol-view-stories/lib/src/mvs-types.ts index f87a02a..e2d4dee 100644 --- a/@mol-view-stories/lib/src/mvs-types.ts +++ b/@mol-view-stories/lib/src/mvs-types.ts @@ -3,14 +3,14 @@ /** * TypeScript type definitions for the Mol* Viewer (MVS) API. - * + * * This string contains complete type definitions that can be used with Monaco Editor * to provide IntelliSense/autocomplete for MVS scene JavaScript code. - * + * * @example * ```typescript * import { setupMonacoCodeCompletion, MVSTypes } from "@mol-view-stories/lib"; - * + * * // Configure Monaco Editor for MVS code completion * setupMonacoCodeCompletion(monaco, MVSTypes); * ``` @@ -1419,6 +1419,8 @@ namespace _ { field_name: OptionalField; /** Customize mapping of annotation values to colors. */ palette: OptionalField; + /** Defines to what part of the representation this coloring should be applied. */ + selector: OptionalField; /** URL of the annotation resource. */ uri: RequiredField; /** Format of the annotation resource. */ @@ -1441,6 +1443,8 @@ namespace _ { field_name: OptionalField; /** Customize mapping of annotation values to colors. */ palette: OptionalField; + /** Defines to what part of the representation this coloring should be applied. */ + selector: OptionalField; /** Annotation schema defines what fields in the annotation will be taken into account. */ schema: RequiredField; /** Header of the CIF block to read annotation from. If \`null\`, block is selected based on \`block_index\`. */ @@ -1489,6 +1493,10 @@ namespace _ { label_from_uri: SimpleParamsSchema<{ /** Name of the column in CIF or field name (key) in JSON that contains the label text. */ field_name: OptionalField; + /** Formatting template for the label text. Supports simplified f-string syntax. */ + text_format: OptionalField; + /** Set of annotation fields for grouping annotation rows into label instances (i.e. annotation rows with the same values in all group-by fields will yield one label instance). Annotation row with undefined value in any group-by field is considered a separate label instance. */ + group_by_fields: OptionalField; /** URL of the annotation resource. */ uri: RequiredField; /** Format of the annotation resource. */ @@ -1509,6 +1517,10 @@ namespace _ { label_from_source: SimpleParamsSchema<{ /** Name of the column in CIF or field name (key) in JSON that contains the label text. */ field_name: OptionalField; + /** Formatting template for the label text. Supports simplified f-string syntax. */ + text_format: OptionalField; + /** Set of annotation fields for grouping annotation rows into label instances (i.e. annotation rows with the same values in all group-by fields will yield one label instance). Annotation row with undefined value in any group-by field is considered a separate label instance. */ + group_by_fields: OptionalField; /** Annotation schema defines what fields in the annotation will be taken into account. */ schema: RequiredField; /** Header of the CIF block to read annotation from. If \`null\`, block is selected based on \`block_index\`. */ @@ -1529,6 +1541,8 @@ namespace _ { tooltip_from_uri: SimpleParamsSchema<{ /** Name of the column in CIF or field name (key) in JSON that contains the tooltip text. */ field_name: OptionalField; + /** Formatting template for the tooltip text. Supports simplified f-string syntax. */ + text_format: OptionalField; /** URL of the annotation resource. */ uri: RequiredField; /** Format of the annotation resource. */ @@ -1549,6 +1563,8 @@ namespace _ { tooltip_from_source: SimpleParamsSchema<{ /** Name of the column in CIF or field name (key) in JSON that contains the tooltip text. */ field_name: OptionalField; + /** Formatting template for the tooltip text. Supports simplified f-string syntax. */ + text_format: OptionalField; /** Annotation schema defines what fields in the annotation will be taken into account. */ schema: RequiredField; /** Header of the CIF block to read annotation from. If \`null\`, block is selected based on \`block_index\`. */ @@ -2023,7 +2039,7 @@ namespace _ { } /** - * Copyright (c) 2023-2025 mol* contributors, licensed under MIT, See LICENSE file for more info. + * Copyright (c) 2023-2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Adam Midlik * @author David Sehnal @@ -2093,6 +2109,22 @@ namespace _ { fromMVSJ(mvsjString: string): MVSData; /** Encode \`MVSData\` to MVSJ (MolViewSpec-JSON) string. Use \`space\` parameter to control formatting (as with \`JSON.stringify\`). */ toMVSJ(mvsData: MVSData, space?: string | number): string; + /** Encode \`MVSData\` to MVSX (MolViewSpec JSON zipped together with referenced assets). Automatically fetches all referenced assets unless specified otherwise in \`options\`. */ + toMVSX(mvsData: MVSData, options?: { + /** Explicitely define assets to be included in the MVSX (binary data or string with asset content). + * If not specified, assets will be fetched automatically. */ + assets?: { + [uri: string]: Uint8Array | string; + }; + /** Base URI for resolving relative URIs (only applies if \`assets\` not specified). */ + baseUri?: string; + /** Do not include external resources (i.e. absolute URIs) in the MVSX (default is to include both relative and absolute URIs) (only applies if \`assets\` not specified). */ + skipExternal?: boolean; + /** Optional cache for sharing fetched assets across multiple \`toMVSX\` calls (only applies if \`assets\` not specified). */ + cache?: { + [absoluteUri: string]: Uint8Array | string; + }; + }): Promise>; /** Validate \`MVSData\`. Return \`true\` if OK; \`false\` if not OK. * If \`options.noExtra\` is true, presence of any extra node parameters is treated as an issue. */ isValid(mvsData: MVSData, options?: { @@ -2353,7 +2385,7 @@ namespace _ { } /** - * Copyright (c) 2017-2025 mol* contributors, licensed under MIT, See LICENSE file for more info. + * Copyright (c) 2017-2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal * @author Alexander Rose @@ -2516,6 +2548,7 @@ namespace _ { */ function equals(a: Vec3, b: Vec3): boolean; function makeRotation(mat: Mat4, a: Vec3, b: Vec3): Mat4; + function rotateAroundAxis(out: Vec3, v: Vec3, axis: Vec3, angle: number): Vec3; function isZero(v: Vec3): boolean; /** Project \`point\` onto \`vector\` starting from \`origin\` */ function projectPointOnVector(out: Vec3, point: Vec3, vector: Vec3, origin: Vec3): Vec3; @@ -2728,4 +2761,4 @@ declare const Mat4: typeof _.Mat4; declare const Quat: typeof _.Quat; declare const Euler: typeof _.Euler; declare function decodeColor(input: string): number; -`; +`; \ No newline at end of file diff --git a/@mol-view-stories/lib/tmp/mvs.d.ts b/@mol-view-stories/lib/tmp/mvs.d.ts index 9b0bef2..9af3cac 100644 --- a/@mol-view-stories/lib/tmp/mvs.d.ts +++ b/@mol-view-stories/lib/tmp/mvs.d.ts @@ -6,21 +6,21 @@ * @since 2.11.0 */ interface Predicate$1 { - (a: A): boolean; + (a: A): boolean } /** * @category type lambdas * @since 2.11.0 */ -declare const URI$8 = 'Predicate'; +declare const URI$8 = 'Predicate' /** * @category type lambdas * @since 2.11.0 */ -type URI$8 = typeof URI$8; -declare module './mvs' { +type URI$8 = typeof URI$8 +declare module "./mvs" { interface URItoKind { - readonly [URI$8]: Predicate$1; + readonly [URI$8]: Predicate$1 } } @@ -31,22 +31,22 @@ declare module './mvs' { * @since 2.10.0 */ interface Separated { - readonly left: E; - readonly right: A; + readonly left: E + readonly right: A } /** * @category type lambdas * @since 2.10.0 */ -declare const URI$7 = 'Separated'; +declare const URI$7 = 'Separated' /** * @category type lambdas * @since 2.10.0 */ -type URI$7 = typeof URI$7; -declare module './mvs' { +type URI$7 = typeof URI$7 +declare module "./mvs" { interface URItoKind2 { - readonly [URI$7]: Separated; + readonly [URI$7]: Separated } } @@ -55,21 +55,21 @@ declare module './mvs' { * @since 2.5.0 */ type ReadonlyNonEmptyArray = ReadonlyArray & { - readonly 0: A; -}; + readonly 0: A +} /** * @category type lambdas * @since 2.5.0 */ -declare const URI$6 = 'ReadonlyNonEmptyArray'; +declare const URI$6 = 'ReadonlyNonEmptyArray' /** * @category type lambdas * @since 2.5.0 */ -type URI$6 = typeof URI$6; -declare module './mvs' { +type URI$6 = typeof URI$6 +declare module "./mvs" { interface URItoKind { - readonly [URI$6]: ReadonlyNonEmptyArray; + readonly [URI$6]: ReadonlyNonEmptyArray } } @@ -78,34 +78,34 @@ declare module './mvs' { * @since 2.0.0 */ interface None { - readonly _tag: 'None'; + readonly _tag: 'None' } /** * @category model * @since 2.0.0 */ interface Some { - readonly _tag: 'Some'; - readonly value: A; + readonly _tag: 'Some' + readonly value: A } /** * @category model * @since 2.0.0 */ -type Option = None | Some; +type Option = None | Some /** * @category type lambdas * @since 2.0.0 */ -declare const URI$5 = 'Option'; +declare const URI$5 = 'Option' /** * @category type lambdas * @since 2.0.0 */ -type URI$5 = typeof URI$5; -declare module './mvs' { +type URI$5 = typeof URI$5 +declare module "./mvs" { interface URItoKind { - readonly [URI$5]: Option; + readonly [URI$5]: Option } } @@ -122,20 +122,20 @@ declare module './mvs' { * @category model * @since 2.5.0 */ -type ReadonlyRecord = Readonly>; +type ReadonlyRecord = Readonly> /** * @category type lambdas * @since 2.5.0 */ -declare const URI$4 = 'ReadonlyRecord'; +declare const URI$4 = 'ReadonlyRecord' /** * @category type lambdas * @since 2.5.0 */ -type URI$4 = typeof URI$4; -declare module './mvs' { +type URI$4 = typeof URI$4 +declare module "./mvs" { interface URItoKind { - readonly [URI$4]: ReadonlyRecord; + readonly [URI$4]: ReadonlyRecord } } @@ -147,21 +147,21 @@ declare module './mvs' { * @since 2.11.0 */ interface Endomorphism { - (a: A): A; + (a: A): A } /** * @category type lambdas * @since 2.11.0 */ -declare const URI$3 = 'Endomorphism'; +declare const URI$3 = 'Endomorphism' /** * @category type lambdas * @since 2.11.0 */ -type URI$3 = typeof URI$3; -declare module './mvs' { +type URI$3 = typeof URI$3 +declare module "./mvs" { interface URItoKind { - readonly [URI$3]: Endomorphism; + readonly [URI$3]: Endomorphism } } @@ -182,21 +182,21 @@ declare module './mvs' { * @since 2.0.0 */ interface Eq { - readonly equals: (x: A, y: A) => boolean; + readonly equals: (x: A, y: A) => boolean } /** * @category type lambdas * @since 2.0.0 */ -declare const URI$2 = 'Eq'; +declare const URI$2 = 'Eq' /** * @category type lambdas * @since 2.0.0 */ -type URI$2 = typeof URI$2; -declare module './mvs' { +type URI$2 = typeof URI$2 +declare module "./mvs" { interface URItoKind { - readonly [URI$2]: Eq; + readonly [URI$2]: Eq } } @@ -208,7 +208,7 @@ declare module './mvs' { * @category model * @since 2.0.0 */ -type Ordering = -1 | 0 | 1; +type Ordering = -1 | 0 | 1 /** * The `Ord` type class represents types which support comparisons with a _total order_. @@ -227,21 +227,21 @@ type Ordering = -1 | 0 | 1; * @since 2.0.0 */ interface Ord extends Eq { - readonly compare: (first: A, second: A) => Ordering; + readonly compare: (first: A, second: A) => Ordering } /** * @category type lambdas * @since 2.0.0 */ -declare const URI$1 = 'Ord'; +declare const URI$1 = 'Ord' /** * @category type lambdas * @since 2.0.0 */ -type URI$1 = typeof URI$1; -declare module './mvs' { +type URI$1 = typeof URI$1 +declare module "./mvs" { interface URItoKind { - readonly [URI$1]: Ord; + readonly [URI$1]: Ord } } @@ -257,7 +257,7 @@ declare module './mvs' { * @deprecated */ interface Predicate { - (a: A): boolean; + (a: A): boolean } /** @@ -265,35 +265,35 @@ interface Predicate { * @since 2.0.0 */ interface Left { - readonly _tag: 'Left'; - readonly left: E; + readonly _tag: 'Left' + readonly left: E } /** * @category model * @since 2.0.0 */ interface Right { - readonly _tag: 'Right'; - readonly right: A; + readonly _tag: 'Right' + readonly right: A } /** * @category model * @since 2.0.0 */ -type Either = Left | Right; +type Either = Left | Right /** * @category type lambdas * @since 2.0.0 */ -declare const URI = 'Either'; +declare const URI = 'Either' /** * @category type lambdas * @since 2.0.0 */ -type URI = typeof URI; -declare module './mvs' { +type URI = typeof URI +declare module "./mvs" { interface URItoKind2 { - readonly [URI]: Either; + readonly [URI]: Either } } @@ -306,10 +306,10 @@ declare module './mvs' { * @since 1.0.0 */ interface ContextEntry { - readonly key: string; - readonly type: Decoder; + readonly key: string + readonly type: Decoder /** the input data */ - readonly actual?: unknown; + readonly actual?: unknown } /** * @category Decode error @@ -322,11 +322,11 @@ interface Context extends ReadonlyArray {} */ interface ValidationError { /** the offending (sub)value */ - readonly value: unknown; + readonly value: unknown /** where the error originated */ - readonly context: Context; + readonly context: Context /** optional custom error message */ - readonly message?: string; + readonly message?: string } /** * @category Decode error @@ -337,23 +337,23 @@ interface Errors extends Array {} * @category Decode error * @since 1.0.0 */ -type Validation = Either; +type Validation = Either /** * @since 1.0.0 */ -type Is = (u: unknown) => u is A; +type Is = (u: unknown) => u is A /** * @since 1.0.0 */ -type Validate = (i: I, context: Context) => Validation; +type Validate = (i: I, context: Context) => Validation /** * @since 1.0.0 */ -type Decode = (i: I) => Validation; +type Decode = (i: I) => Validation /** * @since 1.0.0 */ -type Encode = (a: A) => O; +type Encode = (a: A) => O /** * @since 1.0.0 */ @@ -366,59 +366,58 @@ interface Mixed extends Type {} * @category Codec * @since 1.0.0 */ -type TypeOf = C['_A']; +type TypeOf = C['_A'] /** * @category Codec * @since 1.0.0 */ -type InputOf = C['_I']; +type InputOf = C['_I'] /** * @category Codec * @since 1.0.0 */ -type OutputOf = C['_O']; +type OutputOf = C['_O'] /** * @category Codec * @since 1.0.0 */ interface Decoder { - readonly name: string; - readonly validate: Validate; - readonly decode: Decode; + readonly name: string + readonly validate: Validate + readonly decode: Decode } /** * @category Codec * @since 1.0.0 */ interface Encoder { - readonly encode: Encode; + readonly encode: Encode } /** * @category Codec * @since 1.0.0 */ -declare class Type - implements Decoder, Encoder { +declare class Type implements Decoder, Encoder { /** a unique name for this codec */ - readonly name: string; + readonly name: string /** a custom type guard */ - readonly is: Is; + readonly is: Is /** succeeds if a value of type I can be decoded to a value of type A */ - readonly validate: Validate; + readonly validate: Validate /** converts a value of type A to a value of type O */ - readonly encode: Encode; + readonly encode: Encode /** * @since 1.0.0 */ - readonly _A: A; + readonly _A: A /** * @since 1.0.0 */ - readonly _O: O; + readonly _O: O /** * @since 1.0.0 */ - readonly _I: I; + readonly _I: I constructor( /** a unique name for this codec */ name: string, @@ -427,35 +426,31 @@ declare class Type /** succeeds if a value of type I can be decoded to a value of type A */ validate: Validate, /** converts a value of type A to a value of type O */ - encode: Encode, - ); + encode: Encode + ) /** * @since 1.0.0 */ - pipe( - this: Type, - ab: Type, - name?: string, - ): Type; + pipe(this: Type, ab: Type, name?: string): Type /** * @since 1.0.0 */ - asDecoder(): Decoder; + asDecoder(): Decoder /** * @since 1.0.0 */ - asEncoder(): Encoder; + asEncoder(): Encoder /** * a version of `validate` with a default context * @since 1.0.0 */ - decode(i: I): Validation; + decode(i: I): Validation } /** * @since 1.0.0 */ interface Props { - [key: string]: Mixed; + [key: string]: Mixed } /** * @since 1.0.0 @@ -464,8 +459,8 @@ declare class StringType extends Type { /** * @since 1.0.0 */ - readonly _tag: 'StringType'; - constructor(); + readonly _tag: 'StringType' + constructor() } /** * @since 1.5.3 @@ -478,8 +473,8 @@ declare class NumberType extends Type { /** * @since 1.0.0 */ - readonly _tag: 'NumberType'; - constructor(); + readonly _tag: 'NumberType' + constructor() } /** * @since 1.5.3 @@ -492,8 +487,8 @@ declare class BooleanType extends Type { /** * @since 1.0.0 */ - readonly _tag: 'BooleanType'; - constructor(); + readonly _tag: 'BooleanType' + constructor() } /** * @since 1.5.3 @@ -502,167 +497,155 @@ interface BooleanC extends BooleanType {} /** * @since 1.0.0 */ -declare class RefinementType - extends Type { - readonly type: C; - readonly predicate: Predicate; +declare class RefinementType extends Type { + readonly type: C + readonly predicate: Predicate /** * @since 1.0.0 */ - readonly _tag: 'RefinementType'; + readonly _tag: 'RefinementType' constructor( name: string, is: RefinementType['is'], validate: RefinementType['validate'], encode: RefinementType['encode'], type: C, - predicate: Predicate, - ); + predicate: Predicate + ) } /** * @since 1.0.0 */ -declare class ArrayType - extends Type { - readonly type: C; +declare class ArrayType extends Type { + readonly type: C /** * @since 1.0.0 */ - readonly _tag: 'ArrayType'; + readonly _tag: 'ArrayType' constructor( name: string, is: ArrayType['is'], validate: ArrayType['validate'], encode: ArrayType['encode'], - type: C, - ); + type: C + ) } /** * @since 1.5.3 */ -interface ArrayC - extends ArrayType>, Array>, unknown> {} +interface ArrayC extends ArrayType>, Array>, unknown> {} /** * @since 1.0.0 */ -declare class InterfaceType - extends Type { - readonly props: P; +declare class InterfaceType extends Type { + readonly props: P /** * @since 1.0.0 */ - readonly _tag: 'InterfaceType'; + readonly _tag: 'InterfaceType' constructor( name: string, is: InterfaceType['is'], validate: InterfaceType['validate'], encode: InterfaceType['encode'], - props: P, - ); + props: P + ) } /** * @since 1.5.3 */ -interface TypeC

extends - InterfaceType< +interface TypeC

+ extends InterfaceType< P, { - [K in keyof P]: TypeOf; + [K in keyof P]: TypeOf }, { - [K in keyof P]: OutputOf; + [K in keyof P]: OutputOf }, unknown > {} /** * @since 1.0.0 */ -declare class PartialType - extends Type { - readonly props: P; +declare class PartialType extends Type { + readonly props: P /** * @since 1.0.0 */ - readonly _tag: 'PartialType'; + readonly _tag: 'PartialType' constructor( name: string, is: PartialType['is'], validate: PartialType['validate'], encode: PartialType['encode'], - props: P, - ); + props: P + ) } /** * @since 1.5.3 */ -interface PartialC

extends - PartialType< +interface PartialC

+ extends PartialType< P, { - [K in keyof P]?: TypeOf; + [K in keyof P]?: TypeOf }, { - [K in keyof P]?: OutputOf; + [K in keyof P]?: OutputOf }, unknown > {} /** * @since 1.0.0 */ -declare class DictionaryType< - D extends Any, - C extends Any, - A = any, - O = A, - I = unknown, -> extends Type { - readonly domain: D; - readonly codomain: C; +declare class DictionaryType extends Type { + readonly domain: D + readonly codomain: C /** * @since 1.0.0 */ - readonly _tag: 'DictionaryType'; + readonly _tag: 'DictionaryType' constructor( name: string, is: DictionaryType['is'], validate: DictionaryType['validate'], encode: DictionaryType['encode'], domain: D, - codomain: C, - ); + codomain: C + ) } /** * @since 1.5.3 */ -interface RecordC extends - DictionaryType< +interface RecordC + extends DictionaryType< D, C, { - [K in TypeOf]: TypeOf; + [K in TypeOf]: TypeOf }, { - [K in OutputOf]: OutputOf; + [K in OutputOf]: OutputOf }, unknown > {} /** * @since 1.0.0 */ -declare class UnionType, A = any, O = A, I = unknown> - extends Type { - readonly types: CS; +declare class UnionType, A = any, O = A, I = unknown> extends Type { + readonly types: CS /** * @since 1.0.0 */ - readonly _tag: 'UnionType'; + readonly _tag: 'UnionType' constructor( name: string, is: UnionType['is'], validate: UnionType['validate'], encode: UnionType['encode'], - types: CS, - ); + types: CS + ) } /** * @since 1.5.3 @@ -672,149 +655,133 @@ interface UnionC]> /** * @since 1.0.0 */ -declare class IntersectionType< - CS extends Array, - A = any, - O = A, - I = unknown, -> extends Type { - readonly types: CS; +declare class IntersectionType, A = any, O = A, I = unknown> extends Type { + readonly types: CS /** * @since 1.0.0 */ - readonly _tag: 'IntersectionType'; + readonly _tag: 'IntersectionType' constructor( name: string, is: IntersectionType['is'], validate: IntersectionType['validate'], encode: IntersectionType['encode'], - types: CS, - ); + types: CS + ) } /** * @since 1.5.3 */ interface IntersectionC]> - extends - IntersectionType< - CS, - CS extends { - length: 2; - } ? TypeOf & TypeOf - : CS extends { - length: 3; - } ? TypeOf & TypeOf & TypeOf - : CS extends { - length: 4; - } ? TypeOf & TypeOf & TypeOf & TypeOf - : CS extends { - length: 5; - } ? - & TypeOf - & TypeOf - & TypeOf - & TypeOf - & TypeOf - : unknown, - CS extends { - length: 2; - } ? OutputOf & OutputOf - : CS extends { - length: 3; - } ? OutputOf & OutputOf & OutputOf - : CS extends { - length: 4; - } ? - & OutputOf - & OutputOf - & OutputOf - & OutputOf - : CS extends { - length: 5; - } ? - & OutputOf - & OutputOf - & OutputOf - & OutputOf - & OutputOf - : unknown, - unknown - > {} + extends IntersectionType< + CS, + CS extends { + length: 2 + } + ? TypeOf & TypeOf + : CS extends { + length: 3 + } + ? TypeOf & TypeOf & TypeOf + : CS extends { + length: 4 + } + ? TypeOf & TypeOf & TypeOf & TypeOf + : CS extends { + length: 5 + } + ? TypeOf & TypeOf & TypeOf & TypeOf & TypeOf + : unknown, + CS extends { + length: 2 + } + ? OutputOf & OutputOf + : CS extends { + length: 3 + } + ? OutputOf & OutputOf & OutputOf + : CS extends { + length: 4 + } + ? OutputOf & OutputOf & OutputOf & OutputOf + : CS extends { + length: 5 + } + ? OutputOf & OutputOf & OutputOf & OutputOf & OutputOf + : unknown, + unknown + > {} /** * @since 1.0.0 */ -declare class TupleType, A = any, O = A, I = unknown> - extends Type { - readonly types: CS; +declare class TupleType, A = any, O = A, I = unknown> extends Type { + readonly types: CS /** * @since 1.0.0 */ - readonly _tag: 'TupleType'; + readonly _tag: 'TupleType' constructor( name: string, is: TupleType['is'], validate: TupleType['validate'], encode: TupleType['encode'], - types: CS, - ); + types: CS + ) } /** * @since 1.5.3 */ -interface TupleC]> extends - TupleType< +interface TupleC]> + extends TupleType< CS, CS extends { - length: 1; - } ? [TypeOf] + length: 1 + } + ? [TypeOf] : CS extends { - length: 2; - } ? [TypeOf, TypeOf] + length: 2 + } + ? [TypeOf, TypeOf] : CS extends { - length: 3; - } ? [TypeOf, TypeOf, TypeOf] + length: 3 + } + ? [TypeOf, TypeOf, TypeOf] : CS extends { - length: 4; - } ? [TypeOf, TypeOf, TypeOf, TypeOf] + length: 4 + } + ? [TypeOf, TypeOf, TypeOf, TypeOf] : CS extends { - length: 5; - } ? [ - TypeOf, - TypeOf, - TypeOf, - TypeOf, - TypeOf, - ] + length: 5 + } + ? [TypeOf, TypeOf, TypeOf, TypeOf, TypeOf] : unknown, CS extends { - length: 1; - } ? [OutputOf] + length: 1 + } + ? [OutputOf] : CS extends { - length: 2; - } ? [OutputOf, OutputOf] + length: 2 + } + ? [OutputOf, OutputOf] : CS extends { - length: 3; - } ? [OutputOf, OutputOf, OutputOf] + length: 3 + } + ? [OutputOf, OutputOf, OutputOf] : CS extends { - length: 4; - } ? [OutputOf, OutputOf, OutputOf, OutputOf] + length: 4 + } + ? [OutputOf, OutputOf, OutputOf, OutputOf] : CS extends { - length: 5; - } ? [ - OutputOf, - OutputOf, - OutputOf, - OutputOf, - OutputOf, - ] + length: 5 + } + ? [OutputOf, OutputOf, OutputOf, OutputOf, OutputOf] : unknown, unknown > {} /** * @since 1.5.3 */ -interface RefinementC> - extends RefinementType, InputOf> {} +interface RefinementC> extends RefinementType, InputOf> {} /** * Copyright (c) 2023-2025 mol* contributors, licensed under MIT, See LICENSE file for more info. @@ -825,60 +792,36 @@ interface RefinementC> /** All types that can be used in tree node params. * Can be extended, this is just to list them all in one place and possibly catch some typing errors */ -type AllowedValueTypes = - | string - | number - | boolean - | null - | [number, number, number] - | string[] - | number[] - | {}; -interface FieldBase< - V extends AllowedValueTypes = any, - R extends boolean = boolean, -> { - /** Definition of allowed types for the field */ - type: Type; - /** If `required===true`, the value must always be defined in molviewspec format (can be `null` if `type` allows it). - * If `required===false`, the value can be ommitted (meaning that a default should be used). - * If `type` allows `null`, the default must be `null`. */ - required: R; - /** Description of what the field value means */ - description: string; +type AllowedValueTypes = string | number | boolean | null | [number, number, number] | string[] | number[] | {}; +interface FieldBase { + /** Definition of allowed types for the field */ + type: Type; + /** If `required===true`, the value must always be defined in molviewspec format (can be `null` if `type` allows it). + * If `required===false`, the value can be ommitted (meaning that a default should be used). + * If `type` allows `null`, the default must be `null`. */ + required: R; + /** Description of what the field value means */ + description: string; } /** Schema for param field which must always be provided (has no default value) */ -interface RequiredField - extends FieldBase { - required: true; -} -declare function RequiredField( - type: Type, - description: string, -): RequiredField; +interface RequiredField extends FieldBase { + required: true; +} +declare function RequiredField(type: Type, description: string): RequiredField; /** Schema for param field which can be dropped (meaning that a default value will be used) */ -interface OptionalField - extends FieldBase { - required: false; - /** Default value for optional field. - * If field type allows `null`, default must be `null` (this is to avoid issues in languages that do not distinguish `null` and `undefined`). */ - default: DefaultValue; -} -declare function OptionalField( - type: Type, - defaultValue: DefaultValue, - description: string, -): OptionalField; +interface OptionalField extends FieldBase { + required: false; + /** Default value for optional field. + * If field type allows `null`, default must be `null` (this is to avoid issues in languages that do not distinguish `null` and `undefined`). */ + default: DefaultValue; +} +declare function OptionalField(type: Type, defaultValue: DefaultValue, description: string): OptionalField; /** Schema for one field in params (i.e. a value in a top-level key-value pair) */ -type Field = - | RequiredField - | OptionalField; +type Field = RequiredField | OptionalField; /** Type of valid default value for value type `V` (if the type allows `null`, the default must be `null`) */ type DefaultValue = null extends V ? null : V; /** Type of valid value for field of type `F` (never includes `undefined`, even if field is optional) */ -type ValueFor = F extends Field ? V - : F extends Any ? TypeOf - : never; +type ValueFor = F extends Field ? V : F extends Any ? TypeOf : never; /** * Copyright (c) 2023-2024 mol* contributors, licensed under MIT, See LICENSE file for more info. @@ -888,68 +831,42 @@ type ValueFor = F extends Field ? V */ type Fields = { - [key in string]: Field; + [key in string]: Field; }; /** Type of `ParamsSchema` where all fields are completely independent */ interface SimpleParamsSchema { - type: 'simple'; - /** Parameter fields */ - fields: TFields; -} -declare function SimpleParamsSchema( - fields: TFields, -): SimpleParamsSchema; -type ValuesForFields = - & { - [key in keyof F as (F[key] extends RequiredField ? key : never)]: - ValueFor; - } - & { - [key in keyof F as (F[key] extends OptionalField ? key : never)]?: - ValueFor; - }; -type ValuesForSimpleParamsSchema = - ValuesForFields; + type: 'simple'; + /** Parameter fields */ + fields: TFields; +} +declare function SimpleParamsSchema(fields: TFields): SimpleParamsSchema; +type ValuesForFields = { + [key in keyof F as (F[key] extends RequiredField ? key : never)]: ValueFor; +} & { + [key in keyof F as (F[key] extends OptionalField ? key : never)]?: ValueFor; +}; +type ValuesForSimpleParamsSchema = ValuesForFields; type Cases = { - [case_ in string]: SimpleParamsSchema; + [case_ in string]: SimpleParamsSchema; }; /** Type of `ParamsSchema` where one field (discriminator) determines what other fields are allowed (i.e. discriminated union type) */ -interface UnionParamsSchema< - TDiscriminator extends string = string, - TCases extends Cases = Cases, -> { - type: 'union'; - /** Name of parameter field that determines the rest (allowed values are defined by keys of `cases`) */ - discriminator: TDiscriminator; - /** Description for the discriminator parameter field */ - discriminatorDescription: string; - /** `ParamsSchema` for the rest, for each case of discriminator value */ - cases: TCases; -} -declare function UnionParamsSchema< - TDiscriminator extends string, - TCases extends Cases, ->( - discriminator: TDiscriminator, - discriminatorDescription: string, - cases: TCases, -): UnionParamsSchema; -type ValuesForUnionParamsSchema< - TSchema extends UnionParamsSchema, - TCase extends keyof TSchema['cases'] = keyof TSchema['cases'], -> = TCase extends keyof TSchema['cases'] ? - & { - [discriminator in TSchema['discriminator']]: TCase; - } - & ValuesFor - : never; +interface UnionParamsSchema { + type: 'union'; + /** Name of parameter field that determines the rest (allowed values are defined by keys of `cases`) */ + discriminator: TDiscriminator; + /** Description for the discriminator parameter field */ + discriminatorDescription: string; + /** `ParamsSchema` for the rest, for each case of discriminator value */ + cases: TCases; +} +declare function UnionParamsSchema(discriminator: TDiscriminator, discriminatorDescription: string, cases: TCases): UnionParamsSchema; +type ValuesForUnionParamsSchema = TCase extends keyof TSchema['cases'] ? { + [discriminator in TSchema['discriminator']]: TCase; +} & ValuesFor : never; /** Schema for "params", i.e. a flat collection of key-value pairs */ type ParamsSchema = SimpleParamsSchema | UnionParamsSchema; /** Type of values for a params schema (optional fields can be missing) */ -type ValuesFor

= P extends SimpleParamsSchema - ? ValuesForSimpleParamsSchema

- : P extends UnionParamsSchema ? ValuesForUnionParamsSchema

- : never; +type ValuesFor

= P extends SimpleParamsSchema ? ValuesForSimpleParamsSchema

: P extends UnionParamsSchema ? ValuesForUnionParamsSchema

: never; /** * Copyright (c) 2023-2024 mol* contributors, licensed under MIT, See LICENSE file for more info. @@ -960,96 +877,61 @@ type ValuesFor

= P extends SimpleParamsSchema /** Type of "custom" of a tree node (key-value storage with arbitrary JSONable values) */ type CustomProps = Partial>; /** Tree node without children */ -type Node = {} extends - TParams ? { +type Node = {} extends TParams ? { kind: TKind; params?: TParams; custom?: CustomProps; ref?: string; - } - : { +} : { kind: TKind; params: TParams; custom?: CustomProps; ref?: string; - }; +}; /** Kind type for a tree node */ type Kind = TNode['kind']; /** Tree (i.e. a node with optional children) where the root node is of type `TRoot` and other nodes are of type `TNode` */ -type Tree< - TNode extends Node = Node, - TRoot extends TNode = TNode, -> = TRoot & { - children?: Tree[]; +type Tree = Node, TRoot extends TNode = TNode> = TRoot & { + children?: Tree[]; }; /** Type of any subtree that can occur within given `TTree` tree type */ type Subtree = NonNullable[number]; /** Type of any subtree that can occur within given `TTree` tree type and has kind type `TKind` */ -type SubtreeOfKind< - TTree extends Tree, - TKind extends Kind> = Kind>, -> = RootOfKind, TKind>; -type RootOfKind> = Extract< - TTree, - Tree> ->; +type SubtreeOfKind> = Kind>> = RootOfKind, TKind>; +type RootOfKind> = Extract>>; /** Params type for a given kind type within a tree */ -type ParamsOfKind< - TTree extends Tree, - TKind extends Kind> = Kind>, -> = NonNullable['params']>; +type ParamsOfKind> = Kind>> = NonNullable['params']>; type ParamsSchemas = { - [kind: string]: ParamsSchema; + [kind: string]: ParamsSchema; }; /** Definition of tree type, specifying allowed node kinds, types of their params, required kind for the root, and allowed parent-child kind combinations */ -interface TreeSchema< - TParamsSchemas extends ParamsSchemas = ParamsSchemas, - TRootKind extends keyof TParamsSchemas = string, -> { - /** Required kind of the root node */ - rootKind: TRootKind; - /** Definition of allowed node kinds */ - nodes: { - [kind in keyof TParamsSchemas]: { - /** Params schema for this node kind */ - params: TParamsSchemas[kind]; - /** Documentation for this node kind */ - description?: string; - /** Node kinds that can serve as parent for this node kind (`undefined` means the parent can be of any kind) */ - parent?: (string & keyof TParamsSchemas)[]; +interface TreeSchema { + /** Required kind of the root node */ + rootKind: TRootKind; + /** Definition of allowed node kinds */ + nodes: { + [kind in keyof TParamsSchemas]: { + /** Params schema for this node kind */ + params: TParamsSchemas[kind]; + /** Documentation for this node kind */ + description?: string; + /** Node kinds that can serve as parent for this node kind (`undefined` means the parent can be of any kind) */ + parent?: (string & keyof TParamsSchemas)[]; + }; }; - }; } -declare function TreeSchema< - P extends ParamsSchemas = ParamsSchemas, - R extends keyof P = string, ->(schema: TreeSchema): TreeSchema; +declare function TreeSchema

(schema: TreeSchema): TreeSchema; /** ParamsSchemas per node kind */ -type ParamsSchemasOf = TTreeSchema extends - TreeSchema ? TParamsSchema : never; +type ParamsSchemasOf = TTreeSchema extends TreeSchema ? TParamsSchema : never; /** Type of tree node which can occur as the root of a tree conforming to tree schema `TTreeSchema` */ -type RootFor = NodeFor< - TTreeSchema, - TTreeSchema['rootKind'] ->; +type RootFor = NodeFor; /** Type of tree node which can occur anywhere in a tree conforming to tree schema `TTreeSchema`, * optionally narrowing down to a given node kind */ -type NodeFor< - TTreeSchema extends TreeSchema, - TKind extends keyof ParamsSchemasOf = keyof ParamsSchemasOf< - TTreeSchema - >, -> = { - [key in keyof ParamsSchemasOf]: Node< - key & string, - ValuesFor[key]> - >; +type NodeFor = keyof ParamsSchemasOf> = { + [key in keyof ParamsSchemasOf]: Node[key]>>; }[TKind]; /** Type of tree which conforms to tree schema `TTreeSchema` */ -type TreeFor = Tree< - NodeFor, - RootFor & NodeFor ->; +type TreeFor = Tree, RootFor & NodeFor>; /** * Copyright (c) 2023-2025 mol* contributors, licensed under MIT, See LICENSE file for more info. @@ -1059,89 +941,45 @@ type TreeFor = Tree< */ /** `format` parameter values for `parse` node in MVS tree */ -type ParseFormatT = - | 'mmcif' - | 'bcif' - | 'pdb' - | 'pdbqt' - | 'gro' - | 'xyz' - | 'mol' - | 'sdf' - | 'mol2' - | 'lammpstrj' - | 'xtc' - | 'nctraj' - | 'dcd' - | 'trr' - | 'psf' - | 'prmtop' - | 'top' - | 'map' - | 'dx' - | 'dxbin'; +type ParseFormatT = 'mmcif' | 'bcif' | 'pdb' | 'pdbqt' | 'gro' | 'xyz' | 'mol' | 'sdf' | 'mol2' | 'lammpstrj' | 'xtc' | 'nctraj' | 'dcd' | 'trr' | 'psf' | 'prmtop' | 'top' | 'map' | 'dx' | 'dxbin'; declare const ParseFormatT: Type; /** `kind` parameter values for `structure` node in MVS tree */ type StructureTypeT = 'model' | 'assembly' | 'symmetry' | 'symmetry_mates'; declare const StructureTypeT: Type; /** `selector` parameter values for `component` node in MVS tree */ -type ComponentSelectorT = - | 'all' - | 'polymer' - | 'protein' - | 'nucleic' - | 'branched' - | 'ligand' - | 'ion' - | 'water' - | 'coarse'; -declare const ComponentSelectorT: Type< - ComponentSelectorT, - ComponentSelectorT, - unknown ->; +type ComponentSelectorT = 'all' | 'polymer' | 'protein' | 'nucleic' | 'branched' | 'ligand' | 'ion' | 'water' | 'coarse'; +declare const ComponentSelectorT: Type; /** `selector` parameter values for `component` node in MVS tree */ declare const _ComponentExpressionT: PartialC<{ - label_entity_id: StringC; - label_asym_id: StringC; - auth_asym_id: StringC; - label_seq_id: RefinementC; - auth_seq_id: RefinementC; - pdbx_PDB_ins_code: StringC; - beg_label_seq_id: RefinementC; - end_label_seq_id: RefinementC; - beg_auth_seq_id: RefinementC; - end_auth_seq_id: RefinementC; - label_comp_id: StringC; - auth_comp_id: StringC; - /** 0-based residue index in the source file */ - residue_index: RefinementC; - label_atom_id: StringC; - auth_atom_id: StringC; - type_symbol: StringC; - atom_id: RefinementC; - atom_index: RefinementC; - /** Instance identifier to distinguish instances of the same chain created by applying different symmetry operators, - * like 'ASM-X0-1' for assemblies or '1_555' for crystals */ - instance_id: StringC; + label_entity_id: StringC; + label_asym_id: StringC; + auth_asym_id: StringC; + label_seq_id: RefinementC; + auth_seq_id: RefinementC; + pdbx_PDB_ins_code: StringC; + beg_label_seq_id: RefinementC; + end_label_seq_id: RefinementC; + beg_auth_seq_id: RefinementC; + end_auth_seq_id: RefinementC; + label_comp_id: StringC; + auth_comp_id: StringC; + /** 0-based residue index in the source file */ + residue_index: RefinementC; + label_atom_id: StringC; + auth_atom_id: StringC; + type_symbol: StringC; + atom_id: RefinementC; + atom_index: RefinementC; + /** Instance identifier to distinguish instances of the same chain created by applying different symmetry operators, + * like 'ASM-X0-1' for assemblies or '1_555' for crystals */ + instance_id: StringC; }>; /** `selector` parameter values for `component` node in MVS tree */ interface ComponentExpressionT extends ValueFor { } declare const ComponentExpressionT: Type; /** `schema` parameter values for `*_from_uri` and `*_from_source` nodes in MVS tree */ -type SchemaT = - | 'whole_structure' - | 'entity' - | 'chain' - | 'auth_chain' - | 'residue' - | 'auth_residue' - | 'residue_range' - | 'auth_residue_range' - | 'atom' - | 'auth_atom' - | 'all_atomic'; +type SchemaT = 'whole_structure' | 'entity' | 'chain' | 'auth_chain' | 'residue' | 'auth_residue' | 'residue_range' | 'auth_residue_range' | 'atom' | 'auth_atom' | 'all_atomic'; declare const SchemaT: Type; /** `format` parameter values for `*_from_uri` nodes in MVS tree */ type SchemaFormatT = 'cif' | 'bcif' | 'json'; @@ -1149,1118 +987,769 @@ declare const SchemaFormatT: Type; /** Parameter values for vector params, e.g. `position` */ type Vector3 = [number, number, number]; declare const Vector3: Type; -type LabelAttachments = - | 'bottom-left' - | 'bottom-center' - | 'bottom-right' - | 'middle-left' - | 'middle-center' - | 'middle-right' - | 'top-left' - | 'top-center' - | 'top-right'; -declare const LabelAttachments: Type< - LabelAttachments, - LabelAttachments, - unknown ->; +type LabelAttachments = 'bottom-left' | 'bottom-center' | 'bottom-right' | 'middle-left' | 'middle-center' | 'middle-right' | 'top-left' | 'top-center' | 'top-right'; +declare const LabelAttachments: Type; /** Primitives-related types */ declare const _PrimitiveComponentExpressionT: PartialC<{ - structure_ref: StringC; - expression_schema: Type; - expressions: ArrayC< - Type - >; + structure_ref: StringC; + expression_schema: Type; + expressions: ArrayC>; }>; /** Primitives-related types */ -interface PrimitiveComponentExpressionT - extends ValueFor { -} -declare const PrimitiveComponentExpressionT: Type< - PrimitiveComponentExpressionT ->; -declare const PrimitivePositionT: UnionC< - [ - Type, - Type, - Type, - ] ->; +interface PrimitiveComponentExpressionT extends ValueFor { +} +declare const PrimitiveComponentExpressionT: Type; +declare const PrimitivePositionT: UnionC<[Type, Type, Type]>; type PrimitivePositionT = ValueFor; /** Hexadecimal color string, e.g. '#FF1100' (the type matches more than just valid HexColor strings) */ type HexColorT = `#${string}`; declare const HexColorT: Type<`#${string}`, `#${string}`, unknown>; /** Named color string (e.g. 'red') for `color` parameter values for `color` node in MVS tree */ declare const ColorNameT: Type; -type ColorNameT = - | 'aliceblue' - | 'antiquewhite' - | 'aqua' - | 'aquamarine' - | 'azure' - | 'beige' - | 'bisque' - | 'black' - | 'blanchedalmond' - | 'blue' - | 'blueviolet' - | 'brown' - | 'burlywood' - | 'cadetblue' - | 'chartreuse' - | 'chocolate' - | 'coral' - | 'cornflower' - | 'cornflowerblue' - | 'cornsilk' - | 'crimson' - | 'cyan' - | 'darkblue' - | 'darkcyan' - | 'darkgoldenrod' - | 'darkgray' - | 'darkgreen' - | 'darkgrey' - | 'darkkhaki' - | 'darkmagenta' - | 'darkolivegreen' - | 'darkorange' - | 'darkorchid' - | 'darkred' - | 'darksalmon' - | 'darkseagreen' - | 'darkslateblue' - | 'darkslategray' - | 'darkslategrey' - | 'darkturquoise' - | 'darkviolet' - | 'deeppink' - | 'deepskyblue' - | 'dimgray' - | 'dimgrey' - | 'dodgerblue' - | 'firebrick' - | 'floralwhite' - | 'forestgreen' - | 'fuchsia' - | 'gainsboro' - | 'ghostwhite' - | 'gold' - | 'goldenrod' - | 'gray' - | 'green' - | 'greenyellow' - | 'grey' - | 'honeydew' - | 'hotpink' - | 'indianred' - | 'indigo' - | 'ivory' - | 'khaki' - | 'laserlemon' - | 'lavender' - | 'lavenderblush' - | 'lawngreen' - | 'lemonchiffon' - | 'lightblue' - | 'lightcoral' - | 'lightcyan' - | 'lightgoldenrod' - | 'lightgoldenrodyellow' - | 'lightgray' - | 'lightgreen' - | 'lightgrey' - | 'lightpink' - | 'lightsalmon' - | 'lightseagreen' - | 'lightskyblue' - | 'lightslategray' - | 'lightslategrey' - | 'lightsteelblue' - | 'lightyellow' - | 'lime' - | 'limegreen' - | 'linen' - | 'magenta' - | 'maroon' - | 'maroon2' - | 'maroon3' - | 'mediumaquamarine' - | 'mediumblue' - | 'mediumorchid' - | 'mediumpurple' - | 'mediumseagreen' - | 'mediumslateblue' - | 'mediumspringgreen' - | 'mediumturquoise' - | 'mediumvioletred' - | 'midnightblue' - | 'mintcream' - | 'mistyrose' - | 'moccasin' - | 'navajowhite' - | 'navy' - | 'oldlace' - | 'olive' - | 'olivedrab' - | 'orange' - | 'orangered' - | 'orchid' - | 'palegoldenrod' - | 'palegreen' - | 'paleturquoise' - | 'palevioletred' - | 'papayawhip' - | 'peachpuff' - | 'peru' - | 'pink' - | 'plum' - | 'powderblue' - | 'purple' - | 'purple2' - | 'purple3' - | 'rebeccapurple' - | 'red' - | 'rosybrown' - | 'royalblue' - | 'saddlebrown' - | 'salmon' - | 'sandybrown' - | 'seagreen' - | 'seashell' - | 'sienna' - | 'silver' - | 'skyblue' - | 'slateblue' - | 'slategray' - | 'slategrey' - | 'snow' - | 'springgreen' - | 'steelblue' - | 'tan' - | 'teal' - | 'thistle' - | 'tomato' - | 'turquoise' - | 'violet' - | 'wheat' - | 'white' - | 'whitesmoke' - | 'yellow' - | 'yellowgreen'; +type ColorNameT = 'aliceblue' | 'antiquewhite' | 'aqua' | 'aquamarine' | 'azure' | 'beige' | 'bisque' | 'black' | 'blanchedalmond' | 'blue' | 'blueviolet' | 'brown' | 'burlywood' | 'cadetblue' | 'chartreuse' | 'chocolate' | 'coral' | 'cornflower' | 'cornflowerblue' | 'cornsilk' | 'crimson' | 'cyan' | 'darkblue' | 'darkcyan' | 'darkgoldenrod' | 'darkgray' | 'darkgreen' | 'darkgrey' | 'darkkhaki' | 'darkmagenta' | 'darkolivegreen' | 'darkorange' | 'darkorchid' | 'darkred' | 'darksalmon' | 'darkseagreen' | 'darkslateblue' | 'darkslategray' | 'darkslategrey' | 'darkturquoise' | 'darkviolet' | 'deeppink' | 'deepskyblue' | 'dimgray' | 'dimgrey' | 'dodgerblue' | 'firebrick' | 'floralwhite' | 'forestgreen' | 'fuchsia' | 'gainsboro' | 'ghostwhite' | 'gold' | 'goldenrod' | 'gray' | 'green' | 'greenyellow' | 'grey' | 'honeydew' | 'hotpink' | 'indianred' | 'indigo' | 'ivory' | 'khaki' | 'laserlemon' | 'lavender' | 'lavenderblush' | 'lawngreen' | 'lemonchiffon' | 'lightblue' | 'lightcoral' | 'lightcyan' | 'lightgoldenrod' | 'lightgoldenrodyellow' | 'lightgray' | 'lightgreen' | 'lightgrey' | 'lightpink' | 'lightsalmon' | 'lightseagreen' | 'lightskyblue' | 'lightslategray' | 'lightslategrey' | 'lightsteelblue' | 'lightyellow' | 'lime' | 'limegreen' | 'linen' | 'magenta' | 'maroon' | 'maroon2' | 'maroon3' | 'mediumaquamarine' | 'mediumblue' | 'mediumorchid' | 'mediumpurple' | 'mediumseagreen' | 'mediumslateblue' | 'mediumspringgreen' | 'mediumturquoise' | 'mediumvioletred' | 'midnightblue' | 'mintcream' | 'mistyrose' | 'moccasin' | 'navajowhite' | 'navy' | 'oldlace' | 'olive' | 'olivedrab' | 'orange' | 'orangered' | 'orchid' | 'palegoldenrod' | 'palegreen' | 'paleturquoise' | 'palevioletred' | 'papayawhip' | 'peachpuff' | 'peru' | 'pink' | 'plum' | 'powderblue' | 'purple' | 'purple2' | 'purple3' | 'rebeccapurple' | 'red' | 'rosybrown' | 'royalblue' | 'saddlebrown' | 'salmon' | 'sandybrown' | 'seagreen' | 'seashell' | 'sienna' | 'silver' | 'skyblue' | 'slateblue' | 'slategray' | 'slategrey' | 'snow' | 'springgreen' | 'steelblue' | 'tan' | 'teal' | 'thistle' | 'tomato' | 'turquoise' | 'violet' | 'wheat' | 'white' | 'whitesmoke' | 'yellow' | 'yellowgreen'; /** `color` parameter values for `color` node in MVS tree */ type ColorT = ColorNameT | HexColorT; declare const ColorT: Type; -type ColorListNameT = - | 'Reds' - | 'Oranges' - | 'Greens' - | 'Blues' - | 'Purples' - | 'Greys' - | 'OrRd' - | 'BuGn' - | 'PuBuGn' - | 'GnBu' - | 'PuBu' - | 'BuPu' - | 'RdPu' - | 'PuRd' - | 'YlOrRd' - | 'YlOrBr' - | 'YlGn' - | 'YlGnBu' - | 'Magma' - | 'Inferno' - | 'Plasma' - | 'Viridis' - | 'Cividis' - | 'Turbo' - | 'Warm' - | 'Cool' - | 'CubehelixDefault' - | 'Rainbow' - | 'Sinebow' - | 'RdBu' - | 'RdGy' - | 'PiYG' - | 'BrBG' - | 'PRGn' - | 'PuOr' - | 'RdYlGn' - | 'RdYlBu' - | 'Spectral' - | 'Category10' - | 'Observable10' - | 'Tableau10' - | 'Set1' - | 'Set2' - | 'Set3' - | 'Pastel1' - | 'Pastel2' - | 'Dark2' - | 'Paired' - | 'Accent' - | 'Chainbow'; +type ColorListNameT = 'Reds' | 'Oranges' | 'Greens' | 'Blues' | 'Purples' | 'Greys' | 'OrRd' | 'BuGn' | 'PuBuGn' | 'GnBu' | 'PuBu' | 'BuPu' | 'RdPu' | 'PuRd' | 'YlOrRd' | 'YlOrBr' | 'YlGn' | 'YlGnBu' | 'Magma' | 'Inferno' | 'Plasma' | 'Viridis' | 'Cividis' | 'Turbo' | 'Warm' | 'Cool' | 'CubehelixDefault' | 'Rainbow' | 'Sinebow' | 'RdBu' | 'RdGy' | 'PiYG' | 'BrBG' | 'PRGn' | 'PuOr' | 'RdYlGn' | 'RdYlBu' | 'Spectral' | 'Category10' | 'Observable10' | 'Tableau10' | 'Set1' | 'Set2' | 'Set3' | 'Pastel1' | 'Pastel2' | 'Dark2' | 'Paired' | 'Accent' | 'Chainbow'; declare const ColorListNameT: Type; -type ColorDictNameT = - | 'ElementSymbol' - | 'ResidueName' - | 'ResidueProperties' - | 'SecondaryStructure'; +type ColorDictNameT = 'ElementSymbol' | 'ResidueName' | 'ResidueProperties' | 'SecondaryStructure'; declare const ColorDictNameT: Type; -declare const _CategoricalPalette: IntersectionC<[ - TypeC<{ - kind: Type<'categorical', 'categorical', unknown>; - }>, - PartialC<{ - colors: UnionC< - [ - Type, - Type, - ArrayC>, - RecordC>, - ] - >; +declare const _CategoricalPalette: IntersectionC<[TypeC<{ + kind: Type<"categorical", "categorical", unknown>; +}>, PartialC<{ + colors: UnionC<[Type, Type, ArrayC>, RecordC>]>; /** Repeat color list once all colors are depleted (only applies if `colors` is a list or a color list name). */ repeat_color_list: BooleanC; /** Sort actual annotation values before assigning colors from a list (none = take values in order of their first occurrence). */ - sort: Type< - 'none' | 'numeric' | 'lexical', - 'none' | 'numeric' | 'lexical', - unknown - >; + sort: Type<"none" | "numeric" | "lexical", "none" | "numeric" | "lexical", unknown>; /** Sort direction. */ - sort_direction: Type< - 'ascending' | 'descending', - 'ascending' | 'descending', - unknown - >; + sort_direction: Type<"ascending" | "descending", "ascending" | "descending", unknown>; /** Treat annotation values as case-insensitive strings. */ case_insensitive: BooleanC; /** Color to use when a) `colors` is a dictionary (or a color dictionary name) and given key is not present, or b) `colors` is a list (or a color list name) and there are more actual annotation values than listed colors and `repeat_color_list` is not true. */ missing_color: Type; - }>, -]>; +}>]>; interface CategoricalPalette extends ValueFor { } declare const CategoricalPalette: Type; -declare const _DiscretePalette: IntersectionC<[ - TypeC<{ - kind: Type<'discrete', 'discrete', unknown>; - }>, - PartialC<{ +declare const _DiscretePalette: IntersectionC<[TypeC<{ + kind: Type<"discrete", "discrete", unknown>; +}>, PartialC<{ /** Define colors for the discrete color palette and optionally corresponding checkpoints. * Checkpoints refer to the values normalized to interval [0, 1] if `mode` is `"normalized"` (default), or to the values directly if `mode` is `"absolute"`. * If checkpoints are not provided, they will created automatically (uniformly distributed over interval [0, 1]). * If 1 checkpoint is provided for each color, then the color applies to values from this checkpoint (inclusive) until the next listed checkpoint (exclusive); the last color applies until Infinity. * If 2 checkpoints are provided for each color, then the color applies to values from the first until the second checkpoint (inclusive); null means +/-Infinity; if ranges overlap, the later listed takes precedence. */ - colors: UnionC< - [ - Type, - ArrayC>, - ArrayC, NumberC]>>, - ArrayC< - TupleC< - [ - Type, - Type, - Type, - ] - > - >, - ] - >; + colors: UnionC<[Type, ArrayC>, ArrayC, NumberC]>>, ArrayC, Type, Type]>>]>; /** Reverse order of `colors` list. Only has effect when `colors` is a color list name or a color list without explicit checkpoints. */ reverse: BooleanC; /** Defines whether the annotation values should be normalized before assigning color based on checkpoints in `colors` (`x_normalized = (x - x_min) / (x_max - x_min)`, where `[x_min, x_max]` are either `value_domain` if provided, or the lowest and the highest value encountered in the annotation). Default is `"normalized"`. */ - mode: Type<'absolute' | 'normalized', 'absolute' | 'normalized', unknown>; + mode: Type<"absolute" | "normalized", "absolute" | "normalized", unknown>; /** Defines `x_min` and `x_max` for normalization of annotation values. Either can be `null`, meaning that minimum/maximum of the actual values will be used. Only used when `mode` is `"normalized"`. */ - value_domain: TupleC< - [ - Type, - Type, - ] - >; - }>, -]>; + value_domain: TupleC<[Type, Type]>; +}>]>; interface DiscretePalette extends ValueFor { } declare const DiscretePalette: Type; -declare const _ContinuousPalette: IntersectionC<[ - TypeC<{ - kind: Type<'continuous', 'continuous', unknown>; - }>, - PartialC<{ +declare const _ContinuousPalette: IntersectionC<[TypeC<{ + kind: Type<"continuous", "continuous", unknown>; +}>, PartialC<{ /** Define colors for the continuous color palette and optionally corresponding checkpoints (i.e. annotation values that are mapped to each color). * Checkpoints refer to the values normalized to interval [0, 1] if `mode` is `"normalized"` (default), or to the values directly if `mode` is `"absolute"`. * If checkpoints are not provided, they will created automatically (uniformly distributed over interval [0, 1]). */ - colors: UnionC< - [ - Type, - ArrayC>, - ArrayC, NumberC]>>, - ] - >; + colors: UnionC<[Type, ArrayC>, ArrayC, NumberC]>>]>; /** Reverse order of `colors` list. Only has effect when `colors` is a color list name or a color list without explicit checkpoints. */ reverse: BooleanC; /** Defines whether the annotation values should be normalized before assigning color based on checkpoints in `colors` (`x_normalized = (x - x_min) / (x_max - x_min)`, where `[x_min, x_max]` are either `value_domain` if provided, or the lowest and the highest value encountered in the annotation). Default is `"normalized"`. */ - mode: Type<'absolute' | 'normalized', 'absolute' | 'normalized', unknown>; + mode: Type<"absolute" | "normalized", "absolute" | "normalized", unknown>; /** Defines `x_min` and `x_max` for normalization of annotation values. Either can be `null`, meaning that minimum/maximum of the actual values will be used. Only used when `mode` is `"normalized"`. */ - value_domain: TupleC< - [ - Type, - Type, - ] - >; + value_domain: TupleC<[Type, Type]>; /** Color to use for values below the lowest checkpoint. 'auto' means color of the lowest checkpoint. */ - underflow_color: Type< - 'auto' | ColorT | null, - 'auto' | ColorT | null, - unknown - >; + underflow_color: Type<"auto" | ColorT | null, "auto" | ColorT | null, unknown>; /** Color to use for values above the highest checkpoint. 'auto' means color of the highest checkpoint. */ - overflow_color: Type< - 'auto' | ColorT | null, - 'auto' | ColorT | null, - unknown - >; - }>, -]>; + overflow_color: Type<"auto" | ColorT | null, "auto" | ColorT | null, unknown>; +}>]>; interface ContinuousPalette extends ValueFor { } declare const ContinuousPalette: Type; -type Easing = - | 'linear' - | 'bounce-in' - | 'bounce-out' - | 'bounce-in-out' - | 'circle-in' - | 'circle-out' - | 'circle-in-out' - | 'cubic-in' - | 'cubic-out' - | 'cubic-in-out' - | 'exp-in' - | 'exp-out' - | 'exp-in-out' - | 'quad-in' - | 'quad-out' - | 'quad-in-out' - | 'sin-in' - | 'sin-out' - | 'sin-in-out'; +type Easing = 'linear' | 'bounce-in' | 'bounce-out' | 'bounce-in-out' | 'circle-in' | 'circle-out' | 'circle-in-out' | 'cubic-in' | 'cubic-out' | 'cubic-in-out' | 'exp-in' | 'exp-out' | 'exp-in-out' | 'quad-in' | 'quad-out' | 'quad-in-out' | 'sin-in' | 'sin-out' | 'sin-in-out'; declare const Easing: Type; declare const MVSAnimationSchema: TreeSchema<{ - animation: SimpleParamsSchema<{ - /** Frame time in milliseconds. */ - frame_time_ms: OptionalField; - /** Total duration of the animation. If not specified, computed as maximum of all transitions. */ - duration_ms: OptionalField; - /** Determines whether the animation should autoplay when a snapshot is loaded */ - autoplay: OptionalField; - /** Determines whether the animation should loop when it reaches the end. */ - loop: OptionalField; - /** Determines whether the camera state should be included in the animation. */ - include_camera: OptionalField; - /** Determines whether the canvas state should be included in the animation. */ - include_canvas: OptionalField; - }>; - interpolate: UnionParamsSchema<'kind', { - scalar: SimpleParamsSchema<{ - /** Magnitude of the noise to apply to the interpolated value. */ - noise_magnitude: OptionalField; - /** Start value. If a list of values is provided, each element will be interpolated separately. If unset, parent state value is used. */ - start: OptionalField; - /** End value. If a list of values is provided, each element will be interpolated separately. If unset, only noise is applied. */ - end: OptionalField; - /** Whether to round the values to the closest integer. Useful for example for trajectory animation. */ - discrete: OptionalField; - /** Easing function to use for the transition. */ - easing: OptionalField; - /** Determines how many times the interpolation loops. Current T = frequency * t mod 1. */ - frequency: OptionalField; - /** Whether to alternate the direction of the interpolation for frequency > 1. */ - alternate_direction: OptionalField; - /** Reference to the node. */ - target_ref: RequiredField; - /** Value accessor. */ - property: RequiredField; - /** Start time of the transition in milliseconds. */ - start_ms: OptionalField; - /** Duration of the transition in milliseconds. */ - duration_ms: RequiredField; - }>; - vec3: SimpleParamsSchema<{ - /** Magnitude of the noise to apply to the interpolated value. */ - noise_magnitude: OptionalField; - /** Start value. If unset, parent state value is used. Must be array of length 3N (x1, y1, z1, x2, y2, z2, ...). */ - start: OptionalField; - /** End value. Must be array of length 3N (x1, y1, z1, x2, y2, z2, ...). If unset, only noise is applied. */ - end: OptionalField; - /** Whether to use spherical interpolation. */ - spherical: OptionalField; - /** Easing function to use for the transition. */ - easing: OptionalField; - /** Determines how many times the interpolation loops. Current T = frequency * t mod 1. */ - frequency: OptionalField; - /** Whether to alternate the direction of the interpolation for frequency > 1. */ - alternate_direction: OptionalField; - /** Reference to the node. */ - target_ref: RequiredField; - /** Value accessor. */ - property: RequiredField; - /** Start time of the transition in milliseconds. */ - start_ms: OptionalField; - /** Duration of the transition in milliseconds. */ - duration_ms: RequiredField; + animation: SimpleParamsSchema<{ + /** Frame time in milliseconds. */ + frame_time_ms: OptionalField; + /** Total duration of the animation. If not specified, computed as maximum of all transitions. */ + duration_ms: OptionalField; + /** Determines whether the animation should autoplay when a snapshot is loaded */ + autoplay: OptionalField; + /** Determines whether the animation should loop when it reaches the end. */ + loop: OptionalField; + /** Determines whether the camera state should be included in the animation. */ + include_camera: OptionalField; + /** Determines whether the canvas state should be included in the animation. */ + include_canvas: OptionalField; }>; - rotation_matrix: SimpleParamsSchema<{ - /** Magnitude of the noise to apply to the interpolated value. */ - noise_magnitude: OptionalField; - /** Start value. If unset, parent state value is used. */ - start: OptionalField; - /** End value. If unset, only noise is applied. */ - end: OptionalField; - /** Easing function to use for the transition. */ - easing: OptionalField; - /** Determines how many times the interpolation loops. Current T = frequency * t mod 1. */ - frequency: OptionalField; - /** Whether to alternate the direction of the interpolation for frequency > 1. */ - alternate_direction: OptionalField; - /** Reference to the node. */ - target_ref: RequiredField; - /** Value accessor. */ - property: RequiredField; - /** Start time of the transition in milliseconds. */ - start_ms: OptionalField; - /** Duration of the transition in milliseconds. */ - duration_ms: RequiredField; + interpolate: UnionParamsSchema<"kind", { + scalar: SimpleParamsSchema<{ + /** Magnitude of the noise to apply to the interpolated value. */ + noise_magnitude: OptionalField; + /** Start value. If a list of values is provided, each element will be interpolated separately. If unset, parent state value is used. */ + start: OptionalField; + /** End value. If a list of values is provided, each element will be interpolated separately. If unset, only noise is applied. */ + end: OptionalField; + /** Whether to round the values to the closest integer. Useful for example for trajectory animation. */ + discrete: OptionalField; + /** Easing function to use for the transition. */ + easing: OptionalField; + /** Determines how many times the interpolation loops. Current T = frequency * t mod 1. */ + frequency: OptionalField; + /** Whether to alternate the direction of the interpolation for frequency > 1. */ + alternate_direction: OptionalField; + /** Reference to the node. */ + target_ref: RequiredField; + /** Value accessor. */ + property: RequiredField; + /** Start time of the transition in milliseconds. */ + start_ms: OptionalField; + /** Duration of the transition in milliseconds. */ + duration_ms: RequiredField; + }>; + vec3: SimpleParamsSchema<{ + /** Magnitude of the noise to apply to the interpolated value. */ + noise_magnitude: OptionalField; + /** Start value. If unset, parent state value is used. Must be array of length 3N (x1, y1, z1, x2, y2, z2, ...). */ + start: OptionalField; + /** End value. Must be array of length 3N (x1, y1, z1, x2, y2, z2, ...). If unset, only noise is applied. */ + end: OptionalField; + /** Whether to use spherical interpolation. */ + spherical: OptionalField; + /** Easing function to use for the transition. */ + easing: OptionalField; + /** Determines how many times the interpolation loops. Current T = frequency * t mod 1. */ + frequency: OptionalField; + /** Whether to alternate the direction of the interpolation for frequency > 1. */ + alternate_direction: OptionalField; + /** Reference to the node. */ + target_ref: RequiredField; + /** Value accessor. */ + property: RequiredField; + /** Start time of the transition in milliseconds. */ + start_ms: OptionalField; + /** Duration of the transition in milliseconds. */ + duration_ms: RequiredField; + }>; + rotation_matrix: SimpleParamsSchema<{ + /** Magnitude of the noise to apply to the interpolated value. */ + noise_magnitude: OptionalField; + /** Start value. If unset, parent state value is used. */ + start: OptionalField; + /** End value. If unset, only noise is applied. */ + end: OptionalField; + /** Easing function to use for the transition. */ + easing: OptionalField; + /** Determines how many times the interpolation loops. Current T = frequency * t mod 1. */ + frequency: OptionalField; + /** Whether to alternate the direction of the interpolation for frequency > 1. */ + alternate_direction: OptionalField; + /** Reference to the node. */ + target_ref: RequiredField; + /** Value accessor. */ + property: RequiredField; + /** Start time of the transition in milliseconds. */ + start_ms: OptionalField; + /** Duration of the transition in milliseconds. */ + duration_ms: RequiredField; + }>; + transform_matrix: SimpleParamsSchema<{ + /** Pivot point for rotation and scale. */ + pivot: OptionalField; + /** Start rotation value. If unset, parent state value is used. */ + rotation_start: OptionalField; + /** End rotation value. If unset, only noise is applied */ + rotation_end: OptionalField; + /** Magnitude of the noise to apply to the rotation. */ + rotation_noise_magnitude: OptionalField; + /** Easing function to use for the rotation. */ + rotation_easing: OptionalField; + /** Determines how many times the rotation interpolation loops. Current T = frequency * t mod 1. */ + rotation_frequency: OptionalField; + /** Whether to alternate the direction of the interpolation for frequency > 1. */ + rotation_alternate_direction: OptionalField; + /** Start translation value. If unset, parent state value is used. */ + translation_start: OptionalField; + /** End translation value. If unset, only noise is applied. */ + translation_end: OptionalField; + /** Magnitude of the noise to apply to the translation. */ + translation_noise_magnitude: OptionalField; + /** Easing function to use for the translation. */ + translation_easing: OptionalField; + /** Determines how many times the translation interpolation loops. Current T = frequency * t mod 1. */ + translation_frequency: OptionalField; + /** Whether to alternate the direction of the interpolation for frequency > 1. */ + translation_alternate_direction: OptionalField; + /** Start scale value. If unset, parent state value is used. */ + scale_start: OptionalField; + /** End scale value. If unset, only noise is applied. */ + scale_end: OptionalField; + /** Magnitude of the noise to apply to the scale. */ + scale_noise_magnitude: OptionalField; + /** Easing function to use for the scale. */ + scale_easing: OptionalField; + /** Determines how many times the scale interpolation loops. Current T = frequency * t mod 1. */ + scale_frequency: OptionalField; + /** Whether to alternate the direction of the interpolation for frequency > 1. */ + scale_alternate_direction: OptionalField; + /** Reference to the node. */ + target_ref: RequiredField; + /** Value accessor. */ + property: RequiredField; + /** Start time of the transition in milliseconds. */ + start_ms: OptionalField; + /** Duration of the transition in milliseconds. */ + duration_ms: RequiredField; + }>; + color: SimpleParamsSchema<{ + /** Start value. If unset, parent state value is used. */ + start: OptionalField; + /** End value. */ + end: OptionalField; + /** Palette to sample colors from. Overrides start and end values. */ + palette: OptionalField; + /** Easing function to use for the transition. */ + easing: OptionalField; + /** Determines how many times the interpolation loops. Current T = frequency * t mod 1. */ + frequency: OptionalField; + /** Whether to alternate the direction of the interpolation for frequency > 1. */ + alternate_direction: OptionalField; + /** Reference to the node. */ + target_ref: RequiredField; + /** Value accessor. */ + property: RequiredField; + /** Start time of the transition in milliseconds. */ + start_ms: OptionalField; + /** Duration of the transition in milliseconds. */ + duration_ms: RequiredField; + }>; }>; - transform_matrix: SimpleParamsSchema<{ - /** Pivot point for rotation and scale. */ - pivot: OptionalField; - /** Start rotation value. If unset, parent state value is used. */ - rotation_start: OptionalField; - /** End rotation value. If unset, only noise is applied */ - rotation_end: OptionalField; - /** Magnitude of the noise to apply to the rotation. */ - rotation_noise_magnitude: OptionalField; - /** Easing function to use for the rotation. */ - rotation_easing: OptionalField; - /** Determines how many times the rotation interpolation loops. Current T = frequency * t mod 1. */ - rotation_frequency: OptionalField; - /** Whether to alternate the direction of the interpolation for frequency > 1. */ - rotation_alternate_direction: OptionalField; - /** Start translation value. If unset, parent state value is used. */ - translation_start: OptionalField; - /** End translation value. If unset, only noise is applied. */ - translation_end: OptionalField; - /** Magnitude of the noise to apply to the translation. */ - translation_noise_magnitude: OptionalField; - /** Easing function to use for the translation. */ - translation_easing: OptionalField; - /** Determines how many times the translation interpolation loops. Current T = frequency * t mod 1. */ - translation_frequency: OptionalField; - /** Whether to alternate the direction of the interpolation for frequency > 1. */ - translation_alternate_direction: OptionalField; - /** Start scale value. If unset, parent state value is used. */ - scale_start: OptionalField; - /** End scale value. If unset, only noise is applied. */ - scale_end: OptionalField; - /** Magnitude of the noise to apply to the scale. */ - scale_noise_magnitude: OptionalField; - /** Easing function to use for the scale. */ - scale_easing: OptionalField; - /** Determines how many times the scale interpolation loops. Current T = frequency * t mod 1. */ - scale_frequency: OptionalField; - /** Whether to alternate the direction of the interpolation for frequency > 1. */ - scale_alternate_direction: OptionalField; - /** Reference to the node. */ - target_ref: RequiredField; - /** Value accessor. */ - property: RequiredField; - /** Start time of the transition in milliseconds. */ - start_ms: OptionalField; - /** Duration of the transition in milliseconds. */ - duration_ms: RequiredField; - }>; - color: SimpleParamsSchema<{ - /** Start value. If unset, parent state value is used. */ - start: OptionalField< - ColorT | { - [x: string]: ColorT; - [x: number]: ColorT; - } | null - >; - /** End value. */ - end: OptionalField< - ColorT | { - [x: string]: ColorT; - [x: number]: ColorT; - } | null - >; - /** Palette to sample colors from. Overrides start and end values. */ - palette: OptionalField; - /** Easing function to use for the transition. */ - easing: OptionalField; - /** Determines how many times the interpolation loops. Current T = frequency * t mod 1. */ - frequency: OptionalField; - /** Whether to alternate the direction of the interpolation for frequency > 1. */ - alternate_direction: OptionalField; - /** Reference to the node. */ - target_ref: RequiredField; - /** Value accessor. */ - property: RequiredField; - /** Start time of the transition in milliseconds. */ - start_ms: OptionalField; - /** Duration of the transition in milliseconds. */ - duration_ms: RequiredField; - }>; - }>; -}, 'animation'>; +}, "animation">; type MVSAnimationKind = keyof typeof MVSAnimationSchema.nodes; type MVSAnimationTree = TreeFor; -type MVSAnimationNodeParams = ParamsOfKind< - MVSAnimationTree, - TKind ->; -type MVSAnimationSubtree = - SubtreeOfKind; +type MVSAnimationNodeParams = ParamsOfKind; +type MVSAnimationSubtree = SubtreeOfKind; /** Schema for `MVSTree` (MolViewSpec tree) */ declare const MVSTreeSchema: TreeSchema<{ - root: SimpleParamsSchema<{}>; - download: SimpleParamsSchema<{ - /** URL of the data resource. */ - url: RequiredField; - }>; - parse: SimpleParamsSchema<{ - /** Format of the input data resource. */ - format: RequiredField; - }>; - coordinates: SimpleParamsSchema<{}>; - structure: SimpleParamsSchema<{ - /** Type of structure to be created (`"model"` for original model coordinates, `"assembly"` for assembly structure, `"symmetry"` for a set of crystal unit cells based on Miller indices, `"symmetry_mates"` for a set of asymmetric units within a radius from the original model). */ - type: RequiredField; - /** Header of the CIF block to read coordinates from (only applies when the input data are from CIF or BinaryCIF). If `null`, block is selected based on `block_index`. */ - block_header: OptionalField; - /** 0-based index of the CIF block to read coordinates from (only applies when the input data are from CIF or BinaryCIF and `block_header` is `null`). */ - block_index: OptionalField; - /** 0-based index of model in case the input data contain multiple models. */ - model_index: OptionalField; - /** Assembly identifier (only applies when `kind` is `"assembly"`). If `null`, the first assembly is selected. */ - assembly_id: OptionalField; - /** Distance (in Angstroms) from the original model in which asymmetric units should be included (only applies when `kind` is `"symmetry_mates"`). */ - radius: OptionalField; - /** Miller indices of the bottom-left unit cell to be included (only applies when `kind` is `"symmetry"`). */ - ijk_min: OptionalField<[number, number, number]>; - /** Miller indices of the top-right unit cell to be included (only applies when `kind` is `"symmetry"`). */ - ijk_max: OptionalField<[number, number, number]>; - /** Reference to a specific set of coordinates. */ - coordinates_ref: OptionalField; - }>; - transform: SimpleParamsSchema<{ - /** Rotation matrix (3x3 matrix flattened in column major format (j*3+i indexing), this is equivalent to Fortran-order in numpy). This matrix will multiply the structure coordinates from the left. The default value is the identity matrix (corresponds to no rotation). */ - rotation: OptionalField; - /** Translation vector, applied to the structure coordinates after rotation. The default value is the zero vector (corresponds to no translation). */ - translation: OptionalField; - /** Point to rotate the object around. Can be either a 3D vector or dynamically computed object centroid. */ - rotation_center: OptionalField<'centroid' | Vector3 | null>; - /** Transform matrix (4x4 matrix flattened in column major format (j*4+i indexing), this is equivalent to Fortran-order in numpy). This matrix will multiply the structure coordinates from the left. Takes precedence over `rotation` and `translation`. */ - matrix: OptionalField; - }>; - instance: SimpleParamsSchema<{ - /** Rotation matrix (3x3 matrix flattened in column major format (j*3+i indexing), this is equivalent to Fortran-order in numpy). This matrix will multiply the structure coordinates from the left. The default value is the identity matrix (corresponds to no rotation). */ - rotation: OptionalField; - /** Translation vector, applied to the structure coordinates after rotation. The default value is the zero vector (corresponds to no translation). */ - translation: OptionalField; - /** Point to rotate the object around. Can be either a 3D vector or dynamically computed object centroid. */ - rotation_center: OptionalField<'centroid' | Vector3 | null>; - /** Transform matrix (4x4 matrix flattened in column major format (j*4+i indexing), this is equivalent to Fortran-order in numpy). This matrix will multiply the structure coordinates from the left. Takes precedence over `rotation` and `translation`. */ - matrix: OptionalField; - }>; - component: SimpleParamsSchema<{ - /** Defines what part of the parent structure should be included in this component. */ - selector: RequiredField< - ComponentSelectorT | ComponentExpressionT | ComponentExpressionT[] - >; - }>; - component_from_uri: SimpleParamsSchema<{ - /** Name of the column in CIF or field name (key) in JSON that contains the component identifier. */ - field_name: OptionalField; - /** List of component identifiers (i.e. values in the field given by `field_name`) which should be included in this component. If `null`, component identifiers are ignored (all annotation rows are included), and `field_name` field can be dropped from the annotation. */ - field_values: OptionalField; - /** URL of the annotation resource. */ - uri: RequiredField; - /** Format of the annotation resource. */ - format: RequiredField; - /** Annotation schema defines what fields in the annotation will be taken into account. */ - schema: RequiredField; - /** Header of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, block is selected based on `block_index`. */ - block_header: OptionalField; - /** 0-based index of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"` and `block_header` is `null`). */ - block_index: OptionalField; - /** Name of the CIF category to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, the first category in the block is used. */ - category_name: OptionalField; - /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ - field_remapping: OptionalField<{ - [x: string]: string | null; - }>; - }>; - component_from_source: SimpleParamsSchema<{ - /** Name of the column in CIF or field name (key) in JSON that contains the component identifier. */ - field_name: OptionalField; - /** List of component identifiers (i.e. values in the field given by `field_name`) which should be included in this component. If `null`, component identifiers are ignored (all annotation rows are included), and `field_name` field can be dropped from the annotation. */ - field_values: OptionalField; - /** Annotation schema defines what fields in the annotation will be taken into account. */ - schema: RequiredField; - /** Header of the CIF block to read annotation from. If `null`, block is selected based on `block_index`. */ - block_header: OptionalField; - /** 0-based index of the CIF block to read annotation from (only applies when `block_header` is `null`). */ - block_index: OptionalField; - /** Name of the CIF category to read annotation from. If `null`, the first category in the block is used. */ - category_name: OptionalField; - /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ - field_remapping: OptionalField<{ - [x: string]: string | null; - }>; - }>; - representation: UnionParamsSchema<'type', { - cartoon: SimpleParamsSchema<{ - size_factor: OptionalField; - tubular_helices: OptionalField; + root: SimpleParamsSchema<{}>; + download: SimpleParamsSchema<{ + /** URL of the data resource. */ + url: RequiredField; }>; - backbone: SimpleParamsSchema<{ - size_factor: OptionalField; + parse: SimpleParamsSchema<{ + /** Format of the input data resource. */ + format: RequiredField; }>; - ball_and_stick: SimpleParamsSchema<{ - size_factor: OptionalField; - ignore_hydrogens: OptionalField; + coordinates: SimpleParamsSchema<{}>; + structure: SimpleParamsSchema<{ + /** Type of structure to be created (`"model"` for original model coordinates, `"assembly"` for assembly structure, `"symmetry"` for a set of crystal unit cells based on Miller indices, `"symmetry_mates"` for a set of asymmetric units within a radius from the original model). */ + type: RequiredField; + /** Header of the CIF block to read coordinates from (only applies when the input data are from CIF or BinaryCIF). If `null`, block is selected based on `block_index`. */ + block_header: OptionalField; + /** 0-based index of the CIF block to read coordinates from (only applies when the input data are from CIF or BinaryCIF and `block_header` is `null`). */ + block_index: OptionalField; + /** 0-based index of model in case the input data contain multiple models. */ + model_index: OptionalField; + /** Assembly identifier (only applies when `kind` is `"assembly"`). If `null`, the first assembly is selected. */ + assembly_id: OptionalField; + /** Distance (in Angstroms) from the original model in which asymmetric units should be included (only applies when `kind` is `"symmetry_mates"`). */ + radius: OptionalField; + /** Miller indices of the bottom-left unit cell to be included (only applies when `kind` is `"symmetry"`). */ + ijk_min: OptionalField<[number, number, number]>; + /** Miller indices of the top-right unit cell to be included (only applies when `kind` is `"symmetry"`). */ + ijk_max: OptionalField<[number, number, number]>; + /** Reference to a specific set of coordinates. */ + coordinates_ref: OptionalField; }>; - line: SimpleParamsSchema<{ - size_factor: OptionalField; - ignore_hydrogens: OptionalField; + transform: SimpleParamsSchema<{ + /** Rotation matrix (3x3 matrix flattened in column major format (j*3+i indexing), this is equivalent to Fortran-order in numpy). This matrix will multiply the structure coordinates from the left. The default value is the identity matrix (corresponds to no rotation). */ + rotation: OptionalField; + /** Translation vector, applied to the structure coordinates after rotation. The default value is the zero vector (corresponds to no translation). */ + translation: OptionalField; + /** Point to rotate the object around. Can be either a 3D vector or dynamically computed object centroid. */ + rotation_center: OptionalField<"centroid" | Vector3 | null>; + /** Transform matrix (4x4 matrix flattened in column major format (j*4+i indexing), this is equivalent to Fortran-order in numpy). This matrix will multiply the structure coordinates from the left. Takes precedence over `rotation` and `translation`. */ + matrix: OptionalField; }>; - spacefill: SimpleParamsSchema<{ - size_factor: OptionalField; - ignore_hydrogens: OptionalField; + instance: SimpleParamsSchema<{ + /** Rotation matrix (3x3 matrix flattened in column major format (j*3+i indexing), this is equivalent to Fortran-order in numpy). This matrix will multiply the structure coordinates from the left. The default value is the identity matrix (corresponds to no rotation). */ + rotation: OptionalField; + /** Translation vector, applied to the structure coordinates after rotation. The default value is the zero vector (corresponds to no translation). */ + translation: OptionalField; + /** Point to rotate the object around. Can be either a 3D vector or dynamically computed object centroid. */ + rotation_center: OptionalField<"centroid" | Vector3 | null>; + /** Transform matrix (4x4 matrix flattened in column major format (j*4+i indexing), this is equivalent to Fortran-order in numpy). This matrix will multiply the structure coordinates from the left. Takes precedence over `rotation` and `translation`. */ + matrix: OptionalField; }>; - carbohydrate: SimpleParamsSchema<{ - size_factor: OptionalField; + component: SimpleParamsSchema<{ + /** Defines what part of the parent structure should be included in this component. */ + selector: RequiredField; }>; - surface: SimpleParamsSchema<{ - surface_type: OptionalField<'gaussian' | 'molecular'>; - size_factor: OptionalField; - ignore_hydrogens: OptionalField; + component_from_uri: SimpleParamsSchema<{ + /** Name of the column in CIF or field name (key) in JSON that contains the component identifier. */ + field_name: OptionalField; + /** List of component identifiers (i.e. values in the field given by `field_name`) which should be included in this component. If `null`, component identifiers are ignored (all annotation rows are included), and `field_name` field can be dropped from the annotation. */ + field_values: OptionalField; + /** URL of the annotation resource. */ + uri: RequiredField; + /** Format of the annotation resource. */ + format: RequiredField; + /** Annotation schema defines what fields in the annotation will be taken into account. */ + schema: RequiredField; + /** Header of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, block is selected based on `block_index`. */ + block_header: OptionalField; + /** 0-based index of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"` and `block_header` is `null`). */ + block_index: OptionalField; + /** Name of the CIF category to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, the first category in the block is used. */ + category_name: OptionalField; + /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ + field_remapping: OptionalField<{ + [x: string]: string | null; + }>; }>; - }>; - volume: SimpleParamsSchema<{ - /** Channel identifier (only applies when the input data contain multiple channels). */ - channel_id: OptionalField; - }>; - volume_representation: UnionParamsSchema<'type', { - isosurface: SimpleParamsSchema<{ - relative_isovalue: OptionalField; - absolute_isovalue: OptionalField; - show_wireframe: OptionalField; - show_faces: OptionalField; + component_from_source: SimpleParamsSchema<{ + /** Name of the column in CIF or field name (key) in JSON that contains the component identifier. */ + field_name: OptionalField; + /** List of component identifiers (i.e. values in the field given by `field_name`) which should be included in this component. If `null`, component identifiers are ignored (all annotation rows are included), and `field_name` field can be dropped from the annotation. */ + field_values: OptionalField; + /** Annotation schema defines what fields in the annotation will be taken into account. */ + schema: RequiredField; + /** Header of the CIF block to read annotation from. If `null`, block is selected based on `block_index`. */ + block_header: OptionalField; + /** 0-based index of the CIF block to read annotation from (only applies when `block_header` is `null`). */ + block_index: OptionalField; + /** Name of the CIF category to read annotation from. If `null`, the first category in the block is used. */ + category_name: OptionalField; + /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ + field_remapping: OptionalField<{ + [x: string]: string | null; + }>; }>; - grid_slice: SimpleParamsSchema<{ - dimension: RequiredField<'x' | 'y' | 'z'>; - absolute_index: OptionalField; - relative_index: OptionalField; - relative_isovalue: OptionalField; - absolute_isovalue: OptionalField; + representation: UnionParamsSchema<"type", { + cartoon: SimpleParamsSchema<{ + size_factor: OptionalField; + tubular_helices: OptionalField; + }>; + backbone: SimpleParamsSchema<{ + size_factor: OptionalField; + }>; + ball_and_stick: SimpleParamsSchema<{ + size_factor: OptionalField; + ignore_hydrogens: OptionalField; + }>; + line: SimpleParamsSchema<{ + size_factor: OptionalField; + ignore_hydrogens: OptionalField; + }>; + spacefill: SimpleParamsSchema<{ + size_factor: OptionalField; + ignore_hydrogens: OptionalField; + }>; + carbohydrate: SimpleParamsSchema<{ + size_factor: OptionalField; + }>; + surface: SimpleParamsSchema<{ + surface_type: OptionalField<"gaussian" | "molecular">; + size_factor: OptionalField; + ignore_hydrogens: OptionalField; + }>; }>; - }>; - color: SimpleParamsSchema<{ - /** Color to apply to the representation. Can be either an X11 color name (e.g. `"red"`) or a hexadecimal code (e.g. `"#FF0011"`). */ - color: OptionalField; - /** Defines to what part of the representation this color should be applied. */ - selector: OptionalField< - ComponentSelectorT | ComponentExpressionT | ComponentExpressionT[] - >; - }>; - color_from_uri: SimpleParamsSchema<{ - /** Name of the column in CIF or field name (key) in JSON that contains the color. */ - field_name: OptionalField; - /** Customize mapping of annotation values to colors. */ - palette: OptionalField< - CategoricalPalette | DiscretePalette | ContinuousPalette | null - >; - /** URL of the annotation resource. */ - uri: RequiredField; - /** Format of the annotation resource. */ - format: RequiredField; - /** Annotation schema defines what fields in the annotation will be taken into account. */ - schema: RequiredField; - /** Header of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, block is selected based on `block_index`. */ - block_header: OptionalField; - /** 0-based index of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"` and `block_header` is `null`). */ - block_index: OptionalField; - /** Name of the CIF category to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, the first category in the block is used. */ - category_name: OptionalField; - /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ - field_remapping: OptionalField<{ - [x: string]: string | null; + volume: SimpleParamsSchema<{ + /** Channel identifier (only applies when the input data contain multiple channels). */ + channel_id: OptionalField; }>; - }>; - color_from_source: SimpleParamsSchema<{ - /** Name of the column in CIF or field name (key) in JSON that contains the color. */ - field_name: OptionalField; - /** Customize mapping of annotation values to colors. */ - palette: OptionalField< - CategoricalPalette | DiscretePalette | ContinuousPalette | null - >; - /** Annotation schema defines what fields in the annotation will be taken into account. */ - schema: RequiredField; - /** Header of the CIF block to read annotation from. If `null`, block is selected based on `block_index`. */ - block_header: OptionalField; - /** 0-based index of the CIF block to read annotation from (only applies when `block_header` is `null`). */ - block_index: OptionalField; - /** Name of the CIF category to read annotation from. If `null`, the first category in the block is used. */ - category_name: OptionalField; - /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ - field_remapping: OptionalField<{ - [x: string]: string | null; + volume_representation: UnionParamsSchema<"type", { + isosurface: SimpleParamsSchema<{ + relative_isovalue: OptionalField; + absolute_isovalue: OptionalField; + show_wireframe: OptionalField; + show_faces: OptionalField; + }>; + grid_slice: SimpleParamsSchema<{ + dimension: RequiredField<"x" | "y" | "z">; + absolute_index: OptionalField; + relative_index: OptionalField; + relative_isovalue: OptionalField; + absolute_isovalue: OptionalField; + }>; }>; - }>; - clip: UnionParamsSchema<'type', { - plane: SimpleParamsSchema<{ - normal: RequiredField; - point: RequiredField; - check_transform: OptionalField; - invert: OptionalField; - variant: OptionalField<'object' | 'pixel'>; + color: SimpleParamsSchema<{ + /** Color to apply to the representation. Can be either an X11 color name (e.g. `"red"`) or a hexadecimal code (e.g. `"#FF0011"`). */ + color: OptionalField; + /** Defines to what part of the representation this color should be applied. */ + selector: OptionalField; }>; - sphere: SimpleParamsSchema<{ - center: RequiredField; - radius: OptionalField; - check_transform: OptionalField; - invert: OptionalField; - variant: OptionalField<'object' | 'pixel'>; + color_from_uri: SimpleParamsSchema<{ + /** Name of the column in CIF or field name (key) in JSON that contains the color. */ + field_name: OptionalField; + /** Customize mapping of annotation values to colors. */ + palette: OptionalField; + /** Defines to what part of the representation this coloring should be applied. */ + selector: OptionalField; + /** URL of the annotation resource. */ + uri: RequiredField; + /** Format of the annotation resource. */ + format: RequiredField; + /** Annotation schema defines what fields in the annotation will be taken into account. */ + schema: RequiredField; + /** Header of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, block is selected based on `block_index`. */ + block_header: OptionalField; + /** 0-based index of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"` and `block_header` is `null`). */ + block_index: OptionalField; + /** Name of the CIF category to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, the first category in the block is used. */ + category_name: OptionalField; + /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ + field_remapping: OptionalField<{ + [x: string]: string | null; + }>; }>; - box: SimpleParamsSchema<{ - center: RequiredField; - size: OptionalField; - rotation: OptionalField; - check_transform: OptionalField; - invert: OptionalField; - variant: OptionalField<'object' | 'pixel'>; + color_from_source: SimpleParamsSchema<{ + /** Name of the column in CIF or field name (key) in JSON that contains the color. */ + field_name: OptionalField; + /** Customize mapping of annotation values to colors. */ + palette: OptionalField; + /** Defines to what part of the representation this coloring should be applied. */ + selector: OptionalField; + /** Annotation schema defines what fields in the annotation will be taken into account. */ + schema: RequiredField; + /** Header of the CIF block to read annotation from. If `null`, block is selected based on `block_index`. */ + block_header: OptionalField; + /** 0-based index of the CIF block to read annotation from (only applies when `block_header` is `null`). */ + block_index: OptionalField; + /** Name of the CIF category to read annotation from. If `null`, the first category in the block is used. */ + category_name: OptionalField; + /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ + field_remapping: OptionalField<{ + [x: string]: string | null; + }>; }>; - }>; - opacity: SimpleParamsSchema<{ - /** Opacity of a representation. 0.0: fully transparent, 1.0: fully opaque. */ - opacity: RequiredField; - }>; - label: SimpleParamsSchema<{ - /** Content of the shown label. */ - text: RequiredField; - }>; - label_from_uri: SimpleParamsSchema<{ - /** Name of the column in CIF or field name (key) in JSON that contains the label text. */ - field_name: OptionalField; - /** URL of the annotation resource. */ - uri: RequiredField; - /** Format of the annotation resource. */ - format: RequiredField; - /** Annotation schema defines what fields in the annotation will be taken into account. */ - schema: RequiredField; - /** Header of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, block is selected based on `block_index`. */ - block_header: OptionalField; - /** 0-based index of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"` and `block_header` is `null`). */ - block_index: OptionalField; - /** Name of the CIF category to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, the first category in the block is used. */ - category_name: OptionalField; - /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ - field_remapping: OptionalField<{ - [x: string]: string | null; + clip: UnionParamsSchema<"type", { + plane: SimpleParamsSchema<{ + normal: RequiredField; + point: RequiredField; + check_transform: OptionalField; + invert: OptionalField; + variant: OptionalField<"object" | "pixel">; + }>; + sphere: SimpleParamsSchema<{ + center: RequiredField; + radius: OptionalField; + check_transform: OptionalField; + invert: OptionalField; + variant: OptionalField<"object" | "pixel">; + }>; + box: SimpleParamsSchema<{ + center: RequiredField; + size: OptionalField; + rotation: OptionalField; + check_transform: OptionalField; + invert: OptionalField; + variant: OptionalField<"object" | "pixel">; + }>; }>; - }>; - label_from_source: SimpleParamsSchema<{ - /** Name of the column in CIF or field name (key) in JSON that contains the label text. */ - field_name: OptionalField; - /** Annotation schema defines what fields in the annotation will be taken into account. */ - schema: RequiredField; - /** Header of the CIF block to read annotation from. If `null`, block is selected based on `block_index`. */ - block_header: OptionalField; - /** 0-based index of the CIF block to read annotation from (only applies when `block_header` is `null`). */ - block_index: OptionalField; - /** Name of the CIF category to read annotation from. If `null`, the first category in the block is used. */ - category_name: OptionalField; - /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ - field_remapping: OptionalField<{ - [x: string]: string | null; + opacity: SimpleParamsSchema<{ + /** Opacity of a representation. 0.0: fully transparent, 1.0: fully opaque. */ + opacity: RequiredField; }>; - }>; - tooltip: SimpleParamsSchema<{ - /** Content of the shown tooltip. */ - text: RequiredField; - }>; - tooltip_from_uri: SimpleParamsSchema<{ - /** Name of the column in CIF or field name (key) in JSON that contains the tooltip text. */ - field_name: OptionalField; - /** URL of the annotation resource. */ - uri: RequiredField; - /** Format of the annotation resource. */ - format: RequiredField; - /** Annotation schema defines what fields in the annotation will be taken into account. */ - schema: RequiredField; - /** Header of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, block is selected based on `block_index`. */ - block_header: OptionalField; - /** 0-based index of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"` and `block_header` is `null`). */ - block_index: OptionalField; - /** Name of the CIF category to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, the first category in the block is used. */ - category_name: OptionalField; - /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ - field_remapping: OptionalField<{ - [x: string]: string | null; + label: SimpleParamsSchema<{ + /** Content of the shown label. */ + text: RequiredField; }>; - }>; - tooltip_from_source: SimpleParamsSchema<{ - /** Name of the column in CIF or field name (key) in JSON that contains the tooltip text. */ - field_name: OptionalField; - /** Annotation schema defines what fields in the annotation will be taken into account. */ - schema: RequiredField; - /** Header of the CIF block to read annotation from. If `null`, block is selected based on `block_index`. */ - block_header: OptionalField; - /** 0-based index of the CIF block to read annotation from (only applies when `block_header` is `null`). */ - block_index: OptionalField; - /** Name of the CIF category to read annotation from. If `null`, the first category in the block is used. */ - category_name: OptionalField; - /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ - field_remapping: OptionalField<{ - [x: string]: string | null; + label_from_uri: SimpleParamsSchema<{ + /** Name of the column in CIF or field name (key) in JSON that contains the label text. */ + field_name: OptionalField; + /** Formatting template for the label text. Supports simplified f-string syntax. */ + text_format: OptionalField; + /** Set of annotation fields for grouping annotation rows into label instances (i.e. annotation rows with the same values in all group-by fields will yield one label instance). Annotation row with undefined value in any group-by field is considered a separate label instance. */ + group_by_fields: OptionalField; + /** URL of the annotation resource. */ + uri: RequiredField; + /** Format of the annotation resource. */ + format: RequiredField; + /** Annotation schema defines what fields in the annotation will be taken into account. */ + schema: RequiredField; + /** Header of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, block is selected based on `block_index`. */ + block_header: OptionalField; + /** 0-based index of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"` and `block_header` is `null`). */ + block_index: OptionalField; + /** Name of the CIF category to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, the first category in the block is used. */ + category_name: OptionalField; + /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ + field_remapping: OptionalField<{ + [x: string]: string | null; + }>; }>; - }>; - focus: SimpleParamsSchema<{ - /** Vector describing the direction of the view (camera position -> focused target). */ - direction: OptionalField; - /** Vector which will be aligned with the screen Y axis. */ - up: OptionalField; - /** Radius of the focused sphere (overrides `radius_factor` and `radius_extra`. */ - radius: OptionalField; - /** Radius of the focused sphere relative to the radius of parent component (default: 1). Focused radius = component_radius * radius_factor + radius_extent. */ - radius_factor: OptionalField; - /** Addition to the radius of the focused sphere, if computed from the radius of parent component (default: 0). Focused radius = component_radius * radius_factor + radius_extent. */ - radius_extent: OptionalField; - }>; - camera: SimpleParamsSchema<{ - /** Coordinates of the point in space at which the camera is pointing. */ - target: RequiredField; - /** Coordinates of the camera. */ - position: RequiredField; - /** Vector which will be aligned with the screen Y axis. */ - up: OptionalField; - /** Near clipping plane distance from the position. */ - near: OptionalField; - }>; - canvas: SimpleParamsSchema<{ - /** Color of the canvas background. Can be either an X11 color name (e.g. `"red"`) or a hexadecimal code (e.g. `"#FF0011"`). */ - background_color: OptionalField; - }>; - primitives: SimpleParamsSchema<{ - /** Default color for primitives in this group. */ - color: OptionalField; - /** Default label color for primitives in this group. */ - label_color: OptionalField; - /** Default tooltip for primitives in this group. */ - tooltip: OptionalField; - /** Opacity of primitive geometry in this group. */ - opacity: OptionalField; - /** Opacity of primitive labels in this group. */ - label_opacity: OptionalField; - /** Whether to show a tether line between the label and the target. Defaults to false. */ - label_show_tether: OptionalField; - /** Length of the tether line between the label and the target. Defaults to 1 (Angstrom). */ - label_tether_length: OptionalField; - /** How to attach the label to the target. Defaults to "middle-center". */ - label_attachment: OptionalField; - /** Background color of the label. Defaults to none/transparent. */ - label_background_color: OptionalField; - /** Load snapshot with the provided key when interacting with this primitives group. */ - snapshot_key: OptionalField; - /** Instances of this primitive group defined as 4x4 column major (j * 4 + i indexing) transformation matrices. */ - instances: OptionalField; - }>; - primitives_from_uri: SimpleParamsSchema<{ - /** Location of the resource. */ - uri: RequiredField; - /** Format of the data. */ - format: RequiredField<'mvs-node-json'>; - /** List of nodes the data are referencing. */ - references: OptionalField; - }>; - primitive: UnionParamsSchema<'kind', { - mesh: SimpleParamsSchema<{ - vertices: RequiredField; - indices: RequiredField; - triangle_groups: OptionalField; - group_colors: OptionalField<{ - [x: number]: ColorT; - }>; - group_tooltips: OptionalField<{ - [x: number]: string; - }>; - color: OptionalField; - tooltip: OptionalField; - show_triangles: OptionalField; - show_wireframe: OptionalField; - wireframe_width: OptionalField; - wireframe_color: OptionalField; + label_from_source: SimpleParamsSchema<{ + /** Name of the column in CIF or field name (key) in JSON that contains the label text. */ + field_name: OptionalField; + /** Formatting template for the label text. Supports simplified f-string syntax. */ + text_format: OptionalField; + /** Set of annotation fields for grouping annotation rows into label instances (i.e. annotation rows with the same values in all group-by fields will yield one label instance). Annotation row with undefined value in any group-by field is considered a separate label instance. */ + group_by_fields: OptionalField; + /** Annotation schema defines what fields in the annotation will be taken into account. */ + schema: RequiredField; + /** Header of the CIF block to read annotation from. If `null`, block is selected based on `block_index`. */ + block_header: OptionalField; + /** 0-based index of the CIF block to read annotation from (only applies when `block_header` is `null`). */ + block_index: OptionalField; + /** Name of the CIF category to read annotation from. If `null`, the first category in the block is used. */ + category_name: OptionalField; + /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ + field_remapping: OptionalField<{ + [x: string]: string | null; + }>; }>; - lines: SimpleParamsSchema<{ - vertices: RequiredField; - indices: RequiredField; - line_groups: OptionalField; - group_colors: OptionalField<{ - [x: number]: ColorT; - }>; - group_tooltips: OptionalField<{ - [x: number]: string; - }>; - group_widths: OptionalField<{ - [x: number]: number; - }>; - color: OptionalField; - tooltip: OptionalField; - width: OptionalField; + tooltip: SimpleParamsSchema<{ + /** Content of the shown tooltip. */ + text: RequiredField; }>; - tube: SimpleParamsSchema<{ - tooltip: OptionalField; - start: RequiredField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT - >; - end: RequiredField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT - >; - radius: OptionalField; - dash_length: OptionalField; - color: OptionalField; + tooltip_from_uri: SimpleParamsSchema<{ + /** Name of the column in CIF or field name (key) in JSON that contains the tooltip text. */ + field_name: OptionalField; + /** Formatting template for the tooltip text. Supports simplified f-string syntax. */ + text_format: OptionalField; + /** URL of the annotation resource. */ + uri: RequiredField; + /** Format of the annotation resource. */ + format: RequiredField; + /** Annotation schema defines what fields in the annotation will be taken into account. */ + schema: RequiredField; + /** Header of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, block is selected based on `block_index`. */ + block_header: OptionalField; + /** 0-based index of the CIF block to read annotation from (only applies when `format` is `"cif"` or `"bcif"` and `block_header` is `null`). */ + block_index: OptionalField; + /** Name of the CIF category to read annotation from (only applies when `format` is `"cif"` or `"bcif"`). If `null`, the first category in the block is used. */ + category_name: OptionalField; + /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ + field_remapping: OptionalField<{ + [x: string]: string | null; + }>; }>; - arrow: SimpleParamsSchema<{ - start: RequiredField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT - >; - end: OptionalField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT | null - >; - direction: OptionalField; - length: OptionalField; - show_start_cap: OptionalField; - start_cap_length: OptionalField; - start_cap_radius: OptionalField; - show_end_cap: OptionalField; - end_cap_length: OptionalField; - end_cap_radius: OptionalField; - show_tube: OptionalField; - tube_radius: OptionalField; - tube_dash_length: OptionalField; - color: OptionalField; - tooltip: OptionalField; + tooltip_from_source: SimpleParamsSchema<{ + /** Name of the column in CIF or field name (key) in JSON that contains the tooltip text. */ + field_name: OptionalField; + /** Formatting template for the tooltip text. Supports simplified f-string syntax. */ + text_format: OptionalField; + /** Annotation schema defines what fields in the annotation will be taken into account. */ + schema: RequiredField; + /** Header of the CIF block to read annotation from. If `null`, block is selected based on `block_index`. */ + block_header: OptionalField; + /** 0-based index of the CIF block to read annotation from (only applies when `block_header` is `null`). */ + block_index: OptionalField; + /** Name of the CIF category to read annotation from. If `null`, the first category in the block is used. */ + category_name: OptionalField; + /** Optional remapping of annotation field names `{ standardName1: actualName1, ... }`. Use `{ "label_asym_id": "X" }` to load actual field "X" as "label_asym_id". Use `{ "label_asym_id": null }` to ignore actual field "label_asym_id". Fields not mentioned here are mapped implicitely (i.e. actual name = standard name). */ + field_remapping: OptionalField<{ + [x: string]: string | null; + }>; }>; - distance_measurement: SimpleParamsSchema<{ - label_template: OptionalField; - label_size: OptionalField; - label_auto_size_scale: OptionalField; - label_auto_size_min: OptionalField; - label_color: OptionalField; - start: RequiredField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT - >; - end: RequiredField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT - >; - radius: OptionalField; - dash_length: OptionalField; - color: OptionalField; + focus: SimpleParamsSchema<{ + /** Vector describing the direction of the view (camera position -> focused target). */ + direction: OptionalField; + /** Vector which will be aligned with the screen Y axis. */ + up: OptionalField; + /** Radius of the focused sphere (overrides `radius_factor` and `radius_extra`. */ + radius: OptionalField; + /** Radius of the focused sphere relative to the radius of parent component (default: 1). Focused radius = component_radius * radius_factor + radius_extent. */ + radius_factor: OptionalField; + /** Addition to the radius of the focused sphere, if computed from the radius of parent component (default: 0). Focused radius = component_radius * radius_factor + radius_extent. */ + radius_extent: OptionalField; }>; - angle_measurement: SimpleParamsSchema<{ - a: RequiredField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT - >; - b: RequiredField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT - >; - c: RequiredField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT - >; - label_template: OptionalField; - label_size: OptionalField; - label_auto_size_scale: OptionalField; - label_auto_size_min: OptionalField; - label_color: OptionalField; - show_vector: OptionalField; - vector_color: OptionalField; - vector_radius: OptionalField; - show_section: OptionalField; - section_color: OptionalField; - section_radius: OptionalField; - section_radius_scale: OptionalField; + camera: SimpleParamsSchema<{ + /** Coordinates of the point in space at which the camera is pointing. */ + target: RequiredField; + /** Coordinates of the camera. */ + position: RequiredField; + /** Vector which will be aligned with the screen Y axis. */ + up: OptionalField; + /** Near clipping plane distance from the position. */ + near: OptionalField; }>; - label: SimpleParamsSchema<{ - position: RequiredField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT - >; - text: RequiredField; - label_size: OptionalField; - label_color: OptionalField; - label_offset: OptionalField; + canvas: SimpleParamsSchema<{ + /** Color of the canvas background. Can be either an X11 color name (e.g. `"red"`) or a hexadecimal code (e.g. `"#FF0011"`). */ + background_color: OptionalField; }>; - ellipse: SimpleParamsSchema<{ - color: OptionalField; - as_circle: OptionalField; - center: RequiredField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT - >; - major_axis: OptionalField; - minor_axis: OptionalField; - major_axis_endpoint: OptionalField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT | null - >; - minor_axis_endpoint: OptionalField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT | null - >; - radius_major: OptionalField; - radius_minor: OptionalField; - theta_start: OptionalField; - theta_end: OptionalField; - tooltip: OptionalField; + primitives: SimpleParamsSchema<{ + /** Default color for primitives in this group. */ + color: OptionalField; + /** Default label color for primitives in this group. */ + label_color: OptionalField; + /** Default tooltip for primitives in this group. */ + tooltip: OptionalField; + /** Opacity of primitive geometry in this group. */ + opacity: OptionalField; + /** Opacity of primitive labels in this group. */ + label_opacity: OptionalField; + /** Whether to show a tether line between the label and the target. Defaults to false. */ + label_show_tether: OptionalField; + /** Length of the tether line between the label and the target. Defaults to 1 (Angstrom). */ + label_tether_length: OptionalField; + /** How to attach the label to the target. Defaults to "middle-center". */ + label_attachment: OptionalField; + /** Background color of the label. Defaults to none/transparent. */ + label_background_color: OptionalField; + /** Load snapshot with the provided key when interacting with this primitives group. */ + snapshot_key: OptionalField; + /** Instances of this primitive group defined as 4x4 column major (j * 4 + i indexing) transformation matrices. */ + instances: OptionalField; }>; - ellipsoid: SimpleParamsSchema<{ - color: OptionalField; - center: RequiredField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT - >; - major_axis: OptionalField; - minor_axis: OptionalField; - major_axis_endpoint: OptionalField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT | null - >; - minor_axis_endpoint: OptionalField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT | null - >; - radius: OptionalField; - radius_extent: OptionalField; - tooltip: OptionalField; + primitives_from_uri: SimpleParamsSchema<{ + /** Location of the resource. */ + uri: RequiredField; + /** Format of the data. */ + format: RequiredField<"mvs-node-json">; + /** List of nodes the data are referencing. */ + references: OptionalField; }>; - box: SimpleParamsSchema<{ - center: RequiredField< - ComponentExpressionT | Vector3 | PrimitiveComponentExpressionT - >; - extent: OptionalField; - show_faces: OptionalField; - face_color: OptionalField; - show_edges: OptionalField; - edge_radius: OptionalField; - edge_color: OptionalField; - tooltip: OptionalField; + primitive: UnionParamsSchema<"kind", { + mesh: SimpleParamsSchema<{ + vertices: RequiredField; + indices: RequiredField; + triangle_groups: OptionalField; + group_colors: OptionalField<{ + [x: number]: ColorT; + }>; + group_tooltips: OptionalField<{ + [x: number]: string; + }>; + color: OptionalField; + tooltip: OptionalField; + show_triangles: OptionalField; + show_wireframe: OptionalField; + wireframe_width: OptionalField; + wireframe_color: OptionalField; + }>; + lines: SimpleParamsSchema<{ + vertices: RequiredField; + indices: RequiredField; + line_groups: OptionalField; + group_colors: OptionalField<{ + [x: number]: ColorT; + }>; + group_tooltips: OptionalField<{ + [x: number]: string; + }>; + group_widths: OptionalField<{ + [x: number]: number; + }>; + color: OptionalField; + tooltip: OptionalField; + width: OptionalField; + }>; + tube: SimpleParamsSchema<{ + tooltip: OptionalField; + start: RequiredField; + end: RequiredField; + radius: OptionalField; + dash_length: OptionalField; + color: OptionalField; + }>; + arrow: SimpleParamsSchema<{ + start: RequiredField; + end: OptionalField; + direction: OptionalField; + length: OptionalField; + show_start_cap: OptionalField; + start_cap_length: OptionalField; + start_cap_radius: OptionalField; + show_end_cap: OptionalField; + end_cap_length: OptionalField; + end_cap_radius: OptionalField; + show_tube: OptionalField; + tube_radius: OptionalField; + tube_dash_length: OptionalField; + color: OptionalField; + tooltip: OptionalField; + }>; + distance_measurement: SimpleParamsSchema<{ + label_template: OptionalField; + label_size: OptionalField; + label_auto_size_scale: OptionalField; + label_auto_size_min: OptionalField; + label_color: OptionalField; + start: RequiredField; + end: RequiredField; + radius: OptionalField; + dash_length: OptionalField; + color: OptionalField; + }>; + angle_measurement: SimpleParamsSchema<{ + a: RequiredField; + b: RequiredField; + c: RequiredField; + label_template: OptionalField; + label_size: OptionalField; + label_auto_size_scale: OptionalField; + label_auto_size_min: OptionalField; + label_color: OptionalField; + show_vector: OptionalField; + vector_color: OptionalField; + vector_radius: OptionalField; + show_section: OptionalField; + section_color: OptionalField; + section_radius: OptionalField; + section_radius_scale: OptionalField; + }>; + label: SimpleParamsSchema<{ + position: RequiredField; + text: RequiredField; + label_size: OptionalField; + label_color: OptionalField; + label_offset: OptionalField; + }>; + ellipse: SimpleParamsSchema<{ + color: OptionalField; + as_circle: OptionalField; + center: RequiredField; + major_axis: OptionalField; + minor_axis: OptionalField; + major_axis_endpoint: OptionalField; + minor_axis_endpoint: OptionalField; + radius_major: OptionalField; + radius_minor: OptionalField; + theta_start: OptionalField; + theta_end: OptionalField; + tooltip: OptionalField; + }>; + ellipsoid: SimpleParamsSchema<{ + color: OptionalField; + center: RequiredField; + major_axis: OptionalField; + minor_axis: OptionalField; + major_axis_endpoint: OptionalField; + minor_axis_endpoint: OptionalField; + radius: OptionalField; + radius_extent: OptionalField; + tooltip: OptionalField; + }>; + box: SimpleParamsSchema<{ + center: RequiredField; + extent: OptionalField; + show_faces: OptionalField; + face_color: OptionalField; + show_edges: OptionalField; + edge_radius: OptionalField; + edge_color: OptionalField; + tooltip: OptionalField; + }>; }>; - }>; -}, 'root'>; +}, "root">; /** Node kind in a `MVSTree` */ type MVSKind = keyof typeof MVSTreeSchema.nodes; /** Params for a specific node kind in a `MVSTree` */ @@ -2268,433 +1757,270 @@ type MVSNodeParams = ParamsOfKind; /** MolViewSpec tree */ type MVSTree = TreeFor; /** Any subtree in a `MVSTree` (e.g. its root doesn't need to be 'root') */ -type MVSSubtree = SubtreeOfKind< - MVSTree, - TKind ->; +type MVSSubtree = SubtreeOfKind; /** Base class for MVS builder pointing to anything */ declare class _Base { - protected readonly _root: Root; - protected readonly _node: MVSSubtree; - constructor(_root: Root, _node: MVSSubtree); - /** Create a new node, append as child to current _node, and return the new node */ - protected addChild( - kind: TChildKind, - params_: MVSNodeParams & CustomAndRef, - ): MVSSubtree; + protected readonly _root: Root; + protected readonly _node: MVSSubtree; + constructor(_root: Root, _node: MVSSubtree); + /** Create a new node, append as child to current _node, and return the new node */ + protected addChild(kind: TChildKind, params_: MVSNodeParams & CustomAndRef): MVSSubtree; } /** MVS builder pointing to the 'root' node */ -declare class Root extends _Base<'root'> - implements FocusMixin, PrimitivesMixin { - protected _animation: Animation | undefined; - constructor(params_: CustomAndRef); - /** Return the current state of the builder as object in MVS format. */ - getState( - metadata?: Pick< - GlobalMetadata, - 'title' | 'description' | 'description_format' - >, - ): MVSData_State; - /** Return the current state of the builder as a snapshot object to be used in multi-state . */ - getSnapshot(metadata: SnapshotMetadata): Snapshot; - /** Add a 'camera' node and return builder pointing to the root. 'camera' node instructs to set the camera position and orientation. */ - camera(params: MVSNodeParams<'camera'> & CustomAndRef): Root; - /** Add a 'canvas' node and return builder pointing to the root. 'canvas' node sets canvas properties. */ - canvas(params: MVSNodeParams<'canvas'> & CustomAndRef): Root; - /** Add a 'download' node and return builder pointing to it. 'download' node instructs to retrieve a data resource. */ - download(params: MVSNodeParams<'download'> & CustomAndRef): Download; - focus: ( - params?: - | ({} & { +declare class Root extends _Base<'root'> implements FocusMixin, PrimitivesMixin { + protected _animation: Animation | undefined; + constructor(params_: CustomAndRef); + /** Return the current state of the builder as object in MVS format. */ + getState(metadata?: Pick): MVSData_State; + /** Return the current state of the builder as a snapshot object to be used in multi-state . */ + getSnapshot(metadata: SnapshotMetadata): Snapshot; + /** Add a 'camera' node and return builder pointing to the root. 'camera' node instructs to set the camera position and orientation. */ + camera(params: MVSNodeParams<'camera'> & CustomAndRef): Root; + /** Add a 'canvas' node and return builder pointing to the root. 'canvas' node sets canvas properties. */ + canvas(params: MVSNodeParams<'canvas'> & CustomAndRef): Root; + /** Add a 'download' node and return builder pointing to it. 'download' node instructs to retrieve a data resource. */ + download(params: MVSNodeParams<'download'> & CustomAndRef): Download; + focus: (params?: ({} & { direction?: Vector3 | undefined; up?: Vector3 | undefined; radius?: number | null | undefined; radius_factor?: number | undefined; radius_extent?: number | undefined; - } & CustomAndRef) - | undefined, - ) => this; - primitives: ( - params?: MVSNodeParams<'primitives'> & CustomAndRef, - ) => Primitives; - primitivesFromUri: ( - params: MVSNodeParams<'primitives_from_uri'> & CustomAndRef, - ) => PrimitivesFromUri; - animation( - params?: MVSAnimationNodeParams<'animation'> & CustomAndRef, - ): Animation; - /** Modifies custom state of the root */ - extendRootCustomState(custom: Record): this; + } & CustomAndRef) | undefined) => this; + primitives: (params?: MVSNodeParams<"primitives"> & CustomAndRef) => Primitives; + primitivesFromUri: (params: MVSNodeParams<"primitives_from_uri"> & CustomAndRef) => PrimitivesFromUri; + animation(params?: MVSAnimationNodeParams<'animation'> & CustomAndRef): Animation; + /** Modifies custom state of the root */ + extendRootCustomState(custom: Record): this; } declare class Animation { - private _node; - constructor(parameters: MVSAnimationNodeParams<'animation'> & CustomAndRef); - get node(): MVSAnimationSubtree<'animation'>; - interpolate( - params: MVSAnimationNodeParams<'interpolate'> & CustomAndRef, - ): Animation; + private _node; + constructor(parameters: MVSAnimationNodeParams<'animation'> & CustomAndRef); + get node(): MVSAnimationSubtree<'animation'>; + interpolate(params: MVSAnimationNodeParams<'interpolate'> & CustomAndRef): Animation; } /** MVS builder pointing to a 'download' node */ declare class Download extends _Base<'download'> { - /** Add a 'parse' node and return builder pointing to it. 'parse' node instructs to parse a data resource. */ - parse(params: MVSNodeParams<'parse'> & CustomAndRef): Parse; + /** Add a 'parse' node and return builder pointing to it. 'parse' node instructs to parse a data resource. */ + parse(params: MVSNodeParams<'parse'> & CustomAndRef): Parse; } /** Subsets of 'structure' node params which will be passed to individual builder functions. */ declare const StructureParamsSubsets: { - model: ('block_header' | 'block_index' | 'model_index' | 'coordinates_ref')[]; - assembly: ( - | 'assembly_id' - | 'block_header' - | 'block_index' - | 'model_index' - | 'coordinates_ref' - )[]; - symmetry: ( - | 'block_header' - | 'block_index' - | 'model_index' - | 'ijk_min' - | 'ijk_max' - | 'coordinates_ref' - )[]; - symmetry_mates: ( - | 'radius' - | 'block_header' - | 'block_index' - | 'model_index' - | 'coordinates_ref' - )[]; + model: ("block_header" | "block_index" | "model_index" | "coordinates_ref")[]; + assembly: ("assembly_id" | "block_header" | "block_index" | "model_index" | "coordinates_ref")[]; + symmetry: ("block_header" | "block_index" | "model_index" | "ijk_min" | "ijk_max" | "coordinates_ref")[]; + symmetry_mates: ("radius" | "block_header" | "block_index" | "model_index" | "coordinates_ref")[]; }; /** MVS builder pointing to a 'parse' node */ declare class Parse extends _Base<'parse'> { - /** Add a 'structure' node representing a "model structure", i.e. includes all coordinates from the original model without applying any transformations. - * Return builder pointing to the new node. */ - modelStructure( - params?: - & Pick< - MVSNodeParams<'structure'>, - typeof StructureParamsSubsets['model'][number] - > - & CustomAndRef, - ): Structure; - /** Add a 'structure' node representing an "assembly structure", i.e. may apply filters and symmetry operators to the original model coordinates. - * Return builder pointing to the new node. */ - assemblyStructure( - params?: - & Pick< - MVSNodeParams<'structure'>, - typeof StructureParamsSubsets['assembly'][number] - > - & CustomAndRef, - ): Structure; - /** Add a 'structure' node representing a "symmetry structure", i.e. applies symmetry operators to build crystal unit cells within given Miller indices. - * Return builder pointing to the new node. */ - symmetryStructure( - params?: - & Pick< - MVSNodeParams<'structure'>, - typeof StructureParamsSubsets['symmetry'][number] - > - & CustomAndRef, - ): Structure; - /** Add a 'structure' node representing a "symmetry mates structure", i.e. applies symmetry operators to build asymmetric units within a radius from the original model. - * Return builder pointing to the new node. */ - symmetryMatesStructure( - params?: - & Pick< - MVSNodeParams<'structure'>, - typeof StructureParamsSubsets['symmetry_mates'][number] - > - & CustomAndRef, - ): Structure; - /** Add a 'volume' node representing raw volume data */ - volume(params?: MVSNodeParams<'volume'> & CustomAndRef): Volume; - /** Add a 'coordinates' node indicating the parsed data type */ - coordinates(params?: MVSNodeParams<'coordinates'> & CustomAndRef): Parse; + /** Add a 'structure' node representing a "model structure", i.e. includes all coordinates from the original model without applying any transformations. + * Return builder pointing to the new node. */ + modelStructure(params?: Pick, typeof StructureParamsSubsets['model'][number]> & CustomAndRef): Structure; + /** Add a 'structure' node representing an "assembly structure", i.e. may apply filters and symmetry operators to the original model coordinates. + * Return builder pointing to the new node. */ + assemblyStructure(params?: Pick, typeof StructureParamsSubsets['assembly'][number]> & CustomAndRef): Structure; + /** Add a 'structure' node representing a "symmetry structure", i.e. applies symmetry operators to build crystal unit cells within given Miller indices. + * Return builder pointing to the new node. */ + symmetryStructure(params?: Pick, typeof StructureParamsSubsets['symmetry'][number]> & CustomAndRef): Structure; + /** Add a 'structure' node representing a "symmetry mates structure", i.e. applies symmetry operators to build asymmetric units within a radius from the original model. + * Return builder pointing to the new node. */ + symmetryMatesStructure(params?: Pick, typeof StructureParamsSubsets['symmetry_mates'][number]> & CustomAndRef): Structure; + /** Add a 'volume' node representing raw volume data */ + volume(params?: MVSNodeParams<'volume'> & CustomAndRef): Volume; + /** Add a 'coordinates' node indicating the parsed data type */ + coordinates(params?: MVSNodeParams<'coordinates'> & CustomAndRef): Parse; } /** MVS builder pointing to a 'structure' node */ -declare class Structure extends _Base<'structure'> - implements PrimitivesMixin, TransformMixin { - /** Add a 'component' node and return builder pointing to it. 'component' node instructs to create a component (i.e. a subset of the parent structure). */ - component( - params?: Partial> & CustomAndRef, - ): Component; - /** Add a 'component_from_uri' node and return builder pointing to it. 'component_from_uri' node instructs to create a component defined by an external annotation resource. */ - componentFromUri( - params: MVSNodeParams<'component_from_uri'> & CustomAndRef, - ): Component; - /** Add a 'component_from_source' node and return builder pointing to it. 'component_from_source' node instructs to create a component defined by an annotation resource included in the same file this structure was loaded from. Only applicable if the structure was loaded from an mmCIF or BinaryCIF file. */ - componentFromSource( - params: MVSNodeParams<'component_from_source'> & CustomAndRef, - ): Component; - /** Add a 'label_from_uri' node and return builder pointing back to the structure node. 'label_from_uri' node instructs to add labels (textual visual representations) to parts of a structure. The labels are defined by an external annotation resource. */ - labelFromUri( - params: MVSNodeParams<'label_from_uri'> & CustomAndRef, - ): Structure; - /** Add a 'label_from_source' node and return builder pointing back to the structure node. 'label_from_source' node instructs to add labels (textual visual representations) to parts of a structure. The labels are defined by an annotation resource included in the same file this structure was loaded from. Only applicable if the structure was loaded from an mmCIF or BinaryCIF file. */ - labelFromSource( - params: MVSNodeParams<'label_from_source'> & CustomAndRef, - ): Structure; - /** Add a 'tooltip_from_uri' node and return builder pointing back to the structure node. 'tooltip_from_uri' node instructs to add tooltips to parts of a structure. The tooltips are defined by an external annotation resource. */ - tooltipFromUri( - params: MVSNodeParams<'tooltip_from_uri'> & CustomAndRef, - ): Structure; - /** Add a 'tooltip_from_source' node and return builder pointing back to the structure node. 'tooltip_from_source' node instructs to add tooltips to parts of a structure. The tooltips are defined by an annotation resource included in the same file this structure was loaded from. Only applicable if the structure was loaded from an mmCIF or BinaryCIF file. */ - tooltipFromSource( - params: MVSNodeParams<'tooltip_from_source' & CustomAndRef>, - ): Structure; - transform: ( - params?: - | ({} & { +declare class Structure extends _Base<'structure'> implements PrimitivesMixin, TransformMixin { + /** Add a 'component' node and return builder pointing to it. 'component' node instructs to create a component (i.e. a subset of the parent structure). */ + component(params?: Partial> & CustomAndRef): Component; + /** Add a 'component_from_uri' node and return builder pointing to it. 'component_from_uri' node instructs to create a component defined by an external annotation resource. */ + componentFromUri(params: MVSNodeParams<'component_from_uri'> & CustomAndRef): Component; + /** Add a 'component_from_source' node and return builder pointing to it. 'component_from_source' node instructs to create a component defined by an annotation resource included in the same file this structure was loaded from. Only applicable if the structure was loaded from an mmCIF or BinaryCIF file. */ + componentFromSource(params: MVSNodeParams<'component_from_source'> & CustomAndRef): Component; + /** Add a 'label_from_uri' node and return builder pointing back to the structure node. 'label_from_uri' node instructs to add labels (textual visual representations) to parts of a structure. The labels are defined by an external annotation resource. */ + labelFromUri(params: MVSNodeParams<'label_from_uri'> & CustomAndRef): Structure; + /** Add a 'label_from_source' node and return builder pointing back to the structure node. 'label_from_source' node instructs to add labels (textual visual representations) to parts of a structure. The labels are defined by an annotation resource included in the same file this structure was loaded from. Only applicable if the structure was loaded from an mmCIF or BinaryCIF file. */ + labelFromSource(params: MVSNodeParams<'label_from_source'> & CustomAndRef): Structure; + /** Add a 'tooltip_from_uri' node and return builder pointing back to the structure node. 'tooltip_from_uri' node instructs to add tooltips to parts of a structure. The tooltips are defined by an external annotation resource. */ + tooltipFromUri(params: MVSNodeParams<'tooltip_from_uri'> & CustomAndRef): Structure; + /** Add a 'tooltip_from_source' node and return builder pointing back to the structure node. 'tooltip_from_source' node instructs to add tooltips to parts of a structure. The tooltips are defined by an annotation resource included in the same file this structure was loaded from. Only applicable if the structure was loaded from an mmCIF or BinaryCIF file. */ + tooltipFromSource(params: MVSNodeParams<'tooltip_from_source' & CustomAndRef>): Structure; + transform: (params?: ({} & { rotation?: number[] | undefined; translation?: Vector3 | undefined; - rotation_center?: 'centroid' | Vector3 | null | undefined; + rotation_center?: "centroid" | Vector3 | null | undefined; matrix?: number[] | null | undefined; - } & CustomAndRef) - | undefined, - ) => this; - instance: ( - params?: - | ({} & { + } & CustomAndRef) | undefined) => this; + instance: (params?: ({} & { rotation?: number[] | undefined; translation?: Vector3 | undefined; - rotation_center?: 'centroid' | Vector3 | null | undefined; + rotation_center?: "centroid" | Vector3 | null | undefined; matrix?: number[] | null | undefined; - } & CustomAndRef) - | undefined, - ) => this; - primitives: ( - params?: MVSNodeParams<'primitives'> & CustomAndRef, - ) => Primitives; - primitivesFromUri: ( - params: MVSNodeParams<'primitives_from_uri'> & CustomAndRef, - ) => PrimitivesFromUri; + } & CustomAndRef) | undefined) => this; + primitives: (params?: MVSNodeParams<"primitives"> & CustomAndRef) => Primitives; + primitivesFromUri: (params: MVSNodeParams<"primitives_from_uri"> & CustomAndRef) => PrimitivesFromUri; } /** MVS builder pointing to a 'component' or 'component_from_uri' or 'component_from_source' node */ -declare class Component - extends _Base<'component' | 'component_from_uri' | 'component_from_source'> - implements FocusMixin, TransformMixin { - /** Add a 'representation' node and return builder pointing to it. 'representation' node instructs to create a visual representation of a component. */ - representation( - params?: Partial> & CustomAndRef, - ): Representation; - /** Add a 'label' node and return builder pointing back to the component node. 'label' node instructs to add a label (textual visual representation) to a component. */ - label(params: MVSNodeParams<'label'> & CustomAndRef): Component; - /** Add a 'tooltip' node and return builder pointing back to the component node. 'tooltip' node instructs to add a text which is not a part of the visualization but should be presented to the users when they interact with the component (typically, the tooltip will be shown somewhere on the screen when the user hovers over a visual representation of the component). */ - tooltip(params: MVSNodeParams<'tooltip'> & CustomAndRef): Component; - focus: ( - params?: - | ({} & { +declare class Component extends _Base<'component' | 'component_from_uri' | 'component_from_source'> implements FocusMixin, TransformMixin { + /** Add a 'representation' node and return builder pointing to it. 'representation' node instructs to create a visual representation of a component. */ + representation(params?: Partial> & CustomAndRef): Representation; + /** Add a 'label' node and return builder pointing back to the component node. 'label' node instructs to add a label (textual visual representation) to a component. */ + label(params: MVSNodeParams<'label'> & CustomAndRef): Component; + /** Add a 'tooltip' node and return builder pointing back to the component node. 'tooltip' node instructs to add a text which is not a part of the visualization but should be presented to the users when they interact with the component (typically, the tooltip will be shown somewhere on the screen when the user hovers over a visual representation of the component). */ + tooltip(params: MVSNodeParams<'tooltip'> & CustomAndRef): Component; + focus: (params?: ({} & { direction?: Vector3 | undefined; up?: Vector3 | undefined; radius?: number | null | undefined; radius_factor?: number | undefined; radius_extent?: number | undefined; - } & CustomAndRef) - | undefined, - ) => this; - transform: ( - params?: - | ({} & { + } & CustomAndRef) | undefined) => this; + transform: (params?: ({} & { rotation?: number[] | undefined; translation?: Vector3 | undefined; - rotation_center?: 'centroid' | Vector3 | null | undefined; + rotation_center?: "centroid" | Vector3 | null | undefined; matrix?: number[] | null | undefined; - } & CustomAndRef) - | undefined, - ) => this; - instance: ( - params?: - | ({} & { + } & CustomAndRef) | undefined) => this; + instance: (params?: ({} & { rotation?: number[] | undefined; translation?: Vector3 | undefined; - rotation_center?: 'centroid' | Vector3 | null | undefined; + rotation_center?: "centroid" | Vector3 | null | undefined; matrix?: number[] | null | undefined; - } & CustomAndRef) - | undefined, - ) => this; + } & CustomAndRef) | undefined) => this; } /** MVS builder pointing to a 'representation' node */ declare class Representation extends _Base<'representation'> { - /** Add a 'color' node and return builder pointing back to the representation node. 'color' node instructs to apply color to a visual representation. */ - color(params: MVSNodeParams<'color'> & CustomAndRef): Representation; - /** Add a 'color_from_uri' node and return builder pointing back to the representation node. 'color_from_uri' node instructs to apply colors to a visual representation. The colors are defined by an external annotation resource. */ - colorFromUri( - params: MVSNodeParams<'color_from_uri'> & CustomAndRef, - ): Representation; - /** Add a 'color_from_source' node and return builder pointing back to the representation node. 'color_from_source' node instructs to apply colors to a visual representation. The colors are defined by an annotation resource included in the same file this structure was loaded from. Only applicable if the structure was loaded from an mmCIF or BinaryCIF file. */ - colorFromSource( - params: MVSNodeParams<'color_from_source'> & CustomAndRef, - ): Representation; - /** Add an 'opacity' node and return builder pointing back to the representation node. 'opacity' node instructs to customize opacity/transparency of a visual representation. */ - opacity(params: MVSNodeParams<'opacity'> & CustomAndRef): Representation; - /** Add a 'clip' node and return builder pointing back to the representation node. 'clip' node instructs to apply clipping to a visual representation. */ - clip(params: MVSNodeParams<'clip'> & CustomAndRef): Representation; + /** Add a 'color' node and return builder pointing back to the representation node. 'color' node instructs to apply color to a visual representation. */ + color(params: MVSNodeParams<'color'> & CustomAndRef): Representation; + /** Add a 'color_from_uri' node and return builder pointing back to the representation node. 'color_from_uri' node instructs to apply colors to a visual representation. The colors are defined by an external annotation resource. */ + colorFromUri(params: MVSNodeParams<'color_from_uri'> & CustomAndRef): Representation; + /** Add a 'color_from_source' node and return builder pointing back to the representation node. 'color_from_source' node instructs to apply colors to a visual representation. The colors are defined by an annotation resource included in the same file this structure was loaded from. Only applicable if the structure was loaded from an mmCIF or BinaryCIF file. */ + colorFromSource(params: MVSNodeParams<'color_from_source'> & CustomAndRef): Representation; + /** Add an 'opacity' node and return builder pointing back to the representation node. 'opacity' node instructs to customize opacity/transparency of a visual representation. */ + opacity(params: MVSNodeParams<'opacity'> & CustomAndRef): Representation; + /** Add a 'clip' node and return builder pointing back to the representation node. 'clip' node instructs to apply clipping to a visual representation. */ + clip(params: MVSNodeParams<'clip'> & CustomAndRef): Representation; } /** MVS builder pointing to a 'component' or 'component_from_uri' or 'component_from_source' node */ -declare class Volume extends _Base<'volume'> - implements FocusMixin, TransformMixin { - /** Add a 'representation' node and return builder pointing to it. 'representation' node instructs to create a visual representation of a component. */ - representation( - params?: MVSNodeParams<'volume_representation'> & CustomAndRef, - ): VolumeRepresentation; - focus: ( - params?: - | ({} & { +declare class Volume extends _Base<'volume'> implements FocusMixin, TransformMixin { + /** Add a 'representation' node and return builder pointing to it. 'representation' node instructs to create a visual representation of a component. */ + representation(params?: MVSNodeParams<'volume_representation'> & CustomAndRef): VolumeRepresentation; + focus: (params?: ({} & { direction?: Vector3 | undefined; up?: Vector3 | undefined; radius?: number | null | undefined; radius_factor?: number | undefined; radius_extent?: number | undefined; - } & CustomAndRef) - | undefined, - ) => this; - transform: ( - params?: - | ({} & { + } & CustomAndRef) | undefined) => this; + transform: (params?: ({} & { rotation?: number[] | undefined; translation?: Vector3 | undefined; - rotation_center?: 'centroid' | Vector3 | null | undefined; + rotation_center?: "centroid" | Vector3 | null | undefined; matrix?: number[] | null | undefined; - } & CustomAndRef) - | undefined, - ) => this; - instance: ( - params?: - | ({} & { + } & CustomAndRef) | undefined) => this; + instance: (params?: ({} & { rotation?: number[] | undefined; translation?: Vector3 | undefined; - rotation_center?: 'centroid' | Vector3 | null | undefined; + rotation_center?: "centroid" | Vector3 | null | undefined; matrix?: number[] | null | undefined; - } & CustomAndRef) - | undefined, - ) => this; + } & CustomAndRef) | undefined) => this; } /** MVS builder pointing to a 'volume_representation' node */ -declare class VolumeRepresentation extends _Base<'volume_representation'> - implements FocusMixin { - /** Add a 'color' node and return builder pointing back to the representation node. 'color' node instructs to apply color to a visual representation. */ - color(params: MVSNodeParams<'color'> & CustomAndRef): VolumeRepresentation; - /** Add an 'opacity' node and return builder pointing back to the representation node. 'opacity' node instructs to customize opacity/transparency of a visual representation. */ - opacity( - params: MVSNodeParams<'opacity'> & CustomAndRef, - ): VolumeRepresentation; - focus: ( - params?: - | ({} & { +declare class VolumeRepresentation extends _Base<'volume_representation'> implements FocusMixin { + /** Add a 'color' node and return builder pointing back to the representation node. 'color' node instructs to apply color to a visual representation. */ + color(params: MVSNodeParams<'color'> & CustomAndRef): VolumeRepresentation; + /** Add an 'opacity' node and return builder pointing back to the representation node. 'opacity' node instructs to customize opacity/transparency of a visual representation. */ + opacity(params: MVSNodeParams<'opacity'> & CustomAndRef): VolumeRepresentation; + focus: (params?: ({} & { direction?: Vector3 | undefined; up?: Vector3 | undefined; radius?: number | null | undefined; radius_factor?: number | undefined; radius_extent?: number | undefined; - } & CustomAndRef) - | undefined, - ) => this; - /** Add a 'clip' node and return builder pointing back to the representation node. 'clip' node instructs to apply clipping to a visual representation. */ - clip(params: MVSNodeParams<'clip'> & CustomAndRef): VolumeRepresentation; -} -type MVSPrimitiveSubparams['kind']> = - Omit< - Extract, { - kind: TKind; - }>, - 'kind' - >; + } & CustomAndRef) | undefined) => this; + /** Add a 'clip' node and return builder pointing back to the representation node. 'clip' node instructs to apply clipping to a visual representation. */ + clip(params: MVSNodeParams<'clip'> & CustomAndRef): VolumeRepresentation; +} +type MVSPrimitiveSubparams['kind']> = Omit, { + kind: TKind; +}>, 'kind'>; /** MVS builder pointing to a 'primitives' node */ declare class Primitives extends _Base<'primitives'> implements FocusMixin { - /** Construct custom meshes/shapes in a low-level fashion by providing vertices and indices. */ - mesh(params: MVSPrimitiveSubparams<'mesh'> & CustomAndRef): Primitives; - /** Construct custom set of lines in a low-level fashion by providing vertices and indices. */ - lines(params: MVSPrimitiveSubparams<'lines'> & CustomAndRef): Primitives; - /** Defines a tube (3D cylinder), connecting a start and an end point. */ - tube(params: MVSPrimitiveSubparams<'tube'> & CustomAndRef): Primitives; - /** Defines an arrow. */ - arrow(params: MVSPrimitiveSubparams<'arrow'> & CustomAndRef): Primitives; - /** Defines a tube, connecting a start and an end point, with label containing distance between start and end. */ - distance( - params: MVSPrimitiveSubparams<'distance_measurement'> & CustomAndRef, - ): Primitives; - /** Defines an angle between vectors (b - a) and (c - b). */ - angle( - params: MVSPrimitiveSubparams<'angle_measurement'> & CustomAndRef, - ): Primitives; - /** Defines a label. */ - label(params: MVSPrimitiveSubparams<'label'> & CustomAndRef): Primitives; - /** Defines an ellipse. */ - ellipse(params: MVSPrimitiveSubparams<'ellipse'> & CustomAndRef): Primitives; - /** Defines an ellipsoid. */ - ellipsoid( - params: MVSPrimitiveSubparams<'ellipsoid'> & CustomAndRef, - ): Primitives; - /** Defines a sphere (a special case of ellipsoid). */ - sphere( - params: { - center: PrimitivePositionT; - radius?: number | null; - radius_extent?: number | null; - color?: ColorT | null; - tooltip?: string | null; - } & CustomAndRef, - ): Primitives; - /** Defines a box. */ - box(params: MVSPrimitiveSubparams<'box'> & CustomAndRef): Primitives; - focus: ( - params?: - | ({} & { + /** Construct custom meshes/shapes in a low-level fashion by providing vertices and indices. */ + mesh(params: MVSPrimitiveSubparams<'mesh'> & CustomAndRef): Primitives; + /** Construct custom set of lines in a low-level fashion by providing vertices and indices. */ + lines(params: MVSPrimitiveSubparams<'lines'> & CustomAndRef): Primitives; + /** Defines a tube (3D cylinder), connecting a start and an end point. */ + tube(params: MVSPrimitiveSubparams<'tube'> & CustomAndRef): Primitives; + /** Defines an arrow. */ + arrow(params: MVSPrimitiveSubparams<'arrow'> & CustomAndRef): Primitives; + /** Defines a tube, connecting a start and an end point, with label containing distance between start and end. */ + distance(params: MVSPrimitiveSubparams<'distance_measurement'> & CustomAndRef): Primitives; + /** Defines an angle between vectors (b - a) and (c - b). */ + angle(params: MVSPrimitiveSubparams<'angle_measurement'> & CustomAndRef): Primitives; + /** Defines a label. */ + label(params: MVSPrimitiveSubparams<'label'> & CustomAndRef): Primitives; + /** Defines an ellipse. */ + ellipse(params: MVSPrimitiveSubparams<'ellipse'> & CustomAndRef): Primitives; + /** Defines an ellipsoid. */ + ellipsoid(params: MVSPrimitiveSubparams<'ellipsoid'> & CustomAndRef): Primitives; + /** Defines a sphere (a special case of ellipsoid). */ + sphere(params: { + center: PrimitivePositionT; + radius?: number | null; + radius_extent?: number | null; + color?: ColorT | null; + tooltip?: string | null; + } & CustomAndRef): Primitives; + /** Defines a box. */ + box(params: MVSPrimitiveSubparams<'box'> & CustomAndRef): Primitives; + focus: (params?: ({} & { direction?: Vector3 | undefined; up?: Vector3 | undefined; radius?: number | null | undefined; radius_factor?: number | undefined; radius_extent?: number | undefined; - } & CustomAndRef) - | undefined, - ) => this; - /** Add a 'clip' node and return builder pointing back to the representation node. 'clip' node instructs to apply clipping to a visual representation. */ - clip(params: MVSNodeParams<'clip'> & CustomAndRef): Primitives; + } & CustomAndRef) | undefined) => this; + /** Add a 'clip' node and return builder pointing back to the representation node. 'clip' node instructs to apply clipping to a visual representation. */ + clip(params: MVSNodeParams<'clip'> & CustomAndRef): Primitives; } /** MVS builder pointing to a 'primitives_from_uri' node */ -declare class PrimitivesFromUri extends _Base<'primitives_from_uri'> - implements FocusMixin { - focus: ( - params?: - | ({} & { +declare class PrimitivesFromUri extends _Base<'primitives_from_uri'> implements FocusMixin { + focus: (params?: ({} & { direction?: Vector3 | undefined; up?: Vector3 | undefined; radius?: number | null | undefined; radius_factor?: number | undefined; radius_extent?: number | undefined; - } & CustomAndRef) - | undefined, - ) => this; - /** Add a 'clip' node and return builder pointing back to the representation node. 'clip' node instructs to apply clipping to a visual representation. */ - clip(params: MVSNodeParams<'clip'> & CustomAndRef): PrimitivesFromUri; + } & CustomAndRef) | undefined) => this; + /** Add a 'clip' node and return builder pointing back to the representation node. 'clip' node instructs to apply clipping to a visual representation. */ + clip(params: MVSNodeParams<'clip'> & CustomAndRef): PrimitivesFromUri; } interface FocusMixin { - /** Add a 'focus' node and return builder pointing back to the original node. 'focus' node instructs to set the camera focus to a component (zoom in). */ - focus(params: MVSNodeParams<'focus'> & CustomAndRef): any; + /** Add a 'focus' node and return builder pointing back to the original node. 'focus' node instructs to set the camera focus to a component (zoom in). */ + focus(params: MVSNodeParams<'focus'> & CustomAndRef): any; } interface PrimitivesMixin { - /** Allows the definition of a (group of) geometric primitives. You can add any number of primitives and then assign shared options (color, opacity etc.). */ - primitives(params: MVSNodeParams<'primitives'> & CustomAndRef): Primitives; - /** Allows the definition of a (group of) geometric primitives provided dynamically. */ - primitivesFromUri( - params: MVSNodeParams<'primitives_from_uri'> & CustomAndRef, - ): PrimitivesFromUri; + /** Allows the definition of a (group of) geometric primitives. You can add any number of primitives and then assign shared options (color, opacity etc.). */ + primitives(params: MVSNodeParams<'primitives'> & CustomAndRef): Primitives; + /** Allows the definition of a (group of) geometric primitives provided dynamically. */ + primitivesFromUri(params: MVSNodeParams<'primitives_from_uri'> & CustomAndRef): PrimitivesFromUri; } interface TransformMixin { - /** Add a 'transform' node and return builder pointing back to this node. 'transform' node instructs to rotate and/or translate coordinates. */ - transform(params: MVSNodeParams<'transform'> & CustomAndRef): this; - /** Add an 'instance' node and return builder pointing back to this node. 'instance' node instructs to create a new instance of the object. */ - instance(params: MVSNodeParams<'instance'> & CustomAndRef): this; + /** Add a 'transform' node and return builder pointing back to this node. 'transform' node instructs to rotate and/or translate coordinates. */ + transform(params: MVSNodeParams<'transform'> & CustomAndRef): this; + /** Add an 'instance' node and return builder pointing back to this node. 'instance' node instructs to create a new instance of the object. */ + instance(params: MVSNodeParams<'instance'> & CustomAndRef): this; } interface CustomAndRef { - custom?: CustomProps; - ref?: string; + custom?: CustomProps; + ref?: string; } /** - * Copyright (c) 2023-2025 mol* contributors, licensed under MIT, See LICENSE file for more info. + * Copyright (c) 2023-2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Adam Midlik * @author David Sehnal @@ -2702,115 +2028,114 @@ interface CustomAndRef { /** Top-level metadata for a MVS file (single-state or multi-state). */ interface GlobalMetadata { - /** Name of this MVSData */ - title?: string; - /** Detailed description of this view */ - description?: string; - /** Format of `description`. Default is 'markdown'. */ - description_format?: 'markdown' | 'plaintext'; - /** Timestamp when this view was exported. */ - timestamp: string; - /** Version of MolViewSpec used to write this file. */ - version: string; + /** Name of this MVSData */ + title?: string; + /** Detailed description of this view */ + description?: string; + /** Format of `description`. Default is 'markdown'. */ + description_format?: 'markdown' | 'plaintext'; + /** Timestamp when this view was exported. */ + timestamp: string; + /** Version of MolViewSpec used to write this file. */ + version: string; } declare const GlobalMetadata: { - create( - metadata?: Pick< - GlobalMetadata, - 'title' | 'description' | 'description_format' - >, - ): GlobalMetadata; + create(metadata?: Pick): GlobalMetadata; }; /** Metadata for an individual snapshot. */ interface SnapshotMetadata { - /** Name of this snapshot. */ - title?: string; - /** Detailed description of this snapshot. */ - description?: string; - /** Format of `description`. Default is 'markdown'. */ - description_format?: 'markdown' | 'plaintext'; - /** Unique identifier of this state, useful when working with collections of states. */ - key?: string; - /** Timespan for snapshot. */ - linger_duration_ms: number; - /** Timespan for the animation to the next snapshot. Leave empty to skip animations. */ - transition_duration_ms?: number; + /** Name of this snapshot. */ + title?: string; + /** Detailed description of this snapshot. */ + description?: string; + /** Format of `description`. Default is 'markdown'. */ + description_format?: 'markdown' | 'plaintext'; + /** Unique identifier of this state, useful when working with collections of states. */ + key?: string; + /** Timespan for snapshot. */ + linger_duration_ms: number; + /** Timespan for the animation to the next snapshot. Leave empty to skip animations. */ + transition_duration_ms?: number; } interface Snapshot { - /** Root of the node tree */ - root: MVSTree; - /** Associated metadata */ - metadata: SnapshotMetadata; - /** Optional animation */ - animation?: MVSAnimationTree; + /** Root of the node tree */ + root: MVSTree; + /** Associated metadata */ + metadata: SnapshotMetadata; + /** Optional animation */ + animation?: MVSAnimationTree; } /** MVSData with a single state */ interface MVSData_State { - kind?: 'single'; - /** Root of the node tree */ - root: MVSTree; - /** Associated metadata */ - metadata: GlobalMetadata; + kind?: 'single'; + /** Root of the node tree */ + root: MVSTree; + /** Associated metadata */ + metadata: GlobalMetadata; } /** MVSData with multiple states (snapshots) */ interface MVSData_States { - kind: 'multiple'; - /** Ordered collection of individual states */ - snapshots: Snapshot[]; - /** Associated metadata */ - metadata: GlobalMetadata; + kind: 'multiple'; + /** Ordered collection of individual states */ + snapshots: Snapshot[]; + /** Associated metadata */ + metadata: GlobalMetadata; } /** Top level of the MolViewSpec (MVS) data format. */ type MVSData = MVSData_State | MVSData_States; declare const MVSData: { - /** Currently supported major version of MolViewSpec format (e.g. 1 for version '1.0.8') */ - SupportedVersion: number; - /** Parse MVSJ (MolViewSpec-JSON) format to `MVSData`. Does not include any validation. */ - fromMVSJ(mvsjString: string): MVSData; - /** Encode `MVSData` to MVSJ (MolViewSpec-JSON) string. Use `space` parameter to control formatting (as with `JSON.stringify`). */ - toMVSJ(mvsData: MVSData, space?: string | number): string; - /** Validate `MVSData`. Return `true` if OK; `false` if not OK. - * If `options.noExtra` is true, presence of any extra node parameters is treated as an issue. */ - isValid(mvsData: MVSData, options?: { - noExtra?: boolean; - }): boolean; - /** Validate `MVSData`. Return `undefined` if OK; list of issues if not OK. - * If `options.noExtra` is true, presence of any extra node parameters is treated as an issue. */ - validationIssues(mvsData: MVSData, options?: { - noExtra?: boolean; - }): string[] | undefined; - /** Return a human-friendly textual representation of `mvsData`. */ - toPrettyString(mvsData: MVSData): string; - /** Create a new MolViewSpec builder containing only a root node. Example of MVS builder usage: - * - * ``` - * const builder = MVSData.createBuilder(); - * builder.canvas({ background_color: 'white' }); - * const struct = builder.download({ url: 'https://www.ebi.ac.uk/pdbe/entry-files/download/1og2_updated.cif' }).parse({ format: 'mmcif' }).modelStructure(); - * struct.component().representation().color({ color: '#3050F8' }); - * console.log(MVSData.toPrettyString(builder.getState())); - * ``` - */ - createBuilder(): Root; - /** Create a multi-state MVS data from a list of snapshots. */ - createMultistate( - snapshots: Snapshot[], - metadata?: Pick< - GlobalMetadata, - 'title' | 'description' | 'description_format' - >, - ): MVSData_States; - /** Convert single-state MVSData into multi-state MVSData with one state. */ - stateToStates(state: MVSData_State): MVSData_States; + /** Currently supported major version of MolViewSpec format (e.g. 1 for version '1.0.8') */ + SupportedVersion: number; + /** Parse MVSJ (MolViewSpec-JSON) format to `MVSData`. Does not include any validation. */ + fromMVSJ(mvsjString: string): MVSData; + /** Encode `MVSData` to MVSJ (MolViewSpec-JSON) string. Use `space` parameter to control formatting (as with `JSON.stringify`). */ + toMVSJ(mvsData: MVSData, space?: string | number): string; + /** Encode `MVSData` to MVSX (MolViewSpec JSON zipped together with referenced assets). Automatically fetches all referenced assets unless specified otherwise in `options`. */ + toMVSX(mvsData: MVSData, options?: { + /** Explicitely define assets to be included in the MVSX (binary data or string with asset content). + * If not specified, assets will be fetched automatically. */ + assets?: { + [uri: string]: Uint8Array | string; + }; + /** Base URI for resolving relative URIs (only applies if `assets` not specified). */ + baseUri?: string; + /** Do not include external resources (i.e. absolute URIs) in the MVSX (default is to include both relative and absolute URIs) (only applies if `assets` not specified). */ + skipExternal?: boolean; + /** Optional cache for sharing fetched assets across multiple `toMVSX` calls (only applies if `assets` not specified). */ + cache?: { + [absoluteUri: string]: Uint8Array | string; + }; + }): Promise>; + /** Validate `MVSData`. Return `true` if OK; `false` if not OK. + * If `options.noExtra` is true, presence of any extra node parameters is treated as an issue. */ + isValid(mvsData: MVSData, options?: { + noExtra?: boolean; + }): boolean; + /** Validate `MVSData`. Return `undefined` if OK; list of issues if not OK. + * If `options.noExtra` is true, presence of any extra node parameters is treated as an issue. */ + validationIssues(mvsData: MVSData, options?: { + noExtra?: boolean; + }): string[] | undefined; + /** Return a human-friendly textual representation of `mvsData`. */ + toPrettyString(mvsData: MVSData): string; + /** Create a new MolViewSpec builder containing only a root node. Example of MVS builder usage: + * + * ``` + * const builder = MVSData.createBuilder(); + * builder.canvas({ background_color: 'white' }); + * const struct = builder.download({ url: 'https://www.ebi.ac.uk/pdbe/entry-files/download/1og2_updated.cif' }).parse({ format: 'mmcif' }).modelStructure(); + * struct.component().representation().color({ color: '#3050F8' }); + * console.log(MVSData.toPrettyString(builder.getState())); + * ``` + */ + createBuilder(): Root; + /** Create a multi-state MVS data from a list of snapshots. */ + createMultistate(snapshots: Snapshot[], metadata?: Pick): MVSData_States; + /** Convert single-state MVSData into multi-state MVSData with one state. */ + stateToStates(state: MVSData_State): MVSData_States; }; -type TypedIntArray = - | Int8Array - | Int16Array - | Int32Array - | Uint8Array - | Uint16Array - | Uint32Array; +type TypedIntArray = Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array; type TypedFloatArray = Float32Array | Float64Array; type TypedArray = TypedIntArray | TypedFloatArray; type NumberArray = TypedArray | number[]; @@ -2823,109 +2148,102 @@ type NumberArray = TypedArray | number[]; */ interface ReadonlyQuat extends Array { - readonly [d: number]: number; - '@type': 'quat'; - length: 4; + readonly [d: number]: number; + '@type': 'quat'; + length: 4; } interface Quat extends Array { - [d: number]: number; - '@type': 'quat'; - length: 4; + [d: number]: number; + '@type': 'quat'; + length: 4; } declare function Quat(): Quat; declare namespace Quat { - function zero(): Quat; - function identity(): Quat; - function setIdentity(out: Quat): void; - function hasNaN(q: Quat): boolean; - function create(x: number, y: number, z: number, w: number): Quat; - function setAxisAngle(out: Quat, axis: Vec3, rad: number): Quat; - /** - * Gets the rotation axis and angle for a given - * quaternion. If a quaternion is created with - * setAxisAngle, this method will return the same - * values as providied in the original parameter list - * OR functionally equivalent values. - * Example: The quaternion formed by axis [0, 0, 1] and - * angle -90 is the same as the quaternion formed by - * [0, 0, 1] and 270. This method favors the latter. - */ - function getAxisAngle(out_axis: Vec3, q: Quat): number; - function multiply(out: Quat, a: Quat, b: Quat): Quat; - function rotateX(out: Quat, a: Quat, rad: number): Quat; - function rotateY(out: Quat, a: Quat, rad: number): Quat; - function rotateZ(out: Quat, a: Quat, rad: number): Quat; - /** - * Calculates the W component of a quat from the X, Y, and Z components. - * Assumes that quaternion is 1 unit in length. - * Any existing W component will be ignored. - */ - function calculateW(out: Quat, a: Quat): Quat; - /** - * Performs a spherical linear interpolation between two quat - */ - function slerp(out: Quat, a: Quat, b: Quat, t: number): Quat; - function invert(out: Quat, a: Quat): Quat; - /** - * Calculates the conjugate of a quat - * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. - */ - function conjugate(out: Quat, a: Quat): Quat; - function dot(a: Quat, b: Quat): number; - /** - * Creates a quaternion from the given 3x3 rotation matrix. - * - * NOTE: The resultant quaternion is not normalized, so you should be sure - * to renormalize the quaternion yourself where necessary. - */ - function fromMat3(out: Quat, m: Mat3): Quat; - function fromMat4(out: Quat, m: Mat4): Quat; - function fromEuler(out: Quat, euler: Euler, order: Euler.Order): Quat; - /** Quaternion from two normalized unit vectors. */ - function fromUnitVec3(out: Quat, a: Vec3, b: Vec3): Quat; - function fromBasis(out: Quat, x: Vec3, y: Vec3, z: Vec3): Quat; - function clone(a: Quat): Quat; - function fromObj(a: { - x: number; - y: number; - z: number; - w: number; - }): Quat; - function toObj(a: Quat): { - x: number; - y: number; - z: number; - w: number; - }; - function toArray(a: Quat, out: T, offset: number): T; - function fromArray(a: Quat, array: NumberArray, offset: number): Quat; - function copy(out: Quat, a: Quat): Quat; - function set(out: Quat, x: number, y: number, z: number, w: number): Quat; - /** - * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===) - */ - function exactEquals(a: Quat, b: Quat): boolean; - /** - * Returns whether or not the quaternions have approximately the same elements in the same position. - */ - function equals(a: Quat, b: Quat): boolean; - function add(out: Quat, a: Quat, b: Quat): Quat; - function magnitude(a: Quat): number; - function squaredMagnitude(a: Quat): number; - function angle(a: Quat, b: Quat): number; - function normalize(out: Quat, a: Quat): Quat; - function rotationTo(out: Quat, a: Vec3, b: Vec3): Quat; - function sqlerp( - out: Quat, - a: Quat, - b: Quat, - c: Quat, - d: Quat, - t: number, - ): Quat; - function setAxes(out: Quat, view: Vec3, right: Vec3, up: Vec3): Quat; - function toString(a: Quat, precision?: number): string; - const Identity: ReadonlyQuat; + function zero(): Quat; + function identity(): Quat; + function setIdentity(out: Quat): void; + function hasNaN(q: Quat): boolean; + function create(x: number, y: number, z: number, w: number): Quat; + function setAxisAngle(out: Quat, axis: Vec3, rad: number): Quat; + /** + * Gets the rotation axis and angle for a given + * quaternion. If a quaternion is created with + * setAxisAngle, this method will return the same + * values as providied in the original parameter list + * OR functionally equivalent values. + * Example: The quaternion formed by axis [0, 0, 1] and + * angle -90 is the same as the quaternion formed by + * [0, 0, 1] and 270. This method favors the latter. + */ + function getAxisAngle(out_axis: Vec3, q: Quat): number; + function multiply(out: Quat, a: Quat, b: Quat): Quat; + function rotateX(out: Quat, a: Quat, rad: number): Quat; + function rotateY(out: Quat, a: Quat, rad: number): Quat; + function rotateZ(out: Quat, a: Quat, rad: number): Quat; + /** + * Calculates the W component of a quat from the X, Y, and Z components. + * Assumes that quaternion is 1 unit in length. + * Any existing W component will be ignored. + */ + function calculateW(out: Quat, a: Quat): Quat; + /** + * Performs a spherical linear interpolation between two quat + */ + function slerp(out: Quat, a: Quat, b: Quat, t: number): Quat; + function invert(out: Quat, a: Quat): Quat; + /** + * Calculates the conjugate of a quat + * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. + */ + function conjugate(out: Quat, a: Quat): Quat; + function dot(a: Quat, b: Quat): number; + /** + * Creates a quaternion from the given 3x3 rotation matrix. + * + * NOTE: The resultant quaternion is not normalized, so you should be sure + * to renormalize the quaternion yourself where necessary. + */ + function fromMat3(out: Quat, m: Mat3): Quat; + function fromMat4(out: Quat, m: Mat4): Quat; + function fromEuler(out: Quat, euler: Euler, order: Euler.Order): Quat; + /** Quaternion from two normalized unit vectors. */ + function fromUnitVec3(out: Quat, a: Vec3, b: Vec3): Quat; + function fromBasis(out: Quat, x: Vec3, y: Vec3, z: Vec3): Quat; + function clone(a: Quat): Quat; + function fromObj(a: { + x: number; + y: number; + z: number; + w: number; + }): Quat; + function toObj(a: Quat): { + x: number; + y: number; + z: number; + w: number; + }; + function toArray(a: Quat, out: T, offset: number): T; + function fromArray(a: Quat, array: NumberArray, offset: number): Quat; + function copy(out: Quat, a: Quat): Quat; + function set(out: Quat, x: number, y: number, z: number, w: number): Quat; + /** + * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===) + */ + function exactEquals(a: Quat, b: Quat): boolean; + /** + * Returns whether or not the quaternions have approximately the same elements in the same position. + */ + function equals(a: Quat, b: Quat): boolean; + function add(out: Quat, a: Quat, b: Quat): Quat; + function magnitude(a: Quat): number; + function squaredMagnitude(a: Quat): number; + function angle(a: Quat, b: Quat): number; + function normalize(out: Quat, a: Quat): Quat; + function rotationTo(out: Quat, a: Vec3, b: Vec3): Quat; + function sqlerp(out: Quat, a: Quat, b: Quat, c: Quat, d: Quat, t: number): Quat; + function setAxes(out: Quat, view: Vec3, right: Vec3, up: Vec3): Quat; + function toString(a: Quat, precision?: number): string; + const Identity: ReadonlyQuat; } /** @@ -2938,27 +2256,27 @@ declare namespace Quat { */ interface Euler extends Array { - [d: number]: number; - '@type': 'euler'; - length: 3; + [d: number]: number; + '@type': 'euler'; + length: 3; } declare function Euler(): Euler; declare namespace Euler { - type Order = 'XYZ' | 'YXZ' | 'ZXY' | 'ZYX' | 'YZX' | 'XZY'; - function zero(): Euler; - function create(x: number, y: number, z: number): Euler; - function set(out: Euler, x: number, y: number, z: number): Euler; - function clone(a: Euler): Euler; - function copy(out: Euler, a: Euler): Euler; - /** - * Assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - */ - function fromMat4(out: Euler, m: Mat4, order: Order): Euler; - function fromQuat(out: Euler, q: Quat, order: Order): Euler; - function fromVec3(out: Euler, v: Vec3): Euler; - function exactEquals(a: Euler, b: Euler): boolean; - function fromArray(e: Euler, array: ArrayLike, offset: number): Euler; - function toArray(e: Euler, out: T, offset: number): T; + type Order = 'XYZ' | 'YXZ' | 'ZXY' | 'ZYX' | 'YZX' | 'XZY'; + function zero(): Euler; + function create(x: number, y: number, z: number): Euler; + function set(out: Euler, x: number, y: number, z: number): Euler; + function clone(a: Euler): Euler; + function copy(out: Euler, a: Euler): Euler; + /** + * Assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) + */ + function fromMat4(out: Euler, m: Mat4, order: Order): Euler; + function fromQuat(out: Euler, q: Quat, order: Order): Euler; + function fromVec3(out: Euler, v: Vec3): Euler; + function exactEquals(a: Euler, b: Euler): boolean; + function fromArray(e: Euler, array: ArrayLike, offset: number): Euler; + function toArray(e: Euler, out: T, offset: number): T; } /** @@ -2969,346 +2287,280 @@ declare namespace Euler { */ interface ReadonlyMat3 extends Array { - readonly [d: number]: number; - '@type': 'mat3'; - length: 9; + readonly [d: number]: number; + '@type': 'mat3'; + length: 9; } interface Mat3 extends Array { - [d: number]: number; - '@type': 'mat3'; - length: 9; + [d: number]: number; + '@type': 'mat3'; + length: 9; } declare function Mat3(): Mat3; declare namespace Mat3 { - function zero(): Mat3; - function identity(): Mat3; - function setIdentity(mat: Mat3): Mat3; - function toArray(a: Mat3, out: T, offset: number): T; - function fromArray(a: Mat3, array: NumberArray, offset: number): Mat3; - function fromColumns(out: Mat3, left: Vec3, middle: Vec3, right: Vec3): Mat3; - /** - * Copies the upper-left 3x3 values into the given mat3. - */ - function fromMat4(out: Mat3, a: Mat4): Mat3; - function fromEuler(out: Mat3, euler: Euler, order: Euler.Order): Mat3; - function fromRotation(out: Mat3, rad: number, axis: Vec3): Mat3; - function create( - a00: number, - a01: number, - a02: number, - a10: number, - a11: number, - a12: number, - a20: number, - a21: number, - a22: number, - ): Mat3; - function isIdentity(m: Mat3, eps?: number): boolean; - function hasNaN(m: Mat3): boolean; - /** - * Creates a new Mat3 initialized with values from an existing matrix - */ - function clone(a: Mat3): Mat3; - function areEqual(a: Mat3, b: Mat3, eps: number): boolean; - function setValue(a: Mat3, i: number, j: number, value: number): void; - function getValue(a: Mat3, i: number, j: number): number; - /** - * Copy the values from one Mat3 to another - */ - function copy(out: Mat3, a: Mat3): Mat3; - /** - * Transpose the values of a Mat3 - */ - function transpose(out: Mat3, a: Mat3): Mat3; - /** - * Inverts a Mat3 - */ - function invert(out: Mat3, a: Mat3): Mat3; - function symmtricFromUpper(out: Mat3, a: Mat3): Mat3; - function symmtricFromLower(out: Mat3, a: Mat3): Mat3; - function determinant(a: Mat3): number; - function trace(a: Mat3): number; - function sub(out: Mat3, a: Mat3, b: Mat3): Mat3; - function add(out: Mat3, a: Mat3, b: Mat3): Mat3; - function mul(out: Mat3, a: Mat3, b: Mat3): Mat3; - function subScalar(out: Mat3, a: Mat3, s: number): Mat3; - function addScalar(out: Mat3, a: Mat3, s: number): Mat3; - function mulScalar(out: Mat3, a: Mat3, s: number): Mat3; - /** - * Given a real symmetric 3x3 matrix A, compute the eigenvalues - * - * From https://en.wikipedia.org/wiki/Eigenvalue_algorithm#3.C3.973_matrices - */ - function symmetricEigenvalues(out: Vec3, a: Mat3): Vec3; - /** - * Calculates the eigenvector for the given eigenvalue `e` of matrix `a` - */ - function eigenvector(out: Vec3, a: Mat3, e: number): Vec3; - /** - * Get matrix to transform directions, e.g. normals - */ - function directionTransform(out: Mat3, t: Mat4): Mat3; - const Identity: ReadonlyMat3; - /** Return the Frobenius inner product of two matrices (= dot product of the flattened matrices). - * Can be used as a measure of similarity between two rotation matrices. */ - function innerProduct(a: Mat3, b: Mat3): number; - /** - * Computes the adjugate (classical adjoint) of the upper-left 3×3 portion of a 4×4 matrix. */ - function adjointFromMat4(out: Mat3, m: Mat4): Mat3; + function zero(): Mat3; + function identity(): Mat3; + function setIdentity(mat: Mat3): Mat3; + function toArray(a: Mat3, out: T, offset: number): T; + function fromArray(a: Mat3, array: NumberArray, offset: number): Mat3; + function fromColumns(out: Mat3, left: Vec3, middle: Vec3, right: Vec3): Mat3; + /** + * Copies the upper-left 3x3 values into the given mat3. + */ + function fromMat4(out: Mat3, a: Mat4): Mat3; + function fromEuler(out: Mat3, euler: Euler, order: Euler.Order): Mat3; + function fromRotation(out: Mat3, rad: number, axis: Vec3): Mat3; + function create(a00: number, a01: number, a02: number, a10: number, a11: number, a12: number, a20: number, a21: number, a22: number): Mat3; + function isIdentity(m: Mat3, eps?: number): boolean; + function hasNaN(m: Mat3): boolean; + /** + * Creates a new Mat3 initialized with values from an existing matrix + */ + function clone(a: Mat3): Mat3; + function areEqual(a: Mat3, b: Mat3, eps: number): boolean; + function setValue(a: Mat3, i: number, j: number, value: number): void; + function getValue(a: Mat3, i: number, j: number): number; + /** + * Copy the values from one Mat3 to another + */ + function copy(out: Mat3, a: Mat3): Mat3; + /** + * Transpose the values of a Mat3 + */ + function transpose(out: Mat3, a: Mat3): Mat3; + /** + * Inverts a Mat3 + */ + function invert(out: Mat3, a: Mat3): Mat3; + function symmtricFromUpper(out: Mat3, a: Mat3): Mat3; + function symmtricFromLower(out: Mat3, a: Mat3): Mat3; + function determinant(a: Mat3): number; + function trace(a: Mat3): number; + function sub(out: Mat3, a: Mat3, b: Mat3): Mat3; + function add(out: Mat3, a: Mat3, b: Mat3): Mat3; + function mul(out: Mat3, a: Mat3, b: Mat3): Mat3; + function subScalar(out: Mat3, a: Mat3, s: number): Mat3; + function addScalar(out: Mat3, a: Mat3, s: number): Mat3; + function mulScalar(out: Mat3, a: Mat3, s: number): Mat3; + /** + * Given a real symmetric 3x3 matrix A, compute the eigenvalues + * + * From https://en.wikipedia.org/wiki/Eigenvalue_algorithm#3.C3.973_matrices + */ + function symmetricEigenvalues(out: Vec3, a: Mat3): Vec3; + /** + * Calculates the eigenvector for the given eigenvalue `e` of matrix `a` + */ + function eigenvector(out: Vec3, a: Mat3, e: number): Vec3; + /** + * Get matrix to transform directions, e.g. normals + */ + function directionTransform(out: Mat3, t: Mat4): Mat3; + const Identity: ReadonlyMat3; + /** Return the Frobenius inner product of two matrices (= dot product of the flattened matrices). + * Can be used as a measure of similarity between two rotation matrices. */ + function innerProduct(a: Mat3, b: Mat3): number; + /** + * Computes the adjugate (classical adjoint) of the upper-left 3×3 portion of a 4×4 matrix. */ + function adjointFromMat4(out: Mat3, m: Mat4): Mat3; } /** - * Copyright (c) 2017-2025 mol* contributors, licensed under MIT, See LICENSE file for more info. + * Copyright (c) 2017-2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal * @author Alexander Rose */ interface ReadonlyVec3 extends Array { - readonly [d: number]: number; - '@type': 'vec3'; - length: 3; + readonly [d: number]: number; + '@type': 'vec3'; + length: 3; } interface Vec3 extends Array { - [d: number]: number; - '@type': 'vec3'; - length: 3; + [d: number]: number; + '@type': 'vec3'; + length: 3; } declare function Vec3(): Vec3; declare namespace Vec3 { - function zero(): Vec3; - function clone(a: Vec3): Vec3; - function isFinite(a: Vec3): boolean; - function isInteger(a: Vec3): boolean; - function hasNaN(a: Vec3): boolean; - function setNaN(out: Vec3): Vec3; - function fromObj(v: { - x: number; - y: number; - z: number; - }): Vec3; - function toObj(v: Vec3): { - x: number; - y: number; - z: number; - }; - function fromArray(v: Vec3, array: ArrayLike, offset: number): Vec3; - function toArray(v: Vec3, out: T, offset: number): T; - function create(x: number, y: number, z: number): Vec3; - function ofArray(array: ArrayLike): Vec3; - function set(out: Vec3, x: number, y: number, z: number): Vec3; - function copy(out: Vec3, a: Vec3): Vec3; - function add(out: Vec3, a: Vec3, b: Vec3): Vec3; - function sub(out: Vec3, a: Vec3, b: Vec3): Vec3; - function mul(out: Vec3, a: Vec3, b: Vec3): Vec3; - function div(out: Vec3, a: Vec3, b: Vec3): Vec3; - function scale(out: Vec3, a: Vec3, b: number): Vec3; - /** Scales b, then adds a and b together */ - function scaleAndAdd(out: Vec3, a: Vec3, b: Vec3, scale: number): Vec3; - /** Scales b, then subtracts b from a */ - function scaleAndSub(out: Vec3, a: Vec3, b: Vec3, scale: number): Vec3; - function addScalar(out: Vec3, a: Vec3, b: number): Vec3; - function subScalar(out: Vec3, a: Vec3, b: number): Vec3; - /** - * Math.round the components of a Vec3 - */ - function round(out: Vec3, a: Vec3): Vec3; - /** - * Math.ceil the components of a Vec3 - */ - function ceil(out: Vec3, a: Vec3): Vec3; - /** - * Math.floor the components of a Vec3 - */ - function floor(out: Vec3, a: Vec3): Vec3; - /** - * Math.trunc the components of a Vec3 - */ - function trunc(out: Vec3, a: Vec3): Vec3; - /** - * Math.abs the components of a Vec3 - */ - function abs(out: Vec3, a: Vec3): Vec3; - /** - * Returns the minimum of two Vec3's - */ - function min(out: Vec3, a: Vec3, b: Vec3): Vec3; - /** - * Returns the maximum of two Vec3's - */ - function max(out: Vec3, a: Vec3, b: Vec3): Vec3; - /** - * Assumes min < max, componentwise - */ - function clamp(out: Vec3, a: Vec3, min: Vec3, max: Vec3): Vec3; - function distance(a: Vec3, b: Vec3): number; - function squaredDistance(a: Vec3, b: Vec3): number; - function magnitude(a: Vec3): number; - function squaredMagnitude(a: Vec3): number; - function setMagnitude(out: Vec3, a: Vec3, l: number): Vec3; - /** - * Negates the components of a vec3 - */ - function negate(out: Vec3, a: Vec3): Vec3; - /** - * Returns the inverse of the components of a Vec3 - */ - function inverse(out: Vec3, a: Vec3): Vec3; - function normalize(out: Vec3, a: Vec3): Vec3; - function dot(a: Vec3, b: Vec3): number; - function cross(out: Vec3, a: Vec3, b: Vec3): Vec3; - /** - * Performs a linear interpolation between two Vec3's - */ - function lerp(out: Vec3, a: Vec3, b: Vec3, t: number): Vec3; - function slerp(out: Vec3, a: Vec3, b: Vec3, t: number): Vec3; - /** - * Performs a hermite interpolation with two control points - */ - function hermite( - out: Vec3, - a: Vec3, - b: Vec3, - c: Vec3, - d: Vec3, - t: number, - ): Vec3; - /** - * Performs a bezier interpolation with two control points - */ - function bezier( - out: Vec3, - a: Vec3, - b: Vec3, - c: Vec3, - d: Vec3, - t: number, - ): Vec3; - function quadraticBezier( - out: Vec3, - a: Vec3, - b: Vec3, - c: Vec3, - t: number, - ): Vec3; - /** - * Performs a spline interpolation with two control points and a tension parameter - */ - function spline( - out: Vec3, - a: Vec3, - b: Vec3, - c: Vec3, - d: Vec3, - t: number, - tension: number, - ): Vec3; - /** - * Generates a random vector with the given scale - */ - function random(out: Vec3, scale: number): Vec3; - /** - * Transforms the Vec3 with a Mat4. 4th vector component is implicitly '1' - */ - function transformMat4(out: Vec3, a: Vec3, m: Mat4): Vec3; - function transformDirection(out: Vec3, a: Vec3, m: Mat4): Vec3; - /** - * Like `transformMat4` but with offsets into arrays - */ - function transformMat4Offset( - out: NumberArray, - a: NumberArray, - m: NumberArray, - outO: number, - aO: number, - oM: number, - ): NumberArray; - /** - * Transforms the direction vector with a Mat4. 4th vector component is implicitly '0' - * This means the translation components of the matrix are ignored. - * Assumes that m is already the transpose of the inverse matrix suitable for normal transformation. - */ - function transformDirectionOffset( - out: NumberArray, - a: NumberArray, - m: NumberArray, - outO: number, - aO: number, - oM: number, - ): NumberArray; - /** - * Transforms the Vec3 with a Mat3. - */ - function transformMat3(out: Vec3, a: Vec3, m: Mat3): Vec3; - /** Transforms the Vec3 with a quat */ - function transformQuat(out: Vec3, a: Vec3, q: Quat): Vec3; - /** Computes the angle between 2 vectors, reports in radians. */ - function angle(a: Vec3, b: Vec3): number; - /** - * Computes the dihedral angles of 4 points, reports in radians. - */ - function dihedralAngle(a: Vec3, b: Vec3, c: Vec3, d: Vec3): number; - /** - * @param inclination in radians [0, PI] - * @param azimuth in radians [0, 2 * PI] - * @param radius [0, +Inf] - */ - function directionFromSpherical( - out: Vec3, - inclination: number, - azimuth: number, - radius: number, - ): Vec3; - /** - * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) - */ - function exactEquals(a: Vec3, b: Vec3): boolean; - /** - * Returns whether or not the vectors have approximately the same elements in the same position. - */ - function equals(a: Vec3, b: Vec3): boolean; - function makeRotation(mat: Mat4, a: Vec3, b: Vec3): Mat4; - function isZero(v: Vec3): boolean; - /** Project `point` onto `vector` starting from `origin` */ - function projectPointOnVector( - out: Vec3, - point: Vec3, - vector: Vec3, - origin: Vec3, - ): Vec3; - /** Project `point` onto `plane` defined by `normal` starting from `origin` */ - function projectPointOnPlane( - out: Vec3, - point: Vec3, - normal: Vec3, - origin: Vec3, - ): Vec3; - function projectOnVector(out: Vec3, p: Vec3, vector: Vec3): Vec3; - function projectOnPlane(out: Vec3, p: Vec3, normal: Vec3): Vec3; - /** Get a vector that is similar to `b` but orthogonal to `a` */ - function orthogonalize(out: Vec3, a: Vec3, b: Vec3): Vec3; - /** - * Get a vector like `a` that point into the same general direction as `b`, - * i.e. where the dot product is > 0 - */ - function matchDirection(out: Vec3, a: Vec3, b: Vec3): Vec3; - /** - * Get a normalized vector that is orthogonal to `dir` - */ - function orthogonalDirection(out: Vec3, dir: Vec3): Vec3; - /** Calculate normal for the triangle defined by `a`, `b` and `c` */ - function triangleNormal(out: Vec3, a: Vec3, b: Vec3, c: Vec3): Vec3; - function center(out: Vec3, a: Vec3, b: Vec3): Vec3; - function toString(a: Vec3, precision?: number): string; - const origin: ReadonlyVec3; - const unit: ReadonlyVec3; - const negUnit: ReadonlyVec3; - const unitX: ReadonlyVec3; - const unitY: ReadonlyVec3; - const unitZ: ReadonlyVec3; - const negUnitX: ReadonlyVec3; - const negUnitY: ReadonlyVec3; - const negUnitZ: ReadonlyVec3; + function zero(): Vec3; + function clone(a: Vec3): Vec3; + function isFinite(a: Vec3): boolean; + function isInteger(a: Vec3): boolean; + function hasNaN(a: Vec3): boolean; + function setNaN(out: Vec3): Vec3; + function fromObj(v: { + x: number; + y: number; + z: number; + }): Vec3; + function toObj(v: Vec3): { + x: number; + y: number; + z: number; + }; + function fromArray(v: Vec3, array: ArrayLike, offset: number): Vec3; + function toArray(v: Vec3, out: T, offset: number): T; + function create(x: number, y: number, z: number): Vec3; + function ofArray(array: ArrayLike): Vec3; + function set(out: Vec3, x: number, y: number, z: number): Vec3; + function copy(out: Vec3, a: Vec3): Vec3; + function add(out: Vec3, a: Vec3, b: Vec3): Vec3; + function sub(out: Vec3, a: Vec3, b: Vec3): Vec3; + function mul(out: Vec3, a: Vec3, b: Vec3): Vec3; + function div(out: Vec3, a: Vec3, b: Vec3): Vec3; + function scale(out: Vec3, a: Vec3, b: number): Vec3; + /** Scales b, then adds a and b together */ + function scaleAndAdd(out: Vec3, a: Vec3, b: Vec3, scale: number): Vec3; + /** Scales b, then subtracts b from a */ + function scaleAndSub(out: Vec3, a: Vec3, b: Vec3, scale: number): Vec3; + function addScalar(out: Vec3, a: Vec3, b: number): Vec3; + function subScalar(out: Vec3, a: Vec3, b: number): Vec3; + /** + * Math.round the components of a Vec3 + */ + function round(out: Vec3, a: Vec3): Vec3; + /** + * Math.ceil the components of a Vec3 + */ + function ceil(out: Vec3, a: Vec3): Vec3; + /** + * Math.floor the components of a Vec3 + */ + function floor(out: Vec3, a: Vec3): Vec3; + /** + * Math.trunc the components of a Vec3 + */ + function trunc(out: Vec3, a: Vec3): Vec3; + /** + * Math.abs the components of a Vec3 + */ + function abs(out: Vec3, a: Vec3): Vec3; + /** + * Returns the minimum of two Vec3's + */ + function min(out: Vec3, a: Vec3, b: Vec3): Vec3; + /** + * Returns the maximum of two Vec3's + */ + function max(out: Vec3, a: Vec3, b: Vec3): Vec3; + /** + * Assumes min < max, componentwise + */ + function clamp(out: Vec3, a: Vec3, min: Vec3, max: Vec3): Vec3; + function distance(a: Vec3, b: Vec3): number; + function squaredDistance(a: Vec3, b: Vec3): number; + function magnitude(a: Vec3): number; + function squaredMagnitude(a: Vec3): number; + function setMagnitude(out: Vec3, a: Vec3, l: number): Vec3; + /** + * Negates the components of a vec3 + */ + function negate(out: Vec3, a: Vec3): Vec3; + /** + * Returns the inverse of the components of a Vec3 + */ + function inverse(out: Vec3, a: Vec3): Vec3; + function normalize(out: Vec3, a: Vec3): Vec3; + function dot(a: Vec3, b: Vec3): number; + function cross(out: Vec3, a: Vec3, b: Vec3): Vec3; + /** + * Performs a linear interpolation between two Vec3's + */ + function lerp(out: Vec3, a: Vec3, b: Vec3, t: number): Vec3; + function slerp(out: Vec3, a: Vec3, b: Vec3, t: number): Vec3; + /** + * Performs a hermite interpolation with two control points + */ + function hermite(out: Vec3, a: Vec3, b: Vec3, c: Vec3, d: Vec3, t: number): Vec3; + /** + * Performs a bezier interpolation with two control points + */ + function bezier(out: Vec3, a: Vec3, b: Vec3, c: Vec3, d: Vec3, t: number): Vec3; + function quadraticBezier(out: Vec3, a: Vec3, b: Vec3, c: Vec3, t: number): Vec3; + /** + * Performs a spline interpolation with two control points and a tension parameter + */ + function spline(out: Vec3, a: Vec3, b: Vec3, c: Vec3, d: Vec3, t: number, tension: number): Vec3; + /** + * Generates a random vector with the given scale + */ + function random(out: Vec3, scale: number): Vec3; + /** + * Transforms the Vec3 with a Mat4. 4th vector component is implicitly '1' + */ + function transformMat4(out: Vec3, a: Vec3, m: Mat4): Vec3; + function transformDirection(out: Vec3, a: Vec3, m: Mat4): Vec3; + /** + * Like `transformMat4` but with offsets into arrays + */ + function transformMat4Offset(out: NumberArray, a: NumberArray, m: NumberArray, outO: number, aO: number, oM: number): NumberArray; + /** + * Transforms the direction vector with a Mat4. 4th vector component is implicitly '0' + * This means the translation components of the matrix are ignored. + * Assumes that m is already the transpose of the inverse matrix suitable for normal transformation. + */ + function transformDirectionOffset(out: NumberArray, a: NumberArray, m: NumberArray, outO: number, aO: number, oM: number): NumberArray; + /** + * Transforms the Vec3 with a Mat3. + */ + function transformMat3(out: Vec3, a: Vec3, m: Mat3): Vec3; + /** Transforms the Vec3 with a quat */ + function transformQuat(out: Vec3, a: Vec3, q: Quat): Vec3; + /** Computes the angle between 2 vectors, reports in radians. */ + function angle(a: Vec3, b: Vec3): number; + /** + * Computes the dihedral angles of 4 points, reports in radians. + */ + function dihedralAngle(a: Vec3, b: Vec3, c: Vec3, d: Vec3): number; + /** + * @param inclination in radians [0, PI] + * @param azimuth in radians [0, 2 * PI] + * @param radius [0, +Inf] + */ + function directionFromSpherical(out: Vec3, inclination: number, azimuth: number, radius: number): Vec3; + /** + * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) + */ + function exactEquals(a: Vec3, b: Vec3): boolean; + /** + * Returns whether or not the vectors have approximately the same elements in the same position. + */ + function equals(a: Vec3, b: Vec3): boolean; + function makeRotation(mat: Mat4, a: Vec3, b: Vec3): Mat4; + function rotateAroundAxis(out: Vec3, v: Vec3, axis: Vec3, angle: number): Vec3; + function isZero(v: Vec3): boolean; + /** Project `point` onto `vector` starting from `origin` */ + function projectPointOnVector(out: Vec3, point: Vec3, vector: Vec3, origin: Vec3): Vec3; + /** Project `point` onto `plane` defined by `normal` starting from `origin` */ + function projectPointOnPlane(out: Vec3, point: Vec3, normal: Vec3, origin: Vec3): Vec3; + function projectOnVector(out: Vec3, p: Vec3, vector: Vec3): Vec3; + function projectOnPlane(out: Vec3, p: Vec3, normal: Vec3): Vec3; + /** Get a vector that is similar to `b` but orthogonal to `a` */ + function orthogonalize(out: Vec3, a: Vec3, b: Vec3): Vec3; + /** + * Get a vector like `a` that point into the same general direction as `b`, + * i.e. where the dot product is > 0 + */ + function matchDirection(out: Vec3, a: Vec3, b: Vec3): Vec3; + /** + * Get a normalized vector that is orthogonal to `dir` + */ + function orthogonalDirection(out: Vec3, dir: Vec3): Vec3; + /** Calculate normal for the triangle defined by `a`, `b` and `c` */ + function triangleNormal(out: Vec3, a: Vec3, b: Vec3, c: Vec3): Vec3; + function center(out: Vec3, a: Vec3, b: Vec3): Vec3; + function toString(a: Vec3, precision?: number): string; + const origin: ReadonlyVec3; + const unit: ReadonlyVec3; + const negUnit: ReadonlyVec3; + const unitX: ReadonlyVec3; + const unitY: ReadonlyVec3; + const unitZ: ReadonlyVec3; + const negUnitX: ReadonlyVec3; + const negUnitY: ReadonlyVec3; + const negUnitZ: ReadonlyVec3; } /** @@ -3319,194 +2571,161 @@ declare namespace Vec3 { */ interface ReadonlyMat4 extends Array { - readonly [d: number]: number; - '@type': 'mat4'; - length: 16; + readonly [d: number]: number; + '@type': 'mat4'; + length: 16; } interface Mat4 extends Array { - [d: number]: number; - '@type': 'mat4'; - length: 16; + [d: number]: number; + '@type': 'mat4'; + length: 16; } declare function Mat4(): Mat4; /** * Stores a 4x4 matrix in a column major (j * 4 + i indexing) format. */ declare namespace Mat4 { - function zero(): Mat4; - function identity(): Mat4; - function setIdentity(mat: Mat4): Mat4; - function isZero(mat: Mat4): boolean; - function setZero(mat: Mat4): Mat4; - function ofRows(rows: number[][]): Mat4; - function isIdentity(m: Mat4, eps?: number): boolean; - function hasNaN(m: Mat4): boolean; - function areEqual(a: Mat4, b: Mat4, eps: number): boolean; - function setValue(a: Mat4, i: number, j: number, value: number): void; - function getValue(a: Mat4, i: number, j: number): number; - function toArray(a: Mat4, out: T, offset: number): T; - function fromArray(a: Mat4, array: NumberArray, offset: number): Mat4; - function fromBasis(a: Mat4, x: Vec3, y: Vec3, z: Vec3): Mat4; - function copy(out: Mat4, a: Mat4): Mat4; - function clone(a: Mat4): Mat4; - /** - * Returns the translation vector component of a transformation matrix. - */ - function getTranslation(out: Vec3, mat: Mat4): Vec3; - /** - * Returns the scaling factor component of a transformation matrix. - */ - function getScaling(out: Vec3, mat: Mat4): Vec3; - /** - * Returns a quaternion representing the rotational component of a transformation matrix. - */ - function getRotation(out: Quat, mat: Mat4): Quat; - function extractRotation(out: Mat4, mat: Mat4): Mat4; - function transpose(out: Mat4, a: Mat4): Mat4; - function tryInvert(out: Mat4, a: Mat4): boolean; - function invert(out: Mat4, a: Mat4): Mat4; - function mul(out: Mat4, a: Mat4, b: Mat4): Mat4; - /** - * Like `mul` but with offsets into arrays - */ - function mulOffset( - out: NumberArray, - a: NumberArray, - b: NumberArray, - oOut: number, - oA: number, - oB: number, - ): NumberArray; - function mul3(out: Mat4, a: Mat4, b: Mat4, c: Mat4): Mat4; - /** Translate a Mat4 by the given Vec3 */ - function translate(out: Mat4, a: Mat4, v: Vec3): Mat4; - function fromTranslation(out: Mat4, v: Vec3): Mat4; - function setTranslation(out: Mat4, v: Vec3): Mat4; - /** - * Sets the specified quaternion with values corresponding to the given - * axes. Each axis is a vec3 and is expected to be unit length and - * perpendicular to all other specified axes. - */ - function setAxes(out: Mat4, view: Vec3, right: Vec3, up: Vec3): Mat4; - function rotate(out: Mat4, a: Mat4, rad: number, axis: Vec3): Mat4; - function fromRotation(out: Mat4, rad: number, axis: Vec3): Mat4; - function scale(out: Mat4, a: Mat4, v: Vec3): Mat4; - function scaleUniformly(out: Mat4, a: Mat4, scale: number): Mat4; - function fromScaling(out: Mat4, v: Vec3): Mat4; - function fromUniformScaling(out: Mat4, scale: number): Mat4; - /** - * Creates a matrix from a plane defined by a normal vector and a point. - */ - function fromPlane(out: Mat4, normal: Vec3, point: Vec3): Mat4; - /** - * Copies the mat3 into upper-left 3x3 values. - */ - function fromMat3(out: Mat4, a: Mat3): Mat4; - function compose( - out: Mat4, - position: Vec3, - quaternion: Quat, - scale: Vec3, - ): Mat4; - function decompose( - m: Mat4, - position: Vec3, - quaternion: Quat, - scale: Vec3, - ): Mat4; - function getDecomposition(m: Mat4): { - position: Vec3; - quaternion: Quat; - scale: Vec3; - }; - function makeTable(m: Mat4): string; - function determinant(a: Mat4): number; - /** - * Check if the matrix has the form - * [ Rotation Translation ] - * [ 0 1 ] - * - * Allows for improper rotations - */ - function isRotationAndTranslation(a: Mat4, eps?: number): boolean; - /** - * Check if the matrix has only translation and uniform scaling - * [ S 0 0 X ] - * [ 0 S 0 Y ] - * [ 0 0 S Z ] - * [ 0 0 0 1 ] - */ - function isTranslationAndUniformScaling(a: Mat4, eps?: number): boolean; - function fromQuat(out: Mat4, q: Quat): Mat4; - function fromEuler(out: Mat4, euler: Euler, order: Euler.Order): Mat4; - /** - * Generates a perspective projection (frustum) matrix with the given bounds - */ - function perspective( - out: Mat4, - left: number, - right: number, - top: number, - bottom: number, - near: number, - far: number, - ): Mat4; - /** - * Generates a orthogonal projection matrix with the given bounds - */ - function ortho( - out: Mat4, - left: number, - right: number, - top: number, - bottom: number, - near: number, - far: number, - ): Mat4; - /** - * Generates a look-at matrix with the given eye position, focal point, and up axis - */ - function lookAt(out: Mat4, eye: Vec3, center: Vec3, up: Vec3): Mat4; - /** - * Generates a matrix that makes something look at something else. - */ - function targetTo(out: Mat4, eye: Vec3, target: Vec3, up: Vec3): Mat4; - /** - * Perm is 0-indexed permutation - */ - function fromPermutation(out: Mat4, perm: number[]): Mat4; - function getMaxScaleOnAxis(m: Mat4): number; - function extractBasis(m: Mat4): { - x: Vec3; - y: Vec3; - z: Vec3; - }; - /** Rotation matrix for 90deg around x-axis */ - const rotX90: ReadonlyMat4; - /** Rotation matrix for 180deg around x-axis */ - const rotX180: ReadonlyMat4; - /** Rotation matrix for 90deg around y-axis */ - const rotY90: ReadonlyMat4; - /** Rotation matrix for 180deg around y-axis */ - const rotY180: ReadonlyMat4; - /** Rotation matrix for 270deg around y-axis */ - const rotY270: ReadonlyMat4; - /** Rotation matrix for 90deg around z-axis */ - const rotZ90: ReadonlyMat4; - /** Rotation matrix for 180deg around z-axis */ - const rotZ180: ReadonlyMat4; - /** Rotation matrix for 90deg around first x-axis and then y-axis */ - const rotXY90: ReadonlyMat4; - /** Rotation matrix for 90deg around first z-axis and then y-axis */ - const rotZY90: ReadonlyMat4; - /** Rotation matrix for 90deg around first z-axis and then y-axis and then z-axis */ - const rotZYZ90: ReadonlyMat4; - /** Rotation matrix for 90deg around first z-axis and then 180deg around x-axis */ - const rotZ90X180: ReadonlyMat4; - /** Rotation matrix for 90deg around first y-axis and then 180deg around z-axis */ - const rotY90Z180: ReadonlyMat4; - /** Identity matrix */ - const id: ReadonlyMat4; + function zero(): Mat4; + function identity(): Mat4; + function setIdentity(mat: Mat4): Mat4; + function isZero(mat: Mat4): boolean; + function setZero(mat: Mat4): Mat4; + function ofRows(rows: number[][]): Mat4; + function isIdentity(m: Mat4, eps?: number): boolean; + function hasNaN(m: Mat4): boolean; + function areEqual(a: Mat4, b: Mat4, eps: number): boolean; + function setValue(a: Mat4, i: number, j: number, value: number): void; + function getValue(a: Mat4, i: number, j: number): number; + function toArray(a: Mat4, out: T, offset: number): T; + function fromArray(a: Mat4, array: NumberArray, offset: number): Mat4; + function fromBasis(a: Mat4, x: Vec3, y: Vec3, z: Vec3): Mat4; + function copy(out: Mat4, a: Mat4): Mat4; + function clone(a: Mat4): Mat4; + /** + * Returns the translation vector component of a transformation matrix. + */ + function getTranslation(out: Vec3, mat: Mat4): Vec3; + /** + * Returns the scaling factor component of a transformation matrix. + */ + function getScaling(out: Vec3, mat: Mat4): Vec3; + /** + * Returns a quaternion representing the rotational component of a transformation matrix. + */ + function getRotation(out: Quat, mat: Mat4): Quat; + function extractRotation(out: Mat4, mat: Mat4): Mat4; + function transpose(out: Mat4, a: Mat4): Mat4; + function tryInvert(out: Mat4, a: Mat4): boolean; + function invert(out: Mat4, a: Mat4): Mat4; + function mul(out: Mat4, a: Mat4, b: Mat4): Mat4; + /** + * Like `mul` but with offsets into arrays + */ + function mulOffset(out: NumberArray, a: NumberArray, b: NumberArray, oOut: number, oA: number, oB: number): NumberArray; + function mul3(out: Mat4, a: Mat4, b: Mat4, c: Mat4): Mat4; + /** Translate a Mat4 by the given Vec3 */ + function translate(out: Mat4, a: Mat4, v: Vec3): Mat4; + function fromTranslation(out: Mat4, v: Vec3): Mat4; + function setTranslation(out: Mat4, v: Vec3): Mat4; + /** + * Sets the specified quaternion with values corresponding to the given + * axes. Each axis is a vec3 and is expected to be unit length and + * perpendicular to all other specified axes. + */ + function setAxes(out: Mat4, view: Vec3, right: Vec3, up: Vec3): Mat4; + function rotate(out: Mat4, a: Mat4, rad: number, axis: Vec3): Mat4; + function fromRotation(out: Mat4, rad: number, axis: Vec3): Mat4; + function scale(out: Mat4, a: Mat4, v: Vec3): Mat4; + function scaleUniformly(out: Mat4, a: Mat4, scale: number): Mat4; + function fromScaling(out: Mat4, v: Vec3): Mat4; + function fromUniformScaling(out: Mat4, scale: number): Mat4; + /** + * Creates a matrix from a plane defined by a normal vector and a point. + */ + function fromPlane(out: Mat4, normal: Vec3, point: Vec3): Mat4; + /** + * Copies the mat3 into upper-left 3x3 values. + */ + function fromMat3(out: Mat4, a: Mat3): Mat4; + function compose(out: Mat4, position: Vec3, quaternion: Quat, scale: Vec3): Mat4; + function decompose(m: Mat4, position: Vec3, quaternion: Quat, scale: Vec3): Mat4; + function getDecomposition(m: Mat4): { + position: Vec3; + quaternion: Quat; + scale: Vec3; + }; + function makeTable(m: Mat4): string; + function determinant(a: Mat4): number; + /** + * Check if the matrix has the form + * [ Rotation Translation ] + * [ 0 1 ] + * + * Allows for improper rotations + */ + function isRotationAndTranslation(a: Mat4, eps?: number): boolean; + /** + * Check if the matrix has only translation and uniform scaling + * [ S 0 0 X ] + * [ 0 S 0 Y ] + * [ 0 0 S Z ] + * [ 0 0 0 1 ] + */ + function isTranslationAndUniformScaling(a: Mat4, eps?: number): boolean; + function fromQuat(out: Mat4, q: Quat): Mat4; + function fromEuler(out: Mat4, euler: Euler, order: Euler.Order): Mat4; + /** + * Generates a perspective projection (frustum) matrix with the given bounds + */ + function perspective(out: Mat4, left: number, right: number, top: number, bottom: number, near: number, far: number): Mat4; + /** + * Generates a orthogonal projection matrix with the given bounds + */ + function ortho(out: Mat4, left: number, right: number, top: number, bottom: number, near: number, far: number): Mat4; + /** + * Generates a look-at matrix with the given eye position, focal point, and up axis + */ + function lookAt(out: Mat4, eye: Vec3, center: Vec3, up: Vec3): Mat4; + /** + * Generates a matrix that makes something look at something else. + */ + function targetTo(out: Mat4, eye: Vec3, target: Vec3, up: Vec3): Mat4; + /** + * Perm is 0-indexed permutation + */ + function fromPermutation(out: Mat4, perm: number[]): Mat4; + function getMaxScaleOnAxis(m: Mat4): number; + function extractBasis(m: Mat4): { + x: Vec3; + y: Vec3; + z: Vec3; + }; + /** Rotation matrix for 90deg around x-axis */ + const rotX90: ReadonlyMat4; + /** Rotation matrix for 180deg around x-axis */ + const rotX180: ReadonlyMat4; + /** Rotation matrix for 90deg around y-axis */ + const rotY90: ReadonlyMat4; + /** Rotation matrix for 180deg around y-axis */ + const rotY180: ReadonlyMat4; + /** Rotation matrix for 270deg around y-axis */ + const rotY270: ReadonlyMat4; + /** Rotation matrix for 90deg around z-axis */ + const rotZ90: ReadonlyMat4; + /** Rotation matrix for 180deg around z-axis */ + const rotZ180: ReadonlyMat4; + /** Rotation matrix for 90deg around first x-axis and then y-axis */ + const rotXY90: ReadonlyMat4; + /** Rotation matrix for 90deg around first z-axis and then y-axis */ + const rotZY90: ReadonlyMat4; + /** Rotation matrix for 90deg around first z-axis and then y-axis and then z-axis */ + const rotZYZ90: ReadonlyMat4; + /** Rotation matrix for 90deg around first z-axis and then 180deg around x-axis */ + const rotZ90X180: ReadonlyMat4; + /** Rotation matrix for 90deg around first y-axis and then 180deg around z-axis */ + const rotY90Z180: ReadonlyMat4; + /** Identity matrix */ + const id: ReadonlyMat4; } type Builder = ReturnType; diff --git a/@mol-view-stories/webapp/src/app/page.tsx b/@mol-view-stories/webapp/src/app/page.tsx index fedcca3..2f90427 100644 --- a/@mol-view-stories/webapp/src/app/page.tsx +++ b/@mol-view-stories/webapp/src/app/page.tsx @@ -5,7 +5,7 @@ import Link from 'next/link'; import { Header, Main } from '@/components/common'; import { ExampleStoryList } from './examples/list'; import { useAuth } from './providers'; -import { BookDashed, BookOpen, Github, Library, LucideMessageCircleQuestion } from 'lucide-react'; +import { BookDashed, BookOpen, Github, Library, LucideLink, LucideMessageCircleQuestion } from 'lucide-react'; import { Tooltip, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip'; import { ApiStatus } from '@/components/get-api-status'; import { APP_VERSION } from './version'; @@ -122,71 +122,104 @@ export default function Home() { <>

-
+

MolViewStories

-

- Build engaging and interactive molecular visualizations with code by combining Mol*'s powerful 3D - rendering with custom scripts to tell your scientific story +

+ Build engaging and interactive molecular visualizations with code by combining powerful{' '} + + Mol* 3D rendering + {' '} + with custom scripts to tell your scientific story

-
- - - Start Building - +
+
+ + + Start Building + -
- {auth.isAuthenticated ? ( - - - My Stories - - ) : ( - - -
- - My Stories -
-
- -

Log in to access your stories

-
-
- )} +
+ {auth.isAuthenticated ? ( + + + My Stories + + ) : ( + + +
+ + My Stories +
+
+ +

Log in to access your stories

+
+
+ )} +
- - - Docs - +
+ + + Docs + -
- - GitHub + + Publication + +
+ + + GitHub + +
+
+
+ When using MolViewStories, please cite: Terézia Slanináková, Zachary Charlop‐Powers, Viktoriia + Doshchenko, Alexander S Rose, Adam Midlik, Anna Sekuła, Neli Fonseca, Kyle L Morris, Stephen K Burley, + Sameer Velankar, Jennifer Fleming, Brinda Vallat, Ludovic Autin, David Sehnal:{' '} + + MolViewStories: Interactive molecular storytelling + + , Protein Science, 2026;{' '} + + https://doi.org/10.1002/pro.70540 + + . +
+
+

Example Stories

diff --git a/README.md b/README.md index 3546c74..c898609 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ A framework for building beautiful molecular stories. Online at https://molstar.org/mol-view-stories. +**When using MolViewStories, please cite**: + +Terézia Slanináková, Zachary Charlop‐Powers, Viktoriia Doshchenko, Alexander S Rose, Adam Midlik, Anna Sekuła, Neli Fonseca, Kyle L Morris, Stephen K Burley, Sameer Velankar, Jennifer Fleming, Brinda Vallat, Ludovic Autin, David Sehnal: [MolViewStories: Interactive molecular storytelling](https://doi.org/10.1002/pro.70540), *Protein Science*, 2026; https://doi.org/10.1002/pro.70540. + ## Local Development (Quick Start) ### Requirements diff --git a/package.json b/package.json index 95708a9..aa20129 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,13 @@ "scripts": { "prettier": "pnpm run --filter=* prettier", "prettier:check": "pnpm run --filter=* prettier:check", - "build": "pnpm run --filter=* build", + "mvs-types": "pnpm run --filter=* mvs-types", + "build": "pnpm run --filter=* mvs-types && pnpm run --filter=* build", "dev:web": "pnpm run --filter=@mol-view-stories/webapp dev", "tsc:check": "pnpm run --filter=* tsc:check" }, "dependencies": { - "molstar": "^5.5.0" + "molstar": "^5.7.0" }, "devDependencies": { "@eslint/eslintrc": "^3.3.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3405206..5e0efa6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: molstar: - specifier: ^5.5.0 - version: 5.5.0(@types/react@19.1.11)(fp-ts@2.16.11)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + specifier: ^5.7.0 + version: 5.7.0(@types/react@19.1.11)(fp-ts@2.16.11)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) devDependencies: '@eslint/eslintrc': specifier: ^3.3.3 @@ -28,7 +28,14 @@ importers: specifier: ^5.9.3 version: 5.9.3 - '@mol-view-stories/lib': {} + '@mol-view-stories/lib': + devDependencies: + rollup: + specifier: ^4.60.0 + version: 4.60.0 + rollup-plugin-dts: + specifier: ^6.4.1 + version: 6.4.1(rollup@4.60.0)(typescript@5.9.3) '@mol-view-stories/webapp': dependencies: @@ -170,10 +177,18 @@ packages: resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} engines: {node: '>=6.9.0'} + '@babel/code-frame@7.29.0': + resolution: {integrity: sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.27.1': resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.28.5': + resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} + engines: {node: '>=6.9.0'} + '@emnapi/core@1.4.5': resolution: {integrity: sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==} @@ -913,51 +928,111 @@ packages: cpu: [arm] os: [android] + '@rollup/rollup-android-arm-eabi@4.60.0': + resolution: {integrity: sha512-WOhNW9K8bR3kf4zLxbfg6Pxu2ybOUbB2AjMDHSQx86LIF4rH4Ft7vmMwNt0loO0eonglSNy4cpD3MKXXKQu0/A==} + cpu: [arm] + os: [android] + '@rollup/rollup-android-arm64@4.48.0': resolution: {integrity: sha512-diOdQuw43xTa1RddAFbhIA8toirSzFMcnIg8kvlzRbK26xqEnKJ/vqQnghTAajy2Dcy42v+GMPMo6jq67od+Dw==} cpu: [arm64] os: [android] + '@rollup/rollup-android-arm64@4.60.0': + resolution: {integrity: sha512-u6JHLll5QKRvjciE78bQXDmqRqNs5M/3GVqZeMwvmjaNODJih/WIrJlFVEihvV0MiYFmd+ZyPr9wxOVbPAG2Iw==} + cpu: [arm64] + os: [android] + '@rollup/rollup-darwin-arm64@4.48.0': resolution: {integrity: sha512-QhR2KA18fPlJWFefySJPDYZELaVqIUVnYgAOdtJ+B/uH96CFg2l1TQpX19XpUMWUqMyIiyY45wje8K6F4w4/CA==} cpu: [arm64] os: [darwin] + '@rollup/rollup-darwin-arm64@4.60.0': + resolution: {integrity: sha512-qEF7CsKKzSRc20Ciu2Zw1wRrBz4g56F7r/vRwY430UPp/nt1x21Q/fpJ9N5l47WWvJlkNCPJz3QRVw008fi7yA==} + cpu: [arm64] + os: [darwin] + '@rollup/rollup-darwin-x64@4.48.0': resolution: {integrity: sha512-Q9RMXnQVJ5S1SYpNSTwXDpoQLgJ/fbInWOyjbCnnqTElEyeNvLAB3QvG5xmMQMhFN74bB5ZZJYkKaFPcOG8sGg==} cpu: [x64] os: [darwin] + '@rollup/rollup-darwin-x64@4.60.0': + resolution: {integrity: sha512-WADYozJ4QCnXCH4wPB+3FuGmDPoFseVCUrANmA5LWwGmC6FL14BWC7pcq+FstOZv3baGX65tZ378uT6WG8ynTw==} + cpu: [x64] + os: [darwin] + '@rollup/rollup-freebsd-arm64@4.48.0': resolution: {integrity: sha512-3jzOhHWM8O8PSfyft+ghXZfBkZawQA0PUGtadKYxFqpcYlOYjTi06WsnYBsbMHLawr+4uWirLlbhcYLHDXR16w==} cpu: [arm64] os: [freebsd] + '@rollup/rollup-freebsd-arm64@4.60.0': + resolution: {integrity: sha512-6b8wGHJlDrGeSE3aH5mGNHBjA0TTkxdoNHik5EkvPHCt351XnigA4pS7Wsj/Eo9Y8RBU6f35cjN9SYmCFBtzxw==} + cpu: [arm64] + os: [freebsd] + '@rollup/rollup-freebsd-x64@4.48.0': resolution: {integrity: sha512-NcD5uVUmE73C/TPJqf78hInZmiSBsDpz3iD5MF/BuB+qzm4ooF2S1HfeTChj5K4AV3y19FFPgxonsxiEpy8v/A==} cpu: [x64] os: [freebsd] + '@rollup/rollup-freebsd-x64@4.60.0': + resolution: {integrity: sha512-h25Ga0t4jaylMB8M/JKAyrvvfxGRjnPQIR8lnCayyzEjEOx2EJIlIiMbhpWxDRKGKF8jbNH01NnN663dH638mA==} + cpu: [x64] + os: [freebsd] + '@rollup/rollup-linux-arm-gnueabihf@4.48.0': resolution: {integrity: sha512-JWnrj8qZgLWRNHr7NbpdnrQ8kcg09EBBq8jVOjmtlB3c8C6IrynAJSMhMVGME4YfTJzIkJqvSUSVJRqkDnu/aA==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-gnueabihf@4.60.0': + resolution: {integrity: sha512-RzeBwv0B3qtVBWtcuABtSuCzToo2IEAIQrcyB/b2zMvBWVbjo8bZDjACUpnaafaxhTw2W+imQbP2BD1usasK4g==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.48.0': resolution: {integrity: sha512-9xu92F0TxuMH0tD6tG3+GtngwdgSf8Bnz+YcsPG91/r5Vgh5LNofO48jV55priA95p3c92FLmPM7CvsVlnSbGQ==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.60.0': + resolution: {integrity: sha512-Sf7zusNI2CIU1HLzuu9Tc5YGAHEZs5Lu7N1ssJG4Tkw6e0MEsN7NdjUDDfGNHy2IU+ENyWT+L2obgWiguWibWQ==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.48.0': resolution: {integrity: sha512-NLtvJB5YpWn7jlp1rJiY0s+G1Z1IVmkDuiywiqUhh96MIraC0n7XQc2SZ1CZz14shqkM+XN2UrfIo7JB6UufOA==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.60.0': + resolution: {integrity: sha512-DX2x7CMcrJzsE91q7/O02IJQ5/aLkVtYFryqCjduJhUfGKG6yJV8hxaw8pZa93lLEpPTP/ohdN4wFz7yp/ry9A==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-arm64-musl@4.48.0': resolution: {integrity: sha512-QJ4hCOnz2SXgCh+HmpvZkM+0NSGcZACyYS8DGbWn2PbmA0e5xUk4bIP8eqJyNXLtyB4gZ3/XyvKtQ1IFH671vQ==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-musl@4.60.0': + resolution: {integrity: sha512-09EL+yFVbJZlhcQfShpswwRZ0Rg+z/CsSELFCnPt3iK+iqwGsI4zht3secj5vLEs957QvFFXnzAT0FFPIxSrkQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loong64-gnu@4.60.0': + resolution: {integrity: sha512-i9IcCMPr3EXm8EQg5jnja0Zyc1iFxJjZWlb4wr7U2Wx/GrddOuEafxRdMPRYVaXjgbhvqalp6np07hN1w9kAKw==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-loong64-musl@4.60.0': + resolution: {integrity: sha512-DGzdJK9kyJ+B78MCkWeGnpXJ91tK/iKA6HwHxF4TAlPIY7GXEvMe8hBFRgdrR9Ly4qebR/7gfUs9y2IoaVEyog==} + cpu: [loong64] + os: [linux] + '@rollup/rollup-linux-loongarch64-gnu@4.48.0': resolution: {integrity: sha512-Pk0qlGJnhILdIC5zSKQnprFjrGmjfDM7TPZ0FKJxRkoo+kgMRAg4ps1VlTZf8u2vohSicLg7NP+cA5qE96PaFg==} cpu: [loong64] @@ -968,46 +1043,111 @@ packages: cpu: [ppc64] os: [linux] + '@rollup/rollup-linux-ppc64-gnu@4.60.0': + resolution: {integrity: sha512-RwpnLsqC8qbS8z1H1AxBA1H6qknR4YpPR9w2XX0vo2Sz10miu57PkNcnHVaZkbqyw/kUWfKMI73jhmfi9BRMUQ==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-ppc64-musl@4.60.0': + resolution: {integrity: sha512-Z8pPf54Ly3aqtdWC3G4rFigZgNvd+qJlOE52fmko3KST9SoGfAdSRCwyoyG05q1HrrAblLbk1/PSIV+80/pxLg==} + cpu: [ppc64] + os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.48.0': resolution: {integrity: sha512-YBwXsvsFI8CVA4ej+bJF2d9uAeIiSkqKSPQNn0Wyh4eMDY4wxuSp71BauPjQNCKK2tD2/ksJ7uhJ8X/PVY9bHQ==} cpu: [riscv64] os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.60.0': + resolution: {integrity: sha512-3a3qQustp3COCGvnP4SvrMHnPQ9d1vzCakQVRTliaz8cIp/wULGjiGpbcqrkv0WrHTEp8bQD/B3HBjzujVWLOA==} + cpu: [riscv64] + os: [linux] + '@rollup/rollup-linux-riscv64-musl@4.48.0': resolution: {integrity: sha512-FI3Rr2aGAtl1aHzbkBIamsQyuauYtTF9SDUJ8n2wMXuuxwchC3QkumZa1TEXYIv/1AUp1a25Kwy6ONArvnyeVQ==} cpu: [riscv64] os: [linux] + '@rollup/rollup-linux-riscv64-musl@4.60.0': + resolution: {integrity: sha512-pjZDsVH/1VsghMJ2/kAaxt6dL0psT6ZexQVrijczOf+PeP2BUqTHYejk3l6TlPRydggINOeNRhvpLa0AYpCWSQ==} + cpu: [riscv64] + os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.48.0': resolution: {integrity: sha512-Dx7qH0/rvNNFmCcIRe1pyQ9/H0XO4v/f0SDoafwRYwc2J7bJZ5N4CHL/cdjamISZ5Cgnon6iazAVRFlxSoHQnQ==} cpu: [s390x] os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.60.0': + resolution: {integrity: sha512-3ObQs0BhvPgiUVZrN7gqCSvmFuMWvWvsjG5ayJ3Lraqv+2KhOsp+pUbigqbeWqueGIsnn+09HBw27rJ+gYK4VQ==} + cpu: [s390x] + os: [linux] + '@rollup/rollup-linux-x64-gnu@4.48.0': resolution: {integrity: sha512-GUdZKTeKBq9WmEBzvFYuC88yk26vT66lQV8D5+9TgkfbewhLaTHRNATyzpQwwbHIfJvDJ3N9WJ90wK/uR3cy3Q==} cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-gnu@4.60.0': + resolution: {integrity: sha512-EtylprDtQPdS5rXvAayrNDYoJhIz1/vzN2fEubo3yLE7tfAw+948dO0g4M0vkTVFhKojnF+n6C8bDNe+gDRdTg==} + cpu: [x64] + os: [linux] + '@rollup/rollup-linux-x64-musl@4.48.0': resolution: {integrity: sha512-ao58Adz/v14MWpQgYAb4a4h3fdw73DrDGtaiF7Opds5wNyEQwtO6M9dBh89nke0yoZzzaegq6J/EXs7eBebG8A==} cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-musl@4.60.0': + resolution: {integrity: sha512-k09oiRCi/bHU9UVFqD17r3eJR9bn03TyKraCrlz5ULFJGdJGi7VOmm9jl44vOJvRJ6P7WuBi/s2A97LxxHGIdw==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-openbsd-x64@4.60.0': + resolution: {integrity: sha512-1o/0/pIhozoSaDJoDcec+IVLbnRtQmHwPV730+AOD29lHEEo4F5BEUB24H0OBdhbBBDwIOSuf7vgg0Ywxdfiiw==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.60.0': + resolution: {integrity: sha512-pESDkos/PDzYwtyzB5p/UoNU/8fJo68vcXM9ZW2V0kjYayj1KaaUfi1NmTUTUpMn4UhU4gTuK8gIaFO4UGuMbA==} + cpu: [arm64] + os: [openharmony] + '@rollup/rollup-win32-arm64-msvc@4.48.0': resolution: {integrity: sha512-kpFno46bHtjZVdRIOxqaGeiABiToo2J+st7Yce+aiAoo1H0xPi2keyQIP04n2JjDVuxBN6bSz9R6RdTK5hIppw==} cpu: [arm64] os: [win32] + '@rollup/rollup-win32-arm64-msvc@4.60.0': + resolution: {integrity: sha512-hj1wFStD7B1YBeYmvY+lWXZ7ey73YGPcViMShYikqKT1GtstIKQAtfUI6yrzPjAy/O7pO0VLXGmUVWXQMaYgTQ==} + cpu: [arm64] + os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.48.0': resolution: {integrity: sha512-rFYrk4lLk9YUTIeihnQMiwMr6gDhGGSbWThPEDfBoU/HdAtOzPXeexKi7yU8jO+LWRKnmqPN9NviHQf6GDwBcQ==} cpu: [ia32] os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.60.0': + resolution: {integrity: sha512-SyaIPFoxmUPlNDq5EHkTbiKzmSEmq/gOYFI/3HHJ8iS/v1mbugVa7dXUzcJGQfoytp9DJFLhHH4U3/eTy2Bq4w==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.60.0': + resolution: {integrity: sha512-RdcryEfzZr+lAr5kRm2ucN9aVlCCa2QNq4hXelZxb8GG0NJSazq44Z3PCCc8wISRuCVnGs0lQJVX5Vp6fKA+IA==} + cpu: [x64] + os: [win32] + '@rollup/rollup-win32-x64-msvc@4.48.0': resolution: {integrity: sha512-sq0hHLTgdtwOPDB5SJOuaoHyiP1qSwg+71TQWk8iDS04bW1wIE0oQ6otPiRj2ZvLYNASLMaTp8QRGUVZ+5OL5A==} cpu: [x64] os: [win32] + '@rollup/rollup-win32-x64-msvc@4.60.0': + resolution: {integrity: sha512-PrsWNQ8BuE00O3Xsx3ALh2Df8fAj9+cvvX9AIA6o4KpATR98c9mud4XtDWVvsEuyia5U4tVSTKygawyJkjm60w==} + cpu: [x64] + os: [win32] + '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} @@ -1193,6 +1333,9 @@ packages: '@types/node@20.19.27': resolution: {integrity: sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==} + '@types/node@22.19.15': + resolution: {integrity: sha512-F0R/h2+dsy5wJAUe3tAU6oqa2qbWY5TpNfL/RGmo1y38hiyO1w3x2jPtt76wmuaJI4DQnOBu21cNXQ2STIUUWg==} + '@types/qs@6.14.0': resolution: {integrity: sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==} @@ -1598,6 +1741,9 @@ packages: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + cookie-signature@1.2.2: resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} engines: {node: '>=6.6.0'} @@ -1606,8 +1752,8 @@ packages: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} - cors@2.8.5: - resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} + cors@2.8.6: + resolution: {integrity: sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==} engines: {node: '>= 0.10'} cross-spawn@7.0.6: @@ -2082,10 +2228,6 @@ packages: html-url-attributes@3.0.1: resolution: {integrity: sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==} - http-errors@2.0.0: - resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} - engines: {node: '>= 0.8'} - http-errors@2.0.1: resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} engines: {node: '>= 0.8'} @@ -2423,6 +2565,9 @@ packages: magic-string@0.30.18: resolution: {integrity: sha512-yi8swmWbO17qHhwIBNeeZxTceJMeBvWJaId6dyvTSOwTipqeHhMhOrz6513r1sOKnpvQ7zkhlG8tPrpilwTxHQ==} + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + markdown-table@3.0.4: resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==} @@ -2619,9 +2764,9 @@ packages: engines: {node: '>=10'} hasBin: true - molstar@5.5.0: - resolution: {integrity: sha512-JQIk/4O84/u26wu3+foORUMPFeQC+hx2GVA+JvKQF5jAkLQQlgChvaxp6SsPVtLt/HLZLzJ286IAXysU+gs6hQ==} - engines: {node: '>=20.0.0'} + molstar@5.7.0: + resolution: {integrity: sha512-Bo/QDiEkoRdhyhmFXNBPP2kiNTHZNgJO69AzqO+CrpkSj7JUrYNtBlt49vqa2AJfLUrBNgeeHcfjbxGLmfO7sQ==} + engines: {node: '>=22.0.0'} hasBin: true peerDependencies: '@google-cloud/storage': ^7.14.0 @@ -2984,11 +3129,23 @@ packages: rollup: ^3.29.4 || ^4 typescript: ^4.5 || ^5.0 + rollup-plugin-dts@6.4.1: + resolution: {integrity: sha512-l//F3Zf7ID5GoOfLfD8kroBjQKEKpy1qfhtAdnpibFZMffPaylrg1CoDC2vGkPeTeyxUe4bVFCln2EFuL7IGGg==} + engines: {node: '>=20'} + peerDependencies: + rollup: ^3.29.4 || ^4 + typescript: ^4.5 || ^5.0 || ^6.0 + rollup@4.48.0: resolution: {integrity: sha512-BXHRqK1vyt9XVSEHZ9y7xdYtuYbwVod2mLwOMFP7t/Eqoc1pHRlG/WdV2qNeNvZHRQdLedaFycljaYYM96RqJQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rollup@4.60.0: + resolution: {integrity: sha512-yqjxruMGBQJ2gG4HtjZtAfXArHomazDHoFwFFmZZl0r7Pdo7qCIXKqKHZc8yeoMgzJJ+pO6pEEHa+V7uzWlrAQ==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + router@2.2.0: resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} engines: {node: '>= 18'} @@ -3102,10 +3259,6 @@ packages: state-local@1.0.7: resolution: {integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==} - statuses@2.0.1: - resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} - engines: {node: '>= 0.8'} - statuses@2.0.2: resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} engines: {node: '>= 0.8'} @@ -3175,8 +3328,8 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - swagger-ui-dist@5.31.0: - resolution: {integrity: sha512-zSUTIck02fSga6rc0RZP3b7J7wgHXwLea8ZjgLA3Vgnb8QeOl3Wou2/j5QkzSGeoz6HusP/coYuJl33aQxQZpg==} + swagger-ui-dist@5.32.1: + resolution: {integrity: sha512-6HQoo7+j8PA2QqP5kgAb9dl1uxUjvR0SAoL/WUp1sTEvm0F6D5npgU2OGCLwl++bIInqGlEUQ2mpuZRZYtyCzQ==} tailwind-merge@3.3.1: resolution: {integrity: sha512-gBXpgUm/3rp1lMZZrM/w7D8GKqshif0zAymAhbCyIt8KMe+0v9DQ7cdYLR4FHH/cKpdTXb+A/tKKU3eolfsI+g==} @@ -3388,9 +3541,19 @@ snapshots: picocolors: 1.1.1 optional: true + '@babel/code-frame@7.29.0': + dependencies: + '@babel/helper-validator-identifier': 7.28.5 + js-tokens: 4.0.0 + picocolors: 1.1.1 + optional: true + '@babel/helper-validator-identifier@7.27.1': optional: true + '@babel/helper-validator-identifier@7.28.5': + optional: true + '@emnapi/core@1.4.5': dependencies: '@emnapi/wasi-threads': 1.0.4 @@ -4096,63 +4259,138 @@ snapshots: '@rollup/rollup-android-arm-eabi@4.48.0': optional: true + '@rollup/rollup-android-arm-eabi@4.60.0': + optional: true + '@rollup/rollup-android-arm64@4.48.0': optional: true + '@rollup/rollup-android-arm64@4.60.0': + optional: true + '@rollup/rollup-darwin-arm64@4.48.0': optional: true + '@rollup/rollup-darwin-arm64@4.60.0': + optional: true + '@rollup/rollup-darwin-x64@4.48.0': optional: true + '@rollup/rollup-darwin-x64@4.60.0': + optional: true + '@rollup/rollup-freebsd-arm64@4.48.0': optional: true + '@rollup/rollup-freebsd-arm64@4.60.0': + optional: true + '@rollup/rollup-freebsd-x64@4.48.0': optional: true + '@rollup/rollup-freebsd-x64@4.60.0': + optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.48.0': optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.60.0': + optional: true + '@rollup/rollup-linux-arm-musleabihf@4.48.0': optional: true + '@rollup/rollup-linux-arm-musleabihf@4.60.0': + optional: true + '@rollup/rollup-linux-arm64-gnu@4.48.0': optional: true + '@rollup/rollup-linux-arm64-gnu@4.60.0': + optional: true + '@rollup/rollup-linux-arm64-musl@4.48.0': optional: true + '@rollup/rollup-linux-arm64-musl@4.60.0': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.60.0': + optional: true + + '@rollup/rollup-linux-loong64-musl@4.60.0': + optional: true + '@rollup/rollup-linux-loongarch64-gnu@4.48.0': optional: true '@rollup/rollup-linux-ppc64-gnu@4.48.0': optional: true + '@rollup/rollup-linux-ppc64-gnu@4.60.0': + optional: true + + '@rollup/rollup-linux-ppc64-musl@4.60.0': + optional: true + '@rollup/rollup-linux-riscv64-gnu@4.48.0': optional: true + '@rollup/rollup-linux-riscv64-gnu@4.60.0': + optional: true + '@rollup/rollup-linux-riscv64-musl@4.48.0': optional: true + '@rollup/rollup-linux-riscv64-musl@4.60.0': + optional: true + '@rollup/rollup-linux-s390x-gnu@4.48.0': optional: true + '@rollup/rollup-linux-s390x-gnu@4.60.0': + optional: true + '@rollup/rollup-linux-x64-gnu@4.48.0': optional: true + '@rollup/rollup-linux-x64-gnu@4.60.0': + optional: true + '@rollup/rollup-linux-x64-musl@4.48.0': optional: true + '@rollup/rollup-linux-x64-musl@4.60.0': + optional: true + + '@rollup/rollup-openbsd-x64@4.60.0': + optional: true + + '@rollup/rollup-openharmony-arm64@4.60.0': + optional: true + '@rollup/rollup-win32-arm64-msvc@4.48.0': optional: true + '@rollup/rollup-win32-arm64-msvc@4.60.0': + optional: true + '@rollup/rollup-win32-ia32-msvc@4.48.0': optional: true + '@rollup/rollup-win32-ia32-msvc@4.60.0': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.60.0': + optional: true + '@rollup/rollup-win32-x64-msvc@4.48.0': optional: true + '@rollup/rollup-win32-x64-msvc@4.60.0': + optional: true + '@rtsao/scc@1.1.0': {} '@rushstack/eslint-patch@1.12.0': {} @@ -4335,6 +4573,10 @@ snapshots: dependencies: undici-types: 6.21.0 + '@types/node@22.19.15': + dependencies: + undici-types: 6.21.0 + '@types/qs@6.14.0': {} '@types/range-parser@1.2.7': {} @@ -4653,7 +4895,7 @@ snapshots: bytes: 3.1.2 content-type: 1.0.5 debug: 4.4.3 - http-errors: 2.0.0 + http-errors: 2.0.1 iconv-lite: 0.7.1 on-finished: 2.4.1 qs: 6.14.0 @@ -4783,11 +5025,13 @@ snapshots: content-type@1.0.5: {} + convert-source-map@2.0.0: {} + cookie-signature@1.2.2: {} cookie@0.7.2: {} - cors@2.8.5: + cors@2.8.6: dependencies: object-assign: 4.1.1 vary: 1.1.2 @@ -5212,14 +5456,14 @@ snapshots: content-type: 1.0.5 cookie: 0.7.2 cookie-signature: 1.2.2 - debug: 4.4.1 + debug: 4.4.3 depd: 2.0.0 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 finalhandler: 2.1.0 fresh: 2.0.0 - http-errors: 2.0.0 + http-errors: 2.0.1 merge-descriptors: 2.0.0 mime-types: 3.0.1 on-finished: 2.4.1 @@ -5283,7 +5527,7 @@ snapshots: finalhandler@2.1.0: dependencies: - debug: 4.4.1 + debug: 4.4.3 encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 @@ -5439,14 +5683,6 @@ snapshots: html-url-attributes@3.0.1: {} - http-errors@2.0.0: - dependencies: - depd: 2.0.0 - inherits: 2.0.4 - setprototypeof: 1.2.0 - statuses: 2.0.1 - toidentifier: 1.0.1 - http-errors@2.0.1: dependencies: depd: 2.0.0 @@ -5746,6 +5982,10 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + markdown-table@3.0.4: {} marked@14.0.0: {} @@ -6137,18 +6377,18 @@ snapshots: mkdirp@3.0.1: {} - molstar@5.5.0(@types/react@19.1.11)(fp-ts@2.16.11)(react-dom@19.2.3(react@19.2.3))(react@19.2.3): + molstar@5.7.0(@types/react@19.1.11)(fp-ts@2.16.11)(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: '@types/argparse': 2.0.17 '@types/benchmark': 2.1.5 '@types/compression': 1.8.1 '@types/express': 5.0.6 - '@types/node': 20.19.27 + '@types/node': 22.19.15 '@types/node-fetch': 2.6.13 '@types/swagger-ui-dist': 3.30.6 argparse: 2.0.1 compression: 1.8.1 - cors: 2.8.5 + cors: 2.8.6 express: 5.2.1 h264-mp4-encoder: 1.0.12 immutable: 5.1.4 @@ -6160,7 +6400,7 @@ snapshots: react-markdown: 10.1.0(@types/react@19.1.11)(react@19.2.3) remark-gfm: 4.0.1 rxjs: 7.8.2 - swagger-ui-dist: 5.31.0 + swagger-ui-dist: 5.32.1 tslib: 2.8.1 util.promisify: 1.1.3 transitivePeerDependencies: @@ -6544,6 +6784,17 @@ snapshots: optionalDependencies: '@babel/code-frame': 7.27.1 + rollup-plugin-dts@6.4.1(rollup@4.60.0)(typescript@5.9.3): + dependencies: + '@jridgewell/remapping': 2.3.5 + '@jridgewell/sourcemap-codec': 1.5.5 + convert-source-map: 2.0.0 + magic-string: 0.30.21 + rollup: 4.60.0 + typescript: 5.9.3 + optionalDependencies: + '@babel/code-frame': 7.29.0 + rollup@4.48.0: dependencies: '@types/estree': 1.0.8 @@ -6570,9 +6821,40 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.48.0 fsevents: 2.3.3 + rollup@4.60.0: + dependencies: + '@types/estree': 1.0.8 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.60.0 + '@rollup/rollup-android-arm64': 4.60.0 + '@rollup/rollup-darwin-arm64': 4.60.0 + '@rollup/rollup-darwin-x64': 4.60.0 + '@rollup/rollup-freebsd-arm64': 4.60.0 + '@rollup/rollup-freebsd-x64': 4.60.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.60.0 + '@rollup/rollup-linux-arm-musleabihf': 4.60.0 + '@rollup/rollup-linux-arm64-gnu': 4.60.0 + '@rollup/rollup-linux-arm64-musl': 4.60.0 + '@rollup/rollup-linux-loong64-gnu': 4.60.0 + '@rollup/rollup-linux-loong64-musl': 4.60.0 + '@rollup/rollup-linux-ppc64-gnu': 4.60.0 + '@rollup/rollup-linux-ppc64-musl': 4.60.0 + '@rollup/rollup-linux-riscv64-gnu': 4.60.0 + '@rollup/rollup-linux-riscv64-musl': 4.60.0 + '@rollup/rollup-linux-s390x-gnu': 4.60.0 + '@rollup/rollup-linux-x64-gnu': 4.60.0 + '@rollup/rollup-linux-x64-musl': 4.60.0 + '@rollup/rollup-openbsd-x64': 4.60.0 + '@rollup/rollup-openharmony-arm64': 4.60.0 + '@rollup/rollup-win32-arm64-msvc': 4.60.0 + '@rollup/rollup-win32-ia32-msvc': 4.60.0 + '@rollup/rollup-win32-x64-gnu': 4.60.0 + '@rollup/rollup-win32-x64-msvc': 4.60.0 + fsevents: 2.3.3 + router@2.2.0: dependencies: - debug: 4.4.1 + debug: 4.4.3 depd: 2.0.0 is-promise: 4.0.0 parseurl: 1.3.3 @@ -6619,12 +6901,12 @@ snapshots: send@1.2.0: dependencies: - debug: 4.4.1 + debug: 4.4.3 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 fresh: 2.0.0 - http-errors: 2.0.0 + http-errors: 2.0.1 mime-types: 3.0.1 ms: 2.1.3 on-finished: 2.4.1 @@ -6748,8 +7030,6 @@ snapshots: state-local@1.0.7: {} - statuses@2.0.1: {} - statuses@2.0.2: {} stop-iteration-iterator@1.1.0: @@ -6835,7 +7115,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - swagger-ui-dist@5.31.0: + swagger-ui-dist@5.32.1: dependencies: '@scarf/scarf': 1.4.0