qrdx 0.0.4 → 0.0.43

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.
@@ -29,7 +29,9 @@ export declare const DEFAULT_EYECOLOR = "#000000";
29
29
  */
30
30
  export declare const DEFAULT_DOTCOLOR = "#000000";
31
31
  /**
32
- * Default margin around the QR code
32
+ * Default margin around the QR code.
33
+ * The QR spec requires a minimum quiet zone of 4 modules on all sides
34
+ * for reliable scanning.
33
35
  */
34
36
  export declare const DEFAULT_MARGIN = 0;
35
37
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,CAKpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,UAAgB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,SAAS,UAAU,EAAkC,CAAC;AAE9E;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,YAAY,8BAA8B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,CAKpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,UAAgB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,SAAS,UAAU,EAAkC,CAAC;AAE9E;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,YAAY,8BAA8B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"corner-eye.d.ts","sourceRoot":"","sources":["../../src/corner-eye.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AA6J5D;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,gBAAgB,GACxB,MAAM,CAqBR"}
1
+ {"version":3,"file":"corner-eye.d.ts","sourceRoot":"","sources":["../../src/corner-eye.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAmN5D;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,gBAAgB,GACxB,MAAM,CAqBR"}
@@ -9,6 +9,7 @@ export type { CornerEyePattern } from "./corner-eye";
9
9
  export { CORNER_EYE_PATTERNS, cornerEyePatternSchema } from "./corner-eye";
10
10
  export type { BodyPattern } from "./image-pattern";
11
11
  export { BODY_PATTERN, bodyPatternSchema } from "./image-pattern";
12
+ export { DEFAULT_MARGIN } from "../src/constants";
12
13
  export type { ErrorLevel, ImageSettings, QRProps, QRPropsCanvas, QRPropsSVG, } from "./qr";
13
14
  export { errorLevelSchema, imageSettingsSchema, qrPropsSchema, } from "./qr";
14
15
  export type { BaseTemplateProps, TemplateConfig, TemplateDefinition, } from "./template";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EACV,WAAW,EACX,SAAS,EACT,YAAY,EACZ,cAAc,EACd,cAAc,EACd,UAAU,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EACL,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC3E,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAClE,YAAY,EACV,UAAU,EACV,aAAa,EACb,OAAO,EACP,aAAa,EACb,UAAU,GACX,MAAM,MAAM,CAAC;AACd,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,GACd,MAAM,MAAM,CAAC;AACd,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EACV,WAAW,EACX,SAAS,EACT,YAAY,EACZ,cAAc,EACd,cAAc,EACd,UAAU,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EACL,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC3E,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACV,UAAU,EACV,aAAa,EACb,OAAO,EACP,aAAa,EACb,UAAU,GACX,MAAM,MAAM,CAAC;AACd,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,GACd,MAAM,MAAM,CAAC;AACd,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qrdx",
3
- "version": "0.0.4",
3
+ "version": "0.0.43",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/src/index.d.ts",
@@ -29,29 +29,29 @@
29
29
  "types",
30
30
  "src"
31
31
  ],
32
- "scripts": {
33
- "preinstall": "pnpm build",
34
- "build": "tsup && tsc --project tsconfig.build.json --emitDeclarationOnly",
35
- "clean": "git clean -xdf .cache .turbo dist node_modules",
36
- "typecheck": "tsc --noEmit"
37
- },
38
32
  "dependencies": {
39
33
  "jspdf": "^3.0.4",
40
34
  "jsqr": "^1.4.0",
41
- "react": "19.2.3",
35
+ "react": "^19.0.0",
42
36
  "sharp": "^0.34.2",
43
37
  "zod": "^4.3.5"
44
38
  },
45
39
  "devDependencies": {
46
- "@repo/typescript-config": "workspace:*",
47
40
  "@types/node": "25.1.0",
48
41
  "@types/react": "19.2.7",
49
42
  "@types/react-dom": "19.2.3",
50
43
  "next": "16.1.1",
51
44
  "tsup": "^8.5.1",
52
- "typescript": "5.9.3"
45
+ "typescript": "5.9.3",
46
+ "@repo/typescript-config": "0.0.0"
53
47
  },
54
48
  "peerDependencies": {
55
49
  "react-dom": ">=18.0.0"
50
+ },
51
+ "scripts": {
52
+ "preinstall": "pnpm build",
53
+ "build": "tsup && tsc --project tsconfig.build.json --emitDeclarationOnly",
54
+ "clean": "git clean -xdf .cache .turbo dist node_modules",
55
+ "typecheck": "tsc --noEmit"
56
56
  }
57
- }
57
+ }
package/src/constants.ts CHANGED
@@ -42,7 +42,9 @@ export const DEFAULT_EYECOLOR = "#000000";
42
42
  export const DEFAULT_DOTCOLOR = "#000000";
