@classytic/pos-ui 0.2.0 → 1.3.0

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 (87) hide show
  1. package/LICENSE +75 -0
  2. package/dist/components/CartSidebar.d.ts +56 -0
  3. package/dist/components/CartSidebar.js +10 -9
  4. package/dist/components/PosTopBar.d.ts +19 -0
  5. package/dist/components/PosTopBar.js +4 -4
  6. package/dist/components/PrinterSettingsDialog.d.ts +8 -0
  7. package/dist/components/PrinterSettingsDialog.js +506 -20
  8. package/dist/components/ReceiptDeliveryDialog.d.ts +11 -0
  9. package/dist/components/ReceiptDeliveryDialog.js +98 -0
  10. package/dist/components/ReceiptReprintDialog.d.ts +10 -0
  11. package/dist/components/ReceiptReprintDialog.js +49 -22
  12. package/dist/components/index.d.ts +6 -0
  13. package/dist/components/index.js +7 -0
  14. package/dist/dashboard/components/CustomerLookupDialog.js +108 -90
  15. package/dist/dashboard/components/CustomerQuickAddDialog.js +3 -1
  16. package/dist/dashboard/components/DeliveryPanel.js +134 -0
  17. package/dist/dashboard/components/ProductCard.js +17 -7
  18. package/dist/dashboard/components/ProductsPanel.js +4 -4
  19. package/dist/dashboard/components/SplitPaymentPanel.js +5 -5
  20. package/dist/dashboard/components/VariantSelectorDialog.js +53 -11
  21. package/dist/dashboard/components/cart/AddChargeDialog.js +3 -2
  22. package/dist/dashboard/components/cart/CartItems.js +5 -5
  23. package/dist/dashboard/components/cart/CartSummary.js +6 -6
  24. package/dist/dashboard/components/cart/CustomerSection.js +3 -3
  25. package/dist/dashboard/components/cart/DiscountSection.js +4 -3
  26. package/dist/dashboard/components/cart/PointsRedemptionSection.js +5 -4
  27. package/dist/dashboard/pos.types.d.ts +32 -0
  28. package/dist/hardware/agent-adapter.js +127 -0
  29. package/dist/hardware/agent-pairing.d.ts +18 -0
  30. package/dist/hardware/agent-pairing.js +63 -0
  31. package/dist/hardware/context.d.ts +1 -5
  32. package/dist/hardware/index.d.ts +4 -3
  33. package/dist/hardware/index.js +3 -2
  34. package/dist/hardware/ports.d.ts +21 -4
  35. package/dist/hardware/tauri-adapter.d.ts +0 -1
  36. package/dist/hardware/tauri-adapter.js +19 -5
  37. package/dist/hardware/web-adapter.d.ts +22 -7
  38. package/dist/hardware/web-adapter.js +56 -14
  39. package/dist/hooks/branch-scoped-key.js +64 -0
  40. package/dist/hooks/index.d.ts +6 -0
  41. package/dist/hooks/index.js +7 -0
  42. package/dist/hooks/sale-attempt.js +62 -0
  43. package/dist/hooks/useManagerAuth.js +9 -1
  44. package/dist/hooks/usePosCart.d.ts +55 -0
  45. package/dist/hooks/usePosCart.js +224 -117
  46. package/dist/hooks/usePosCustomer.d.ts +31 -0
  47. package/dist/hooks/usePosCustomer.js +32 -78
  48. package/dist/hooks/usePosDelivery.d.ts +28 -0
  49. package/dist/hooks/usePosDelivery.js +133 -0
  50. package/dist/hooks/usePosMultiOrder.d.ts +22 -0
  51. package/dist/hooks/usePosMultiOrder.js +14 -4
  52. package/dist/hooks/usePosPayment.d.ts +22 -0
  53. package/dist/lib/delivery-payload.js +83 -0
  54. package/dist/lib/money.js +96 -23
  55. package/dist/node_modules/react-hook-form/dist/index.esm.js +468 -332
  56. package/dist/runtime/auth-port.d.ts +1 -5
  57. package/dist/runtime/branch-port.d.ts +1 -5
  58. package/dist/runtime/config.d.ts +43 -6
  59. package/dist/runtime/config.js +18 -1
  60. package/dist/runtime/index.d.ts +2 -2
  61. package/dist/runtime/index.js +2 -2
  62. package/dist/screens/OrderHistoryDrawer.d.ts +8 -0
  63. package/dist/screens/OrderHistoryDrawer.js +15 -15
  64. package/dist/screens/ParkedOrdersDrawer.d.ts +12 -0
  65. package/dist/screens/ParkedOrdersDrawer.js +3 -3
  66. package/dist/screens/PaymentScreen.d.ts +4 -0
  67. package/dist/screens/PaymentScreen.js +194 -33
  68. package/dist/screens/ProductScreen.d.ts +4 -0
  69. package/dist/screens/ProductScreen.js +13 -10
  70. package/dist/screens/ReceiptScreen.d.ts +4 -0
  71. package/dist/screens/ReceiptScreen.js +96 -72
  72. package/dist/screens/ShiftCloseScreen.d.ts +4 -0
  73. package/dist/screens/ShiftCloseScreen.js +18 -15
  74. package/dist/screens/ShiftOpenScreen.d.ts +4 -0
  75. package/dist/screens/ShiftOpenScreen.js +75 -19
  76. package/dist/screens/index.d.ts +8 -0
  77. package/dist/screens/index.js +9 -0
  78. package/dist/shell/index.d.ts +2 -0
  79. package/dist/shell/pos-shell.d.ts +41 -8
  80. package/dist/shell/pos-shell.js +25 -18
  81. package/dist/state/index.d.ts +3 -0
  82. package/dist/state/index.js +4 -0
  83. package/dist/state/pos-context.d.ts +13 -0
  84. package/dist/state/pos-state.d.ts +49 -0
  85. package/dist/state/pos-state.js +6 -7
  86. package/dist/utils/pos-helpers.js +137 -34
  87. package/package.json +112 -92
