@jscad/svg-serializer 2.3.12 → 2.3.14

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
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.3.14](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/svg-serializer@2.3.13...@jscad/svg-serializer@2.3.14) (2024-02-18)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **svg-serializer:** fix conversion of alpha colors to SVG RGBA opacity ([4c1f372](https://github.com/jscad/OpenJSCAD.org/commit/4c1f37271764649e192300c66d263a1fee52303c))
12
+
13
+
14
+
15
+
16
+
17
+ ## [2.3.13](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/svg-serializer@2.3.12...@jscad/svg-serializer@2.3.13) (2023-06-27)
18
+
19
+ **Note:** Version bump only for package @jscad/svg-serializer
20
+
21
+
22
+
23
+
24
+
6
25
  ## [2.3.12](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/svg-serializer@2.3.11...@jscad/svg-serializer@2.3.12) (2023-04-30)
7
26
 
8
27
  **Note:** Version bump only for package @jscad/svg-serializer
package/index.js CHANGED
@@ -203,7 +203,7 @@ const convertPath = (path, offsets, options) => {
203
203
  return str
204
204
  }
205
205
 
206
- const convertColor = (color) => `rgb(${color[0] * 255},${color[1] * 255},${color[2] * 255},${color[3] * 255})`
206
+ const convertColor = (color) => `rgba(${color[0] * 255},${color[1] * 255},${color[2] * 255},${color[3]})`
207
207
 
208
208
  module.exports = {
209
209
  serialize,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jscad/svg-serializer",
3
- "version": "2.3.12",
3
+ "version": "2.3.14",
4
4
  "description": "SVG Serializer for JSCAD",
5
5
  "homepage": "https://openjscad.xyz/",
6
6
  "repository": "https://github.com/jscad/OpenJSCAD.org",
@@ -32,12 +32,12 @@
32
32
  ],
33
33
  "license": "MIT",
34
34
  "dependencies": {
35
- "@jscad/modeling": "2.11.1",
35
+ "@jscad/modeling": "2.12.1",
36
36
  "onml": "1.3.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "ava": "3.15.0",
40
40
  "nyc": "15.1.0"
41
41
  },
42
- "gitHead": "4313974b50957018d2edd010e3a251f59bea46a4"
42
+ "gitHead": "e07bb27d61f638348c73cc1383dfb5339060a02a"
43
43
  }
@@ -99,7 +99,7 @@ const expected4 = `<?xml version="1.0" encoding="UTF-8"?>
99
99
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
100
100
  <svg width="10mm" height="20mm" viewBox="0 0 10 20" fill="none" fill-rule="evenodd" stroke-width="0.1px" version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
101
101
  <g>
102
- <path fill="rgb(127.5,127.5,127.5,127.5)" d="M0 20L10 20L10 0L0 0L0 20" id="r2" class="gray-rect"/>
102
+ <path fill="rgba(127.5,127.5,127.5,0.5)" d="M0 20L10 20L10 0L0 0L0 20" id="r2" class="gray-rect"/>
103
103
  </g>
104
104
  </svg>
105
105
  `
@@ -109,7 +109,7 @@ const expected5 = `<?xml version="1.0" encoding="UTF-8"?>
109
109
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
110
110
  <svg width="150mm" height="150mm" viewBox="0 0 150 150" fill="none" fill-rule="evenodd" stroke-width="0.1px" version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
111
111
  <g>
112
- <path fill="rgb(127.5,127.5,127.5,127.5)" d="M0 150L150 150L150 0L115 0L115 75L35 75L35 0L0 0L0 150M90 115L83 115L83 100L67 100L67 115L60 115L60 85L90 85L90 115M73 94L77 94L77 90L73 90L73 94"/>
112
+ <path fill="rgba(127.5,127.5,127.5,0.5)" d="M0 150L150 150L150 0L115 0L115 75L35 75L35 0L0 0L0 150M90 115L83 115L83 100L67 100L67 115L60 115L60 85L90 85L90 115M73 94L77 94L77 90L73 90L73 94"/>
113
113
  </g>
114
114
  </svg>
115
115
  `
@@ -61,7 +61,7 @@ const expected4 = `<?xml version="1.0" encoding="UTF-8"?>
61
61
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
62
62
  <svg width="4mm" height="3mm" viewBox="0 0 4 3" fill="none" fill-rule="evenodd" stroke-width="0.1px" version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
63
63
  <g>
64
- <path d="M3 3L4 2L0 0" stroke="rgb(127.5,127.5,127.5,127.5)" id="l1" class="gray-line"/>
64
+ <path d="M3 3L4 2L0 0" stroke="rgba(127.5,127.5,127.5,0.5)" id="l1" class="gray-line"/>
65
65
  </g>
66
66
  </svg>
67
67
  `