43
43
 
44
44
  /**
45
- * Default margin around the QR code
45
+ * Default margin around the QR code.
46
+ * The QR spec requires a minimum quiet zone of 4 modules on all sides
47
+ * for reliable scanning.
46
48
  */
47
49
  export const DEFAULT_MARGIN = 0;
48
50
 
package/src/corner-eye.ts CHANGED
@@ -8,11 +8,12 @@ function generateCornerSquarePattern(
8
8
  offsetY: number,
9
9
  size: number
10
10
  ): string {
11
- const scale = size / 80;
12
- const transform = (coord: number, offset: number) => coord * scale + offset;
13
-
14
- const path = `M ${transform(5, offsetX)} ${transform(5, offsetY)}v ${70 * scale}h ${70 * scale}v -${70 * scale}zM ${transform(15, offsetX)} ${transform(15, offsetY)}h ${50 * scale}v ${50 * scale}h -${50 * scale}z`;
15
-
11
+ // Use exact module-aligned boundaries so the finder pattern produces the
12
+ // required 1:1:3:1:1 dark:light:dark:light:dark ratio that QR scanners need.
13
+ const m = size / 7; // one module width
14
+ const path =
15
+ `M ${offsetX} ${offsetY}v ${size}h ${size}v -${size}z` +
16
+ `M ${offsetX + m} ${offsetY + m}h ${5 * m}v ${5 * m}h -${5 * m}z`;
16
17
  return path;
17
18
  }
18
19
 
@@ -24,13 +25,35 @@ function generateCornerRoundedPattern(
24
25
  offsetY: number,
25
26
  size: number
26
27
  ): string {
27
- const scale = size / 80;
28
- const transform = (coord: number, offset: number) => coord * scale + offset;
29
-
30
- // Using the exact path from user's specification - rounded square corners
31
- const path = `M ${transform(5, offsetX)} ${transform(15, offsetY)}v ${50 * scale}a ${10 * scale} ${10 * scale}, 0, 0, 0, ${10 * scale} ${10 * scale}h ${50 * scale}a ${10 * scale} ${10 * scale}, 0, 0, 0, ${10 * scale} -${10 * scale}v -${50 * scale}a ${10 * scale} ${10 * scale}, 0, 0, 0, -${10 * scale} -${10 * scale}h -${50 * scale}a ${10 * scale} ${10 * scale}, 0, 0, 0, -${10 * scale} ${10 * scale}zM ${transform(20, offsetX)} ${transform(15, offsetY)}h ${40 * scale}a ${5 * scale} ${5 * scale}, 0, 0, 1, ${5 * scale} ${5 * scale}v ${40 * scale}a ${5 * scale} ${5 * scale}, 0, 0, 1, -${5 * scale} ${5 * scale}h -${40 * scale}a ${5 * scale} ${5 * scale}, 0, 0, 1, -${5 * scale} -${5 * scale}v -${40 * scale}a ${5 * scale} ${5 * scale}, 0, 0, 1, ${5 * scale} -${5 * scale}z`;
32
-
33
- return path;
28
+ const m = size / 7; // one module width
29
+ const r = m * 0.875; // outer corner radius (~6.25 units in old 80-unit space)
30
+ const r2 = m * 0.4375; // inner corner radius (~3.5 units in old 80-unit space)
31
+
32
+ // Outer rounded rect: covers the full 7×7 corner area
33
+ const outer =
34
+ `M ${offsetX + r} ${offsetY}` +
35
+ `h ${size - 2 * r}` +
36
+ `a ${r} ${r} 0 0 1 ${r} ${r}` +
37
+ `v ${size - 2 * r}` +
38
+ `a ${r} ${r} 0 0 1 ${-r} ${r}` +
39
+ `h ${-(size - 2 * r)}` +
40
+ `a ${r} ${r} 0 0 1 ${-r} ${-r}` +
41
+ `v ${-(size - 2 * r)}` +
42
+ `a ${r} ${r} 0 0 1 ${r} ${-r}z`;
43
+
44
+ // Inner rounded rect: 1-module inset on all sides (5×5 area), creates the hole
45
+ const inner =
46
+ `M ${offsetX + m + r2} ${offsetY + m}` +
47
+ `h ${5 * m - 2 * r2}` +
48
+ `a ${r2} ${r2} 0 0 1 ${r2} ${r2}` +
49
+ `v ${5 * m - 2 * r2}` +
50
+ `a ${r2} ${r2} 0 0 1 ${-r2} ${r2}` +
51
+ `h ${-(5 * m - 2 * r2)}` +
52
+ `a ${r2} ${r2} 0 0 1 ${-r2} ${-r2}` +
53
+ `v ${-(5 * m - 2 * r2)}` +
54
+ `a ${r2} ${r2} 0 0 1 ${r2} ${-r2}z`;
55
+
56
+ return outer + inner;
34
57
  }
