@emasoft/svg-matrix 1.3.0 → 1.3.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/bin/svgfonts.js +259 -5
- package/dist/svg-matrix.global.min.js +2 -2
- package/dist/svg-matrix.min.js +2 -2
- package/dist/svg-toolbox.global.min.js +39 -39
- package/dist/svg-toolbox.min.js +36 -36
- package/dist/svgm.min.js +26 -26
- package/dist/version.json +8 -8
- package/package.json +1 -1
- package/scripts/postinstall.js +10 -4
- package/scripts/version-sync.js +2 -2
- package/src/animation-references.js +2 -1
- package/src/flatten-pipeline.js +0 -3
- package/src/font-manager.js +935 -42
- package/src/index.js +2 -2
- package/src/matrix.js +3 -3
- package/src/mesh-gradient.js +43 -0
- package/src/pattern-resolver.js +3 -2
- package/src/svg-matrix-lib.js +4 -3
- package/src/svg-parser.js +0 -4
- package/src/svg-toolbox-lib.js +2 -2
- package/src/svg-validation-data.js +1 -1
- package/src/svgm-lib.js +2 -2
package/dist/version.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.3.
|
|
3
|
-
"buildTime": "2026-01-
|
|
2
|
+
"version": "1.3.1",
|
|
3
|
+
"buildTime": "2026-01-09T17:20:51.504Z",
|
|
4
4
|
"bundles": {
|
|
5
5
|
"esm": [
|
|
6
6
|
{
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"name": "svg-toolbox.min.js",
|
|
14
|
-
"size":
|
|
15
|
-
"gzipSize":
|
|
14
|
+
"size": 577130,
|
|
15
|
+
"gzipSize": 152266,
|
|
16
16
|
"description": "ESM bundle for bundlers/Node.js (includes decimal.js)"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"name": "svgm.min.js",
|
|
20
|
-
"size":
|
|
21
|
-
"gzipSize":
|
|
20
|
+
"size": 602513,
|
|
21
|
+
"gzipSize": 159440,
|
|
22
22
|
"description": "ESM bundle for bundlers/Node.js (includes decimal.js)"
|
|
23
23
|
}
|
|
24
24
|
],
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"name": "svg-toolbox.global.min.js",
|
|
34
|
-
"size":
|
|
35
|
-
"gzipSize":
|
|
34
|
+
"size": 577259,
|
|
35
|
+
"gzipSize": 151635,
|
|
36
36
|
"description": "IIFE bundle for browsers via <script> (includes decimal.js)"
|
|
37
37
|
},
|
|
38
38
|
{
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -93,6 +93,7 @@ function isCI() {
|
|
|
93
93
|
|
|
94
94
|
// Strip ANSI escape codes for accurate length calculation
|
|
95
95
|
function stripAnsi(s) {
|
|
96
|
+
// eslint-disable-next-line no-control-regex
|
|
96
97
|
return s.replace(/\x1b\[[0-9;]*m/g, "");
|
|
97
98
|
}
|
|
98
99
|
|
|
@@ -108,7 +109,12 @@ function getOutputStream() {
|
|
|
108
109
|
// This bypasses npm's stdout/stderr redirection
|
|
109
110
|
if (process.platform !== "win32" && existsSync("/dev/tty")) {
|
|
110
111
|
try {
|
|
111
|
-
|
|
112
|
+
// createWriteStream doesn't throw sync - it emits 'error' event async
|
|
113
|
+
// We must attach an error handler before returning to prevent crash
|
|
114
|
+
const stream = createWriteStream("/dev/tty");
|
|
115
|
+
// Silence errors and fall back to stderr on any stream error
|
|
116
|
+
stream.on("error", () => {});
|
|
117
|
+
return stream;
|
|
112
118
|
} catch {
|
|
113
119
|
// Fall back to stderr
|
|
114
120
|
}
|
|
@@ -165,10 +171,10 @@ ${c.cyan}${B.v}${c.reset}${R(` ${c.green}${B.dot} Transforms3D${c.reset} 3D af
|
|
|
165
171
|
${c.cyan}${B.v}${c.reset}${R("")}${c.cyan}${B.v}${c.reset}
|
|
166
172
|
${c.cyan}${B.v}${hr}${B.v}${c.reset}
|
|
167
173
|
${c.cyan}${B.v}${c.reset}${R("")}${c.cyan}${B.v}${c.reset}
|
|
168
|
-
${c.cyan}${B.v}${c.reset}${R(` ${c.yellow}
|
|
174
|
+
${c.cyan}${B.v}${c.reset}${R(` ${c.yellow}Features:${c.reset}`)}${c.cyan}${B.v}${c.reset}
|
|
169
175
|
${c.cyan}${B.v}${c.reset}${R(` ${c.green}${B.dot}${c.reset} Universal browser bundles (dist/svg-matrix.min.js, etc.)`)}${c.cyan}${B.v}${c.reset}
|
|
170
|
-
${c.cyan}${B.v}${c.reset}${R(` ${c.green}${B.dot}${c.reset}
|
|
171
|
-
${c.cyan}${B.v}${c.reset}${R(` ${c.green}${B.dot}${c.reset} 70+ SVG toolbox functions
|
|
176
|
+
${c.cyan}${B.v}${c.reset}${R(` ${c.green}${B.dot}${c.reset} Font embedding with subsetting, caching, WOFF2 compression`)}${c.cyan}${B.v}${c.reset}
|
|
177
|
+
${c.cyan}${B.v}${c.reset}${R(` ${c.green}${B.dot}${c.reset} 70+ SVG toolbox functions for path manipulation`)}${c.cyan}${B.v}${c.reset}
|
|
172
178
|
${c.cyan}${B.v}${c.reset}${R("")}${c.cyan}${B.v}${c.reset}
|
|
173
179
|
${c.cyan}${B.bl}${hr}${B.br}${c.reset}
|
|
174
180
|
|
package/scripts/version-sync.js
CHANGED
|
@@ -147,10 +147,10 @@ function updateIndexVersion(version) {
|
|
|
147
147
|
let content = readFileSync(filePath, "utf8");
|
|
148
148
|
const original = content;
|
|
149
149
|
|
|
150
|
-
// Update VERSION constant
|
|
150
|
+
// WHY: Update VERSION constant, using double quotes for consistency with updateLibVersion()
|
|
151
151
|
content = content.replace(
|
|
152
152
|
/export const VERSION = ['"][^'"]+['"]/,
|
|
153
|
-
`export const VERSION =
|
|
153
|
+
`export const VERSION = "${version}"`,
|
|
154
154
|
);
|
|
155
155
|
|
|
156
156
|
// Update @version in jsdoc
|
|
@@ -141,8 +141,9 @@ export function parseTimingIds(value) {
|
|
|
141
141
|
// Match patterns like "id.event" or "id.begin" or "id.end" with optional offset (+1s, -2s)
|
|
142
142
|
// Events: click, mousedown, mouseup, mouseover, mouseout, focusin, focusout, etc.
|
|
143
143
|
// Edge case: handle timing offsets like "id.begin+1s" or "id.end-2s"
|
|
144
|
+
// Edge case: handle repeat(n) syntax like "id.repeat(2)" for nth repeat event
|
|
144
145
|
const match = trimmed.match(
|
|
145
|
-
/^([a-zA-Z_][a-zA-Z0-9_-]*)\.(begin|end|click|mousedown|mouseup|mouseover|mouseout|mousemove|mouseenter|mouseleave|focusin|focusout|activate|repeat)(?:[+-]\d+(?:\.\d+)?[a-z]*)?/,
|
|
146
|
+
/^([a-zA-Z_][a-zA-Z0-9_-]*)\.(begin|end|click|mousedown|mouseup|mouseover|mouseout|mousemove|mouseenter|mouseleave|focusin|focusout|activate|repeat)(?:\(\d+\))?(?:[+-]\d+(?:\.\d+)?[a-z]*)?/,
|
|
146
147
|
);
|
|
147
148
|
if (match) {
|
|
148
149
|
ids.push(match[1]);
|
package/src/flatten-pipeline.js
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import Decimal from "decimal.js";
|
|
17
|
-
import { Matrix as _Matrix } from "./matrix.js";
|
|
18
17
|
import * as Transforms2D from "./transforms2d.js";
|
|
19
18
|
import * as SVGFlatten from "./svg-flatten.js";
|
|
20
19
|
import * as ClipPathResolver from "./clip-path-resolver.js";
|
|
@@ -22,7 +21,6 @@ import * as MaskResolver from "./mask-resolver.js";
|
|
|
22
21
|
import * as UseSymbolResolver from "./use-symbol-resolver.js";
|
|
23
22
|
import * as PatternResolver from "./pattern-resolver.js";
|
|
24
23
|
import * as MarkerResolver from "./marker-resolver.js";
|
|
25
|
-
import * as _MeshGradient from "./mesh-gradient.js";
|
|
26
24
|
import * as GeometryToPath from "./geometry-to-path.js";
|
|
27
25
|
import {
|
|
28
26
|
parseSVG,
|
|
@@ -32,7 +30,6 @@ import {
|
|
|
32
30
|
serializeSVG,
|
|
33
31
|
findElementsWithAttribute,
|
|
34
32
|
} from "./svg-parser.js";
|
|
35
|
-
import { Logger as _Logger } from "./logger.js";
|
|
36
33
|
import * as Verification from "./verification.js";
|
|
37
34
|
import { parseCSSIds } from "./animation-references.js";
|
|
38
35
|
import * as PolygonClip from "./polygon-clip.js";
|