retail-print-kit 0.2.0 → 0.2.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.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # retail-print-kit
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/retail-print-kit.svg)](https://www.npmjs.com/package/retail-print-kit)
4
- [![ci](https://github.com/arka162/thermal-print/actions/workflows/ci.yml/badge.svg)](https://github.com/arka162/thermal-print/actions/workflows/ci.yml)
4
+ [![ci](https://github.com/arka162/retail-print-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/arka162/retail-print-kit/actions/workflows/ci.yml)
5
5
  [![license](https://img.shields.io/npm/l/retail-print-kit.svg)](LICENSE)
6
6
 
7
7
  **Receipt printers, cash drawers and label printers for Node.js and Electron, in one package.**
@@ -10,9 +10,9 @@ 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/thermal-print/)** · [Printer matrix](docs/printer-matrix.md) · [Hardware checklist](docs/hardware-checklist.md)
13
+ **[Open the designer](https://arka162.github.io/retail-print-kit/)** · [Printer matrix](docs/printer-matrix.md) · [Hardware checklist](docs/hardware-checklist.md)
14
14
 
15
- ![Receipt designer](https://raw.githubusercontent.com/arka162/thermal-print/main/docs/images/designer-receipt.png)
15
+ ![Receipt designer](https://raw.githubusercontent.com/arka162/retail-print-kit/main/docs/images/designer-receipt.png)
16
16
 
17
17
  ## Why
18
18
 
@@ -153,11 +153,11 @@ const svg = labelToSvg(b.label); // preview
153
153
  const label = renderLabel(labelTemplate, data); // from a designer JSON
154
154
  ```
155
155
 
156
- ![Label designer](https://raw.githubusercontent.com/arka162/thermal-print/main/docs/images/designer-label.png)
156
+ ![Label designer](https://raw.githubusercontent.com/arka162/retail-print-kit/main/docs/images/designer-label.png)
157
157
 
158
158
  ## Designer
159
159
 
160
- **https://arka162.github.io/thermal-print/** edits receipt and label templates in the browser:
160
+ **https://arka162.github.io/retail-print-kit/** edits receipt and label templates in the browser:
161
161
  block palette, nested `each` / `if`, property editor, sample data, live preview, drag-to-position
162
162
  on labels, logo upload with dithering, JSON import and export. It runs entirely in the page from
163
163
  the browser bundle (`retail-print-kit/browser`); nothing is uploaded.
@@ -169,7 +169,7 @@ printer.toHtml(); // paper-like HTML of the reco
169
169
  opsToHtml(ops, profile); opsToPng(ops, profile); // same without a Printer
170
170
  ```
171
171
 
172
- <img src="https://raw.githubusercontent.com/arka162/thermal-print/main/docs/images/test-page.png" width="300" alt="PNG preview of the test page">
172
+ <img src="https://raw.githubusercontent.com/arka162/retail-print-kit/main/docs/images/test-page.png" width="300" alt="PNG preview of the test page">
173
173
 
174
174
  ## Find and identify printers
175
175
 
@@ -122,7 +122,7 @@ async function testPage(printer, profile) {
122
122
  .tableCustom([{ text: 'TOTAL', width: 0.7, style: 'b' }, { text: '$12.50', width: 0.3, align: 'RIGHT' }])
123
123
  .newLine()
124
124
  .align('ct').barcode('036000291452', 'UPC_A', { height: 60, width: 2 }).newLine()
125
- .qr('https://github.com/arka162/thermal-print', { size: 5 }).newLine()
125
+ .qr('https://github.com/arka162/retail-print-kit', { size: 5 }).newLine()
126
126
  .align('lt').text(`${'='.repeat(10)} end of test ${'='.repeat(10)}`)
127
127
  .cut();
128
128
  await printer.flush();
@@ -159,9 +159,9 @@ async function verifyPage(printer, profile, args) {
159
159
  .barcode('RPK 123', 'CODE39', { height: 50 }).newLine().align('lt');
160
160
  section(printer, 'V7', 'QR A = printer native, QR B = bitmap; both must scan to the same URL');
161
161
  printer.align('ct').text('A');
162
- if (profile.features.nativeQr || profile.set === 'star-graphic') printer.qr('https://github.com/arka162/thermal-print', { size: 5 });
162
+ if (profile.features.nativeQr || profile.set === 'star-graphic') printer.qr('https://github.com/arka162/retail-print-kit', { size: 5 });
163
163
  else printer.text('(no native QR on this profile)');
164
- printer.newLine().text('B').image(qrBitmap('https://github.com/arka162/thermal-print', { size: 5 })).newLine().align('lt');
164
+ printer.newLine().text('B').image(qrBitmap('https://github.com/arka162/retail-print-kit', { size: 5 })).newLine().align('lt');
165
165
  section(printer, 'V8', 'Raster: checkerboard, then a diagonal line, edges sharp');
166
166
  const bm = emptyBitmap(256, 64);
167
167
  for (let y = 0; y < 64; y++) for (let x = 0; x < 256; x++) if (x < 128 ? ((x >> 3) + (y >> 3)) % 2 === 0 : Math.abs(x - 128 - y * 2) < 2) setPixel(bm, x, y, true);
@@ -189,7 +189,7 @@ function verifyLabel(args) {
189
189
  b.box(2, 2, w - 4, h - 4, 2)
190
190
  .text(10, 8, 'L1 text 20', 20).text(10, 32, 'L2 text 32', 32)
191
191
  .barcode(10, 72, '036000291452', 'UPC_A', 40)
192
- .qr(w - 110, 8, 'https://github.com/arka162/thermal-print', { module: 3 })
192
+ .qr(w - 110, 8, 'https://github.com/arka162/retail-print-kit', { module: 3 })
193
193
  .rect(10, h - 14, w - 20, 4)
194
194
  .text(w - 150, h - 60, String(args.language || 'zpl').toUpperCase(), 40, { bold: true });
195
195
  return b.label;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "retail-print-kit",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
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.",
5
5
  "author": "Arkaprova Majumder <arka162@gmail.com>",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/arka162/thermal-print.git"
9
+ "url": "https://github.com/arka162/retail-print-kit.git"
10
10
  },
11
11
  "main": "./dist/index.js",
12
12
  "types": "./dist/index.d.ts",
@@ -78,9 +78,9 @@
78
78
  "bin": {
79
79
  "retail-print-kit": "./bin/retail-print-kit.js"
80
80
  },
81
- "homepage": "https://arka162.github.io/thermal-print/",
81
+ "homepage": "https://arka162.github.io/retail-print-kit/",
82
82
  "bugs": {
83
- "url": "https://github.com/arka162/thermal-print/issues"
83
+ "url": "https://github.com/arka162/retail-print-kit/issues"
84
84
  },
85
85
  "keywords": [
86
86
  "escpos",