qr-kit 2.2.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 +36 -0
- package/README.md +1 -1
- package/package.json +71 -71
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
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://www.npmjs.com/package/qr-kit)
|
|
8
8
|
[](https://bundlephobia.com/package/qr-kit)
|
|
9
9
|
[](tests/)
|
|
10
|
-
[](https://github.com/Yaroslav3991/qr-kit/blob/main/LICENSE)
|
|
11
11
|
|
|
12
12
|
**[🛝 Live Playground](playground/index.html)** · **[📖 Docs](#installation)** · **[🎨 Examples](#quick-start)**
|
|
13
13
|
|
package/package.json
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "qr-kit",
|
|
3
|
-
"version": "2.2.
|
|
4
|
-
"description": "Complete QR code toolkit. Zero dependencies. Logo overlay, PDF export, link optimizer. 5.4 kB core.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"module": "index.js",
|
|
8
|
-
"types": "types/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": "./index.js",
|
|
11
|
-
"./qr/qr-core": "./qr/qr-core.js",
|
|
12
|
-
"./utils/layout": "./utils/layout.js",
|
|
13
|
-
"./utils/url": "./utils/url.js",
|
|
14
|
-
"./utils/link": "./utils/link.js",
|
|
15
|
-
"./utils/logo": "./utils/logo.js",
|
|
16
|
-
"./renderers/svg": "./renderers/svg.js",
|
|
17
|
-
"./renderers/canvas": "./renderers/canvas.js",
|
|
18
|
-
"./utils/raster": "./utils/raster.js",
|
|
19
|
-
"./utils/jpegQr": "./utils/jpegQr.js",
|
|
20
|
-
"./utils/poster": "./utils/poster.js",
|
|
21
|
-
"./utils/pdf": "./utils/pdf.js",
|
|
22
|
-
"./worker/qr.worker": "./worker/qr.worker.js"
|
|
23
|
-
},
|
|
24
|
-
"scripts": {
|
|
25
|
-
"test": "node tests/run.js",
|
|
26
|
-
"test:watch": "node --watch tests/run.js",
|
|
27
|
-
"size": "node scripts/size.js"
|
|
28
|
-
},
|
|
29
|
-
"sideEffects": false,
|
|
30
|
-
"keywords": [
|
|
31
|
-
"qr",
|
|
32
|
-
"qrcode",
|
|
33
|
-
"qr-code",
|
|
34
|
-
"generator",
|
|
35
|
-
"zero-dependencies",
|
|
36
|
-
"logo",
|
|
37
|
-
"pdf",
|
|
38
|
-
"svg",
|
|
39
|
-
"react",
|
|
40
|
-
"typescript",
|
|
41
|
-
"browser",
|
|
42
|
-
"nodejs"
|
|
43
|
-
],
|
|
44
|
-
"peerDependencies": {
|
|
45
|
-
"react": ">=17"
|
|
46
|
-
},
|
|
47
|
-
"peerDependenciesMeta": {
|
|
48
|
-
"react": {
|
|
49
|
-
"optional": true
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"files": [
|
|
53
|
-
"index.js",
|
|
54
|
-
"qr/",
|
|
55
|
-
"components/",
|
|
56
|
-
"renderers/",
|
|
57
|
-
"utils/",
|
|
58
|
-
"worker/",
|
|
59
|
-
"types/",
|
|
60
|
-
"CHANGELOG.md"
|
|
61
|
-
],
|
|
62
|
-
"license": "MIT",
|
|
63
|
-
"repository": {
|
|
64
|
-
"type": "git",
|
|
65
|
-
"url": "https://github.com/Yaroslav3991/qr-kit.git"
|
|
66
|
-
},
|
|
67
|
-
"bugs": {
|
|
68
|
-
"url": "https://github.com/Yaroslav3991/qr-kit/issues"
|
|
69
|
-
},
|
|
70
|
-
"homepage": "https://github.com/Yaroslav3991/qr-kit#readme"
|
|
71
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "qr-kit",
|
|
3
|
+
"version": "2.2.1",
|
|
4
|
+
"description": "Complete QR code toolkit. Zero dependencies. Logo overlay, PDF export, link optimizer. 5.4 kB core.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"module": "index.js",
|
|
8
|
+
"types": "types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./index.js",
|
|
11
|
+
"./qr/qr-core": "./qr/qr-core.js",
|
|
12
|
+
"./utils/layout": "./utils/layout.js",
|
|
13
|
+
"./utils/url": "./utils/url.js",
|
|
14
|
+
"./utils/link": "./utils/link.js",
|
|
15
|
+
"./utils/logo": "./utils/logo.js",
|
|
16
|
+
"./renderers/svg": "./renderers/svg.js",
|
|
17
|
+
"./renderers/canvas": "./renderers/canvas.js",
|
|
18
|
+
"./utils/raster": "./utils/raster.js",
|
|
19
|
+
"./utils/jpegQr": "./utils/jpegQr.js",
|
|
20
|
+
"./utils/poster": "./utils/poster.js",
|
|
21
|
+
"./utils/pdf": "./utils/pdf.js",
|
|
22
|
+
"./worker/qr.worker": "./worker/qr.worker.js"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"test": "node tests/run.js",
|
|
26
|
+
"test:watch": "node --watch tests/run.js",
|
|
27
|
+
"size": "node scripts/size.js"
|
|
28
|
+
},
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"keywords": [
|
|
31
|
+
"qr",
|
|
32
|
+
"qrcode",
|
|
33
|
+
"qr-code",
|
|
34
|
+
"generator",
|
|
35
|
+
"zero-dependencies",
|
|
36
|
+
"logo",
|
|
37
|
+
"pdf",
|
|
38
|
+
"svg",
|
|
39
|
+
"react",
|
|
40
|
+
"typescript",
|
|
41
|
+
"browser",
|
|
42
|
+
"nodejs"
|
|
43
|
+
],
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"react": ">=17"
|
|
46
|
+
},
|
|
47
|
+
"peerDependenciesMeta": {
|
|
48
|
+
"react": {
|
|
49
|
+
"optional": true
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"files": [
|
|
53
|
+
"index.js",
|
|
54
|
+
"qr/",
|
|
55
|
+
"components/",
|
|
56
|
+
"renderers/",
|
|
57
|
+
"utils/",
|
|
58
|
+
"worker/",
|
|
59
|
+
"types/",
|
|
60
|
+
"CHANGELOG.md"
|
|
61
|
+
],
|
|
62
|
+
"license": "MIT",
|
|
63
|
+
"repository": {
|
|
64
|
+
"type": "git",
|
|
65
|
+
"url": "https://github.com/Yaroslav3991/qr-kit.git"
|
|
66
|
+
},
|
|
67
|
+
"bugs": {
|
|
68
|
+
"url": "https://github.com/Yaroslav3991/qr-kit/issues"
|
|
69
|
+
},
|
|
70
|
+
"homepage": "https://github.com/Yaroslav3991/qr-kit#readme"
|
|
71
|
+
}
|