retail-print-kit 0.2.2 → 0.2.3

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +29 -2
  3. package/package.json +6 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,34 @@
1
+ # Changelog
2
+
3
+ ## 0.2.3 (2026-10-05)
4
+
5
+ * Website with a landing page and ten task guides (receipts, Electron, cash drawer, Star TSP100, labels, templates, QR and barcodes, logos, discovery and status, migration from escpos / node-thermal-printer).
6
+ * The designer moved to `/designer/` on the site; `sitemap.xml`, `robots.txt`, `llms.txt` and `llms-full.txt` are published.
7
+ * README: guides and FAQ sections. Package description leads with the printer families.
8
+
9
+ ## 0.2.2 (2026-10-05)
10
+
11
+ * A plain install is now 4 packages and under 2 MB with no native modules (was 34 packages and 30 MB).
12
+ * `@napi-rs/canvas` is an optional peer, as intended; it was being installed for everyone.
13
+ * QR codes are generated with the dependency-free `qrcode-generator`; text is encoded as UTF-8.
14
+
15
+ ## 0.2.1 (2026-10-03)
16
+
17
+ * The repository and the designer address were renamed to `retail-print-kit`; all links follow.
18
+
19
+ ## 0.2.0 (2026-10-03)
20
+
21
+ * Images and logos: `loadImage` with optional Floyd-Steinberg dithering, `ditherRgba`, `serializeBitmap`, a template `image` block, logo upload in the designer.
22
+ * `discoverNetworkPrinters` finds raw-printing hosts on the local networks and can identify each.
23
+ * CLI: `verify`, `verify-label`, `discover`, `image`. A hardware checklist documents what to confirm on real units.
24
+
25
+ ## 0.1.0 (2026-10-03)
26
+
27
+ First release.
28
+
29
+ * ESC/POS, Star Line Mode and Star raster encoders with printer profiles.
30
+ * Network, USB and serial transports; printer status and `identify`.
31
+ * Receipt templates, HTML and PNG previews.
32
+ * Label printing in ZPL, TSPL and EZPL with an SVG preview and label templates.
33
+ * Browser bundle and the template designer.
34
+ * CLI: `test`, `drawer`, `status`, `identify`, `preview`, `print`, `profiles`, `list`.
package/README.md CHANGED
@@ -10,7 +10,7 @@ A modern replacement for `escpos` / `node-thermal-printer`: ESC/POS **and** Star
10
10
  network / serial, printer profiles instead of model `if`s, receipt and label **templates**, live
11
11
  **previews**, a visual **designer**, and a CLI for testing hardware in the field.
12
12
 
