summaryrefslogtreecommitdiff
path: root/web/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/index.ts')
-rw-r--r--web/src/index.ts22
1 files changed, 22 insertions, 0 deletions
diff --git a/web/src/index.ts b/web/src/index.ts
new file mode 100644
index 0000000..a32aaf1
--- /dev/null
+++ b/web/src/index.ts
@@ -0,0 +1,22 @@
+import { Doc } from "./types";
+
+function defaultDoc(): Doc {
+ const defaultCells = Array(16).map(() => ({ value: "1" }));
+
+ return {
+ grids: [
+ {
+ baseCellSize: 48,
+ parts: [{ rows: Array(4).map(() => ({ cells: [...defaultCells] })) }],
+ },
+ ],
+ };
+}
+
+export default class Notive {
+ doc: Doc = defaultDoc();
+}
+
+window.notive = new Notive();
+
+window.dispatchEvent(new CustomEvent("ntv:initialized"));