@qr-platform/qr-code.js 0.8.17
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/.github/workflows/publish.yml +18 -0
- package/CHANGELOG.md +233 -0
- package/LICENSE.md +77 -0
- package/README.md +188 -0
- package/docs/advanced-examples.md +523 -0
- package/docs/api-reference-guide.md +254 -0
- package/docs/documentation.md +1592 -0
- package/docs/examples.md +322 -0
- package/docs/license-management.md +501 -0
- package/docs/typescript-types-definitions.md +372 -0
- package/docs/usage-guide.md +622 -0
- package/lib/core/qr-code-js.d.ts +48 -0
- package/lib/core/qr-constant.d.ts +9 -0
- package/lib/core/qr-options-validation.d.ts +13 -0
- package/lib/core/qr-svg.d.ts +76 -0
- package/lib/core/qr-templates.d.ts +6 -0
- package/lib/figures/corner-dot.d.ts +24 -0
- package/lib/figures/corner-square.d.ts +24 -0
- package/lib/figures/dot.d.ts +31 -0
- package/lib/index.d.ts +52 -0
- package/lib/lib/image/GIFImage.d.ts +19 -0
- package/lib/lib/io/Base64.d.ts +10 -0
- package/lib/lib/io/Base64DecodeInputStream.d.ts +15 -0
- package/lib/lib/io/Base64EncodeOutputStream.d.ts +17 -0
- package/lib/lib/io/ByteArrayInputStream.d.ts +12 -0
- package/lib/lib/io/ByteArrayOutputStream.d.ts +12 -0
- package/lib/lib/io/InputStream.d.ts +10 -0
- package/lib/lib/io/OutputStream.d.ts +12 -0
- package/lib/lib/qr-code.d.ts +5 -0
- package/lib/lib/qrcode/BitBuffer.d.ts +11 -0
- package/lib/lib/qrcode/ErrorCorrectLevel.d.ts +23 -0
- package/lib/lib/qrcode/MaskPattern.d.ts +39 -0
- package/lib/lib/qrcode/Mode.d.ts +23 -0
- package/lib/lib/qrcode/Polynomial.d.ts +15 -0
- package/lib/lib/qrcode/QR8BitByte.d.ts +13 -0
- package/lib/lib/qrcode/QRAlphaNum.d.ts +13 -0
- package/lib/lib/qrcode/QRCode.d.ts +22 -0
- package/lib/lib/qrcode/QRCodeMinimal.d.ts +58 -0
- package/lib/lib/qrcode/QRData.d.ts +17 -0
- package/lib/lib/qrcode/QRKanji.d.ts +13 -0
- package/lib/lib/qrcode/QRMath.d.ts +13 -0
- package/lib/lib/qrcode/QRNumber.d.ts +14 -0
- package/lib/lib/qrcode/QRUtil.d.ts +25 -0
- package/lib/lib/qrcode/RSBlock.d.ts +16 -0
- package/lib/lib/text/createStringToBytes.d.ts +9 -0
- package/lib/lib/text/stringToBytes_SJIS.d.ts +8 -0
- package/lib/lib/text/stringToBytes_UTF8.d.ts +7 -0
- package/lib/lib/zbar-wasm/index.d.ts +1 -0
- package/lib/lib/zxing-js/src/browser/BrowserCodeReader.d.ts +410 -0
- package/lib/lib/zxing-js/src/browser/BrowserQRCodeReader.d.ts +29 -0
- package/lib/lib/zxing-js/src/browser/BrowserQRCodeSvgWriter.d.ts +46 -0
- package/lib/lib/zxing-js/src/browser/BrowserSvgCodeWriter.d.ts +49 -0
- package/lib/lib/zxing-js/src/browser/DecodeContinuouslyCallback.d.ts +6 -0
- package/lib/lib/zxing-js/src/browser/HTMLCanvasElementLuminanceSource.d.ts +27 -0
- package/lib/lib/zxing-js/src/browser/HTMLVisualMediaElement.d.ts +4 -0
- package/lib/lib/zxing-js/src/browser/VideoInputDevice.d.ts +22 -0
- package/lib/lib/zxing-js/src/browser.d.ts +3 -0
- package/lib/lib/zxing-js/src/core/ArgumentException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/ArithmeticException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/ArrayIndexOutOfBoundsException.d.ts +10 -0
- package/lib/lib/zxing-js/src/core/BarcodeFormat.d.ts +42 -0
- package/lib/lib/zxing-js/src/core/Binarizer.d.ts +53 -0
- package/lib/lib/zxing-js/src/core/BinaryBitmap.d.ts +78 -0
- package/lib/lib/zxing-js/src/core/ChecksumException.d.ts +8 -0
- package/lib/lib/zxing-js/src/core/DecodeHintType.d.ts +91 -0
- package/lib/lib/zxing-js/src/core/Dimension.d.ts +13 -0
- package/lib/lib/zxing-js/src/core/EncodeHintType.d.ts +99 -0
- package/lib/lib/zxing-js/src/core/Exception.d.ts +17 -0
- package/lib/lib/zxing-js/src/core/FormatException.d.ts +8 -0
- package/lib/lib/zxing-js/src/core/HighContrastLuminanceSource.d.ts +27 -0
- package/lib/lib/zxing-js/src/core/IllegalArgumentException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/IllegalStateException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/IndexOutOfBoundsException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/InvertedLuminanceSource.d.ts +22 -0
- package/lib/lib/zxing-js/src/core/LuminanceSource.d.ts +84 -0
- package/lib/lib/zxing-js/src/core/NodeLuminanceSource.d.ts +36 -0
- package/lib/lib/zxing-js/src/core/NotFoundException.d.ts +8 -0
- package/lib/lib/zxing-js/src/core/NullPointerException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/OutOfMemoryError.d.ts +6 -0
- package/lib/lib/zxing-js/src/core/PlanarYUVLuminanceSource.d.ts +35 -0
- package/lib/lib/zxing-js/src/core/RGBLuminanceSource.d.ts +21 -0
- package/lib/lib/zxing-js/src/core/Reader.d.ts +49 -0
- package/lib/lib/zxing-js/src/core/ReaderException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/ReedSolomonException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/Result.d.ts +52 -0
- package/lib/lib/zxing-js/src/core/ResultMetadataType.d.ts +68 -0
- package/lib/lib/zxing-js/src/core/ResultPoint.d.ts +34 -0
- package/lib/lib/zxing-js/src/core/ResultPointCallback.d.ts +11 -0
- package/lib/lib/zxing-js/src/core/UniversalLuminanceSource.d.ts +46 -0
- package/lib/lib/zxing-js/src/core/UnsupportedOperationException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/Writer.d.ts +30 -0
- package/lib/lib/zxing-js/src/core/WriterException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/common/BitArray.d.ts +111 -0
- package/lib/lib/zxing-js/src/core/common/BitMatrix.d.ts +98 -0
- package/lib/lib/zxing-js/src/core/common/BitSource.d.ts +38 -0
- package/lib/lib/zxing-js/src/core/common/CharacterSetECI.d.ts +89 -0
- package/lib/lib/zxing-js/src/core/common/DecoderResult.d.ts +64 -0
- package/lib/lib/zxing-js/src/core/common/DefaultGridSampler.d.ts +10 -0
- package/lib/lib/zxing-js/src/core/common/DetectorResult.d.ts +16 -0
- package/lib/lib/zxing-js/src/core/common/ECIEncoderSet.d.ts +37 -0
- package/lib/lib/zxing-js/src/core/common/ECIInput.d.ts +79 -0
- package/lib/lib/zxing-js/src/core/common/GlobalHistogramBinarizer.d.ts +29 -0
- package/lib/lib/zxing-js/src/core/common/GridSampler.d.ts +36 -0
- package/lib/lib/zxing-js/src/core/common/GridSamplerInstance.d.ts +18 -0
- package/lib/lib/zxing-js/src/core/common/HybridBinarizer.d.ts +54 -0
- package/lib/lib/zxing-js/src/core/common/MinimalECIInput.d.ts +123 -0
- package/lib/lib/zxing-js/src/core/common/PerspectiveTransform.d.ts +26 -0
- package/lib/lib/zxing-js/src/core/common/StringUtils.d.ts +48 -0
- package/lib/lib/zxing-js/src/core/common/detector/CornerDetector.d.ts +35 -0
- package/lib/lib/zxing-js/src/core/common/detector/MathUtils.d.ts +36 -0
- package/lib/lib/zxing-js/src/core/common/detector/WhiteRectangleDetector.d.ts +71 -0
- package/lib/lib/zxing-js/src/core/common/reedsolomon/AbstractGenericGF.d.ts +34 -0
- package/lib/lib/zxing-js/src/core/common/reedsolomon/AbstractGenericGFPoly.d.ts +36 -0
- package/lib/lib/zxing-js/src/core/common/reedsolomon/GenericGF.d.ts +58 -0
- package/lib/lib/zxing-js/src/core/common/reedsolomon/GenericGFPoly.d.ts +47 -0
- package/lib/lib/zxing-js/src/core/common/reedsolomon/ReedSolomonDecoder.d.ts +40 -0
- package/lib/lib/zxing-js/src/core/common/reedsolomon/ReedSolomonEncoder.d.ts +41 -0
- package/lib/lib/zxing-js/src/core/qrcode/QRCodeReader.d.ts +35 -0
- package/lib/lib/zxing-js/src/core/qrcode/QRCodeWriter.d.ts +13 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/BitMatrixParser.d.ts +58 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/DataBlock.d.ts +28 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/DataMask.d.ts +36 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/DecodedBitStreamParser.d.ts +30 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/Decoder.d.ts +44 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/ECB.d.ts +12 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/ECBlocks.d.ts +16 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/ErrorCorrectionLevel.d.ts +38 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/FormatInformation.d.ts +33 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/Mode.d.ts +56 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/QRCodeDecoderMetaData.d.ts +21 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/Version.d.ts +44 -0
- package/lib/lib/zxing-js/src/core/qrcode/detector/AlignmentPattern.d.ts +21 -0
- package/lib/lib/zxing-js/src/core/qrcode/detector/AlignmentPatternFinder.d.ts +82 -0
- package/lib/lib/zxing-js/src/core/qrcode/detector/Detector.d.ts +87 -0
- package/lib/lib/zxing-js/src/core/qrcode/detector/FinderPattern.d.ts +26 -0
- package/lib/lib/zxing-js/src/core/qrcode/detector/FinderPatternFinder.d.ts +114 -0
- package/lib/lib/zxing-js/src/core/qrcode/detector/FinderPatternInfo.d.ts +16 -0
- package/lib/lib/zxing-js/src/core/qrcode/encoder/BlockPair.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/qrcode/encoder/ByteMatrix.d.ts +24 -0
- package/lib/lib/zxing-js/src/core/qrcode/encoder/Encoder.d.ts +85 -0
- package/lib/lib/zxing-js/src/core/qrcode/encoder/MaskUtil.d.ts +47 -0
- package/lib/lib/zxing-js/src/core/qrcode/encoder/MatrixUtil.d.ts +37 -0
- package/lib/lib/zxing-js/src/core/qrcode/encoder/QRCode.d.ts +29 -0
- package/lib/lib/zxing-js/src/core/util/Arrays.d.ts +45 -0
- package/lib/lib/zxing-js/src/core/util/ByteArrayOutputStream.d.ts +174 -0
- package/lib/lib/zxing-js/src/core/util/Charset.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/util/Collections.d.ts +11 -0
- package/lib/lib/zxing-js/src/core/util/Float.d.ts +14 -0
- package/lib/lib/zxing-js/src/core/util/Formatter.d.ts +28 -0
- package/lib/lib/zxing-js/src/core/util/Integer.d.ts +19 -0
- package/lib/lib/zxing-js/src/core/util/Long.d.ts +12 -0
- package/lib/lib/zxing-js/src/core/util/OutputStream.d.ts +106 -0
- package/lib/lib/zxing-js/src/core/util/StandardCharsets.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/util/StringBuilder.d.ts +21 -0
- package/lib/lib/zxing-js/src/core/util/StringEncoding.d.ts +51 -0
- package/lib/lib/zxing-js/src/core/util/System.d.ts +10 -0
- package/lib/lib/zxing-js/src/customTypings.d.ts +16 -0
- package/lib/lib/zxing-js/src/index.d.ts +5 -0
- package/lib/lib/zxing-js/src/node.d.ts +1 -0
- package/lib/license/LicenseManager.d.ts +69 -0
- package/lib/license/LicenseManagerNode.d.ts +64 -0
- package/lib/node.d.ts +37 -0
- package/lib/options-demo.d.ts +239 -0
- package/lib/plugins/QRBorderHelpers.d.ts +32 -0
- package/lib/plugins/QRBorderPlugin.d.ts +35 -0
- package/lib/plugins/QRValidatorZbar.d.ts +38 -0
- package/lib/plugins/QRValidatorZbarNode.d.ts +60 -0
- package/lib/plugins/QRValidatorZbarNodeSharp.d.ts +83 -0
- package/lib/qr-code-js-node.js +1 -0
- package/lib/qr-code-js.js +1 -0
- package/lib/templates/borders-inner-outter.d.ts +129 -0
- package/lib/templates/borders-inner-scale-offset.d.ts +497 -0
- package/lib/templates/borders-inner.d.ts +129 -0
- package/lib/templates/borders-no-license.d.ts +129 -0
- package/lib/templates/borders-outter.d.ts +129 -0
- package/lib/templates/borders-text-auto-curved.d.ts +129 -0
- package/lib/templates/borders-text-full-curved.d.ts +133 -0
- package/lib/templates/borders.d.ts +129 -0
- package/lib/templates/scales.d.ts +130 -0
- package/lib/templates/scan-validators/index.d.ts +1 -0
- package/lib/templates/scan-validators/tests/cases/basic-inverted.d.ts +9 -0
- package/lib/templates/scan-validators/tests/cases/basic-no-license.d.ts +3 -0
- package/lib/templates/scan-validators/tests/cases/basic.d.ts +3 -0
- package/lib/templates/scan-validators/tests/cases/colors-inverted.d.ts +2 -0
- package/lib/templates/scan-validators/tests/cases/colors.d.ts +58 -0
- package/lib/templates/scan-validators/tests/cases/out-of-borders-inverted.d.ts +9 -0
- package/lib/templates/scan-validators/tests/cases/out-of-borders.d.ts +9 -0
- package/lib/templates/scan-validators/tests/cases/position-inverted.d.ts +9 -0
- package/lib/templates/scan-validators/tests/cases/position.d.ts +3 -0
- package/lib/templates/scan-validators/tests/index.d.ts +27 -0
- package/lib/tools/browser-image-tools.d.ts +7 -0
- package/lib/tools/browser-utils.d.ts +18 -0
- package/lib/types/helper.d.ts +23 -0
- package/lib/utils/canvas-options.d.ts +7 -0
- package/lib/utils/color.d.ts +4 -0
- package/lib/utils/gradient.d.ts +26 -0
- package/lib/utils/image.d.ts +16 -0
- package/lib/utils/merge.d.ts +5 -0
- package/lib/utils/options.d.ts +220 -0
- package/lib/utils/qrcode.d.ts +8 -0
- package/lib/utils/scan-validator-node.d.ts +15 -0
- package/lib/utils/scan-validators/abstract-scan-validator.d.ts +43 -0
- package/lib/utils/scan-validators/zbar-scan-validator.d.ts +8 -0
- package/lib/utils/scan-validators/zxing-canvas-scan-validator.d.ts +10 -0
- package/lib/utils/scan-validators/zxing-scan-validator.d.ts +8 -0
- package/lib/utils/svg.d.ts +2 -0
- package/lib/utils/token-validator.d.ts +19 -0
- package/package.json +80 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
name: Publish to npm
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
publish:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- name: Checkout code
|
13
|
+
uses: actions/checkout@v2
|
14
|
+
|
15
|
+
- name: Publish to npm
|
16
|
+
run: |
|
17
|
+
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
18
|
+
npm publish --access public
|
package/CHANGELOG.md
ADDED
@@ -0,0 +1,233 @@
|
|
1
|
+
# @qr-platform/qr-code-js
|
2
|
+
|
3
|
+
## 0.8.17
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 809309c: Domain validation from token
|
8
|
+
- a3d5390: Update to Validation and Node library
|
9
|
+
|
10
|
+
## 0.8.16
|
11
|
+
|
12
|
+
### Patch Changes
|
13
|
+
|
14
|
+
- 4fe192a: feat: added node validator without jimp and sharp
|
15
|
+
|
16
|
+
## 0.8.15
|
17
|
+
|
18
|
+
### Patch Changes
|
19
|
+
|
20
|
+
- 371fc30: import Position type
|
21
|
+
|
22
|
+
## 0.8.14
|
23
|
+
|
24
|
+
### Patch Changes
|
25
|
+
|
26
|
+
- 8c5c33d: changesets
|
27
|
+
|
28
|
+
## 0.8.13
|
29
|
+
|
30
|
+
### Patch Changes
|
31
|
+
|
32
|
+
- 614288c: fix path
|
33
|
+
|
34
|
+
## 0.8.12
|
35
|
+
|
36
|
+
### Patch Changes
|
37
|
+
|
38
|
+
- 51916e2: validation refactoring
|
39
|
+
|
40
|
+
## 0.8.11
|
41
|
+
|
42
|
+
### Patch Changes
|
43
|
+
|
44
|
+
- 7d722f4: zlib - make only one attempt
|
45
|
+
|
46
|
+
## 0.8.10
|
47
|
+
|
48
|
+
### Patch Changes
|
49
|
+
|
50
|
+
- de43501: change zlib path
|
51
|
+
|
52
|
+
## 0.8.9
|
53
|
+
|
54
|
+
### Patch Changes
|
55
|
+
|
56
|
+
- 6484ce8: new version of zbar library (x2 zoom)
|
57
|
+
|
58
|
+
## 0.8.8
|
59
|
+
|
60
|
+
### Patch Changes
|
61
|
+
|
62
|
+
- 2be1fa6: fix zbar path
|
63
|
+
|
64
|
+
## 0.8.7
|
65
|
+
|
66
|
+
### Patch Changes
|
67
|
+
|
68
|
+
- bd51c06: add zbar validation
|
69
|
+
|
70
|
+
## 0.8.6
|
71
|
+
|
72
|
+
### Patch Changes
|
73
|
+
|
74
|
+
- ca33ed1: new validation version
|
75
|
+
|
76
|
+
## 0.8.5
|
77
|
+
|
78
|
+
### Patch Changes
|
79
|
+
|
80
|
+
- a7e1d58: fix scan-validator
|
81
|
+
|
82
|
+
## 0.8.4
|
83
|
+
|
84
|
+
### Patch Changes
|
85
|
+
|
86
|
+
- ce15b6f: fix scan-validator
|
87
|
+
|
88
|
+
## 0.8.3
|
89
|
+
|
90
|
+
### Patch Changes
|
91
|
+
|
92
|
+
- 61fe588: fix scan validator
|
93
|
+
|
94
|
+
## 0.8.2
|
95
|
+
|
96
|
+
### Patch Changes
|
97
|
+
|
98
|
+
- f456d90: fix scan validator
|
99
|
+
|
100
|
+
## 0.8.1
|
101
|
+
|
102
|
+
### Patch Changes
|
103
|
+
|
104
|
+
- 84db585: Node Export Option Changed to QRCodeJsOptions
|
105
|
+
- 954ccad: Fixed scan validator
|
106
|
+
|
107
|
+
## 0.8.0
|
108
|
+
|
109
|
+
### Minor Changes
|
110
|
+
|
111
|
+
- 6f87620: Added QR scanning validators
|
112
|
+
|
113
|
+
## 0.7.5
|
114
|
+
|
115
|
+
### Patch Changes
|
116
|
+
|
117
|
+
- c6ea22c: Border option for inner cutout scale and offset added
|
118
|
+
- ae53fde: Border outter position behind qr code
|
119
|
+
|
120
|
+
## 0.7.4
|
121
|
+
|
122
|
+
### Patch Changes
|
123
|
+
|
124
|
+
- 6f30bd9: Validation QR Code JS Options
|
125
|
+
- 6f30bd9: Exports Lib Name Changed
|
126
|
+
|
127
|
+
## 0.7.3
|
128
|
+
|
129
|
+
### Patch Changes
|
130
|
+
|
131
|
+
- 20a46bc: Outter border qr offset added
|
132
|
+
|
133
|
+
## 0.7.2
|
134
|
+
|
135
|
+
### Patch Changes
|
136
|
+
|
137
|
+
- bdad351: Round border text fixes for different combinations
|
138
|
+
|
139
|
+
## 0.7.1
|
140
|
+
|
141
|
+
### Patch Changes
|
142
|
+
|
143
|
+
- 7ff7a0a: Removed round and replaced with radius string only
|
144
|
+
|
145
|
+
## 0.7.0
|
146
|
+
|
147
|
+
### Minor Changes
|
148
|
+
|
149
|
+
- aa530a4: Rename disableCurve to curveDisabled
|
150
|
+
|
151
|
+
## 0.6.0
|
152
|
+
|
153
|
+
### Minor Changes
|
154
|
+
|
155
|
+
- 800081e: radius should be of type number of percentage
|
156
|
+
|
157
|
+
## 0.5.0
|
158
|
+
|
159
|
+
### Minor Changes
|
160
|
+
|
161
|
+
- ef2af08: fix reexport BorderOptions and Position interface and type
|
162
|
+
|
163
|
+
## 0.4.0
|
164
|
+
|
165
|
+
### Minor Changes
|
166
|
+
|
167
|
+
- 23ac2fd: fix types
|
168
|
+
|
169
|
+
## 0.3.0
|
170
|
+
|
171
|
+
### Minor Changes
|
172
|
+
|
173
|
+
- 527180a: fix: change type for options
|
174
|
+
|
175
|
+
## 0.2.0
|
176
|
+
|
177
|
+
### Minor Changes
|
178
|
+
|
179
|
+
- 82bb86c: Disable for DecorationOption is optional
|
180
|
+
|
181
|
+
## 0.1.0
|
182
|
+
|
183
|
+
### Minor Changes
|
184
|
+
|
185
|
+
- 4b53fb0: Add export BorderOptions
|
186
|
+
|
187
|
+
## 0.0.13
|
188
|
+
|
189
|
+
### Patch Changes
|
190
|
+
|
191
|
+
- 0d64e48: Export Position type from QRBorderPlugin
|
192
|
+
|
193
|
+
## 0.0.12
|
194
|
+
|
195
|
+
### Patch Changes
|
196
|
+
|
197
|
+
- a426d0b: Fix for default background red, changed to #ffff
|
198
|
+
|
199
|
+
## 0.0.11
|
200
|
+
|
201
|
+
### Patch Changes
|
202
|
+
|
203
|
+
- 69696df: Outter and Inner decorative borders improvements
|
204
|
+
|
205
|
+
## 0.0.10
|
206
|
+
|
207
|
+
### Patch Changes
|
208
|
+
|
209
|
+
- 75660f1: Updated package json to export for node
|
210
|
+
|
211
|
+
## 0.0.9
|
212
|
+
|
213
|
+
### Patch Changes
|
214
|
+
|
215
|
+
- 2e45431: update to export name
|
216
|
+
|
217
|
+
## 0.0.8
|
218
|
+
|
219
|
+
### Patch Changes
|
220
|
+
|
221
|
+
- e28c564: Package json update to export types, node and browser files
|
222
|
+
|
223
|
+
## 0.0.7
|
224
|
+
|
225
|
+
### Patch Changes
|
226
|
+
|
227
|
+
- d833eb4: Another Test Publish
|
228
|
+
|
229
|
+
## 0.0.6
|
230
|
+
|
231
|
+
### Patch Changes
|
232
|
+
|
233
|
+
- 3a68929: Test release new version (no changes)
|
package/LICENSE.md
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# QRCode.js Library - License Terms and Conditions
|
2
|
+
|
3
|
+
**Effective Date:** April 13, 2025
|
4
|
+
|
5
|
+
**IMPORTANT:** PLEASE READ THESE TERMS AND CONDITIONS CAREFULLY BEFORE USING THE QRCode.js LIBRARY. BY DOWNLOADING, INSTALLING, OR USING THE QRCode.js LIBRARY ARTIFACT (THE "SOFTWARE"), YOU ("USER") AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE AGREEMENT. IF YOU DO NOT AGREE TO THESE TERMS, DO NOT USE THE SOFTWARE.
|
6
|
+
|
7
|
+
This Software is licensed, not sold, by QR-Platform ("Licensor") for use only under the terms of this license. The source code for the Software is proprietary, confidential, and is **not** provided or licensed under this agreement. Licensor reserves all rights not expressly granted to User.
|
8
|
+
|
9
|
+
## 1. License Grant
|
10
|
+
|
11
|
+
Subject to the terms and conditions of this Agreement, Licensor grants User a limited, non-exclusive, non-transferable, non-sublicensable, revocable license to:
|
12
|
+
|
13
|
+
* **a) Free Tier Usage:** Install and use the Software solely as integrated into User's applications ("User Applications") **provided that User only utilizes the Free Features** of the Software. "Free Features" include all functionalities of the Software *except* for the "Premium Features" defined below.
|
14
|
+
* **b) Premium Tier Usage:** Use the "Premium Features" of the Software, **only if and for the duration** User has purchased and holds a valid, separate **Commercial License** from Licensor. The terms of the Commercial License will supplement this agreement and specifically govern the use of Premium Features.
|
15
|
+
|
16
|
+
## 2. Premium Features
|
17
|
+
|
18
|
+
The following functionalities of the Software are currently designated as "Premium Features" and require a valid **Commercial License** for any use (including development, testing, and production):
|
19
|
+
|
20
|
+
1. **Borders (`borderOptions`)**: All options and functionalities related to creating and customizing borders around the QR code.
|
21
|
+
2. **Scan Validation (`validateScanning` method)**: The functionality provided by the `validateScanning()` method, which may utilize canvas-based analysis, to verify QR code scannability and decode its content.
|
22
|
+
|
23
|
+
**Using Premium Features without a valid Commercial License is strictly prohibited** and constitutes a breach of this Agreement. Attempting to use these features without a valid license may result in limited functionality, watermarking, exceptions, or error messages indicating the license requirement.
|
24
|
+
|
25
|
+
**Obtaining a Commercial License:**
|
26
|
+
To purchase a Commercial License, please visit: **[www.qr-platform.com/qr-code-js#license](https://www.qr-platform.com/qr-code-js#license)**
|
27
|
+
Or contact us at: **contact@qr-platform.com**
|
28
|
+
|
29
|
+
**Reservation of Rights to Designate Premium Features:**
|
30
|
+
**Licensor reserves the right, at its sole discretion, to designate additional features or functionalities of the Software as 'Premium Features' at any time and without prior notice. Any features so designated will subsequently require a valid Commercial License for their use under the terms of this Agreement and the applicable Commercial License Agreement.**
|
31
|
+
|
32
|
+
## 3. Restrictions on Use
|
33
|
+
|
34
|
+
User agrees **not** to:
|
35
|
+
* a) Reverse engineer, decompile, disassemble, or otherwise attempt to discover the source code or underlying algorithms of the Software.
|
36
|
+
* b) Modify, adapt, translate, or create derivative works based on the Software artifact itself.
|
37
|
+
* c) Rent, lease, loan, sublicense, sell, or distribute the Software as a standalone product. User MAY distribute the Software solely when integrated as an inseparable part of User Applications, subject to the terms herein.
|
38
|
+
* d) Remove, alter, or obscure any copyright, trademark, or other proprietary notices on or in the Software.
|
39
|
+
* e) Use the Premium Features without a valid Commercial License.
|
40
|
+
* f) Use the Software for any illegal purpose or in violation of any applicable laws.
|
41
|
+
|
42
|
+
## 4. Support
|
43
|
+
|
44
|
+
* **Free Tier:** Users utilizing only the Free Features may seek support via community channels (e.g., GitHub Issues) on a best-effort basis. Licensor provides no guaranteed response time or resolution for the Free Tier.
|
45
|
+
* **Premium Tier:** Users holding a valid Commercial License are entitled to priority support as specified in their Commercial License Agreement.
|
46
|
+
|
47
|
+
## 5. Intellectual Property
|
48
|
+
|
49
|
+
The Software is protected by copyright and other intellectual property laws and treaties. Licensor retains all right, title, and interest in and to the Software, including all copyrights, patents, trade secrets, trademarks, and other intellectual property rights. This license grants User limited rights to use the Software artifact and does not transfer any ownership rights.
|
50
|
+
|
51
|
+
## 6. Disclaimer of Warranty
|
52
|
+
|
53
|
+
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, LICENSOR DISCLAIMS ALL WARRANTIES AND CONDITIONS, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT. LICENSOR DOES NOT WARRANT THAT THE SOFTWARE WILL MEET USER'S REQUIREMENTS, OPERATE WITHOUT INTERRUPTION, OR BE ERROR-FREE.
|
54
|
+
|
55
|
+
## 7. Limitation of Liability
|
56
|
+
|
57
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL LICENSOR OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, CONSEQUENTIAL, PUNITIVE, OR EXEMPLARY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT SHALL LICENSOR'S TOTAL LIABILITY TO USER FOR ALL DAMAGES EXCEED THE AMOUNT PAID BY USER FOR A COMMERCIAL LICENSE TO THE SOFTWARE, IF ANY, OR USD $50.00, WHICHEVER IS GREATER.
|
58
|
+
|
59
|
+
## 8. Term and Termination
|
60
|
+
|
61
|
+
This License Agreement is effective until terminated. User's rights under this license will terminate automatically without notice from Licensor if User fails to comply with any term(s) of this license. Upon termination, User shall cease all use of the Software and destroy all copies, full or partial, of the Software artifact. Sections 3, 5, 6, 7, 9, and 11 shall survive any termination.
|
62
|
+
|
63
|
+
## 9. Governing Law
|
64
|
+
|
65
|
+
This License Agreement shall be governed by and construed in accordance with the laws of **[Your State, e.g., the State of California]**, USA, without regard to its conflict of law principles. User agrees that any disputes arising under this Agreement shall be subject to the exclusive jurisdiction of the state and federal courts located in **[Your County and State, e.g., Santa Clara County, California]**.
|
66
|
+
|
67
|
+
## 10. Entire Agreement
|
68
|
+
|
69
|
+
This Agreement, together with the terms of any valid Commercial License obtained by User (if applicable), constitutes the entire agreement between User and Licensor relating to the Software and supersedes all prior or contemporaneous understandings regarding such subject matter. No amendment to or modification of this Agreement will be binding unless in writing and signed by Licensor.
|
70
|
+
|
71
|
+
## 11. Contact Information
|
72
|
+
|
73
|
+
For questions regarding this license or to inquire about Commercial Licensing, please contact QR-Platform at: **contact@qr-platform.com** or visit **[www.qr-platform.com/qr-code-js#license](https://www.qr-platform.com/qr-code-js#license)**.
|
74
|
+
|
75
|
+
---
|
76
|
+
|
77
|
+
**Legal Disclaimer:** This license template is provided for informational purposes only and does not constitute legal advice. QR-Platform strongly recommends consulting with a qualified legal professional to ensure this license agreement is suitable for your specific needs and complies with all applicable laws and regulations.
|
package/README.md
ADDED
@@ -0,0 +1,188 @@
|
|
1
|
+
# QRCode.js - @qr-platform/qr-code.js
|
2
|
+
|
3
|
+
[](https://badge.fury.io/js/%40qr-platform%2Fqr-code.js)
|
4
|
+
|
5
|
+
<!-- Add other badges like build status, coverage, etc. if available -->
|
6
|
+
|
7
|
+
## Simple, Beautiful, Reliable
|
8
|
+
##### Create Beautiful, Reliable QR Codes with Ease
|
9
|
+
|
10
|
+
QRCode.js is a professional JavaScript/TypeScript library for creating customized QR codes, offering a blend of simplicity and sophistication. With versatile styling options—dot shapes, colors, gradients, embedded images, borders, and text—it enables you to design unique, visually appealing QR codes that work flawlessly with standard scanners. QRCode.js is part of [QR-Platform](https://qr-platform.com): All-in-One QR Codes Management Solution.
|
11
|
+
|
12
|
+
 <!-- Placeholder: Replace with an actual representative image URL if available -->
|
13
|
+
|
14
|
+
## ✨ Features
|
15
|
+
* **Core QR Code Generation**: Encode any text, URL, or data.
|
16
|
+
* **Highly Customizable:** Control dot shapes, colors, sizes, corner styles, and background.
|
17
|
+
* **Gradients:** Apply linear or radial gradients to dots, corners, and backgrounds.
|
18
|
+
* **Image Embedding:** Embed logos or other images in the center, as an overlay, or as a background.
|
19
|
+
* **Borders (Free & Premium):** Add basic borders (with branding in free version) or advanced, customizable borders with text/images (Premium).
|
20
|
+
* **Flexible Output:** Generate QR codes as SVG elements in the browser or SVG strings in Node.js.
|
21
|
+
* **Download Options:** Download QR codes as SVG, PNG, JPEG, or WEBP.
|
22
|
+
* **TypeScript Support:** Fully typed for a better development experience.
|
23
|
+
* **Node.js Compatible:** Works seamlessly in server-side environments.
|
24
|
+
* **Responsive:** Option to make SVG output responsive to container size.
|
25
|
+
* **Scan Validation (Premium):** Verify the scannability of generated QR codes.
|
26
|
+
|
27
|
+
## 🚀 Installation
|
28
|
+
|
29
|
+
```bash
|
30
|
+
# Using npm
|
31
|
+
npm install @qr-platform/qr-code.js
|
32
|
+
|
33
|
+
# Using yarn
|
34
|
+
yarn add @qr-platform/qr-code.js
|
35
|
+
|
36
|
+
# Using pnpm
|
37
|
+
pnpm add @qr-platform/qr-code.js
|
38
|
+
```
|
39
|
+
|
40
|
+
## 💡 Basic Usage
|
41
|
+
|
42
|
+
```typescript
|
43
|
+
import { QRCodeJs, Options } from '@qr-platform/qr-code.js';
|
44
|
+
|
45
|
+
// 1. Define options (only 'data' is required)
|
46
|
+
const options: Options = {
|
47
|
+
data: 'https://example.com',
|
48
|
+
dotsOptions: {
|
49
|
+
color: '#007bff', // Blue dots
|
50
|
+
type: 'rounded' // Use rounded dots
|
51
|
+
},
|
52
|
+
backgroundOptions: {
|
53
|
+
color: '#ffffff' // White background
|
54
|
+
}
|
55
|
+
};
|
56
|
+
|
57
|
+
// 2. Create QR Code instance
|
58
|
+
const qrCode = new QRCodeJs(options);
|
59
|
+
|
60
|
+
// 3. Append to a container element (in browser)
|
61
|
+
const container = document.getElementById('qr-container');
|
62
|
+
if (container) {
|
63
|
+
qrCode.append(container);
|
64
|
+
}
|
65
|
+
|
66
|
+
// Or get SVG string (Browser or Node.js)
|
67
|
+
qrCode.serialize().then(svgString => {
|
68
|
+
if (svgString) {
|
69
|
+
console.log('QR Code SVG:', svgString);
|
70
|
+
// In Node.js, you might save this string to a file
|
71
|
+
// require('fs').writeFileSync('qrcode.svg', svgString);
|
72
|
+
}
|
73
|
+
});
|
74
|
+
```
|
75
|
+
|
76
|
+
## ⚙️ Key Options Overview
|
77
|
+
|
78
|
+
| Option | Description | Example Value |
|
79
|
+
| :--------------------- | :----------------------------------------------- | :------------------- |
|
80
|
+
| `data` | **Required.** The content to encode. | `'Your URL here'` |
|
81
|
+
| `shape` | Overall shape (`'square'` or `'circle'`). | `'circle'` |
|
82
|
+
| `margin` | Quiet zone around the QR code (pixels). | `10` |
|
83
|
+
| `qrOptions.errorCorrectionLevel` | Error correction (`'L'`, `'M'`, `'Q'`, `'H'`). | `'H'` |
|
84
|
+
| `dotsOptions.type` | Shape of the data dots (e.g., `rounded`, `dot`). | `'rounded'` |
|
85
|
+
| `dotsOptions.color` | Color of the data dots. | `'#ff5733'` |
|
86
|
+
| `dotsOptions.gradient` | Gradient for dots (see [Gradients](#gradients)). | `{ type: 'linear', ... }` |
|
87
|
+
| `cornersSquareOptions` | Style for the large corner squares. | `{ type: 'dot', color: '#00ff00' }` |
|
88
|
+
| `cornersDotOptions` | Style for the small dots inside corners. | `{ type: 'square', color: '#ffffff' }` |
|
89
|
+
| `backgroundOptions` | Background style (color, roundness, gradient). | `{ color: '#f0f0f0', round: 0.2 }` |
|
90
|
+
| `image` | URL/Buffer/Blob of image to embed. | `'logo.png'` |
|
91
|
+
| `imageOptions` | Options for the embedded image (size, margin). | `{ imageSize: 0.3, margin: 2 }` |
|
92
|
+
| `borderOptions` | **Premium.** Options for decorative borders. | `{ hasBorder: true, thickness: 20, ... }` |
|
93
|
+
|
94
|
+
*For a full list of options, see the [API Reference Guide](./docs/api-reference-guide.md#start).*
|
95
|
+
|
96
|
+
## 🎨 Examples
|
97
|
+
|
98
|
+
Explore various configurations:
|
99
|
+
|
100
|
+
* **[Basic Examples](./docs/examples.md#start):** Get started with common use cases.
|
101
|
+
* **[Advanced Examples](./docs/advanced-examples.md#start):** Dive deep into customization possibilities.
|
102
|
+
|
103
|
+
## 🖥️ Node.js Usage
|
104
|
+
|
105
|
+
QRCode.js works in Node.js for server-side generation.
|
106
|
+
|
107
|
+
```typescript
|
108
|
+
import { QRCodeJs, Options } from '@qr-platform/qr-code.js/node'; // Note the '/node' import
|
109
|
+
import fs from 'fs';
|
110
|
+
|
111
|
+
const options: Options = {
|
112
|
+
data: 'https://example.com/from-node',
|
113
|
+
dotsOptions: {
|
114
|
+
color: '#8A2BE2' // BlueViolet
|
115
|
+
}
|
116
|
+
};
|
117
|
+
|
118
|
+
const qrCode = new QRCodeJs(options);
|
119
|
+
|
120
|
+
qrCode.serialize().then(svgString => {
|
121
|
+
if (svgString) {
|
122
|
+
fs.writeFileSync('qrcode-node.svg', svgString);
|
123
|
+
console.log('QR Code saved to qrcode-node.svg');
|
124
|
+
}
|
125
|
+
});
|
126
|
+
```
|
127
|
+
|
128
|
+
**Key Differences:**
|
129
|
+
* Import from `@qr-platform/qr-code.js/node`.
|
130
|
+
* Methods requiring a DOM like `append()` or `download()` are not available. Use `serialize()` to get the SVG string.
|
131
|
+
* License activation (if needed) persists only in memory per session. See [License Management](./docs/license-management.md#start).
|
132
|
+
|
133
|
+
## 🔑 License Management (Free vs. Premium)
|
134
|
+
|
135
|
+
QRCode.js offers both free and premium features.
|
136
|
+
|
137
|
+
* **Free Version:**
|
138
|
+
* All core generation and styling features (dots, corners, background, gradients, image embedding).
|
139
|
+
* Basic border styling (`borderOptions.hasBorder`, `thickness`, `color`, `radius`).
|
140
|
+
* **Limitation:** Borders created in the free version will automatically display "QR-Platform" branding text in the bottom border. This cannot be removed or customized without a license.
|
141
|
+
|
142
|
+
* **Premium Version (Requires License):**
|
143
|
+
* **Advanced Borders:** No branding, custom text/images on any side, inner/outer borders, full styling control.
|
144
|
+
* **Scan Validation:** Access to the `validateScanning()` method.
|
145
|
+
|
146
|
+
**Activating a License:**
|
147
|
+
|
148
|
+
```typescript
|
149
|
+
// Activate BEFORE creating QRCodeJs instances
|
150
|
+
// Using a license key (fetches token from backend)
|
151
|
+
await QRCodeJs.license('YOUR-LICENSE-KEY');
|
152
|
+
|
153
|
+
// Or using a pre-fetched JWT token
|
154
|
+
await QRCodeJs.token('YOUR-JWT-TOKEN');
|
155
|
+
|
156
|
+
// Check license status
|
157
|
+
const licenseDetails = QRCodeJs.getLicenseDetails();
|
158
|
+
if (licenseDetails) {
|
159
|
+
console.log('License active. Plan:', licenseDetails.plan);
|
160
|
+
}
|
161
|
+
|
162
|
+
// Now create instances with premium features enabled
|
163
|
+
const qrPremium = new QRCodeJs({
|
164
|
+
data: 'Premium QR Code',
|
165
|
+
borderOptions: {
|
166
|
+
hasBorder: true,
|
167
|
+
thickness: 30,
|
168
|
+
decorations: {
|
169
|
+
bottom: { enableText: true, value: 'My Custom Text' } // No branding!
|
170
|
+
}
|
171
|
+
}
|
172
|
+
});
|
173
|
+
```
|
174
|
+
|
175
|
+
*For full details on activation, persistence, configuration, and backend implementation, see the [License Management Guide](./docs/license-management.md#start).*
|
176
|
+
|
177
|
+
## 📚 Documentation
|
178
|
+
|
179
|
+
* **[Usage Guide](./docs/usage-guide.md#start):** Comprehensive guide covering all options.
|
180
|
+
* **[API Reference](./docs/api-reference-guide.md#start):** Detailed reference for all options, methods, and enums.
|
181
|
+
* **[TypeScript Definitions](./docs/typescript-types-definitions.md#start):** Full TypeScript type definitions.
|
182
|
+
* **[Basic Examples](./docs/examples.md#start):** Simple examples to get started.
|
183
|
+
* **[Advanced Examples](./docs/advanced-examples.md#start):** Complex customization examples.
|
184
|
+
* **[License Management](./docs/license-management.md#start):** Details on free vs. premium features and activation.
|
185
|
+
|
186
|
+
## 📜 License
|
187
|
+
|
188
|
+
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details. Premium features require a separate commercial license from [QR-Platform](https://qr-platform.com).
|