@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.
@@ -1,3 +1,2 @@
1
- import { _, QRCodeJs } from './index';
1
+ import { QRCodeJs } from './index';
2
2
  export default QRCodeJs;
3
- export { _ };
@@ -164,6 +164,5 @@ export declare class QRCodeJs {
164
164
  * Apply thresholding to enhance QR code contrast
165
165
  */
166
166
  private applyQRThreshold;
167
- protected _hls(): boolean;
168
167
  private _logValidationWarnings;
169
168
  }
@@ -33,7 +33,6 @@ export declare class QRSVG {
33
33
  private imageTools;
34
34
  private finalWidth;
35
35
  private finalHeight;
36
- private _hls;
37
36
  private _innerQrGroup;
38
37
  private _maskedQrGroup;
39
38
  _instanceId: number;
@@ -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 {
@@ -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, hs: () => boolean) => void;
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
  }