@liquid-js/qr-code-styling 5.3.1 → 5.4.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,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;
@@ -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) => void;
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 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liquid-js/qr-code-styling",
3
- "version": "5.3.1",
3
+ "version": "5.4.1",
4
4
  "description": "Generate styled QR codes on web or in Node",
5
5
  "type": "module",
6
6
  "main": "./lib/qr-code-styling-node.js",
@@ -73,5 +73,5 @@
73
73
  "bugs": {
74
74
  "url": "https://github.com/Liquid-JS/qr-code-styling/issues"
75
75
  },
76
- "homepage": "https://styled-qr.liquidjs.io/"
76
+ "homepage": "https://qrky.to/"
77
77
  }