@cosmol-studio/cosmol-viewer 0.5.0-rc.4 → 0.6.2

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.
Binary file
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./cosmol_viewer_wasm.js";
package/index.js ADDED
@@ -0,0 +1,10 @@
1
+ // npm users pass CK objects. Notebook embeds the generated module directly.
2
+ import * as ck from "@cosmol-studio/cosmolkit";
3
+ import initWasm, { __setCkTypes, __setViewerTypes, Selection, Sphere, Stick, Style } from "./cosmol_viewer_wasm.js";
4
+
5
+ await Promise.all([ck.default(), initWasm()]);
6
+
7
+ __setCkTypes(ck.Molecule, ck.Protein, ck.Element);
8
+ __setViewerTypes(Selection, Sphere, Stick, Style);
9
+
10
+ export * from "./cosmol_viewer_wasm.js";
package/package.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "name": "@cosmol-studio/cosmol-viewer",
3
3
  "type": "module",
4
4
  "description": "Molecular visualization tools by rust",
5
- "version": "0.5.0-rc.4",
6
- "license": "MIT OR Apache-2.0",
5
+ "version": "0.6.2",
6
+ "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/cosmol-studio/COSMol-viewer"
@@ -11,11 +11,22 @@
11
11
  "files": [
12
12
  "cosmol_viewer_wasm_bg.wasm",
13
13
  "cosmol_viewer_wasm.js",
14
- "cosmol_viewer_wasm.d.ts"
14
+ "cosmol_viewer_wasm.d.ts",
15
+ "index.js",
16
+ "index.d.ts"
15
17
  ],
16
- "main": "cosmol_viewer_wasm.js",
17
- "types": "cosmol_viewer_wasm.d.ts",
18
+ "main": "index.js",
19
+ "homepage": "https://github.com/cosmol-studio/COSMol-viewer",
20
+ "types": "index.d.ts",
18
21
  "sideEffects": [
19
- "./snippets/*"
20
- ]
22
+ "./snippets/*",
23
+ "./index.js"
24
+ ],
25
+ "dependencies": {
26
+ "@cosmol-studio/cosmolkit": "0.6.2"
27
+ },
28
+ "publishConfig": {
29
+ "access": "public",
30
+ "tag": "latest"
31
+ }
21
32
  }