@qr-platform/qr-code.js 0.8.22 → 0.8.24
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/lib/core/qr-code-js.d.ts +2 -0
- package/lib/core/qr-templates.d.ts +1 -0
- package/lib/index.d.ts +17 -3
- package/lib/index.js +1 -1
- package/lib/node.d.ts +18 -3
- package/lib/node.js +1 -1
- package/package.json +1 -1
- package/lib/builder/index.d.ts +0 -13
- package/lib/builder/node.d.ts +0 -13
- package/lib/builder/qr-code-builder.d.ts +0 -25
package/lib/core/qr-code-js.d.ts
CHANGED
@@ -9,6 +9,8 @@ export declare enum FileExtension {
|
|
9
9
|
}
|
10
10
|
export type ExtensionFunction = (svg: SVGElement, options: RecursivePartial<Options>) => void;
|
11
11
|
export declare class QRCodeJs {
|
12
|
+
/** Library version injected at build time */
|
13
|
+
static version: string;
|
12
14
|
private static _selectedTemplate;
|
13
15
|
private options;
|
14
16
|
private container?;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { type Options } from '~/utils/options';
|
2
2
|
import { RecursivePartial } from '~/types/helper';
|
3
|
+
export declare const plainQRTemplate: RecursivePartial<Options>;
|
3
4
|
export declare const basicQRTemplate: RecursivePartial<Options>;
|
4
5
|
export declare const roundedQRTemplate: RecursivePartial<Options>;
|
5
6
|
export declare const dotsQRTemplate: RecursivePartial<Options>;
|
package/lib/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { QRCodeBuilder } from './builder';
|
2
1
|
import { QRCodeJs as _QRCodeJs } from './core/qr-code-js';
|
3
|
-
import {
|
2
|
+
import { RecursivePartial } from './types/helper';
|
3
|
+
import { Options, type Options as QRCodeJsOptions } from './utils/options';
|
4
4
|
import { ScanValidatorResponse } from './utils/scan-validators/abstract-scan-validator';
|
5
5
|
import { type DecodedLicenseToken } from './utils/token-validator';
|
6
6
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from './lib/qrcode/QRCodeMinimal';
|
@@ -48,7 +48,7 @@ export declare class QRCodeJs extends _QRCodeJs {
|
|
48
48
|
debug?: boolean): Promise<ScanValidatorResponse>;
|
49
49
|
/**
|
50
50
|
* Creates a QRCodeBuilder instance initialized with a specific template.
|
51
|
-
* Allows for fluent configuration chaining.
|
51
|
+
* Allows for fluent configuration chaining. We need it here to avoid circular dependency
|
52
52
|
* @param templateName - The name of the template to start with.
|
53
53
|
* @returns A new QRCodeBuilder instance.
|
54
54
|
*/
|
@@ -58,3 +58,17 @@ export declare class _ extends QRCodeJs {
|
|
58
58
|
protected _hls(): boolean;
|
59
59
|
constructor(options: QRCodeJsOptions);
|
60
60
|
}
|
61
|
+
declare class QRCodeBuilder {
|
62
|
+
protected config: RecursivePartial<Options>;
|
63
|
+
/**
|
64
|
+
* Creates a new QRCodeBuilderCore instance.
|
65
|
+
* @param templateName - Optional name of a predefined template to start with.
|
66
|
+
*/
|
67
|
+
constructor(templateName?: string);
|
68
|
+
/**
|
69
|
+
* Merges the provided options into the builder's configuration and creates the QRCodeJs instance.
|
70
|
+
* @param options - A partial options object to merge.
|
71
|
+
* @returns The created QRCodeJs instance.
|
72
|
+
*/
|
73
|
+
options(options: RecursivePartial<Options>): QRCodeJs;
|
74
|
+
}
|