@thi.ng/wasm-api 0.17.0 → 0.17.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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-10-29T20:34:04Z
3
+ - **Last updated**: 2022-10-30T13:56:23Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,14 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [0.17.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.17.1) (2022-10-30)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update zig codegen to ignore uppercase enum config ([3258f91](https://github.com/thi-ng/umbrella/commit/3258f91))
17
+ - idiomatic zig enums are lowercase
18
+ - update config docs
19
+
12
20
  ## [0.17.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.17.0) (2022-10-29)
13
21
 
14
22
  #### 🚀 Features
package/README.md CHANGED
@@ -665,7 +665,7 @@ node --experimental-repl-await
665
665
  > const wasmApi = await import("@thi.ng/wasm-api");
666
666
  ```
667
667
 
668
- Package sizes (gzipped, pre-treeshake): ESM: 6.84 KB
668
+ Package sizes (gzipped, pre-treeshake): ESM: 7.06 KB
669
669
 
670
670
  **IMPORTANT:** The package includes code generators for various languages which
671
671
  are **not** required for just using the API bridge. Hence, the usual package
@@ -695,9 +695,10 @@ directory are using this package.
695
695
 
696
696
  A selection:
697
697
 
698
- | Screenshot | Description | Live demo | Source |
699
- |:------------------------------------------------------------------------------------------------------------------|:--------------------------------------------|:-------------------------------------------------|:------------------------------------------------------------------------------|
700
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/zig-canvas.png" width="240"/> | Zig-based DOM creation & canvas drawing app | [Demo](https://demo.thi.ng/umbrella/zig-canvas/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/zig-canvas) |
698
+ | Screenshot | Description | Live demo | Source |
699
+ |:-------------------------------------------------------------------------------------------------------------------|:--------------------------------------------|:--------------------------------------------------|:-------------------------------------------------------------------------------|
700
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/zig-canvas.png" width="240"/> | Zig-based DOM creation & canvas drawing app | [Demo](https://demo.thi.ng/umbrella/zig-canvas/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/zig-canvas) |
701
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/zig-counter.png" width="240"/> | Simple Zig/WASM click counter DOM component | [Demo](https://demo.thi.ng/umbrella/zig-counter/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/zig-counter) |
701
702
 
702
703
  ## API
703
704
 
package/codegen/zig.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { isNumber } from "@thi.ng/checks";
2
2
  import { isString } from "@thi.ng/checks/is-string";
3
3
  import { unsupported } from "@thi.ng/errors/unsupported";
4
- import { defaultValue, ensureLines, enumName, isPadding, isStringSlice, isWasmString, prefixLines, withIndentation, } from "./utils.js";
4
+ import { defaultValue, ensureLines, isPadding, isStringSlice, isWasmString, prefixLines, withIndentation, } from "./utils.js";
5
5
  /**
6
6
  * Zig code generator. Call with options and then pass to {@link generateTypes}
7
7
  * (see its docs for further usage).
@@ -28,12 +28,12 @@ export const ZIG = (opts = {}) => {
28
28
  let line;
29
29
  if (!isString(v)) {
30
30
  v.doc && gen.doc(v.doc, lines, opts);
31
- line = enumName(opts, v.name);
31
+ line = v.name;
32
32
  if (v.value != null)
33
33
  line += ` = ${v.value}`;
34
34
  }
35
35
  else {
36
- line = enumName(opts, v);
36
+ line = v;
37
37
  }
38
38
  lines.push(line + ",");
39
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/wasm-api",
3
- "version": "0.17.0",
3
+ "version": "0.17.2",
4
4
  "description": "Generic, modular, extensible API bridge, polyglot glue code and bindings code generators for hybrid JS & WebAssembly projects",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -141,5 +141,5 @@
141
141
  "status": "alpha",
142
142
  "year": 2022
143
143
  },
144
- "gitHead": "0402675247b1c312e4dd3d9bc6c01af5cc837c5d\n"
144
+ "gitHead": "ce7be1988e43f620b90a751f056d1a2326306ee4\n"
145
145
  }