pencil-team 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +17 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9387,7 +9387,23 @@ class PenSync {
|
|
|
9387
9387
|
platform: getPlatform(),
|
|
9388
9388
|
selectedNodes: []
|
|
9389
9389
|
});
|
|
9390
|
-
|
|
9390
|
+
setTimeout(() => {
|
|
9391
|
+
const penMap = this.doc.getMap("pen");
|
|
9392
|
+
console.log(`[debug] pen map size: ${penMap.size}`);
|
|
9393
|
+
console.log(`[debug] pen map keys: ${Array.from(penMap.keys()).join(", ")}`);
|
|
9394
|
+
const allTypes = Array.from(this.doc.share.keys());
|
|
9395
|
+
console.log(`[debug] doc shared types: ${allTypes.join(", ")}`);
|
|
9396
|
+
for (const key of allTypes) {
|
|
9397
|
+
const t = this.doc.get(key);
|
|
9398
|
+
console.log(`[debug] ${key}: type=${t?.constructor?.name}, size=${t?.size ?? t?.length ?? "?"}`);
|
|
9399
|
+
}
|
|
9400
|
+
this.writeLocalFile();
|
|
9401
|
+
if (!this.initialSyncDone) {
|
|
9402
|
+
this.initialSyncDone = true;
|
|
9403
|
+
this.setupFileWatcher();
|
|
9404
|
+
}
|
|
9405
|
+
this.options.onConnected?.();
|
|
9406
|
+
}, 2000);
|
|
9391
9407
|
});
|
|
9392
9408
|
this.ws.on("message", (data) => {
|
|
9393
9409
|
const message = new Uint8Array(data);
|