@qr-platform/qr-code.js 0.11.10 → 0.20.1
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/LICENSE.md +32 -42
- package/README.md +13 -56
- package/docs/advanced-examples.md +4 -28
- package/docs/api-reference-guide.md +3 -11
- package/docs/commercial-use.md +68 -0
- package/docs/documentation.md +34 -324
- package/docs/examples.md +2 -7
- package/docs/typescript-types-definitions.md +2 -19
- package/docs/usage-guide.md +5 -36
- package/lib/browser.d.ts +1 -2
- package/lib/browser.js +3 -3
- package/lib/core/qr-code-js.d.ts +0 -1
- package/lib/core/qr-svg.d.ts +0 -1
- package/lib/esm.js +3 -3
- package/lib/index.d.ts +0 -34
- package/lib/index.js +1 -1
- package/lib/node/browser.d.ts +1 -2
- package/lib/node/core/qr-code-js.d.ts +0 -1
- package/lib/node/core/qr-svg.d.ts +0 -1
- package/lib/node/index.d.ts +0 -34
- package/lib/node/node.d.ts +0 -17
- package/lib/node/plugins/QRBorderPlugin.d.ts +1 -2
- package/lib/node.d.ts +0 -17
- package/lib/node.js +1 -1
- package/lib/plugins/QRBorderPlugin.d.ts +1 -2
- package/package.json +1 -1
- package/docs/license-management.md +0 -492
- package/lib/license/LicenseManager.d.ts +0 -69
- package/lib/license/LicenseManagerNode.d.ts +0 -64
- package/lib/node/license/LicenseManager.d.ts +0 -69
- package/lib/node/license/LicenseManagerNode.d.ts +0 -64
- package/lib/node/utils/token-validator.d.ts +0 -19
- package/lib/utils/token-validator.d.ts +0 -19
package/lib/node/browser.d.ts
CHANGED
package/lib/node/index.d.ts
CHANGED
|
@@ -5,13 +5,11 @@ import { StyleOptions } from './types/style-options';
|
|
|
5
5
|
import { TextOptions } from './types/text-options';
|
|
6
6
|
import { type Options as _QRCodeJsOptions, type BorderOptions } from './utils/options';
|
|
7
7
|
import { ScanValidatorResponse } from './utils/scan-validators/abstract-scan-validator';
|
|
8
|
-
import { type DecodedLicenseToken } from './utils/token-validator';
|
|
9
8
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from './lib/qrcode/QRCodeMinimal';
|
|
10
9
|
export { type ExtensionFunction } from './core/qr-code-js';
|
|
11
10
|
export { type RecursivePartial } from './types/helper';
|
|
12
11
|
export { type CanvasOptions } from './utils/canvas-options';
|
|
13
12
|
export { GradientType, type Gradient } from './utils/gradient';
|
|
14
|
-
export { STORAGE_KEY } from './license/LicenseManager';
|
|
15
13
|
export { type BorderOptions, // Keep exporting the type
|
|
16
14
|
CornerDotType, CornerSquareType, DotType, ImageMode, ShapeType } from './utils/options.js';
|
|
17
15
|
export type Options = RecursivePartial<_QRCodeJsOptions>;
|
|
@@ -19,37 +17,6 @@ export type { Options as QRCodeJsOptions };
|
|
|
19
17
|
type QRCodeJsConstructor = new (options: Options, internal?: boolean) => QRCodeJs;
|
|
20
18
|
export declare class QRCodeJs extends _QRCodeJs {
|
|
21
19
|
constructor(options: RecursivePartial<_QRCodeJsOptions>, _?: boolean);
|
|
22
|
-
protected _hls(): boolean;
|
|
23
|
-
static initializeIfNeeded(): Promise<boolean>;
|
|
24
|
-
static get hls(): boolean;
|
|
25
|
-
static getLicenseDetails(): DecodedLicenseToken | null;
|
|
26
|
-
static configureLicenseFetcher(fetcher: (licenseKey: string) => Promise<string>): void;
|
|
27
|
-
/**
|
|
28
|
-
* Activate the license using a pre-fetched JWT token via LicenseManager.
|
|
29
|
-
* @param token The JWT token string, or null to clear the license.
|
|
30
|
-
* @returns A Promise resolving to the validation result.
|
|
31
|
-
*/
|
|
32
|
-
static token(token: string | null): Promise<{
|
|
33
|
-
isValid: boolean;
|
|
34
|
-
token: string | null;
|
|
35
|
-
license: DecodedLicenseToken | null;
|
|
36
|
-
}>;
|
|
37
|
-
/**
|
|
38
|
-
* Sets the default URL used by the built-in license fetcher.
|
|
39
|
-
* Call this *before* activating with a key if you are not providing a custom fetcher.
|
|
40
|
-
* @param url The new default URL for fetching license tokens.
|
|
41
|
-
*/
|
|
42
|
-
static setLicenseUrl(url: string): typeof QRCodeJs;
|
|
43
|
-
/**
|
|
44
|
-
* Activate the license using a license key via LicenseManager.
|
|
45
|
-
* @param licenseKey The license key string.
|
|
46
|
-
* @returns A Promise resolving to the validation result.
|
|
47
|
-
*/
|
|
48
|
-
static license(licenseKey: string): Promise<{
|
|
49
|
-
isValid: boolean;
|
|
50
|
-
token: string | null;
|
|
51
|
-
license: DecodedLicenseToken | null;
|
|
52
|
-
}>;
|
|
53
20
|
validateScanning(_validatorId?: string, // Default validator
|
|
54
21
|
debug?: boolean): Promise<ScanValidatorResponse>;
|
|
55
22
|
/**
|
|
@@ -121,7 +88,6 @@ export declare class QRCodeJs extends _QRCodeJs {
|
|
|
121
88
|
static useSettings(settings: SettingsOptions): QRCodeBuilder;
|
|
122
89
|
}
|
|
123
90
|
export declare class _ extends QRCodeJs {
|
|
124
|
-
protected _hls(): boolean;
|
|
125
91
|
constructor(options: Options);
|
|
126
92
|
}
|
|
127
93
|
export declare class QRCodeBuilder {
|
package/lib/node/node.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { QRCodeJs as _QRCodeJs } from './core/qr-code-js';
|
|
2
|
-
import { type ValidationResult } from './license/LicenseManagerNode';
|
|
3
2
|
import { MethodOverrideOptions, RecursivePartial } from './types/helper';
|
|
4
3
|
import { SettingsOptions } from './types/settings-options';
|
|
5
4
|
import { StyleOptions } from './types/style-options';
|
|
@@ -7,7 +6,6 @@ import { TextOptions } from './types/text-options';
|
|
|
7
6
|
import { Options, type BorderOptions } from './utils/options';
|
|
8
7
|
import { ImageDataLike } from './utils/scan-validator-worker';
|
|
9
8
|
import { ScanValidatorResponse } from './utils/scan-validators/abstract-scan-validator';
|
|
10
|
-
import { type DecodedLicenseToken } from './utils/token-validator';
|
|
11
9
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal';
|
|
12
10
|
export { type ExtensionFunction } from './core/qr-code-js';
|
|
13
11
|
export { type RecursivePartial } from './types/helper';
|
|
@@ -17,19 +15,6 @@ export { CornerDotType, CornerSquareType, DotType, ImageMode, ShapeType, type Op
|
|
|
17
15
|
export { ErrorCorrectionPercents } from './utils/qrcode';
|
|
18
16
|
type QRCodeJsConstructor = new (options: RecursivePartial<Options>, internal?: boolean) => QRCodeJs;
|
|
19
17
|
export declare class QRCodeJs extends _QRCodeJs {
|
|
20
|
-
static initializeIfNeeded(): Promise<boolean>;
|
|
21
|
-
static get hls(): boolean;
|
|
22
|
-
protected _hls(): boolean;
|
|
23
|
-
static getLicenseDetails(): DecodedLicenseToken | null;
|
|
24
|
-
static configureLicenseFetcher(fetcher: (licenseKey: string) => Promise<string>): void;
|
|
25
|
-
static token(token: string | null): Promise<ValidationResult>;
|
|
26
|
-
static license(licenseKey: string): Promise<ValidationResult>;
|
|
27
|
-
/**
|
|
28
|
-
* Sets the absolute URL used by the built-in license fetcher.
|
|
29
|
-
* MUST be called before using .license('key') if not providing a custom fetcher.
|
|
30
|
-
* @param url The absolute URL for fetching license tokens (e.g., https://api.example.com/get-token).
|
|
31
|
-
*/
|
|
32
|
-
static setLicenseUrl(url: string): typeof QRCodeJs;
|
|
33
18
|
static _xmldomSync: any;
|
|
34
19
|
static _initPromise: Promise<void> | null;
|
|
35
20
|
static initXmldom(): Promise<void>;
|
|
@@ -218,7 +203,5 @@ export declare class QRCodeBuilder {
|
|
|
218
203
|
build(): QRCodeJs;
|
|
219
204
|
}
|
|
220
205
|
export declare class _ extends QRCodeJs {
|
|
221
|
-
protected _hls(): boolean;
|
|
222
|
-
static get hls(): boolean;
|
|
223
206
|
constructor(options: RecursivePartial<Options>);
|
|
224
207
|
}
|
|
@@ -29,8 +29,7 @@ type QRBorderPluginFn = (options: BorderOptions) => (svgElement: SVGElement, set
|
|
|
29
29
|
[key in Position]: number;
|
|
30
30
|
}, bordersInner: {
|
|
31
31
|
[key in Position]: number;
|
|
32
|
-
}, noBorderThickness: number
|
|
32
|
+
}, noBorderThickness: number) => void;
|
|
33
33
|
export declare const isBorderSideEnabled: (options: BorderOptions, position: Position) => boolean;
|
|
34
|
-
export declare const isBorderSideEnabledBottom: (options: BorderOptions, position: Position, _hls: boolean) => boolean;
|
|
35
34
|
declare const QRBorderPlugin: QRBorderPluginFn;
|
|
36
35
|
export { QRBorderPlugin };
|
package/lib/node.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { QRCodeJs as _QRCodeJs } from './core/qr-code-js';
|
|
2
|
-
import { type ValidationResult } from './license/LicenseManagerNode';
|
|
3
2
|
import { MethodOverrideOptions, RecursivePartial } from './types/helper';
|
|
4
3
|
import { SettingsOptions } from './types/settings-options';
|
|
5
4
|
import { StyleOptions } from './types/style-options';
|
|
@@ -7,7 +6,6 @@ import { TextOptions } from './types/text-options';
|
|
|
7
6
|
import { Options, type BorderOptions } from './utils/options';
|
|
8
7
|
import { ImageDataLike } from './utils/scan-validator-worker';
|
|
9
8
|
import { ScanValidatorResponse } from './utils/scan-validators/abstract-scan-validator';
|
|
10
|
-
import { type DecodedLicenseToken } from './utils/token-validator';
|
|
11
9
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal';
|
|
12
10
|
export { type ExtensionFunction } from './core/qr-code-js';
|
|
13
11
|
export { type RecursivePartial } from './types/helper';
|
|
@@ -17,19 +15,6 @@ export { CornerDotType, CornerSquareType, DotType, ImageMode, ShapeType, type Op
|
|
|
17
15
|
export { ErrorCorrectionPercents } from './utils/qrcode';
|
|
18
16
|
type QRCodeJsConstructor = new (options: RecursivePartial<Options>, internal?: boolean) => QRCodeJs;
|
|
19
17
|
export declare class QRCodeJs extends _QRCodeJs {
|
|
20
|
-
static initializeIfNeeded(): Promise<boolean>;
|
|
21
|
-
static get hls(): boolean;
|
|
22
|
-
protected _hls(): boolean;
|
|
23
|
-
static getLicenseDetails(): DecodedLicenseToken | null;
|
|
24
|
-
static configureLicenseFetcher(fetcher: (licenseKey: string) => Promise<string>): void;
|
|
25
|
-
static token(token: string | null): Promise<ValidationResult>;
|
|
26
|
-
static license(licenseKey: string): Promise<ValidationResult>;
|
|
27
|
-
/**
|
|
28
|
-
* Sets the absolute URL used by the built-in license fetcher.
|
|
29
|
-
* MUST be called before using .license('key') if not providing a custom fetcher.
|
|
30
|
-
* @param url The absolute URL for fetching license tokens (e.g., https://api.example.com/get-token).
|
|
31
|
-
*/
|
|
32
|
-
static setLicenseUrl(url: string): typeof QRCodeJs;
|
|
33
18
|
static _xmldomSync: any;
|
|
34
19
|
static _initPromise: Promise<void> | null;
|
|
35
20
|
static initXmldom(): Promise<void>;
|
|
@@ -218,7 +203,5 @@ export declare class QRCodeBuilder {
|
|
|
218
203
|
build(): QRCodeJs;
|
|
219
204
|
}
|
|
220
205
|
export declare class _ extends QRCodeJs {
|
|
221
|
-
protected _hls(): boolean;
|
|
222
|
-
static get hls(): boolean;
|
|
223
206
|
constructor(options: RecursivePartial<Options>);
|
|
224
207
|
}
|