Changelog
Version 0.0.5 Latest
Patch Changes
-
15fe5c3: Reduce the default center image
sizefrom0.4to0.3of the matrix width. Passsize: 0.4in the center image layout to keep the previous size. -
2fd183e: Replace the nested-array matrix with an immutable
QRCodeMatrixobject containingsize, flat row-majormodules, androles. Custom renderers must read a module atmodules[y * size + x]. UseQR_CODE_MODULE_ROLESto distinguish data, finder, alignment, timing, and information modules.Replace string-based module and finder shapes with reusable
rounded(),diagonal(),circle(),finder(),alignment(), andcustomShape()factories from@qrcodesdk/core/style. Finder options now useringinstead ofouter. Add independent alignment styling and custom relative SVG paths. Remove the public@qrcodesdk/core/drawingentry point and drawing protocol; custom renderers consume the matrix directly.Create SVG center images with
svgCenterImage(source, layout)and pass the result ascenterImage, replacing inline source and layout objects. ReplaceQRCodeSVGCenterImageOptionswithQRCodeSVGCenterImageand useQRCodeCenterImageLayoutfor shared layout options.Speed up matrix encoding, error correction, masking, and scoring. Reduce repeated shape preparation and drawing allocations, group output by color, and compact SVG paths. Keep the matrix entry point independent of styling code so unused styling stays out of consumer bundles.
Rely on the declared TypeScript types for option object shapes and payload helper input types. Unknown option keys and incorrectly typed values no longer consistently produce
QRCodeError; numeric bounds, colors, image sources, and custom paths still receive runtime validation. -
21107ab: Add bundled lossless WebP, single-frame GIF, and baseline JPEG encoders for the
@qrcodesdk/browserand@qrcodesdk/nodeimage renderers. The encoders run without platform image APIs, so output is identical in every browser and in Node.
Support QRCodeSDK
If you find QRCodeSDK useful, please consider sponsoring the project!