qr-kit 2.2.1 → 2.2.2
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 +15 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/utils/logo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [2.2.2] - 2025-02-22
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **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.
|
|
14
|
+
- Updated documentation to reflect the new recommended coverage values.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## [2.2.2] - 2025-02-22
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- **Badges on readme**: Fix badges
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
10
25
|
[2.2.0] - 2025-02-21
|
|
11
26
|
Added
|
|
12
27
|
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.
|
|
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
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.
|
|
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;
|