@liquid-js/qr-code-styling 2.2.3 → 2.4.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 +17 -0
- package/lib/kanji.d.ts +3 -0
- package/lib/kanji.js +2 -0
- package/lib/kanji.js.map +1 -0
- package/lib/qr-code-styling-node.js +17 -1
- 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/types/index.d.ts +7 -2
- package/package.json +5 -1
package/lib/types/index.d.ts
CHANGED
|
@@ -117,10 +117,11 @@ export declare enum Mode {
|
|
|
117
117
|
numeric = "Numeric",
|
|
118
118
|
alphanumeric = "Alphanumeric",
|
|
119
119
|
byte = "Byte",
|
|
120
|
-
kanji = "Kanji"
|
|
120
|
+
kanji = "Kanji",
|
|
121
|
+
unicode = "Unicode"
|
|
121
122
|
}
|
|
122
123
|
export interface QRCode {
|
|
123
|
-
addData(data: string, mode?: Mode): void;
|
|
124
|
+
addData(data: string, mode?: Mode.alphanumeric | Mode.byte | Mode.kanji | Mode.numeric): void;
|
|
124
125
|
make(): void;
|
|
125
126
|
getModuleCount(): number;
|
|
126
127
|
isDark(row: number, col: number): boolean;
|
|
@@ -230,6 +231,10 @@ export type Options = {
|
|
|
230
231
|
*/
|
|
231
232
|
margin?: number;
|
|
232
233
|
} | false;
|
|
234
|
+
/** `import { stringToBytesFuncs } from "@liquid-js/qr-code-styling/kanji";` to add Kanji support */
|
|
235
|
+
stringToBytesFuncs?: {
|
|
236
|
+
[encoding: string]: (s: string) => number[];
|
|
237
|
+
};
|
|
233
238
|
};
|
|
234
239
|
export type CanvasOptions = {
|
|
235
240
|
width?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liquid-js/qr-code-styling",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Add a style and an image to your QR code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/qr-code-styling-node.js",
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"node": "./lib/qr-code-styling-node.js",
|
|
15
15
|
"types": "./lib/index.d.ts",
|
|
16
16
|
"default": "./lib/qr-code-styling.js"
|
|
17
|
+
},
|
|
18
|
+
"./kanji": {
|
|
19
|
+
"types": "./lib/kanji.d.ts",
|
|
20
|
+
"default": "./lib/kanji.js"
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
"files": [
|