35
58
 
36
59
  // Pattern 9: Circle
@@ -39,14 +62,21 @@ function generateCornerCirclePattern(
39
62
  offsetY: number,
40
63
  size: number
41
64
  ): string {
42
- const scale = size / 80;
43
- const transform = (coord: number, offset: number) => coord * scale + offset;
44
-
45
- // Using the exact path from user's specification - proper circles (made slightly bigger)
46
- const outerRadius = 37.5 * scale; // Increased from 35
47
- const innerRadius = 27 * scale; // Increased from 25
48
- const path = `M ${transform(40, offsetX)} ${transform(2.5, offsetY)}a ${outerRadius} ${outerRadius} 0 1 0 ${0.1 * scale} 0zm 0 ${10.5 * scale}a ${innerRadius} ${innerRadius} 0 1 1 -${0.1 * scale} 0Z`;
49
-
65
+ // Center of the 7×7 corner area
66
+ const cx = offsetX + size / 2;
67
+ const cy = offsetY + size / 2;
68
+ // Outer radius = exactly 3.5 modules (touches corner boundary)
69
+ const outerRadius = size / 2;
70
+ // Inner radius = 2.5 modules (leaves exactly 1-module ring on each side)
71
+ const innerRadius = size * (2.5 / 7);
72
+ // Use two arcs to draw each circle (SVG can't do full-circle arcs in one arc command)
73
+ const path =
74
+ `M ${cx - outerRadius} ${cy}` +
75
+ `a ${outerRadius} ${outerRadius} 0 1 0 ${outerRadius * 2} 0` +
76
+ `a ${outerRadius} ${outerRadius} 0 1 0 ${-outerRadius * 2} 0z` +
77
+ `M ${cx - innerRadius} ${cy}` +
78
+ `a ${innerRadius} ${innerRadius} 0 1 1 ${innerRadius * 2} 0` +
79
+ `a ${innerRadius} ${innerRadius} 0 1 1 ${-innerRadius * 2} 0z`;
50
80
  return path;
51
81
  }
52
82
 
@@ -93,12 +123,36 @@ function generateCornerExtraRoundedPattern(
93
123
  offsetY: number,
94
124
  size: number
95
125
  ): string {
96
- const scale = size / 80;
97
- const transform = (coord: number, offset: number) => coord * scale + offset;
98
-
99
- const path = `M ${transform(5, offsetX)} ${transform(30, offsetY)}v ${20 * scale}a ${25 * scale} ${25 * scale}, 0, 0, 0, ${25 * scale} ${25 * scale}h ${20 * scale}a ${25 * scale} ${25 * scale}, 0, 0, 0, ${25 * scale} -${25 * scale}v -${20 * scale}a ${25 * scale} ${25 * scale}, 0, 0, 0, -${25 * scale} -${25 * scale}h -${20 * scale}a ${25 * scale} ${25 * scale}, 0, 0, 0, -${25 * scale} ${25 * scale}M ${transform(30, offsetX)} ${transform(15, offsetY)}h ${20 * scale}a ${15 * scale} ${15 * scale}, 0, 0, 1, ${15 * scale} ${15 * scale}v ${20 * scale}a ${15 * scale} ${15 * scale}, 0, 0, 1, -${15 * scale} ${15 * scale}h -${20 * scale}a ${15 * scale} ${15 * scale}, 0, 0, 1, -${15 * scale} -${15 * scale}v -${20 * scale}a ${15 * scale} ${15 * scale}, 0, 0, 1, ${15 * scale} -${15 * scale}z`;
100
-
101
- return path;
126
+ const m = size / 7; // one module width
127
+ // Max r for module (0,0) to stay dark: r ≤ m/( 1 - 1/√2 ) ≈ 1.71m
128
+ const r = m * 1.5; // outer corner radius — very rounded (1.5 modules keeps corners dark)
129
+ const r2 = m * 0.75; // inner corner radius
130
+
131
+ // Outer rounded rect: full 7×7, very large corner radius
132
+ const outer =
133
+ `M ${offsetX + r} ${offsetY}` +
134
+ `h ${size - 2 * r}` +
135
+ `a ${r} ${r} 0 0 1 ${r} ${r}` +
136
+ `v ${size - 2 * r}` +
137
+ `a ${r} ${r} 0 0 1 ${-r} ${r}` +
138
+ `h ${-(size - 2 * r)}` +
139
+ `a ${r} ${r} 0 0 1 ${-r} ${-r}` +
140
+ `v ${-(size - 2 * r)}` +
141
+ `a ${r} ${r} 0 0 1 ${r} ${-r}z`;
142
+
143
+ // Inner hole: 1-module inset (5×5 area)
144
+ const inner =
145
+ `M ${offsetX + m + r2} ${offsetY + m}` +
146
+ `h ${5 * m - 2 * r2}` +
147
+ `a ${r2} ${r2} 0 0 1 ${r2} ${r2}` +
148
+ `v ${5 * m - 2 * r2}` +
149
+ `a ${r2} ${r2} 0 0 1 ${-r2} ${r2}` +
150
+ `h ${-(5 * m - 2 * r2)}` +
151
+ `a ${r2} ${r2} 0 0 1 ${-r2} ${-r2}` +
152
+ `v ${-(5 * m - 2 * r2)}` +
153
+ `a ${r2} ${r2} 0 0 1 ${r2} ${-r2}z`;
154
+
155
+ return outer + inner;
102
156
  }
