@cosmol-studio/cosmolkit 0.5.0-rc.15 → 0.5.0-rc.17

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.
Files changed (41) hide show
  1. package/README.md +49 -6
  2. package/package.json +7 -1
  3. package/snippets/wasm-wasm-f225cc2ba4e6625c/inline16.js +1 -0
  4. package/snippets/wasm-wasm-f225cc2ba4e6625c/inline5.js +1 -0
  5. package/wasm_wasm.d.ts +337 -249
  6. package/wasm_wasm.js +1654 -1295
  7. package/wasm_wasm_bg.wasm +0 -0
  8. package/wasm_wasm_bg.wasm.d.ts +156 -137
  9. /package/snippets/{wasm-wasm-d52f7c509994947f → wasm-wasm-f225cc2ba4e6625c}/inline0.js +0 -0
  10. /package/snippets/{wasm-wasm-d52f7c509994947f/inline23.js → wasm-wasm-f225cc2ba4e6625c/inline1.js} +0 -0
  11. /package/snippets/{wasm-wasm-d52f7c509994947f/inline17.js → wasm-wasm-f225cc2ba4e6625c/inline10.js} +0 -0
  12. /package/snippets/{wasm-wasm-d52f7c509994947f/inline26.js → wasm-wasm-f225cc2ba4e6625c/inline11.js} +0 -0
  13. /package/snippets/{wasm-wasm-d52f7c509994947f/inline27.js → wasm-wasm-f225cc2ba4e6625c/inline12.js} +0 -0
  14. /package/snippets/{wasm-wasm-d52f7c509994947f/inline12.js → wasm-wasm-f225cc2ba4e6625c/inline13.js} +0 -0
  15. /package/snippets/{wasm-wasm-d52f7c509994947f/inline13.js → wasm-wasm-f225cc2ba4e6625c/inline14.js} +0 -0
  16. /package/snippets/{wasm-wasm-d52f7c509994947f/inline32.js → wasm-wasm-f225cc2ba4e6625c/inline15.js} +0 -0
  17. /package/snippets/{wasm-wasm-d52f7c509994947f/inline15.js → wasm-wasm-f225cc2ba4e6625c/inline17.js} +0 -0
  18. /package/snippets/{wasm-wasm-d52f7c509994947f/inline1.js → wasm-wasm-f225cc2ba4e6625c/inline18.js} +0 -0
  19. /package/snippets/{wasm-wasm-d52f7c509994947f/inline16.js → wasm-wasm-f225cc2ba4e6625c/inline19.js} +0 -0
  20. /package/snippets/{wasm-wasm-d52f7c509994947f/inline24.js → wasm-wasm-f225cc2ba4e6625c/inline2.js} +0 -0
  21. /package/snippets/{wasm-wasm-d52f7c509994947f/inline22.js → wasm-wasm-f225cc2ba4e6625c/inline20.js} +0 -0
  22. /package/snippets/{wasm-wasm-d52f7c509994947f → wasm-wasm-f225cc2ba4e6625c}/inline21.js +0 -0
  23. /package/snippets/{wasm-wasm-d52f7c509994947f/inline8.js → wasm-wasm-f225cc2ba4e6625c/inline22.js} +0 -0
  24. /package/snippets/{wasm-wasm-d52f7c509994947f/inline9.js → wasm-wasm-f225cc2ba4e6625c/inline23.js} +0 -0
  25. /package/snippets/{wasm-wasm-d52f7c509994947f/inline29.js → wasm-wasm-f225cc2ba4e6625c/inline24.js} +0 -0
  26. /package/snippets/{wasm-wasm-d52f7c509994947f/inline5.js → wasm-wasm-f225cc2ba4e6625c/inline25.js} +0 -0
  27. /package/snippets/{wasm-wasm-d52f7c509994947f/inline6.js → wasm-wasm-f225cc2ba4e6625c/inline26.js} +0 -0
  28. /package/snippets/{wasm-wasm-d52f7c509994947f/inline7.js → wasm-wasm-f225cc2ba4e6625c/inline27.js} +0 -0
  29. /package/snippets/{wasm-wasm-d52f7c509994947f/inline11.js → wasm-wasm-f225cc2ba4e6625c/inline28.js} +0 -0
  30. /package/snippets/{wasm-wasm-d52f7c509994947f/inline10.js → wasm-wasm-f225cc2ba4e6625c/inline29.js} +0 -0
  31. /package/snippets/{wasm-wasm-d52f7c509994947f/inline25.js → wasm-wasm-f225cc2ba4e6625c/inline3.js} +0 -0
  32. /package/snippets/{wasm-wasm-d52f7c509994947f/inline2.js → wasm-wasm-f225cc2ba4e6625c/inline30.js} +0 -0
  33. /package/snippets/{wasm-wasm-d52f7c509994947f/inline3.js → wasm-wasm-f225cc2ba4e6625c/inline31.js} +0 -0
  34. /package/snippets/{wasm-wasm-d52f7c509994947f/inline4.js → wasm-wasm-f225cc2ba4e6625c/inline32.js} +0 -0
  35. /package/snippets/{wasm-wasm-d52f7c509994947f/inline30.js → wasm-wasm-f225cc2ba4e6625c/inline33.js} +0 -0
  36. /package/snippets/{wasm-wasm-d52f7c509994947f/inline31.js → wasm-wasm-f225cc2ba4e6625c/inline34.js} +0 -0
  37. /package/snippets/{wasm-wasm-d52f7c509994947f/inline28.js → wasm-wasm-f225cc2ba4e6625c/inline4.js} +0 -0
  38. /package/snippets/{wasm-wasm-d52f7c509994947f/inline14.js → wasm-wasm-f225cc2ba4e6625c/inline6.js} +0 -0
  39. /package/snippets/{wasm-wasm-d52f7c509994947f/inline18.js → wasm-wasm-f225cc2ba4e6625c/inline7.js} +0 -0
  40. /package/snippets/{wasm-wasm-d52f7c509994947f/inline20.js → wasm-wasm-f225cc2ba4e6625c/inline8.js} +0 -0
  41. /package/snippets/{wasm-wasm-d52f7c509994947f/inline19.js → wasm-wasm-f225cc2ba4e6625c/inline9.js} +0 -0
