summaryrefslogtreecommitdiff
path: root/web/src/types.ts
blob: df421d7e8d305d496df1c052a62d79e668299295 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import Ratio from "./math/Ratio";

export interface Cell {
  value?: string;
}

export interface Row {
  cells: [Cell, ...Cell[]];
}

export interface Part {
  title?: string;
  rows: [Row, ...Row[]];
}

export interface Grid {
  id: string;
  baseCellSize: number;
  baseCellWidthRatio: Ratio;
  parts: [Part, ...Part[]];
}

export interface Doc {
  grids: Grid[];
}

export interface RowRef {
  partIndex: number;
  rowIndex: number;
}

export interface CellRef {
  partIndex: number;
  rowIndex: number;
  cellIndex: number;
}