summaryrefslogtreecommitdiff
path: root/web/src/types.ts
diff options
context:
space:
mode:
authorJosh Kingsley <josh@joshkingsley.me>2025-10-25 20:46:35 +0300
committerJosh Kingsley <josh@joshkingsley.me>2025-10-25 22:09:48 +0300
commit5404a95c15e176d25728bf1a319ddb9828b23625 (patch)
tree639d175e15170618d36c0b22b3c8ad7764925175 /web/src/types.ts
parent2a4d7a7fc3b968ed8cdfd958a5e65fbe140042da (diff)
refactor(web): re-organize files
Diffstat (limited to 'web/src/types.ts')
-rw-r--r--web/src/types.ts36
1 files changed, 36 insertions, 0 deletions
diff --git a/web/src/types.ts b/web/src/types.ts
new file mode 100644
index 0000000..df421d7
--- /dev/null
+++ b/web/src/types.ts
@@ -0,0 +1,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;
+}