@kent-tokyo/chematic 1.0.7 → 1.0.9

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/README.md CHANGED
@@ -162,7 +162,7 @@ and enforced correctly on all of them.
162
162
 
163
163
  ## Bundle Size
164
164
 
165
- The optimized v1.0.2-candidate artifact was measured at **3.30 MB raw / 1.21 MB gzip**. Bundle size depends on features and toolchain; see [`benchmarks/2026-09-04-wasm-size.md`](../../benchmarks/2026-09-04-wasm-size.md) for exact tools, digest, and reproduction steps.
165
+ The optimized v1.0.9 candidate artifact was measured at **3.58 MB raw / 1.31 MB gzip**. Bundle size depends on features and toolchain; see [`benchmarks/2026-09-07-wasm-size-v1.0.9.md`](../../benchmarks/2026-09-07-wasm-size-v1.0.9.md) for exact tools, digest, and reproduction steps.
166
166
 
167
167
  PNG rasterization (`tiny_skia`) is excluded from the WASM build — use SVG output instead. All SVG depiction APIs remain fully available.
168
168
 
@@ -584,6 +584,15 @@ export function canonical_tautomer(mol: MolHandle): MolHandle;
584
584
  */
585
585
  export function canonical_tautomer_with_blocked_atoms_json(mol: MolHandle, blocked_atom_indices_json: string): string;
586
586
 
587
+ /**
588
+ * Canonicalize a bounded delimiter-separated SMILES batch.
589
+ *
590
+ * Each result retains its input index and original text. Invalid records are
591
+ * returned inline with `status: "rejected"`; later records are still
592
+ * processed in deterministic input order.
593
+ */
594
+ export function canonicalize_smiles_batch_json(smiles_batch: string, delimiter: string): string;
595
+
587
596
  /**
588
597
  * Parse a CDXML document while preserving page and presentation objects.
589
598
  * The returned JSON contains an opaque `raw_xml` for each object so unknown
@@ -2664,6 +2673,7 @@ export interface InitOutput {
2664
2673
  readonly butina_cluster_ecfp4_json: (a: number, b: number, c: number) => [number, number, number, number];
2665
2674
  readonly canonical_tautomer: (a: number) => number;
2666
2675
  readonly canonical_tautomer_with_blocked_atoms_json: (a: number, b: number, c: number) => [number, number];
2676
+ readonly canonicalize_smiles_batch_json: (a: number, b: number, c: number, d: number) => [number, number, number, number];
2667
2677
  readonly cdxml_document_json: (a: number, b: number) => [number, number, number, number];
2668
2678
  readonly cdxml_to_smiles_json: (a: number, b: number) => [number, number, number, number];
2669
2679
  readonly charge_parent_json: (a: number) => [number, number];
package/chematic_wasm.js CHANGED
@@ -1368,6 +1368,39 @@ export function canonical_tautomer_with_blocked_atoms_json(mol, blocked_atom_ind
1368
1368
  }
1369
1369
  }
1370
1370
 
1371
+ /**
1372
+ * Canonicalize a bounded delimiter-separated SMILES batch.
1373
+ *
1374
+ * Each result retains its input index and original text. Invalid records are
1375
+ * returned inline with `status: "rejected"`; later records are still
1376
+ * processed in deterministic input order.
1377
+ * @param {string} smiles_batch
1378
+ * @param {string} delimiter
1379
+ * @returns {string}
1380
+ */
1381
+ export function canonicalize_smiles_batch_json(smiles_batch, delimiter) {
1382
+ let deferred4_0;
1383
+ let deferred4_1;
1384
+ try {
1385
+ const ptr0 = passStringToWasm0(smiles_batch, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1386
+ const len0 = WASM_VECTOR_LEN;
1387
+ const ptr1 = passStringToWasm0(delimiter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1388
+ const len1 = WASM_VECTOR_LEN;
1389
+ const ret = wasm.canonicalize_smiles_batch_json(ptr0, len0, ptr1, len1);
1390
+ var ptr3 = ret[0];
1391
+ var len3 = ret[1];
1392
+ if (ret[3]) {
1393
+ ptr3 = 0; len3 = 0;
1394
+ throw takeFromExternrefTable0(ret[2]);
1395
+ }
1396
+ deferred4_0 = ptr3;
1397
+ deferred4_1 = len3;
1398
+ return getStringFromWasm0(ptr3, len3);
1399
+ } finally {
1400
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
1401
+ }
1402
+ }
1403
+
1371
1404
  /**
1372
1405
  * Parse a CDXML document while preserving page and presentation objects.
1373
1406
  * The returned JSON contains an opaque `raw_xml` for each object so unknown
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Kentaro Tanabe (kent-tokyo) <kent-tokyo@users.noreply.github.com>"
6
6
  ],
7
7
  "description": "WebAssembly bindings for chematic — use chematic from JavaScript/TypeScript",
8
- "version": "1.0.7",
8
+ "version": "1.0.9",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",