- Updates
svgo
dependency to 2.8.0
- Updates
nth-check
dependency to 2.0.1
- Changes the
stretchMetadata
option toextractMetadata
. - Extends the
extractMetadata
function to support placeholder text elements.
generateLayout({format:true})
now returns a second argument, which is a layout object that can be sent to generateImage to generate a final image. Normally users would generate this object withgenerateLayout({format:false})
but nowgenerateLayout({format:true})
will provide both the data layout (as first arg) and the image layout (as the second arg).- Added new function
generateOptimizedImage
which, compared togenerateImage
, expects an options argument as the second option and returns a paletted PNG. Currently this options argument accepts aquality
property to control the quantization level of the resulting PNG.
- Optimized layout and image generation: 1.5x faster
generateLayout
- Adds
stretchMetadata
option (defaults to true) togenerateLayout
andgenerateLayoutUnique
#75 - Removes xtend as a direct dependency
- Add methods to parse and validate metadata for stretchable icons from SVGs:
extractMetadata
andvalidateMetadata
- Drop support for Node < 10
- Updates Mapnik dependency to 4.4.0
- Check if SVG has width/height attributes before encoding as image in
generateLayout
#69
- Check if SVG width/height are greater than zero before encoding as image in
generateLayout
#62
- Updates to Mapnik dependency to 4.0.0
- Updates Mapnik dependency to 3.7.0
- Drops support for windows
- Added removeOversizedIcons boolean to the options args - if set to true, will filter out oversized icons from the response
⚠️ changegenerateLayout
andgenerateLayoutUnique
to accept options arguments and add functionality to pass optional max_size argument
- Updates Mapnik dependency to 3.6.0
- Bump ShelfPack dependency to 3.0.0
⚠️ spritezero now a scoped package under @mapbox namespace (#40)
- Update to mapnik 3.5.14 (#26)
- Pin mapnik dependency at version 3.5.13 (#33)
- Bump ShelfPack dependency to 2.0.0
- ShelfPack now trims sprite to minimum dimensions after a batch pack
- Make sure heightAscThanNameComparator is transitive (#29)
- Perf improvement, replace sort-by with custom comparator (#27)
- Add
generateLayoutUnique
function - map identical images to multiple names (#25)
- Use ShelfPack binpacker (#22)
- Sort icons array to produce a more deterministic sprite sheet (#24)
- Updated to mapnik 3.5.0
- Add missing var (#20)
- Remove
bin
inpackage.json
⚠️ Remove cli, point to spritezero-cli (#19)
- Add executeable and documentation
- Update dependencies
- Update fixtures and tests
- Update dependencies
⚠️ Changes thegenerateLayout
function to be asynchronous (#14)
- No longer throws an error if
generateImage()
is supplied with empty list (#13)
⚠️ In the second major version, spritezero makes a big pivot: instead of positioning and compositing raster sprites, it receives and composites vector sprites composed of SVG data.