@liquid-js/qr-code-styling 4.0.0-0 → 4.0.0-2
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/lib/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { FileExtension } from "./tools/browser-utils.js";
|
|
|
4
4
|
export { type RecursivePartial } from "./types/helper.js";
|
|
5
5
|
export { type CanvasOptions } from "./utils/canvas-options.js";
|
|
6
6
|
export { GradientType, type Gradient } from "./utils/gradient.js";
|
|
7
|
-
export { CornerDotType, CornerSquareType, DotType, ShapeType, type Options } from "./utils/options.js";
|
|
7
|
+
export { CornerDotType, CornerSquareType, DotType, ImageMode, ShapeType, type Options } from "./utils/options.js";
|
|
8
8
|
export { ErrorCorrectionPercents } from "./utils/qrcode.js";
|
|
9
9
|
import * as _browserUtils from "./tools/browser-utils.js";
|
|
10
10
|
export declare const browserUtils: typeof _browserUtils | undefined;
|
package/lib/node.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { FileExtension } from "./tools/browser-utils.js";
|
|
|
8
8
|
export { type RecursivePartial } from "./types/helper.js";
|
|
9
9
|
export { type CanvasOptions } from "./utils/canvas-options.js";
|
|
10
10
|
export { GradientType, type Gradient } from "./utils/gradient.js";
|
|
11
|
-
export { CornerDotType, CornerSquareType, DotType, ShapeType, type Options } from "./utils/options.js";
|
|
11
|
+
export { CornerDotType, CornerSquareType, DotType, ImageMode, ShapeType, type Options } from "./utils/options.js";
|
|
12
12
|
export { ErrorCorrectionPercents } from "./utils/qrcode.js";
|
|
13
13
|
export declare const browserUtils: typeof _browserUtils | undefined;
|
|
14
14
|
export declare class QRCodeStyling extends _QRCodeStyling {
|
|
@@ -878,12 +878,12 @@ class QRSVG {
|
|
|
878
878
|
margin: imageOptions.margin
|
|
879
879
|
});
|
|
880
880
|
}
|
|
881
|
-
this.options.image && 0 < drawImageSize.width && 0 < drawImageSize.height && await this.drawImage({
|
|
881
|
+
this.drawBackground(), this.options.image && 0 < drawImageSize.width && 0 < drawImageSize.height && await this.drawImage({
|
|
882
882
|
width: drawImageSize.width,
|
|
883
883
|
height: drawImageSize.height,
|
|
884
884
|
count,
|
|
885
885
|
dotSize
|
|
886
|
-
}), this.
|
|
886
|
+
}), this.drawDots(((i, j) => !(this.options.imageOptions.mode == ImageMode.center && i >= (count - drawImageSize.hideXDots) / 2 && i < (count + drawImageSize.hideXDots) / 2 && j >= (count - drawImageSize.hideYDots) / 2 && j < (count + drawImageSize.hideYDots) / 2 || 8 > i && 8 > j || i >= count - 8 && 8 > j || j >= count - 8 && 8 > i))),
|
|
887
887
|
this.drawCorners();
|
|
888
888
|
}
|
|
889
889
|
drawBackground() {
|
|
@@ -1208,5 +1208,5 @@ class QRCodeStyling extends QRCodeStyling$1 {
|
|
|
1208
1208
|
|
|
1209
1209
|
var browserUtils = void 0;
|
|
1210
1210
|
|
|
1211
|
-
export { CornerDotType, CornerSquareType, DotType, ErrorCorrectionPercents, FileExtension, GradientType, QRCodeStyling, ShapeType, browserUtils };
|
|
1211
|
+
export { CornerDotType, CornerSquareType, DotType, ErrorCorrectionPercents, FileExtension, GradientType, ImageMode, QRCodeStyling, ShapeType, browserUtils };
|
|
1212
1212
|
//# sourceMappingURL=qr-code-styling-node.js.map
|