@thi.ng/hiccup-svg 5.2.10 → 5.2.12

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**: 2024-02-10T08:59:56Z
3
+ - **Last updated**: 2024-02-16T20:01:44Z
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
+ ### [5.2.11](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@5.2.11) (2024-02-16)
13
+
14
+ #### 🩹 Bug fixes
15
+
16
+ - update scale attrib ([7e797d1](https://github.com/thi-ng/umbrella/commit/7e797d1))
17
+ handling (if zero)
18
+ - update path() attrib overrides ([7b25d0d](https://github.com/thi-ng/umbrella/commit/7b25d0d))
19
+
12
20
  ## [5.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@5.2.0) (2023-12-26)
13
21
 
14
22
  #### 🚀 Features
package/README.md CHANGED
@@ -180,7 +180,7 @@ For Node.js REPL:
180
180
  const hiccupSvg = await import("@thi.ng/hiccup-svg");
181
181
  ```
182
182
 
183
- Package sizes (brotli'd, pre-treeshake): ESM: 2.45 KB
183
+ Package sizes (brotli'd, pre-treeshake): ESM: 2.46 KB
184
184
 
185
185
  ## Dependencies
186
186
 
package/format.js CHANGED
@@ -30,7 +30,7 @@ const fattribs = (attribs, ...numericIDs) => {
30
30
  };
31
31
  const ftransforms = (attribs) => {
32
32
  let v;
33
- if ((v = attribs.transform) || attribs.translate || attribs.scale || attribs.rotate) {
33
+ if ((v = attribs.transform) || attribs.translate || attribs.scale != null || attribs.rotate) {
34
34
  if (v) {
35
35
  attribs.transform = !isString(v) ? `matrix(${[...v].map(ff).join(" ")})` : v;
36
36
  delete attribs.translate;
@@ -53,7 +53,7 @@ const buildTransform = (attribs) => {
53
53
  tx.push(isString(v) ? v : `rotate(${ff(v * 180 / Math.PI)})`);
54
54
  delete attribs.rotate;
55
55
  }
56
- if (v = attribs.scale) {
56
+ if ((v = attribs.scale) != null) {
57
57
  tx.push(
58
58
  isString(v) ? v : isArrayLike(v) ? `scale(${ff(v[0])} ${ff(v[1])})` : `scale(${ff(v)})`
59
59
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/hiccup-svg",
3
- "version": "5.2.10",
3
+ "version": "5.2.12",
4
4
  "description": "SVG element functions for @thi.ng/hiccup & related tooling",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@thi.ng/checks": "^3.4.23",
39
- "@thi.ng/color": "^5.6.18",
39
+ "@thi.ng/color": "^5.6.20",
40
40
  "@thi.ng/prefixes": "^2.3.8"
41
41
  },
42
42
  "devDependencies": {
@@ -135,5 +135,5 @@
135
135
  "parent": "@thi.ng/hiccup",
136
136
  "year": 2016
137
137
  },
138
- "gitHead": "e5e7d5c6ed2eadee7a91d59cbd0c86ce880ab1c5\n"
138
+ "gitHead": "ea2ec2e4f14c572bbfac00c43953a6c4033da09e\n"
139
139
  }
package/path.js CHANGED
@@ -38,7 +38,7 @@ const path = (segments, attribs, ...body) => {
38
38
  res.push(fpoints(seg.slice(1), ","));
39
39
  }
40
40
  }
41
- return ["path", fattribs({ ...attribs, d: res.join("") }), ...body];
41
+ return ["path", fattribs({ d: res.join(""), ...attribs }), ...body];
42
42
  };
43
43
  export {
44
44
  path