summaryrefslogtreecommitdiffhomepage
path: root/src/main.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-06 22:08:16 +0900
committerAdam Malczewski <[email protected]>2026-06-06 22:08:16 +0900
commit6fa2b9db4a1ce9122540f697adf155e5a814b21d (patch)
tree407f07b961c03171ed7e9b01f08b6778dfbc1ba1 /src/main.ts
downloaddispatch-web-6fa2b9db4a1ce9122540f697adf155e5a814b21d.tar.gz
dispatch-web-6fa2b9db4a1ce9122540f697adf155e5a814b21d.zip
Slice 1: surface system + WS transport + composition root
Pure-core feature libraries assembled at the composition root: - core/protocol: pure reducer over surface catalog/spec/error messages - features/surface-host: generic field-kind interpreter (toggle/progress/ selector/stat/button) + pure plan logic; no surface-id special-casing - adapters/ws: injected WebSocket client (effects at the edge) - app: composition root store (Svelte 5 runes over the pure reducer), host-relative surface WS URL resolution (resolveWsUrl), root App.svelte Verified green: svelte-check 0/0, vitest 84 passed, biome clean, vite build ok.
Diffstat (limited to 'src/main.ts')
-rw-r--r--src/main.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.ts b/src/main.ts
new file mode 100644
index 0000000..f58cfe2
--- /dev/null
+++ b/src/main.ts
@@ -0,0 +1,9 @@
+import { mount } from "svelte";
+import App from "./App.svelte";
+
+const target = document.getElementById("app");
+if (!target) {
+ throw new Error("missing #app mount target");
+}
+
+export default mount(App, { target });