feat(standalone): env-selected Yjs provider abstraction (ysync 0004)

Generalize the collab transport into a provider registry (none |
broadcastchannel | partykit | hocuspocus), one active per env. startCollab
takes { provider, room } and awaits provider.whenSynced() before seed/adopt.
Network libs lazily imported; room id from @pcbjam/shared collabRoomId.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Gergő Törcsvári 2026-06-10 14:23:42 +02:00
commit 285efe7a06
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
9 changed files with 308 additions and 28 deletions

View file

@ -11,6 +11,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@hocuspocus/provider": "^4.1.1",
"@pcbjam/shared": "workspace:*",
"@radix-ui/react-dialog": "^1.1.4",
"@radix-ui/react-label": "^2.1.1",
@ -25,6 +26,7 @@
"react-router-dom": "^6.28.1",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"y-partyserver": "^2.2.0",
"yjs": "^13.6.18",
"zod": "^3.24.1"
},