@posx/core 5.5.586 → 5.5.588

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 (58) hide show
  1. package/CLAUDE.md +23 -23
  2. package/LICENSE +21 -21
  3. package/README.md +85 -85
  4. package/build/index.d.ts +80 -1
  5. package/build/index.js +4 -4
  6. package/dev/.stfolder/syncthing-folder-9a95b7.txt +5 -0
  7. package/dev/98894488.xlsx +0 -0
  8. package/dev/HappyThaiSembawang.csv +336 -0
  9. package/dev/KB/create-new-model.md +34 -0
  10. package/dev/KB/markdown-lint.md +14 -0
  11. package/dev/KB/object-clone-pitfalls.md +52 -0
  12. package/dev/KB/readmefirst.md +8 -0
  13. package/dev/KB/stock-deduction-logic.md +61 -0
  14. package/dev/Merchants/HappyThaiSembawang.csv +400 -0
  15. package/dev/Merchants/HappyThaiSembawang.xlsx +0 -0
  16. package/dev/Merchants/charen_thai/category.csv +20 -0
  17. package/dev/Merchants/charen_thai/charen_thai_xpos.csv +1021 -0
  18. package/dev/Merchants/charen_thai/convert.cjs +194 -0
  19. package/dev/Merchants/charen_thai/item.csv +183 -0
  20. package/dev/Merchants/charen_thai/modifier.csv +664 -0
  21. package/dev/Product_Import_Template.xlsx +0 -0
  22. package/dev/XPOS Invoice Module.pdf +232 -0
  23. package/dev/convert_menu.cjs +134 -0
  24. package/dev/convert_menu.py +127 -0
  25. package/dev/data/invoice.json +1 -0
  26. package/dev/escpos/receipt.bin +0 -0
  27. package/dev/escpos/receipt.hex +1 -0
  28. package/dev/escpos/receipt.json +1 -0
  29. package/dev/escpos-cli-usage.md +103 -0
  30. package/dev/export/xpos_menu.csv +1021 -0
  31. package/dev/export/xpos_menu_bilingual.csv +1021 -0
  32. package/dev/export/xpos_retail_sample.csv +38 -0
  33. package/dev/harbor-harness-deployment.md +78 -0
  34. package/dev/incidents/2026-04-01-reprint-timeout.md +33 -0
  35. package/dev/incidents/2026-05-06-searchable-field-design-pitfall.md +37 -0
  36. package/dev/nginx-harbor-harness.conf +84 -0
  37. package/dev/px-cli.md +97 -0
  38. package/dev/test-logs/2026-02.md +5 -0
  39. package/dev/tmp/xpos_product_import(1).csv +338 -0
  40. package/dev/tmp/xpos_product_import_fixed.csv +338 -0
  41. package/dev//344/272/247/345/223/201/345/257/274/345/205/245/346/250/241/346/235/277.xlsx +0 -0
  42. package/jest.config.cjs +36 -36
  43. package/jest.setup.cjs +91 -91
  44. package/package.json +1 -1
  45. package/package.publish.json +121 -121
  46. package/tsdown.config.ts +21 -21
  47. package/vite.config.ts +86 -86
  48. package/AGENTS.md +0 -24
  49. package/memo/technical-docs/01_ARCHITECTURE.md +0 -147
  50. package/memo/technical-docs/02_CORE_BUSINESS.md +0 -292
  51. package/memo/technical-docs/03_UI_COMPONENTS.md +0 -59
  52. package/memo/technical-docs/04_VIEWS.md +0 -82
  53. package/memo/technical-docs/05_DATA_LAYER.md +0 -375
  54. package/memo/technical-docs/06_CROSS_PLATFORM.md +0 -246
  55. package/memo/technical-docs/07_SIMILARITY_INDEX.md +0 -195
  56. package/memo/technical-docs/CHECKPOINT.md +0 -46
  57. package/memo/technical-docs/PROJECT_OVERVIEW.md +0 -122
  58. 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)