From 5404a95c15e176d25728bf1a319ddb9828b23625 Mon Sep 17 00:00:00 2001 From: Josh Kingsley Date: Sat, 25 Oct 2025 20:46:35 +0300 Subject: refactor(web): re-organize files --- web/src/index.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 web/src/index.ts (limited to 'web/src/index.ts') 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")); -- cgit v1.2.3