blob: 1524b04a04d99536f40bb54e364444ff7608c46e (
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
|
interface Cell {
value: string;
}
interface Row {
cells: Cell[];
}
interface Part {
rows: Row[];
}
interface Grid {
parts: Part[];
}
interface Doc {
grids: Grid[];
}
function defaultDoc(): Doc {
const defaultCells = Array(16).map(() => ({ value: "1" }));
return {
grids: [
{ parts: [{ rows: Array(4).map(() => ({ cells: [...defaultCells] })) }] },
],
};
}
export default class Notive {
doc: Doc = defaultDoc();
}
window.notive = new Notive();
window.dispatchEvent(new CustomEvent("ntv:initialized"));
|