@teamflojo/floimg-qr 0.2.0 → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Flojo, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  QR code generator for floimg using the qrcode library.
4
4
 
5
+ ## Standing on the Shoulders of Giants
6
+
7
+ This plugin is a thin wrapper around [qrcode](https://www.npmjs.com/package/qrcode). We don't abstract or limit the underlying library—your options pass through directly.
8
+
9
+ - **Full qrcode power**: All QR code options and error correction levels work
10
+ - **Native format**: Use qrcode options, not a FloImg abstraction
11
+ - **Their docs are your docs**: See [qrcode documentation](https://www.npmjs.com/package/qrcode)
12
+
13
+ FloImg orchestrates the workflow (generate → transform → save). The qrcode library does what it does best.
14
+
5
15
  ## Installation
6
16
 
7
17
  ```bash
@@ -11,24 +21,24 @@ npm install @teamflojo/floimg @teamflojo/floimg-qr
11
21
  ## Usage
12
22
 
13
23
  ```typescript
14
- import createClient from '@teamflojo/floimg';
15
- import qr from '@teamflojo/floimg-qr';
24
+ import createClient from "@teamflojo/floimg";
25
+ import qr from "@teamflojo/floimg-qr";
16
26
 
17
27
  const floimg = createClient();
18
28
  floimg.registerGenerator(qr());
19
29
 
20
30
  // Generate a QR code
21
31
  const qrCode = await floimg.generate({
22
- generator: 'qr',
32
+ generator: "qr",
23
33
  params: {
24
- text: 'https://github.com/bcooke/floimg',
34
+ text: "https://github.com/bcooke/floimg",
25
35
  width: 300,
26
- errorCorrectionLevel: 'H'
27
- }
36
+ errorCorrectionLevel: "H",
37
+ },
28
38
  });
29
39
 
30
40
  // Save to filesystem or S3
31
- const result = await floimg.save(qrCode, './output/qr-github.png');
41
+ const result = await floimg.save(qrCode, "./output/qr-github.png");
32
42
  // Or save to S3:
33
43
  // const result = await floimg.save(qrCode, 's3://my-bucket/qr/github.png');
34
44
  console.log(result.location);
@@ -40,11 +50,11 @@ console.log(result.location);
40
50
 
41
51
  ```typescript
42
52
  const qr = await floimg.generate({
43
- generator: 'qr',
53
+ generator: "qr",
44
54
  params: {
45
- text: 'Hello World!',
46
- width: 200
47
- }
55
+ text: "Hello World!",
56
+ width: 200,
57
+ },
48
58
  });
49
59
  ```
50
60
 
@@ -52,12 +62,12 @@ const qr = await floimg.generate({
52
62
 
53
63
  ```typescript
54
64
  const qr = await floimg.generate({
55
- generator: 'qr',
65
+ generator: "qr",
56
66
  params: {
57
- text: 'https://example.com',
67
+ text: "https://example.com",
58
68
  width: 300,
59
- errorCorrectionLevel: 'H' // High error correction
60
- }
69
+ errorCorrectionLevel: "H", // High error correction
70
+ },
61
71
  });
62
72
  ```
63
73
 
@@ -65,15 +75,15 @@ const qr = await floimg.generate({
65
75
 
66
76
  ```typescript
67
77
  const qr = await floimg.generate({
68
- generator: 'qr',
78
+ generator: "qr",
69
79
  params: {
70
- text: 'Styled QR Code',
80
+ text: "Styled QR Code",
71
81
  width: 400,
72
82
  color: {
73
- dark: '#667eea', // Purple
74
- light: '#ffffff' // White background
75
- }
76
- }
83
+ dark: "#667eea", // Purple
84
+ light: "#ffffff", // White background
85
+ },
86
+ },
77
87
  });
78
88
  ```
79
89
 
@@ -81,12 +91,12 @@ const qr = await floimg.generate({
81
91
 
82
92
  ```typescript
83
93
  const qr = await floimg.generate({
84
- generator: 'qr',
94
+ generator: "qr",
85
95
  params: {
86
- text: 'https://example.com',
87
- format: 'svg',
88
- width: 300
89
- }
96
+ text: "https://example.com",
97
+ format: "svg",
98
+ width: 300,
99
+ },
90
100
  });
91
101
  ```
92
102
 
@@ -101,42 +111,42 @@ EMAIL:john@example.com
101
111
  END:VCARD`;
102
112
 
103
113
  const qr = await floimg.generate({
104
- generator: 'qr',
114
+ generator: "qr",
105
115
  params: {
106
116
  text: vcard,
107
117
  width: 350,
108
- errorCorrectionLevel: 'H'
109
- }
118
+ errorCorrectionLevel: "H",
119
+ },
110
120
  });
111
121
  ```
112
122
 
113
123
  ### WiFi Network
114
124
 
115
125
  ```typescript
116
- const wifi = 'WIFI:T:WPA;S:MyNetwork;P:MyPassword;;';
126
+ const wifi = "WIFI:T:WPA;S:MyNetwork;P:MyPassword;;";
117
127
 
118
128
  const qr = await floimg.generate({
119
- generator: 'qr',
129
+ generator: "qr",
120
130
  params: {
121
131
  text: wifi,
122
- width: 300
123
- }
132
+ width: 300,
133
+ },
124
134
  });
125
135
  ```
126
136
 
127
137
  ## Parameters
128
138
 
129
- | Parameter | Type | Default | Description |
130
- |-----------|------|---------|-------------|
131
- | `text` | string | *required* | Text/URL to encode |
132
- | `width` | number | 300 | Output width in pixels |
133
- | `errorCorrectionLevel` | 'L'\|'M'\|'Q'\|'H' | 'M' | Error correction level |
134
- | `margin` | number | 4 | Margin around QR code (in modules) |
135
- | `color.dark` | string | '#000000' | Dark color |
136
- | `color.light` | string | '#ffffff' | Light/background color |
137
- | `format` | 'png'\|'svg' | 'png' | Output format |
138
- | `version` | number | auto | QR code version (1-40) |
139
- | `maskPattern` | number | auto | Mask pattern (0-7) |
139
+ | Parameter | Type | Default | Description |
140
+ | ---------------------- | ------------------ | ---------- | ---------------------------------- |
141
+ | `text` | string | _required_ | Text/URL to encode |
142
+ | `width` | number | 300 | Output width in pixels |
143
+ | `errorCorrectionLevel` | 'L'\|'M'\|'Q'\|'H' | 'M' | Error correction level |
144
+ | `margin` | number | 4 | Margin around QR code (in modules) |
145
+ | `color.dark` | string | '#000000' | Dark color |
146
+ | `color.light` | string | '#ffffff' | Light/background color |
147
+ | `format` | 'png'\|'svg' | 'png' | Output format |
148
+ | `version` | number | auto | QR code version (1-40) |
149
+ | `maskPattern` | number | auto | Mask pattern (0-7) |
140
150
 
141
151
  ## Error Correction Levels
142
152
 
@@ -150,15 +160,17 @@ Higher error correction allows QR codes to be read even if partially damaged, bu
150
160
  ## Configuration
151
161
 
152
162
  ```typescript
153
- floimg.registerGenerator(qr({
154
- errorCorrectionLevel: 'H', // Default to high error correction
155
- width: 400, // Default width
156
- margin: 5, // Default margin
157
- color: {
158
- dark: '#000000',
159
- light: '#ffffff'
160
- }
161
- }));
163
+ floimg.registerGenerator(
164
+ qr({
165
+ errorCorrectionLevel: "H", // Default to high error correction
166
+ width: 400, // Default width
167
+ margin: 5, // Default margin
168
+ color: {
169
+ dark: "#000000",
170
+ light: "#ffffff",
171
+ },
172
+ })
173
+ );
162
174
  ```
163
175
 
164
176
  ## Use Cases
@@ -167,54 +179,55 @@ floimg.registerGenerator(qr({
167
179
 
168
180
  ```typescript
169
181
  const ticketData = JSON.stringify({
170
- event: 'Concert',
171
- seat: 'A12',
172
- code: 'ABC123'
182
+ event: "Concert",
183
+ seat: "A12",
184
+ code: "ABC123",
173
185
  });
174
186
 
175
187
  const ticket = await floimg.generate({
176
- generator: 'qr',
188
+ generator: "qr",
177
189
  params: {
178
190
  text: ticketData,
179
191
  width: 300,
180
- errorCorrectionLevel: 'H'
181
- }
192
+ errorCorrectionLevel: "H",
193
+ },
182
194
  });
183
195
  ```
184
196
 
185
197
  ### Payment QR Codes
186
198
 
187
199
  ```typescript
188
- const paymentUrl = 'bitcoin:1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?amount=0.01';
200
+ const paymentUrl = "bitcoin:1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?amount=0.01";
189
201
 
190
202
  const payment = await floimg.generate({
191
- generator: 'qr',
203
+ generator: "qr",
192
204
  params: {
193
205
  text: paymentUrl,
194
206
  width: 350,
195
- errorCorrectionLevel: 'H'
196
- }
207
+ errorCorrectionLevel: "H",
208
+ },
197
209
  });
198
210
  ```
199
211
 
200
212
  ### App Store Links
201
213
 
202
214
  ```typescript
203
- const appStore = 'https://apps.apple.com/app/id123456789';
215
+ const appStore = "https://apps.apple.com/app/id123456789";
204
216
 
205
217
  const qr = await floimg.generate({
206
- generator: 'qr',
218
+ generator: "qr",
207
219
  params: {
208
220
  text: appStore,
209
221
  width: 250,
210
- margin: 6
211
- }
222
+ margin: 6,
223
+ },
212
224
  });
213
225
  ```
214
226
 
215
227
  ## QR Code Library Documentation
216
228
 
217
229
  This generator uses the qrcode library directly. For advanced options:
230
+
218
231
  - https://github.com/soldair/node-qrcode
219
232
  - https://github.com/soldair/node-qrcode#qr-code-options
220
233
 
package/dist/index.d.ts CHANGED
@@ -31,7 +31,7 @@ export declare const qrSchema: GeneratorSchema;
31
31
  */
32
32
  export interface QRConfig {
33
33
  /** Default error correction level */
34
- errorCorrectionLevel?: 'L' | 'M' | 'Q' | 'H';
34
+ errorCorrectionLevel?: "L" | "M" | "Q" | "H";
35
35
  /** Default width */
36
36
  width?: number;
37
37
  /** Default margin */
@@ -46,7 +46,7 @@ export interface QRParams extends Record<string, unknown> {
46
46
  /** Text/URL to encode (required) */
47
47
  text?: string;
48
48
  /** Error correction level: L (7%), M (15%), Q (25%), H (30%) */
49
- errorCorrectionLevel?: 'L' | 'M' | 'Q' | 'H';
49
+ errorCorrectionLevel?: "L" | "M" | "Q" | "H";
50
50
  /** Output width in pixels */
51
51
  width?: number;
52
52
  /** Margin around QR code (in modules) */
@@ -59,7 +59,7 @@ export interface QRParams extends Record<string, unknown> {
59
59
  light?: string;
60
60
  };
61
61
  /** Output format: 'png' | 'svg' */
62
- format?: 'png' | 'svg';
62
+ format?: "png" | "svg";
63
63
  /** QR code version (1-40, auto if not specified) */
64
64
  version?: number;
65
65
  /** Mask pattern (0-7, auto if not specified) */
package/dist/index.js CHANGED
@@ -63,12 +63,12 @@ export const qrSchema = {
63
63
  * Create a QR code generator instance
64
64
  */
65
65
  export default function qr(config = {}) {
66
- const { errorCorrectionLevel: defaultErrorLevel = 'M', width: defaultWidth = 300, margin: defaultMargin = 4, color: defaultColor = { dark: '#000000', light: '#ffffff' }, } = config;
66
+ const { errorCorrectionLevel: defaultErrorLevel = "M", width: defaultWidth = 300, margin: defaultMargin = 4, color: defaultColor = { dark: "#000000", light: "#ffffff" }, } = config;
67
67
  return {
68
68
  name: "qr",
69
69
  schema: qrSchema,
70
70
  async generate(params) {
71
- const { text, errorCorrectionLevel = defaultErrorLevel, width = defaultWidth, margin = defaultMargin, color = defaultColor, format = 'png', version, maskPattern, quality, } = params;
71
+ const { text, errorCorrectionLevel = defaultErrorLevel, width = defaultWidth, margin = defaultMargin, color = defaultColor, format = "png", version, maskPattern, quality: _quality, } = params;
72
72
  if (!text) {
73
73
  throw new Error("QR code 'text' parameter is required");
74
74
  }
@@ -84,22 +84,22 @@ export default function qr(config = {}) {
84
84
  // Generate QR code
85
85
  let bytes;
86
86
  let mime;
87
- if (format === 'svg') {
87
+ if (format === "svg") {
88
88
  // Generate SVG
89
89
  const svgString = await QRCode.toString(text, {
90
90
  ...baseOptions,
91
- type: 'svg',
91
+ type: "svg",
92
92
  });
93
- bytes = Buffer.from(svgString, 'utf-8');
94
- mime = 'image/svg+xml';
93
+ bytes = Buffer.from(svgString, "utf-8");
94
+ mime = "image/svg+xml";
95
95
  }
96
96
  else {
97
97
  // Generate PNG
98
98
  bytes = await QRCode.toBuffer(text, {
99
99
  ...baseOptions,
100
- type: 'png',
100
+ type: "png",
101
101
  });
102
- mime = 'image/png';
102
+ mime = "image/png";
103
103
  }
104
104
  return {
105
105
  bytes,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAoB;IACvC,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,qCAAqC;IAClD,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,sCAAsC;SACpD;QACD,oBAAoB,EAAE;YACpB,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,2DAA2D;YACxE,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;YAC1B,OAAO,EAAE,GAAG;SACb;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,wBAAwB;YACrC,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,IAAI;SACd;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,gCAAgC;YAC7C,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,EAAE;SACZ;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK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Q,CAAC,IAAI,EAAE;oBAClC,GAAG,WAAW;oBACd,IAAI,EAAE,KAAK;iBACZ,CAAC,CAAC;gBACH,IAAI,GAAG,WAAW,CAAC;YACrB,CAAC;YAED,OAAO;gBACL,KAAK;gBACL,IAAI;gBACJ,KAAK,EAAE,KAAe;gBACtB,MAAM,EAAE,KAAe,EAAE,sBAAsB;gBAC/C,MAAM,EAAE,IAAI;gBACZ,QAAQ,EAAE;oBACR,IAAI;oBACJ,oBAAoB;oBACpB,MAAM;iBACP;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,8CAA8C;AAC9C,OAAO,EAAE,EAAE,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamflojo/floimg-qr",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "QR code generator for floimg using qrcode library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -16,14 +16,6 @@
16
16
  "README.md",
17
17
  "LICENSE"
18
18
  ],
19
- "scripts": {
20
- "build": "tsc",
21
- "dev": "tsc --watch",
22
- "test": "vitest",
23
- "typecheck": "tsc --noEmit",
24
- "clean": "rm -rf dist",
25
- "prepublishOnly": "npm run build"
26
- },
27
19
  "keywords": [
28
20
  "floimg",
29
21
  "qr",
@@ -39,7 +31,7 @@
39
31
  "directory": "packages/floimg-qr"
40
32
  },
41
33
  "peerDependencies": {
42
- "@teamflojo/floimg": "^0.1.0"
34
+ "@teamflojo/floimg": "^0.8.0"
43
35
  },
44
36
  "dependencies": {
45
37
  "qrcode": "^1.5.4"
@@ -47,11 +39,18 @@
47
39
  "devDependencies": {
48
40
  "@types/node": "^22.10.2",
49
41
  "@types/qrcode": "^1.5.5",
50
- "@teamflojo/floimg": "workspace:*",
51
42
  "typescript": "^5.7.2",
52
- "vitest": "^2.1.8"
43
+ "vitest": "^2.1.8",
44
+ "@teamflojo/floimg": "0.9.0"
53
45
  },
54
46
  "engines": {
55
47
  "node": ">=18.0.0"
48
+ },
49
+ "scripts": {
50
+ "build": "tsc",
51
+ "dev": "tsc --watch",
52
+ "test": "vitest --run",
53
+ "typecheck": "tsc --noEmit",
54
+ "clean": "rm -rf dist"
56
55
  }
57
- }
56
+ }