@vkontakte/vk-qr 2.1.1 → 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 +1 -1
- 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/{types/svg.d.ts → svg.d.ts} +10 -9
- package/dist/svg.d.ts.map +1 -0
- package/dist/{types/types.d.ts → types.d.ts} +57 -51
- package/dist/types.d.ts.map +1 -0
- package/package.json +55 -80
- package/src/index.ts +38 -26
- package/src/qr.ts +217 -179
- package/src/svg.ts +28 -12
- package/src/types.ts +15 -11
- package/dist/cjs/index.js +0 -1185
- package/dist/es/index.js +0 -1183
- package/dist/types/index.d.ts +0 -20
- package/dist/umd/qrCodeGenerator.js +0 -1191
- package/dist/umd/qrCodeGenerator.min.js +0 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ npm install @vkontakte/vk-qr
|
|
|
27
27
|
And use in your code
|
|
28
28
|
|
|
29
29
|
```js
|
|
30
|
-
import vkQr from '@vkontakte/vk-qr';
|
|
30
|
+
import * as vkQr from '@vkontakte/vk-qr';
|
|
31
31
|
|
|
32
32
|
// Returns SVG code of generated 256x256 QR code with VK logo
|
|
33
33
|
const qrSvg = vkQr.createQR('Text to encode', {
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { QrOptions } from './types.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Generates SVG QR code by a text
|
|
4
|
+
* @param text String to encode
|
|
5
|
+
* @param options QR code options
|
|
6
|
+
*/
|
|
7
|
+
export 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
|
+
export declare function createQR(text: string, qrSize: number, className: string, options?: QrOptions): string;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAqB,MAAM,YAAY,CAAC;AAc/D;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;AAEpE;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,SAAS,GAClB,MAAM,CAAC"}
|