qr-kit 2.1.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,42 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ---
9
9
 
10
+ [2.2.0] - 2025-02-21
11
+ Added
12
+ functionMask in QR model: now every QR code generated by makeQr includes a flat Uint8Array functionMask indicating functional modules (finder, timing, alignment, format/version). This enables advanced styling and custom renderers.
13
+
14
+ isFunctionModule helper: check whether a given module is functional (model.functionMask[y * model.size + x] === 1).
15
+
16
+ Branded rendering: makeQrSvgString now accepts an optional fnColor parameter to style functional modules separately from data modules. The new makeQrPathSplit function splits the SVG path into data and function parts.
17
+
18
+ Playground: added a live demo with Basic, Rounded and Branded modes, Link Builder, PDF export, and download options (SVG, PNG, JPEG).
19
+
20
+ Fixed
21
+ Critical module placement bug: corrected placeFunctionPatterns and setReserve to properly reserve separators, format areas, and version information. Previously, data could be written into reserved areas, making QR codes unreadable. Now all QR codes are fully compliant and scan reliably.
22
+
23
+ Golden tests: updated snapshots to reflect the correct output; all 109 tests pass.
24
+
25
+ TypeScript declarations: added missing @types/react dependency to CI to fix namespace errors during type checking.
26
+
27
+ Changed
28
+ Internal performance: optimised mask application and penalty score calculation; refactored helpers to work efficiently with flat Uint8Array.
29
+
30
+ Documentation: updated README with examples for branded rendering and clarified API usage.
31
+
32
+ Deprecated
33
+ Nothing deprecated in this release.
34
+
35
+ Removed
36
+ Nothing removed.
37
+
38
+ Security
39
+ No security changes.
40
+
41
+ ⚠️ Experimental Feature
42
+ Logo overlay (utils/logo.js) is still under development and may not produce reliably scannable QR codes. It is not recommended for production use until further notice. The API may change in future releases.
43
+
44
+ ---
45
+
10
46
  ## [2.1.0] — Logo overlay, Web Worker, AbortSignal
11
47
 
12
48
  ### Added