@emasoft/svg-matrix 1.0.23 → 1.0.24
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/bin/svgm.js +2 -4
- package/package.json +1 -1
- package/src/index.js +2 -2
package/bin/svgm.js
CHANGED
|
@@ -266,15 +266,13 @@ async function optimizeSvg(content, options = {}) {
|
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
/**
|
|
269
|
-
* Minify XML output
|
|
270
|
-
* -
|
|
269
|
+
* Minify XML output while keeping it valid
|
|
270
|
+
* - KEEPS XML declaration (ensures valid SVG)
|
|
271
271
|
* - Remove whitespace between tags
|
|
272
272
|
* - Collapse multiple spaces
|
|
273
273
|
*/
|
|
274
274
|
function minifyXml(xml) {
|
|
275
275
|
return xml
|
|
276
|
-
// Remove XML declaration (SVGO removes it by default)
|
|
277
|
-
.replace(/<\?xml[^?]*\?>\s*/gi, '')
|
|
278
276
|
// Remove newlines and collapse whitespace between tags
|
|
279
277
|
.replace(/>\s+</g, '><')
|
|
280
278
|
// Remove leading/trailing whitespace
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* SVG path conversion, and 2D/3D affine transformations using Decimal.js.
|
|
6
6
|
*
|
|
7
7
|
* @module @emasoft/svg-matrix
|
|
8
|
-
* @version 1.0.
|
|
8
|
+
* @version 1.0.24
|
|
9
9
|
* @license MIT
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
@@ -86,7 +86,7 @@ Decimal.set({ precision: 80 });
|
|
|
86
86
|
* Library version
|
|
87
87
|
* @constant {string}
|
|
88
88
|
*/
|
|
89
|
-
export const VERSION = '1.0.
|
|
89
|
+
export const VERSION = '1.0.24';
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* Default precision for path output (decimal places)
|