summaryrefslogtreecommitdiff
path: root/web/src/types.ts
blob: 008d1eeb6cbf47c619b0012924d8589d118e9a47 (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
37
import Ratio from "./math/Ratio";

export interface Cell {
  value?: string;
  widthRatio: Ratio;
}

export interface Row {
  cells: Cell[];
}

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

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

export interface Doc {
  grids: Grid[];
}

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

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