@thi.ng/hiccup-canvas 2.4.13 → 2.5.0

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 (3) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/draw.js +9 -1
  3. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2023-12-11T10:07:09Z
3
+ - **Last updated**: 2023-12-18T22:05:31Z
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,13 @@ 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
+ ## [2.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-canvas@2.5.0) (2023-12-18)
13
+
14
+ #### 🚀 Features
15
+
16
+ - fix [#433](https://github.com/thi-ng/umbrella/issues/433), support rounded rects via `r` attrib ([573245e](https://github.com/thi-ng/umbrella/commit/573245e))
17
+ - update draw() to update rect handling
18
+
12
19
  ### [2.4.6](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-canvas@2.4.6) (2023-11-09)
13
20
 
14
21
  #### ♻️ Refactoring
package/draw.js CHANGED
@@ -87,7 +87,15 @@ const draw = (ctx, shape, pstate = { attribs: {}, edits: [] }) => {
87
87
  path(ctx, attribs, shape[2]);
88
88
  break;
89
89
  case "rect":
90
- rect(ctx, attribs, shape[2], shape[3], shape[4], shape[5]);
90
+ rect(
91
+ ctx,
92
+ attribs,
93
+ shape[2],
94
+ shape[3],
95
+ shape[4],
96
+ // support rounded rects via `r` attrib
97
+ shape[5] ?? origAttribs.r
98
+ );
91
99
  break;
92
100
  case "circle":
93
101
  circularArc(ctx, attribs, shape[2], shape[3]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/hiccup-canvas",
3
- "version": "2.4.13",
3
+ "version": "2.5.0",
4
4
  "description": "Hiccup shape tree renderer for vanilla Canvas 2D contexts",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,12 +35,12 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.9.12",
39
- "@thi.ng/checks": "^3.4.12",
40
- "@thi.ng/color": "^5.6.5",
41
- "@thi.ng/math": "^5.7.7",
42
- "@thi.ng/pixel": "^5.0.5",
43
- "@thi.ng/vectors": "^7.8.10"
38
+ "@thi.ng/api": "^8.9.13",
39
+ "@thi.ng/checks": "^3.4.13",
40
+ "@thi.ng/color": "^5.6.6",
41
+ "@thi.ng/math": "^5.7.8",
42
+ "@thi.ng/pixel": "^5.0.6",
43
+ "@thi.ng/vectors": "^7.8.11"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@microsoft/api-extractor": "^7.38.3",
@@ -72,7 +72,7 @@
72
72
  "access": "public"
73
73
  },
74
74
  "engines": {
75
- "node": ">=12.7"
75
+ "node": ">=18"
76
76
  },
77
77
  "files": [
78
78
  "./*.js",
@@ -131,5 +131,5 @@
131
131
  ],
132
132
  "year": 2018
133
133
  },
134
- "gitHead": "22e36fa838e5431d40165384918b395603bbd92f\n"
134
+ "gitHead": "d1c8bca89fa5c57ca0c690933edb03129b085687\n"
135
135
  }