@posx/core 5.5.579 → 5.5.582
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/CLAUDE.md +23 -23
- package/LICENSE +21 -21
- package/README.md +85 -85
- package/build/index.d.ts +7 -1
- package/build/index.js +1 -1
- package/dev/.stfolder/syncthing-folder-9a95b7.txt +5 -0
- package/dev/98894488.xlsx +0 -0
- package/dev/HappyThaiSembawang.csv +336 -0
- package/dev/KB/create-new-model.md +34 -0
- package/dev/KB/markdown-lint.md +14 -0
- package/dev/KB/object-clone-pitfalls.md +52 -0
- package/dev/KB/readmefirst.md +8 -0
- package/dev/KB/stock-deduction-logic.md +61 -0
- package/dev/Merchants/HappyThaiSembawang.csv +400 -0
- package/dev/Merchants/HappyThaiSembawang.xlsx +0 -0
- package/dev/Merchants/charen_thai/category.csv +20 -0
- package/dev/Merchants/charen_thai/charen_thai_xpos.csv +1021 -0
- package/dev/Merchants/charen_thai/convert.cjs +194 -0
- package/dev/Merchants/charen_thai/item.csv +183 -0
- package/dev/Merchants/charen_thai/modifier.csv +664 -0
- package/dev/Product_Import_Template.xlsx +0 -0
- package/dev/XPOS Invoice Module.pdf +232 -0
- package/dev/convert_menu.cjs +134 -0
- package/dev/convert_menu.py +127 -0
- package/dev/data/invoice.json +1 -0
- package/dev/escpos/receipt.bin +0 -0
- package/dev/escpos/receipt.hex +1 -0
- package/dev/escpos/receipt.json +1 -0
- package/dev/escpos-cli-usage.md +103 -0
- package/dev/export/xpos_menu.csv +1021 -0
- package/dev/export/xpos_menu_bilingual.csv +1021 -0
- package/dev/export/xpos_retail_sample.csv +38 -0
- package/dev/harbor-harness-deployment.md +78 -0
- package/dev/incidents/2026-04-01-reprint-timeout.md +33 -0
- package/dev/incidents/2026-05-06-searchable-field-design-pitfall.md +37 -0
- package/dev/nginx-harbor-harness.conf +84 -0
- package/dev/px-cli.md +97 -0
- package/dev/test-logs/2026-02.md +5 -0
- package/dev/tmp/xpos_product_import(1).csv +338 -0
- package/dev/tmp/xpos_product_import_fixed.csv +338 -0
- package/dev//344/272/247/345/223/201/345/257/274/345/205/245/346/250/241/346/235/277.xlsx +0 -0
- package/jest.config.cjs +36 -36
- package/jest.setup.cjs +91 -91
- package/package.json +1 -1
- package/package.publish.json +121 -121
- package/tsdown.config.ts +21 -21
- package/vite.config.ts +86 -86
- package/AGENTS.md +0 -24
- package/memo/technical-docs/01_ARCHITECTURE.md +0 -147
- package/memo/technical-docs/02_CORE_BUSINESS.md +0 -292
- package/memo/technical-docs/03_UI_COMPONENTS.md +0 -59
- package/memo/technical-docs/04_VIEWS.md +0 -82
- package/memo/technical-docs/05_DATA_LAYER.md +0 -375
- package/memo/technical-docs/06_CROSS_PLATFORM.md +0 -246
- package/memo/technical-docs/07_SIMILARITY_INDEX.md +0 -195
- package/memo/technical-docs/CHECKPOINT.md +0 -46
- package/memo/technical-docs/PROJECT_OVERVIEW.md +0 -122
- package/memo/technical-docs/TECHNICAL_DOCS_PLAN.md +0 -77
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# ESC/POS CLI Tool Usage Manual
|
|
2
|
+
|
|
3
|
+
Generate ESC/POS byte files from print job JSON definitions.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
- `scripts/generate-escpos-bytes.mjs` - ESC/POS byte generator with built-in encoder
|
|
8
|
+
- `scripts/example-print-job.json` - Example print job for testing
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm run escpos -- <input.json> <output.bin>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm run escpos -- ./scripts/example-print-job.json ./receipt.bin
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Supported Features
|
|
23
|
+
|
|
24
|
+
| Feature | Description |
|
|
25
|
+
|---------|-------------|
|
|
26
|
+
| Text | With size, bold, italic, underline, alignment |
|
|
27
|
+
| Tables | With column widths and text wrapping |
|
|
28
|
+
| Lines | Separators |
|
|
29
|
+
| QR codes | Model, size, error level configurable |
|
|
30
|
+
| Barcodes | EAN13, UPC-A, UPC-E, EAN8, Code39, ITF, Codabar |
|
|
31
|
+
| Newlines | With repeat count |
|
|
32
|
+
| Cut | Full or partial |
|
|
33
|
+
| Beeper | Audible alert |
|
|
34
|
+
| Cash drawer | Open cash drawer command |
|
|
35
|
+
| VISCII codepage | Vietnamese support |
|
|
36
|
+
| Multiple codepages | cp437, cp850, cp936, etc. |
|
|
37
|
+
|
|
38
|
+
## Not Supported
|
|
39
|
+
|
|
40
|
+
- **Image printing** - Requires browser APIs, not available in CLI mode
|
|
41
|
+
|
|
42
|
+
## Print Job JSON Format
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"codepage": "cp936",
|
|
47
|
+
"items": [
|
|
48
|
+
{
|
|
49
|
+
"type": "text",
|
|
50
|
+
"align": "center",
|
|
51
|
+
"style": "bold",
|
|
52
|
+
"item": {
|
|
53
|
+
"text": "RECEIPT",
|
|
54
|
+
"size": "normal",
|
|
55
|
+
"line_width": 48
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "table",
|
|
60
|
+
"table": {
|
|
61
|
+
"size": "normal",
|
|
62
|
+
"line_width": 48,
|
|
63
|
+
"items": [
|
|
64
|
+
{ "text": "Item", "column_width": 50 },
|
|
65
|
+
{ "text": "Qty", "column_width": 20 },
|
|
66
|
+
{ "text": "Price", "column_width": 30 }
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "qrcode",
|
|
72
|
+
"align": "center",
|
|
73
|
+
"qrcode": {
|
|
74
|
+
"data": "https://example.com",
|
|
75
|
+
"model": 2,
|
|
76
|
+
"size": 6,
|
|
77
|
+
"errorlevel": "m"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "cut"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Available Types
|
|
88
|
+
|
|
89
|
+
| Type | Properties |
|
|
90
|
+
|------|------------|
|
|
91
|
+
| `text` | `item.text`, `item.size`, `item.line_width`, `item.width`, `item.height` |
|
|
92
|
+
| `table` | `table.items[]`, `table.size`, `table.line_width` |
|
|
93
|
+
| `line` | `item.text` (character to repeat) |
|
|
94
|
+
| `newline` | `repeat` (number of lines) |
|
|
95
|
+
| `qrcode` | `qrcode.data`, `qrcode.model`, `qrcode.size`, `qrcode.errorlevel` |
|
|
96
|
+
| `barcode` | `barcode.data`, `barcode.symbology`, `barcode.height` |
|
|
97
|
+
| `cut` | `item.text` ("full" or "partial") |
|
|
98
|
+
| `beeper` | - |
|
|
99
|
+
| `open_cash_drawer` | - |
|
|
100
|
+
|
|
101
|
+
## Available Codepages
|
|
102
|
+
|
|
103
|
+
`cp437`, `cp850`, `cp860`, `cp863`, `cp865`, `cp857`, `cp737`, `cp866`, `cp862`, `cp864`, `cp874`, `cp936`, `cp949`, `cp950`, `shiftjis`, `windows1252`, `69` (VISCII)
|