package/package.json CHANGED
@@ -1,92 +1,112 @@
1
- {
2
- "name": "@classytic/pos-ui",
3
- "version": "0.2.0",
4
- "private": false,
5
- "type": "module",
6
- "description": "Point-of-sale register UI \u2014 a self-contained, full-screen state-machine app (shift \u2192 products \u2192 payment \u2192 receipt \u2192 close) with a hardware DI port (printer/drawer/scanner/terminal). Multi-surface: web, Tauri desktop, React Native. Frontend sibling of the @classytic/pos kernel. Independent of the dashboard stack (no erp-shell).",
7
- "files": [
8
- "dist",
9
- "styles.css",
10
- "LICENSE",
11
- "README.md"
12
- ],
13
- "scripts": {
14
- "build": "tsdown",
15
- "dev": "tsdown --watch",
16
- "typecheck": "tsc --noEmit",
17
- "clean": "rimraf dist"
18
- },
19
- "peerDependencies": {
20
- "@classytic/commerce-sdk": ">=0.9.1",
21
- "@classytic/fluid": ">=1.9.1",
22
- "@classytic/primitives": ">=0.11.0",
23
- "@tanstack/react-query": ">=5.0.0",
24
- "clsx": ">=2.0.0",
25
- "lucide-react": ">=1.0.0",
26
- "next": ">=14.0.0",
27
- "react": ">=19.0.0",
28
- "sonner": ">=2.0.0",
29
- "tailwind-merge": ">=2.0.0"
30
- },
31
- "peerDependenciesMeta": {
32
- "@classytic/commerce-sdk": {
33
- "optional": true
34
- },
35
- "@classytic/fluid": {
36
- "optional": true
37
- },
38
- "@classytic/primitives": {
39
- "optional": true
40
- },
41
- "@tanstack/react-query": {
42
- "optional": true
43
- },
44
- "clsx": {
45
- "optional": true
46
- },
47
- "lucide-react": {
48
- "optional": true
49
- },
50
- "next": {
51
- "optional": true
52
- },
53
- "react": {
54
- "optional": true
55
- },
56
- "sonner": {
57
- "optional": true
58
- },
59
- "tailwind-merge": {
60
- "optional": true
61
- }
62
- },
63
- "devDependencies": {
64
- "@tanstack/react-query": "^5.101.2",
65
- "@types/node": "^26.1.0",
66
- "@types/react": "^19.2.17",
67
- "clsx": "^2.1.1",
68
- "lucide-react": "^1.23.0",
69
- "next": "^16.2.9",
70
- "publint": "^0.3.21",
71
- "react": "^19.2.7",
72
- "react-hook-form": "^7.80.0",
73
- "rimraf": "^6.1.3",
74
- "sonner": "^2.0.7",
75
- "tailwind-merge": "^3.6.0",
76
- "tsdown": "^0.22.3",
77
- "typescript": "^6.0.3"
78
- },
79
- "publishConfig": {
80
- "access": "public"
81
- },
82
- "sideEffects": false,
83
- "exports": {
84
- "./hardware": "./dist/hardware/index.js",
85
- "./runtime": "./dist/runtime/index.js",
86
- "./shell": "./dist/shell/index.js",
87
- "./package.json": "./package.json"
88
- },
89
- "inlinedDependencies": {
90
- "react-hook-form": "7.80.0"
91
- }
92
- }
1
+ {
2
+ "license": "SEE LICENSE IN LICENSE",
3
+ "name": "@classytic/pos-ui",
4
+ "version": "1.3.0",
5
+ "private": false,
6
+ "type": "module",
7
+ "description": "Point-of-sale register UI — a self-contained, full-screen state-machine app (shift → products → payment → receipt → close) with a hardware DI port (printer/drawer/scanner/terminal). Multi-surface: web, Tauri desktop, React Native. Frontend sibling of the @classytic/pos kernel. Independent of the dashboard stack (no erp-shell).",
8
+ "files": [
9
+ "dist",
10
+ "styles.css",
11
+ "LICENSE",
12
+ "README.md"
13
+ ],
14
+ "scripts": {
15
+ "build": "tsdown",
16
+ "dev": "tsdown --watch",
17
+ "typecheck": "tsc --noEmit",
18
+ "clean": "rimraf dist",
19
+ "test": "vitest run",
20
+ "test:watch": "vitest",
21
+ "lint": "node ../../scripts/ui-guards/run.mjs",
22
+ "prepublishOnly": "npm run typecheck && npm run lint && npm run build"
23
+ },
24
+ "peerDependencies": {
25
+ "@classytic/commerce-sdk": ">=0.16.0",
26
+ "@classytic/fluid": ">=1.14.0",
27
+ "@classytic/pos-agent": ">=0.1.0",
28
+ "@classytic/primitives": ">=0.25.0",
29
+ "@tanstack/react-query": ">=5.0.0",
30
+ "clsx": ">=2.0.0",
31
+ "lucide-react": ">=1.0.0",
32
+ "next": ">=14.0.0",
33
+ "react": ">=19.0.0",
34
+ "sonner": ">=2.0.0",
35
+ "tailwind-merge": ">=2.0.0"
36
+ },
37
+ "peerDependenciesMeta": {
38
+ "@classytic/commerce-sdk": {
39
+ "optional": true
40
+ },
41
+ "@classytic/fluid": {
42
+ "optional": true
43
+ },
44
+ "@classytic/pos-agent": {
45
+ "optional": true
46
+ },
47
+ "@classytic/primitives": {
48
+ "optional": true
49
+ },
50
+ "@tanstack/react-query": {
51
+ "optional": true
52
+ },
53
+ "clsx": {
54
+ "optional": true
55
+ },
56
+ "lucide-react": {
57
+ "optional": true
58
+ },
59
+ "next": {
60
+ "optional": true
61
+ },
62
+ "react": {
63
+ "optional": true
64
+ },
65
+ "sonner": {
66
+ "optional": true
67
+ },
68
+ "tailwind-merge": {
69
+ "optional": true
70
+ }
71
+ },
72
+ "devDependencies": {
73
+ "@classytic/commerce-sdk": "^0.16.0",
74
+ "@classytic/fluid": "^1.14.0",
75
+ "@classytic/pos-agent": ">=0.1.0",
76
+ "@classytic/primitives": "^0.25.0",
77
+ "@tanstack/react-query": "^5.101.2",
78
+ "@types/node": "^26.1.0",
79
+ "@types/react": "^19.2.17",
80
+ "clsx": "^2.1.1",
81
+ "lucide-react": "^1.23.0",
82
+ "next": "^16.2.9",
83
+ "publint": "^0.3.21",
84
+ "react": "^19.2.7",
85
+ "react-hook-form": "^7.80.0",
86
+ "rimraf": "^6.1.3",
87
+ "sonner": "^2.0.7",
88
+ "tailwind-merge": "^3.6.0",
89
+ "tsdown": "^0.22.14",
90
+ "typescript": "^6.0.3"
91
+ },
92
+ "publishConfig": {
93
+ "access": "public"
94
+ },
95
+ "sideEffects": false,
96
+ "exports": {
97
+ "./components": "./dist/components/index.js",
98
+ "./hardware": "./dist/hardware/index.js",
99
+ "./hooks": "./dist/hooks/index.js",
100
+ "./runtime": "./dist/runtime/index.js",
101
+ "./screens": "./dist/screens/index.js",
102
+ "./shell": "./dist/shell/index.js",
103
+ "./state": "./dist/state/index.js",
104
+ "./package.json": "./package.json"
105
+ },
106
+ "inlinedDependencies": {
107
+ "react-hook-form": "7.86.0"
108
+ },
109
+ "dependencies": {
110
+ "uqr": "^0.1.3"
111
+ }
112
+ }