lhasa-ligand-builder 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +18 -0
- package/LICENSE +674 -0
- package/README.md +41 -0
- package/index.html +49 -0
- package/package.json +37 -0
- package/public/.gitkeep +0 -0
- package/public/Components-inchikey.ich +48167 -0
- package/public/icons/README +7 -0
- package/public/icons/dark/layla_3c.svg +82 -0
- package/public/icons/dark/layla_4c.svg +82 -0
- package/public/icons/dark/layla_5c.svg +82 -0
- package/public/icons/dark/layla_6arom.svg +89 -0
- package/public/icons/dark/layla_6c.svg +82 -0
- package/public/icons/dark/layla_7c.svg +82 -0
- package/public/icons/dark/layla_8c.svg +82 -0
- package/public/icons/dark/layla_charge_tool.svg +78 -0
- package/public/icons/dark/layla_delete_hydrogens_tool.svg +384 -0
- package/public/icons/dark/layla_double_bond.svg +78 -0
- package/public/icons/dark/layla_format_tool.svg +283 -0
- package/public/icons/dark/layla_geometry_tool.svg +105 -0
- package/public/icons/dark/layla_key.svg +76 -0
- package/public/icons/dark/layla_move_tool.svg +110 -0
- package/public/icons/dark/layla_single_bond.svg +73 -0
- package/public/icons/dark/layla_triple_bond.svg +87 -0
- package/public/icons/dark/lhasa_delete_tool.svg +401 -0
- package/public/icons/dark/lhasa_flip_x_tool.svg +106 -0
- package/public/icons/dark/lhasa_flip_y_tool.svg +106 -0
- package/public/icons/dark/lhasa_rotate_tool.svg +112 -0
- package/public/icons/icons/hicolor_apps_scalable_coot-layla.svg +105 -0
- package/public/icons/layla_3c.svg +82 -0
- package/public/icons/layla_4c.svg +82 -0
- package/public/icons/layla_5c.svg +82 -0
- package/public/icons/layla_6arom.svg +89 -0
- package/public/icons/layla_6c.svg +82 -0
- package/public/icons/layla_7c.svg +82 -0
- package/public/icons/layla_8c.svg +82 -0
- package/public/icons/layla_charge_tool.svg +78 -0
- package/public/icons/layla_delete_hydrogens_tool.svg +384 -0
- package/public/icons/layla_double_bond.svg +78 -0
- package/public/icons/layla_format_tool.svg +283 -0
- package/public/icons/layla_geometry_tool-dark.svg +105 -0
- package/public/icons/layla_geometry_tool.svg +105 -0
- package/public/icons/layla_key.svg +76 -0
- package/public/icons/layla_move_tool.svg +110 -0
- package/public/icons/layla_single_bond.svg +73 -0
- package/public/icons/layla_triple_bond.svg +87 -0
- package/public/icons/lhasa_delete_tool.svg +401 -0
- package/public/icons/lhasa_flip_x_tool.svg +106 -0
- package/public/icons/lhasa_flip_y_tool.svg +106 -0
- package/public/icons/lhasa_rotate_tool.svg +112 -0
- package/public/lhasa.js +2 -0
- package/public/lhasa.wasm +0 -0
- package/public/react.svg +1 -0
- package/src/Lhasa.tsx +1452 -0
- package/src/assets/.gitkeep +0 -0
- package/src/bansu_integration.tsx +315 -0
- package/src/customize_mui.scss +97 -0
- package/src/inchikey_database_parse.tsx +20 -0
- package/src/index.d.ts +11 -0
- package/src/index.scss +352 -0
- package/src/main.tsx +79 -0
- package/src/qed_property_infobox.tsx +14 -0
- package/src/types.d.ts +375 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +25 -0
- package/tsconfig.node.json +10 -0
- package/vite.config.ts +55 -0
package/src/types.d.ts
ADDED
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
// TypeScript bindings for emscripten-generated code. Automatically generated at compile time.
|
|
2
|
+
declare namespace RuntimeExports {
|
|
3
|
+
let HEAPF32: any;
|
|
4
|
+
let HEAPF64: any;
|
|
5
|
+
let HEAP_DATA_VIEW: any;
|
|
6
|
+
let HEAP8: any;
|
|
7
|
+
let HEAPU8: any;
|
|
8
|
+
let HEAP16: any;
|
|
9
|
+
let HEAPU16: any;
|
|
10
|
+
let HEAP32: any;
|
|
11
|
+
let HEAPU32: any;
|
|
12
|
+
let HEAP64: any;
|
|
13
|
+
let HEAPU64: any;
|
|
14
|
+
}
|
|
15
|
+
interface WasmModule {
|
|
16
|
+
__ZN5boost13serialization16singleton_module8get_lockEv(_0: number): number;
|
|
17
|
+
__ZNK5boost7archive6detail11oserializerINS0_13text_oarchiveEN5RDKit9MolBundleEE16save_object_dataERNS1_14basic_oarchiveEPKv(_0: number, _1: number, _2: number): void;
|
|
18
|
+
__ZNK5boost7archive6detail11oserializerINS0_13text_oarchiveENSt3__26vectorINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS9_ISB_EEEEE16save_object_dataERNS1_14basic_oarchiveEPKv(_0: number, _1: number, _2: number): void;
|
|
19
|
+
__ZNK5boost7archive6detail11iserializerINS0_13text_iarchiveEN5RDKit9MolBundleEE16load_object_dataERNS1_14basic_iarchiveEPvj(_0: number, _1: number, _2: number, _3: number): void;
|
|
20
|
+
__ZNK5boost7archive6detail11iserializerINS0_13text_iarchiveENSt3__26vectorINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS9_ISB_EEEEE16load_object_dataERNS1_14basic_iarchiveEPvj(_0: number, _1: number, _2: number, _3: number): void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type EmbindString = ArrayBuffer|Uint8Array|Uint8ClampedArray|Int8Array|string;
|
|
24
|
+
export interface ClassHandle {
|
|
25
|
+
isAliasOf(other: ClassHandle): boolean;
|
|
26
|
+
delete(): void;
|
|
27
|
+
deleteLater(): this;
|
|
28
|
+
isDeleted(): boolean;
|
|
29
|
+
clone(): this;
|
|
30
|
+
}
|
|
31
|
+
export interface DisplayModeValue<T extends number> {
|
|
32
|
+
value: T;
|
|
33
|
+
}
|
|
34
|
+
export type DisplayMode = DisplayModeValue<0>|DisplayModeValue<1>|DisplayModeValue<2>;
|
|
35
|
+
|
|
36
|
+
export interface DrawingCommandVector extends ClassHandle {
|
|
37
|
+
size(): number;
|
|
38
|
+
get(_0: number): DrawingCommand | undefined;
|
|
39
|
+
push_back(_0: DrawingCommand): void;
|
|
40
|
+
resize(_0: number, _1: DrawingCommand): void;
|
|
41
|
+
set(_0: number, _1: DrawingCommand): boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface PathElementVector extends ClassHandle {
|
|
45
|
+
size(): number;
|
|
46
|
+
get(_0: number): PathElement | undefined;
|
|
47
|
+
push_back(_0: PathElement): void;
|
|
48
|
+
resize(_0: number, _1: PathElement): void;
|
|
49
|
+
set(_0: number, _1: PathElement): boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface TextMeasurementCache extends ClassHandle {
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface Renderer extends ClassHandle {
|
|
56
|
+
get_commands(): DrawingCommandVector;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type Color = {
|
|
60
|
+
r: number,
|
|
61
|
+
g: number,
|
|
62
|
+
b: number,
|
|
63
|
+
a: number
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type BrushStyle = {
|
|
67
|
+
color: Color,
|
|
68
|
+
line_width: number
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export type GraphenePoint = {
|
|
72
|
+
x: number,
|
|
73
|
+
y: number
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export type Line = {
|
|
77
|
+
start: GraphenePoint,
|
|
78
|
+
end: GraphenePoint
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export type Arc = {
|
|
82
|
+
origin: GraphenePoint,
|
|
83
|
+
radius: number,
|
|
84
|
+
angle_one: number,
|
|
85
|
+
angle_two: number
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export interface PathElement extends ClassHandle {
|
|
89
|
+
is_arc(): boolean;
|
|
90
|
+
as_arc(): Arc;
|
|
91
|
+
as_line(): Line;
|
|
92
|
+
is_line(): boolean;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface Path extends ClassHandle {
|
|
96
|
+
fill_color: Color;
|
|
97
|
+
has_fill: boolean;
|
|
98
|
+
stroke_style: BrushStyle;
|
|
99
|
+
has_stroke: boolean;
|
|
100
|
+
get_elements(): PathElementVector;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface TextPositioningValue<T extends number> {
|
|
104
|
+
value: T;
|
|
105
|
+
}
|
|
106
|
+
export type TextPositioning = TextPositioningValue<0>|TextPositioningValue<1>|TextPositioningValue<2>;
|
|
107
|
+
|
|
108
|
+
export interface TextStyle extends ClassHandle {
|
|
109
|
+
positioning: TextPositioning;
|
|
110
|
+
get weight(): string;
|
|
111
|
+
set weight(value: EmbindString);
|
|
112
|
+
get size(): string;
|
|
113
|
+
set size(value: EmbindString);
|
|
114
|
+
color: Color;
|
|
115
|
+
specifies_color: boolean;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface TextSpan extends ClassHandle {
|
|
119
|
+
style: TextStyle;
|
|
120
|
+
specifies_style: boolean;
|
|
121
|
+
has_subspans(): boolean;
|
|
122
|
+
as_caption(): string;
|
|
123
|
+
as_subspans(): TextSpanVector;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface TextSpanVector extends ClassHandle {
|
|
127
|
+
push_back(_0: TextSpan): void;
|
|
128
|
+
resize(_0: number, _1: TextSpan): void;
|
|
129
|
+
size(): number;
|
|
130
|
+
get(_0: number): TextSpan | undefined;
|
|
131
|
+
set(_0: number, _1: TextSpan): boolean;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export type TextSize = {
|
|
135
|
+
width: number,
|
|
136
|
+
height: number
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export interface Text extends ClassHandle {
|
|
140
|
+
origin: GraphenePoint;
|
|
141
|
+
style: TextStyle;
|
|
142
|
+
spans: TextSpanVector;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface DrawingCommand extends ClassHandle {
|
|
146
|
+
is_path(): boolean;
|
|
147
|
+
as_path(): Path;
|
|
148
|
+
is_text(): boolean;
|
|
149
|
+
as_text(): Text;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface DeleteTool extends ClassHandle {
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface ChargeModifier extends ClassHandle {
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface GeometryModifier extends ClassHandle {
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface FormatTool extends ClassHandle {
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface RemoveHydrogensTool extends ClassHandle {
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface LhasaElementValue<T extends number> {
|
|
168
|
+
value: T;
|
|
169
|
+
}
|
|
170
|
+
export type LhasaElement = LhasaElementValue<0>|LhasaElementValue<1>|LhasaElementValue<2>|LhasaElementValue<3>|LhasaElementValue<4>|LhasaElementValue<5>|LhasaElementValue<6>|LhasaElementValue<7>|LhasaElementValue<8>|LhasaElementValue<9>;
|
|
171
|
+
|
|
172
|
+
export interface ElementInsertion extends ClassHandle {
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface LhasaStructureValue<T extends number> {
|
|
176
|
+
value: T;
|
|
177
|
+
}
|
|
178
|
+
export type LhasaStructure = LhasaStructureValue<0>|LhasaStructureValue<1>|LhasaStructureValue<2>|LhasaStructureValue<3>|LhasaStructureValue<4>|LhasaStructureValue<5>|LhasaStructureValue<6>;
|
|
179
|
+
|
|
180
|
+
export interface StructureInsertion extends ClassHandle {
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface BondModifierModeValue<T extends number> {
|
|
184
|
+
value: T;
|
|
185
|
+
}
|
|
186
|
+
export type BondModifierMode = BondModifierModeValue<0>|BondModifierModeValue<1>|BondModifierModeValue<2>;
|
|
187
|
+
|
|
188
|
+
export interface BondModifier extends ClassHandle {
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface TransformModeValue<T extends number> {
|
|
192
|
+
value: T;
|
|
193
|
+
}
|
|
194
|
+
export type TransformMode = TransformModeValue<0>|TransformModeValue<1>;
|
|
195
|
+
|
|
196
|
+
export interface TransformTool extends ClassHandle {
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface FlipModeValue<T extends number> {
|
|
200
|
+
value: T;
|
|
201
|
+
}
|
|
202
|
+
export type FlipMode = FlipModeValue<0>|FlipModeValue<1>;
|
|
203
|
+
|
|
204
|
+
export interface FlipTool extends ClassHandle {
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface ActiveTool extends ClassHandle {
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export type SizingInfo = {
|
|
211
|
+
requested_size: number
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export interface MeasurementDirectionValue<T extends number> {
|
|
215
|
+
value: T;
|
|
216
|
+
}
|
|
217
|
+
export type MeasurementDirection = MeasurementDirectionValue<0>|MeasurementDirectionValue<1>;
|
|
218
|
+
|
|
219
|
+
export type QEDInfo = {
|
|
220
|
+
number_of_hydrogen_bond_acceptors: number,
|
|
221
|
+
number_of_hydrogen_bond_donors: number,
|
|
222
|
+
number_of_rotatable_bonds: number,
|
|
223
|
+
number_of_aromatic_rings: number,
|
|
224
|
+
number_of_alerts: number,
|
|
225
|
+
molecular_weight: number,
|
|
226
|
+
alogp: number,
|
|
227
|
+
molecular_polar_surface_area: number,
|
|
228
|
+
ads_mw: number,
|
|
229
|
+
ads_alogp: number,
|
|
230
|
+
ads_hba: number,
|
|
231
|
+
ads_hbd: number,
|
|
232
|
+
ads_psa: number,
|
|
233
|
+
ads_rotb: number,
|
|
234
|
+
ads_arom: number,
|
|
235
|
+
ads_alert: number,
|
|
236
|
+
qed_score: number
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
export interface ImplWidgetCoreData extends ClassHandle {
|
|
240
|
+
render(_0: Renderer): void;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface SmilesMap extends ClassHandle {
|
|
244
|
+
size(): number;
|
|
245
|
+
get(_0: number): EmbindString | undefined;
|
|
246
|
+
set(_0: number, _1: EmbindString): void;
|
|
247
|
+
keys(): MoleculeIdVector;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface MoleculeIdVector extends ClassHandle {
|
|
251
|
+
push_back(_0: number): void;
|
|
252
|
+
resize(_0: number, _1: number): void;
|
|
253
|
+
size(): number;
|
|
254
|
+
get(_0: number): number | undefined;
|
|
255
|
+
set(_0: number, _1: number): boolean;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface Canvas extends ImplWidgetCoreData {
|
|
259
|
+
set_active_tool(_0: ActiveTool): void;
|
|
260
|
+
update_molecule_from_smiles(_0: number, _1: EmbindString): void;
|
|
261
|
+
set_scale(_0: number): void;
|
|
262
|
+
get_scale(): number;
|
|
263
|
+
undo_edition(): void;
|
|
264
|
+
redo_edition(): void;
|
|
265
|
+
get_molecule_count(): number;
|
|
266
|
+
get_idx_of_first_molecule(): number;
|
|
267
|
+
get_max_molecule_idx(): number;
|
|
268
|
+
set_allow_invalid_molecules(_0: boolean): void;
|
|
269
|
+
get_allow_invalid_molecules(): boolean;
|
|
270
|
+
get_display_mode(): DisplayMode;
|
|
271
|
+
set_display_mode(_0: DisplayMode): void;
|
|
272
|
+
get_smiles(): SmilesMap;
|
|
273
|
+
get_smiles_for_molecule(_0: number): string;
|
|
274
|
+
get_pickled_molecule(_0: number): string;
|
|
275
|
+
get_pickled_molecule_base64(_0: number): string;
|
|
276
|
+
clear_molecules(): void;
|
|
277
|
+
on_hover(_0: number, _1: number, _2: boolean, _3: boolean): void;
|
|
278
|
+
on_scroll(_0: number, _1: number, _2: boolean): void;
|
|
279
|
+
on_left_click(_0: number, _1: number, _2: boolean, _3: boolean, _4: boolean): void;
|
|
280
|
+
on_left_click_released(_0: number, _1: number, _2: boolean, _3: boolean, _4: boolean): void;
|
|
281
|
+
on_right_click(_0: number, _1: number, _2: boolean, _3: boolean, _4: boolean): void;
|
|
282
|
+
on_right_click_released(_0: number, _1: number, _2: boolean, _3: boolean, _4: boolean): void;
|
|
283
|
+
measure(_0: MeasurementDirection): SizingInfo;
|
|
284
|
+
connect(_0: EmbindString, _1: any): void;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
interface EmbindModule {
|
|
288
|
+
DisplayMode: {Standard: DisplayModeValue<0>, AtomIndices: DisplayModeValue<1>, AtomNames: DisplayModeValue<2>};
|
|
289
|
+
DrawingCommandVector: {
|
|
290
|
+
new(): DrawingCommandVector;
|
|
291
|
+
};
|
|
292
|
+
PathElementVector: {
|
|
293
|
+
new(): PathElementVector;
|
|
294
|
+
};
|
|
295
|
+
TextMeasurementCache: {
|
|
296
|
+
new(): TextMeasurementCache;
|
|
297
|
+
};
|
|
298
|
+
Renderer: {
|
|
299
|
+
new(_0: any): Renderer;
|
|
300
|
+
new(_0: any, _1: TextMeasurementCache): Renderer;
|
|
301
|
+
};
|
|
302
|
+
PathElement: {};
|
|
303
|
+
Path: {};
|
|
304
|
+
TextPositioning: {Normal: TextPositioningValue<0>, Sub: TextPositioningValue<1>, Super: TextPositioningValue<2>};
|
|
305
|
+
TextStyle: {
|
|
306
|
+
new(): TextStyle;
|
|
307
|
+
};
|
|
308
|
+
TextSpan: {
|
|
309
|
+
new(): TextSpan;
|
|
310
|
+
new(_0: TextSpanVector): TextSpan;
|
|
311
|
+
};
|
|
312
|
+
TextSpanVector: {
|
|
313
|
+
new(): TextSpanVector;
|
|
314
|
+
};
|
|
315
|
+
Text: {
|
|
316
|
+
new(): Text;
|
|
317
|
+
};
|
|
318
|
+
DrawingCommand: {};
|
|
319
|
+
DeleteTool: {
|
|
320
|
+
new(): DeleteTool;
|
|
321
|
+
};
|
|
322
|
+
ChargeModifier: {
|
|
323
|
+
new(): ChargeModifier;
|
|
324
|
+
};
|
|
325
|
+
GeometryModifier: {
|
|
326
|
+
new(): GeometryModifier;
|
|
327
|
+
};
|
|
328
|
+
FormatTool: {
|
|
329
|
+
new(): FormatTool;
|
|
330
|
+
};
|
|
331
|
+
RemoveHydrogensTool: {
|
|
332
|
+
new(): RemoveHydrogensTool;
|
|
333
|
+
};
|
|
334
|
+
LhasaElement: {C: LhasaElementValue<0>, N: LhasaElementValue<1>, O: LhasaElementValue<2>, S: LhasaElementValue<3>, P: LhasaElementValue<4>, H: LhasaElementValue<5>, F: LhasaElementValue<6>, Cl: LhasaElementValue<7>, Br: LhasaElementValue<8>, I: LhasaElementValue<9>};
|
|
335
|
+
ElementInsertion: {
|
|
336
|
+
new(_0: LhasaElement): ElementInsertion;
|
|
337
|
+
};
|
|
338
|
+
element_insertion_from_symbol(_0: EmbindString): ElementInsertion;
|
|
339
|
+
LhasaStructure: {CycloPropaneRing: LhasaStructureValue<0>, CycloButaneRing: LhasaStructureValue<1>, CycloPentaneRing: LhasaStructureValue<2>, CycloHexaneRing: LhasaStructureValue<3>, BenzeneRing: LhasaStructureValue<4>, CycloHeptaneRing: LhasaStructureValue<5>, CycloOctaneRing: LhasaStructureValue<6>};
|
|
340
|
+
StructureInsertion: {
|
|
341
|
+
new(_0: LhasaStructure): StructureInsertion;
|
|
342
|
+
};
|
|
343
|
+
BondModifierMode: {Single: BondModifierModeValue<0>, Double: BondModifierModeValue<1>, Triple: BondModifierModeValue<2>};
|
|
344
|
+
BondModifier: {
|
|
345
|
+
new(_0: BondModifierMode): BondModifier;
|
|
346
|
+
};
|
|
347
|
+
TransformMode: {Rotation: TransformModeValue<0>, Translation: TransformModeValue<1>};
|
|
348
|
+
TransformTool: {
|
|
349
|
+
new(_0: TransformMode): TransformTool;
|
|
350
|
+
};
|
|
351
|
+
FlipMode: {Horizontal: FlipModeValue<0>, Vertical: FlipModeValue<1>};
|
|
352
|
+
FlipTool: {
|
|
353
|
+
new(_0: FlipMode): FlipTool;
|
|
354
|
+
};
|
|
355
|
+
ActiveTool: {
|
|
356
|
+
new(): ActiveTool;
|
|
357
|
+
};
|
|
358
|
+
make_active_tool(_0: any): ActiveTool;
|
|
359
|
+
MeasurementDirection: {HORIZONTAL: MeasurementDirectionValue<0>, VERTICAL: MeasurementDirectionValue<1>};
|
|
360
|
+
ImplWidgetCoreData: {};
|
|
361
|
+
SmilesMap: {
|
|
362
|
+
new(): SmilesMap;
|
|
363
|
+
};
|
|
364
|
+
MoleculeIdVector: {
|
|
365
|
+
new(): MoleculeIdVector;
|
|
366
|
+
};
|
|
367
|
+
Canvas: {
|
|
368
|
+
new(): Canvas;
|
|
369
|
+
};
|
|
370
|
+
append_from_smiles(_0: Canvas, _1: EmbindString): number;
|
|
371
|
+
append_from_pickle_base64(_0: Canvas, _1: EmbindString): number;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export type MainModule = WasmModule & typeof RuntimeExports & EmbindModule;
|
|
375
|
+
export default function MainModuleFactory (options?: unknown): Promise<MainModule>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"jsx": "react-jsx",
|
|
16
|
+
|
|
17
|
+
/* Linting */
|
|
18
|
+
"strict": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"noFallthroughCasesInSwitch": true
|
|
22
|
+
},
|
|
23
|
+
"include": ["src"],
|
|
24
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
25
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import react from '@vitejs/plugin-react-swc'
|
|
3
|
+
import crossOriginIsolation from 'vite-plugin-cross-origin-isolation'
|
|
4
|
+
import topLevelAwait from 'vite-plugin-top-level-await'
|
|
5
|
+
|
|
6
|
+
// https://vitejs.dev/config/
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
server: {
|
|
9
|
+
headers: {
|
|
10
|
+
// This is for the backend, I think
|
|
11
|
+
//
|
|
12
|
+
// 'Access-Control-Allow-Origin': "*",
|
|
13
|
+
// 'access-control-allow-origin': "*",
|
|
14
|
+
// 'Access-Control-Allow-Methods': 'POST, GET, OPTIONS, PUT, DELETE',
|
|
15
|
+
// This breaks frontend
|
|
16
|
+
// 'Cross-Origin-Opener-Policy': "*",
|
|
17
|
+
// 'a': 'b'
|
|
18
|
+
},
|
|
19
|
+
proxy: {
|
|
20
|
+
'/run_acedrg': {
|
|
21
|
+
target: 'http://localhost:8080',
|
|
22
|
+
changeOrigin: true
|
|
23
|
+
},
|
|
24
|
+
'/get_cif': {
|
|
25
|
+
target: 'http://localhost:8080',
|
|
26
|
+
changeOrigin: true
|
|
27
|
+
},
|
|
28
|
+
'/ws': {
|
|
29
|
+
target: 'ws://localhost:8080',
|
|
30
|
+
changeOrigin: true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
// https://sass-lang.com/documentation/breaking-changes/legacy-js-api/
|
|
35
|
+
css: {
|
|
36
|
+
preprocessorOptions: {
|
|
37
|
+
scss: {
|
|
38
|
+
api: 'modern-compiler', // or "modern", "legacy"
|
|
39
|
+
importers: [
|
|
40
|
+
// ...
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
plugins: [
|
|
46
|
+
react(),
|
|
47
|
+
crossOriginIsolation(),
|
|
48
|
+
topLevelAwait({
|
|
49
|
+
// The export name of top-level await promise for each chunk module
|
|
50
|
+
promiseExportName: "__tla",
|
|
51
|
+
// The function to generate import names of top-level await promise in each chunk module
|
|
52
|
+
promiseImportName: i => `__tla_${i}`
|
|
53
|
+
})
|
|
54
|
+
],
|
|
55
|
+
})
|