Seth Falco
747cc722d9
chore: revamp how we export types ( #2118 )
2025-05-04 17:39:44 +01:00
Seth Falco
49954bc0d9
chores: various clean ups regardin ESM and TypeScript ( #2117 )
2025-05-03 09:42:29 +01:00
Seth Falco
a8a53dbd90
chore: apply more eslint rules ( #2116 )
2025-05-02 10:00:37 +01:00
Seth Falco
8c593fab06
chore: bulk update all jsdoc and jsdoctypes ( #2114 )
2025-05-01 22:16:52 +01:00
Seth Falco
df87725b19
chore: improve jsdoc types and match most files ( #2108 )
2025-04-29 10:35:11 +01:00
Seth Falco
e065d1000e
deps: upgrade pixelmatch for performance improvements ( #2102 )
2025-04-11 16:22:50 +01:00
Seth Falco
e9c3be7a27
test: use latest version of svgo-test-suite ( #2100 )
2025-04-11 13:12:32 +01:00
Nathan Baulch
0eccff2794
chore: fix various typos across the project
2025-03-22 11:49:01 +00:00
Seth Falco
f3495ff6c9
fix(removeEmptyContainers): skip if filter is applied via styles as well ( #2089 )
...
Fixes a bug where we were too eager to remove empty containers.
We already had logic to skip removing empty containers if it had the
filter attribute, which is needed to apply a filter to the whole area.
However, the filter can also be defined through CSS. We did not
properly handle this case, and treated the node as if it had no filter
at all.
This computes the styles and checks the stylesheet as well. (We also
move the logic down to avoid computing the styles eagerly.)
2024-12-22 16:01:22 +00:00
Seth Falco
97d7d00add
add: centralize exports to svgo ( #2071 )
2024-09-07 19:26:05 +01:00
Seth Falco
5481fc2477
fix: don't insert 0 at start or end of attribute if whitespace ( #2036 )
2024-06-14 12:48:56 +01:00
Antonio Salvati
e73d13a1a5
fix: convertColors plugin ignore currentColor in 'mask' elements ( #2032 )
2024-06-14 10:43:30 +01:00
Seth Falco
0c13740fdd
feat: expose builtin plugins ( #2027 )
2024-06-09 12:28:37 +01:00
Seth Falco
1e23f66e76
chore: rename removescriptelement to removescripts ( #2021 )
2024-06-07 09:58:21 +01:00
Seth Falco
78403d3dc9
feat: export version constant ( #2016 )
2024-05-27 20:28:13 +01:00
Kendell R
a761a01038
fix(convertColors): accept commaless rgb ( #2015 )
2024-05-26 22:08:37 +01:00
XhmikosR
4daaa4251f
chore: update ESLint to v9 and switch to flat config ( #2001 )
2024-05-26 13:22:23 +01:00
XhmikosR
83bfee4768
chore(tests): switch to native fetch ( #2003 )
2024-05-26 00:11:00 +01:00
Seth Falco
ceb2178935
test: expand and optimize regression testing ( #1918 )
2024-05-25 23:44:26 +01:00
Seth Falco
c86536ed70
chore: disable removeTitle from default plugins ( #2014 )
2024-05-24 21:14:48 +01:00
XhmikosR
506c08aa98
chore: remove del devDependency ( #1986 )
2024-05-09 10:20:36 +01:00
Viktor Szépe
559b9ad068
chore: resolve typos
2024-05-09 10:09:31 +01:00
nuintun
3964d64c65
fix: v3.3.0 Common JS missing loadConfig and optimize exports ( #1984 )
2024-05-09 00:15:06 +01:00
刘巍峰
89b0c6c435
fix(cleanupIds): handle no-uri-encoded references ( #1982 )
2024-04-25 09:01:53 +01:00
Seth Falco
8d6385bd9a
fix(convertPathData): preserve vertex for markers only path ( #1967 )
2024-03-02 01:24:43 +00:00
Seth Falco
53aad59dc9
feat(addClassesToSVGElement): allow function as param ( #1966 )
...
Updates the interface for addClassesToSVGElement to match prefixIds,
where we'll accept Array<string|function> instead of just a string.
2024-03-01 00:50:30 +00:00
johnkenny54
f49b6a717d
fix: transformToMatrix() returns incorrect result for scale(n,0) ( #1965 )
2024-02-27 22:48:19 +00:00
johnkenny54
a8d2df6660
fix: mergePaths should not merge paths with styles that depend on bounding box ( #1964 )
2024-02-25 23:05:32 +00:00
johnkenny54
e2575988cc
fix: <a> element not parsed as text ( #1959 )
2024-02-11 22:14:25 +00:00
johnkenny54
a938d5e1f3
fix(collapseGroups): check for filter in style as well as attribute ( #1952 )
2024-02-07 21:40:46 +00:00
johnkenny54
4884d59133
fix: revamp matrixToTransform
2024-02-05 21:47:31 +00:00
johnkenny54
f7436c726e
fix: removeHiddenElems - treat <path> with opacity:0 as non-rendering node. ( #1948 )
2024-01-29 22:19:44 +00:00
john-neptune
10e5e5ef39
fix(prefixIds): sameline comments ( #1942 )
2024-01-23 15:28:10 +00:00
Seth Falco
d7a851ff95
chore: rename test files to .svg.txt ( #1937 )
2024-01-17 22:27:16 +00:00
Jon Dufresne
59796a829b
feat(removeDeprecatedAttrs): new removeDeprecatedAttrs plugin ( #1869 )
2024-01-15 21:48:14 +00:00
johnkenny54
8afb370ea0
fix: moveElemsAttrsToGroups should not move transform if group has filter attribute ( #1933 )
2024-01-15 16:18:11 +00:00
johnkenny54
3e9ad5e81d
fix: collapseGroups does not move attributes atomically ( #1930 )
2024-01-07 17:08:54 +00:00
JayLeininger
6747e3a047
feat(convertcolors): add param to convert colors to common case ( #1692 )
2024-01-07 16:28:24 +00:00
Seth Falco
9334b08ba2
test: update tests with wrong extension ( #1929 )
2024-01-06 15:05:11 +00:00
johnkenny54
4da8b38fee
fix(removeHiddenElems): dont remove node if children have referenced id ( #1925 )
2024-01-06 14:55:24 +00:00
Kendell R
6afc7bdb52
fix(convertPathData): fix q control point behavior when item is removed ( #1927 )
2024-01-06 14:07:25 +00:00
johnkenny54
9e017692bc
chore: use .svg.txt extension on plugin test files ( #1917 )
2024-01-04 20:58:41 +00:00
johnkenny54
51c59f5ad2
fix(removeUselessDefs): dont remove node if children has id ( #1923 )
2024-01-03 20:31:42 +00:00
Jon Dufresne
2442f74239
chore: convert project to us ECMAScript modules (preserving CJS compatibility) ( #1905 )
2024-01-03 16:17:37 +00:00
Kendell R
8644cf36e8
feat(convertPathData): convert c to q ( #1892 )
2024-01-01 20:47:21 +00:00
Seth Falco
2661dacc24
fix(convertTransform): fix scale and rotate on skew + refactors ( #1916 )
2023-12-31 00:59:18 +00:00
Jon Dufresne
f6a2ca20d6
chore: improve jest tests with more precise assertions ( #1912 )
2023-12-28 19:14:47 +00:00
Jon Dufresne
db05c5782a
chore: Use idiomatic Jest patterns to assert exceptions ( #1909 )
2023-12-28 19:06:05 +00:00
Kendell R
f238d6a213
feat(convertPathData): allow converting q to t in more cases ( #1889 )
2023-12-27 23:41:09 +00:00
Seth Falco
c2cacc7060
chore: move health files to .github ( #1906 )
2023-12-27 12:54:30 +00:00