@liquid-js/qr-code-styling 4.0.5 → 4.0.7
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 +87 -81
- package/lib/core/qr-code-styling.d.ts +2 -2
- package/lib/core/qr-svg.d.ts +3 -3
- package/lib/figures/corner-dot.d.ts +2 -2
- package/lib/figures/corner-square.d.ts +2 -2
- package/lib/figures/dot.d.ts +2 -2
- package/lib/index.d.ts +9 -9
- package/lib/kanji.js +1 -1
- package/lib/kanji.js.map +1 -1
- package/lib/node.d.ts +12 -12
- package/lib/qr-code-styling-node.js +33 -30
- 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/browser-image-tools.d.ts +2 -2
- package/lib/tools/browser-utils.d.ts +3 -3
- package/lib/types/helper.d.ts +7 -7
- package/lib/utils/gradient.d.ts +4 -4
- package/lib/utils/options.d.ts +3 -3
- package/lib/utils/qrcode.d.ts +1 -1
- package/package.json +2 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const browserImageTools: {
|
|
2
|
-
toDataURL(url: string | Buffer | Blob)
|
|
3
|
-
getSize(src: string | Blob | Buffer, crossOrigin?: string)
|
|
2
|
+
toDataURL: (url: string | Buffer | Blob) => Promise<string>;
|
|
3
|
+
getSize: (src: string | Blob | Buffer, crossOrigin?: string) => Promise<{
|
|
4
4
|
width: number;
|
|
5
5
|
height: number;
|
|
6
6
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { QRCodeStyling } from
|
|
2
|
-
import { RecursivePartial } from
|
|
3
|
-
import { CanvasOptions } from
|
|
1
|
+
import { QRCodeStyling } from '../core/qr-code-styling.js';
|
|
2
|
+
import { RecursivePartial } from '../types/helper.js';
|
|
3
|
+
import { CanvasOptions } from '../utils/canvas-options.js';
|
|
4
4
|
export declare enum FileExtension {
|
|
5
5
|
svg = "svg",
|
|
6
6
|
png = "png",
|
package/lib/types/helper.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export type RecursivePartial<T> = {
|
|
2
|
-
[P in keyof T]?: T[P] extends
|
|
2
|
+
[P in keyof T]?: T[P] extends Array<infer U> ? Array<RecursivePartial<U>> : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];
|
|
3
3
|
};
|
|
4
|
-
export
|
|
4
|
+
export interface DrawArgs {
|
|
5
5
|
x: number;
|
|
6
6
|
y: number;
|
|
7
7
|
size: number;
|
|
8
8
|
rotation?: number;
|
|
9
9
|
getNeighbor?: (x: number, y: number) => boolean;
|
|
10
|
-
}
|
|
11
|
-
export
|
|
10
|
+
}
|
|
11
|
+
export interface BasicFigureDrawArgs {
|
|
12
12
|
x: number;
|
|
13
13
|
y: number;
|
|
14
14
|
size: number;
|
|
15
15
|
rotation?: number;
|
|
16
|
-
}
|
|
17
|
-
export
|
|
16
|
+
}
|
|
17
|
+
export interface RotateFigureArgs {
|
|
18
18
|
x: number;
|
|
19
19
|
y: number;
|
|
20
20
|
size: number;
|
|
21
21
|
rotation?: number;
|
|
22
22
|
draw: () => void;
|
|
23
|
-
}
|
|
23
|
+
}
|
package/lib/utils/gradient.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export declare enum GradientType {
|
|
|
2
2
|
radial = "radial",
|
|
3
3
|
linear = "linear"
|
|
4
4
|
}
|
|
5
|
-
export
|
|
5
|
+
export interface Gradient {
|
|
6
6
|
/**
|
|
7
7
|
* Type of gradient spread
|
|
8
8
|
*
|
|
@@ -16,11 +16,11 @@ export type Gradient = {
|
|
|
16
16
|
*/
|
|
17
17
|
rotation?: number;
|
|
18
18
|
/** Gradient colors. */
|
|
19
|
-
colorStops: {
|
|
19
|
+
colorStops: Array<{
|
|
20
20
|
/** Position of color in gradient range */
|
|
21
21
|
offset: number;
|
|
22
22
|
/** Color of stop in gradient range */
|
|
23
23
|
color: string;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
26
26
|
export declare function sanitizeGradient(gradient: Gradient): Gradient;
|
package/lib/utils/options.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ErrorCorrectionLevel, Mode, TypeNumber } from
|
|
2
|
-
import { browserImageTools } from
|
|
3
|
-
import { Gradient } from
|
|
1
|
+
import { ErrorCorrectionLevel, Mode, TypeNumber } from '@liquid-js/qrcode-generator/lib/qrcode/QRCodeMinimal.js';
|
|
2
|
+
import { browserImageTools } from '../tools/browser-image-tools.js';
|
|
3
|
+
import { Gradient } from './gradient.js';
|
|
4
4
|
export declare enum DotType {
|
|
5
5
|
dot = "dot",
|
|
6
6
|
randomDot = "random-dot",
|
package/lib/utils/qrcode.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liquid-js/qr-code-styling",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.7",
|
|
4
4
|
"description": "Generate styled QR codes on web or in Node",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/qr-code-styling-node.js",
|
|
@@ -24,25 +24,11 @@
|
|
|
24
24
|
"lib"
|
|
25
25
|
],
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@liquid-js/qrcode-generator": "^1.0.
|
|
27
|
+
"@liquid-js/qrcode-generator": "^1.0.2",
|
|
28
28
|
"@xmldom/xmldom": "^0.9.0",
|
|
29
29
|
"file-type": "^19.0.0",
|
|
30
30
|
"sharp": ">0.32.1 <1.0.0"
|
|
31
31
|
},
|
|
32
|
-
"peerDependenciesMeta": {
|
|
33
|
-
"@liquid-js/qrcode-generator": {
|
|
34
|
-
"optional": true
|
|
35
|
-
},
|
|
36
|
-
"@xmldom/xmldom": {
|
|
37
|
-
"optional": true
|
|
38
|
-
},
|
|
39
|
-
"file-type": {
|
|
40
|
-
"optional": true
|
|
41
|
-
},
|
|
42
|
-
"sharp": {
|
|
43
|
-
"optional": true
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
32
|
"repository": {
|
|
47
33
|
"type": "git",
|
|
48
34
|
"url": "git+https://github.com/Liquid-JS/qr-code-styling.git"
|