qrcode-matrix 0.1.1 → 1.0.0-beta.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/README.md +60 -42
- package/dist/qrcodeMatrix.umd.js +2061 -0
- package/dist/qrcodeMatrix.umd.min.js +6 -0
- package/lib/encode/sjis.d.ts +2 -0
- package/lib/encode/sjisData.d.ts +2 -0
- package/lib/encode/utf-8.d.ts +2 -0
- package/lib/index.d.ts +5 -0
- package/lib/lib/BitBuffer.d.ts +9 -0
- package/lib/lib/QRMatrix.d.ts +10 -0
- package/lib/lib/bch-encode.d.ts +31 -0
- package/lib/lib/draw.d.ts +4 -0
- package/lib/modes/Alphanumeric.d.ts +3 -0
- package/lib/modes/Byte.d.ts +3 -0
- package/lib/modes/Kanji.d.ts +3 -0
- package/lib/modes/Numeric.d.ts +3 -0
- package/lib/modes/mode.d.ts +6 -0
- package/lib/qrcode.d.ts +19 -0
- package/lib/qrcodeMatrix.es.js +1356 -0
- package/lib/qrcodeMatrix.js +1363 -0
- package/lib/utils.d.ts +26 -0
- package/package.json +21 -21
- package/LICENSE +0 -21
- package/dist/qrcodeMatrix.js +0 -1890
- package/dist/qrcodeMatrix.min.js +0 -6
- package/dist/qrcodeMatrix.utf8.js +0 -1417
- package/dist/qrcodeMatrix.utf8.min.js +0 -6
- package/index.js +0 -18
- package/onlyUTF8.js +0 -11
- package/src/.DS_Store +0 -0
- package/src/encode/.DS_Store +0 -0
- package/src/encode/sjis.js +0 -125
- package/src/encode/utf-8.js +0 -32
- package/src/index.js +0 -218
- package/src/modes/Alphanumeric.js +0 -55
- package/src/modes/Byte.js +0 -27
- package/src/modes/Kanji.js +0 -51
- package/src/modes/Numeric.js +0 -43
- package/src/qr.js +0 -154
- package/src/utils.js +0 -1113
package/lib/utils.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import BitMatrix from 'bitmatrix/lib/BitMatrix';
|
|
2
|
+
import BitBuffer from './lib/BitBuffer';
|
|
3
|
+
import QRMatrix from './lib/QRMatrix';
|
|
4
|
+
import { QRErrorCorrectionLevel, QRMode, getRSBlocks, getLengthInBits, getBufferForModes, getMaxDataCount, createData } from './lib/bch-encode';
|
|
5
|
+
declare const QRMaskPattern: {
|
|
6
|
+
PATTERN000: number;
|
|
7
|
+
PATTERN001: number;
|
|
8
|
+
PATTERN010: number;
|
|
9
|
+
PATTERN011: number;
|
|
10
|
+
PATTERN100: number;
|
|
11
|
+
PATTERN101: number;
|
|
12
|
+
PATTERN110: number;
|
|
13
|
+
PATTERN111: number;
|
|
14
|
+
};
|
|
15
|
+
declare const setupAllPositionProbePattern: (matrix: QRMatrix) => void;
|
|
16
|
+
declare const setupPositionAdjustPattern: (matrix: QRMatrix, typeNumber?: number) => void;
|
|
17
|
+
declare const setupTimingPattern: (matrix: BitMatrix) => void;
|
|
18
|
+
declare const setupTypeInfo: (matrix: BitMatrix, test: boolean, errorCorrectionLevel: number, maskPattern: number) => void;
|
|
19
|
+
declare var setupTypeNumber: (matrix: BitMatrix, test: boolean, typeNumber?: number) => void;
|
|
20
|
+
declare function mapInit(size: number): QRMatrix;
|
|
21
|
+
declare function getBaseQRMatrix(typeNumber: number): QRMatrix;
|
|
22
|
+
declare function copyMap(matrix: QRMatrix): QRMatrix;
|
|
23
|
+
declare function compareMap(m1: QRMatrix, m2: QRMatrix, type: string): QRMatrix;
|
|
24
|
+
declare const getLostPoint: (matrix: BitMatrix) => number;
|
|
25
|
+
declare const setupData: (matrix: QRMatrix, data: number[], maskPattern: number) => void;
|
|
26
|
+
export { QRMode, QRErrorCorrectionLevel, QRMaskPattern, BitBuffer, getBaseQRMatrix, setupAllPositionProbePattern, setupPositionAdjustPattern, setupTimingPattern, setupTypeInfo, setupTypeNumber, mapInit, copyMap, compareMap, createData, setupData, getLengthInBits, getLostPoint, getRSBlocks, getBufferForModes, getMaxDataCount };
|
package/package.json
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qrcode-matrix",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"description": "QRCode matrix generator",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "lib/qrcodeMatrix.js",
|
|
6
|
+
"browser": "dist/qrcodeMatrix.umd.js",
|
|
7
|
+
"module": "lib/qrcodeMatrix.es.js",
|
|
8
|
+
"types": "lib/index.d.ts",
|
|
6
9
|
"files": [
|
|
7
|
-
"src/*",
|
|
8
10
|
"dist/*",
|
|
9
|
-
"
|
|
10
|
-
"onlyUTF8.js"
|
|
11
|
+
"lib/*"
|
|
11
12
|
],
|
|
12
13
|
"homepage": "https://github.com/cnwhy/QRCode-matrix",
|
|
13
14
|
"scripts": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
15
|
+
"clean": "rimraf lib dist",
|
|
16
|
+
"precompile": "npm run clean",
|
|
17
|
+
"compile": "rollup -c",
|
|
18
|
+
"prepack": "npm run compile"
|
|
16
19
|
},
|
|
17
20
|
"author": {
|
|
18
21
|
"name": "cnwhy",
|
|
@@ -24,20 +27,17 @@
|
|
|
24
27
|
"url": "https://github.com/cnwhy/QRCode.git"
|
|
25
28
|
},
|
|
26
29
|
"dependencies": {
|
|
27
|
-
"
|
|
30
|
+
"bitmatrix": "^0.5.0"
|
|
28
31
|
},
|
|
29
32
|
"devDependencies": {
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"rollup-plugin-commonjs": "^9.1.4",
|
|
40
|
-
"rollup-plugin-json": "^3.0.0",
|
|
41
|
-
"rollup-plugin-node-resolve": "^3.3.0"
|
|
33
|
+
"rimraf": "^2.6.3",
|
|
34
|
+
"rollup": "^1.32.1",
|
|
35
|
+
"rollup-plugin-commonjs": "^9.3.4",
|
|
36
|
+
"rollup-plugin-node-resolve": "^5.2.0",
|
|
37
|
+
"rollup-plugin-typescript2": "^0.31.2",
|
|
38
|
+
"rollup-plugin-uglify": "^6.0.2",
|
|
39
|
+
"ts-node": "^8.3.0",
|
|
40
|
+
"tslib": "^2.3.1",
|
|
41
|
+
"typescript": "^3.5.3"
|
|
42
42
|
}
|
|
43
|
-
}
|
|
43
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018 cnwhy
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|