reykit 1.0.144 → 1.0.146

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.
@@ -5,30 +5,53 @@
5
5
  * @Explain : Image methods.
6
6
  */
7
7
  /**
8
- * Generate and browser open QR code file.
8
+ * Generate QRCode URL.
9
9
  *
10
10
  * @param text - QRCode Text.
11
+ * @param options.width - Width of Minimum pixel.
12
+ * @param options.margin - Number of margin blank square.
13
+ * @returns QR code URL.
14
+ */
15
+ export declare function getQrcode(text: string, options?: {
16
+ width?: number;
17
+ margin?: number;
18
+ }): Promise<string>;
19
+ /**
20
+ * Generate QRCode URL and browser open file.
21
+ *
22
+ * @param text - QRCode Text.
23
+ * @param options.width - Width of Minimum pixel.
24
+ * @param options.margin - Number of margin blank square.
25
+ * @returns QR code URL.
11
26
  */
12
- export declare function openQrcode(text: string): Promise<void>;
27
+ export declare function openQrcode(text: string, options?: {
28
+ width?: number;
29
+ margin?: number;
30
+ }): Promise<string>;
13
31
  /**
14
- * Generate and browser download qrcode file.
32
+ * Generate QRCode URL and browser download file.
15
33
  *
16
34
  * @param text - QR code Text.
17
- * @param fileName - File name.
35
+ * @param options.fileName - File name.
36
+ * @param options.width - Width of Minimum pixel.
37
+ * @param options.margin - Number of margin blank square.
38
+ * @returns QR code URL.
18
39
  */
19
- export declare function downloadQrcode(text: string, fileName?: string): Promise<void>;
40
+ export declare function downloadQrcode(text: string, options?: {
41
+ fileName?: string;
42
+ width?: number;
43
+ margin?: number;
44
+ }): Promise<string>;
20
45
  /**
21
46
  * Generate QRCode URL and set to element `src` attribute.
22
47
  *
23
48
  * @param text - QRCode Text.
24
- * @param options.element - Element instance or id.
25
- * - `undefined` : Not set.
49
+ * @param element - Element instance or id.
26
50
  * @param options.width - Width of Minimum pixel.
27
51
  * @param options.margin - Number of margin blank square.
28
52
  * @returns QR code URL.
29
53
  */
30
- export declare function getQrcodeUrl(text: string, options?: {
31
- element?: HTMLElement | string;
54
+ export declare function setQrcode(text: string, element: HTMLElement | string, options?: {
32
55
  width?: number;
33
56
  margin?: number;
34
57
  }): Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reykit",
3
- "version": "1.0.144",
3
+ "version": "1.0.146",
4
4
  "description": "Kit method set.",
5
5
  "author": "reyxbo",
6
6
  "keywords": [