package/README.md CHANGED
@@ -12,6 +12,51 @@ exceptions; successful methods return strings, numbers, typed arrays, or new
12
12
  npm install @cosmol-studio/cosmolkit
13
13
  ```
14
14
 
15
+ The default package is **full**; there is no need for an `@full` tag. Fixed
16
+ smaller distributions use npm dist-tags on the same package:
17
+
18
+ | Install suffix | Included public features |
19
+ |---|---|
20
+ | `@core` | `core`, including molecular IO and batch processing |
21
+ | `@core-search` | `core + search` |
22
+ | `@core-fingerprints` | `core + fingerprints` |
23
+ | `@core-analysis` | `core + search + fingerprints + descriptors` |
24
+ | `@core-reaction` | `core + reaction` (including search) |
25
+ | `@core-depict` | `core + depict` |
26
+ | `@core-3d` | `core + conformer` (including forcefields and alignment) |
27
+ | `@core-bio` | `core + bio` |
28
+ | `@core-inchi` | `core + inchi` |
29
+ | no suffix | `full` |
30
+
31
+ For example: `npm install @cosmol-studio/cosmolkit@core-bio`. Imports keep the
32
+ same package name. Omitted domains are absent from both exports and TypeScript
33
+ declarations; they are not runtime placeholders.
34
+
35
+ WASM uses the Rust facade's feature tree, generated from its Cargo manifest.
36
+ The platform exception is binary archives: `toBinary`/`fromBinary` and the
37
+ binary-only encoding dependencies are not compiled, even in `full`.
38
+ Query IO needs `search`; automatic 2D coordinate generation needs `depict`.
39
+ Without these capabilities, shared IO entrypoints report an explicit error.
40
+
41
+ Preset artifacts have distinct npm versions, such as `0.5.0-core-bio.0` or
42
+ `0.5.0-rc.15.core-bio.0`, because npm cannot replace an existing name/version
43
+ with different contents. The default full artifact keeps the Rust release
44
+ version. Stable full releases update `latest`; full RC releases update `rc`,
45
+ not `latest`. Preset tags track the most recently published corresponding
46
+ artifact, including manually published RCs. Pin the resolved version or use a
47
+ lockfile for reproducible installs.
48
+
49
+ InChI is available in `core-inchi` and the default full package:
50
+
51
+ ```js
52
+ const molecule = Molecule.fromSmiles("CCO");
53
+ console.log(molecule.toInchi());
54
+ console.log(molecule.toInchiKey());
55
+ const restored = Molecule.fromInchi(molecule.toInchi());
56
+ restored.free();
57
+ molecule.free();
58
+ ```
59
+
15
60
  The package is browser/bundler-oriented. It can be used from Vite, webpack,
16
61
  Rollup, and other tools that support the web `WebAssembly` target.
17
62
 
@@ -43,10 +88,10 @@ background `.wasm` file on the same CDN host:
43
88
  <div id="molecule"></div>
44
89
  <script type="module">
45
90
  import init, { Molecule } from
46
- "https://cdn.jsdelivr.net/npm/@cosmol-studio/cosmolkit@0.3.0/wasm_wasm.js";
91
+ "https://cdn.jsdelivr.net/npm/@cosmol-studio/cosmolkit@0.5.0/wasm_wasm.js";
47
92
 
48
93
  await init(
49
- "https://cdn.jsdelivr.net/npm/@cosmol-studio/cosmolkit@0.3.0/wasm_wasm_bg.wasm",
94
+ "https://cdn.jsdelivr.net/npm/@cosmol-studio/cosmolkit@0.5.0/wasm_wasm_bg.wasm",
50
95
  );
51
96
  const molecule = Molecule.fromSmiles("c1ccccc1O");
52
97
  document.querySelector("#molecule").textContent = molecule.toSmiles();
@@ -68,7 +113,6 @@ More focused examples are in [`examples/vanilla`](./examples/vanilla/):
68
113
  coordinate arrays.
69
114
  - [`fingerprints.js`](./examples/vanilla/fingerprints.js): typed fingerprint
70
115
  bit vectors.
71
- - [`binary.js`](./examples/vanilla/binary.js): binary serialization roundtrip.
72
116
  - [`substructure.js`](./examples/vanilla/substructure.js): SMARTS matching and
73
117
  disconnected fragments.
74
118
  - [`stereo.js`](./examples/vanilla/stereo.js): stereochemistry and conformers.
@@ -177,8 +221,8 @@ such as `withHydrogens()`, `with2dCoordinates()`, and
177
221
  `with3dConformer()` return new values and leave the source value unchanged.
178
222
 
179
223
  Fingerprint methods return `Uint32Array` set-bit lists. Coordinate methods
180
- return flattened `Float64Array` values. Binary serialization returns a
181
- `Uint8Array`, which can be stored or transferred through a worker.
224
+ return flattened `Float64Array` values. Native binary archives are intentionally
225
+ not part of the WASM API.
182
226
 
183
227
  ## Examples
184
228
 
@@ -188,7 +232,6 @@ The examples are intentionally small and use only the published package:
188
232
  - [`examples/vanilla/cdn.html`](./examples/vanilla/cdn.html)
189
233
  - [`examples/vanilla/descriptors.js`](./examples/vanilla/descriptors.js)
190
234
  - [`examples/vanilla/fingerprints.js`](./examples/vanilla/fingerprints.js)
191
- - [`examples/vanilla/binary.js`](./examples/vanilla/binary.js)
192
235
  - [`examples/vanilla/substructure.js`](./examples/vanilla/substructure.js)
193
236
  - [`examples/vanilla/stereo.js`](./examples/vanilla/stereo.js)
194
237
  - [`examples/react/MoleculePanel.jsx`](./examples/react/MoleculePanel.jsx)
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "@cosmol-studio/cosmolkit",
3
- "version": "0.5.0-rc.15",
3
+ "version": "0.5.0-rc.17",
4
+ "cosmolkitPreset": "full",
5
+ "cosmolkitVersion": "0.5.0-rc.17",
6
+ "publishConfig": {
7
+ "access": "public",
8
+ "tag": "rc"
9
+ },
4
10
  "description": "WebAssembly bindings for COSMolKit",
5
11
  "type": "module",
6
12
  "main": "wasm_wasm.js",
@@ -0,0 +1 @@
1
+ export function visitLayeredParams(value,visit){visit(value);}
@@ -0,0 +1 @@
1
+ export function visitInchiRead(v,f){f(v);} export function visitInchiWrite(v,f){f(v);}