103
157
 
104
158
  /**
package/src/utils.tsx CHANGED
@@ -119,7 +119,7 @@ function generateDataCircles(
119
119
  const { margin, pixelSize, pattern = "circle" } = options;
120
120
  const shapes: JSX.Element[] = [];
121
121
  const qrSize = modules.length;
122
- const radius = pixelSize * 0.333_333; // radius for circles
122
+ const radius = pixelSize * 0.45; // radius for circles (≥0.45 needed for reliable scanning)
123
123
 
124
124
  modules.forEach((row, y) => {
125
125
  row.forEach((cell, x) => {
@@ -938,7 +938,7 @@ export function QRCodeSVG(props: QRPropsSVG) {
938
938
  {/* Top-left corner square */}
939
939
  <g fill={topLeftEyeFillValue}>
940
940
  <path
941
- clipRule="evenodd"
941
+ fillRule="evenodd"
942
942
  d={topLeftEye}
943
943
  transform={`rotate(0,${topLeftX + cornerSize / 2},${topLeftY + cornerSize / 2})`}
944
944
  />
@@ -950,7 +950,7 @@ export function QRCodeSVG(props: QRPropsSVG) {
950
950
  {/* Top-right corner square */}
951
951
  <g fill={topRightEyeFillValue}>
952
952
  <path
953
- clipRule="evenodd"
953
+ fillRule="evenodd"
954
954
  d={topRightEye}
955
955
  transform={`rotate(0,${topRightX + cornerSize / 2},${topRightY + cornerSize / 2})`}
956
956
  />
@@ -962,7 +962,7 @@ export function QRCodeSVG(props: QRPropsSVG) {
962
962
  {/* Bottom-left corner square */}
963
963
  <g fill={bottomLeftEyeFillValue}>
964
964
  <path
965
- clipRule="evenodd"
965
+ fillRule="evenodd"
966
966
  d={bottomLeftEye}
967
967
  transform={`rotate(0,${bottomLeftX + cornerSize / 2},${bottomLeftY + cornerSize / 2})`}
968
968
  />
@@ -1036,7 +1036,7 @@ export function QRCodeSVG(props: QRPropsSVG) {
1036
1036
  {/* Top-left corner square */}
1037
1037
  <g fill={topLeftEyeFillValue}>
1038
1038
  <path
1039
- clipRule="evenodd"
1039
+ fillRule="evenodd"
1040
1040
  d={generateCornerSquarePath(
1041
1041
  topLeftX,
1042
1042
  topLeftY,
@@ -1060,7 +1060,7 @@ export function QRCodeSVG(props: QRPropsSVG) {
1060
1060
  {/* Top-right corner square */}
1061
1061
  <g fill={topRightEyeFillValue}>
1062
1062
  <path
1063
- clipRule="evenodd"
1063
+ fillRule="evenodd"
1064
1064
  d={generateCornerSquarePath(
1065
1065
  topRightX,
1066
1066
  topRightY,
@@ -1084,7 +1084,7 @@ export function QRCodeSVG(props: QRPropsSVG) {
1084
1084
  {/* Bottom-left corner square */}
1085
1085
  <g fill={bottomLeftEyeFillValue}>
1086
1086
  <path
1087
- clipRule="evenodd"
1087
+ fillRule="evenodd"
1088
1088
  d={generateCornerSquarePath(
1089
1089
  bottomLeftX,
1090
1090
  bottomLeftY,
package/types/index.ts CHANGED
@@ -34,6 +34,7 @@ export type { CornerEyePattern } from "./corner-eye";
34
34
  export { CORNER_EYE_PATTERNS, cornerEyePatternSchema } from "./corner-eye";
35
35
  export type { BodyPattern } from "./image-pattern";
36
36
  export { BODY_PATTERN, bodyPatternSchema } from "./image-pattern";
37
+ export { DEFAULT_MARGIN } from "../src/constants";
37
38
  export type {
38
39
  ErrorLevel,
39
40
  ImageSettings,