@liquid-js/qr-code-styling 5.3.1 → 5.4.0
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/border-plugin.js +1 -1
- package/lib/border-plugin.js.map +1 -1
- package/lib/color-dXYWdVDW.js +2 -0
- package/lib/color-dXYWdVDW.js.map +1 -0
- package/lib/core/qr-svg.d.ts +5 -0
- package/lib/figures/dot-elements.d.ts +1 -0
- package/lib/font-faces-plugin.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/kanji.js +1 -1
- package/lib/kanji.js.map +1 -1
- package/lib/node.d.ts +1 -0
- package/lib/plugin-utils.js +1 -1
- package/lib/plugins/border.d.ts +9 -2
- package/lib/qr-code-styling-node.js +128 -59
- package/lib/qr-code-styling-node.js.map +1 -1
- package/lib/qr-code-styling.js +1 -1
- package/lib/qr-code-styling.js.map +1 -1
- package/lib/utils/color.d.ts +18 -0
- package/lib/utils/options.d.ts +8 -1
- package/package.json +1 -1
package/lib/utils/color.d.ts
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
|
+
import { Gradient } from './gradient.js';
|
|
1
2
|
export declare function parseColor(cstr: string): {
|
|
2
3
|
value: string;
|
|
3
4
|
alpha: number;
|
|
4
5
|
};
|
|
6
|
+
export interface ColorElementValue {
|
|
7
|
+
gradient?: SVGElement;
|
|
8
|
+
value: string;
|
|
9
|
+
opacity: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function createColor({ options, color, additionalRotation, x, y, height, width, name, dotSize: size, document }: {
|
|
12
|
+
options?: Gradient;
|
|
13
|
+
color?: string;
|
|
14
|
+
additionalRotation: number;
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
height: number;
|
|
18
|
+
width: number;
|
|
19
|
+
name: string;
|
|
20
|
+
dotSize: number;
|
|
21
|
+
document: Document;
|
|
22
|
+
}): ColorElementValue | undefined;
|
package/lib/utils/options.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ErrorCorrectionLevel, Mode, TypeNumber } from '@liquid-js/qrcode-generator/lib/qrcode/QRCodeMinimal.js';
|
|
2
2
|
import { browserImageTools } from '../tools/browser-image-tools.js';
|
|
3
3
|
import { DrawArgs } from '../types/helper.js';
|
|
4
|
+
import { ColorElementValue } from './color.js';
|
|
4
5
|
import { Gradient } from './gradient.js';
|
|
5
6
|
export declare enum DotType {
|
|
6
7
|
dot = "dot",
|
|
@@ -21,6 +22,8 @@ export declare enum DotType {
|
|
|
21
22
|
weave = "weave",
|
|
22
23
|
pentagon = "pentagon",
|
|
23
24
|
hexagon = "hexagon",
|
|
25
|
+
octagon = "octagon",
|
|
26
|
+
circuit = "circuit",
|
|
24
27
|
zebraHorizontal = "zebra-horizontal",
|
|
25
28
|
zebraVertical = "zebra-vertical",
|
|
26
29
|
blocksHorizontal = "blocks-horizontal",
|
|
@@ -39,6 +42,7 @@ export declare enum CornerDotType {
|
|
|
39
42
|
star = "star",
|
|
40
43
|
pentagon = "pentagon",
|
|
41
44
|
hexagon = "hexagon",
|
|
45
|
+
octagon = "octagon",
|
|
42
46
|
diamond = "diamond"
|
|
43
47
|
}
|
|
44
48
|
export declare enum CornerSquareType {
|
|
@@ -90,7 +94,10 @@ export interface Plugin {
|
|
|
90
94
|
/**
|
|
91
95
|
* Alter the generated SVG, e.g. add borders
|
|
92
96
|
*/
|
|
93
|
-
postProcess?: (svg: SVGSVGElement, options: Options
|
|
97
|
+
postProcess?: (svg: SVGSVGElement, options: Options, colors: {
|
|
98
|
+
dots?: ColorElementValue;
|
|
99
|
+
background?: ColorElementValue;
|
|
100
|
+
}) => void;
|
|
94
101
|
}
|
|
95
102
|
export interface Options {
|
|
96
103
|
/** Use a custom DOM domplementation */
|