@vkontakte/vk-qr 2.0.13 → 3.0.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/LICENSE +1 -1
- package/README.md +3 -3
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1135 -0
- package/dist/index.js.map +1 -0
- package/dist/{types/qr.d.ts → qr.d.ts} +79 -87
- package/dist/qr.d.ts.map +1 -0
- package/dist/svg.d.ts +10 -0
- package/dist/svg.d.ts.map +1 -0
- package/dist/types.d.ts +57 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +55 -77
- package/src/index.ts +39 -26
- package/src/qr.ts +217 -179
- package/src/svg.ts +30 -14
- package/src/types.ts +19 -10
- package/dist/cjs/index.js +0 -1184
- package/dist/es/index.js +0 -1182
- package/dist/types/index.d.ts +0 -20
- package/dist/types/svg.d.ts +0 -8
- package/dist/types/types.d.ts +0 -47
- package/dist/umd/qrCodeGenerator.js +0 -1190
- package/dist/umd/qrCodeGenerator.min.js +0 -1
package/dist/types/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { QrOptions } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Generates SVG QR code by a text
|
|
4
|
-
* @param text String to encode
|
|
5
|
-
* @param options QR code options
|
|
6
|
-
*/
|
|
7
|
-
declare function createQR(text: string, options?: QrOptions): string;
|
|
8
|
-
/**
|
|
9
|
-
* Legacy interface
|
|
10
|
-
* @deprecated
|
|
11
|
-
* @param text String to encode
|
|
12
|
-
* @param qrSize Size of QR code
|
|
13
|
-
* @param className SVG element class name
|
|
14
|
-
* @param options Options of the QR code
|
|
15
|
-
*/
|
|
16
|
-
declare function createQR(text: string, qrSize: number, className: string, options?: QrOptions): string;
|
|
17
|
-
declare const _default: {
|
|
18
|
-
createQR: typeof createQR;
|
|
19
|
-
};
|
|
20
|
-
export default _default;
|
package/dist/types/svg.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { QrCode } from './qr';
|
|
2
|
-
import { QrOptions } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Converts QrCode instance to SVG code
|
|
5
|
-
* @param qrCode QrCode instance
|
|
6
|
-
* @param options Convertation options
|
|
7
|
-
*/
|
|
8
|
-
export declare const convertSegmentsToSvgString: (qrCode: QrCode, options: Required<QrOptions>) => string;
|
package/dist/types/types.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export declare type QrOptions = {
|
|
2
|
-
/**
|
|
3
|
-
* Size of QR code
|
|
4
|
-
* @default 128
|
|
5
|
-
*/
|
|
6
|
-
qrSize?: number;
|
|
7
|
-
/**
|
|
8
|
-
* Class name of root SVG element
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Show VK logo in center of QR code
|
|
13
|
-
* @default false
|
|
14
|
-
*/
|
|
15
|
-
isShowLogo?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Show QR background
|
|
18
|
-
* @default false
|
|
19
|
-
*/
|
|
20
|
-
isShowBackground?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* QR code background HEX color. Works if `isShowBackground` is enabled.
|
|
23
|
-
* @default "#ffffff"
|
|
24
|
-
*/
|
|
25
|
-
backgroundColor?: string;
|
|
26
|
-
/**
|
|
27
|
-
* QR code HEX color
|
|
28
|
-
*/
|
|
29
|
-
foregroundColor?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Color of logo
|
|
32
|
-
* @default "#000000"
|
|
33
|
-
*/
|
|
34
|
-
logoColor?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Reference to logo as a reference IRI
|
|
37
|
-
*/
|
|
38
|
-
logoData?: string | null;
|
|
39
|
-
/**
|
|
40
|
-
* SVG elements id postfix
|
|
41
|
-
*/
|
|
42
|
-
suffix?: string;
|
|
43
|
-
/**
|
|
44
|
-
* ECC Level
|
|
45
|
-
*/
|
|
46
|
-
ecc?: number;
|
|
47
|
-
};
|