13
- **[Open the designer](https://arka162.github.io/retail-print-kit/)** · [Printer matrix](docs/printer-matrix.md) · [Hardware checklist](docs/hardware-checklist.md)
13
+ **[Website](https://arka162.github.io/retail-print-kit/)** · **[Designer](https://arka162.github.io/retail-print-kit/designer/)** · [Guides](https://arka162.github.io/retail-print-kit/guides/) · [Printer matrix](docs/printer-matrix.md) · [Changelog](CHANGELOG.md)
14
14
 
15
15
  ![Receipt designer](https://raw.githubusercontent.com/arka162/retail-print-kit/main/docs/images/designer-receipt.png)
16
16
 
@@ -77,6 +77,19 @@ const { UsbTransport } = require('retail-print-kit/usb'); // new UsbTransp
77
77
  const { SerialTransport } = require('retail-print-kit/serial'); // new SerialTransport('COM3', { baudRate: 9600 })
78
78
  ```
79
79
 
80
+ ## Guides
81
+
82
+ * [Print a receipt from Node.js on an ESC/POS thermal printer](https://arka162.github.io/retail-print-kit/guides/print-receipt-nodejs.html)
83
+ * [Print receipts from an Electron app](https://arka162.github.io/retail-print-kit/guides/electron-receipt-printing.html)
84
+ * [Open a cash drawer](https://arka162.github.io/retail-print-kit/guides/open-cash-drawer-nodejs.html)
85
+ * [Print to a Star TSP100 or TSP143](https://arka162.github.io/retail-print-kit/guides/star-tsp100-nodejs.html)
86
+ * [Print ZPL, TSPL and EZPL labels](https://arka162.github.io/retail-print-kit/guides/zpl-tspl-ezpl-label-printing-nodejs.html)
87
+ * [Receipt and label templates and the visual designer](https://arka162.github.io/retail-print-kit/guides/receipt-template-designer.html)
88
+ * [QR codes and barcodes](https://arka162.github.io/retail-print-kit/guides/print-qr-code-barcode-receipt.html)
89
+ * [Print a logo or image](https://arka162.github.io/retail-print-kit/guides/print-logo-image-thermal-printer.html)
90
+ * [Find printers on the network and read status](https://arka162.github.io/retail-print-kit/guides/network-printer-discovery-status.html)
91
+ * [Migrating from escpos or node-thermal-printer](https://arka162.github.io/retail-print-kit/guides/escpos-node-thermal-printer-alternative.html)
92
+
80
93
  ## Supported printers
81
94
 
82
95
  | Family | Profile ids | Command set |
@@ -159,7 +172,7 @@ const label = renderLabel(labelTemplate, data); // from a designer JSON
159
172
 
160
173
  ## Designer
161
174
 
162
- **https://arka162.github.io/retail-print-kit/** edits receipt and label templates in the browser:
175
+ **https://arka162.github.io/retail-print-kit/designer/** edits receipt and label templates in the browser:
163
176
  block palette, nested `each` / `if`, property editor, sample data, live preview, drag-to-position
164
177
  on labels, logo upload with dithering, JSON import and export. It runs entirely in the page from
165
178
  the browser bundle (`retail-print-kit/browser`); nothing is uploaded.
@@ -201,6 +214,20 @@ npx retail-print-kit profiles
201
214
 
202
215
  Add `--dry` to any printing command to dump the bytes as hex instead of sending them.
203
216
 
217
+ ## FAQ
218
+
219
+ **Does it work in Electron?** Yes, in the main process; the renderer asks for prints over IPC and the
220
+ browser build renders previews.
221
+
222
+ **Does it need a printer driver?** No. It sends the printer's own commands over TCP, USB or serial,
223
+ so there is no OS print dialog and nothing to install on the machine.
224
+
225
+ **Why does a Star TSP100 print nothing with other libraries?** It is raster-only and ignores ESC/POS
226
+ text. Use the `star-tsp100` profile.
227
+
228
+ **Can I print without a printer attached?** `--dry` dumps the bytes, and the HTML, PNG and SVG
229
+ previews show the result.
230
+
204
231
  ## Status of hardware verification
205
232
 
206
233
  Encoders are covered by byte-exact tests. Items still to be confirmed on real units are listed in
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "retail-print-kit",
3
- "version": "0.2.2",
4
- "description": "Receipt printers, cash drawers and label printers for Node.js and Electron: ESC/POS (Epson and compatibles), Star, ZPL, TSPL, EZPL; USB, network and serial; templates, previews, a visual designer and a CLI.",
3
+ "version": "0.2.3",
4
+ "description": "ESC/POS thermal receipt printer, cash drawer and label printer (ZPL, TSPL, EZPL) library for Node.js and Electron. Epson, Star TSP100 and compatibles over USB, network or serial, with templates, previews, a visual designer and a CLI.",
5
5
  "author": "Arkaprova Majumder <arka162@gmail.com>",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -37,7 +37,8 @@
37
37
  "dist",
38
38
  "bin",
39
39
  "README.md",
40
- "LICENSE"
40
+ "LICENSE",
41
+ "CHANGELOG.md"
41
42
  ],
42
43
  "engines": {
43
44
  "node": ">=18"
@@ -47,7 +48,8 @@
47
48
  "test": "npm run build && node --test test/run.js",
48
49
  "clean": "rm -rf dist",
49
50
  "build:browser": "esbuild src/browser.ts --bundle --format=iife --global-name=RetailPrintKit --platform=browser --external:zlib --outfile=dist/browser/retail-print-kit.js --minify --sourcemap && esbuild src/browser.ts --bundle --format=esm --platform=browser --external:zlib --outfile=dist/browser/retail-print-kit.mjs --minify",
50
- "prepublishOnly": "npm test"
51
+ "prepublishOnly": "npm test",
52
+ "build:site": "node scripts/build-site.js"
51
53
  },
52
54
  "dependencies": {
53
55
  "iconv-lite": "^0.6.3",