@juliocesar-io/nano-protein-viewer-react 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,87 @@
1
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
2
+ import { MolstarViewerInstance } from 'molstar/build/viewer/molstar';
3
+
4
+ declare type ChainColorParams = {
5
+ chainColors: Record<string | number, string | number>;
6
+ };
7
+
8
+ declare type ColorThemeParams = Partial<ChainColorParams & CustomColorParams & SecondaryColorParams & RainbowParams>;
9
+
10
+ export declare function createMolstarViewer(): MolstarViewerHandle;
11
+
12
+ declare type CustomColorParams = {
13
+ hex: string | number;
14
+ };
15
+
16
+ export declare interface LoadedStructure {
17
+ name: string;
18
+ data: string;
19
+ format: StructureFormat;
20
+ style?: {
21
+ colorMode?: 'none' | 'custom' | 'element' | 'residue' | 'secondary' | 'chain' | 'rainbow';
22
+ customColor?: string;
23
+ illustrative?: boolean;
24
+ surface?: {
25
+ enabled: boolean;
26
+ opacity?: number;
27
+ inherit?: boolean;
28
+ customColor?: string;
29
+ };
30
+ };
31
+ }
32
+
33
+ export declare interface MolstarViewerHandle {
34
+ viewer: MolstarViewerInstance | null;
35
+ mount: (container: HTMLElement) => Promise<void>;
36
+ clear: () => Promise<void>;
37
+ loadStructureText: (data: string, format: StructureFormat, maintainView?: boolean) => Promise<void>;
38
+ updateColorTheme: (mode: 'custom' | 'element' | 'residue' | 'secondary' | 'chain' | 'rainbow', params?: ColorThemeParams) => Promise<void>;
39
+ listChains: () => Promise<string[]>;
40
+ applyIllustrativeStyle: (enabled: boolean) => Promise<void>;
41
+ applySurface: (enabled: boolean, options?: {
42
+ opacity?: number;
43
+ inherit?: boolean;
44
+ customColor?: string;
45
+ }) => Promise<void>;
46
+ resetView: () => Promise<void>;
47
+ resetColorTheme: () => Promise<void>;
48
+ }
49
+
50
+ export declare function NanoProteinViewer({ structureUrls }: NanoProteinViewerProps): JSX_2.Element;
51
+
52
+ export declare interface NanoProteinViewerProps {
53
+ structureUrls: StructureUrl[];
54
+ }
55
+
56
+ declare type RainbowParams = {
57
+ palette?: string;
58
+ };
59
+
60
+ declare type SecondaryColorParams = {
61
+ secondaryColors: {
62
+ helix: string;
63
+ sheet: string;
64
+ coil: string;
65
+ };
66
+ };
67
+
68
+ export declare type StructureFormat = 'pdb' | 'mmcif' | 'sdf';
69
+
70
+ export declare interface StructureUrl {
71
+ name: string;
72
+ url: string;
73
+ format?: StructureFormat;
74
+ style?: {
75
+ colorMode?: 'none' | 'custom' | 'element' | 'residue' | 'secondary' | 'chain' | 'rainbow';
76
+ customColor?: string;
77
+ illustrative?: boolean;
78
+ surface?: {
79
+ enabled: boolean;
80
+ opacity?: number;
81
+ inherit?: boolean;
82
+ customColor?: string;
83
+ };
84
+ };
85
+ }
86
+
87
+ export { }