Compare
Sorry, something went wrong.
No results found
feat: TRUE SVG flattening - resolve all transform dependencies
The flatten command now performs comprehensive flattening:
- Bakes transform attributes into path coordinates
- Applies clipPath boolean operations (polygon intersection)
- Converts masks to clipped geometry
- Expands use/symbol references inline
- Instantiates markers as path geometry
- Expands pattern fills to tiled geometry
- Bakes gradientTransform into gradient coordinates
New modules:
- src/svg-parser.js: Lightweight DOM-like SVG parser for Node.js
- src/flatten-pipeline.js: Orchestrates all resolvers in correct order
New CLI flags for flatten command:
- --transform-only: Legacy mode (only transforms, no resolvers)
- --no-clip-paths: Skip clipPath boolean operations
- --no-masks: Skip mask to clip conversion
- --no-use: Skip use/symbol expansion
- --no-markers: Skip marker instantiation
- --no-patterns: Skip pattern expansion
- --no-gradients: Skip gradient transform baking
A truly flattened SVG has NO transform dependencies remaining.