@liquid-js/qr-code-styling 5.0.3 → 5.2.0
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 +12 -1
- package/lib/border-plugin.js +1 -1
- package/lib/border-plugin.js.map +1 -1
- package/lib/core/qr-svg.d.ts +1 -4
- package/lib/font-faces-plugin.js +2 -0
- package/lib/font-faces-plugin.js.map +1 -0
- package/lib/plugins/border.d.ts +14 -1
- package/lib/plugins/font-faces.d.ts +19 -0
- package/lib/qr-code-styling-node.js +59 -61
- 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/utils/options.d.ts +13 -5
- package/package.json +5 -1
package/lib/utils/options.d.ts
CHANGED
|
@@ -72,19 +72,19 @@ export interface Plugin {
|
|
|
72
72
|
*
|
|
73
73
|
* @returns Dot element; if undefined, try to use the next plugin or the default function
|
|
74
74
|
*/
|
|
75
|
-
drawDot?: (args: DrawArgs) => SVGElement | undefined;
|
|
75
|
+
drawDot?: (args: DrawArgs) => SVGElement | undefined | void;
|
|
76
76
|
/**
|
|
77
77
|
* Draw corner dot
|
|
78
78
|
*
|
|
79
79
|
* @returns Corner dot element; if undefined, try to use the next plugin or the default function
|
|
80
80
|
*/
|
|
81
|
-
drawCornerDot?: (args: DrawArgs) => SVGElement | undefined;
|
|
81
|
+
drawCornerDot?: (args: DrawArgs) => SVGElement | undefined | void;
|
|
82
82
|
/**
|
|
83
83
|
* Draw corner square
|
|
84
84
|
*
|
|
85
85
|
* @returns Corner square element and corner mask (used with ImageMode.background); if undefined, try to use the next plugin or the default function
|
|
86
86
|
*/
|
|
87
|
-
drawCornerSquare?: (args: DrawArgs) => readonly [SVGElement, SVGElement] | undefined;
|
|
87
|
+
drawCornerSquare?: (args: DrawArgs) => readonly [SVGElement, SVGElement] | undefined | void;
|
|
88
88
|
/**
|
|
89
89
|
* Alter the generated SVG, e.g. add borders
|
|
90
90
|
*/
|
|
@@ -95,10 +95,18 @@ export interface Options {
|
|
|
95
95
|
document: Document;
|
|
96
96
|
/** Use a custom image fetching & serializaton implementation */
|
|
97
97
|
imageTools?: typeof browserImageTools;
|
|
98
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* @ignore
|
|
100
|
+
* @deprecated kept for compatibility with older extensions, use options.size
|
|
101
|
+
*/
|
|
99
102
|
width: number;
|
|
100
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* @ignore
|
|
105
|
+
* @deprecated kept for compatibility with older extensions, use options.size
|
|
106
|
+
*/
|
|
101
107
|
height: number;
|
|
108
|
+
/** @ignore */
|
|
109
|
+
size: number;
|
|
102
110
|
/** The data will be encoded in the QR code */
|
|
103
111
|
data: string;
|
|
104
112
|
/** The image will be copied to the center of the QR code */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liquid-js/qr-code-styling",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.2.0",
|
|
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",
|
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
"./border-plugin": {
|
|
27
27
|
"types": "./lib/plugins/border.d.ts",
|
|
28
28
|
"default": "./lib/border-plugin.js"
|
|
29
|
+
},
|
|
30
|
+
"./font-faces-plugin": {
|
|
31
|
+
"types": "./lib/plugins/font-faces.d.ts",
|
|
32
|
+
"default": "./lib/font-faces-plugin.js"
|
|
29
33
|
}
|
|
30
34
|
},
|
|
31
35
|
"files": [
|