@liquid-js/qr-code-styling 1.6.0-rc.2 → 1.6.0-rc.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/README.md +2 -8
- package/lib/core/QROptions.d.ts +7 -2
- package/lib/qr-code-styling-node.js +11 -16
- package/lib/qr-code-styling-node.js.map +1 -1
- package/lib/qr-code-styling.js +1 -1
- package/lib/qr-code-styling.js.map +1 -1
- package/lib/tools/browserUtils.d.ts +3 -3
- package/lib/tools/sanitizeOptions.d.ts +2 -1
- package/lib/types/index.d.ts +6 -2
- package/package.json +3 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { QRCodeStyling } from "../core/QRCodeStyling";
|
|
2
|
-
import { FileExtension } from "../types";
|
|
3
|
-
export declare function drawToCanvas(qrCode: QRCodeStyling): {
|
|
2
|
+
import { CanvasOptions, FileExtension } from "../types";
|
|
3
|
+
export declare function drawToCanvas(qrCode: QRCodeStyling, options?: CanvasOptions): {
|
|
4
4
|
canvas: HTMLCanvasElement;
|
|
5
5
|
canvasDrawingPromise: Promise<void> | undefined;
|
|
6
6
|
} | undefined;
|
|
7
7
|
export declare function download(qrCode: QRCodeStyling, downloadOptions: FileExtension | {
|
|
8
8
|
name?: string;
|
|
9
9
|
extension: FileExtension;
|
|
10
|
-
}): Promise<void>;
|
|
10
|
+
}, options?: CanvasOptions): Promise<void>;
|
|
11
11
|
export declare function downloadURI(uri: string, name: string): void;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { RequiredOptions } from "../core/QROptions";
|
|
1
|
+
import { RequiredCanvasOptions, RequiredOptions } from "../core/QROptions";
|
|
2
2
|
export declare function sanitizeOptions(options: RequiredOptions): RequiredOptions;
|
|
3
|
+
export declare function sanitizeCanvasOptions(options: RequiredCanvasOptions): RequiredCanvasOptions;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export declare type Gradient = {
|
|
|
39
39
|
declare type TypeNumber = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40;
|
|
40
40
|
declare const TypeNumber: {
|
|
41
41
|
0: 0;
|
|
42
|
+
10: 10;
|
|
42
43
|
1: 1;
|
|
43
44
|
2: 2;
|
|
44
45
|
3: 3;
|
|
@@ -48,7 +49,6 @@ declare const TypeNumber: {
|
|
|
48
49
|
7: 7;
|
|
49
50
|
8: 8;
|
|
50
51
|
9: 9;
|
|
51
|
-
10: 10;
|
|
52
52
|
11: 11;
|
|
53
53
|
12: 12;
|
|
54
54
|
13: 13;
|
|
@@ -104,7 +104,6 @@ export declare type Options = {
|
|
|
104
104
|
shape?: ShapeType;
|
|
105
105
|
width?: number;
|
|
106
106
|
height?: number;
|
|
107
|
-
margin?: number;
|
|
108
107
|
data?: string;
|
|
109
108
|
image?: string | Buffer | Blob;
|
|
110
109
|
imageTools?: typeof browserImageTools;
|
|
@@ -140,6 +139,11 @@ export declare type Options = {
|
|
|
140
139
|
gradient?: Gradient;
|
|
141
140
|
} | false;
|
|
142
141
|
};
|
|
142
|
+
export declare type CanvasOptions = {
|
|
143
|
+
width?: number;
|
|
144
|
+
height?: number;
|
|
145
|
+
margin?: number;
|
|
146
|
+
};
|
|
143
147
|
export declare type FilterFunction = (i: number, j: number) => boolean;
|
|
144
148
|
export declare type DrawArgs = {
|
|
145
149
|
x: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liquid-js/qr-code-styling",
|
|
3
|
-
"version": "1.6.0-rc.
|
|
3
|
+
"version": "1.6.0-rc.3",
|
|
4
4
|
"description": "Add a style and an image to your QR code",
|
|
5
5
|
"main": "lib/qr-code-styling-node.js",
|
|
6
6
|
"browser": "lib/qr-code-styling-node.js",
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"build:dev": "webpack --mode=development --config webpack.config.build.js",
|
|
50
50
|
"test": "jest",
|
|
51
51
|
"start": "webpack serve --open --config webpack.config.dev-server.js",
|
|
52
|
-
"lint": "eslint . --fix"
|
|
52
|
+
"lint": "eslint . --fix",
|
|
53
|
+
"prepublishOnly": "npm run build"
|
|
53
54
|
},
|
|
54
55
|
"repository": {
|
|
55
56
|
"type": "git",
|