{"_id":"@cyberdynecorp/excalidraw-yjs","_rev":"7-dc4ea8b1f9a2aaed76928ae2d589d86f","name":"@cyberdynecorp/excalidraw-yjs","dist-tags":{"latest":"0.12.0"},"versions":{"0.6.0":{"name":"@cyberdynecorp/excalidraw-yjs","version":"0.6.0","author":{"name":"Cyberdyne Corp AI"},"license":"MIT","_id":"@cyberdynecorp/excalidraw-yjs@0.6.0","maintainers":[{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"}],"homepage":"https://github.com/CyberdyneCorp/excalidraw-native#readme","bugs":{"url":"https://github.com/CyberdyneCorp/excalidraw-native/issues"},"dist":{"shasum":"7e61aa0a606a376c80b311d45fee88c206d39979","tarball":"https://registry.npmjs.org/@cyberdynecorp/excalidraw-yjs/-/excalidraw-yjs-0.6.0.tgz","fileCount":12,"integrity":"sha512-cxBYUyaq0hbd549LT4QFrnqzYERkODCdnZoxuxkP5MAfU0F1gGTEwMUIzS1BlCWn5XFJ/UIiShZf/anIanN4Pg==","signatures":[{"sig":"MEUCIHkH4lgbcB2YRKug3xxTUiK4X+eedzJFBwtpEGrlTlW+AiEAv3ofKqIvHoAfCRir+qHPXS+2mJ5xQyoYYN0mhPYu9ic=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31728},"main":"./dist/index.js","type":"module","_from":"file:cyberdynecorp-excalidraw-yjs-0.6.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"},"_resolved":"/private/var/folders/sg/f6m0yz7d56vbpw27mt34k78w0000gn/T/d638517d1cb9d7e45efde12535eb96e0/cyberdynecorp-excalidraw-yjs-0.6.0.tgz","_integrity":"sha512-cxBYUyaq0hbd549LT4QFrnqzYERkODCdnZoxuxkP5MAfU0F1gGTEwMUIzS1BlCWn5XFJ/UIiShZf/anIanN4Pg==","repository":{"url":"git+https://github.com/CyberdyneCorp/excalidraw-native.git","type":"git","directory":"web/packages/excalidraw-yjs"},"_npmVersion":"11.2.0","description":"Optional Yjs/CRDT collaboration adapter for @cyberdynecorp/excalidraw-svelte — two-way binds an EditorStore to a Y.Doc for field-level merge and the Yjs provider ecosystem (y-websocket, Hocuspocus, Liveblocks, custom). The element-LWW core stays canonical","directories":{},"sideEffects":false,"_nodeVersion":"22.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"yjs":"^13.6.0","typescript":"^5.7.2","@types/node":"^22.10.2","@cyberdynecorp/excalidraw-svelte":"0.6.0"},"peerDependencies":{"yjs":"^13.6.0","@cyberdynecorp/excalidraw-svelte":">=0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/excalidraw-yjs_0.6.0_1783509592997_0.18815222217684502","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@cyberdynecorp/excalidraw-yjs","version":"0.7.0","author":{"name":"Cyberdyne Corp AI"},"license":"MIT","_id":"@cyberdynecorp/excalidraw-yjs@0.7.0","maintainers":[{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"}],"homepage":"https://github.com/CyberdyneCorp/excalidraw-native#readme","bugs":{"url":"https://github.com/CyberdyneCorp/excalidraw-native/issues"},"dist":{"shasum":"a6f5d82f2199f15a75c748c0bca2473758dbea01","tarball":"https://registry.npmjs.org/@cyberdynecorp/excalidraw-yjs/-/excalidraw-yjs-0.7.0.tgz","fileCount":12,"integrity":"sha512-w1VJtfwJjEMSifLD48ldlQrhXq41HKpkgMZK6g64ak7qcRcWWhyrdE4gdAK2M4JVGaidMPVut5elZz+/nzXp0Q==","signatures":[{"sig":"MEYCIQCHYL3JJL4yx/64q93o/e3XZnnBYlBty/dH0A31NTuyHwIhAIuvEKhgRB4cxIMlR8folAlYkmW1NeiodHbJ9itqrycN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31728},"main":"./dist/index.js","type":"module","_from":"file:cyberdynecorp-excalidraw-yjs-0.7.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"},"_resolved":"/tmp/a1b0ccbae27f1b81237a667886a3e718/cyberdynecorp-excalidraw-yjs-0.7.0.tgz","_integrity":"sha512-w1VJtfwJjEMSifLD48ldlQrhXq41HKpkgMZK6g64ak7qcRcWWhyrdE4gdAK2M4JVGaidMPVut5elZz+/nzXp0Q==","repository":{"url":"git+https://github.com/CyberdyneCorp/excalidraw-native.git","type":"git","directory":"web/packages/excalidraw-yjs"},"_npmVersion":"10.8.2","description":"Optional Yjs/CRDT collaboration adapter for @cyberdynecorp/excalidraw-svelte — two-way binds an EditorStore to a Y.Doc for field-level merge and the Yjs provider ecosystem (y-websocket, Hocuspocus, Liveblocks, custom). The element-LWW core stays canonical","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"yjs":"^13.6.0","typescript":"^5.7.2","@types/node":"^22.10.2","@cyberdynecorp/excalidraw-svelte":"0.7.0"},"peerDependencies":{"yjs":"^13.6.0","@cyberdynecorp/excalidraw-svelte":">=0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/excalidraw-yjs_0.7.0_1783717322376_0.09256626397728995","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@cyberdynecorp/excalidraw-yjs","version":"0.8.0","author":{"name":"Cyberdyne Corp AI"},"license":"MIT","_id":"@cyberdynecorp/excalidraw-yjs@0.8.0","maintainers":[{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"}],"homepage":"https://github.com/CyberdyneCorp/excalidraw-native#readme","bugs":{"url":"https://github.com/CyberdyneCorp/excalidraw-native/issues"},"dist":{"shasum":"d7c6e7aada7797edbc16d363f41634b832a66efc","tarball":"https://registry.npmjs.org/@cyberdynecorp/excalidraw-yjs/-/excalidraw-yjs-0.8.0.tgz","fileCount":12,"integrity":"sha512-XattMpN2d0lC22c39AMQ/519r3lLYYytivWTbImJ89xCCf9XUQZBVwf0sX/jJTIHGFdgdRRQRhCSdnuI0y/grg==","signatures":[{"sig":"MEYCIQDAFmJ/YdT3D00pVYWNOTf9HTfTCAVxantv0FY8ThqfYAIhAN5xgjUwD8JI/mIBQD3W1CoVwrG7hZYXO4xXdYZYW8hV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31728},"main":"./dist/index.js","type":"module","_from":"file:cyberdynecorp-excalidraw-yjs-0.8.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"},"_resolved":"/tmp/362ff7e5000db3b89b1b240d4c949a54/cyberdynecorp-excalidraw-yjs-0.8.0.tgz","_integrity":"sha512-XattMpN2d0lC22c39AMQ/519r3lLYYytivWTbImJ89xCCf9XUQZBVwf0sX/jJTIHGFdgdRRQRhCSdnuI0y/grg==","repository":{"url":"git+https://github.com/CyberdyneCorp/excalidraw-native.git","type":"git","directory":"web/packages/excalidraw-yjs"},"_npmVersion":"10.8.2","description":"Optional Yjs/CRDT collaboration adapter for @cyberdynecorp/excalidraw-svelte — two-way binds an EditorStore to a Y.Doc for field-level merge and the Yjs provider ecosystem (y-websocket, Hocuspocus, Liveblocks, custom). The element-LWW core stays canonical","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"yjs":"^13.6.0","typescript":"^5.7.2","@types/node":"^22.10.2","@cyberdynecorp/excalidraw-svelte":"0.8.0"},"peerDependencies":{"yjs":"^13.6.0","@cyberdynecorp/excalidraw-svelte":">=0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/excalidraw-yjs_0.8.0_1783732881367_0.9043098681413666","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"name":"@cyberdynecorp/excalidraw-yjs","version":"0.9.0","author":{"name":"Cyberdyne Corp AI"},"license":"MIT","_id":"@cyberdynecorp/excalidraw-yjs@0.9.0","maintainers":[{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"}],"homepage":"https://github.com/CyberdyneCorp/excalidraw-native#readme","bugs":{"url":"https://github.com/CyberdyneCorp/excalidraw-native/issues"},"dist":{"shasum":"5b0e96835ec4e618fcc78b6a73cb76d0e87f2147","tarball":"https://registry.npmjs.org/@cyberdynecorp/excalidraw-yjs/-/excalidraw-yjs-0.9.0.tgz","fileCount":12,"integrity":"sha512-k2YkPz0BNVb7pfqwXAbx1UfG2JSmhz6cQm+P8oKyrm74Q+aadnmrSto+86GdaJ6lUE708xS+N74hz3/zYo/Lkg==","signatures":[{"sig":"MEQCIERzypkWu0UklSEfFD5YokPH//bGOVtGt7jsUUET5uSPAiB9Jkm6ye//1siJHfujrf+CK+9M/GOIlaKO+LBy7R89Mg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31728},"main":"./dist/index.js","type":"module","_from":"file:cyberdynecorp-excalidraw-yjs-0.9.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"},"_resolved":"/tmp/cd15f21e70e2e0d65b2a9dd158415875/cyberdynecorp-excalidraw-yjs-0.9.0.tgz","_integrity":"sha512-k2YkPz0BNVb7pfqwXAbx1UfG2JSmhz6cQm+P8oKyrm74Q+aadnmrSto+86GdaJ6lUE708xS+N74hz3/zYo/Lkg==","repository":{"url":"git+https://github.com/CyberdyneCorp/excalidraw-native.git","type":"git","directory":"web/packages/excalidraw-yjs"},"_npmVersion":"10.8.2","description":"Optional Yjs/CRDT collaboration adapter for @cyberdynecorp/excalidraw-svelte — two-way binds an EditorStore to a Y.Doc for field-level merge and the Yjs provider ecosystem (y-websocket, Hocuspocus, Liveblocks, custom). The element-LWW core stays canonical","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"yjs":"^13.6.0","typescript":"^5.7.2","@types/node":"^22.10.2","@cyberdynecorp/excalidraw-svelte":"0.9.0"},"peerDependencies":{"yjs":"^13.6.0","@cyberdynecorp/excalidraw-svelte":">=0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/excalidraw-yjs_0.9.0_1783789635256_0.020570439256013096","host":"s3://npm-registry-packages-npm-production"}},"0.10.0":{"name":"@cyberdynecorp/excalidraw-yjs","version":"0.10.0","author":{"name":"Cyberdyne Corp AI"},"license":"MIT","_id":"@cyberdynecorp/excalidraw-yjs@0.10.0","maintainers":[{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"}],"homepage":"https://github.com/CyberdyneCorp/excalidraw-native#readme","bugs":{"url":"https://github.com/CyberdyneCorp/excalidraw-native/issues"},"dist":{"shasum":"7608980b120e113d7af0a08ed1033acd08ece0d0","tarball":"https://registry.npmjs.org/@cyberdynecorp/excalidraw-yjs/-/excalidraw-yjs-0.10.0.tgz","fileCount":12,"integrity":"sha512-4brZAXgmjUQ60poM+K9Qn7h1DMjraTvPpcmie1QTmXwr+mVTUeNZcmPiutwxEV/ymjh6O3MFfn0VFgf84QCkFg==","signatures":[{"sig":"MEUCIQCGETVNQIpnFmvuHMSfMDvd4CeC+MhSY+I7OX3wdkvKuAIgfqSLinygPa574/h+2Ss0OUsX5NmJfXUUcmYb+V2TYWQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31730},"main":"./dist/index.js","type":"module","_from":"file:cyberdynecorp-excalidraw-yjs-0.10.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"},"_resolved":"/tmp/d24b4805c3a75778dfa303185f1ec783/cyberdynecorp-excalidraw-yjs-0.10.0.tgz","_integrity":"sha512-4brZAXgmjUQ60poM+K9Qn7h1DMjraTvPpcmie1QTmXwr+mVTUeNZcmPiutwxEV/ymjh6O3MFfn0VFgf84QCkFg==","repository":{"url":"git+https://github.com/CyberdyneCorp/excalidraw-native.git","type":"git","directory":"web/packages/excalidraw-yjs"},"_npmVersion":"10.8.2","description":"Optional Yjs/CRDT collaboration adapter for @cyberdynecorp/excalidraw-svelte — two-way binds an EditorStore to a Y.Doc for field-level merge and the Yjs provider ecosystem (y-websocket, Hocuspocus, Liveblocks, custom). The element-LWW core stays canonical","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"yjs":"^13.6.0","typescript":"^5.7.2","@types/node":"^22.10.2","@cyberdynecorp/excalidraw-svelte":"0.10.0"},"peerDependencies":{"yjs":"^13.6.0","@cyberdynecorp/excalidraw-svelte":">=0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/excalidraw-yjs_0.10.0_1783803572532_0.8107229840508994","host":"s3://npm-registry-packages-npm-production"}},"0.11.0":{"name":"@cyberdynecorp/excalidraw-yjs","version":"0.11.0","author":{"name":"Cyberdyne Corp AI"},"license":"MIT","_id":"@cyberdynecorp/excalidraw-yjs@0.11.0","maintainers":[{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"}],"homepage":"https://github.com/CyberdyneCorp/excalidraw-native#readme","bugs":{"url":"https://github.com/CyberdyneCorp/excalidraw-native/issues"},"dist":{"shasum":"62b9c90b9f11056f1b71fb3c281ee72026d9ca1b","tarball":"https://registry.npmjs.org/@cyberdynecorp/excalidraw-yjs/-/excalidraw-yjs-0.11.0.tgz","fileCount":12,"integrity":"sha512-KQ3BPR3Qq762hFQdj4+Zx0E1LxwDZpYgN/IUTfwKsffB2Hek4bY2UkvkOXwqswvfGhLUMOD3EY8HBWPXsjfOrQ==","signatures":[{"sig":"MEUCICCWZE7Qy6zy9FXeIbWzxayhFhG2hiDcHIMfM84KqMgEAiEA5QTUehmmE18JvF3wSpmExSdaklLNCN/5l9xqmnt2ApQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31730},"main":"./dist/index.js","type":"module","_from":"file:cyberdynecorp-excalidraw-yjs-0.11.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"},"_resolved":"/tmp/a38c67dc9b01b119a2238d5ef6ac8964/cyberdynecorp-excalidraw-yjs-0.11.0.tgz","_integrity":"sha512-KQ3BPR3Qq762hFQdj4+Zx0E1LxwDZpYgN/IUTfwKsffB2Hek4bY2UkvkOXwqswvfGhLUMOD3EY8HBWPXsjfOrQ==","repository":{"url":"git+https://github.com/CyberdyneCorp/excalidraw-native.git","type":"git","directory":"web/packages/excalidraw-yjs"},"_npmVersion":"10.8.2","description":"Optional Yjs/CRDT collaboration adapter for @cyberdynecorp/excalidraw-svelte — two-way binds an EditorStore to a Y.Doc for field-level merge and the Yjs provider ecosystem (y-websocket, Hocuspocus, Liveblocks, custom). The element-LWW core stays canonical","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"yjs":"^13.6.0","typescript":"^5.7.2","@types/node":"^22.10.2","@cyberdynecorp/excalidraw-svelte":"0.11.0"},"peerDependencies":{"yjs":"^13.6.0","@cyberdynecorp/excalidraw-svelte":">=0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/excalidraw-yjs_0.11.0_1783805417078_0.7658097525138439","host":"s3://npm-registry-packages-npm-production"}},"0.12.0":{"name":"@cyberdynecorp/excalidraw-yjs","version":"0.12.0","description":"Optional Yjs/CRDT collaboration adapter for @cyberdynecorp/excalidraw-svelte — two-way binds an EditorStore to a Y.Doc for field-level merge and the Yjs provider ecosystem (y-websocket, Hocuspocus, Liveblocks, custom). The element-LWW core stays canonical","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"peerDependencies":{"@cyberdynecorp/excalidraw-svelte":">=0.2.0","yjs":"^13.6.0"},"devDependencies":{"@types/node":"^22.10.2","typescript":"^5.7.2","yjs":"^13.6.0","@cyberdynecorp/excalidraw-svelte":"0.12.0"},"license":"MIT","author":{"name":"Cyberdyne Corp AI"},"repository":{"type":"git","url":"git+https://github.com/CyberdyneCorp/excalidraw-native.git","directory":"web/packages/excalidraw-yjs"},"homepage":"https://github.com/CyberdyneCorp/excalidraw-native#readme","sideEffects":false,"publishConfig":{"access":"public"},"scripts":{"typecheck":"tsc --noEmit","build":"tsc -p tsconfig.build.json"},"_id":"@cyberdynecorp/excalidraw-yjs@0.12.0","bugs":{"url":"https://github.com/CyberdyneCorp/excalidraw-native/issues"},"_integrity":"sha512-ktBfLJFJOHQKmtVc/pJfreniGW4zkMsL0mNFTqi4nXC4NXzYuX0vGG6gPxvAKol/UZTCrphpgpHVT6tn4w4mcg==","_resolved":"/tmp/46e60e48d12232d7ba4cef87b9fa7a6d/cyberdynecorp-excalidraw-yjs-0.12.0.tgz","_from":"file:cyberdynecorp-excalidraw-yjs-0.12.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-ktBfLJFJOHQKmtVc/pJfreniGW4zkMsL0mNFTqi4nXC4NXzYuX0vGG6gPxvAKol/UZTCrphpgpHVT6tn4w4mcg==","shasum":"94929b05c90fe402039d1183a7e132e27044bcfc","tarball":"https://registry.npmjs.org/@cyberdynecorp/excalidraw-yjs/-/excalidraw-yjs-0.12.0.tgz","fileCount":12,"unpackedSize":31730,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD/LjZ2b9hJOCy3JMiXwZ983mrGuiNHZMdWrj3hata9RQIgOs7iKQA87XREuFMBoLc91PRKwabgZ7AyMi/uMri6Lrc="}]},"_npmUser":{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"},"directories":{},"maintainers":[{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/excalidraw-yjs_0.12.0_1783903912439_0.29414521568933627"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T11:19:52.852Z","modified":"2026-07-13T00:51:52.722Z","0.6.0":"2026-07-08T11:19:53.127Z","0.7.0":"2026-07-10T21:02:02.506Z","0.8.0":"2026-07-11T01:21:21.494Z","0.9.0":"2026-07-11T17:07:15.407Z","0.10.0":"2026-07-11T20:59:32.676Z","0.11.0":"2026-07-11T21:30:17.219Z","0.12.0":"2026-07-13T00:51:52.585Z"},"bugs":{"url":"https://github.com/CyberdyneCorp/excalidraw-native/issues"},"author":{"name":"Cyberdyne Corp AI"},"license":"MIT","homepage":"https://github.com/CyberdyneCorp/excalidraw-native#readme","repository":{"type":"git","url":"git+https://github.com/CyberdyneCorp/excalidraw-native.git","directory":"web/packages/excalidraw-yjs"},"description":"Optional Yjs/CRDT collaboration adapter for @cyberdynecorp/excalidraw-svelte — two-way binds an EditorStore to a Y.Doc for field-level merge and the Yjs provider ecosystem (y-websocket, Hocuspocus, Liveblocks, custom). The element-LWW core stays canonical","maintainers":[{"name":"leonardoaraujo.santos","email":"leonardoaraujo.santos@gmail.com"}],"readme":"# @cyberdynecorp/excalidraw-yjs\n\nAn **optional Yjs/CRDT collaboration adapter** for [`@cyberdynecorp/excalidraw-svelte`](https://github.com/CyberdyneCorp/excalidraw-native/tree/main/web/packages/excalidraw-svelte). It two-way binds an `EditorStore` to a Yjs `Y.Doc`, so you can collaborate over the **entire Yjs provider ecosystem** (y-websocket, Hocuspocus, Liveblocks, PartyKit, y-webrtc, or a custom gateway) and get **field-level merge** for concurrent edits to the same element.\n\n> The canonical engine stays the built-in **element-LWW** (`version`/`versionNonce` + `reconcileElements`) shared byte-identically with the Swift twin. This adapter is **additive and optional** — a *parallel* engine that bypasses `reconcileElements` (Yjs does the merging). The core library takes **no** `yjs` dependency.\n\n## When to use which backend\n\n| | Native relay (`@cyberdynecorp/excalidraw-relay`) | Yjs adapter (this package) |\n| --- | --- | --- |\n| Engine | element-LWW, shared with Swift | Yjs CRDT |\n| Cross-platform with the iOS/Swift app | ✅ byte-identical wire protocol | ❌ web-only |\n| Concurrent edits to the **same element** | last-writer-wins (one side clobbered) | **field-level merge** (recolor + move both survive) |\n| Infrastructure | our small Node relay | your existing Yjs provider + backend |\n| Offline merge | reconciled on rejoin | CRDT convergence |\n\nChoose the relay for iPad↔browser parity; choose Yjs if you already run Yjs infrastructure or need field-level merge.\n\n## Install\n\n```sh\nnpm install @cyberdynecorp/excalidraw-yjs yjs y-websocket\n```\n\n`yjs` is a **peer dependency**; the provider (`y-websocket`, etc.) is your choice.\n\n## Usage\n\n```ts\nimport { EditorStore } from \"@cyberdynecorp/excalidraw-svelte\";\nimport { YjsCollab } from \"@cyberdynecorp/excalidraw-yjs\";\nimport * as Y from \"yjs\";\nimport { WebsocketProvider } from \"y-websocket\";\n\nconst store = new EditorStore();\nconst ydoc = new Y.Doc();\nconst provider = new WebsocketProvider(\"wss://relay.example\", \"room-123\", ydoc);\n\nconst collab = new YjsCollab(store, ydoc, {\n  awareness: provider.awareness, // presence/cursors via Yjs awareness\n  peer: { id: \"u1\", name: \"Ada\", color: \"#3b82f6\" },\n  onPresence: (peers) => {\n    /* redraw remote cursors */\n  },\n});\ncollab.start(); // two-way bind\ncollab.setCursor({ x, y }); // publish live cursor on pointer move\n// collab.stop();\n```\n\nEmbedding in an existing shared doc? Point `elementsKey` at your own convention so the board coexists with other CRDT content:\n\n```ts\nnew YjsCollab(store, ydoc, { elementsKey: \"excalidraw\" });\n```\n\nAny provider that exposes a `Y.Doc` (and optionally an `awareness`) works — including a **custom WebSocket gateway** (the adapter is provider-agnostic; it only touches the `Y.Doc`).\n\n### Live presence\n\nPass an `awareness` + `peer` and the adapter publishes this client's selection/tool (and cursor, via the editor's pointer hook) to Yjs awareness, and feeds remote peers' cursors into the editor overlay (`store.externalCursors`) — visual parity with the native relay's cursors. The demo app's `?yjs=<room>` mode wires this end-to-end over `BroadcastChannelProvider` as a working reference.\n\n## Mapping (v1)\n\n- The scene is a top-level `Y.Map` keyed by element id; each value is a per-element `Y.Map` of that element's fields — so **different fields of the same element merge** (the headline win over LWW).\n- **Scalars** (`x`, `y`, `strokeColor`, `index`, …) merge per field.\n- **Arrays/objects** (`points`, `groupIds`, `boundElements`, `pressures`, bindings, `customData`) are stored as **atomic values** in v1 — a concurrent edit to one of these is whole-value LWW within Yjs. Collaborative point-level editing is a future tier.\n- **Soft delete** via an `isDeleted` tombstone; the per-element `Y.Map` is never hard-removed.\n- **Z-order** is driven by the fractional `index` field, never `Y.Map` iteration order.\n- `version`/`versionNonce` are carried (not used to reconcile) so a Yjs-synced scene still round-trips `.excalidraw` and interoperates with the LWW engine and the Swift twin.\n\n## v1 limitations\n\n- **Web-only.** The Swift twin stays pure-Swift; a yrs CRDT over FFI is out of scope (see issue #11).\n- **Atomic arrays.** `points`/`groupIds`/`boundElements`/`pressures` are whole-value LWW within Yjs.\n\n## License\n\nMIT © Cyberdyne Corp AI\n","readmeFilename":"README.md"}