@qr-platform/qr-code.js 0.10.5 → 0.10.6
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/lib/core/qr-code-js.d.ts +4 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +1 -1
- package/lib/node/core/qr-code-js.d.ts +4 -0
- package/lib/node/index.d.ts +0 -1
- package/lib/node/node.d.ts +0 -3
- package/lib/node/templates/borders-inner-outter.d.ts +0 -3
- package/lib/node/templates/borders-inner.d.ts +0 -3
- package/lib/node/templates/borders-no-license.d.ts +0 -3
- package/lib/node/templates/borders-outter.d.ts +0 -3
- package/lib/node/templates/borders-text-auto-curved.d.ts +0 -3
- package/lib/node/templates/borders-text-full-curved.d.ts +0 -3
- package/lib/node/templates/borders.d.ts +0 -3
- package/lib/node/templates/scales.d.ts +0 -3
- package/lib/node/utils/canvas-options.d.ts +3 -0
- package/lib/node/utils/options.d.ts +6 -0
- package/lib/node.d.ts +0 -3
- package/lib/node.js +1 -1
- package/lib/templates/borders-inner-outter.d.ts +0 -3
- package/lib/templates/borders-inner.d.ts +0 -3
- package/lib/templates/borders-no-license.d.ts +0 -3
- package/lib/templates/borders-outter.d.ts +0 -3
- package/lib/templates/borders-text-auto-curved.d.ts +0 -3
- package/lib/templates/borders-text-full-curved.d.ts +0 -3
- package/lib/templates/borders.d.ts +0 -3
- package/lib/templates/scales.d.ts +0 -3
- package/lib/utils/canvas-options.d.ts +3 -0
- package/lib/utils/options.d.ts +6 -0
- package/package.json +1 -1
- package/lib/node/tools/browser-utils.d.ts +0 -18
- package/lib/tools/browser-utils.d.ts +0 -18
|
@@ -151,6 +151,10 @@ export declare class QRCodeJs {
|
|
|
151
151
|
canvas: HTMLCanvasElement;
|
|
152
152
|
canvasDrawingPromise: Promise<void> | undefined;
|
|
153
153
|
} | undefined>;
|
|
154
|
+
protected _drawToCanvasPrevious(options?: RecursivePartial<CanvasOptions>): Promise<{
|
|
155
|
+
canvas: HTMLCanvasElement;
|
|
156
|
+
canvasDrawingPromise: Promise<void> | undefined;
|
|
157
|
+
} | undefined>;
|
|
154
158
|
private downloadURI;
|
|
155
159
|
download(downloadOptions?: {
|
|
156
160
|
name?: string;
|
package/lib/node/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import { ScanValidatorResponse } from './utils/scan-validators/abstract-scan-val
|
|
|
8
8
|
import { type DecodedLicenseToken } from './utils/token-validator';
|
|
9
9
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from './lib/qrcode/QRCodeMinimal';
|
|
10
10
|
export { type ExtensionFunction } from './core/qr-code-js';
|
|
11
|
-
export { FileExtension } from './tools/browser-utils';
|
|
12
11
|
export { type RecursivePartial } from './types/helper';
|
|
13
12
|
export { type CanvasOptions } from './utils/canvas-options';
|
|
14
13
|
export { GradientType, type Gradient } from './utils/gradient';
|
package/lib/node/node.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { QRCodeJs as _QRCodeJs } from './core/qr-code-js';
|
|
2
2
|
import { type ValidationResult } from './license/LicenseManagerNode';
|
|
3
|
-
import type * as _browserUtils from './tools/browser-utils';
|
|
4
3
|
import { MethodOverrideOptions, RecursivePartial } from './types/helper';
|
|
5
4
|
import { SettingsOptions } from './types/settings-options';
|
|
6
5
|
import { StyleOptions } from './types/style-options';
|
|
@@ -11,13 +10,11 @@ import { ScanValidatorResponse } from './utils/scan-validators/abstract-scan-val
|
|
|
11
10
|
import { type DecodedLicenseToken } from './utils/token-validator';
|
|
12
11
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal';
|
|
13
12
|
export { type ExtensionFunction } from './core/qr-code-js';
|
|
14
|
-
export { FileExtension } from './tools/browser-utils';
|
|
15
13
|
export { type RecursivePartial } from './types/helper';
|
|
16
14
|
export { type CanvasOptions } from './utils/canvas-options';
|
|
17
15
|
export { GradientType, type Gradient } from './utils/gradient';
|
|
18
16
|
export { CornerDotType, CornerSquareType, DotType, ImageMode, ShapeType, type Options, type BorderOptions } from './utils/options';
|
|
19
17
|
export { ErrorCorrectionPercents } from './utils/qrcode';
|
|
20
|
-
export declare const browserUtils: typeof _browserUtils | undefined;
|
|
21
18
|
type QRCodeJsConstructor = new (options: RecursivePartial<Options>, internal?: boolean) => QRCodeJs;
|
|
22
19
|
export declare class QRCodeJs extends _QRCodeJs {
|
|
23
20
|
static initializeIfNeeded(): Promise<boolean>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as _browserUtils from '../tools/browser-utils.js';
|
|
2
1
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal.js';
|
|
3
2
|
export { QRCodeJs, type ExtensionFunction } from '../core/qr-code-js.js';
|
|
4
|
-
export { FileExtension } from '../tools/browser-utils.js';
|
|
5
3
|
export { type RecursivePartial } from '../types/helper.js';
|
|
6
4
|
export { type CanvasOptions } from '../utils/canvas-options.js';
|
|
7
5
|
export { GradientType, type Gradient } from '../utils/gradient';
|
|
@@ -126,4 +124,3 @@ export declare const codes: {
|
|
|
126
124
|
};
|
|
127
125
|
};
|
|
128
126
|
}[];
|
|
129
|
-
export declare const browserUtils: typeof _browserUtils | undefined;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as _browserUtils from '../tools/browser-utils.js';
|
|
2
1
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal.js';
|
|
3
2
|
export { QRCodeJs, type ExtensionFunction } from '../core/qr-code-js.js';
|
|
4
|
-
export { FileExtension } from '../tools/browser-utils.js';
|
|
5
3
|
export { type RecursivePartial } from '../types/helper.js';
|
|
6
4
|
export { type CanvasOptions } from '../utils/canvas-options.js';
|
|
7
5
|
export { GradientType, type Gradient } from '../utils/gradient';
|
|
@@ -126,4 +124,3 @@ export declare const codes: {
|
|
|
126
124
|
};
|
|
127
125
|
};
|
|
128
126
|
}[];
|
|
129
|
-
export declare const browserUtils: typeof _browserUtils | undefined;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as _browserUtils from '../tools/browser-utils.js';
|
|
2
1
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal.js';
|
|
3
2
|
export { QRCodeJs, type ExtensionFunction } from '../core/qr-code-js.js';
|
|
4
|
-
export { FileExtension } from '../tools/browser-utils.js';
|
|
5
3
|
export { type RecursivePartial } from '../types/helper.js';
|
|
6
4
|
export { type CanvasOptions } from '../utils/canvas-options.js';
|
|
7
5
|
export { GradientType, type Gradient } from '../utils/gradient.js';
|
|
@@ -126,4 +124,3 @@ export declare const codes: {
|
|
|
126
124
|
};
|
|
127
125
|
};
|
|
128
126
|
}[];
|
|
129
|
-
export declare const browserUtils: typeof _browserUtils | undefined;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as _browserUtils from '../tools/browser-utils.js';
|
|
2
1
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal.js';
|
|
3
2
|
export { QRCodeJs, type ExtensionFunction } from '../core/qr-code-js.js';
|
|
4
|
-
export { FileExtension } from '../tools/browser-utils.js';
|
|
5
3
|
export { type RecursivePartial } from '../types/helper.js';
|
|
6
4
|
export { type CanvasOptions } from '../utils/canvas-options.js';
|
|
7
5
|
export { GradientType, type Gradient } from '../utils/gradient';
|
|
@@ -126,4 +124,3 @@ export declare const codes: {
|
|
|
126
124
|
};
|
|
127
125
|
};
|
|
128
126
|
}[];
|
|
129
|
-
export declare const browserUtils: typeof _browserUtils | undefined;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as _browserUtils from '../tools/browser-utils.js';
|
|
2
1
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal.js';
|
|
3
2
|
export { QRCodeJs, type ExtensionFunction } from '../core/qr-code-js.js';
|
|
4
|
-
export { FileExtension } from '../tools/browser-utils.js';
|
|
5
3
|
export { type RecursivePartial } from '../types/helper.js';
|
|
6
4
|
export { type CanvasOptions } from '../utils/canvas-options.js';
|
|
7
5
|
export { GradientType, type Gradient } from '../utils/gradient';
|
|
@@ -126,4 +124,3 @@ export declare const codes: {
|
|
|
126
124
|
};
|
|
127
125
|
};
|
|
128
126
|
}[];
|
|
129
|
-
export declare const browserUtils: typeof _browserUtils | undefined;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as _browserUtils from '../tools/browser-utils.js';
|
|
2
1
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal.js';
|
|
3
2
|
export { QRCodeJs, type ExtensionFunction } from '../core/qr-code-js.js';
|
|
4
|
-
export { FileExtension } from '../tools/browser-utils.js';
|
|
5
3
|
export { type RecursivePartial } from '../types/helper.js';
|
|
6
4
|
export { type CanvasOptions } from '../utils/canvas-options.js';
|
|
7
5
|
export { GradientType, type Gradient } from '../utils/gradient';
|
|
@@ -130,4 +128,3 @@ export declare const codes: {
|
|
|
130
128
|
};
|
|
131
129
|
};
|
|
132
130
|
}[];
|
|
133
|
-
export declare const browserUtils: typeof _browserUtils | undefined;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as _browserUtils from '../tools/browser-utils.js';
|
|
2
1
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal.js';
|
|
3
2
|
export { QRCodeJs, type ExtensionFunction } from '../core/qr-code-js.js';
|
|
4
|
-
export { FileExtension } from '../tools/browser-utils.js';
|
|
5
3
|
export { type RecursivePartial } from '../types/helper.js';
|
|
6
4
|
export { type CanvasOptions } from '../utils/canvas-options.js';
|
|
7
5
|
export { GradientType, type Gradient } from '../utils/gradient';
|
|
@@ -126,4 +124,3 @@ export declare const codes: {
|
|
|
126
124
|
};
|
|
127
125
|
};
|
|
128
126
|
}[];
|
|
129
|
-
export declare const browserUtils: typeof _browserUtils | undefined;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as _browserUtils from '../tools/browser-utils.js';
|
|
2
1
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal.js';
|
|
3
2
|
export { QRCodeJs, type ExtensionFunction } from '../core/qr-code-js.js';
|
|
4
|
-
export { FileExtension } from '../tools/browser-utils.js';
|
|
5
3
|
export { type RecursivePartial } from '../types/helper.js';
|
|
6
4
|
export { type CanvasOptions } from '../utils/canvas-options.js';
|
|
7
5
|
export { GradientType, type Gradient } from '../utils/gradient';
|
|
@@ -127,4 +125,3 @@ export declare const codes: {
|
|
|
127
125
|
};
|
|
128
126
|
};
|
|
129
127
|
}[];
|
|
130
|
-
export declare const browserUtils: typeof _browserUtils | undefined;
|
|
@@ -2,6 +2,9 @@ export interface CanvasOptions {
|
|
|
2
2
|
width: number;
|
|
3
3
|
height: number;
|
|
4
4
|
margin: number;
|
|
5
|
+
antialias: boolean;
|
|
6
|
+
antialiasLevel: 'low' | 'medium' | 'high';
|
|
7
|
+
antialiasFactor: number;
|
|
5
8
|
}
|
|
6
9
|
export declare const defaultCanvasOptions: CanvasOptions;
|
|
7
10
|
export declare function sanitizeCanvasOptions(options: CanvasOptions): CanvasOptions;
|
|
@@ -3,6 +3,12 @@ import { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinim
|
|
|
3
3
|
import { QRBorderPluginStyleOptions } from '../plugins/QRBorderPlugin';
|
|
4
4
|
import { browserImageTools } from '../tools/browser-image-tools';
|
|
5
5
|
import { Gradient } from './gradient';
|
|
6
|
+
export declare enum FileExtension {
|
|
7
|
+
svg = "svg",
|
|
8
|
+
png = "png",
|
|
9
|
+
jpeg = "jpeg",
|
|
10
|
+
webp = "webp"
|
|
11
|
+
}
|
|
6
12
|
export interface DecorationOption {
|
|
7
13
|
disabled?: boolean;
|
|
8
14
|
offset?: number;
|
package/lib/node.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { QRCodeJs as _QRCodeJs } from './core/qr-code-js';
|
|
2
2
|
import { type ValidationResult } from './license/LicenseManagerNode';
|
|
3
|
-
import type * as _browserUtils from './tools/browser-utils';
|
|
4
3
|
import { MethodOverrideOptions, RecursivePartial } from './types/helper';
|
|
5
4
|
import { SettingsOptions } from './types/settings-options';
|
|
6
5
|
import { StyleOptions } from './types/style-options';
|
|
@@ -11,13 +10,11 @@ import { ScanValidatorResponse } from './utils/scan-validators/abstract-scan-val
|
|
|
11
10
|
import { type DecodedLicenseToken } from './utils/token-validator';
|
|
12
11
|
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal';
|
|
13
12
|
export { type ExtensionFunction } from './core/qr-code-js';
|
|
14
|
-
export { FileExtension } from './tools/browser-utils';
|
|
15
13
|
export { type RecursivePartial } from './types/helper';
|
|
16
14
|
export { type CanvasOptions } from './utils/canvas-options';
|
|
17
15
|
export { GradientType, type Gradient } from './utils/gradient';
|
|
18
16
|
export { CornerDotType, CornerSquareType, DotType, ImageMode, ShapeType, type Options, type BorderOptions } from './utils/options';
|
|
19
17
|
export { ErrorCorrectionPercents } from './utils/qrcode';
|
|
20
|
-
export declare const browserUtils: typeof _browserUtils | undefined;
|
|
21
18
|
type QRCodeJsConstructor = new (options: RecursivePartial<Options>, internal?: boolean) => QRCodeJs;
|
|
22
19
|
export declare class QRCodeJs extends _QRCodeJs {
|
|
23
20
|
static initializeIfNeeded(): Promise<boolean>;
|