@thi.ng/hiccup-canvas 2.4.14 → 2.5.1

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**: 2023-12-18T13:41:20Z
3
+ - **Last updated**: 2023-12-19T11:01:47Z
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/README.md CHANGED
@@ -96,7 +96,7 @@ For Node.js REPL:
96
96
  const hiccupCanvas = await import("@thi.ng/hiccup-canvas");
97
97
  ```
98
98
 
99
- Package sizes (brotli'd, pre-treeshake): ESM: 2.52 KB
99
+ Package sizes (brotli'd, pre-treeshake): ESM: 2.53 KB
100
100
 
101
101
  ## Dependencies
102
102
 
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.14",
3
+ "version": "2.5.1",
4
4
  "description": "Hiccup shape tree renderer for vanilla Canvas 2D contexts",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,18 +35,17 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
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"
38
+ "@thi.ng/api": "^8.9.14",
39
+ "@thi.ng/checks": "^3.4.14",
40
+ "@thi.ng/color": "^5.6.7",
41
+ "@thi.ng/math": "^5.7.9",
42
+ "@thi.ng/pixel": "^6.0.0",
43
+ "@thi.ng/vectors": "^7.8.12"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@microsoft/api-extractor": "^7.38.3",
47
47
  "esbuild": "^0.19.8",
48
48
  "rimraf": "^5.0.5",
49
- "tools": "^0.0.1",
50
49
  "typedoc": "^0.25.4",
51
50
  "typescript": "^5.3.2"
52
51
  },
@@ -131,5 +130,5 @@
131
130
  ],
132
131
  "year": 2018
133
132
  },
134
- "gitHead": "25a42a81fac8603a1e440a7aa8bc343276211ff4\n"
133
+ "gitHead": "0d9265be7be13eccf0ef75eaedbfd42626339279\n"
135
134
  }