johnkenny54
26e86e5d72
fix: remove unused <use> elements when deleting empty symbols ( #2051 )
2025-12-04 00:17:18 +00:00
Seth Falco
bc49deb211
fix(removeUnknownsAndDefaults): skip if attr used in css selector ( #2144 )
2025-06-21 18:53:31 +01:00
Seth Falco
feb9b5e069
fix(convertColors): use currentColor instead of currentcolor ( #2137 )
2025-05-22 01:21:30 +01:00
Seth Falco
747cc722d9
chore: revamp how we export types ( #2118 )
2025-05-04 17:39:44 +01:00
Seth Falco
df87725b19
chore: improve jsdoc types and match most files ( #2108 )
2025-04-29 10:35:11 +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
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
1e23f66e76
chore: rename removescriptelement to removescripts ( #2021 )
2024-06-07 09:58:21 +01:00
Kendell R
a761a01038
fix(convertColors): accept commaless rgb ( #2015 )
2024-05-26 22:08:37 +01:00
Viktor Szépe
559b9ad068
chore: resolve typos
2024-05-09 10:09:31 +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
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
Kendell R
f238d6a213
feat(convertPathData): allow converting q to t in more cases ( #1889 )
2023-12-27 23:41:09 +00:00
Kendell R
562152a729
feat(convertPathData): use the sagitta of arcs to round and convert to lines when applicable ( #1873 )
2023-12-27 12:53:01 +00:00
Kendell R
a7859eb177
fix(convertPathData): fix some weird behavior ( #1867 )
2023-12-24 01:47:29 +00:00
Seth Falco
22533f1ffe
chore: update prettier and eslint ( #1885 )
2023-12-15 13:10:21 +00:00
Seth Falco
c172c9e6d6
fix(cleanupIds): handle uri encoded references ( #1880 )
2023-12-10 00:31:55 +00:00
john-neptune
6a814cd2e7
fix(prefixIds): update all nodes in style tags ( #1736 )
2023-12-09 23:04:45 +00:00
Kendell R
2d9e101ded
fix(removeHiddenElems): handle defs better ( #1879 )
2023-12-09 22:25:30 +00:00
Seth Falco
8390add9ab
feat(removeUnknownAndDefaults): apply to xml declarations ( #1872 )
2023-12-07 11:56:14 +00:00
Seth Falco
a663d8d683
fix(cleanupEnableBackground): clean up inline styles too ( #1866 )
2023-12-02 12:26:21 +00:00
Seth Falco
39e855be9e
fix(inlineStyles): refactor how styles are collected ( #1865 )
2023-12-01 16:45:09 +00:00
Kendell R
51449360f5
fix(cleanupIds): properly handle begin regex to fix #1775 ( #1862 )
2023-11-30 14:38:27 +00:00
Vincent Bernat
f0ec586991
fix(removeEmptyContainers): don't remove empty containers if parent is switch ( #1747 )
2023-11-29 01:03:49 +00:00
Kendell R
8dd7a3b2fc
fix(convertPathData): handle setting prev properly to fix path joining and #1855 ( #1856 )
2023-11-29 00:39:08 +00:00
Kendell R
86d5040382
fix(convertPathData): account for error in z conversions ( #1842 )
2023-11-28 02:01:20 +00:00
Seth Falco
e22d533be8
fix(removeHiddenElems): remove hidden definitions usage ( #1852 )
2023-11-26 20:55:35 +00:00