qr-code-styling-node 1.11.0 → 1.12.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.
@@ -2,7 +2,6 @@ import { RequiredOptions } from "../core/QROptions";
2
2
  import { CornerDotType, CornerSquareType, DotType } from "../types";
3
3
  /** Dot types with a round look; blend art matches its corners and correction dots to them. */
4
4
  export declare const ROUND_DOT_TYPES: DotType[];
5
- /** True when alignment patterns must be drawn as plain squares for this dot type to scan. */
6
5
  export declare const needsSolidAlignment: (type: DotType) => boolean;
7
6
  export default function getCornerTypes(options: RequiredOptions): {
8
7
  square?: CornerSquareType;
@@ -0,0 +1,15 @@
1
+ export default class PathRecorder {
2
+ private _m;
3
+ private _parts;
4
+ private _open;
5
+ get d(): string;
6
+ beginPath(): void;
7
+ translate(x: number, y: number): void;
8
+ rotate(angle: number): void;
9
+ private _point;
10
+ moveTo(x: number, y: number): void;
11
+ lineTo(x: number, y: number): void;
12
+ closePath(): void;
13
+ rect(x: number, y: number, width: number, height: number): void;
14
+ arc(cx: number, cy: number, r: number, start: number, end: number, anticlockwise?: boolean): void;
15
+ }
@@ -1,7 +1,7 @@
1
1
  export interface UnknownObject {
2
2
  [key: string]: any;
3
3
  }
4
- export type DotType = "dots" | "rounded" | "classy" | "classy-rounded" | "square" | "extra-rounded" | "diamond" | "small-square" | "vertical-lines" | "horizontal-lines" | "fluid";
4
+ export type DotType = "dots" | "rounded" | "classy" | "classy-rounded" | "square" | "extra-rounded" | "diamond" | "small-square" | "vertical-lines" | "horizontal-lines" | "fluid" | "wave" | "blob" | "circuit";
5
5
  export type CornerDotType = "dot" | "square" | "rounded";
6
6
  export type CornerSquareType = "dot" | "square" | "extra-rounded" | "rounded";
7
7
  export type Extension = "svg" | "png" | "jpeg" | "webp";
@@ -161,6 +161,11 @@ export type Options = {
161
161
  * filled with decorative dots in the same style; the background becomes a circle. Default "square".
162
162
  */
163
163
  shape?: ShapeType;
164
+ /** SVG output only. */
165
+ svgOptions?: {
166
+ /** Draw all dots as one path instead of one element per module: smaller files, faster rendering. Default false. */
167
+ mergePaths?: boolean;
168
+ };
164
169
  width?: number;
165
170
  height?: number;
166
171
  margin?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qr-code-styling-node",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "description": "Style your QR codes: dots, corners, gradients and a logo. Works in the browser and on Node.js.",
5
5
  "keywords": [
6
6
  "qr",
@@ -74,7 +74,8 @@
74
74
  "art-examples": "npm run build && node scripts/art-examples.mjs",
75
75
  "style-examples": "npm run build && node scripts/style-examples.mjs",
76
76
  "blend-examples": "npm run build && node scripts/blend-examples.mjs",
77
- "circle-examples": "npm run build && node scripts/circle-examples.mjs"
77
+ "circle-examples": "npm run build && node scripts/circle-examples.mjs",
78
+ "dot-examples": "npm run build && node scripts/dot-examples.mjs"
78
79
  },
79
80
  "dependencies": {
80
81
  "qrcode-generator": "^1.4.3"