@qr-platform/qr-code.js 0.8.17
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/.github/workflows/publish.yml +18 -0
- package/CHANGELOG.md +233 -0
- package/LICENSE.md +77 -0
- package/README.md +188 -0
- package/docs/advanced-examples.md +523 -0
- package/docs/api-reference-guide.md +254 -0
- package/docs/documentation.md +1592 -0
- package/docs/examples.md +322 -0
- package/docs/license-management.md +501 -0
- package/docs/typescript-types-definitions.md +372 -0
- package/docs/usage-guide.md +622 -0
- package/lib/core/qr-code-js.d.ts +48 -0
- package/lib/core/qr-constant.d.ts +9 -0
- package/lib/core/qr-options-validation.d.ts +13 -0
- package/lib/core/qr-svg.d.ts +76 -0
- package/lib/core/qr-templates.d.ts +6 -0
- package/lib/figures/corner-dot.d.ts +24 -0
- package/lib/figures/corner-square.d.ts +24 -0
- package/lib/figures/dot.d.ts +31 -0
- package/lib/index.d.ts +52 -0
- package/lib/lib/image/GIFImage.d.ts +19 -0
- package/lib/lib/io/Base64.d.ts +10 -0
- package/lib/lib/io/Base64DecodeInputStream.d.ts +15 -0
- package/lib/lib/io/Base64EncodeOutputStream.d.ts +17 -0
- package/lib/lib/io/ByteArrayInputStream.d.ts +12 -0
- package/lib/lib/io/ByteArrayOutputStream.d.ts +12 -0
- package/lib/lib/io/InputStream.d.ts +10 -0
- package/lib/lib/io/OutputStream.d.ts +12 -0
- package/lib/lib/qr-code.d.ts +5 -0
- package/lib/lib/qrcode/BitBuffer.d.ts +11 -0
- package/lib/lib/qrcode/ErrorCorrectLevel.d.ts +23 -0
- package/lib/lib/qrcode/MaskPattern.d.ts +39 -0
- package/lib/lib/qrcode/Mode.d.ts +23 -0
- package/lib/lib/qrcode/Polynomial.d.ts +15 -0
- package/lib/lib/qrcode/QR8BitByte.d.ts +13 -0
- package/lib/lib/qrcode/QRAlphaNum.d.ts +13 -0
- package/lib/lib/qrcode/QRCode.d.ts +22 -0
- package/lib/lib/qrcode/QRCodeMinimal.d.ts +58 -0
- package/lib/lib/qrcode/QRData.d.ts +17 -0
- package/lib/lib/qrcode/QRKanji.d.ts +13 -0
- package/lib/lib/qrcode/QRMath.d.ts +13 -0
- package/lib/lib/qrcode/QRNumber.d.ts +14 -0
- package/lib/lib/qrcode/QRUtil.d.ts +25 -0
- package/lib/lib/qrcode/RSBlock.d.ts +16 -0
- package/lib/lib/text/createStringToBytes.d.ts +9 -0
- package/lib/lib/text/stringToBytes_SJIS.d.ts +8 -0
- package/lib/lib/text/stringToBytes_UTF8.d.ts +7 -0
- package/lib/lib/zbar-wasm/index.d.ts +1 -0
- package/lib/lib/zxing-js/src/browser/BrowserCodeReader.d.ts +410 -0
- package/lib/lib/zxing-js/src/browser/BrowserQRCodeReader.d.ts +29 -0
- package/lib/lib/zxing-js/src/browser/BrowserQRCodeSvgWriter.d.ts +46 -0
- package/lib/lib/zxing-js/src/browser/BrowserSvgCodeWriter.d.ts +49 -0
- package/lib/lib/zxing-js/src/browser/DecodeContinuouslyCallback.d.ts +6 -0
- package/lib/lib/zxing-js/src/browser/HTMLCanvasElementLuminanceSource.d.ts +27 -0
- package/lib/lib/zxing-js/src/browser/HTMLVisualMediaElement.d.ts +4 -0
- package/lib/lib/zxing-js/src/browser/VideoInputDevice.d.ts +22 -0
- package/lib/lib/zxing-js/src/browser.d.ts +3 -0
- package/lib/lib/zxing-js/src/core/ArgumentException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/ArithmeticException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/ArrayIndexOutOfBoundsException.d.ts +10 -0
- package/lib/lib/zxing-js/src/core/BarcodeFormat.d.ts +42 -0
- package/lib/lib/zxing-js/src/core/Binarizer.d.ts +53 -0
- package/lib/lib/zxing-js/src/core/BinaryBitmap.d.ts +78 -0
- package/lib/lib/zxing-js/src/core/ChecksumException.d.ts +8 -0
- package/lib/lib/zxing-js/src/core/DecodeHintType.d.ts +91 -0
- package/lib/lib/zxing-js/src/core/Dimension.d.ts +13 -0
- package/lib/lib/zxing-js/src/core/EncodeHintType.d.ts +99 -0
- package/lib/lib/zxing-js/src/core/Exception.d.ts +17 -0
- package/lib/lib/zxing-js/src/core/FormatException.d.ts +8 -0
- package/lib/lib/zxing-js/src/core/HighContrastLuminanceSource.d.ts +27 -0
- package/lib/lib/zxing-js/src/core/IllegalArgumentException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/IllegalStateException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/IndexOutOfBoundsException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/InvertedLuminanceSource.d.ts +22 -0
- package/lib/lib/zxing-js/src/core/LuminanceSource.d.ts +84 -0
- package/lib/lib/zxing-js/src/core/NodeLuminanceSource.d.ts +36 -0
- package/lib/lib/zxing-js/src/core/NotFoundException.d.ts +8 -0
- package/lib/lib/zxing-js/src/core/NullPointerException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/OutOfMemoryError.d.ts +6 -0
- package/lib/lib/zxing-js/src/core/PlanarYUVLuminanceSource.d.ts +35 -0
- package/lib/lib/zxing-js/src/core/RGBLuminanceSource.d.ts +21 -0
- package/lib/lib/zxing-js/src/core/Reader.d.ts +49 -0
- package/lib/lib/zxing-js/src/core/ReaderException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/ReedSolomonException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/Result.d.ts +52 -0
- package/lib/lib/zxing-js/src/core/ResultMetadataType.d.ts +68 -0
- package/lib/lib/zxing-js/src/core/ResultPoint.d.ts +34 -0
- package/lib/lib/zxing-js/src/core/ResultPointCallback.d.ts +11 -0
- package/lib/lib/zxing-js/src/core/UniversalLuminanceSource.d.ts +46 -0
- package/lib/lib/zxing-js/src/core/UnsupportedOperationException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/Writer.d.ts +30 -0
- package/lib/lib/zxing-js/src/core/WriterException.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/common/BitArray.d.ts +111 -0
- package/lib/lib/zxing-js/src/core/common/BitMatrix.d.ts +98 -0
- package/lib/lib/zxing-js/src/core/common/BitSource.d.ts +38 -0
- package/lib/lib/zxing-js/src/core/common/CharacterSetECI.d.ts +89 -0
- package/lib/lib/zxing-js/src/core/common/DecoderResult.d.ts +64 -0
- package/lib/lib/zxing-js/src/core/common/DefaultGridSampler.d.ts +10 -0
- package/lib/lib/zxing-js/src/core/common/DetectorResult.d.ts +16 -0
- package/lib/lib/zxing-js/src/core/common/ECIEncoderSet.d.ts +37 -0
- package/lib/lib/zxing-js/src/core/common/ECIInput.d.ts +79 -0
- package/lib/lib/zxing-js/src/core/common/GlobalHistogramBinarizer.d.ts +29 -0
- package/lib/lib/zxing-js/src/core/common/GridSampler.d.ts +36 -0
- package/lib/lib/zxing-js/src/core/common/GridSamplerInstance.d.ts +18 -0
- package/lib/lib/zxing-js/src/core/common/HybridBinarizer.d.ts +54 -0
- package/lib/lib/zxing-js/src/core/common/MinimalECIInput.d.ts +123 -0
- package/lib/lib/zxing-js/src/core/common/PerspectiveTransform.d.ts +26 -0
- package/lib/lib/zxing-js/src/core/common/StringUtils.d.ts +48 -0
- package/lib/lib/zxing-js/src/core/common/detector/CornerDetector.d.ts +35 -0
- package/lib/lib/zxing-js/src/core/common/detector/MathUtils.d.ts +36 -0
- package/lib/lib/zxing-js/src/core/common/detector/WhiteRectangleDetector.d.ts +71 -0
- package/lib/lib/zxing-js/src/core/common/reedsolomon/AbstractGenericGF.d.ts +34 -0
- package/lib/lib/zxing-js/src/core/common/reedsolomon/AbstractGenericGFPoly.d.ts +36 -0
- package/lib/lib/zxing-js/src/core/common/reedsolomon/GenericGF.d.ts +58 -0
- package/lib/lib/zxing-js/src/core/common/reedsolomon/GenericGFPoly.d.ts +47 -0
- package/lib/lib/zxing-js/src/core/common/reedsolomon/ReedSolomonDecoder.d.ts +40 -0
- package/lib/lib/zxing-js/src/core/common/reedsolomon/ReedSolomonEncoder.d.ts +41 -0
- package/lib/lib/zxing-js/src/core/qrcode/QRCodeReader.d.ts +35 -0
- package/lib/lib/zxing-js/src/core/qrcode/QRCodeWriter.d.ts +13 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/BitMatrixParser.d.ts +58 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/DataBlock.d.ts +28 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/DataMask.d.ts +36 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/DecodedBitStreamParser.d.ts +30 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/Decoder.d.ts +44 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/ECB.d.ts +12 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/ECBlocks.d.ts +16 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/ErrorCorrectionLevel.d.ts +38 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/FormatInformation.d.ts +33 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/Mode.d.ts +56 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/QRCodeDecoderMetaData.d.ts +21 -0
- package/lib/lib/zxing-js/src/core/qrcode/decoder/Version.d.ts +44 -0
- package/lib/lib/zxing-js/src/core/qrcode/detector/AlignmentPattern.d.ts +21 -0
- package/lib/lib/zxing-js/src/core/qrcode/detector/AlignmentPatternFinder.d.ts +82 -0
- package/lib/lib/zxing-js/src/core/qrcode/detector/Detector.d.ts +87 -0
- package/lib/lib/zxing-js/src/core/qrcode/detector/FinderPattern.d.ts +26 -0
- package/lib/lib/zxing-js/src/core/qrcode/detector/FinderPatternFinder.d.ts +114 -0
- package/lib/lib/zxing-js/src/core/qrcode/detector/FinderPatternInfo.d.ts +16 -0
- package/lib/lib/zxing-js/src/core/qrcode/encoder/BlockPair.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/qrcode/encoder/ByteMatrix.d.ts +24 -0
- package/lib/lib/zxing-js/src/core/qrcode/encoder/Encoder.d.ts +85 -0
- package/lib/lib/zxing-js/src/core/qrcode/encoder/MaskUtil.d.ts +47 -0
- package/lib/lib/zxing-js/src/core/qrcode/encoder/MatrixUtil.d.ts +37 -0
- package/lib/lib/zxing-js/src/core/qrcode/encoder/QRCode.d.ts +29 -0
- package/lib/lib/zxing-js/src/core/util/Arrays.d.ts +45 -0
- package/lib/lib/zxing-js/src/core/util/ByteArrayOutputStream.d.ts +174 -0
- package/lib/lib/zxing-js/src/core/util/Charset.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/util/Collections.d.ts +11 -0
- package/lib/lib/zxing-js/src/core/util/Float.d.ts +14 -0
- package/lib/lib/zxing-js/src/core/util/Formatter.d.ts +28 -0
- package/lib/lib/zxing-js/src/core/util/Integer.d.ts +19 -0
- package/lib/lib/zxing-js/src/core/util/Long.d.ts +12 -0
- package/lib/lib/zxing-js/src/core/util/OutputStream.d.ts +106 -0
- package/lib/lib/zxing-js/src/core/util/StandardCharsets.d.ts +7 -0
- package/lib/lib/zxing-js/src/core/util/StringBuilder.d.ts +21 -0
- package/lib/lib/zxing-js/src/core/util/StringEncoding.d.ts +51 -0
- package/lib/lib/zxing-js/src/core/util/System.d.ts +10 -0
- package/lib/lib/zxing-js/src/customTypings.d.ts +16 -0
- package/lib/lib/zxing-js/src/index.d.ts +5 -0
- package/lib/lib/zxing-js/src/node.d.ts +1 -0
- package/lib/license/LicenseManager.d.ts +69 -0
- package/lib/license/LicenseManagerNode.d.ts +64 -0
- package/lib/node.d.ts +37 -0
- package/lib/options-demo.d.ts +239 -0
- package/lib/plugins/QRBorderHelpers.d.ts +32 -0
- package/lib/plugins/QRBorderPlugin.d.ts +35 -0
- package/lib/plugins/QRValidatorZbar.d.ts +38 -0
- package/lib/plugins/QRValidatorZbarNode.d.ts +60 -0
- package/lib/plugins/QRValidatorZbarNodeSharp.d.ts +83 -0
- package/lib/qr-code-js-node.js +1 -0
- package/lib/qr-code-js.js +1 -0
- package/lib/templates/borders-inner-outter.d.ts +129 -0
- package/lib/templates/borders-inner-scale-offset.d.ts +497 -0
- package/lib/templates/borders-inner.d.ts +129 -0
- package/lib/templates/borders-no-license.d.ts +129 -0
- package/lib/templates/borders-outter.d.ts +129 -0
- package/lib/templates/borders-text-auto-curved.d.ts +129 -0
- package/lib/templates/borders-text-full-curved.d.ts +133 -0
- package/lib/templates/borders.d.ts +129 -0
- package/lib/templates/scales.d.ts +130 -0
- package/lib/templates/scan-validators/index.d.ts +1 -0
- package/lib/templates/scan-validators/tests/cases/basic-inverted.d.ts +9 -0
- package/lib/templates/scan-validators/tests/cases/basic-no-license.d.ts +3 -0
- package/lib/templates/scan-validators/tests/cases/basic.d.ts +3 -0
- package/lib/templates/scan-validators/tests/cases/colors-inverted.d.ts +2 -0
- package/lib/templates/scan-validators/tests/cases/colors.d.ts +58 -0
- package/lib/templates/scan-validators/tests/cases/out-of-borders-inverted.d.ts +9 -0
- package/lib/templates/scan-validators/tests/cases/out-of-borders.d.ts +9 -0
- package/lib/templates/scan-validators/tests/cases/position-inverted.d.ts +9 -0
- package/lib/templates/scan-validators/tests/cases/position.d.ts +3 -0
- package/lib/templates/scan-validators/tests/index.d.ts +27 -0
- package/lib/tools/browser-image-tools.d.ts +7 -0
- package/lib/tools/browser-utils.d.ts +18 -0
- package/lib/types/helper.d.ts +23 -0
- package/lib/utils/canvas-options.d.ts +7 -0
- package/lib/utils/color.d.ts +4 -0
- package/lib/utils/gradient.d.ts +26 -0
- package/lib/utils/image.d.ts +16 -0
- package/lib/utils/merge.d.ts +5 -0
- package/lib/utils/options.d.ts +220 -0
- package/lib/utils/qrcode.d.ts +8 -0
- package/lib/utils/scan-validator-node.d.ts +15 -0
- package/lib/utils/scan-validators/abstract-scan-validator.d.ts +43 -0
- package/lib/utils/scan-validators/zbar-scan-validator.d.ts +8 -0
- package/lib/utils/scan-validators/zxing-canvas-scan-validator.d.ts +10 -0
- package/lib/utils/scan-validators/zxing-scan-validator.d.ts +8 -0
- package/lib/utils/svg.d.ts +2 -0
- package/lib/utils/token-validator.d.ts +19 -0
- package/package.json +80 -0
@@ -0,0 +1,129 @@
|
|
1
|
+
import * as _browserUtils from '../tools/browser-utils.js';
|
2
|
+
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal.js';
|
3
|
+
export { QRCodeJs, type ExtensionFunction } from '../core/qr-code-js.js';
|
4
|
+
export { FileExtension } from '../tools/browser-utils.js';
|
5
|
+
export { type RecursivePartial } from '../types/helper.js';
|
6
|
+
export { type CanvasOptions } from '../utils/canvas-options.js';
|
7
|
+
export { GradientType, type Gradient } from '../utils/gradient';
|
8
|
+
export { CornerDotType, CornerSquareType, DotType, ImageMode, ShapeType, type Options } from '../utils/options.js';
|
9
|
+
export { ErrorCorrectionPercents } from '../utils/qrcode.js';
|
10
|
+
export declare const codes: {
|
11
|
+
borderOptions: {
|
12
|
+
hasBorder: boolean;
|
13
|
+
radius: string;
|
14
|
+
thickness: number;
|
15
|
+
color: string;
|
16
|
+
decorations: {
|
17
|
+
top: {
|
18
|
+
disabled: boolean;
|
19
|
+
enableText: boolean;
|
20
|
+
offset: number;
|
21
|
+
curveAdjustment: number;
|
22
|
+
curveDisabled: boolean;
|
23
|
+
type: "text" | "image";
|
24
|
+
value: string;
|
25
|
+
style: {
|
26
|
+
fontFace: string;
|
27
|
+
fontSize: number;
|
28
|
+
fontColor: string;
|
29
|
+
letterSpacing: number;
|
30
|
+
fontWeight: string;
|
31
|
+
};
|
32
|
+
};
|
33
|
+
bottom: {
|
34
|
+
disabled: boolean;
|
35
|
+
enableText: boolean;
|
36
|
+
offset: number;
|
37
|
+
curveAdjustment: number;
|
38
|
+
curveDisabled: boolean;
|
39
|
+
type: "text" | "image";
|
40
|
+
value: string;
|
41
|
+
style: {
|
42
|
+
fontFace: string;
|
43
|
+
fontSize: number;
|
44
|
+
fontColor: string;
|
45
|
+
letterSpacing: number;
|
46
|
+
fontWeight: string;
|
47
|
+
};
|
48
|
+
};
|
49
|
+
left: {
|
50
|
+
disabled: boolean;
|
51
|
+
enableText: boolean;
|
52
|
+
offset: number;
|
53
|
+
curveAdjustment: number;
|
54
|
+
curveDisabled: boolean;
|
55
|
+
type: "text" | "image";
|
56
|
+
value: string;
|
57
|
+
style: {
|
58
|
+
fontFace: string;
|
59
|
+
fontSize: number;
|
60
|
+
fontColor: string;
|
61
|
+
letterSpacing: number;
|
62
|
+
fontWeight: string;
|
63
|
+
};
|
64
|
+
};
|
65
|
+
right: {
|
66
|
+
disabled: boolean;
|
67
|
+
enableText: boolean;
|
68
|
+
offset: number;
|
69
|
+
curveAdjustment: number;
|
70
|
+
curveDisabled: boolean;
|
71
|
+
type: "text" | "image";
|
72
|
+
value: string;
|
73
|
+
style: {
|
74
|
+
fontFace: string;
|
75
|
+
fontSize: number;
|
76
|
+
fontColor: string;
|
77
|
+
letterSpacing: number;
|
78
|
+
fontWeight: string;
|
79
|
+
};
|
80
|
+
};
|
81
|
+
};
|
82
|
+
borderOuter: {
|
83
|
+
color: string;
|
84
|
+
thickness: number;
|
85
|
+
};
|
86
|
+
borderInner: {
|
87
|
+
color: string;
|
88
|
+
thickness: number;
|
89
|
+
};
|
90
|
+
};
|
91
|
+
name: string;
|
92
|
+
description: string;
|
93
|
+
data: string;
|
94
|
+
image: string;
|
95
|
+
scale: number;
|
96
|
+
margin: number;
|
97
|
+
isResopnsive: boolean;
|
98
|
+
verticalOffset: number;
|
99
|
+
shape: string;
|
100
|
+
qrOptions: {};
|
101
|
+
imageOptions: {
|
102
|
+
imageSize: number;
|
103
|
+
margin: number;
|
104
|
+
roundedValue: number;
|
105
|
+
};
|
106
|
+
dotsOptions: {
|
107
|
+
type: string;
|
108
|
+
color: string;
|
109
|
+
};
|
110
|
+
cornersSquareOptions: {
|
111
|
+
type: string;
|
112
|
+
color: string;
|
113
|
+
};
|
114
|
+
cornersDotOptions: {
|
115
|
+
type: string;
|
116
|
+
color: string;
|
117
|
+
};
|
118
|
+
backgroundOptions: {
|
119
|
+
color: string;
|
120
|
+
gradient: {
|
121
|
+
type: string;
|
122
|
+
colorStops: {
|
123
|
+
offset: number;
|
124
|
+
color: string;
|
125
|
+
}[];
|
126
|
+
};
|
127
|
+
};
|
128
|
+
}[];
|
129
|
+
export declare const browserUtils: typeof _browserUtils | undefined;
|
@@ -0,0 +1,130 @@
|
|
1
|
+
import * as _browserUtils from '../tools/browser-utils.js';
|
2
|
+
export { ErrorCorrectionLevel, Mode, TypeNumber } from '~/lib/qrcode/QRCodeMinimal.js';
|
3
|
+
export { QRCodeJs, type ExtensionFunction } from '../core/qr-code-js.js';
|
4
|
+
export { FileExtension } from '../tools/browser-utils.js';
|
5
|
+
export { type RecursivePartial } from '../types/helper.js';
|
6
|
+
export { type CanvasOptions } from '../utils/canvas-options.js';
|
7
|
+
export { GradientType, type Gradient } from '../utils/gradient';
|
8
|
+
export { CornerDotType, CornerSquareType, DotType, ImageMode, ShapeType, type Options } from '../utils/options.js';
|
9
|
+
export { ErrorCorrectionPercents } from '../utils/qrcode.js';
|
10
|
+
export declare const codes: {
|
11
|
+
borderOptions: {
|
12
|
+
hasBorder: boolean;
|
13
|
+
radius: string;
|
14
|
+
thickness: number;
|
15
|
+
color: string;
|
16
|
+
decorations: {
|
17
|
+
top: {
|
18
|
+
disabled: boolean;
|
19
|
+
enableText: boolean;
|
20
|
+
offset: number;
|
21
|
+
curveAdjustment: number;
|
22
|
+
curveDisabled: boolean;
|
23
|
+
type: "text" | "image";
|
24
|
+
value: string;
|
25
|
+
style: {
|
26
|
+
fontFace: string;
|
27
|
+
fontSize: number;
|
28
|
+
fontColor: string;
|
29
|
+
letterSpacing: number;
|
30
|
+
fontWeight: string;
|
31
|
+
};
|
32
|
+
};
|
33
|
+
bottom: {
|
34
|
+
disabled: boolean;
|
35
|
+
enableText: boolean;
|
36
|
+
offset: number;
|
37
|
+
curveAdjustment: number;
|
38
|
+
curveDisabled: boolean;
|
39
|
+
type: "text" | "image";
|
40
|
+
value: string;
|
41
|
+
style: {
|
42
|
+
fontFace: string;
|
43
|
+
fontSize: number;
|
44
|
+
fontColor: string;
|
45
|
+
letterSpacing: number;
|
46
|
+
fontWeight: string;
|
47
|
+
};
|
48
|
+
};
|
49
|
+
left: {
|
50
|
+
disabled: boolean;
|
51
|
+
enableText: boolean;
|
52
|
+
offset: number;
|
53
|
+
curveAdjustment: number;
|
54
|
+
curveDisabled: boolean;
|
55
|
+
type: "text" | "image";
|
56
|
+
value: string;
|
57
|
+
style: {
|
58
|
+
fontFace: string;
|
59
|
+
fontSize: number;
|
60
|
+
fontColor: string;
|
61
|
+
letterSpacing: number;
|
62
|
+
fontWeight: string;
|
63
|
+
};
|
64
|
+
};
|
65
|
+
right: {
|
66
|
+
disabled: boolean;
|
67
|
+
enableText: boolean;
|
68
|
+
offset: number;
|
69
|
+
curveAdjustment: number;
|
70
|
+
curveDisabled: boolean;
|
71
|
+
type: "text" | "image";
|
72
|
+
value: string;
|
73
|
+
style: {
|
74
|
+
fontFace: string;
|
75
|
+
fontSize: number;
|
76
|
+
fontColor: string;
|
77
|
+
letterSpacing: number;
|
78
|
+
fontWeight: string;
|
79
|
+
};
|
80
|
+
};
|
81
|
+
};
|
82
|
+
borderOuter: {
|
83
|
+
color: string;
|
84
|
+
thickness: number;
|
85
|
+
};
|
86
|
+
borderInner: {
|
87
|
+
color: string;
|
88
|
+
thickness: number;
|
89
|
+
};
|
90
|
+
};
|
91
|
+
name: string;
|
92
|
+
description: string;
|
93
|
+
data: string;
|
94
|
+
image: string;
|
95
|
+
scale: number;
|
96
|
+
margin: number;
|
97
|
+
isResopnsive: boolean;
|
98
|
+
verticalOffset: number;
|
99
|
+
shape: string;
|
100
|
+
qrOptions: {};
|
101
|
+
imageOptions: {
|
102
|
+
imageSize: number;
|
103
|
+
margin: number;
|
104
|
+
roundedValue: number;
|
105
|
+
};
|
106
|
+
dotsOptions: {
|
107
|
+
type: string;
|
108
|
+
color: string;
|
109
|
+
size: number;
|
110
|
+
};
|
111
|
+
cornersSquareOptions: {
|
112
|
+
type: string;
|
113
|
+
color: string;
|
114
|
+
};
|
115
|
+
cornersDotOptions: {
|
116
|
+
type: string;
|
117
|
+
color: string;
|
118
|
+
};
|
119
|
+
backgroundOptions: {
|
120
|
+
color: string;
|
121
|
+
gradient: {
|
122
|
+
type: string;
|
123
|
+
colorStops: {
|
124
|
+
offset: number;
|
125
|
+
color: string;
|
126
|
+
}[];
|
127
|
+
};
|
128
|
+
};
|
129
|
+
}[];
|
130
|
+
export declare const browserUtils: typeof _browserUtils | undefined;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function createNavigationHeader(currentPage?: string, targetElement?: HTMLElement, basePath?: string): HTMLElement;
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import { TestCase } from '..';
|
2
|
+
export declare const baseOptions: {
|
3
|
+
name: string;
|
4
|
+
description: string;
|
5
|
+
data: string;
|
6
|
+
scale: number;
|
7
|
+
margin: number;
|
8
|
+
shape: string;
|
9
|
+
qrOptions: {
|
10
|
+
errorCorrectionLevel: string;
|
11
|
+
};
|
12
|
+
dotsOptions: {
|
13
|
+
type: string;
|
14
|
+
color: string;
|
15
|
+
};
|
16
|
+
cornersSquareOptions: {
|
17
|
+
type: string;
|
18
|
+
color: string;
|
19
|
+
};
|
20
|
+
cornersDotOptions: {
|
21
|
+
type: string;
|
22
|
+
color: string;
|
23
|
+
};
|
24
|
+
backgroundOptions: {
|
25
|
+
color: string;
|
26
|
+
};
|
27
|
+
};
|
28
|
+
export declare const darkContrastColors: (alpha: number | string) => string[];
|
29
|
+
export declare const lightContrastColors: (alpha: number | string) => string[];
|
30
|
+
export declare const buildOptions: (elementColor: string, backgroundColor: string) => {
|
31
|
+
dotsOptions: {
|
32
|
+
color: string;
|
33
|
+
type: string;
|
34
|
+
};
|
35
|
+
cornersSquareOptions: {
|
36
|
+
color: string;
|
37
|
+
type: string;
|
38
|
+
};
|
39
|
+
cornersDotOptions: {
|
40
|
+
color: string;
|
41
|
+
type: string;
|
42
|
+
};
|
43
|
+
backgroundOptions: {
|
44
|
+
color: string;
|
45
|
+
};
|
46
|
+
name: string;
|
47
|
+
description: string;
|
48
|
+
data: string;
|
49
|
+
scale: number;
|
50
|
+
margin: number;
|
51
|
+
shape: string;
|
52
|
+
qrOptions: {
|
53
|
+
errorCorrectionLevel: string;
|
54
|
+
};
|
55
|
+
};
|
56
|
+
export declare const alphas: number[];
|
57
|
+
declare const cases: TestCase[];
|
58
|
+
export default cases;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
export declare const testStatusFailed = "failed";
|
2
|
+
export declare const testStatusPassed = "passed";
|
3
|
+
export declare const defaultValidatorId = "zbar";
|
4
|
+
export declare const validators: {
|
5
|
+
id: string;
|
6
|
+
name: string;
|
7
|
+
}[];
|
8
|
+
export declare const testCases: {
|
9
|
+
id: string;
|
10
|
+
name: string;
|
11
|
+
}[];
|
12
|
+
export interface TestCase {
|
13
|
+
name: string;
|
14
|
+
expect: {
|
15
|
+
isValid: boolean;
|
16
|
+
isInverted?: boolean;
|
17
|
+
};
|
18
|
+
options: any;
|
19
|
+
}
|
20
|
+
export declare const invertCases: (cases: TestCase[], isValid?: boolean, isInverted?: boolean) => {
|
21
|
+
expect: {
|
22
|
+
isValid: boolean;
|
23
|
+
isInverted: boolean | undefined;
|
24
|
+
};
|
25
|
+
options: any;
|
26
|
+
name: string;
|
27
|
+
}[];
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { QRCodeJs } from '../core/qr-code-js.js';
|
2
|
+
import { RecursivePartial } from '../types/helper.js';
|
3
|
+
import { CanvasOptions } from '../utils/canvas-options.js';
|
4
|
+
export declare enum FileExtension {
|
5
|
+
svg = "svg",
|
6
|
+
png = "png",
|
7
|
+
jpeg = "jpeg",
|
8
|
+
webp = "webp"
|
9
|
+
}
|
10
|
+
export declare function drawToCanvas(qrCode: QRCodeJs, options?: RecursivePartial<CanvasOptions>): {
|
11
|
+
canvas: HTMLCanvasElement;
|
12
|
+
canvasDrawingPromise: Promise<void> | undefined;
|
13
|
+
} | undefined;
|
14
|
+
export declare function download(qrCode: QRCodeJs, downloadOptions?: {
|
15
|
+
name?: string;
|
16
|
+
extension: `${FileExtension}`;
|
17
|
+
}, options?: RecursivePartial<CanvasOptions>): Promise<void>;
|
18
|
+
export declare function downloadURI(uri: string, name: string): void;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export type RecursivePartial<T> = {
|
2
|
+
[P in keyof T]?: T[P] extends Array<infer U> ? Array<RecursivePartial<U>> : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];
|
3
|
+
};
|
4
|
+
export interface DrawArgs {
|
5
|
+
x: number;
|
6
|
+
y: number;
|
7
|
+
size: number;
|
8
|
+
rotation?: number;
|
9
|
+
getNeighbor?: (x: number, y: number) => boolean;
|
10
|
+
}
|
11
|
+
export interface BasicFigureDrawArgs {
|
12
|
+
x: number;
|
13
|
+
y: number;
|
14
|
+
size: number;
|
15
|
+
rotation?: number;
|
16
|
+
}
|
17
|
+
export interface RotateFigureArgs {
|
18
|
+
x: number;
|
19
|
+
y: number;
|
20
|
+
size: number;
|
21
|
+
rotation?: number;
|
22
|
+
draw: () => void;
|
23
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
export declare enum GradientType {
|
2
|
+
radial = "radial",
|
3
|
+
linear = "linear"
|
4
|
+
}
|
5
|
+
export interface Gradient {
|
6
|
+
/**
|
7
|
+
* Type of gradient spread
|
8
|
+
*
|
9
|
+
* @default GradientType.linear
|
10
|
+
*/
|
11
|
+
type: GradientType;
|
12
|
+
/**
|
13
|
+
* Rotation of gradient (in radians, Math.PI === 180 degrees)
|
14
|
+
*
|
15
|
+
* @default 0
|
16
|
+
*/
|
17
|
+
rotation?: number;
|
18
|
+
/** Gradient colors. */
|
19
|
+
colorStops: Array<{
|
20
|
+
/** Position of color in gradient range */
|
21
|
+
offset: number;
|
22
|
+
/** Color of stop in gradient range */
|
23
|
+
color: string;
|
24
|
+
}>;
|
25
|
+
}
|
26
|
+
export declare function sanitizeGradient(gradient: Gradient): Gradient;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
interface ImageSizeOptions {
|
2
|
+
originalHeight: number;
|
3
|
+
originalWidth: number;
|
4
|
+
maxHiddenDots: number;
|
5
|
+
maxHiddenAxisDots?: number;
|
6
|
+
dotSize: number;
|
7
|
+
margin: number;
|
8
|
+
}
|
9
|
+
interface ImageSizeResult {
|
10
|
+
height: number;
|
11
|
+
width: number;
|
12
|
+
hideYDots: number;
|
13
|
+
hideXDots: number;
|
14
|
+
}
|
15
|
+
export declare function calculateImageSize({ originalHeight, originalWidth, maxHiddenDots, maxHiddenAxisDots, dotSize, margin }: ImageSizeOptions): ImageSizeResult;
|
16
|
+
export {};
|