@qr-platform/qr-code.js 0.8.24 → 0.9.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/CHANGELOG.md +6 -0
- package/docs/advanced-examples.md +84 -0
- package/docs/api-reference-guide.md +38 -0
- package/docs/documentation.md +182 -0
- package/docs/examples.md +145 -27
- package/docs/template-update-plan.md +53 -0
- package/docs/usage-guide.md +47 -0
- package/lib/core/qr-code-js.d.ts +9 -0
- package/lib/core/qr-styles.d.ts +4 -0
- package/lib/index.d.ts +34 -7
- package/lib/index.js +1 -1
- package/lib/node.d.ts +34 -9
- package/lib/node.js +1 -1
- package/lib/types/style-options.d.ts +37 -0
- package/lib/utils/style-mapper.d.ts +13 -0
- package/package.json +1 -1
package/lib/node.d.ts
CHANGED
@@ -2,6 +2,7 @@ import { QRCodeJs as _QRCodeJs } from './core/qr-code-js';
|
|
2
2
|
import { type ValidationResult } from './license/LicenseManagerNode';
|
3
3
|
import type * as _browserUtils from './tools/browser-utils';
|
4
4
|
import { RecursivePartial } from './types/helper';
|
5
|
+
import { StyleOptions } from './types/style-options';
|
5
6
|
import { Options } from './utils/options';
|
6
7
|
import { ScanValidatorResponse } from './utils/scan-validators/abstract-scan-validator';
|
7
8
|
import { type DecodedLicenseToken } from './utils/token-validator';
|
@@ -34,25 +35,49 @@ export declare class QRCodeJs extends _QRCodeJs {
|
|
34
35
|
* Creates a QRCodeBuilder instance initialized with a specific template.
|
35
36
|
* Allows for fluent configuration chaining. We need it here to avoid circular dependency
|
36
37
|
* @param templateName - The name of the template to start with.
|
38
|
+
* @param templateNameOrOptions - The name of the template or a partial options object to start with.
|
37
39
|
* @returns A new QRCodeBuilder instance.
|
38
40
|
*/
|
39
|
-
static useTemplate(
|
41
|
+
static useTemplate(templateNameOrOptions: string | RecursivePartial<Options>): QRCodeBuilder;
|
42
|
+
/**
|
43
|
+
* Creates a QRCodeBuilder instance initialized with a specific style.
|
44
|
+
* Allows for fluent configuration chaining.
|
45
|
+
* @param styleNameOrOptions - The name of the predefined style or a StyleOptions object.
|
46
|
+
* @returns A new QRCodeBuilder instance.
|
47
|
+
*/
|
48
|
+
static useStyle(styleNameOrOptions: string | StyleOptions): QRCodeBuilder;
|
40
49
|
}
|
41
|
-
|
42
|
-
declare class QRCodeBuilder<T extends QRCodeJs> {
|
50
|
+
declare class QRCodeBuilder {
|
43
51
|
protected config: RecursivePartial<Options>;
|
44
|
-
protected qrCodeJsConstructor: QRCodeJsConstructor<T>;
|
45
52
|
/**
|
46
|
-
* Creates a new
|
47
|
-
* @param
|
53
|
+
* Creates a new QRCodeBuilder instance.
|
54
|
+
* @param templateNameOrOptions - Optional name of a predefined template or a partial options object to start with.
|
55
|
+
*/
|
56
|
+
constructor(templateNameOrOptions?: string | RecursivePartial<Options>);
|
57
|
+
/**
|
58
|
+
* Applies a template to the builder's configuration. Template options
|
59
|
+
* will be overridden by subsequently chained .style() or .options() calls.
|
60
|
+
* @param templateNameOrOptions - The name of the template or a partial options object to apply.
|
61
|
+
* @returns The builder instance for chaining.
|
48
62
|
*/
|
49
|
-
|
63
|
+
useTemplate(templateNameOrOptions: string | RecursivePartial<Options>): this;
|
50
64
|
/**
|
51
|
-
*
|
65
|
+
* Applies style options to the builder's configuration.
|
66
|
+
* @param styleNameOrOptions - Name of a predefined style or Style options object to apply.
|
67
|
+
* @returns The builder instance for chaining.
|
68
|
+
*/
|
69
|
+
useStyle(styleNameOrOptions: string | StyleOptions): this;
|
70
|
+
/**
|
71
|
+
* Merges the provided options into the builder's configuration.
|
52
72
|
* @param options - A partial options object to merge.
|
73
|
+
* @returns The builder instance for chaining.
|
74
|
+
*/
|
75
|
+
options(options: RecursivePartial<Options>): QRCodeJs;
|
76
|
+
/**
|
77
|
+
* Builds the QRCodeJs instance with the accumulated configuration.
|
53
78
|
* @returns The created QRCodeJs instance.
|
54
79
|
*/
|
55
|
-
|
80
|
+
build(): QRCodeJs;
|
56
81
|
}
|
57
82
|
export declare class _ extends QRCodeJs {
|
58
83
|
protected _hls(): boolean;
|