@thi.ng/rdom-canvas 1.0.1 → 1.0.3

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**: 2025-01-04T21:07:38Z
3
+ - **Last updated**: 2025-01-14T12:23:33Z
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,12 @@ 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
+ ### [1.0.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom-canvas@1.0.2) (2025-01-14)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - use optional chaining & nullish coalescing ([c5a0a13](https://github.com/thi-ng/umbrella/commit/c5a0a13))
17
+
12
18
  ### [0.5.36](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom-canvas@0.5.36) (2023-11-09)
13
19
 
14
20
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -123,7 +123,7 @@ Browser ESM import:
123
123
 
124
124
  [JSDelivr documentation](https://www.jsdelivr.com/)
125
125
 
126
- Package sizes (brotli'd, pre-treeshake): ESM: 715 bytes
126
+ Package sizes (brotli'd, pre-treeshake): ESM: 689 bytes
127
127
 
128
128
  ## Dependencies
129
129
 
package/index.js CHANGED
@@ -35,12 +35,12 @@ class $Canvas extends Component {
35
35
  this.el = await this.inner.mount(parent, index);
36
36
  this.ctx = this.el.getContext("2d", this.attribs.ctx);
37
37
  this.resize(this.size.deref() || [1, 1]);
38
- this.attribs.onmount && this.attribs.onmount(this.el, this.ctx);
38
+ this.attribs.onmount?.(this.el, this.ctx);
39
39
  this.update(shapes);
40
40
  return this.el;
41
41
  }
42
42
  async unmount() {
43
- this.el && this.attribs.onunmount && this.attribs.onunmount(this.el);
43
+ this.el && this.attribs.onunmount?.(this.el);
44
44
  await this.inner.unmount();
45
45
  this.sizeSub.unsubscribe();
46
46
  this.inner = void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/rdom-canvas",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "@thi.ng/rdom component wrapper for @thi.ng/hiccup-canvas and declarative canvas drawing",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -41,12 +41,12 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@thi.ng/api": "^8.11.16",
44
- "@thi.ng/canvas": "^1.0.1",
45
- "@thi.ng/checks": "^3.6.18",
46
- "@thi.ng/hiccup-canvas": "^3.1.30",
47
- "@thi.ng/object-utils": "^1.1.9",
48
- "@thi.ng/rdom": "^1.7.18",
49
- "@thi.ng/rstream": "^9.2.3"
44
+ "@thi.ng/canvas": "^1.0.2",
45
+ "@thi.ng/checks": "^3.6.19",
46
+ "@thi.ng/hiccup-canvas": "^3.1.32",
47
+ "@thi.ng/object-utils": "^1.1.10",
48
+ "@thi.ng/rdom": "^1.7.20",
49
+ "@thi.ng/rstream": "^9.2.5"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@microsoft/api-extractor": "^7.48.1",
@@ -95,5 +95,5 @@
95
95
  "status": "alpha",
96
96
  "year": 2020
97
97
  },
98
- "gitHead": "56c1d57a96565bbcc8c06c73779a619bba0db368\n"
98
+ "gitHead": "d888087b36b086fd8c3e7dc98d35857266f78942\n"
99
99
  }