qr-kit 2.2.1 → 2.2.3

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,28 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ---
9
9
 
10
+ ## [2.2.3] - 2025-02-22
11
+
12
+ ### Fixed
13
+ - **Update tests after version 2.2.2**: Update tests
14
+
15
+ ---
16
+
17
+ ## [2.2.2] - 2025-02-22
18
+
19
+ ### Fixed
20
+ - **Logo overlay reliability**: Reduced default `LOGO_MAX_COVERAGE_ECC_M` from 11% to 6% to ensure better scan reliability with ECC M. Empirical testing showed that 11% could sometimes interfere with decoding, while 6% provides a safe margin. Users can still override `maxCoverage` if a larger logo is required.
21
+ - Updated documentation to reflect the new recommended coverage values.
22
+
23
+ ---
24
+
25
+ ## [2.2.2] - 2025-02-22
26
+
27
+ ### Fixed
28
+ - **Badges on readme**: Fix badges
29
+
30
+ ---
31
+
10
32
  [2.2.0] - 2025-02-21
11
33
  Added
12
34
  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.
package/README.md CHANGED
@@ -66,7 +66,7 @@ import { buildQrWithLogoSvgAsync } from 'qr-kit/utils/logo';
66
66
  const model = makeQr('https://example.com', { eccLevel: 'M' });
67
67
  const svg = await buildQrWithLogoSvgAsync(model, '/logo.svg', {
68
68
  size: 400,
69
- maxCoverage: 0.11, // 11% of QR area — safe for ECC M
69
+ maxCoverage: 0.06, // 6% of QR area — recommended for reliable scanning with ECC M
70
70
  });
71
71
 
72
72
  document.body.innerHTML = svg; // self-contained SVG string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qr-kit",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "Complete QR code toolkit. Zero dependencies. Logo overlay, PDF export, link optimizer. 5.4 kB core.",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/utils/logo.js CHANGED
@@ -26,7 +26,7 @@ import { makeQrPathSplit } from '../renderers/svg.js';
26
26
  // ─── Public constants ──────────────────────────────────────────────────────────
27
27
 
28
28
  /** Maximum fraction of QR area safe to cover with ECC M (~15% budget, 4% safety margin). */
29
- export const LOGO_MAX_COVERAGE_ECC_M = 0.11;
29
+ export const LOGO_MAX_COVERAGE_ECC_M = 0.06;
30
30
 
31
31
  /** Maximum fraction of QR area safe to cover with ECC L (~7% budget, 3% safety margin). */
32
32
  export const LOGO_MAX_COVERAGE_ECC_L = 0.04;