@fayz-ai/pos 0.20.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.
- package/LICENSE +21 -0
- package/README.md +44 -0
- package/dist/app/config.d.ts +238 -0
- package/dist/app/config.d.ts.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2638 -0
- package/dist/index.js.map +1 -0
- package/dist/keyboard/index.d.ts +3 -0
- package/dist/keyboard/index.d.ts.map +1 -0
- package/dist/lib/haptics.d.ts +3 -0
- package/dist/lib/haptics.d.ts.map +1 -0
- package/dist/lib/useSwipeAway.d.ts +18 -0
- package/dist/lib/useSwipeAway.d.ts.map +1 -0
- package/dist/screen/DeliveryBoard.d.ts +12 -0
- package/dist/screen/DeliveryBoard.d.ts.map +1 -0
- package/dist/screen/DispatchRail.d.ts +13 -0
- package/dist/screen/DispatchRail.d.ts.map +1 -0
- package/dist/screen/IdentitySheet.d.ts +7 -0
- package/dist/screen/IdentitySheet.d.ts.map +1 -0
- package/dist/screen/ModifierSheet.d.ts +13 -0
- package/dist/screen/ModifierSheet.d.ts.map +1 -0
- package/dist/screen/Notice.d.ts +21 -0
- package/dist/screen/Notice.d.ts.map +1 -0
- package/dist/screen/OpenTableSheet.d.ts +13 -0
- package/dist/screen/OpenTableSheet.d.ts.map +1 -0
- package/dist/screen/PinSheet.d.ts +9 -0
- package/dist/screen/PinSheet.d.ts.map +1 -0
- package/dist/screen/PosScreen.d.ts +96 -0
- package/dist/screen/PosScreen.d.ts.map +1 -0
- package/dist/screen/ReservationsView.d.ts +11 -0
- package/dist/screen/ReservationsView.d.ts.map +1 -0
- package/dist/screen/ShortcutsOverlay.d.ts +6 -0
- package/dist/screen/ShortcutsOverlay.d.ts.map +1 -0
- package/dist/screen/SplitSheet.d.ts +9 -0
- package/dist/screen/SplitSheet.d.ts.map +1 -0
- package/dist/screen/TicketRail.d.ts +36 -0
- package/dist/screen/TicketRail.d.ts.map +1 -0
- package/dist/screen/money.d.ts +11 -0
- package/dist/screen/money.d.ts.map +1 -0
- package/dist/screen/session.d.ts +105 -0
- package/dist/screen/session.d.ts.map +1 -0
- package/dist/screen/views.d.ts +51 -0
- package/dist/screen/views.d.ts.map +1 -0
- package/dist/styles.css +1664 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +53 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/tokens.d.ts +62 -0
- package/dist/theme/tokens.d.ts.map +1 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Faya Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @fayz-ai/pos
|
|
2
|
+
|
|
3
|
+
> The operator surface: one page, touch and keyboard at the same time.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@fayz-ai/pos)
|
|
6
|
+
[](https://github.com/FayaLabs/fayz-sdk/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
**Status:** alpha — under active development, APIs will change.
|
|
9
|
+
|
|
10
|
+
`@fayz-ai/admin` is the shell for the back office. `@fayz-ai/pos` is the shell for the shift: the screen a waiter uses at the Saturday rush and a cashier uses with the muscle memory of ten years on a Bematech terminal. Same contract, opposite principles — no rail, no breadcrumb, no deep navigation, no table density. Everything the operator needs is on one page, because leaving that page mid-service is the failure this package exists to prevent.
|
|
11
|
+
|
|
12
|
+
It is not a restaurant package. A restaurant has tables and tabs that stay open for three hours; a bookstore has a counter and a sale that is born and dies at the register. Both are the same screen with a different `PosAppConfig` — the screen never reads "mesa", it reads what the config called the thing.
|
|
13
|
+
|
|
14
|
+
## What's inside
|
|
15
|
+
- **App config** — `PosAppConfig`: the position surface (`floor` / `list` / `none`), the sale cycle (`open_tab` / `immediate`), vocabulary, action bar, payment methods
|
|
16
|
+
- **The one page** — `PosScreen`: position map, live ticket, catalogue, fixed action bar, open-tickets dock
|
|
17
|
+
- **Ticket engine** — `ticketReducer`, `totalsOf`: adding an item is an append, so two waiters ringing the same table sum instead of overwriting each other
|
|
18
|
+
- **Money** — `formatCents`, `splitEvenly`, `serviceChargeCents`: cents only, and a split that never loses nor invents a centavo
|
|
19
|
+
- **Keyboard runtime** — `createKeymap`: bindings declared once, dispatched by the runtime and *drawn on the button* by the UI
|
|
20
|
+
- **Theme** — `@fayz-ai/pos/theme`: touch size as a token (≥19mm floor), pastel as category identity, position status on its own accent+icon+word axis
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
```bash
|
|
24
|
+
npm install @fayz-ai/pos
|
|
25
|
+
```
|
|
26
|
+
Peer deps: `react` (^18/^19), `lucide-react`, `zustand`. Pulls in `@fayz-ai/core`.
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
```tsx
|
|
30
|
+
import { PosScreen } from '@fayz-ai/pos'
|
|
31
|
+
|
|
32
|
+
<PosScreen
|
|
33
|
+
config={restaurantConfig}
|
|
34
|
+
categories={categories}
|
|
35
|
+
items={items}
|
|
36
|
+
positions={positions}
|
|
37
|
+
terminalName="Caixa 1"
|
|
38
|
+
onAction={handleAction}
|
|
39
|
+
/>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The running dogfood app is [FayaLabs/chef-pos](https://github.com/FayaLabs/chef-pos) — a restaurant profile, a real PWA and the E2E suite. It is where a vertical's configuration belongs; this package stays the engine.
|
|
43
|
+
|
|
44
|
+
## Part of the Fayz SDK
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** What the left column shows — the biggest single difference between verticals. */
|
|
3
|
+
export type PositionSurface =
|
|
4
|
+
/** A spatial grid of positions: restaurant floor, salon chairs. */
|
|
5
|
+
'floor'
|
|
6
|
+
/** A flat list of open tabs with no geometry: counter service, delivery desk. */
|
|
7
|
+
| 'list'
|
|
8
|
+
/** Nothing. Retail rings a sale and it is over; there is no open tab to return to. */
|
|
9
|
+
| 'none';
|
|
10
|
+
/**
|
|
11
|
+
* Whether a sale accumulates. A restaurant opens a tab at 20h and closes it at
|
|
12
|
+
* 23h; a bookstore's sale is born and dies at the register. This decides
|
|
13
|
+
* whether "open"/"transfer"/"split" exist as concepts at all.
|
|
14
|
+
*/
|
|
15
|
+
export type SaleCycle = 'open_tab' | 'immediate';
|
|
16
|
+
/** The words this vertical uses. Shown verbatim — no dictionary lookup, no guessing. */
|
|
17
|
+
export interface PosVocabulary {
|
|
18
|
+
/** One position: "mesa", "comanda", "cadeira", "cliente". */
|
|
19
|
+
position: string;
|
|
20
|
+
/** Many positions: "mesas", "comandas". */
|
|
21
|
+
positionPlural: string;
|
|
22
|
+
/** The running total document: "comanda", "conta", "venda". */
|
|
23
|
+
ticket: string;
|
|
24
|
+
}
|
|
25
|
+
export interface PosPositionConfig {
|
|
26
|
+
surface: PositionSurface;
|
|
27
|
+
/**
|
|
28
|
+
* How the floor draws.
|
|
29
|
+
*
|
|
30
|
+
* - `grid` — equal cards in a responsive grid. Nothing to configure, works
|
|
31
|
+
* the day the restaurant signs up, and a numbered list is genuinely all
|
|
32
|
+
* some rooms need.
|
|
33
|
+
* - `plan` — the real room: tables placed on x/y with their seats drawn
|
|
34
|
+
* around them. Faster to read for a waiter who knows the floor, but it
|
|
35
|
+
* only pays off once someone has actually laid the room out.
|
|
36
|
+
*/
|
|
37
|
+
layout?: 'grid' | 'plan';
|
|
38
|
+
/** Plan grid in cells; positions place themselves inside it. */
|
|
39
|
+
planSize?: {
|
|
40
|
+
cols: number;
|
|
41
|
+
rows: number;
|
|
42
|
+
};
|
|
43
|
+
/** Rooms/areas above the map. Empty renders no tab strip at all. */
|
|
44
|
+
zones?: {
|
|
45
|
+
id: string;
|
|
46
|
+
label: string;
|
|
47
|
+
}[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A category of sellable things. `tone` picks the pastel identity the operator
|
|
51
|
+
* learns by colour — it is assigned per category by data, never derived from
|
|
52
|
+
* status (status has its own axis; see theme/tokens).
|
|
53
|
+
*/
|
|
54
|
+
export interface PosCategory {
|
|
55
|
+
id: string;
|
|
56
|
+
label: string;
|
|
57
|
+
tone: PosTone;
|
|
58
|
+
icon?: ReactNode;
|
|
59
|
+
itemCount?: number;
|
|
60
|
+
}
|
|
61
|
+
/** The pastel identities. Category colour only — never a status. */
|
|
62
|
+
export type PosTone = 'mint' | 'lilac' | 'sky' | 'periwinkle' | 'blush' | 'sand' | 'teal' | 'rose';
|
|
63
|
+
/**
|
|
64
|
+
* One choice inside a modifier group. `priceDeltaCents` may be negative — a
|
|
65
|
+
* removal that gives money back is a real thing on a menu, and modelling it as
|
|
66
|
+
* a signed delta keeps the line's arithmetic in one place.
|
|
67
|
+
*/
|
|
68
|
+
export interface PosModifierOption {
|
|
69
|
+
id: string;
|
|
70
|
+
label: string;
|
|
71
|
+
priceDeltaCents?: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A question the kitchen needs answered before it can cook the item: point,
|
|
75
|
+
* side, extras, removals. `min`/`max` say how many answers are allowed; a
|
|
76
|
+
* group with min > 0 blocks the add until it is satisfied, which is how a
|
|
77
|
+
* steak never reaches the pass without a doneness.
|
|
78
|
+
*/
|
|
79
|
+
export interface PosModifierGroup {
|
|
80
|
+
id: string;
|
|
81
|
+
label: string;
|
|
82
|
+
options: PosModifierOption[];
|
|
83
|
+
min?: number;
|
|
84
|
+
max?: number;
|
|
85
|
+
}
|
|
86
|
+
/** A modifier as chosen on a line — label and price frozen at the moment of
|
|
87
|
+
* the add, so a menu edit tonight cannot rewrite a bill from an hour ago. */
|
|
88
|
+
export interface PickedModifier {
|
|
89
|
+
groupId: string;
|
|
90
|
+
optionId: string;
|
|
91
|
+
label: string;
|
|
92
|
+
priceDeltaCents: number;
|
|
93
|
+
}
|
|
94
|
+
export interface PosItem {
|
|
95
|
+
id: string;
|
|
96
|
+
categoryId: string;
|
|
97
|
+
name: string;
|
|
98
|
+
/** Cents. The POS never holds a float for money. */
|
|
99
|
+
priceCents: number;
|
|
100
|
+
/** Operator-typed short code — the Bematech muscle memory path. */
|
|
101
|
+
code?: string;
|
|
102
|
+
/** Where a kitchen ticket for this item prints. Resolved locally so it works fast. */
|
|
103
|
+
route?: string;
|
|
104
|
+
/** Questions the kitchen needs answered. Empty means one tap rings it. */
|
|
105
|
+
modifiers?: PosModifierGroup[];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* What kind of thing this position is. It decides which rail the operator
|
|
109
|
+
* gets: a table is a bill being built, a delivery order is a job being
|
|
110
|
+
* dispatched. Offering "Fechar conta · Dinheiro · Cartão" on an iFood order
|
|
111
|
+
* that is already paid is not a cosmetic mistake — it is the screen asking the
|
|
112
|
+
* operator to do something that would take money twice.
|
|
113
|
+
*/
|
|
114
|
+
export type PositionKind = 'table' | 'counter' | 'delivery';
|
|
115
|
+
/** Where a delivery order is in its life, from the kitchen to the door. */
|
|
116
|
+
export type DispatchStatus = 'received' | 'preparing' | 'ready' | 'out' | 'delivered' | 'cancelled';
|
|
117
|
+
export interface PosPosition {
|
|
118
|
+
id: string;
|
|
119
|
+
label: string;
|
|
120
|
+
kind?: PositionKind;
|
|
121
|
+
zoneId?: string;
|
|
122
|
+
status: PosPositionStatus;
|
|
123
|
+
seats?: number;
|
|
124
|
+
/** Open ticket living on this position, when there is one. */
|
|
125
|
+
ticketId?: string;
|
|
126
|
+
openedAt?: string;
|
|
127
|
+
attendantName?: string;
|
|
128
|
+
/** Colour of the attendant's chip — same one their roster entry uses. */
|
|
129
|
+
attendantTone?: PosTone;
|
|
130
|
+
totalCents?: number;
|
|
131
|
+
/** Items already fired to the kitchen — what the floor reads at a glance. */
|
|
132
|
+
itemCount?: number;
|
|
133
|
+
/** Plan layout only: top-left cell of the table, 1-based. */
|
|
134
|
+
x?: number;
|
|
135
|
+
y?: number;
|
|
136
|
+
/** Plan layout only: size in cells. Defaults to 2x2. */
|
|
137
|
+
w?: number;
|
|
138
|
+
h?: number;
|
|
139
|
+
shape?: 'square' | 'round' | 'rect' | 'bar';
|
|
140
|
+
/** A standing request for the table: allergy, birthday, window seat. */
|
|
141
|
+
request?: string;
|
|
142
|
+
/** What this ticket is called out loud — a name beats a number at the pass. */
|
|
143
|
+
alias?: string;
|
|
144
|
+
/** How the cashier finds this bill when the customer comes back. */
|
|
145
|
+
customerPhone?: string;
|
|
146
|
+
dispatch?: DispatchStatus;
|
|
147
|
+
/** Marketplace or own channel the order came from. */
|
|
148
|
+
channel?: string;
|
|
149
|
+
/** Colour that identifies the channel on the board's card edge. Comes from
|
|
150
|
+
* the app: which pastel means iFood is a brand decision, not the SDK's. */
|
|
151
|
+
channelTone?: PosTone;
|
|
152
|
+
customerName?: string;
|
|
153
|
+
address?: string;
|
|
154
|
+
courierName?: string;
|
|
155
|
+
/** Promised time, so the board can show what is late instead of what is old. */
|
|
156
|
+
dueAt?: string;
|
|
157
|
+
/** Already settled by the marketplace — the rail must not offer to charge. */
|
|
158
|
+
prepaid?: boolean;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Position status lives on its own visual axis (saturation + icon + text), NOT
|
|
162
|
+
* on the pastel category scale — the two vocabularies must not collide.
|
|
163
|
+
*/
|
|
164
|
+
export type PosPositionStatus = 'free' | 'occupied' | 'bill_requested' | 'attention';
|
|
165
|
+
/** An action on the fixed bar. `shortcut` is drawn on the button itself. */
|
|
166
|
+
export interface PosAction {
|
|
167
|
+
id: string;
|
|
168
|
+
label: string;
|
|
169
|
+
/** Keyboard binding, e.g. 'F2' or 'ctrl+t'. Rendered on the button. */
|
|
170
|
+
shortcut?: string;
|
|
171
|
+
/** Role gate. An action listed here demands a PIN before it runs. */
|
|
172
|
+
requiresPin?: boolean;
|
|
173
|
+
/** Hidden entirely when the config's sale cycle makes it meaningless. */
|
|
174
|
+
cycles?: SaleCycle[];
|
|
175
|
+
}
|
|
176
|
+
export interface PosPaymentMethod {
|
|
177
|
+
id: string;
|
|
178
|
+
label: string;
|
|
179
|
+
icon?: ReactNode;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* A destination in the left rail. The POS is one page per menu, not one page
|
|
183
|
+
* total: ringing an order and closing a shift are different jobs on the same
|
|
184
|
+
* terminal, and pretending otherwise is what makes operators hunt.
|
|
185
|
+
*/
|
|
186
|
+
export interface PosMenu {
|
|
187
|
+
id: string;
|
|
188
|
+
label: string;
|
|
189
|
+
/** Lucide icon name, resolved by the shell. */
|
|
190
|
+
icon?: string;
|
|
191
|
+
/** Which built-in view renders in the content column. */
|
|
192
|
+
view: 'floor' | 'catalog' | 'list' | 'shift' | 'reservations';
|
|
193
|
+
/** Live count drawn beside the label (open tables, pending deliveries…). */
|
|
194
|
+
badge?: number;
|
|
195
|
+
}
|
|
196
|
+
/** Where a booking is in its evening. */
|
|
197
|
+
export type ReservationStatus = 'booked' | 'confirmed' | 'arrived' | 'seated' | 'no_show';
|
|
198
|
+
/**
|
|
199
|
+
* A table promised for a time. The POS does not take the booking — that is the
|
|
200
|
+
* site or the phone — but it is where the promise is kept, so it needs to show
|
|
201
|
+
* who is coming and let the host seat them without retyping anything.
|
|
202
|
+
*/
|
|
203
|
+
export interface PosReservation {
|
|
204
|
+
id: string;
|
|
205
|
+
name: string;
|
|
206
|
+
/** ISO. The list groups and sorts by this. */
|
|
207
|
+
at: string;
|
|
208
|
+
party: number;
|
|
209
|
+
status: ReservationStatus;
|
|
210
|
+
phone?: string;
|
|
211
|
+
/** Allergy, birthday, "perto da janela" — what the host must not forget. */
|
|
212
|
+
note?: string;
|
|
213
|
+
/** Where the booking came from: telefone, site, iFood, balcão. */
|
|
214
|
+
channel?: string;
|
|
215
|
+
/** Filled once seated, so the row stops offering to seat them again. */
|
|
216
|
+
positionId?: string;
|
|
217
|
+
}
|
|
218
|
+
/** Someone on shift, shown at the foot of the rail. */
|
|
219
|
+
export interface PosStaff {
|
|
220
|
+
id: string;
|
|
221
|
+
name: string;
|
|
222
|
+
tone: PosTone;
|
|
223
|
+
role?: string;
|
|
224
|
+
}
|
|
225
|
+
export interface PosAppConfig {
|
|
226
|
+
name: string;
|
|
227
|
+
/** Left-rail destinations. The nav is data, not a hardcoded switch. */
|
|
228
|
+
menus: PosMenu[];
|
|
229
|
+
logo?: ReactNode;
|
|
230
|
+
vocabulary: PosVocabulary;
|
|
231
|
+
positions: PosPositionConfig;
|
|
232
|
+
saleCycle: SaleCycle;
|
|
233
|
+
actions: PosAction[];
|
|
234
|
+
paymentMethods: PosPaymentMethod[];
|
|
235
|
+
/** Service charge as a percentage, e.g. 10 for the Brazilian 10%. */
|
|
236
|
+
serviceChargePercent?: number;
|
|
237
|
+
}
|
|
238
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/app/config.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,oFAAoF;AACpF,MAAM,MAAM,eAAe;AACzB,mEAAmE;AACjE,OAAO;AACT,iFAAiF;GAC/E,MAAM;AACR,sFAAsF;GACpF,MAAM,CAAA;AAEV;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,WAAW,CAAA;AAEhD,wFAAwF;AACxF,MAAM,WAAW,aAAa;IAC5B,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAA;IAChB,2CAA2C;IAC3C,cAAc,EAAE,MAAM,CAAA;IACtB,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,eAAe,CAAA;IACxB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,gEAAgE;IAChE,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACzC,oEAAoE;IACpE,KAAK,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CACxC;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,oEAAoE;AACpE,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,YAAY,GAAG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AAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,uEAAuE;IACvE,KAAK,EAAE,OAAO,EAAE,CAAA;IAChB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,UAAU,EAAE,aAAa,CAAA;IACzB,SAAS,EAAE,iBAAiB,CAAA;IAC5B,SAAS,EAAE,SAAS,CAAA;IACpB,OAAO,EAAE,SAAS,EAAE,CAAA;IACpB,cAAc,EAAE,gBAAgB,EAAE,CAAA;IAClC,qEAAqE;IACrE,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type { PosAppConfig, PosVocabulary, PosPositionConfig, PositionSurface, SaleCycle, PosCategory, PosTone, PosItem, PosPosition, PosPositionStatus, PosAction, PosPaymentMethod, PosMenu, PosStaff, PosModifierGroup, PosModifierOption, PickedModifier, PositionKind, DispatchStatus, PosReservation, ReservationStatus, } from './app/config';
|
|
2
|
+
export { createKeymap, comboOf } from './keyboard';
|
|
3
|
+
export type { KeyBinding, Keymap } from './keyboard';
|
|
4
|
+
export { PosScreen } from './screen/PosScreen';
|
|
5
|
+
export { TicketRail } from './screen/TicketRail';
|
|
6
|
+
export { ModifierSheet } from './screen/ModifierSheet';
|
|
7
|
+
export { OpenTableSheet } from './screen/OpenTableSheet';
|
|
8
|
+
export { IdentitySheet } from './screen/IdentitySheet';
|
|
9
|
+
export { PinSheet } from './screen/PinSheet';
|
|
10
|
+
export { SplitSheet } from './screen/SplitSheet';
|
|
11
|
+
export { ShortcutsOverlay } from './screen/ShortcutsOverlay';
|
|
12
|
+
export { ReservationsView } from './screen/ReservationsView';
|
|
13
|
+
export { DeliveryBoard, DISPATCH_LABEL, nextDispatch } from './screen/DeliveryBoard';
|
|
14
|
+
export { DispatchRail } from './screen/DispatchRail';
|
|
15
|
+
export type { PosScreenProps, PosBill } from './screen/PosScreen';
|
|
16
|
+
export { Notice } from './screen/Notice';
|
|
17
|
+
export type { PosNotice, NoticeTone } from './screen/Notice';
|
|
18
|
+
export { ticketReducer, totalsOf, emptyTicket, bookReducer, ticketAt, countsOf, COUNTER_KEY, } from './screen/session';
|
|
19
|
+
export type { Ticket, TicketLine, TicketTotals, TicketAction, TicketBook, BookAction, LineState, } from './screen/session';
|
|
20
|
+
export { formatCents, splitEvenly, serviceChargeCents } from './screen/money';
|
|
21
|
+
export { haptic, setHapticsEnabled } from './lib/haptics';
|
|
22
|
+
export type { Haptic } from './lib/haptics';
|
|
23
|
+
export { useSwipeAway } from './lib/useSwipeAway';
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,YAAY,EACV,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,WAAW,EACX,OAAO,EACP,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,GAClB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,aA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