|
1 | | -export type ArenaCell = |
2 | | - | ArenaSeatCell |
3 | | - | ArenaGapCell |
4 | | - | ArenaLabelCell; |
| 1 | +export type ArenaNormalizerId = |
| 2 | + | 'none' |
| 3 | + | 'upper' |
| 4 | + | 'lower' |
| 5 | + | 'trim' |
| 6 | + | 'trim-upper' |
| 7 | + | 'trim-lower'; |
5 | 8 |
|
6 | | -export interface ArenaSeatCell { |
7 | | - type: 'seat'; |
8 | | - seatId: string; |
9 | | - label?: string; |
10 | | - span?: number; |
11 | | - meta?: Record<string, unknown>; |
12 | | -} |
13 | | - |
14 | | -export interface ArenaGapCell { |
15 | | - type: 'gap'; |
16 | | - span?: number; |
17 | | -} |
18 | | - |
19 | | -export interface ArenaLabelCell { |
20 | | - type: 'label'; |
21 | | - label: string; |
22 | | - span?: number; |
23 | | - align?: 'left' | 'center' | 'right'; |
24 | | -} |
25 | | - |
26 | | -export type ArenaRow = ArenaCell[]; |
27 | | - |
28 | | -export interface ArenaSectionConfig { |
| 9 | +export interface ArenaLayoutSectionDocument { |
29 | 10 | id: string; |
30 | 11 | title?: string; |
| 12 | + rowLabels?: (string | null)[]; |
| 13 | + grid: (string | null)[][]; |
31 | 14 | seatSize?: number; |
32 | 15 | gapSize?: number; |
33 | | - rows: ArenaRow[]; |
| 16 | + meta?: Record<string, unknown>; |
34 | 17 | } |
35 | 18 |
|
36 | | -export interface ArenaLayoutConfig { |
| 19 | +export interface ArenaLayoutDocument { |
37 | 20 | id: string; |
38 | 21 | name: string; |
39 | 22 | description?: string; |
40 | | - /** |
41 | | - * Monitor field to match against the seatId. Supports dotted paths like "extras.seat". |
42 | | - * If undefined, the monitor name is used as fallback. |
43 | | - */ |
44 | 23 | seatKey?: string; |
45 | | - /** |
46 | | - * Custom seat extractor. Receives the monitor record and should return the logical seat id. |
47 | | - * Overrides seatKey when provided. |
48 | | - */ |
49 | | - resolveMonitorSeat?: (monitor: Record<string, any>) => string | null | undefined; |
50 | | - /** |
51 | | - * Optional seat id normalizer. Useful when seat naming follows custom casing. |
52 | | - */ |
53 | | - normalizeSeatId?: (seatId: string) => string; |
54 | | - sections: ArenaSectionConfig[]; |
| 24 | + normalize?: ArenaNormalizerId | string; |
| 25 | + default?: boolean; |
| 26 | + sections: ArenaLayoutSectionDocument[]; |
| 27 | + meta?: Record<string, unknown>; |
55 | 28 | } |
0 commit comments