Replace hand-built HTML strings with hiccup vectors rendered by a
minimal hiccup→HTML converter (example/todomvc/pocketbook/hiccup.cljs).
Supports CSS-style selectors (:div.class#id), attribute maps, void
elements, and nested children.
Move core, sync, and transit from platform-specific .clj/.cljs to
shared .cljc files with reader conditionals. This enables testing
the full sync logic on the JVM and using SyncedAtom from Clojure
clients.
Key changes:
- PStore protocol (store.cljc) decouples core from storage backend
- IDB store (store/idb.cljs) and memory store (store/memory.cljc)
- SyncedAtom implements CLJ IDeref/IAtom/IRef + CLJS equivalents
- Sync client uses java.net.http on CLJ, fetch on CLJS
- SSE remains CLJS-only; JVM clients use polling
- API change: store passed explicitly instead of pb/open
- 7 new JVM tests: local ops, persistence, watches, two-client sync
- 28 tests total, 87 assertions, all passing
- Add kick-ch to SyncedAtom: swap!/reset! trigger immediate push
instead of waiting for the 15s sync loop interval
- SSE: pull on reconnect ("connected" message), not just on new events,
so coming back online picks up missed server changes
- TodoMVC: render and bind events before IDB load completes; the watch
re-renders automatically when cached data arrives
- example/todomvc/pocketbook/todomvc.cljs — app source
- example/todomvc/todomvc.html — page
- example/todomvc/js/ — compiled output (gitignored)
Server static file serving is now filesystem-based via --static-dir
flag instead of classpath resources. No static dir by default (API
only); bb server passes --static-dir example/todomvc.
Removed resources/public/ — library has no bundled static assets.