npm jdenticon 3.0.0
Version 3.0.0

latest releases: 3.2.0, 3.1.1, 3.1.0...
3 years ago

Breaking changes

  • The exported file for bundlers does no longer automatically render icons at startup. You need to call any of the update methods from your code to render icons. You can also choose to import "jdenticon/standalone" instead of "jdenticon" to keep the old behavior. If you are importing jdenticon.js or jdenticon.min.js you donät have to do anything.
  • The default padding of drawIcon is now 0.08 from the previous default 0. This was changed to remove code for backward compatibility, and to harmonize the API.
  • TypeScript: Jdenticon interfaces must be imported when using the Jdenticon module bundle. The interfaces are no longer declared in the global namespace. The UMD bundle (used when importing "jdenticon/standalone") still declares the interfaces in the global namespace.

Changes

  • New methods updateSvg() and updateCanvas(). These only contain references to the logics needed for each element type, providing better code optimization opportunities. They are now preferred over update() where the element type is known.
  • An ES bundle is now provided. Just import the "jdenticon" package and the bundler will choose the ES bundle when possible. This will improve code optimizations hopefully causing smaller builds.
  • configure() is a new method for providing a default style configuration. This plays nicer when imported as an ES module, than the old config property, which was made read-only by the ES import statement.
  • jdenticon.config is deprecated. Use the global jdenticon_config variable or jdenticon.configure() method instead.

Bug fixes

  • The typings of the update() method were incorrectly only accepting HTMLElement. An <svg> element (SVGSVGElement) is not an HTMLElement. Now Element is accepted.
  • update() incorrectly rendered SVG data in any element with a tag name containing svg, instead of being exactly svg.

Don't miss a new jdenticon release

NewReleases is sending notifications on new releases.